Get authorization rules

get/rules
Internal-Use Only

Retrieves some or all authorization rules, with or without paging.

Request Samples

1

Response Samples

1{
2 "type": "grant",
3 "permissions": [
4 "read"
5 ],
6 "principal": "testprincipal",
7 "principalType": "authenticatedUsers",
8 "objectUri": "/preferences/",
9 "description": "Allow access to a service root.",
10 "matchParams": false,
11 "version": 10,
12 "links": [
13 {
14 "method": "GET",
15 "rel": "self",
16 "href": "/authorization/rules/3288b305-981f-4b8d-b440-0911eabc3fac",
17 "uri": "/authorization/rules/3288b305-981f-4b8d-b440-0911eabc3fac",
18 "type": "application/vnd.sas.authorization.rule"
19 },
20 {
21 "method": "PUT",
22 "rel": "update",
23 "href": "/authorization/rules/3288b305-981f-4b8d-b440-0911eabc3fac",
24 "uri": "/authorization/rules/3288b305-981f-4b8d-b440-0911eabc3fac",
25 "type": "application/vnd.sas.authorization.rule",
26 "responseType": "application/vnd.sas.authorization.rule"
27 },
28 {
29 "method": "DELETE",
30 "rel": "delete",
31 "href": "/authorization/rules/3288b305-981f-4b8d-b440-0911eabc3fac",
32 "uri": "/authorization/rules/3288b305-981f-4b8d-b440-0911eabc3fac"
33 }
34 ],
35 "id": "3288b305-981f-4b8d-b440-0911eabc3fac",
36 "modifiedTimestamp": "2016-08-27T04:09:42.150Z",
37 "createdTimestamp": "2016-08-27T04:09:42.150Z",
38 "createdBy": "sas.preferences",
39 "modifiedBy": "sas.preferences",
40 "enabled": true
41}

Query Parameters

NameTypeRequiredDescription
filter
string<filter-criteria>
false

Constraints on which rules to retrieve. Here are the supported filters and criteria: principal (eq, ne, startsWith, endsWith, contains) type (eq, ne) principalType (eq, ne) permissions (in) objectUri (eq, ne, startsWith, endsWith, contains) containerUri (eq, ne, startsWith, endsWith, contains) mediaType (eq, ne, startsWith, endsWith, contains) enabled (eq, ne)

limit
integer
false

The maximum number of rules to return per page.

Default:
50
sortBy
string<sort-criteria>
false

Instructions for sorting the retrieved rules. You can sort by name or description in ascending or descending order.

start
integer
false

The index number for the first rule in a page. default: 0

Default:
0

Header Parameters

NameTypeRequiredDescription
Accept-Item
string
false

If provided, returns the items in the requested format. Supported media types are: application/vnd.sas.authorization.rule+json;version=1 application/vnd.sas.authorization.rule+json;version=2 application/vnd.sas.authorization.rule+json;version=3 application/vnd.sas.authorization.rule+json;version=4 application/vnd.sas.authorization.rule+json;version=5 application/vnd.sas.authorization.rule+json;version=6 application/vnd.sas.authorization.rule+json;version=7 application/vnd.sas.authorization.rule+json;version=8 application/vnd.sas.authorization.rule+json;version=9 application/vnd.sas.authorization.rule+json;version=10

Responses

StatusMeaningDescription
200OKThe request succeeded.HeadersSchema
400Bad RequestThe request was invalid. Returned if any query criteria (sortBy, filter, limit, start) are invalid.