Get session variables
get/sessions/{sessionId}/variables
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.
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": 110 },11 {12 "name": "AFDSID",13 "scope": "AUTOMATIC",14 "value": "0",15 "version": 116 }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": 247}
Name | Type | Required | Description |
---|---|---|---|
sessionId | string<object-id> | true | Specifies the ID of the session. |
Name | Type | Required | Description |
---|---|---|---|
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". |
Status | Meaning | Description | ||
---|---|---|---|---|
200 | OK | The request succeeded. | Headers | Schema |
400 | Bad Request | The request was invalid. | Schema | |
404 | Not Found | No resource exists at the requested path. | Schema |