Custom roles
List custom roles
Get a complete list of custom roles. This includes project and organization roles that you create, or that are provided as presets by LaunchDarkly. It does not include base roles.
Authorization
ApiKey read, writeAuthorization<token>
In: header
Scope: read, write
Query Parameters
limit?integer
The maximum number of custom roles to return. Defaults to 20.
Format
int64offset?integer
Where to start in the list. Defaults to 0. 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 limit.
Format
int64Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v2/roles"{ "_links": { "property1": { "href": "string", "type": "string" }, "property2": { "href": "string", "type": "string" } }, "items": [ { "_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" } ] } ], "totalCount": 0}