Roles

The resource representing a role in the system.

Endpoints

Skip to section
GET/v1/roles
GET/v1/roles/{id}

List roles

manage

Returns a list of roles using cursor-based pagination.

Facts GET /v1/roles

Rate limit
required
Tier 1 (1000 requests per minute)

Query Parameters GET /v1/roles

filter
string

The advanced filtering to use for the query. Refer to RFC 7644 for the syntax. All conditional statements within this query parameter are case insensitive.

limit
default=20, minimum=1, maximum=100
number

The number of roles to retrieve.

next
string<uuid>

The next page cursor.

prev
string<uuid>

The previous page cursor.

sort
string

Optional resource field name to sort on, eg. name. Can be prefixed with +/- to determine order, defaults to (+) ascending.

totalResults
boolean

Determines wether to return a count of the total records matched in the query. Defaults to false.

Responses GET /v1/roles

200
application/json

An array of roles, and pagination links.

400
application/json

Invalid request parameters for querying roles.

401
application/json

Unauthorized, JWT is invalid or not provided.

429
application/json

Request has been rate limited.

500
application/json

Internal server error.

GET/v1/roles

curl "https://your-tenant.us.qlikcloud.com/api/v1/roles" \
 -H "Authorization: Bearer <API-key>"

Response GET /v1/roles

{
  "data": [
    {
      "id": "507f191e810c19729de860ea",
      "name": "Developer",
      "type": "default",
      "level": "admin",
      "links": {
        "self": {
          "href": "http://mytenant.us.qlikcloud.com/api/v1/roles/507f191e810c19729de860ea"
        }
      },
      "tenantId": "12345678-1234-5678-1234-567812345678'",
      "createdAt": "2021-03-21T17:32:28Z",
      "description": "Grants permission to generate API keys",
      "permissions": [
        "edit_foo"
      ],
      "lastUpdatedAt": "2021-03-22T10:01:02Z"
    }
  ],
  "links": {
    "next": {
      "href": "http://mytenant.us.qlikcloud.com/api/v1/roles?next=QaFdFYW6pImZvRgFaDyB1UffNgfs4mRd"
    },
    "prev": {
      "href": "http://mytenant.us.qlikcloud.com/api/v1/roles?prev=QaFdFYW6pImZvRgFaDyB1UffNgfs4mRd"
    },
    "self": {
      "href": "http://mytenant.us.qlikcloud.com/api/v1/roles"
    }
  },
  "totalResults": 0
}

Get role by ID

manage

Returns the requested role.

Facts GET /v1/roles/{id}

Rate limit
required
Tier 1 (1000 requests per minute)

Path Parameters GET /v1/roles/{id}

id
required
string

The role's unique identifier

Responses GET /v1/roles/{id}

200
application/json

Request successfully completed.

404
application/json

Role ID not found or Invalid format.

429
application/json

Request has been rate limited.

500
application/json

Internal Server Error.

GET/v1/roles/{id}

curl "https://your-tenant.us.qlikcloud.com/api/v1/roles/{id}" \
 -H "Authorization: Bearer <API-key>"

Response GET /v1/roles/{id}

{
  "id": "507f191e810c19729de860ea",
  "name": "Developer",
  "type": "default",
  "level": "admin",
  "links": {
    "self": {
      "href": "http://mytenant.us.qlikcloud.com/api/v1/roles/507f191e810c19729de860ea"
    }
  },
  "tenantId": "12345678-1234-5678-1234-567812345678'",
  "createdAt": "2021-03-21T17:32:28Z",
  "description": "Grants permission to generate API keys",
  "permissions": [
    "edit_foo"
  ],
  "lastUpdatedAt": "2021-03-22T10:01:02Z"
}

Error

object

An error object describing the error.

Properties

code
required
string

The error code.

meta
object

Additional properties relating to the error.

title
required
string

Summary of the problem.

detail
string

A human-readable explanation specific to this occurrence of the problem.

source

References to the source of the error.

Errors

object

The error response object describing the error from the handling of an HTTP request.

Properties

errors

An array of errors related to the operation.

traceId
string

A unique identifier for tracing the error.

ListRolesResult

object

Properties

data
required

An array of roles.

links
required

Contains pagination links

totalResults
integer

Indicates the total number of matching documents. Will only be returned if the query parameter "totalResults" is true.

Role

object

Properties

id
required
filterable
string<uuid>

The unique identifier for the role.

name
required
filterable
string

The name of the role.

type
required
filterable
string

The type of role.

Enum:

default

level
filterable
string

The level of access associated to the role.

Enum:

admin

user

links
required

Contains links for the role.

tenantId
required
filterable
string<uuid>

The tenant unique identifier associated with the given Role.

createdAt
required
filterable
string<date-time>

The timestamp for when the role was created.

description
required
filterable
string

Descriptive text for the role.

permissions
filterable
Array<string>

An array of permissions associated with the role.

lastUpdatedAt
required
filterable
string<date-time>

The timestamp for when the role was last updated.

v0.809.0
Was this page helpful?