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.
get/api/v2/roles
Query parameters
limitinteger
The maximum number of custom roles to return. Defaults to 20.
The maximum number of custom roles to return. Defaults to 20.
offsetinteger
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.
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.
Response
Custom roles collection response
Example response
{
"items": [
{
"_id": "1234a56b7c89d012345e678f",
"_access": {
"denied": [
{
"reason": {
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
],
"effect": "allow"
}
}
],
"allowed": [
{
"reason": {
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
],
"effect": "allow"
}
}
]
},
"description": "This custom role is just an example",
"key": "example-custom-role",
"name": "Example custom role",
"policy": [
{
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
],
"effect": "allow"
}
],
"_presetStatements": [
{
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
],
"effect": "allow"
}
]
}
]
}