Projects allow you to manage multiple different software projects under one LaunchDarkly account. Each project has its own unique set of environments and feature flags. To learn more, read Projects.
Using the projects API, you can list, create, and manage projects.
Return a list of projects.
By default, this returns the first 20 projects. Page through this list with the limit
parameter and by following the first
, prev
, next
, and last
links in the _links
field that returns. If those links do not appear, the pages they refer to don't exist. For example, the first
and prev
links will be missing from the response on the first page, because there is no previous page and you cannot return to the first page when you are already on the first page.
LaunchDarkly supports three fields for filters:
query
is a string that matches against the projects' names and keys. It is not case sensitive.tags
is a +
-separated list of project tags. It filters the list of projects that have all of the tags in the list.keys
is a |
separated list of project keys. It filters the list to projects that have any of the keys in the list.For example, the filter filter=query:abc,tags:tag-1+tag-2
matches projects with the string abc
in their name or key and also are tagged with tag-1
and tag-2
. The filter is not case-sensitive.
The documented values for filter
query parameters are prior to URL encoding. For example, the +
in filter=tags:tag-1+tag-2
must be encoded to %2B
.
LaunchDarkly supports two fields for sorting:
name
sorts by project name.createdOn
sorts by the creation date of the project.For example, sort=name
sorts the response by project name in ascending order.
LaunchDarkly supports one field for expanding the "List projects" response. By default, these fields are not included in the response.
To expand the response, append the expand
query parameter and add a comma-separated list with the environments
field.
Environments
includes a paginated list of the project environments.
environments
includes a paginated list of the project environments.For example, expand=environments
includes the environments
field for each project in the response.
Project collection response
Invalid request
Invalid access token
Forbidden
Rate limited
{- "_links": {
- "self": {
- "href": "/api/v2/projects",
- "type": "application/json"
}
}, - "items": [
- {
- "_links": {
- "environments": {
- "href": "/api/v2/projects/my-project/environments",
- "type": "application/json"
}, - "self": {
- "href": "/api/v2/projects/my-project",
- "type": "application/json"
}
}, - "_id": "57be1db38b75bf0772d11383",
- "key": "project-key-123abc",
- "includeInSnippetByDefault": true,
- "defaultClientSideAvailability": {
- "usingMobileKey": true,
- "usingEnvironmentId": true
}, - "name": "My Project",
- "_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"
}
}
]
}, - "tags": [
- "ops"
], - "defaultReleasePipelineKey": "string",
- "environments": {
- "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}, - "totalCount": 2,
- "items": [
- {
- "_links": {
- "self": {
- "href": "/api/v2/projects/my-project/environments/my-environment",
- "type": "application/json"
}
}, - "_id": "57be1db38b75bf0772d11384",
- "key": "environment-key-123abc",
- "name": "My Environment",
- "apiKey": "sdk-xxx",
- "mobileKey": "mob-xxx",
- "color": "F5A623",
- "defaultTtl": 5,
- "secureMode": true,
- "defaultTrackEvents": false,
- "requireComments": true,
- "confirmChanges": true,
- "tags": [
- "ops"
], - "approvalSettings": {
- "required": true,
- "bypassApprovalsForPendingChanges": false,
- "minNumApprovals": 1,
- "canReviewOwnRequest": false,
- "canApplyDeclinedChanges": true,
- "autoApplyApprovedChanges": true,
- "serviceKind": "launchdarkly",
- "serviceConfig": { },
- "requiredApprovalTags": [
- "require-approval"
], - "serviceKindConfigurationId": "1ef45a85-218f-4428-a8b2-a97e5f56c258"
}, - "resourceApprovalSettings": {
- "property1": {
- "required": null,
- "bypassApprovalsForPendingChanges": null,
- "minNumApprovals": null,
- "canReviewOwnRequest": null,
- "canApplyDeclinedChanges": null,
- "autoApplyApprovedChanges": null,
- "serviceKind": null,
- "serviceConfig": { },
- "requiredApprovalTags": [ ],
- "serviceKindConfigurationId": null
}, - "property2": {
- "required": null,
- "bypassApprovalsForPendingChanges": null,
- "minNumApprovals": null,
- "canReviewOwnRequest": null,
- "canApplyDeclinedChanges": null,
- "autoApplyApprovedChanges": null,
- "serviceKind": null,
- "serviceConfig": { },
- "requiredApprovalTags": [ ],
- "serviceKindConfigurationId": null
}
}, - "critical": true
}
]
}
}
], - "totalCount": 0
}
Create a new project with the given key and name. Project keys must be unique within an account.
Project response
Invalid request
Invalid access token
Forbidden
Status conflict
Rate limited
{- "key": "project-key-123abc",
- "name": "My Project"
}
{- "_links": {
- "environments": {
- "href": "/api/v2/projects/my-project/environments",
- "type": "application/json"
}, - "self": {
- "href": "/api/v2/projects/my-project",
- "type": "application/json"
}
}, - "_id": "57be1db38b75bf0772d11383",
- "key": "project-key-123abc",
- "includeInSnippetByDefault": true,
- "defaultClientSideAvailability": {
- "usingMobileKey": true,
- "usingEnvironmentId": true
}, - "name": "My Project",
- "_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"
}
}
]
}, - "tags": [
- "ops"
], - "defaultReleasePipelineKey": "string",
- "environments": [
- {
- "_links": {
- "self": {
- "href": "/api/v2/projects/my-project/environments/my-environment",
- "type": "application/json"
}
}, - "_id": "57be1db38b75bf0772d11384",
- "key": "environment-key-123abc",
- "name": "My Environment",
- "apiKey": "sdk-xxx",
- "mobileKey": "mob-xxx",
- "color": "F5A623",
- "defaultTtl": 5,
- "secureMode": true,
- "defaultTrackEvents": false,
- "requireComments": true,
- "confirmChanges": true,
- "tags": [
- "ops"
], - "approvalSettings": {
- "required": true,
- "bypassApprovalsForPendingChanges": false,
- "minNumApprovals": 1,
- "canReviewOwnRequest": false,
- "canApplyDeclinedChanges": true,
- "autoApplyApprovedChanges": true,
- "serviceKind": "launchdarkly",
- "serviceConfig": { },
- "requiredApprovalTags": [
- "require-approval"
], - "serviceKindConfigurationId": "1ef45a85-218f-4428-a8b2-a97e5f56c258"
}, - "resourceApprovalSettings": {
- "property1": {
- "required": true,
- "bypassApprovalsForPendingChanges": false,
- "minNumApprovals": 1,
- "canReviewOwnRequest": false,
- "canApplyDeclinedChanges": true,
- "autoApplyApprovedChanges": true,
- "serviceKind": "launchdarkly",
- "serviceConfig": { },
- "requiredApprovalTags": [
- "require-approval"
], - "serviceKindConfigurationId": "1ef45a85-218f-4428-a8b2-a97e5f56c258"
}, - "property2": {
- "required": true,
- "bypassApprovalsForPendingChanges": false,
- "minNumApprovals": 1,
- "canReviewOwnRequest": false,
- "canApplyDeclinedChanges": true,
- "autoApplyApprovedChanges": true,
- "serviceKind": "launchdarkly",
- "serviceConfig": { },
- "requiredApprovalTags": [
- "require-approval"
], - "serviceKindConfigurationId": "1ef45a85-218f-4428-a8b2-a97e5f56c258"
}
}, - "critical": true
}
]
}
Get a single project by key.
LaunchDarkly supports one field for expanding the "Get project" response. By default, these fields are not included in the response.
To expand the response, append the expand
query parameter and add a comma-separated list with any of the following fields:
environments
includes a paginated list of the project environments.For example, expand=environments
includes the environments
field for the project in the response.
Project response
Invalid request
Invalid access token
Forbidden
Invalid resource identifier
Rate limited
{- "_links": {
- "environments": {
- "href": "/api/v2/projects/my-project/environments",
- "type": "application/json"
}, - "self": {
- "href": "/api/v2/projects/my-project",
- "type": "application/json"
}
}, - "_id": "57be1db38b75bf0772d11383",
- "key": "project-key-123abc",
- "includeInSnippetByDefault": true,
- "defaultClientSideAvailability": {
- "usingMobileKey": true,
- "usingEnvironmentId": true
}, - "name": "My Project",
- "_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"
}
}
]
}, - "tags": [
- "ops"
], - "defaultReleasePipelineKey": "string",
- "environments": {
- "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}, - "totalCount": 2,
- "items": [
- {
- "_links": {
- "self": {
- "href": "/api/v2/projects/my-project/environments/my-environment",
- "type": "application/json"
}
}, - "_id": "57be1db38b75bf0772d11384",
- "key": "environment-key-123abc",
- "name": "My Environment",
- "apiKey": "sdk-xxx",
- "mobileKey": "mob-xxx",
- "color": "F5A623",
- "defaultTtl": 5,
- "secureMode": true,
- "defaultTrackEvents": false,
- "requireComments": true,
- "confirmChanges": true,
- "tags": [
- "ops"
], - "approvalSettings": {
- "required": true,
- "bypassApprovalsForPendingChanges": false,
- "minNumApprovals": 1,
- "canReviewOwnRequest": false,
- "canApplyDeclinedChanges": true,
- "autoApplyApprovedChanges": true,
- "serviceKind": "launchdarkly",
- "serviceConfig": { },
- "requiredApprovalTags": [
- "require-approval"
], - "serviceKindConfigurationId": "1ef45a85-218f-4428-a8b2-a97e5f56c258"
}, - "resourceApprovalSettings": {
- "property1": {
- "required": true,
- "bypassApprovalsForPendingChanges": false,
- "minNumApprovals": 1,
- "canReviewOwnRequest": false,
- "canApplyDeclinedChanges": true,
- "autoApplyApprovedChanges": true,
- "serviceKind": "launchdarkly",
- "serviceConfig": { },
- "requiredApprovalTags": [
- "require-approval"
], - "serviceKindConfigurationId": "1ef45a85-218f-4428-a8b2-a97e5f56c258"
}, - "property2": {
- "required": true,
- "bypassApprovalsForPendingChanges": false,
- "minNumApprovals": 1,
- "canReviewOwnRequest": false,
- "canApplyDeclinedChanges": true,
- "autoApplyApprovedChanges": true,
- "serviceKind": "launchdarkly",
- "serviceConfig": { },
- "requiredApprovalTags": [
- "require-approval"
], - "serviceKindConfigurationId": "1ef45a85-218f-4428-a8b2-a97e5f56c258"
}
}, - "critical": true
}
]
}
}
Update a project. Updating a project uses a JSON patch representation of the desired changes. To learn more, read Updates.
To add an element to the project fields that are arrays, set the path
to the name of the field and then append /<array index>
. Use /0
to add to the beginning of the array. Use /-
to add to the end of the array.
Project response
Invalid request
Invalid access token
Forbidden
Invalid resource identifier
Status conflict
Rate limited
[- {
- "op": "add",
- "path": "/tags/0",
- "value": "another-tag"
}
]
{- "_links": {
- "environments": {
- "href": "/api/v2/projects/my-project/environments",
- "type": "application/json"
}, - "self": {
- "href": "/api/v2/projects/my-project",
- "type": "application/json"
}
}, - "_id": "57be1db38b75bf0772d11383",
- "key": "project-key-123abc",
- "includeInSnippetByDefault": true,
- "defaultClientSideAvailability": {
- "usingMobileKey": true,
- "usingEnvironmentId": true
}, - "name": "My Project",
- "_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"
}
}
]
}, - "tags": [
- "ops"
], - "defaultReleasePipelineKey": "string",
- "environments": [
- {
- "_links": {
- "self": {
- "href": "/api/v2/projects/my-project/environments/my-environment",
- "type": "application/json"
}
}, - "_id": "57be1db38b75bf0772d11384",
- "key": "environment-key-123abc",
- "name": "My Environment",
- "apiKey": "sdk-xxx",
- "mobileKey": "mob-xxx",
- "color": "F5A623",
- "defaultTtl": 5,
- "secureMode": true,
- "defaultTrackEvents": false,
- "requireComments": true,
- "confirmChanges": true,
- "tags": [
- "ops"
], - "approvalSettings": {
- "required": true,
- "bypassApprovalsForPendingChanges": false,
- "minNumApprovals": 1,
- "canReviewOwnRequest": false,
- "canApplyDeclinedChanges": true,
- "autoApplyApprovedChanges": true,
- "serviceKind": "launchdarkly",
- "serviceConfig": { },
- "requiredApprovalTags": [
- "require-approval"
], - "serviceKindConfigurationId": "1ef45a85-218f-4428-a8b2-a97e5f56c258"
}, - "resourceApprovalSettings": {
- "property1": {
- "required": true,
- "bypassApprovalsForPendingChanges": false,
- "minNumApprovals": 1,
- "canReviewOwnRequest": false,
- "canApplyDeclinedChanges": true,
- "autoApplyApprovedChanges": true,
- "serviceKind": "launchdarkly",
- "serviceConfig": { },
- "requiredApprovalTags": [
- "require-approval"
], - "serviceKindConfigurationId": "1ef45a85-218f-4428-a8b2-a97e5f56c258"
}, - "property2": {
- "required": true,
- "bypassApprovalsForPendingChanges": false,
- "minNumApprovals": 1,
- "canReviewOwnRequest": false,
- "canApplyDeclinedChanges": true,
- "autoApplyApprovedChanges": true,
- "serviceKind": "launchdarkly",
- "serviceConfig": { },
- "requiredApprovalTags": [
- "require-approval"
], - "serviceKindConfigurationId": "1ef45a85-218f-4428-a8b2-a97e5f56c258"
}
}, - "critical": true
}
]
}
Delete a project by key. Use this endpoint with caution. Deleting a project will delete all associated environments and feature flags. You cannot delete the last project in an account.
Action succeeded
Invalid request
Invalid access token
Forbidden
Invalid resource identifier
Rate limited
{- "code": "invalid_request",
- "message": "Invalid request body"
}
Get the flag defaults for a specific project.
Flag defaults response
Invalid access token
Forbidden
Invalid resource identifier
{- "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}, - "key": "string",
- "tags": [
- "tag-1",
- "tag-2"
], - "temporary": true,
- "defaultClientSideAvailability": {
- "usingMobileKey": true,
- "usingEnvironmentId": true
}, - "booleanDefaults": {
- "trueDisplayName": "True",
- "falseDisplayName": "False",
- "trueDescription": "serve true",
- "falseDescription": "serve false",
- "onVariation": 0,
- "offVariation": 1
}
}
Update a flag default. Updating a flag default uses a JSON patch or JSON merge patch representation of the desired changes. To learn more, read Updates.
Flag default response
Invalid request
Invalid access token
Forbidden
Invalid resource identifier
Status conflict
Rate limited
[- {
- "op": "replace",
- "path": "/exampleField",
- "value": "new example value"
}
]
{- "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}, - "tags": [
- "tag-1",
- "tag-2"
], - "temporary": true,
- "booleanDefaults": {
- "trueDisplayName": "True",
- "falseDisplayName": "False",
- "trueDescription": "serve true",
- "falseDescription": "serve false",
- "onVariation": 0,
- "offVariation": 1
}, - "defaultClientSideAvailability": {
- "usingMobileKey": true,
- "usingEnvironmentId": true
}
}
Create or update flag defaults for a project.
Flag default response
Invalid request
Invalid access token
Forbidden
Invalid resource identifier
Status conflict
Rate limited
{- "tags": [
- "tag-1",
- "tag-2"
], - "temporary": true,
- "booleanDefaults": {
- "trueDisplayName": "True",
- "falseDisplayName": "False",
- "trueDescription": "serve true",
- "falseDescription": "serve false",
- "onVariation": 0,
- "offVariation": 1
}, - "defaultClientSideAvailability": {
- "usingMobileKey": true,
- "usingEnvironmentId": true
}
}
{- "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}, - "tags": [
- "tag-1",
- "tag-2"
], - "temporary": true,
- "booleanDefaults": {
- "trueDisplayName": "True",
- "falseDisplayName": "False",
- "trueDescription": "serve true",
- "falseDescription": "serve false",
- "onVariation": 0,
- "offVariation": 1
}, - "defaultClientSideAvailability": {
- "usingMobileKey": true,
- "usingEnvironmentId": true
}
}