Projects

Create project

POST
/api/v2/projects

Create a new project with the given key and name. Project keys must be unique within an account.

Authorization

ApiKey read, write
Authorization<token>

In: header

Scope: read, write

Request Body

application/json

name*string

A human-friendly name for the project.

key*string

A unique key used to reference the project in your code.

includeInSnippetByDefault?boolean

Whether or not flags created in this project are made available to the client-side JavaScript SDK by default.

defaultClientSideAvailability?

Controls which client-side SDKs can use new flags by default.

tags?array<string>

Tags for the project

environments?array<>

Creates the provided environments for this project. If omitted default environments will be created instead.

namingConvention?

The flag key convention for this project. Omit this field if you don't want to enforce any conventions for flag keys.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v2/projects" \  -H "Content-Type: application/json" \  -d '{    "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,      "_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"            }          }        ]      },      "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    }  ]}

List projects GET

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. ### Filtering projects 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`. ### Sorting projects 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. ### Expanding the projects response 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. For example, `expand=environments` includes the `environments` field for each project in the response.

Get project GET

Get a single project by key. ### Expanding the project response 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.