Custom roles
Get custom role
Get a single custom role by key or ID
Authorization
ApiKey read, writeAuthorization<token>
In: header
Scope: read, write
Path Parameters
customRoleKey*string
The custom role key or ID
Format
stringResponse Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v2/roles/string"{ "_id": "1234a56b7c89d012345e678f", "_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" } } ] }, "description": "This custom role is just an example", "key": "example-custom-role", "name": "Example custom role", "policy": [ { "resources": [ "proj/*:env/*;qa_*:/flag/*" ], "notResources": [ "string" ], "actions": [ "*" ], "notActions": [ "string" ], "effect": "allow" } ], "basePermissions": "reader", "resourceCategory": "string", "assignedTo": { "membersCount": 0, "teamsCount": 0 }, "_presetBundleVersion": 0, "_presetStatements": [ { "resources": [ "proj/*:env/*;qa_*:/flag/*" ], "notResources": [ "string" ], "actions": [ "*" ], "notActions": [ "string" ], "effect": "allow" } ]}Create custom role POST
Create a new custom role
Update custom role PATCH
Update a single custom role. Updating a custom role uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) or [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) representation of the desired changes. To learn more, read [Updates](https://launchdarkly.com/docs/api#updates).<br/><br/>To add an element to the `policy` array, set the `path` to `/policy` and then append `/<array index>`. Use `/0` to add to the beginning of the array. Use `/-` to add to the end of the array.