This feature is in beta
To use this feature, pass in a header including the
LD-API-Version
key with value set tobeta
. 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.
The filter
parameter supports the following operators: equals
, notEquals
, anyOf
, startsWith
.
You can also combine filters in the following ways:
,
) as an AND operator|
) as an OR operator()
) to group filtersYou 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
.
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 a list of applications.
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 applicationFor example, use ?expand=flags
to include the flags
field in the response. By default, this field is not included in the response.
filter | string <string> Accepts filter by |
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 |
sort | string <string> Accepts sorting order and fields. Fields can be comma separated. Possible fields are |
expand | string <string> A comma-separated list of properties that can reveal additional information in the response. Options: |
Applications response
Invalid request
Invalid access token
Forbidden
Invalid resource identifier
Rate limited
{- "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}, - "items": [
- {
- "flags": {
- "items": [
- {
- "name": "Example flag",
- "key": "flag-key-123abc",
- "_links": {
- "property1": {
- "href": null,
- "type": null
}, - "property2": {
- "href": null,
- "type": null
}
}, - "_site": {
- "href": "string",
- "type": "string"
}
}
], - "totalCount": 1,
- "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}
}, - "_access": {
- "denied": [
- {
- "action": "string",
- "reason": {
- "resources": [
- "proj/*:env/*;qa_*:/flag/*"
], - "notResources": [
- null
], - "actions": [
- "*"
], - "notActions": [
- null
], - "effect": "allow",
- "role_name": "string"
}
}
], - "allowed": [
- {
- "action": "string",
- "reason": {
- "resources": [
- "proj/*:env/*;qa_*:/flag/*"
], - "notResources": [
- null
], - "actions": [
- "*"
], - "notActions": [
- null
], - "effect": "allow",
- "role_name": "string"
}
}
]
}, - "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}, - "_version": 0,
- "autoAdded": true,
- "creationDate": 0,
- "description": "The LaunchDarkly Cafe app",
- "key": "com.launchdarkly.cafe",
- "kind": "mobile",
- "_maintainer": {
- "member": {
- "_links": {
- "self": {
- "href": "/api/v2/members/569f183514f4432160000007",
- "type": "application/json"
}
}, - "_id": "569f183514f4432160000007",
- "firstName": "Ariel",
- "lastName": "Flores",
- "role": "admin",
- "email": "ariel@acme.com"
}, - "team": {
- "customRoleKeys": [
- "access-to-test-projects"
], - "key": "team-key-123abc",
- "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}, - "name": "QA Team"
}
}, - "name": "LaunchDarklyCafe"
}
], - "totalCount": 1
}
Retrieve an application by the application key.
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 applicationFor example, use ?expand=flags
to include the flags
field in the response. By default, this field is not included in the response.
Application response
Invalid request
Invalid access token
Forbidden
Invalid resource identifier
Rate limited
{- "flags": {
- "items": [
- {
- "name": "Example flag",
- "key": "flag-key-123abc",
- "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}, - "_site": {
- "href": "string",
- "type": "string"
}
}
], - "totalCount": 1,
- "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}
}, - "_access": {
- "denied": [
- {
- "action": "string",
- "reason": {
- "resources": [
- "proj/*:env/*;qa_*:/flag/*"
], - "notResources": [
- "string"
], - "actions": [
- "*"
], - "notActions": [
- "string"
], - "effect": "allow",
- "role_name": "string"
}
}
], - "allowed": [
- {
- "action": "string",
- "reason": {
- "resources": [
- "proj/*:env/*;qa_*:/flag/*"
], - "notResources": [
- "string"
], - "actions": [
- "*"
], - "notActions": [
- "string"
], - "effect": "allow",
- "role_name": "string"
}
}
]
}, - "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}, - "_version": 0,
- "autoAdded": true,
- "creationDate": 0,
- "description": "The LaunchDarkly Cafe app",
- "key": "com.launchdarkly.cafe",
- "kind": "mobile",
- "_maintainer": {
- "member": {
- "_links": {
- "self": {
- "href": "/api/v2/members/569f183514f4432160000007",
- "type": "application/json"
}
}, - "_id": "569f183514f4432160000007",
- "firstName": "Ariel",
- "lastName": "Flores",
- "role": "admin",
- "email": "ariel@acme.com"
}, - "team": {
- "customRoleKeys": [
- "access-to-test-projects"
], - "key": "team-key-123abc",
- "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}, - "name": "QA Team"
}
}, - "name": "LaunchDarklyCafe"
}
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.
Application response
Invalid request
Invalid access token
Forbidden
Invalid resource identifier
Rate limited
[- {
- "op": "replace",
- "path": "/description",
- "value": "Updated description"
}
]
{- "flags": {
- "items": [
- {
- "name": "Example flag",
- "key": "flag-key-123abc",
- "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}, - "_site": {
- "href": "string",
- "type": "string"
}
}
], - "totalCount": 1,
- "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}
}, - "_access": {
- "denied": [
- {
- "action": "string",
- "reason": {
- "resources": [
- "proj/*:env/*;qa_*:/flag/*"
], - "notResources": [
- "string"
], - "actions": [
- "*"
], - "notActions": [
- "string"
], - "effect": "allow",
- "role_name": "string"
}
}
], - "allowed": [
- {
- "action": "string",
- "reason": {
- "resources": [
- "proj/*:env/*;qa_*:/flag/*"
], - "notResources": [
- "string"
], - "actions": [
- "*"
], - "notActions": [
- "string"
], - "effect": "allow",
- "role_name": "string"
}
}
]
}, - "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}, - "_version": 0,
- "autoAdded": true,
- "creationDate": 0,
- "description": "The LaunchDarkly Cafe app",
- "key": "com.launchdarkly.cafe",
- "kind": "mobile",
- "_maintainer": {
- "member": {
- "_links": {
- "self": {
- "href": "/api/v2/members/569f183514f4432160000007",
- "type": "application/json"
}
}, - "_id": "569f183514f4432160000007",
- "firstName": "Ariel",
- "lastName": "Flores",
- "role": "admin",
- "email": "ariel@acme.com"
}, - "team": {
- "customRoleKeys": [
- "access-to-test-projects"
], - "key": "team-key-123abc",
- "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}, - "name": "QA Team"
}
}, - "name": "LaunchDarklyCafe"
}
Delete an application.
Action succeeded
Invalid access token
Forbidden
Invalid resource identifier
Rate limited
{- "code": "unauthorized",
- "message": "Invalid access token"
}
Get a list of versions for a specific application in an account.
filter | string <string> Accepts filter by |
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 |
sort | string <string> Accepts sorting order and fields. Fields can be comma separated. Possible fields are |
Application versions response
Invalid request
Invalid access token
Forbidden
Invalid resource identifier
Rate limited
{- "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}, - "items": [
- {
- "_access": {
- "denied": [
- {
- "action": "string",
- "reason": {
- "resources": [
- "proj/*:env/*;qa_*:/flag/*"
], - "notResources": [
- null
], - "actions": [
- "*"
], - "notActions": [
- null
], - "effect": "allow",
- "role_name": "string"
}
}
], - "allowed": [
- {
- "action": "string",
- "reason": {
- "resources": [
- "proj/*:env/*;qa_*:/flag/*"
], - "notResources": [
- null
], - "actions": [
- "*"
], - "notActions": [
- null
], - "effect": "allow",
- "role_name": "string"
}
}
]
}, - "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}, - "_version": 0,
- "autoAdded": true,
- "creationDate": 0,
- "key": "2",
- "name": "01.02.03",
- "supported": true
}
], - "totalCount": 1
}
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.
Application version response
Invalid request
Invalid access token
Forbidden
Invalid resource identifier
Rate limited
[- {
- "op": "replace",
- "path": "/supported",
- "value": "false"
}
]
{- "_access": {
- "denied": [
- {
- "action": "string",
- "reason": {
- "resources": [
- "proj/*:env/*;qa_*:/flag/*"
], - "notResources": [
- "string"
], - "actions": [
- "*"
], - "notActions": [
- "string"
], - "effect": "allow",
- "role_name": "string"
}
}
], - "allowed": [
- {
- "action": "string",
- "reason": {
- "resources": [
- "proj/*:env/*;qa_*:/flag/*"
], - "notResources": [
- "string"
], - "actions": [
- "*"
], - "notActions": [
- "string"
], - "effect": "allow",
- "role_name": "string"
}
}
]
}, - "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}, - "_version": 0,
- "autoAdded": true,
- "creationDate": 0,
- "key": "2",
- "name": "01.02.03",
- "supported": true
}
Delete an application version.
Action succeeded
Invalid access token
Forbidden
Invalid resource identifier
Rate limited
{- "code": "unauthorized",
- "message": "Invalid access token"
}