All URIs are relative to https://app.launchdarkly.com
| Method | HTTP request | Description |
|---|---|---|
| deleteToken | DELETE /api/v2/tokens/{id} | Delete access token |
| getToken | GET /api/v2/tokens/{id} | Get access token |
| getTokens | GET /api/v2/tokens | List access tokens |
| patchToken | PATCH /api/v2/tokens/{id} | Patch access token |
| postToken | POST /api/v2/tokens | Create access token |
| resetToken | POST /api/v2/tokens/{id}/reset | Reset access token |
deleteToken()
Delete an access token by ID.
import {
AccessTokensApi,
Configuration
} from 'launchdarkly-api-typescript';
const configuration = new Configuration();
const apiInstance = new AccessTokensApi(configuration);
let id: string; //The ID of the access token to update (default to undefined)
const { status, data } = await apiInstance.deleteToken(
id
);| Name | Type | Description | Notes |
|---|---|---|---|
| id | [string] | The ID of the access token to update | defaults to undefined |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 204 | Action succeeded | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 404 | Invalid resource identifier | - |
| 429 | Rate limited | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Token getToken()
Get a single access token by ID.
import {
AccessTokensApi,
Configuration
} from 'launchdarkly-api-typescript';
const configuration = new Configuration();
const apiInstance = new AccessTokensApi(configuration);
let id: string; //The ID of the access token (default to undefined)
const { status, data } = await apiInstance.getToken(
id
);| Name | Type | Description | Notes |
|---|---|---|---|
| id | [string] | The ID of the access token | defaults to undefined |
Token
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Access token response | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 404 | Invalid resource identifier | - |
| 429 | Rate limited | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Tokens getTokens()
Fetch a list of all access tokens.
import {
AccessTokensApi,
Configuration
} from 'launchdarkly-api-typescript';
const configuration = new Configuration();
const apiInstance = new AccessTokensApi(configuration);
let showAll: boolean; //If set to true, and the authentication access token has the \'Admin\' role, personal access tokens for all members will be retrieved. (optional) (default to undefined)
let limit: number; //The number of access tokens to return in the response. Defaults to 25. (optional) (default to undefined)
let offset: number; //Where to start in the list. This is for use with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`. (optional) (default to undefined)
const { status, data } = await apiInstance.getTokens(
showAll,
limit,
offset
);| Name | Type | Description | Notes |
|---|---|---|---|
| showAll | [boolean] | If set to true, and the authentication access token has the 'Admin' role, personal access tokens for all members will be retrieved. | (optional) defaults to undefined |
| limit | [number] | The number of access tokens to return in the response. Defaults to 25. | (optional) defaults to undefined |
| offset | [number] | Where to start in the list. This is for use with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`. | (optional) defaults to undefined |
Tokens
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Access tokens collection response | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 429 | Rate limited | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Token patchToken(patchOperation)
Update an access token's settings. Updating an access token uses a JSON patch representation of the desired changes. To learn more, read Updates.
import {
AccessTokensApi,
Configuration
} from 'launchdarkly-api-typescript';
const configuration = new Configuration();
const apiInstance = new AccessTokensApi(configuration);
let id: string; //The ID of the access token to update (default to undefined)
let patchOperation: Array<PatchOperation>; //
const { status, data } = await apiInstance.patchToken(
id,
patchOperation
);| Name | Type | Description | Notes |
|---|---|---|---|
| patchOperation | Array | ||
| id | [string] | The ID of the access token to update | defaults to undefined |
Token
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Access token response | - |
| 400 | Invalid request | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 404 | Invalid resource identifier | - |
| 409 | Status conflict | - |
| 422 | Invalid patch content | - |
| 429 | Rate limited | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Token postToken(accessTokenPost)
Create a new access token.
import {
AccessTokensApi,
Configuration,
AccessTokenPost
} from 'launchdarkly-api-typescript';
const configuration = new Configuration();
const apiInstance = new AccessTokensApi(configuration);
let accessTokenPost: AccessTokenPost; //
const { status, data } = await apiInstance.postToken(
accessTokenPost
);| Name | Type | Description | Notes |
|---|---|---|---|
| accessTokenPost | AccessTokenPost |
Token
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 201 | Access token response | - |
| 400 | Invalid request | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 429 | Rate limited | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Token resetToken()
Reset an access token's secret key with an optional expiry time for the old key.
import {
AccessTokensApi,
Configuration
} from 'launchdarkly-api-typescript';
const configuration = new Configuration();
const apiInstance = new AccessTokensApi(configuration);
let id: string; //The ID of the access token to update (default to undefined)
let expiry: number; //An expiration time for the old token key, expressed as a Unix epoch time in milliseconds. By default, the token will expire immediately. (optional) (default to undefined)
const { status, data } = await apiInstance.resetToken(
id,
expiry
);| Name | Type | Description | Notes |
|---|---|---|---|
| id | [string] | The ID of the access token to update | defaults to undefined |
| expiry | [number] | An expiration time for the old token key, expressed as a Unix epoch time in milliseconds. By default, the token will expire immediately. | (optional) defaults to undefined |
Token
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Access token response | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 404 | Invalid resource identifier | - |
| 429 | Rate limited | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]