View

View information about roles.

Note that only roles of the account / customer of the current request (if any) are shown.

Tokens

This action requires the following tokens:

  • role-read

Arguments

Required arguments are marked in bold, and optional arguments are marked in italics.

Argument Type Default Description
role Hash   Only show the category with the given hash
searchname String   Only show roles that contain this value in their name
limit Integer 20 The maximum number of results to include in the output
offset Integer 0 The number of results to skip when outputting
orderfield String name

Defines the field to order the results by; can be any of the following:

  • name – Order lexicographically by the name of the role
order String asc Sort the results by the field given in orderfield in ascending or descending order, by using ‘asc‘ or ‘desc‘ respectively

Output

This action produces the following extra headers on success, besides the default headers:

Name Type Description
count Integer The total number of results that would be returned when pagination would be disabled

This action produces the following output on success:

An array containing zero or more elements, each one being an object containing the following fields:

Name Type Description
id Hash Role ID
name String The name of this role
customer

The customer of this role, if any

The value of this field is an object containing the following fields:

Name Type Description
id Hash Customer ID
name String The name of this customer
datecreated DateTime When this customer was created
datemodified DateTime When this customer was last modified
tokens

Tokens for this role

The value of this field is an array containing zero or more elements, each one being one Label

Errors

This action can return one of the default status codes, or one of the following status codes on error:

STATUS_CUSTOMER_NOT_FOUND (250)
If the customer can not be found