Retrieve roles

Request

Retrieves a list of user roles.
Security
SecretApiKey or JWT
Query
limitinteger, [ 0 .. 1000 ]

Limit the number of collection items to be returned. Use 0 to return an empty collection and still receive the count of matching items in Pagination-Total.

offsetinteger, [ 0 .. 1000 ]
Specifies the starting point within the collection of items to be returned.
filterstring

Criteria for filtering collection items. This field requires a special format. Use , to specify multiple allowed values. Use ; to specify multiple fields.

For more information, see Search filters.

sortArray of strings

Sorts and orders the collection of items. To sort in descending order, prefix with -. Multiple fields can be sorted by separating each with ,.

qstring
Use this field to perform a partial search of text fields.
expandstring

Expands a request to include embedded objects within the _embedded property of the response. This field accepts a comma-separated list of objects.

For more information, see Embedded resources.

curl -i -X GET \
  'https://www.rebilly.com/_mock/catalog/all/roles?limit=0&offset=0&filter=string&sort=string&q=string&expand=string' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE'

Responses

List of roles retrieved.
Headers
Pagination-Totalinteger

Total number of items that match the request. The value is independent of limit, including when limit is 0.

Example:332
Pagination-Limitinteger
Maximum number of items per page.
Example:100
Pagination-Offsetinteger

Specifies the starting point within the collection of resource results. For example, a request with limit=20 retrieves and displays the first 20 results on a page. A following request with limit=20 and offset=20, retrieves the next page of 20 results.

Example:2
Bodyapplication/json
Array [
idstring, <= 50 charactersread-only
ID of the role.
Example:"role_0YVDN2J11HDMX9N8X7DCB4CMX2"
namestring, [ 1 .. 50 ] charactersrequired
Name of the user role.
descriptionstring or null, <= 65535 characters
Description of the role.
aclArray of objects(Acl)required

Access Control List (ACL) information.

allowedIpsArray of strings or null, (ip)(AllowedIps)

List of IP addresses that are permitted access. Private subnets are prohibited. To remove restrictions, set this value to null.

Example:
[ "153.12.32.33", "201.54.122.0/24", "2001:0db8:abcd:0012:0000:0000:0000:ffff", "2001:db8:abcd:12::0/64" ]
computedAllowedIpsArray of strings or null, (ip)read-only

IP addresses specified in allowedIps for this role and any roles included in it. This value is null if no allowed IP addresses are configured for any of these roles.

seniorIdsArray of stringsread-only

List of role IDs where this role is used. For example, a role called user may be used in the admin and manager roles.

juniorIdsArray of strings

List of role IDs that are included in this role. For example, a role called admin may include the user and manager roles.

usersCountintegerread-only
Number of users assigned to this role.
createdTimestring, (date-time)(CreatedTime)read-only
Date and time when the resource is created. This value is set automatically when the resource is created.
updatedTimestring, (date-time)(UpdatedTime)read-only
Date and time when the resource is updated. This value is set automatically when the resource is updated.
_embeddedobjectread-only

Embedded objects that are requested by the expand query parameter.

]
Response
[ { "id": "role_0YVDN2J11HDMX9N8X7DCB4CMX2", "name": "string", "description": "string", "acl": [ … ], "allowedIps": [ … ], "computedAllowedIps": [ … ], "seniorIds": [ … ], "juniorIds": [ … ], "usersCount": 0, "createdTime": "2019-08-24T14:15:22Z", "updatedTime": "2019-08-24T14:15:22Z", "_links": [ … ], "_embedded": { … } } ]