Roles

The resource representing a role in the system.

Endpoints

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

List roles

Returns a list of roles using cursor-based pagination.

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

Returns the requested role.

Path Parameters GET /v1/roles/{id}

id
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
string

The error code.

meta
optional
object

Additional properties relating to the error.

title
string

Summary of the problem.

detail
optional
string

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

source
optional

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

An array of roles.

links
optional

Contains pagination links

totalResults
optional
integer

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

Role

object

Properties

id
string<uuid>

The unique identifier for the role.

name
string

The name of the role.

type
string

The type of role.

Enum:

default

level
optional
string

The level of access associated to the role.

Enum:

admin

user

links
optional

Contains links for the role.

tenantId
string<uuid>

The tenant unique identifier associated with the given Role.

createdAt
string<date-time>

The timestamp for when the role was created.

description
string

Descriptive text for the role.

permissions
optional
Array<string>

An array of permissions associated with the role.

lastUpdatedAt
string<date-time>

The timestamp for when the role was last updated.

v0.392.12
Was this page helpful?