Get a list of sessions
Returns a collection of sessions available on the CAS server. Supports SAS standard paging query parameters. 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.session.summary+json. Returned sessions are consistent with the permissions of the user. Normally, only sessions owned by the authenticated user are returned. If a user has administrative privileges, and has elevated their session to use those privileges (see CAS Access Management microservice), all sessions on the server will be visible.
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/sessions?excludeItemLinks=false&start=0&limit=10",14 "uri": "/casManagement/servers/cas-shared-default/sessions?excludeItemLinks=false&start=0&limit=10",15 "type": "application/vnd.sas.collection",16 "itemType": "application/vnd.sas.cas.session.summary"17 },18 {19 "method": "GET",20 "rel": "collection",21 "href": "/casManagement/servers/cas-shared-default/sessions",22 "uri": "/casManagement/servers/cas-shared-default/sessions",23 "type": "application/vnd.sas.collection",24 "itemType": "application/vnd.sas.cas.session.summary"25 }26 ],27 "name": "sessions",28 "accept": "application/vnd.sas.cas.session.summary",29 "start": 0,30 "count": 1,31 "items": [32 {33 "version": 2,34 "id": "3ecd299f-042a-c849-b354-d2961eca5a03",35 "name": "SAS Environment Manager:Tue Sep 19 18:41:55 2017",36 "state": "Connected",37 "authenticationType": "OAuth",38 "owner": "userId",39 "links": [40 {41 "method": "GET",42 "rel": "up",43 "href": "/casManagement/servers/cas-shared-default/sessions",44 "uri": "/casManagement/servers/cas-shared-default/sessions",45 "type": "application/vnd.sas.collection",46 "itemType": "application/vnd.sas.cas.session.summary"47 },48 {49 "method": "GET",50 "rel": "self",51 "href": "/casManagement/servers/cas-shared-default/sessions/3ecd299f-042a-c849-b354-d2961eca5a03",52 "uri": "/casManagement/servers/cas-shared-default/sessions/3ecd299f-042a-c849-b354-d2961eca5a03",53 "type": "application/vnd.sas.cas.session.summary"54 },55 {56 "method": "DELETE",57 "rel": "delete",58 "href": "/casManagement/servers/cas-shared-default/sessions/3ecd299f-042a-c849-b354-d2961eca5a03",59 "uri": "/casManagement/servers/cas-shared-default/sessions/3ecd299f-042a-c849-b354-d2961eca5a03"60 }61 ]62 }63 ],64 "limit": 10,65 "version": 266}
Name | Type | Required | Description |
---|---|---|---|
serverName | string | true | Server name for which sessions are being requested. |
Name | Type | Required | Description |
---|---|---|---|
excludeItemLinks | boolean | false | Determines whether item links are excluded from results. Defaults to false. |
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. Some sample queries: Search by name starting with: filter=startsWith(name, 'CAS') Search by name: filter=eq(name, 'CASUSER') Search for multiple items: filter=in(name, 'CASUSER', 'Public') |
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. |
sessionId | string | false | Session ID to use when connecting to retrieve the list of sessions. If not specified, a temporary session will be used. |
sortBy | string<sort-criteria> | false | Sort returned items. The sort criteria supports the first-level fields in each item. Some sample sorts: Sort by ascending name: sortBy=name:ascending Sort by descending name: sortBy=name: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. |
Status | Meaning | Description | ||
---|---|---|---|---|
200 | OK | The list of sessions for the requested CAS server was returned. | Schema | |
400 | Bad Request | The request was invalid. | Schema | |
404 | Not Found | The requested CAS server does not exist. | ||
409 | Conflict | The request could not be completed due to a conflict with the current state of the resource. Details are included in the response body. |