Applications (beta)

This feature is in beta

To use this feature, pass in a header including the LD-API-Version key with value set to beta. Use this header with each call. To learn more, read Beta resources.

Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.

The applications API lets you create, update, delete, and search for applications and application versions.

Each application includes information about the app you're creating, and a set of versions of the app that you've released. You can use applications to target particular application versions in your feature flags more easily, and to handle unsupported application versions more gracefully.

In addition to creating applications through the applications API, you can also create applications in the LaunchDarkly user interface. To learn more, read Applications and application versions. LaunchDarkly also creates applications and application versions automatically when a LaunchDarkly SDK evaluates a feature flag for a context that includes application information. To learn more, read Automatic environment attributes.

You can use an application in any project in your LaunchDarkly account.

Filtering applications and application versions

The filter parameter supports the following operators: equals, notEquals, anyOf, startsWith.

You can also combine filters in the following ways:

  • Use a comma (,) as an AND operator
  • Use a vertical bar (|) as an OR operator
  • Use parentheses (()) to group filters

Supported fields and operators

You can only filter certain fields in applications when using the filter parameter. Additionally, you can only filter some fields with certain operators.

When you search for applications, the filter parameter supports the following fields and operators:

Field
Description Supported operators
key The application or application version key, a unique identifier equals, notEquals, anyOf
name The application name or application version name equals, notEquals, anyOf, startsWith
autoAdded Whether the application or application version was automatically created because it was included in a context when a LaunchDarkly SDK evaluated a feature flag, or was created through the LaunchDarkly UI or REST API equals, notEquals
kind The application kind, one of mobile, server, browser. Only available for Get applications. equals, notEquals, anyOf
supported Whether a mobile application version is supported or unsupported. Only available for Get application versions by application key. equals, notEquals

For example, the filter ?filter=kind anyOf ["mobile", "server"] matches applications whose kind is either mobile or server. The filter is not case-sensitive.

The documented values for filter query parameters are prior to URL encoding. For example, the [ in ?filter=kind anyOf ["mobile", "server"] must be encoded to %5B.

Sorting applications and application versions

LaunchDarkly supports the following fields for sorting:

  • name sorts by application name.
  • creationDate sorts by the creation date of the application.

By default, the sort is in ascending order. Use - to sort in descending order. For example, ?sort=name sorts the response by application name in ascending order, and ?sort=-name sorts in descending order.

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.

Request
query Parameters
filter
string <string>

Accepts filter by key, name, kind, and autoAdded. To learn more about the filter syntax, read Filtering applications and application versions.

limit
integer <int64>

The number of applications to return. Defaults to 10.

offset
integer <int64>

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
string <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
string <string>

A comma-separated list of properties that can reveal additional information in the response. Options: flags.

Responses
200

Applications response

400

Invalid request

401

Invalid access token

403

Forbidden

404

Invalid resource identifier

429

Rate limited

get/api/v2/applications
Request samples
Response samples
application/json
{
  • "_links": {
    },
  • "items": [
    ],
  • "totalCount": 1
}

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.

Request
path Parameters
applicationKey
required
string <string>

The application key

query Parameters
expand
string <string>

A comma-separated list of properties that can reveal additional information in the response. Options: flags.

Responses
200

Application response

400

Invalid request

401

Invalid access token

403

Forbidden

404

Invalid resource identifier

429

Rate limited

get/api/v2/applications/{applicationKey}
Request samples
Response samples
application/json
{
  • "flags": {
    },
  • "_access": {
    },
  • "_links": {
    },
  • "_version": 0,
  • "autoAdded": true,
  • "creationDate": 0,
  • "description": "The LaunchDarkly Cafe app",
  • "key": "com.launchdarkly.cafe",
  • "kind": "mobile",
  • "_maintainer": {
    },
  • "name": "LaunchDarklyCafe"
}

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.

Request
path Parameters
applicationKey
required
string <string>

The application key

Request Body schema: application/json
required
Array
op
required
string

The type of operation to perform

path
required
string

A JSON Pointer string specifying the part of the document to operate on

value
any

A JSON value used in "add", "replace", and "test" operations

Responses
200

Application response

400

Invalid request

401

Invalid access token

403

Forbidden

404

Invalid resource identifier

429

Rate limited

patch/api/v2/applications/{applicationKey}
Request samples
application/json
[
  • {
    }
]
Response samples
application/json
{
  • "flags": {
    },
  • "_access": {
    },
  • "_links": {
    },
  • "_version": 0,
  • "autoAdded": true,
  • "creationDate": 0,
  • "description": "The LaunchDarkly Cafe app",
  • "key": "com.launchdarkly.cafe",
  • "kind": "mobile",
  • "_maintainer": {
    },
  • "name": "LaunchDarklyCafe"
}

Delete application

Delete an application.

Request
path Parameters
applicationKey
required
string <string>

The application key

Responses
204

Action succeeded

401

Invalid access token

403

Forbidden

404

Invalid resource identifier

429

Rate limited

delete/api/v2/applications/{applicationKey}
Request samples
Response samples
application/json
{
  • "code": "unauthorized",
  • "message": "Invalid access token"
}

Get application versions by application key

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

Request
path Parameters
applicationKey
required
string <string>

The application key

query Parameters
filter
string <string>

Accepts filter by key, name, supported, and autoAdded. To learn more about the filter syntax, read Filtering applications and application versions.

limit
integer <int64>

The number of versions to return. Defaults to 50.

offset
integer <int64>

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
string <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.

Responses
200

Application versions response

400

Invalid request

401

Invalid access token

403

Forbidden

404

Invalid resource identifier

429

Rate limited

get/api/v2/applications/{applicationKey}/versions
Request samples
Response samples
application/json
{
  • "_links": {
    },
  • "items": [
    ],
  • "totalCount": 1
}

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.

Request
path Parameters
applicationKey
required
string <string>

The application key

versionKey
required
string <string>

The application version key

Request Body schema: application/json
required
Array
op
required
string

The type of operation to perform

path
required
string

A JSON Pointer string specifying the part of the document to operate on

value
any

A JSON value used in "add", "replace", and "test" operations

Responses
200

Application version response

400

Invalid request

401

Invalid access token

403

Forbidden

404

Invalid resource identifier

429

Rate limited

patch/api/v2/applications/{applicationKey}/versions/{versionKey}
Request samples
application/json
[
  • {
    }
]
Response samples
application/json
{
  • "_access": {
    },
  • "_links": {
    },
  • "_version": 0,
  • "autoAdded": true,
  • "creationDate": 0,
  • "key": "2",
  • "name": "01.02.03",
  • "supported": true
}

Delete application version

Delete an application version.

Request
path Parameters
applicationKey
required
string <string>

The application key

versionKey
required
string <string>

The application version key

Responses
204

Action succeeded

401

Invalid access token

403

Forbidden

404

Invalid resource identifier

429

Rate limited

delete/api/v2/applications/{applicationKey}/versions/{versionKey}
Request samples
Response samples
application/json
{
  • "code": "unauthorized",
  • "message": "Invalid access token"
}