Skip to content
Menu
SilktideDevelopers

List the account's roles

GET/v1/roles
View as Markdown

Returns 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.

Request
curl "https://api.eu.silktide.com/v1/roles" \
  -H "Authorization: silktide token=$SILKTIDE_API_KEY"
Response: The built-in roles and one of the account's own
{
  "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

  • searchstring

    Only roles whose name or description contains this text, ignoring case.

  • sortstring

    A field to sort by, such as displayName, then :desc for descending: displayName:desc. Left out, oldest first.

  • limitintegerat least 1

    At most this many roles.

  • perPageintegerat least 1

    Return a page of this many roles. Left out, every role.

  • pageintegerat least 1

    With perPage, the page to return, from 1. Defaults to 1.

Response

200JSON.

  • roleslist of objectsrequired

    The roles. Never empty: every account has Everyone.

    Show 6 fields
    • roleIdintegerrequiredat least 1

      The role's id. Its assignee id is g: and this, such as g:2.

    • displayNamestringrequired

      The role's name.

    • iconstringrequired

      A Font Awesome icon class, such as fas fa-globe. Empty when it has none.

    • colorSchemestringrequired

      The color Silktide shows the role in. Empty when it has none.

      One ofskyemeraldamberroseorangevioletindigocyanfuchsiaslate

    • descriptionstringrequired

      What the role is for. Can be empty.

    • createdintegerrequired

      When the role was created.

Errors

StatusTypeWhen
401NotLoggedInNo API key was sent, or it is not a key for this region.(any operation)
429TooManyRequestsToo 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.