Skip to content

Latest commit

 

History

History
404 lines (281 loc) · 16.1 KB

ApplicationsBetaApi.md

File metadata and controls

404 lines (281 loc) · 16.1 KB

LaunchDarklyApi.ApplicationsBetaApi

All URIs are relative to https://app.launchdarkly.com

Method HTTP request Description
deleteApplication DELETE /api/v2/applications/{applicationKey} Delete application
deleteApplicationVersion DELETE /api/v2/applications/{applicationKey}/versions/{versionKey} Delete application version
getApplication GET /api/v2/applications/{applicationKey} Get application by key
getApplicationVersions GET /api/v2/applications/{applicationKey}/versions Get application versions by application key
getApplications GET /api/v2/applications Get applications
patchApplication PATCH /api/v2/applications/{applicationKey} Update application
patchApplicationVersion PATCH /api/v2/applications/{applicationKey}/versions/{versionKey} Update application version

deleteApplication

deleteApplication(applicationKey)

Delete application

Delete an application.

Example

import LaunchDarklyApi from 'launchdarkly-api';
let defaultClient = LaunchDarklyApi.ApiClient.instance;
// Configure API key authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.apiKeyPrefix = 'Token';

let apiInstance = new LaunchDarklyApi.ApplicationsBetaApi();
let applicationKey = "applicationKey_example"; // String | The application key
apiInstance.deleteApplication(applicationKey, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});

Parameters

Name Type Description Notes
applicationKey String The application key

Return type

null (empty response body)

Authorization

ApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

deleteApplicationVersion

deleteApplicationVersion(applicationKey, versionKey)

Delete application version

Delete an application version.

Example

import LaunchDarklyApi from 'launchdarkly-api';
let defaultClient = LaunchDarklyApi.ApiClient.instance;
// Configure API key authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.apiKeyPrefix = 'Token';

let apiInstance = new LaunchDarklyApi.ApplicationsBetaApi();
let applicationKey = "applicationKey_example"; // String | The application key
let versionKey = "versionKey_example"; // String | The application version key
apiInstance.deleteApplicationVersion(applicationKey, versionKey, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});

Parameters

Name Type Description Notes
applicationKey String The application key
versionKey String The application version key

Return type

null (empty response body)

Authorization

ApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getApplication

ApplicationRep getApplication(applicationKey, opts)

Get application by key

Retrieve an application by the application key. ### Expanding the application response LaunchDarkly supports expanding the "Get application" response to include additional fields. To expand the response, append the `expand` query parameter and include the following: * `flags` includes details on the flags that have been evaluated by the application For example, use `?expand=flags` to include the `flags` field in the response. By default, this field is not included in the response.

Example

import LaunchDarklyApi from 'launchdarkly-api';
let defaultClient = LaunchDarklyApi.ApiClient.instance;
// Configure API key authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.apiKeyPrefix = 'Token';

let apiInstance = new LaunchDarklyApi.ApplicationsBetaApi();
let applicationKey = "applicationKey_example"; // String | The application key
let opts = {
  'expand': "expand_example" // String | A comma-separated list of properties that can reveal additional information in the response. Options: `flags`.
};
apiInstance.getApplication(applicationKey, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
applicationKey String The application key
expand String A comma-separated list of properties that can reveal additional information in the response. Options: `flags`. [optional]

Return type

ApplicationRep

Authorization

ApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getApplicationVersions

ApplicationVersionsCollectionRep getApplicationVersions(applicationKey, opts)

Get application versions by application key

Get a list of versions for a specific application in an account.

Example

import LaunchDarklyApi from 'launchdarkly-api';
let defaultClient = LaunchDarklyApi.ApiClient.instance;
// Configure API key authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.apiKeyPrefix = 'Token';

let apiInstance = new LaunchDarklyApi.ApplicationsBetaApi();
let applicationKey = "applicationKey_example"; // String | The application key
let opts = {
  'filter': "filter_example", // String | Accepts filter by `key`, `name`, `supported`, and `autoAdded`. To learn more about the filter syntax, read [Filtering applications and application versions](https://launchdarkly.com/docs/api/applications-beta#filtering-applications-and-application-versions).
  'limit': 789, // Number | The number of versions to return. Defaults to 50.
  'offset': 789, // 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`.
  'sort': "sort_example" // String | Accepts sorting order and fields. Fields can be comma separated. Possible fields are `creationDate`, `name`. Examples: `sort=name` sort by names ascending, `sort=-name,creationDate` sort by names descending and creationDate ascending.
};
apiInstance.getApplicationVersions(applicationKey, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
applicationKey String The application key
filter String Accepts filter by `key`, `name`, `supported`, and `autoAdded`. To learn more about the filter syntax, read Filtering applications and application versions. [optional]
limit Number The number of versions to return. Defaults to 50. [optional]
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]
sort String Accepts sorting order and fields. Fields can be comma separated. Possible fields are `creationDate`, `name`. Examples: `sort=name` sort by names ascending, `sort=-name,creationDate` sort by names descending and creationDate ascending. [optional]

Return type

ApplicationVersionsCollectionRep

Authorization

ApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getApplications

ApplicationCollectionRep getApplications(opts)

Get applications

Get a list of applications. ### Expanding the applications response LaunchDarkly supports expanding the "Get applications" response to include additional fields. To expand the response, append the `expand` query parameter and include the following: * `flags` includes details on the flags that have been evaluated by the application For example, use `?expand=flags` to include the `flags` field in the response. By default, this field is not included in the response.

Example

import LaunchDarklyApi from 'launchdarkly-api';
let defaultClient = LaunchDarklyApi.ApiClient.instance;
// Configure API key authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.apiKeyPrefix = 'Token';

let apiInstance = new LaunchDarklyApi.ApplicationsBetaApi();
let opts = {
  'filter': "filter_example", // String | Accepts filter by `key`, `name`, `kind`, and `autoAdded`. To learn more about the filter syntax, read [Filtering applications and application versions](https://launchdarkly.com/docs/api/applications-beta#filtering-applications-and-application-versions).
  'limit': 789, // Number | The number of applications to return. Defaults to 10.
  'offset': 789, // 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`.
  'sort': "sort_example", // String | Accepts sorting order and fields. Fields can be comma separated. Possible fields are `creationDate`, `name`. Examples: `sort=name` sort by names ascending, `sort=-name,creationDate` sort by names descending and creationDate ascending.
  'expand': "expand_example" // String | A comma-separated list of properties that can reveal additional information in the response. Options: `flags`.
};
apiInstance.getApplications(opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
filter String Accepts filter by `key`, `name`, `kind`, and `autoAdded`. To learn more about the filter syntax, read Filtering applications and application versions. [optional]
limit Number The number of applications to return. Defaults to 10. [optional]
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]
sort String Accepts sorting order and fields. Fields can be comma separated. Possible fields are `creationDate`, `name`. Examples: `sort=name` sort by names ascending, `sort=-name,creationDate` sort by names descending and creationDate ascending. [optional]
expand String A comma-separated list of properties that can reveal additional information in the response. Options: `flags`. [optional]

Return type

ApplicationCollectionRep

Authorization

ApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

patchApplication

ApplicationRep patchApplication(applicationKey, patchOperation)

Update application

Update an application. You can update the `description` and `kind` fields. Requires a JSON patch representation of the desired changes to the application. To learn more, read Updates.

Example

import LaunchDarklyApi from 'launchdarkly-api';
let defaultClient = LaunchDarklyApi.ApiClient.instance;
// Configure API key authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.apiKeyPrefix = 'Token';

let apiInstance = new LaunchDarklyApi.ApplicationsBetaApi();
let applicationKey = "applicationKey_example"; // String | The application key
let patchOperation = [{"op":"replace","path":"/description","value":"Updated description"}]; // [PatchOperation] | 
apiInstance.patchApplication(applicationKey, patchOperation, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
applicationKey String The application key
patchOperation [PatchOperation]

Return type

ApplicationRep

Authorization

ApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

patchApplicationVersion

ApplicationVersionRep patchApplicationVersion(applicationKey, versionKey, patchOperation)

Update application version

Update an application version. You can update the `supported` field. Requires a JSON patch representation of the desired changes to the application version. To learn more, read Updates.

Example

import LaunchDarklyApi from 'launchdarkly-api';
let defaultClient = LaunchDarklyApi.ApiClient.instance;
// Configure API key authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.apiKeyPrefix = 'Token';

let apiInstance = new LaunchDarklyApi.ApplicationsBetaApi();
let applicationKey = "applicationKey_example"; // String | The application key
let versionKey = "versionKey_example"; // String | The application version key
let patchOperation = [{"op":"replace","path":"/supported","value":"false"}]; // [PatchOperation] | 
apiInstance.patchApplicationVersion(applicationKey, versionKey, patchOperation, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
applicationKey String The application key
versionKey String The application version key
patchOperation [PatchOperation]

Return type

ApplicationVersionRep

Authorization

ApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json