Get session variables

get/sessions/{sessionId}/variables
Internal-Use Only

Gets the variables that are currently defined in a session. These variables are macro variables that have been defined either by SAS or by you. A collection of application/vnd.sas.compute.variable items is returned. Standard pagination rules apply, and simple filtering is allowed.

Request Samples

1

Response Samples

1{
2 "accept": "application/vnd.sas.compute.session.variable",
3 "count": 2,
4 "items": [
5 {
6 "name": "SYS_COMPUTE_SESSION_ID",
7 "scope": "GLOBAL",
8 "value": "RKEY-ses0000",
9 "version": 1
10 },
11 {
12 "name": "AFDSID",
13 "scope": "AUTOMATIC",
14 "value": "0",
15 "version": 1
16 }
17 ],
18 "limit": 50,
19 "links": [
20 {
21 "href": "/compute/sessions/RKEY-ses0000/variables?filter=or(eq(name,AFDSID),eq(name,SYS_COMPUTE_SESSION_ID))&limit=50&start=0",
22 "itemType": "application/vnd.sas.compute.session.variable",
23 "method": "GET",
24 "rel": "self",
25 "type": "application/vnd.sas.collection",
26 "uri": "/compute/sessions/RKEY-ses0000/variables?filter=or(eq(name,AFDSID),eq(name,SYS_COMPUTE_SESSION_ID))&limit=50&start=0"
27 },
28 {
29 "href": "/compute/sessions/RKEY-ses0000/variables",
30 "itemType": "application/vnd.sas.compute.session.variable",
31 "method": "GET",
32 "rel": "collection",
33 "type": "application/vnd.sas.collection",
34 "uri": "/compute/sessions/RKEY-ses0000/variables"
35 },
36 {
37 "href": "/compute/sessions/RKEY-ses0000",
38 "method": "GET",
39 "rel": "up",
40 "type": "application/vnd.sas.compute.session",
41 "uri": "/compute/sessions/RKEY-ses0000"
42 }
43 ],
44 "name": "Session Variables",
45 "start": 0,
46 "version": 2
47}

Path Parameters

NameTypeRequiredDescription
sessionId
string<object-id>
true

Specifies the ID of the session.

Query Parameters

NameTypeRequiredDescription
filter
string<filter-criteria>
false

Specifies filter criteria for returned context definitions.

limit
integer
false

Specifies the maximum number of variables to return in a page. The default value is "50".

start
integer
false

Specifies the offset of the first variable to return. The default value is "0".

Responses

StatusMeaningDescription
200OKThe request succeeded.HeadersSchema
400Bad RequestThe request was invalid.Schema
404Not FoundNo resource exists at the requested path.Schema