Skip to content

Commit 9c0fd53

Browse files
author
LaunchDarklyCI
committed
Version 3.4.0 automatically generated from ld-openapi@003892e.
1 parent e3c555d commit 9c0fd53

File tree

234 files changed

+2592
-241
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

234 files changed

+2592
-241
lines changed

README.md

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ Build custom integrations with the LaunchDarkly REST API
88

99
This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
1010

11-
- API version: 3.3.2
12-
- Package version: 3.3.2
11+
- API version: 3.4.0
12+
- Package version: 3.4.0
1313
- Build package: io.swagger.codegen.languages.PythonClientCodegen
1414
For more information, please visit [https://support.launchdarkly.com](https://support.launchdarkly.com)
1515

@@ -64,19 +64,14 @@ configuration.api_key['Authorization'] = 'YOUR_API_KEY'
6464
# configuration.api_key_prefix['Authorization'] = 'Bearer'
6565

6666
# create an instance of the API class
67-
api_instance = launchdarkly_api.AuditLogApi(launchdarkly_api.ApiClient(configuration))
68-
before = 789 # int | A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries returned will have before this timestamp. (optional)
69-
after = 789 # int | A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries returned will have occurred after this timestamp. (optional)
70-
q = 'q_example' # str | Text to search for. You can search for the full or partial name of the resource involved or full or partial email address of the member who made the change. (optional)
71-
limit = 8.14 # float | A limit on the number of audit log entries to be returned, between 1 and 20. (optional)
72-
spec = 'spec_example' # str | A resource specifier, allowing you to filter audit log listings by resource. (optional)
67+
api_instance = launchdarkly_api.AccessTokensApi(launchdarkly_api.ApiClient(configuration))
68+
token_id = 'token_id_example' # str | The access token ID.
7369

7470
try:
75-
# Get a list of all audit log entries. The query parameters allow you to restrict the returned results by date ranges, resource specifiers, or a full-text search query.
76-
api_response = api_instance.get_audit_log_entries(before=before, after=after, q=q, limit=limit, spec=spec)
77-
pprint(api_response)
71+
# Delete an access token by ID.
72+
api_instance.delete_token(token_id)
7873
except ApiException as e:
79-
print("Exception when calling AuditLogApi->get_audit_log_entries: %s\n" % e)
74+
print("Exception when calling AccessTokensApi->delete_token: %s\n" % e)
8075

8176
```
8277

@@ -86,6 +81,12 @@ All URIs are relative to *https://app.launchdarkly.com/api/v2*
8681

8782
Class | Method | HTTP request | Description
8883
------------ | ------------- | ------------- | -------------
84+
*AccessTokensApi* | [**delete_token**](docs/AccessTokensApi.md#delete_token) | **DELETE** /tokens/{tokenId} | Delete an access token by ID.
85+
*AccessTokensApi* | [**get_token**](docs/AccessTokensApi.md#get_token) | **GET** /tokens/{tokenId} | Get a single access token by ID.
86+
*AccessTokensApi* | [**get_tokens**](docs/AccessTokensApi.md#get_tokens) | **GET** /tokens | Returns a list of tokens in the account.
87+
*AccessTokensApi* | [**patch_token**](docs/AccessTokensApi.md#patch_token) | **PATCH** /tokens/{tokenId} | Modify an access tokenby ID.
88+
*AccessTokensApi* | [**post_token**](docs/AccessTokensApi.md#post_token) | **POST** /tokens | Create a new token.
89+
*AccessTokensApi* | [**reset_token**](docs/AccessTokensApi.md#reset_token) | **POST** /tokens/{tokenId}/reset | Reset an access token's secret key with an optional expiry time for the old key.
8990
*AuditLogApi* | [**get_audit_log_entries**](docs/AuditLogApi.md#get_audit_log_entries) | **GET** /auditlog | Get a list of all audit log entries. The query parameters allow you to restrict the returned results by date ranges, resource specifiers, or a full-text search query.
9091
*AuditLogApi* | [**get_audit_log_entry**](docs/AuditLogApi.md#get_audit_log_entry) | **GET** /auditlog/{resourceId} | Use this endpoint to fetch a single audit log entry by its resouce ID.
9192
*CustomRolesApi* | [**delete_custom_role**](docs/CustomRolesApi.md#delete_custom_role) | **DELETE** /roles/{customRoleKey} | Delete a custom role by key.
@@ -230,6 +231,9 @@ Class | Method | HTTP request | Description
230231
- [StreamUsageSeries](docs/StreamUsageSeries.md)
231232
- [Streams](docs/Streams.md)
232233
- [Target](docs/Target.md)
234+
- [Token](docs/Token.md)
235+
- [TokenBody](docs/TokenBody.md)
236+
- [Tokens](docs/Tokens.md)
233237
- [Usage](docs/Usage.md)
234238
- [UsageError](docs/UsageError.md)
235239
- [UsageLinks](docs/UsageLinks.md)

docs/AccessTokensApi.md

Lines changed: 329 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,329 @@
1+
# launchdarkly_api.AccessTokensApi
2+
3+
All URIs are relative to *https://app.launchdarkly.com/api/v2*
4+
5+
Method | HTTP request | Description
6+
------------- | ------------- | -------------
7+
[**delete_token**](AccessTokensApi.md#delete_token) | **DELETE** /tokens/{tokenId} | Delete an access token by ID.
8+
[**get_token**](AccessTokensApi.md#get_token) | **GET** /tokens/{tokenId} | Get a single access token by ID.
9+
[**get_tokens**](AccessTokensApi.md#get_tokens) | **GET** /tokens | Returns a list of tokens in the account.
10+
[**patch_token**](AccessTokensApi.md#patch_token) | **PATCH** /tokens/{tokenId} | Modify an access tokenby ID.
11+
[**post_token**](AccessTokensApi.md#post_token) | **POST** /tokens | Create a new token.
12+
[**reset_token**](AccessTokensApi.md#reset_token) | **POST** /tokens/{tokenId}/reset | Reset an access token's secret key with an optional expiry time for the old key.
13+
14+
15+
# **delete_token**
16+
> delete_token(token_id)
17+
18+
Delete an access token by ID.
19+
20+
### Example
21+
```python
22+
from __future__ import print_function
23+
import time
24+
import launchdarkly_api
25+
from launchdarkly_api.rest import ApiException
26+
from pprint import pprint
27+
28+
# Configure API key authorization: Token
29+
configuration = launchdarkly_api.Configuration()
30+
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
31+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
32+
# configuration.api_key_prefix['Authorization'] = 'Bearer'
33+
34+
# create an instance of the API class
35+
api_instance = launchdarkly_api.AccessTokensApi(launchdarkly_api.ApiClient(configuration))
36+
token_id = 'token_id_example' # str | The access token ID.
37+
38+
try:
39+
# Delete an access token by ID.
40+
api_instance.delete_token(token_id)
41+
except ApiException as e:
42+
print("Exception when calling AccessTokensApi->delete_token: %s\n" % e)
43+
```
44+
45+
### Parameters
46+
47+
Name | Type | Description | Notes
48+
------------- | ------------- | ------------- | -------------
49+
**token_id** | **str**| The access token ID. |
50+
51+
### Return type
52+
53+
void (empty response body)
54+
55+
### Authorization
56+
57+
[Token](../README.md#Token)
58+
59+
### HTTP request headers
60+
61+
- **Content-Type**: application/json
62+
- **Accept**: application/json
63+
64+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
65+
66+
# **get_token**
67+
> Token get_token(token_id)
68+
69+
Get a single access token by ID.
70+
71+
### Example
72+
```python
73+
from __future__ import print_function
74+
import time
75+
import launchdarkly_api
76+
from launchdarkly_api.rest import ApiException
77+
from pprint import pprint
78+
79+
# Configure API key authorization: Token
80+
configuration = launchdarkly_api.Configuration()
81+
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
82+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
83+
# configuration.api_key_prefix['Authorization'] = 'Bearer'
84+
85+
# create an instance of the API class
86+
api_instance = launchdarkly_api.AccessTokensApi(launchdarkly_api.ApiClient(configuration))
87+
token_id = 'token_id_example' # str | The access token ID.
88+
89+
try:
90+
# Get a single access token by ID.
91+
api_response = api_instance.get_token(token_id)
92+
pprint(api_response)
93+
except ApiException as e:
94+
print("Exception when calling AccessTokensApi->get_token: %s\n" % e)
95+
```
96+
97+
### Parameters
98+
99+
Name | Type | Description | Notes
100+
------------- | ------------- | ------------- | -------------
101+
**token_id** | **str**| The access token ID. |
102+
103+
### Return type
104+
105+
[**Token**](Token.md)
106+
107+
### Authorization
108+
109+
[Token](../README.md#Token)
110+
111+
### HTTP request headers
112+
113+
- **Content-Type**: application/json
114+
- **Accept**: application/json
115+
116+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
117+
118+
# **get_tokens**
119+
> Tokens get_tokens(show_all=show_all)
120+
121+
Returns a list of tokens in the account.
122+
123+
### Example
124+
```python
125+
from __future__ import print_function
126+
import time
127+
import launchdarkly_api
128+
from launchdarkly_api.rest import ApiException
129+
from pprint import pprint
130+
131+
# Configure API key authorization: Token
132+
configuration = launchdarkly_api.Configuration()
133+
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
134+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
135+
# configuration.api_key_prefix['Authorization'] = 'Bearer'
136+
137+
# create an instance of the API class
138+
api_instance = launchdarkly_api.AccessTokensApi(launchdarkly_api.ApiClient(configuration))
139+
show_all = true # bool | If set to true, and the authentication access token has the \"Admin\" role, personal access tokens for all members will be retrieved. (optional)
140+
141+
try:
142+
# Returns a list of tokens in the account.
143+
api_response = api_instance.get_tokens(show_all=show_all)
144+
pprint(api_response)
145+
except ApiException as e:
146+
print("Exception when calling AccessTokensApi->get_tokens: %s\n" % e)
147+
```
148+
149+
### Parameters
150+
151+
Name | Type | Description | Notes
152+
------------- | ------------- | ------------- | -------------
153+
**show_all** | **bool**| If set to true, and the authentication access token has the \"Admin\" role, personal access tokens for all members will be retrieved. | [optional]
154+
155+
### Return type
156+
157+
[**Tokens**](Tokens.md)
158+
159+
### Authorization
160+
161+
[Token](../README.md#Token)
162+
163+
### HTTP request headers
164+
165+
- **Content-Type**: application/json
166+
- **Accept**: application/json
167+
168+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
169+
170+
# **patch_token**
171+
> Token patch_token(token_id, patch_delta)
172+
173+
Modify an access tokenby ID.
174+
175+
### Example
176+
```python
177+
from __future__ import print_function
178+
import time
179+
import launchdarkly_api
180+
from launchdarkly_api.rest import ApiException
181+
from pprint import pprint
182+
183+
# Configure API key authorization: Token
184+
configuration = launchdarkly_api.Configuration()
185+
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
186+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
187+
# configuration.api_key_prefix['Authorization'] = 'Bearer'
188+
189+
# create an instance of the API class
190+
api_instance = launchdarkly_api.AccessTokensApi(launchdarkly_api.ApiClient(configuration))
191+
token_id = 'token_id_example' # str | The access token ID.
192+
patch_delta = [launchdarkly_api.PatchOperation()] # list[PatchOperation] | Requires a JSON Patch representation of the desired changes to the project. 'http://jsonpatch.com/'
193+
194+
try:
195+
# Modify an access tokenby ID.
196+
api_response = api_instance.patch_token(token_id, patch_delta)
197+
pprint(api_response)
198+
except ApiException as e:
199+
print("Exception when calling AccessTokensApi->patch_token: %s\n" % e)
200+
```
201+
202+
### Parameters
203+
204+
Name | Type | Description | Notes
205+
------------- | ------------- | ------------- | -------------
206+
**token_id** | **str**| The access token ID. |
207+
**patch_delta** | [**list[PatchOperation]**](PatchOperation.md)| Requires a JSON Patch representation of the desired changes to the project. 'http://jsonpatch.com/' |
208+
209+
### Return type
210+
211+
[**Token**](Token.md)
212+
213+
### Authorization
214+
215+
[Token](../README.md#Token)
216+
217+
### HTTP request headers
218+
219+
- **Content-Type**: application/json
220+
- **Accept**: application/json
221+
222+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
223+
224+
# **post_token**
225+
> Token post_token(token_body)
226+
227+
Create a new token.
228+
229+
### Example
230+
```python
231+
from __future__ import print_function
232+
import time
233+
import launchdarkly_api
234+
from launchdarkly_api.rest import ApiException
235+
from pprint import pprint
236+
237+
# Configure API key authorization: Token
238+
configuration = launchdarkly_api.Configuration()
239+
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
240+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
241+
# configuration.api_key_prefix['Authorization'] = 'Bearer'
242+
243+
# create an instance of the API class
244+
api_instance = launchdarkly_api.AccessTokensApi(launchdarkly_api.ApiClient(configuration))
245+
token_body = launchdarkly_api.TokenBody() # TokenBody | Create a new access token.
246+
247+
try:
248+
# Create a new token.
249+
api_response = api_instance.post_token(token_body)
250+
pprint(api_response)
251+
except ApiException as e:
252+
print("Exception when calling AccessTokensApi->post_token: %s\n" % e)
253+
```
254+
255+
### Parameters
256+
257+
Name | Type | Description | Notes
258+
------------- | ------------- | ------------- | -------------
259+
**token_body** | [**TokenBody**](TokenBody.md)| Create a new access token. |
260+
261+
### Return type
262+
263+
[**Token**](Token.md)
264+
265+
### Authorization
266+
267+
[Token](../README.md#Token)
268+
269+
### HTTP request headers
270+
271+
- **Content-Type**: application/json
272+
- **Accept**: application/json
273+
274+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
275+
276+
# **reset_token**
277+
> Token reset_token(token_id, expiry=expiry)
278+
279+
Reset an access token's secret key with an optional expiry time for the old key.
280+
281+
### Example
282+
```python
283+
from __future__ import print_function
284+
import time
285+
import launchdarkly_api
286+
from launchdarkly_api.rest import ApiException
287+
from pprint import pprint
288+
289+
# Configure API key authorization: Token
290+
configuration = launchdarkly_api.Configuration()
291+
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
292+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
293+
# configuration.api_key_prefix['Authorization'] = 'Bearer'
294+
295+
# create an instance of the API class
296+
api_instance = launchdarkly_api.AccessTokensApi(launchdarkly_api.ApiClient(configuration))
297+
token_id = 'token_id_example' # str | The access token ID.
298+
expiry = 789 # int | An expiration time for the old token key, expressed as a Unix epoch time in milliseconds. By default, the token will expire immediately. (optional)
299+
300+
try:
301+
# Reset an access token's secret key with an optional expiry time for the old key.
302+
api_response = api_instance.reset_token(token_id, expiry=expiry)
303+
pprint(api_response)
304+
except ApiException as e:
305+
print("Exception when calling AccessTokensApi->reset_token: %s\n" % e)
306+
```
307+
308+
### Parameters
309+
310+
Name | Type | Description | Notes
311+
------------- | ------------- | ------------- | -------------
312+
**token_id** | **str**| The access token ID. |
313+
**expiry** | **int**| An expiration time for the old token key, expressed as a Unix epoch time in milliseconds. By default, the token will expire immediately. | [optional]
314+
315+
### Return type
316+
317+
[**Token**](Token.md)
318+
319+
### Authorization
320+
321+
[Token](../README.md#Token)
322+
323+
### HTTP request headers
324+
325+
- **Content-Type**: application/json
326+
- **Accept**: application/json
327+
328+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
329+

0 commit comments

Comments
 (0)