List the account's roles
/v1/rolesReturns the account's roles. Every account starts with two: Everyone
(roleId 1), which every user is in and which cannot be deleted, and
Account administrators (2). The roles the account made follow them.
sort is not the same as in results queries: write displayName:desc, not
displayName:d. Anything after the colon other than desc sorts ascending.
curl "https://api.eu.silktide.com/v1/roles" \
-H "Authorization: silktide token=$SILKTIDE_API_KEY"{
"roles": [
{
"roleId": 1,
"displayName": "Everyone",
"icon": "fas fa-globe",
"colorScheme": "sky",
"description": "All users in this Account.",
"created": 1790216526
},
{
"roleId": 2,
"displayName": "Account administrators",
"icon": "fas fa-crown",
"colorScheme": "amber",
"description": "People with total control of this account",
"created": 1790216526
},
{
"roleId": 3,
"displayName": "Web editors",
"icon": "fas fa-pen",
"colorScheme": "violet",
"description": "Fix issues on the public websites",
"created": 1791431526
}
]
}Request
Query parameters
searchstringOnly roles whose name or description contains this text, ignoring case.
sortstringA field to sort by, such as
displayName, then:descfor descending:displayName:desc. Left out, oldest first.limitintegerat least 1At most this many roles.
perPageintegerat least 1Return a page of this many roles. Left out, every role.
pageintegerat least 1With
perPage, the page to return, from1. Defaults to1.
Response
200JSON.
roleslist of objectsrequiredThe roles. Never empty: every account has Everyone.
Show 6 fieldsHide fields
roleIdintegerrequiredat least 1The role's id. Its assignee id is
g:and this, such asg:2.displayNamestringrequiredThe role's name.
iconstringrequiredA Font Awesome icon class, such as
fas fa-globe. Empty when it has none.colorSchemestringrequiredThe color Silktide shows the role in. Empty when it has none.
One of
skyemeraldamberroseorangevioletindigocyanfuchsiaslatedescriptionstringrequiredWhat the role is for. Can be empty.
createdintegerrequiredWhen the role was created.
Errors
| Status | Type | When |
|---|---|---|
| 401 | NotLoggedIn | No API key was sent, or it is not a key for this region.(any operation) |
| 429 | TooManyRequests | Too many requests to this path in five seconds. Retry after the number of seconds in the Retry-After header, which properties.retryAfter repeats.(any operation) |
| 503 | - | Silktide is busy. Retry after the number of seconds in the Retry-After header.(any operation) |
Every error has the same body. See Errors.
Access
- Permission
- Any user of the account
- Plan feature
- None
- Edition
- Silktide 4 and Silktide 5
- Cost
- Free
- Available since
- v1.0.0
Try it
Sends a real request to your account from this browser. Your key stays in this tab and goes only to the Silktide API.