Get a list of policies

get/servers/{serverName}/policies
Internal-Use Only

Returns a collection of policies on the CAS server. Supports SAS standard paging query parameters, sorting, and filtering. Schema of items returned in the response collection is included below, and are of type application/vnd.sas.cas.server.policy.summary+json.

Request Samples

1

Response Samples

1{
2 "links": [
3 {
4 "method": "GET",
5 "rel": "up",
6 "href": "/casManagement/servers/cas-shared-default/",
7 "uri": "/casManagement/servers/cas-shared-default/",
8 "type": "application/vnd.sas.cas.server"
9 },
10 {
11 "method": "GET",
12 "rel": "self",
13 "href": "/casManagement/servers/cas-shared-default/policies?locale=en_US&start=0&limit=10",
14 "uri": "/casManagement/servers/cas-shared-default/policies?locale=en_US&start=0&limit=10",
15 "type": "application/vnd.sas.collection",
16 "itemType": "application/vnd.sas.cas.server.policy.summary"
17 },
18 {
19 "method": "GET",
20 "rel": "collection",
21 "href": "/casManagement/servers/cas-shared-default/policies",
22 "uri": "/casManagement/servers/cas-shared-default/policies",
23 "type": "application/vnd.sas.collection",
24 "itemType": "application/vnd.sas.cas.server.policy.summary"
25 }
26 ],
27 "name": "policies",
28 "accept": "application/vnd.sas.cas.server.policy.summary",
29 "start": 0,
30 "count": 4,
31 "items": [
32 {
33 "version": 1,
34 "name": "cas-shared-default-priority-1",
35 "type": "priorityLevels",
36 "attributes": [
37 {
38 "key": "localTables",
39 "value": {
40 "12000000000": null
41 }
42 },
43 {
44 "key": "cpu",
45 "value:": {
46 "45": null
47 }
48 },
49 {
50 "key": "globalCasuser",
51 "value": {
52 "33000000000": null
53 }
54 },
55 {
56 "key": "globalCasuserHdfs",
57 "value": {
58 "15000000000": null
59 }
60 }
61 ]
62 },
63 {
64 "version": 1,
65 "name": "cas-shared-default-priority-2",
66 "type": "priorityLevels",
67 "attributes": [
68 {
69 "key": "localTables",
70 "value": {
71 "50000000000": null
72 }
73 },
74 {
75 "key": "cpu",
76 "value": {
77 "20": null
78 }
79 },
80 {
81 "key": "globalCasuser",
82 "value": {
83 "50000000000": null
84 }
85 },
86 {
87 "key": "globalCasuserHdfs",
88 "value": {
89 "50000000000": null
90 }
91 }
92 ]
93 },
94 {
95 "version": 1,
96 "name": "cas-shared-default-priority-3",
97 "type": "priorityLevels",
98 "attributes": [
99 {
100 "key": "cpu",
101 "value": {
102 "30": null
103 }
104 },
105 {
106 "key": "localTables",
107 "value": {
108 "10000000000": null
109 }
110 },
111 {
112 "key": "globalCasuser",
113 "value": {
114 "10000000000": null
115 }
116 },
117 {
118 "key": "globalCasuserHdfs",
119 "value": {
120 "10000000000": null
121 }
122 }
123 ]
124 },
125 {
126 "version": 1,
127 "name": "globalCaslibs",
128 "type": "globalCaslibs",
129 "attributes": [
130 {
131 "key": "_ALL_",
132 "value": {
133 "400000000000": null
134 }
135 },
136 {
137 "key": "HPS",
138 "value": {
139 "100000000000": null
140 }
141 },
142 {
143 "key": "Public",
144 "value": {
145 "200000000000": null
146 }
147 }
148 ]
149 }
150 ],
151 "limit": 10,
152 "version": 2
153}

Path Parameters

NameTypeRequiredDescription
serverName
string
true

Server name for which policies are being requested.

Query Parameters

NameTypeRequiredDescription
filter
string<filter-criteria>
false

Filter criteria for returned items. The valid filter fields are the first-level fields in each item. The supported functions are and, or, not, eq, lt, le, gt, ge, contains, startsWith, endsWith, and isNull. A sample query to return only the policies with the word 'priority' in the name: filter=contains(name,'priority')

limit
integer
false

Maximum number of items to return in this page of results. The actual number of returned items can be less if the collection has been exhausted. Defaults to 10.

sortBy
string<sort-criteria>
false

Sort returned items. An example sort: sortBy=type:descending. The default sort is by name in ascending order.

start
integer
false

The starting index of the first item in a page. Defaults to 0.

Responses

StatusMeaningDescription
200OKThe list of policies for the requested CAS server was returned.Schema
400Bad RequestAn error occurred.Schema
404Not FoundThe requested CAS server or policy does not exist.
409ConflictThe request could not be completed due to a conflict with the current state of the resource. Details are included in the response body.