All URIs are relative to https://app.launchdarkly.com
| Method | HTTP request | Description |
|---|---|---|
| createView | POST /api/v2/projects/{projectKey}/views | Create view |
| deleteView | DELETE /api/v2/projects/{projectKey}/views/{viewKey} | Delete view |
| getLinkedResources | GET /api/v2/projects/{projectKey}/views/{viewKey}/linked/{resourceType} | Get linked resources |
| getLinkedViews | GET /api/v2/projects/{projectKey}/view-associations/{resourceType}/{resourceKey} | Get linked views for a given resource |
| getView | GET /api/v2/projects/{projectKey}/views/{viewKey} | Get view |
| getViews | GET /api/v2/projects/{projectKey}/views | List views |
| linkResource | POST /api/v2/projects/{projectKey}/views/{viewKey}/link/{resourceType} | Link resource |
| unlinkResource | DELETE /api/v2/projects/{projectKey}/views/{viewKey}/link/{resourceType} | Unlink resource |
| updateView | PATCH /api/v2/projects/{projectKey}/views/{viewKey} | Update view |
View createView(viewPost)
Create a new view in the given project.
import {
ViewsBetaApi,
Configuration,
ViewPost
} from 'launchdarkly-api-typescript';
const configuration = new Configuration();
const apiInstance = new ViewsBetaApi(configuration);
let lDAPIVersion: 'beta'; //Version of the endpoint. (default to undefined)
let projectKey: string; // (default to undefined)
let viewPost: ViewPost; //View object to create
const { status, data } = await apiInstance.createView(
lDAPIVersion,
projectKey,
viewPost
);| Name | Type | Description | Notes |
|---|---|---|---|
| viewPost | ViewPost | View object to create | |
| lDAPIVersion | ['beta']Array<'beta'> | Version of the endpoint. | defaults to undefined |
| projectKey | [string] | defaults to undefined |
View
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful response | - |
| 400 | Bad request | - |
| 403 | Forbidden | - |
| 404 | Not found | - |
| 500 | Internal server error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteView()
Delete a specific view by its key.
import {
ViewsBetaApi,
Configuration
} from 'launchdarkly-api-typescript';
const configuration = new Configuration();
const apiInstance = new ViewsBetaApi(configuration);
let lDAPIVersion: 'beta'; //Version of the endpoint. (default to undefined)
let projectKey: string; // (default to undefined)
let viewKey: string; // (default to undefined)
const { status, data } = await apiInstance.deleteView(
lDAPIVersion,
projectKey,
viewKey
);| Name | Type | Description | Notes |
|---|---|---|---|
| lDAPIVersion | ['beta']Array<'beta'> | Version of the endpoint. | defaults to undefined |
| projectKey | [string] | defaults to undefined | |
| viewKey | [string] | defaults to undefined |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 204 | No content | - |
| 403 | Forbidden | - |
| 404 | Not found | - |
| 500 | Internal server error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ViewLinkedResources getLinkedResources()
Get a list of all linked resources for a given view.
import {
ViewsBetaApi,
Configuration
} from 'launchdarkly-api-typescript';
const configuration = new Configuration();
const apiInstance = new ViewsBetaApi(configuration);
let lDAPIVersion: 'beta'; //Version of the endpoint. (default to undefined)
let projectKey: string; // (default to undefined)
let viewKey: string; // (default to undefined)
let resourceType: 'flags' | 'segments'; // (default to undefined)
let limit: number; //The number of views to return. (optional) (default to undefined)
let offset: number; //Where to start in the list. Use this 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)
let sort: 'linkedAt' | 'name'; //Field to sort by. Default field is `linkedAt`, default order is ascending. (optional) (default to 'linkedAt')
let query: string; //Case-insensitive search query for linked resources. Matches resource key and, when expanded, resource name. (optional) (default to undefined)
let filter: string; //Optional resource filter expression for linked resources. - Supported for `flags` and `segments` resource types. - Uses the same syntax as link/unlink and list endpoints. - For `segments`, `environmentId` is required when `filter` is provided. (optional) (default to undefined)
let expand: Array<'maintainer' | 'resourceDetails'>; //A comma-separated list of fields to expand. (optional) (default to undefined)
const { status, data } = await apiInstance.getLinkedResources(
lDAPIVersion,
projectKey,
viewKey,
resourceType,
limit,
offset,
sort,
query,
filter,
expand
);| Name | Type | Description | Notes |
|---|---|---|---|
| lDAPIVersion | ['beta']Array<'beta'> | Version of the endpoint. | defaults to undefined |
| projectKey | [string] | defaults to undefined | |
| viewKey | [string] | defaults to undefined | |
| resourceType | [**'flags' | 'segments'**]Array<'flags' | 'segments'> | |
| limit | [number] | The number of views to return. | (optional) defaults to undefined |
| offset | [number] | Where to start in the list. Use this 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 |
| sort | [**'linkedAt' | 'name'**]Array<'linkedAt' | 'name'> | Field to sort by. Default field is `linkedAt`, default order is ascending. |
| query | [string] | Case-insensitive search query for linked resources. Matches resource key and, when expanded, resource name. | (optional) defaults to undefined |
| filter | [string] | Optional resource filter expression for linked resources. - Supported for `flags` and `segments` resource types. - Uses the same syntax as link/unlink and list endpoints. - For `segments`, `environmentId` is required when `filter` is provided. | (optional) defaults to undefined |
| expand | Array<'maintainer' | 'resourceDetails'> | A comma-separated list of fields to expand. | (optional) defaults to undefined |
ViewLinkedResources
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful response | - |
| 400 | Bad request | - |
| 403 | Forbidden | - |
| 404 | Not found | - |
| 500 | Internal server error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Views getLinkedViews()
Get a list of all linked views for a resource. Flags are identified by key. Segments are identified by segment ID.
import {
ViewsBetaApi,
Configuration
} from 'launchdarkly-api-typescript';
const configuration = new Configuration();
const apiInstance = new ViewsBetaApi(configuration);
let lDAPIVersion: 'beta'; //Version of the endpoint. (default to undefined)
let projectKey: string; // (default to undefined)
let resourceType: 'flags' | 'segments'; // (default to undefined)
let resourceKey: string; // (default to undefined)
let environmentId: string; //Environment ID. Required when resourceType is \'segments\' (optional) (default to undefined)
let limit: number; //The number of views to return. (optional) (default to undefined)
let offset: number; //Where to start in the list. Use this 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.getLinkedViews(
lDAPIVersion,
projectKey,
resourceType,
resourceKey,
environmentId,
limit,
offset
);| Name | Type | Description | Notes |
|---|---|---|---|
| lDAPIVersion | ['beta']Array<'beta'> | Version of the endpoint. | defaults to undefined |
| projectKey | [string] | defaults to undefined | |
| resourceType | [**'flags' | 'segments'**]Array<'flags' | 'segments'> | |
| resourceKey | [string] | defaults to undefined | |
| environmentId | [string] | Environment ID. Required when resourceType is 'segments' | (optional) defaults to undefined |
| limit | [number] | The number of views to return. | (optional) defaults to undefined |
| offset | [number] | Where to start in the list. Use this 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 |
Views
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful response | - |
| 400 | Bad request | - |
| 403 | Forbidden | - |
| 404 | Not found | - |
| 500 | Internal server error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
View getView()
Retrieve a specific view by its key.
import {
ViewsBetaApi,
Configuration
} from 'launchdarkly-api-typescript';
const configuration = new Configuration();
const apiInstance = new ViewsBetaApi(configuration);
let lDAPIVersion: 'beta'; //Version of the endpoint. (default to undefined)
let projectKey: string; // (default to undefined)
let viewKey: string; // (default to undefined)
let sort: 'key' | 'name' | 'updatedAt'; //A sort to apply to the list of views. (optional) (default to undefined)
let limit: number; //The number of views to return. (optional) (default to undefined)
let offset: number; //Where to start in the list. Use this 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)
let filter: string; //A filter to apply to the list of views. Supports the following fields and operators: `name` (equals, notEquals, startsWith, contains, anyOf), `key` (equals, notEquals, startsWith, contains, anyOf), `tag` (equals, anyOf), `maintainerId` (equals, anyOf), `isPayloadView` (equals). (optional) (default to undefined)
let expand: Array<'allFlags' | 'allSegments' | 'allResources' | 'maintainer' | 'flagsSummary' | 'segmentsSummary' | 'resourceSummary'>; //A comma-separated list of fields to expand. (optional) (default to undefined)
const { status, data } = await apiInstance.getView(
lDAPIVersion,
projectKey,
viewKey,
sort,
limit,
offset,
filter,
expand
);| Name | Type | Description | Notes |
|---|---|---|---|
| lDAPIVersion | ['beta']Array<'beta'> | Version of the endpoint. | defaults to undefined |
| projectKey | [string] | defaults to undefined | |
| viewKey | [string] | defaults to undefined | |
| sort | [**'key' | 'name' | 'updatedAt'**]Array<'key' | 'name' | 'updatedAt'> |
| limit | [number] | The number of views to return. | (optional) defaults to undefined |
| offset | [number] | Where to start in the list. Use this 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 |
| filter | [string] | A filter to apply to the list of views. Supports the following fields and operators: `name` (equals, notEquals, startsWith, contains, anyOf), `key` (equals, notEquals, startsWith, contains, anyOf), `tag` (equals, anyOf), `maintainerId` (equals, anyOf), `isPayloadView` (equals). | (optional) defaults to undefined |
| expand | Array<'allFlags' | 'allSegments' | 'allResources' | 'maintainer' | 'flagsSummary' | 'segmentsSummary' | 'resourceSummary'> | A comma-separated list of fields to expand. | (optional) defaults to undefined |
View
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful response | - |
| 400 | Bad request | - |
| 403 | Forbidden | - |
| 404 | Not found | - |
| 500 | Internal server error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Views getViews()
Get a list of all views in the given project.
import {
ViewsBetaApi,
Configuration
} from 'launchdarkly-api-typescript';
const configuration = new Configuration();
const apiInstance = new ViewsBetaApi(configuration);
let lDAPIVersion: 'beta'; //Version of the endpoint. (default to undefined)
let projectKey: string; // (default to undefined)
let sort: 'key' | 'name' | 'updatedAt'; //A sort to apply to the list of views. (optional) (default to undefined)
let limit: number; //The number of views to return. (optional) (default to undefined)
let offset: number; //Where to start in the list. Use this 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)
let filter: string; //A filter to apply to the list of views. Supports the following fields and operators: `name` (equals, notEquals, startsWith, contains, anyOf), `key` (equals, notEquals, startsWith, contains, anyOf), `tag` (equals, anyOf), `maintainerId` (equals, anyOf), `isPayloadView` (equals). (optional) (default to undefined)
let expand: Array<'flagsSummary' | 'segmentsSummary' | 'resourceSummary'>; //A comma-separated list of fields to expand. (optional) (default to undefined)
const { status, data } = await apiInstance.getViews(
lDAPIVersion,
projectKey,
sort,
limit,
offset,
filter,
expand
);| Name | Type | Description | Notes |
|---|---|---|---|
| lDAPIVersion | ['beta']Array<'beta'> | Version of the endpoint. | defaults to undefined |
| projectKey | [string] | defaults to undefined | |
| sort | [**'key' | 'name' | 'updatedAt'**]Array<'key' | 'name' | 'updatedAt'> |
| limit | [number] | The number of views to return. | (optional) defaults to undefined |
| offset | [number] | Where to start in the list. Use this 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 |
| filter | [string] | A filter to apply to the list of views. Supports the following fields and operators: `name` (equals, notEquals, startsWith, contains, anyOf), `key` (equals, notEquals, startsWith, contains, anyOf), `tag` (equals, anyOf), `maintainerId` (equals, anyOf), `isPayloadView` (equals). | (optional) defaults to undefined |
| expand | Array<'flagsSummary' | 'segmentsSummary' | 'resourceSummary'> | A comma-separated list of fields to expand. | (optional) defaults to undefined |
Views
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful response | - |
| 400 | Bad request | - |
| 403 | Forbidden | - |
| 404 | Not found | - |
| 500 | Internal server error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
LinkResourceSuccessResponse linkResource(viewLinkRequest)
Link one or multiple resources to a view by keys, filters, or both: - Link flags using flag keys or filters (maintainerId, maintainerTeamKey, tags, state, query) - Link segments using segment IDs or filters (tags, query, unbounded) When both keys and filters are provided, resources matching either condition are linked (union).
import {
ViewsBetaApi,
Configuration,
ViewLinkRequest
} from 'launchdarkly-api-typescript';
const configuration = new Configuration();
const apiInstance = new ViewsBetaApi(configuration);
let lDAPIVersion: 'beta'; //Version of the endpoint. (default to undefined)
let projectKey: string; // (default to undefined)
let viewKey: string; // (default to undefined)
let resourceType: 'flags' | 'segments'; // (default to undefined)
let viewLinkRequest: ViewLinkRequest; //Resources to link to the view. You can provide explicit keys/IDs, filters, or both. - Flags: identified by key or filtered by maintainerId, maintainerTeamKey, tags, state, query - Segments: identified by segment ID or filtered by tags, query, unbounded
const { status, data } = await apiInstance.linkResource(
lDAPIVersion,
projectKey,
viewKey,
resourceType,
viewLinkRequest
);| Name | Type | Description | Notes |
|---|---|---|---|
| viewLinkRequest | ViewLinkRequest | Resources to link to the view. You can provide explicit keys/IDs, filters, or both. - Flags: identified by key or filtered by maintainerId, maintainerTeamKey, tags, state, query - Segments: identified by segment ID or filtered by tags, query, unbounded | |
| lDAPIVersion | ['beta']Array<'beta'> | Version of the endpoint. | defaults to undefined |
| projectKey | [string] | defaults to undefined | |
| viewKey | [string] | defaults to undefined | |
| resourceType | [**'flags' | 'segments'**]Array<'flags' | 'segments'> |
LinkResourceSuccessResponse
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful response | - |
| 400 | Bad request | - |
| 403 | Forbidden | - |
| 404 | Not found | - |
| 500 | Internal server error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UnlinkResourceSuccessResponse unlinkResource(viewLinkRequest)
Unlink one or multiple resources from a view: - Unlink flags using flag keys - Unlink segments using segment IDs
import {
ViewsBetaApi,
Configuration,
ViewLinkRequest
} from 'launchdarkly-api-typescript';
const configuration = new Configuration();
const apiInstance = new ViewsBetaApi(configuration);
let lDAPIVersion: 'beta'; //Version of the endpoint. (default to undefined)
let projectKey: string; // (default to undefined)
let viewKey: string; // (default to undefined)
let resourceType: 'flags' | 'segments'; // (default to undefined)
let viewLinkRequest: ViewLinkRequest; //The resource to link to the view. Flags are identified by key. Segments are identified by segment ID.
const { status, data } = await apiInstance.unlinkResource(
lDAPIVersion,
projectKey,
viewKey,
resourceType,
viewLinkRequest
);| Name | Type | Description | Notes |
|---|---|---|---|
| viewLinkRequest | ViewLinkRequest | The resource to link to the view. Flags are identified by key. Segments are identified by segment ID. | |
| lDAPIVersion | ['beta']Array<'beta'> | Version of the endpoint. | defaults to undefined |
| projectKey | [string] | defaults to undefined | |
| viewKey | [string] | defaults to undefined | |
| resourceType | [**'flags' | 'segments'**]Array<'flags' | 'segments'> |
UnlinkResourceSuccessResponse
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful response with unlink details | - |
| 400 | Bad request | - |
| 403 | Forbidden | - |
| 404 | Not found | - |
| 500 | Internal server error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
View updateView(viewPatch)
Edit an existing view. The request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields. Here's an example: { \"description\": \"Example updated description\", \"tags\": [\"new-tag\"] }
import {
ViewsBetaApi,
Configuration,
ViewPatch
} from 'launchdarkly-api-typescript';
const configuration = new Configuration();
const apiInstance = new ViewsBetaApi(configuration);
let lDAPIVersion: 'beta'; //Version of the endpoint. (default to undefined)
let projectKey: string; // (default to undefined)
let viewKey: string; // (default to undefined)
let viewPatch: ViewPatch; //A JSON representation of the view including only the fields to update.
const { status, data } = await apiInstance.updateView(
lDAPIVersion,
projectKey,
viewKey,
viewPatch
);| Name | Type | Description | Notes |
|---|---|---|---|
| viewPatch | ViewPatch | A JSON representation of the view including only the fields to update. | |
| lDAPIVersion | ['beta']Array<'beta'> | Version of the endpoint. | defaults to undefined |
| projectKey | [string] | defaults to undefined | |
| viewKey | [string] | defaults to undefined |
View
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful response | - |
| 400 | Bad request | - |
| 403 | Forbidden | - |
| 404 | Not found | - |
| 500 | Internal server error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]