For the complete documentation index, see llms.txt. For the full documentation snapshot, see llms-full.txt.
Perform a partial update to a team. Updating a team uses the semantic patch format.
To make a semantic patch request, you must append domain-model=launchdarkly.semanticpatch to your Content-Type header. To learn more, read Updates using semantic patch.
Semantic patch requests support the following kind instructions for updating teams. Several of the instructions require one or more member IDs as parameters. The member ID is returned as part of the List account members response. It is the _id field of each element in the items array.
Adds custom roles to the team. Team members will have these custom roles granted to them.
values: List of custom role keys.Here’s an example:
{
"instructions": [{
"kind": "addCustomRoles",
"values": [ "example-custom-role" ]
}]
}
Adds members to the team.
values: List of member IDs to add.Here’s an example:
{
"instructions": [{
"kind": "addMembers",
"values": [ "1234a56b7c89d012345e678f", "507f1f77bcf86cd799439011" ]
}]
}
Adds permission grants to members for the team. For example, a permission grant could allow a member to act as a team maintainer. A permission grant may have either an actionSet or a list of actions but not both at the same time. The members do not have to be team members to have a permission grant for the team.
actionSet: Name of the action set.actions: List of actions.memberIDs: List of member IDs.Here’s an example:
{
"instructions": [{
"kind": "addPermissionGrants",
"actions": [ "updateTeamName", "updateTeamDescription" ],
"memberIDs": [ "1234a56b7c89d012345e678f", "507f1f77bcf86cd799439011" ]
}]
}
Adds a role attribute to a team. Team members will have these role attribute values scoped for all custom roles granted to them.
key: The role attribute key to add.values: List of role attribute values for that key.Here’s an example:
{
"instructions": [
{
"kind": "addRoleAttribute",
"key": "testAttribute",
"values": ["someNewValue", "someOtherNewValue"]
}
]
}
Removes custom roles from the team. The app will no longer grant these custom roles to the team members.
values: List of custom role keys.Here’s an example:
{
"instructions": [{
"kind": "removeCustomRoles",
"values": [ "example-custom-role" ]
}]
}
Removes members from the team.
values: List of member IDs to remove.Here’s an example:
{
"instructions": [{
"kind": "removeMembers",
"values": [ "1234a56b7c89d012345e678f", "507f1f77bcf86cd799439011" ]
}]
}
Removes permission grants from members for the team. A permission grant may have either an actionSet or a list of actions but not both at the same time. The actionSet and actions must match an existing permission grant.
actionSet: Name of the action set.actions: List of actions.memberIDs: List of member IDs.Here’s an example:
{
"instructions": [{
"kind": "removePermissionGrants",
"actions": [ "updateTeamName", "updateTeamDescription" ],
"memberIDs": [ "1234a56b7c89d012345e678f", "507f1f77bcf86cd799439011" ]
}]
}
Removes a role attribute from the team.
key: The role attribute key to remove.Here’s an example:
{
"instructions": [
{
"kind": "removeRoleAttribute",
"key": "testAttribute"
}
]
}
Replaces the existing members of the team with the new members.
values: List of member IDs of the new members.Here’s an example:
{
"instructions": [{
"kind": "replaceMembers",
"values": [ "1234a56b7c89d012345e678f", "507f1f77bcf86cd799439011" ]
}]
}
Replaces the existing role attributes for the team with new role attributes.
value: A map of role attribute keys to lists of role attribute valuesHere’s an example:
{
"instructions": [{
"kind": "replaceRoleAttributes",
"value": {
"testAttribute": [ "someNewValue", "someOtherNewValue" ],
"projectRoleAttribute": [ "project1", "project2"]
}
}]
}
Updates the description of the team.
value: The new description.Here’s an example:
{
"instructions": [{
"kind": "updateDescription",
"value": "Updated team description"
}]
}
Updates the name of the team.
value: The new name.Here’s an example:
{
"instructions": [{
"kind": "updateName",
"value": "Updated team name"
}]
}
Updates a role attribute on the team. Any existing values for the given key will be replaced with the new values. Team members will have these role attribute values scoped for all custom roles granted to them.
key: The role attribute key to update.values: List of role attribute values for that key.Here’s an example:
{
"instructions": [
{
"kind": "updateRoleAttribute",
"key": "testAttribute",
"values": ["someNewValue", "someOtherNewValue"]
}
]
}
LaunchDarkly supports four fields for expanding the “Update team” 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:
members includes the total count of members that belong to the team.roles includes a paginated list of the custom roles that you have assigned to the team.projects includes a paginated list of the projects that the team has any write access to.maintainers includes a paginated list of the maintainers that you have assigned to the team.For example, expand=members,roles includes the members and roles fields in the response.
curl --request PATCH \
--url https://app.launchdarkly.com/api/v2/teams/{teamKey} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"comment": "Optional comment about the update",
"instructions": [
{
"kind": "updateDescription",
"value": "New description for the team"
}
]
}
'{
"description": "Description for this team.",
"key": "team-key-123abc",
"name": "Example team",
"_access": {
"denied": [
{
"action": "<string>",
"reason": {
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"notResources": [
"<string>"
],
"actions": [
"*"
],
"notActions": [
"<string>"
],
"role_name": "<string>"
}
}
],
"allowed": [
{
"action": "<string>",
"reason": {
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"notResources": [
"<string>"
],
"actions": [
"*"
],
"notActions": [
"<string>"
],
"role_name": "<string>"
}
}
]
},
"_creationDate": "1648671956143",
"_links": {
"parent": {
"href": "/api/v2/teams",
"type": "application/json"
},
"roles": {
"href": "/api/v2/teams/example-team/roles",
"type": "application/json"
},
"self": {
"href": "/api/v2/teams/example-team",
"type": "application/json"
}
},
"_lastModified": "1648672446072",
"_version": 3,
"_idpSynced": true,
"roleAttributes": "{\"developerProjectKey\": [\"default\"]}",
"roles": {
"totalCount": 1,
"items": [
{
"key": "role-key-123abc",
"name": "Example role",
"projects": {
"totalCount": 1,
"items": [
{
"_links": {
"environments": {
"href": "/api/v2/projects/example-project/environments",
"type": "application/json"
},
"self": {
"href": "/api/v2/projects/example-project",
"type": "application/json"
}
},
"key": "project-key-123abc",
"name": "Example project"
}
]
},
"appliedOn": "1648672018410"
}
],
"_links": {
"self": {
"href": "/api/v2/teams/example-team/roles?limit=25",
"type": "application/json"
}
}
},
"members": {
"totalCount": 15
},
"projects": {
"totalCount": 1,
"items": [
{
"_links": {
"environments": {
"href": "/api/v2/projects/example-project/environments",
"type": "application/json"
},
"self": {
"href": "/api/v2/projects/example-project",
"type": "application/json"
}
},
"key": "project-key-123abc",
"name": "Example project"
}
]
},
"maintainers": {
"totalCount": 1,
"items": [
{
"_id": "569f183514f4432160000007",
"_links": {
"self": {
"href": "/api/v2/members/569f183514f4432160000007",
"type": "application/json"
}
},
"email": "ariel@acme.com",
"firstName": "Ariel",
"lastName": "Flores",
"role": "reader"
}
],
"_links": {
"self": {
"href": "/api/v2/teams/example-team/maintainers?limit=20",
"type": "application/json"
}
}
}
}Documentation Index
Fetch the complete documentation index at: https://launchdarkly-preview.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
The team key
A comma-separated list of properties that can reveal additional information in the response. Supported fields are explained above.
The instructions to perform when updating. This should be an array with objects that look like {"kind": "update_action"}. Some instructions also require additional parameters as part of this object.
Show child attributes
"[ { \"kind\": \"updateDescription\", \"value\": \"New description for the team\" } ]"
Optional comment describing the update
"Optional comment about the update"
Teams response
A description of the team
"Description for this team."
The team key
"team-key-123abc"
A human-friendly name for the team
"Example team"
Details on the allowed and denied actions for this team
Show child attributes
Timestamp of when the team was created
"1648671956143"
The location and content type of related resources
Show child attributes
{
"parent": {
"href": "/api/v2/teams",
"type": "application/json"
},
"roles": {
"href": "/api/v2/teams/example-team/roles",
"type": "application/json"
},
"self": {
"href": "/api/v2/teams/example-team",
"type": "application/json"
}
}Timestamp of when the team was most recently updated
"1648672446072"
The team version
3
Whether the team has been synced with an external identity provider (IdP). Team sync is available to customers on an Enterprise plan.
true
A map of role attributes for the team
Show child attributes
"{\"developerProjectKey\": [\"default\"]}"
Paginated list of the custom roles assigned to this team. Only included if specified in the expand query parameter.
Show child attributes
Details on the total count of members that belong to the team. Only included if specified in the expand query parameter.
Show child attributes
Paginated list of the projects that the team has any write access to. Only included if specified in the expand query parameter.
Show child attributes
Paginated list of the maintainers assigned to this team. Only included if specified in the expand query parameter.
Show child attributes
curl --request PATCH \
--url https://app.launchdarkly.com/api/v2/teams/{teamKey} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"comment": "Optional comment about the update",
"instructions": [
{
"kind": "updateDescription",
"value": "New description for the team"
}
]
}
'{
"description": "Description for this team.",
"key": "team-key-123abc",
"name": "Example team",
"_access": {
"denied": [
{
"action": "<string>",
"reason": {
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"notResources": [
"<string>"
],
"actions": [
"*"
],
"notActions": [
"<string>"
],
"role_name": "<string>"
}
}
],
"allowed": [
{
"action": "<string>",
"reason": {
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"notResources": [
"<string>"
],
"actions": [
"*"
],
"notActions": [
"<string>"
],
"role_name": "<string>"
}
}
]
},
"_creationDate": "1648671956143",
"_links": {
"parent": {
"href": "/api/v2/teams",
"type": "application/json"
},
"roles": {
"href": "/api/v2/teams/example-team/roles",
"type": "application/json"
},
"self": {
"href": "/api/v2/teams/example-team",
"type": "application/json"
}
},
"_lastModified": "1648672446072",
"_version": 3,
"_idpSynced": true,
"roleAttributes": "{\"developerProjectKey\": [\"default\"]}",
"roles": {
"totalCount": 1,
"items": [
{
"key": "role-key-123abc",
"name": "Example role",
"projects": {
"totalCount": 1,
"items": [
{
"_links": {
"environments": {
"href": "/api/v2/projects/example-project/environments",
"type": "application/json"
},
"self": {
"href": "/api/v2/projects/example-project",
"type": "application/json"
}
},
"key": "project-key-123abc",
"name": "Example project"
}
]
},
"appliedOn": "1648672018410"
}
],
"_links": {
"self": {
"href": "/api/v2/teams/example-team/roles?limit=25",
"type": "application/json"
}
}
},
"members": {
"totalCount": 15
},
"projects": {
"totalCount": 1,
"items": [
{
"_links": {
"environments": {
"href": "/api/v2/projects/example-project/environments",
"type": "application/json"
},
"self": {
"href": "/api/v2/projects/example-project",
"type": "application/json"
}
},
"key": "project-key-123abc",
"name": "Example project"
}
]
},
"maintainers": {
"totalCount": 1,
"items": [
{
"_id": "569f183514f4432160000007",
"_links": {
"self": {
"href": "/api/v2/members/569f183514f4432160000007",
"type": "application/json"
}
},
"email": "ariel@acme.com",
"firstName": "Ariel",
"lastName": "Flores",
"role": "reader"
}
],
"_links": {
"self": {
"href": "/api/v2/teams/example-team/maintainers?limit=20",
"type": "application/json"
}
}
}
}