Compute
CAS Management
Base URLs:
- https://example.com/casManagement
Terms of service Email: SAS Developers Web: SAS Developers
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
The CAS Management API enables users to manage and perform actions on common resources related to Cloud Analytic Services (CAS).
Usage Notes
Overview
You can use this API to manage servers, nodes, sessions, libraries, and tables in CAS. CAS also has a variety of other REST APIs for data scientists, programmers and administrators who are familiar with CAS actions and need to interact with CAS directly. For more information on these APIs, see Getting Started with REST APIs for Cloud Analytics Services.
HEAD Support
Note that HEAD is supported for every GET request documented in the API. Simply change the HTTP verb from GET to HEAD, leaving other parameters the same.
Provider Implementation
The CAS Management API implements endpoints necessary to be classified as both a data sources provider and data tables provider for the Data Sources and Data Tables APIs. The Data Sources and Data Tables APIs enable you to reference data sources and data tables independent of the underlying provider.
Endpoints for the Data Sources and Data Tables APIs that contain the Provider tag support additional provider-specific endpoint parameters. See the documentation for those APIs for information about the provider endpoints.
This documentation details endpoints specific to the CAS Management API, as well as endpoints that extend the Data Sources and Data Tables APIs. As a result, the API can be exercised in the following ways:
- using the endpoints specified in this document directly
- using the endpoints for the Data Sources or Data Tables APIs, where the CAS Management API acts as a provider.
Note
When accessed via the provider endpoints, the term source is used to refer to a location containing tables and, for this provider, CAS tables. A source in this context could be either a CAS server or a CAS library.
Within a CAS library, however, there is also the concept of a data source. In this context, a source refers
to the source table or tables accessible by a given CAS library. Endpoints within this documentation with a
Sources
tag refer to the caslib sources, not provider sources. This is an important distinction to understand
when using the CAS Management API, as the CAS Management API sits between the data management standards and CAS,
which both use the term source.
The tables represented in the examples do not represent exclusively a CAS tables or CAS source file/table. Tables in this context are a combined representation of a CAS table name and the source with which it is associated (whether the CAS table has been loaded or not).
Other Service Links
Note that some resource links might refer to other paths (such as /casProxy, /dataSources, /dataTables). These links are operational only if the corresponding service has been deployed at the referenced location.
Terminology
CAS server
the controller process providing access to Cloud Analytic Services functionality. A CAS server houses sessions and libraries.
CAS policy
settings for managing resource utilization in a CAS server.
CAS node
the controller or worker process providing Cloud Analytic Services functionality.
CAS session
a user-specific set of processes running in the context of a CAS server, in which the user performs work.
Caslib
a logical construct within CAS that provides an organizational unit for loaded (in-memory) CAS tables, as well as access to data source content that can be made available in CAS.
CAS source
a file or table accessible via a caslib's data source.
CAS table
rectangular data that has been made available in a caslib.
CAS column
a column of rectangular data in a CAS table.
format library
a collection of formats that the server uses when an analysis is performed according to formatted values. CAS formats must reside in a format library in CAS. A CAS format library is named and can be temporary for the duration of the session, global for the duration of the server, or persisted in a table or a disk file (item store).
provider
a service that has registered itself as a provider of data. The casManagement API participates as a CAS-specific provider for the dataSources and dataTables APIs.
Error Codes
HTTP Status Code | Error Code | Description |
---|---|---|
304 | 12212 | An invalid option was specified for the load. |
304 | 12213 | The load operation failed. |
400 | 12209 | An invalid value was specified for the state parameter. |
400 | 12210 | An invalid value was specified for the scope parameter. |
400 | 12211 | An invalid value was specified for the format parameter. |
400 | 12222 | An invalid value was specified for the limit parameter. |
400 | 12224 | An error occurred during the file upload operation. |
400 | 12227 | An invalid parameter was specified. |
400 | 12228 | An error was received from the job execution service. |
401 | 12201 | User does not have authorization to perform the operation. |
403 | 12219 | Permission was denied while performing the operation. |
403 | 12225 | File upload capability is disabled. |
404 | 12204 | The caslib could not be found. |
404 | 12205 | The CAS server could not be found. |
404 | 12206 | The table is not loaded. |
404 | 12207 | The CAS session could not be found. |
404 | 12216 | The file or path could not be found. |
409 | 12202 | The global table already exists. |
409 | 12203 | The Save operation failed. |
409 | 12215 | The caslib exists. |
409 | 12217 | Mismatch between table source name and CAS table name. |
409 | 12218 | The source file exists. |
409 | 12223 | No route to the host. |
409 | 12226 | The uploaded filename already exists. |
409 | 12299 | An error was received from the CAS server. |
413 | 12220 | The file size limit was exceeded. |
415 | 12214 | The specified media type is not supported. |
500 | 12200 | An unknown error occurred. |
503 | 12208 | The CAS server refused the connection. |
504 | 12221 | The socket timed out before a response was received. |
Operations
Root
Contains operations for the root resource.
Get API resource links
Code samples
# You can also use wget
curl -X GET https://example.com/casManagement/ \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.api+json'
const headers = {
'Accept':'application/vnd.sas.api+json'
};
fetch('https://example.com/casManagement/',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.api+json'
}
r = requests.get('https://example.com/casManagement/', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.api+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/casManagement/", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /
Returns API information. Produces application/json and application/vnd.sas.api+json.
Example responses
200 Response
{
"version": 1,
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Version information about the API, as well as top level API entry points. | Inline |
Response Schema
Status Code 200
API
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» version | integer | true | none | The version number of the API representation. This is version 1. |
» links | [link] | true | none | The API's top-level links. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
Check availability of API
Code samples
# You can also use wget
curl -X HEAD https://example.com/casManagement/
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/casManagement/',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/casManagement/')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/casManagement/", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /
Returns whether the CAS Management service is running or not. This is identical to a GET request but returns only the HTTP headers with no document body.
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. Service is running and available. | None |
Servers
Contains operations to manage CAS servers.
Get a list of CAS servers
Code samples
# You can also use wget
curl -X GET https://example.com/casManagement/servers \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('https://example.com/casManagement/servers',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.get('https://example.com/casManagement/servers', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.collection+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/casManagement/servers", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /servers
Returns a collection of CAS servers. 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+json.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
start | query | integer | false | The starting index of the first item in a page. Defaults to 0. |
limit | query | 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. |
filter | query | 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:
|
sortBy | query | string(sort-criteria) | false | Sort returned items. The sort criteria supports the first-level fields in each item. Some sample sorts:
|
excludeItemLinks | query | boolean | false | Determines whether item links are excluded from results. Defaults to false. |
Example responses
A sample collection of application/vnd.sas.cas.server items.
{
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/",
"uri": "/casManagement/",
"type": "application/vnd.sas.api"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers?excludeItemLinks=false&start=0&limit=10",
"uri": "/casManagement/servers?excludeItemLinks=false&start=0&limit=10",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server"
},
{
"method": "GET",
"rel": "collection",
"href": "/casManagement/servers",
"uri": "/casManagement/servers",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server"
}
],
"name": "servers",
"accept": "application/vnd.sas.cas.server",
"start": 0,
"count": 1,
"items": [
{
"version": 1,
"name": "cas-shared-default",
"description": "controller",
"host": "myhost.example.com",
"port": 5570,
"restPort": 8777,
"restProtocol": "http",
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers",
"uri": "casManagement/servers",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default",
"uri": "/casManagement/servers/cas-shared-default",
"type": "application/vnd.sas.cas.server"
},
{
"method": "GET",
"rel": "connection",
"href": "/casManagement/servers/cas-shared-default/connection",
"uri": "/casManagement/servers/cas-shared-default/connection",
"type": "application/vnd.sas.cas.server.connection"
},
{
"method": "GET",
"rel": "state",
"href": "/casManagement/servers/cas-shared-default/state",
"uri": "/casManagement/servers/cas-shared-default/state",
"type": "text/plain"
},
{
"method": "PUT",
"rel": "updateState",
"href": "/casManagement/servers/cas-shared-default/state",
"uri": "/casManagement/servers/cas-shared-default/state",
"type": "text/plain"
},
{
"method": "GET",
"rel": "nodes",
"href": "/casManagement/servers/cas-shared-default/nodes",
"uri": "/casManagement/servers/cas-shared-default/nodes",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server.node"
},
{
"method": "GET",
"rel": "metrics",
"href": "/casManagement/servers/cas-shared-default/metrics",
"uri": "/casManagement/servers/cas-shared-default/metrics",
"type": "application/vnd.sas.cas.server.metrics"
},
{
"method": "GET",
"rel": "sessions",
"href": "/casManagement/servers/cas-shared-default/sessions",
"uri": "/casManagement/servers/cas-shared-default/sessions",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.session.summary"
},
{
"method": "POST",
"rel": "createSession",
"href": "/casManagement/servers/cas-shared-default/sessions",
"uri": "/casManagement/servers/cas-shared-default/sessions",
"type": "application/vnd.sas.cas.session",
"responseType": "application/vnd.sas.cas.session"
},
{
"method": "GET",
"rel": "caslibs",
"href": "/casManagement/servers/cas-shared-default/caslibs",
"uri": "/casManagement/servers/cas-shared-default/caslibs",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.caslib"
},
{
"method": "GET",
"rel": "casProxy",
"href": "/casProxy/servers/cas-shared-default/cas",
"uri": "/casProxy/servers/cas-shared-default/cas",
"type": "application/json"
},
{
"method": "GET",
"rel": "dataSource",
"href": "/dataSources/providers/cas/sources/cas-shared-default",
"uri": "/dataSources/providers/cas/sources/cas-shared-default",
"type": "application/vnd.sas.data.source"
}
],
"tags": {
"value": "appServerEnabled=True"
}
}
],
"limit": 10,
"version": 2
}
{
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/",
"uri": "/casManagement/",
"type": "application/vnd.sas.api"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers?excludeItemLinks=false&start=0&limit=10",
"uri": "/casManagement/servers?excludeItemLinks=false&start=0&limit=10",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server"
},
{
"method": "GET",
"rel": "collection",
"href": "/casManagement/servers",
"uri": "/casManagement/servers",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server"
}
],
"name": "servers",
"accept": "application/vnd.sas.cas.server",
"start": 0,
"count": 1,
"items": [
{
"version": 1,
"name": "cas-shared-default",
"description": "controller",
"host": "myhost.example.com",
"port": 5570,
"restPort": 8777,
"restProtocol": "http",
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers",
"uri": "casManagement/servers",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default",
"uri": "/casManagement/servers/cas-shared-default",
"type": "application/vnd.sas.cas.server"
},
{
"method": "GET",
"rel": "connection",
"href": "/casManagement/servers/cas-shared-default/connection",
"uri": "/casManagement/servers/cas-shared-default/connection",
"type": "application/vnd.sas.cas.server.connection"
},
{
"method": "GET",
"rel": "state",
"href": "/casManagement/servers/cas-shared-default/state",
"uri": "/casManagement/servers/cas-shared-default/state",
"type": "text/plain"
},
{
"method": "PUT",
"rel": "updateState",
"href": "/casManagement/servers/cas-shared-default/state",
"uri": "/casManagement/servers/cas-shared-default/state",
"type": "text/plain"
},
{
"method": "GET",
"rel": "nodes",
"href": "/casManagement/servers/cas-shared-default/nodes",
"uri": "/casManagement/servers/cas-shared-default/nodes",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server.node"
},
{
"method": "GET",
"rel": "metrics",
"href": "/casManagement/servers/cas-shared-default/metrics",
"uri": "/casManagement/servers/cas-shared-default/metrics",
"type": "application/vnd.sas.cas.server.metrics"
},
{
"method": "GET",
"rel": "sessions",
"href": "/casManagement/servers/cas-shared-default/sessions",
"uri": "/casManagement/servers/cas-shared-default/sessions",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.session.summary"
},
{
"method": "POST",
"rel": "createSession",
"href": "/casManagement/servers/cas-shared-default/sessions",
"uri": "/casManagement/servers/cas-shared-default/sessions",
"type": "application/vnd.sas.cas.session",
"responseType": "application/vnd.sas.cas.session"
},
{
"method": "GET",
"rel": "caslibs",
"href": "/casManagement/servers/cas-shared-default/caslibs",
"uri": "/casManagement/servers/cas-shared-default/caslibs",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.caslib"
},
{
"method": "GET",
"rel": "casProxy",
"href": "/casProxy/servers/cas-shared-default/cas",
"uri": "/casProxy/servers/cas-shared-default/cas",
"type": "application/json"
},
{
"method": "GET",
"rel": "dataSource",
"href": "/dataSources/providers/cas/sources/cas-shared-default",
"uri": "/dataSources/providers/cas/sources/cas-shared-default",
"type": "application/vnd.sas.data.source"
}
],
"tags": {
"value": "appServerEnabled=True"
}
}
],
"limit": 10,
"version": 2
}
400 Response
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. The collection of CAS servers was returned. | casServerCollection |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | The requested CAS server does not exist. | None |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Get a CAS server
Code samples
# You can also use wget
curl -X GET https://example.com/casManagement/servers/{serverName} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.cas.server+json'
const headers = {
'Accept':'application/vnd.sas.cas.server+json'
};
fetch('https://example.com/casManagement/servers/{serverName}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.cas.server+json'
}
r = requests.get('https://example.com/casManagement/servers/{serverName}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.cas.server+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/casManagement/servers/{serverName}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /servers/{serverName}
Returns a specific CAS server definition.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | The name of the server. |
Example responses
A sample cas server object.
{
"version": 2,
"name": "cas-shared-default",
"description": "controller",
"host": "grid.example.com",
"port": 5570,
"restPort": 8777,
"restProtocol": "http",
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers",
"uri": "/casManagement/servers",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default",
"uri": "/casManagement/servers/cas-shared-default",
"type": "application/vnd.sas.cas.server"
},
{
"method": "GET",
"rel": "connection",
"href": "/casManagement/servers/cas-shared-default/connection",
"uri": "/casManagement/servers/cas-shared-default/connection",
"type": "application/vnd.sas.cas.server.connection"
},
{
"method": "GET",
"rel": "state",
"href": "/casManagement/servers/cas-shared-default/state",
"uri": "/casManagement/servers/cas-shared-default/state",
"type": "text/plain"
},
{
"method": "PUT",
"rel": "updateState",
"href": "/casManagement/servers/cas-shared-default/state",
"uri": "/casManagement/servers/cas-shared-default/state",
"type": "text/plain",
"responseType": "application/json;text/plain"
},
{
"method": "GET",
"rel": "nodes",
"href": "/casManagement/servers/cas-shared-default/nodes",
"uri": "/casManagement/servers/cas-shared-default/nodes",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server.node"
},
{
"method": "GET",
"rel": "metrics",
"href": "/casManagement/servers/cas-shared-default/metrics",
"uri": "/casManagement/servers/cas-shared-default/metrics",
"type": "application/vnd.sas.cas.server.metrics"
},
{
"method": "GET",
"rel": "sessions",
"href": "/casManagement/servers/cas-shared-default/sessions",
"uri": "/casManagement/servers/cas-shared-default/sessions",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.session.summary"
},
{
"method": "POST",
"rel": "createSession",
"href": "/casManagement/servers/cas-shared-default/sessions",
"uri": "/casManagement/servers/cas-shared-default/sessions",
"type": "application/vnd.sas.cas.session",
"responseType": "application/vnd.sas.cas.session"
},
{
"method": "GET",
"rel": "caslibs",
"href": "/casManagement/servers/cas-shared-default/caslibs",
"uri": "/casManagement/servers/cas-shared-default/caslibs",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.caslib"
},
{
"method": "GET",
"rel": "casProxy",
"href": "/casProxy/servers/cas-shared-default/cas",
"uri": "/casProxy/servers/cas-shared-default/cas",
"type": "application/json"
},
{
"method": "GET",
"rel": "dataSource",
"href": "/dataSources/providers/cas/sources/cas-shared-default",
"uri": "/dataSources/providers/cas/sources/cas-shared-default",
"type": "application/vnd.sas.data.source"
}
],
"tags": {
"key": "keyName",
"value": "value"
}
}
{
"version": 2,
"name": "cas-shared-default",
"description": "controller",
"host": "grid.example.com",
"port": 5570,
"restPort": 8777,
"restProtocol": "http",
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers",
"uri": "/casManagement/servers",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default",
"uri": "/casManagement/servers/cas-shared-default",
"type": "application/vnd.sas.cas.server"
},
{
"method": "GET",
"rel": "connection",
"href": "/casManagement/servers/cas-shared-default/connection",
"uri": "/casManagement/servers/cas-shared-default/connection",
"type": "application/vnd.sas.cas.server.connection"
},
{
"method": "GET",
"rel": "state",
"href": "/casManagement/servers/cas-shared-default/state",
"uri": "/casManagement/servers/cas-shared-default/state",
"type": "text/plain"
},
{
"method": "PUT",
"rel": "updateState",
"href": "/casManagement/servers/cas-shared-default/state",
"uri": "/casManagement/servers/cas-shared-default/state",
"type": "text/plain",
"responseType": "application/json;text/plain"
},
{
"method": "GET",
"rel": "nodes",
"href": "/casManagement/servers/cas-shared-default/nodes",
"uri": "/casManagement/servers/cas-shared-default/nodes",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server.node"
},
{
"method": "GET",
"rel": "metrics",
"href": "/casManagement/servers/cas-shared-default/metrics",
"uri": "/casManagement/servers/cas-shared-default/metrics",
"type": "application/vnd.sas.cas.server.metrics"
},
{
"method": "GET",
"rel": "sessions",
"href": "/casManagement/servers/cas-shared-default/sessions",
"uri": "/casManagement/servers/cas-shared-default/sessions",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.session.summary"
},
{
"method": "POST",
"rel": "createSession",
"href": "/casManagement/servers/cas-shared-default/sessions",
"uri": "/casManagement/servers/cas-shared-default/sessions",
"type": "application/vnd.sas.cas.session",
"responseType": "application/vnd.sas.cas.session"
},
{
"method": "GET",
"rel": "caslibs",
"href": "/casManagement/servers/cas-shared-default/caslibs",
"uri": "/casManagement/servers/cas-shared-default/caslibs",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.caslib"
},
{
"method": "GET",
"rel": "casProxy",
"href": "/casProxy/servers/cas-shared-default/cas",
"uri": "/casProxy/servers/cas-shared-default/cas",
"type": "application/json"
},
{
"method": "GET",
"rel": "dataSource",
"href": "/dataSources/providers/cas/sources/cas-shared-default",
"uri": "/dataSources/providers/cas/sources/cas-shared-default",
"type": "application/vnd.sas.data.source"
}
],
"tags": {
"key": "keyName",
"value": "value"
}
}
400 Response
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. The CAS server definition was returned | casServer |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | The requested CAS server does not exist. | None |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Get connection information for CAS server
Code samples
# You can also use wget
curl -X GET https://example.com/casManagement/servers/{serverName}/connection \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.cas.server.connection+json'
const headers = {
'Accept':'application/vnd.sas.cas.server.connection+json'
};
fetch('https://example.com/casManagement/servers/{serverName}/connection',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.cas.server.connection+json'
}
r = requests.get('https://example.com/casManagement/servers/{serverName}/connection', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.cas.server.connection+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/casManagement/servers/{serverName}/connection", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /servers/{serverName}/connection
Returns the connection information for a CAS server definition.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | The name of the server. |
Example responses
Sample cas server connection information.
{
"host": "grid.example.com",
"links": [
{
"href": "/casManagement/servers/casServer/connection",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.cas.server.connection",
"uri": "/casManagement/servers/casServer/connection"
},
{
"href": "/casManagement/servers/casServer",
"method": "GET",
"rel": "up",
"type": "application/vnd.sas.cas.server",
"uri": "/casManagement/servers/casServer"
}
],
"port": 15943,
"serverName": "casServer",
"sessionId": "C875-DAA73-DA543-BE662-783BA-12D3F",
"version": 1
}
{
"host": "grid.example.com",
"links": [
{
"href": "/casManagement/servers/casServer/connection",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.cas.server.connection",
"uri": "/casManagement/servers/casServer/connection"
},
{
"href": "/casManagement/servers/casServer",
"method": "GET",
"rel": "up",
"type": "application/vnd.sas.cas.server",
"uri": "/casManagement/servers/casServer"
}
],
"port": 15943,
"serverName": "casServer",
"sessionId": "C875-DAA73-DA543-BE662-783BA-12D3F",
"version": 1
}
400 Response
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Connection information for the requested CAS server was returned. | casServerConnection |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | The requested CAS server does not exist. | None |
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. | None |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Get metrics for the CAS server
Code samples
# You can also use wget
curl -X GET https://example.com/casManagement/servers/{serverName}/metrics \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.cas.server.metrics+json'
const headers = {
'Accept':'application/vnd.sas.cas.server.metrics+json'
};
fetch('https://example.com/casManagement/servers/{serverName}/metrics',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.cas.server.metrics+json'
}
r = requests.get('https://example.com/casManagement/servers/{serverName}/metrics', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.cas.server.metrics+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/casManagement/servers/{serverName}/metrics", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /servers/{serverName}/metrics
Returns detailed server metrics about a specific CAS server.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | The name of the server. |
Example responses
Example metrics about a CAS server.
{
"cpuSystemTime": 0.018998,
"cpuUserTime": 0.027996,
"elapsedTime": 0.023649,
"host": "grid.example.com",
"links": [
{
"href": "/casManagement/servers/casServer/metrics",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.cas.server.metrics",
"uri": "/casManagement/servers/casServer/metrics"
},
{
"href": "/casManagement/servers/casServer",
"method": "GET",
"rel": "up",
"type": "application/vnd.sas.cas.server",
"uri": "/casManagement/servers/casServer"
}
],
"memory": 2264192,
"memorySystem": 18253888,
"memoryOs": 185253888,
"memoryQuota": 185253888,
"port": 15943,
"serverName": "casServer",
"systemCores": 1344,
"systemNodes": 28,
"systemTotalMemory": 7581465980928,
"userId": "userName",
"version": 1
}
{
"cpuSystemTime": 0.018998,
"cpuUserTime": 0.027996,
"elapsedTime": 0.023649,
"host": "grid.example.com",
"links": [
{
"href": "/casManagement/servers/casServer/metrics",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.cas.server.metrics",
"uri": "/casManagement/servers/casServer/metrics"
},
{
"href": "/casManagement/servers/casServer",
"method": "GET",
"rel": "up",
"type": "application/vnd.sas.cas.server",
"uri": "/casManagement/servers/casServer"
}
],
"memory": 2264192,
"memorySystem": 18253888,
"memoryOs": 185253888,
"memoryQuota": 185253888,
"port": 15943,
"serverName": "casServer",
"systemCores": 1344,
"systemNodes": 28,
"systemTotalMemory": 7581465980928,
"userId": "userName",
"version": 1
}
400 Response
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The requested server's metrics were returned. | casServerMetrics |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | The requested CAS server does not exist. | None |
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. | None |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Get the state of a CAS server
Code samples
# You can also use wget
curl -X GET https://example.com/casManagement/servers/{serverName}/state \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: text/plain'
const headers = {
'Accept':'text/plain'
};
fetch('https://example.com/casManagement/servers/{serverName}/state',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'text/plain'
}
r = requests.get('https://example.com/casManagement/servers/{serverName}/state', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"text/plain"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/casManagement/servers/{serverName}/state", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /servers/{serverName}/state
Returns the running state of a specific CAS server.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | The name of the server. |
Example responses
400 Response
{"message":"string","id":"string","errorCode":0,"httpStatusCode":0,"details":["string"],"remediation":"string","errors":[null],"links":[{"method":"string","rel":"string","uri":"string","href":"string","title":"string","type":"string","itemType":"string","responseType":"string","responseItemType":"string"}],"version":0}
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The requested server's running state was returned. Valid values include running or stopped for a final settled state. Interim values (while the server state is in transition) include starting or stopping. | None |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | The requested CAS server does not exist. | None |
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. | None |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Change the state of a CAS server
Code samples
# You can also use wget
curl -X PUT https://example.com/casManagement/servers/{serverName}/state?value=running \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: text/plain'
const headers = {
'Accept':'text/plain'
};
fetch('https://example.com/casManagement/servers/{serverName}/state?value=running',
{
method: 'PUT',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'text/plain'
}
r = requests.put('https://example.com/casManagement/servers/{serverName}/state', params={
'value': 'running'
}, headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"text/plain"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://example.com/casManagement/servers/{serverName}/state", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /servers/{serverName}/state
Request a change to the state of a CAS server. Call with an Accept header of application/json;text/plain to properly receive both success and error response types. After the state change is requested, the server will transition to the requested state. Check the interim server state by making a GET call on the same endpoint.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | The name of the CAS server. |
sessionId | query | string | false | The optional ID of the CAS session. |
value | query | string | true | State to which to set the server: |
Detailed descriptions
value: State to which to set the server:
* running
- start the CAS server if it is not already started.
* stopped
- shutdown the CAS server if it is currently running.
Enumerated Values
Parameter | Value |
---|---|
value | running |
value | stopped |
Example responses
A sample text/plain response from updating a server's state.
"stopped"
400 Response
{"message":"string","id":"string","errorCode":0,"httpStatusCode":0,"details":["string"],"remediation":"string","errors":[null],"links":[{"method":"string","rel":"string","uri":"string","href":"string","title":"string","type":"string","itemType":"string","responseType":"string","responseItemType":"string"}],"version":0}
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request was completed successfully. States starting and stopping are temporary states while the server is in transition. | updateServerState |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | The requested CAS server does not exist. | None |
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. | None |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Get a list of data connectors for a CAS server
Code samples
# You can also use wget
curl -X GET https://example.com/casManagement/servers/{serverName}/dataConnectors \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('https://example.com/casManagement/servers/{serverName}/dataConnectors',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.get('https://example.com/casManagement/servers/{serverName}/dataConnectors', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.collection+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/casManagement/servers/{serverName}/dataConnectors", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /servers/{serverName}/dataConnectors
Returns a collection of data connectors for the respective CAS server. Standard paging, filtering, and sorting options are provided. The members of this collection use the application/vnd.sas.data.engine media type representation.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | The CAS server name for which to obtain data connectors. |
start | query | integer | false | The starting index of the first data connector in a page. Defaults to 0. |
limit | query | integer | false | Maximum number of data connectors to return in this page of results. The actual number of returned data connectors might be less if the collection has been exhausted. Defaults to 10. |
filter | query | string(filter-criteria) | false | Filter criteria for returned data connectors. The valid filter fields are the top-level fields returned for items in the collection. For example, name, nickname, legalName, and so on. The supported functions are and, or, not, eq, lt, le, gt, ge, contains, startsWith, endsWith, and isNull. Sample queries include the following:
|
sortBy | query | string(sort-criteria) | false | Sort returned items. The sort criteria supports the top-level fields returned for items in the collection such as name, nickname, and legalName. Sample sorts include the following:
The default sort is by name in ascending order. |
sessionId | query | string | false | Session ID to use when connecting to retrieve the list of data connectors. If not specified, a temporary session will be used. |
Detailed descriptions
limit: Maximum number of data connectors to return in this page of results. The actual number of returned data connectors might be less if the collection has been exhausted. Defaults to 10.
Example responses
A sample collection of application/vnd.sas.data.engine objects.
{
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/",
"uri": "/casManagement/servers/cas-shared-default/",
"type": "application/vnd.sas.cas.server"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/dataConnectors?sessionId&start=0&limit=100",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors?sessionId&start=0&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "collection",
"href": "/casManagement/servers/cas-shared-default/dataConnectors",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.data.engine"
}
],
"name": "dataConnectors",
"accept": "application/vnd.sas.data.engine",
"count": 15,
"items": [
{
"name": "db2",
"nickname": "DB2",
"legalName": "SAS Data Connector to DB2",
"providerId": "cas",
"dataSourceId": "cas-shared-default",
"licensed": true,
"hasDefinition": true,
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/dataConnectors",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/db2",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/db2",
"type": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "definition",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/db2/definition",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/db2/definition",
"type": "application/json"
}
],
"version": 1
},
{
"name": "default",
"nickname": "DEFAULT",
"providerId": "cas",
"dataSourceId": "cas-shared-default",
"licensed": true,
"hasDefinition": true,
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/dataConnectors",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/default",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/default",
"type": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "definition",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/default/definition",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/default/definition",
"type": "application/json"
}
],
"version": 1
},
{
"name": "dnfs",
"nickname": "DNFS",
"providerId": "cas",
"dataSourceId": "cas-shared-default",
"licensed": true,
"hasDefinition": true,
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/dataConnectors",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/dnfs",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/dnfs",
"type": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "definition",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/dnfs/definition",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/dnfs/definition",
"type": "application/json"
}
],
"version": 1
},
{
"name": "esp",
"nickname": "ESP",
"providerId": "cas",
"dataSourceId": "cas-shared-default",
"licensed": true,
"hasDefinition": true,
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/dataConnectors",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/esp",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/esp",
"type": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "definition",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/esp/definition",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/esp/definition",
"type": "application/json"
}
],
"version": 1
},
{
"name": "hadoop",
"nickname": "HADOOP",
"providerId": "cas",
"dataSourceId": "cas-shared-default",
"licensed": true,
"hasDefinition": true,
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/dataConnectors",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/hadoop",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/hadoop",
"type": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "definition",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/hadoop/definition",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/hadoop/definition",
"type": "application/json"
}
],
"version": 1
},
{
"name": "hdfs",
"nickname": "HDFS",
"providerId": "cas",
"dataSourceId": "cas-shared-default",
"licensed": true,
"hasDefinition": true,
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/dataConnectors",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/hdfs",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/hdfs",
"type": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "definition",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/hdfs/definition",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/hdfs/definition",
"type": "application/json"
}
],
"version": 1
},
{
"name": "impala",
"nickname": "IMPALA",
"legalName": "SAS Data Connect to Impala",
"providerId": "cas",
"dataSourceId": "cas-shared-default",
"licensed": true,
"hasDefinition": true,
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/dataConnectors",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/impala",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/impala",
"type": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "definition",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/impala/definition",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/impala/definition",
"type": "application/json"
}
],
"version": 1
},
{
"name": "lasr",
"nickname": "LASR",
"providerId": "cas",
"dataSourceId": "cas-shared-default",
"licensed": true,
"hasDefinition": true,
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/dataConnectors",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/lasr",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/lasr",
"type": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "definition",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/lasr/definition",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/lasr/definition",
"type": "application/json"
}
],
"version": 1
},
{
"name": "odbc",
"nickname": "ODBC",
"legalName": "SAS Data Connect to ODBC",
"providerId": "cas",
"dataSourceId": "cas-shared-default",
"licensed": true,
"hasDefinition": true,
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/dataConnectors",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/odbc",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/odbc",
"type": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "definition",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/odbc/definition",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/odbc/definition",
"type": "application/json"
}
],
"version": 1
},
{
"name": "oracle",
"nickname": "ORACLE",
"legalName": "Data Connector to Oracle",
"providerId": "cas",
"dataSourceId": "cas-shared-default",
"licensed": true,
"hasDefinition": true,
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/dataConnectors",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/oracle",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/oracle",
"type": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "definition",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/oracle/definition",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/oracle/definition",
"type": "application/json"
}
],
"version": 1
},
{
"name": "path",
"nickname": "PATH",
"providerId": "cas",
"dataSourceId": "cas-shared-default",
"licensed": true,
"hasDefinition": true,
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/dataConnectors",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/path",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/path",
"type": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "definition",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/path/definition",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/path/definition",
"type": "application/json"
}
],
"version": 1
},
{
"name": "postgres",
"nickname": "POSTGRES",
"legalName": "Data Connector to PostgreSQL",
"providerId": "cas",
"dataSourceId": "cas-shared-default",
"licensed": true,
"hasDefinition": true,
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/dataConnectors",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/postgres",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/postgres",
"type": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "definition",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/postgres/definition",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/postgres/definition",
"type": "application/json"
}
],
"version": 1
},
{
"name": "redshift",
"nickname": "REDSHIFT",
"legalName": "Data Connector to Amazon Redshift",
"providerId": "cas",
"dataSourceId": "cas-shared-default",
"licensed": true,
"hasDefinition": true,
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/dataConnectors",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/redshift",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/redshift",
"type": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "definition",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/redshift/definition",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/redshift/definition",
"type": "application/json"
}
],
"version": 1
},
{
"name": "s3",
"nickname": "S3",
"providerId": "cas",
"dataSourceId": "cas-shared-default",
"licensed": true,
"hasDefinition": true,
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/dataConnectors",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/s3",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/s3",
"type": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "definition",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/s3/definition",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/s3/definition",
"type": "application/json"
}
],
"version": 1
},
{
"name": "teradata",
"nickname": "TERADATA",
"legalName": "SAS Data Connect to Teradata",
"providerId": "cas",
"dataSourceId": "cas-shared-default",
"licensed": true,
"hasDefinition": true,
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/dataConnectors",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/teradata",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/teradata",
"type": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "definition",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/teradata/definition",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/teradata/definition",
"type": "application/json"
}
],
"version": 1
}
],
"limit": 100,
"version": 2
}
{
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/",
"uri": "/casManagement/servers/cas-shared-default/",
"type": "application/vnd.sas.cas.server"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/dataConnectors?sessionId&start=0&limit=100",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors?sessionId&start=0&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "collection",
"href": "/casManagement/servers/cas-shared-default/dataConnectors",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.data.engine"
}
],
"name": "dataConnectors",
"accept": "application/vnd.sas.data.engine",
"count": 15,
"items": [
{
"name": "db2",
"nickname": "DB2",
"legalName": "SAS Data Connector to DB2",
"providerId": "cas",
"dataSourceId": "cas-shared-default",
"licensed": true,
"hasDefinition": true,
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/dataConnectors",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/db2",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/db2",
"type": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "definition",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/db2/definition",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/db2/definition",
"type": "application/json"
}
],
"version": 1
},
{
"name": "default",
"nickname": "DEFAULT",
"providerId": "cas",
"dataSourceId": "cas-shared-default",
"licensed": true,
"hasDefinition": true,
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/dataConnectors",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/default",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/default",
"type": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "definition",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/default/definition",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/default/definition",
"type": "application/json"
}
],
"version": 1
},
{
"name": "dnfs",
"nickname": "DNFS",
"providerId": "cas",
"dataSourceId": "cas-shared-default",
"licensed": true,
"hasDefinition": true,
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/dataConnectors",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/dnfs",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/dnfs",
"type": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "definition",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/dnfs/definition",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/dnfs/definition",
"type": "application/json"
}
],
"version": 1
},
{
"name": "esp",
"nickname": "ESP",
"providerId": "cas",
"dataSourceId": "cas-shared-default",
"licensed": true,
"hasDefinition": true,
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/dataConnectors",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/esp",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/esp",
"type": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "definition",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/esp/definition",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/esp/definition",
"type": "application/json"
}
],
"version": 1
},
{
"name": "hadoop",
"nickname": "HADOOP",
"providerId": "cas",
"dataSourceId": "cas-shared-default",
"licensed": true,
"hasDefinition": true,
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/dataConnectors",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/hadoop",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/hadoop",
"type": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "definition",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/hadoop/definition",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/hadoop/definition",
"type": "application/json"
}
],
"version": 1
},
{
"name": "hdfs",
"nickname": "HDFS",
"providerId": "cas",
"dataSourceId": "cas-shared-default",
"licensed": true,
"hasDefinition": true,
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/dataConnectors",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/hdfs",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/hdfs",
"type": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "definition",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/hdfs/definition",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/hdfs/definition",
"type": "application/json"
}
],
"version": 1
},
{
"name": "impala",
"nickname": "IMPALA",
"legalName": "SAS Data Connect to Impala",
"providerId": "cas",
"dataSourceId": "cas-shared-default",
"licensed": true,
"hasDefinition": true,
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/dataConnectors",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/impala",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/impala",
"type": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "definition",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/impala/definition",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/impala/definition",
"type": "application/json"
}
],
"version": 1
},
{
"name": "lasr",
"nickname": "LASR",
"providerId": "cas",
"dataSourceId": "cas-shared-default",
"licensed": true,
"hasDefinition": true,
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/dataConnectors",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/lasr",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/lasr",
"type": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "definition",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/lasr/definition",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/lasr/definition",
"type": "application/json"
}
],
"version": 1
},
{
"name": "odbc",
"nickname": "ODBC",
"legalName": "SAS Data Connect to ODBC",
"providerId": "cas",
"dataSourceId": "cas-shared-default",
"licensed": true,
"hasDefinition": true,
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/dataConnectors",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/odbc",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/odbc",
"type": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "definition",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/odbc/definition",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/odbc/definition",
"type": "application/json"
}
],
"version": 1
},
{
"name": "oracle",
"nickname": "ORACLE",
"legalName": "Data Connector to Oracle",
"providerId": "cas",
"dataSourceId": "cas-shared-default",
"licensed": true,
"hasDefinition": true,
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/dataConnectors",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/oracle",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/oracle",
"type": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "definition",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/oracle/definition",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/oracle/definition",
"type": "application/json"
}
],
"version": 1
},
{
"name": "path",
"nickname": "PATH",
"providerId": "cas",
"dataSourceId": "cas-shared-default",
"licensed": true,
"hasDefinition": true,
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/dataConnectors",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/path",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/path",
"type": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "definition",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/path/definition",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/path/definition",
"type": "application/json"
}
],
"version": 1
},
{
"name": "postgres",
"nickname": "POSTGRES",
"legalName": "Data Connector to PostgreSQL",
"providerId": "cas",
"dataSourceId": "cas-shared-default",
"licensed": true,
"hasDefinition": true,
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/dataConnectors",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/postgres",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/postgres",
"type": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "definition",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/postgres/definition",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/postgres/definition",
"type": "application/json"
}
],
"version": 1
},
{
"name": "redshift",
"nickname": "REDSHIFT",
"legalName": "Data Connector to Amazon Redshift",
"providerId": "cas",
"dataSourceId": "cas-shared-default",
"licensed": true,
"hasDefinition": true,
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/dataConnectors",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/redshift",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/redshift",
"type": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "definition",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/redshift/definition",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/redshift/definition",
"type": "application/json"
}
],
"version": 1
},
{
"name": "s3",
"nickname": "S3",
"providerId": "cas",
"dataSourceId": "cas-shared-default",
"licensed": true,
"hasDefinition": true,
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/dataConnectors",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/s3",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/s3",
"type": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "definition",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/s3/definition",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/s3/definition",
"type": "application/json"
}
],
"version": 1
},
{
"name": "teradata",
"nickname": "TERADATA",
"legalName": "SAS Data Connect to Teradata",
"providerId": "cas",
"dataSourceId": "cas-shared-default",
"licensed": true,
"hasDefinition": true,
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/dataConnectors",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/teradata",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/teradata",
"type": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "definition",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/teradata/definition",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/teradata/definition",
"type": "application/json"
}
],
"version": 1
}
],
"limit": 100,
"version": 2
}
400 Response
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | engineCollection |
400 | Bad Request | The request was invalid. An invalid filter or combination of request parameters was provided. | Inline |
404 | Not Found | No data connector exists at the requested path. | Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Get a single data connector
Code samples
# You can also use wget
curl -X GET https://example.com/casManagement/servers/{serverName}/dataConnectors/{dataConnectorName} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.data.engine+json'
const headers = {
'Accept':'application/vnd.sas.data.engine+json'
};
fetch('https://example.com/casManagement/servers/{serverName}/dataConnectors/{dataConnectorName}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.data.engine+json'
}
r = requests.get('https://example.com/casManagement/servers/{serverName}/dataConnectors/{dataConnectorName}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.data.engine+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/casManagement/servers/{serverName}/dataConnectors/{dataConnectorName}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /servers/{serverName}/dataConnectors/{dataConnectorName}
Returns information about a single data connector based on its unique name.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | The CAS server name for which to get the data connector. |
dataConnectorName | path | string | true | The unique name of this data connector within this CAS server. |
sessionId | query | string | false | Session ID to use when connecting to retrieve the data connector. If not specified, a temporary session is used. |
Example responses
A sample application/vnd.sas.data.engine object.
{
"name": "db2",
"nickname": "DB2",
"legalName": "SAS Data Connector to DB2",
"providerId": "cas",
"dataSourceId": "cas-shared-default",
"licensed": true,
"hasDefinition": true,
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/dataConnectors",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/db2",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/db2",
"type": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "definition",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/db2/definition",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/db2/definition",
"type": "application/json"
}
],
"version": 1
}
{
"name": "db2",
"nickname": "DB2",
"legalName": "SAS Data Connector to DB2",
"providerId": "cas",
"dataSourceId": "cas-shared-default",
"licensed": true,
"hasDefinition": true,
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/dataConnectors",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/db2",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/db2",
"type": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "definition",
"href": "/casManagement/servers/cas-shared-default/dataConnectors/db2/definition",
"uri": "/casManagement/servers/cas-shared-default/dataConnectors/db2/definition",
"type": "application/json"
}
],
"version": 1
}
404 Response
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | engine |
404 | Not Found | No CAS server or data connector exists at the requested path. | Inline |
Response Schema
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Check data connector availability
Code samples
# You can also use wget
curl -X HEAD https://example.com/casManagement/servers/{serverName}/dataConnectors/{dataConnectorName} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.data.engine+json'
const headers = {
'Accept':'application/vnd.sas.data.engine+json'
};
fetch('https://example.com/casManagement/servers/{serverName}/dataConnectors/{dataConnectorName}',
{
method: 'HEAD',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.data.engine+json'
}
r = requests.head('https://example.com/casManagement/servers/{serverName}/dataConnectors/{dataConnectorName}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.data.engine+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/casManagement/servers/{serverName}/dataConnectors/{dataConnectorName}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /servers/{serverName}/dataConnectors/{dataConnectorName}
Returns the headers that the corresponding GET returns. Clients use this to determine whether the data connector exists.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | The CAS server name for which to get the data connector. |
dataConnectorName | path | string | true | The unique name of this data connector within this CAS server. |
sessionId | query | string | false | Session ID to use when connecting to retrieve the data connector. If not specified, a temporary session is used. |
Example responses
200 Response
"Empty Response"
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | emptyResponse |
404 | Not Found | No CAS server of data connector exists at the requested path. | None |
Get data connector definition
Code samples
# You can also use wget
curl -X GET https://example.com/casManagement/servers/{serverName}/dataConnectors/{dataConnectorName}/definition \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/schema+json'
const headers = {
'Accept':'application/schema+json'
};
fetch('https://example.com/casManagement/servers/{serverName}/dataConnectors/{dataConnectorName}/definition',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/schema+json'
}
r = requests.get('https://example.com/casManagement/servers/{serverName}/dataConnectors/{dataConnectorName}/definition', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/schema+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/casManagement/servers/{serverName}/dataConnectors/{dataConnectorName}/definition", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /servers/{serverName}/dataConnectors/{dataConnectorName}/definition
Returns the definition of the data connector as application or schema+json. This definition includes all available data connector options.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | The CAS server name for which to get the data connector. |
dataConnectorName | path | string | true | The unique name of this data connector within this CAS server. |
sessionId | query | string | false | Session ID to use when connecting to retrieve the data connector. If not specified, a temporary session is used. |
Example responses
A sample definition of an engine.
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "DNFS",
"description": "dnfs",
"type": "object",
"additionalProperties": false,
"required": [
"engineName"
],
"properties": {
"engineName": {
"title": "DNFS",
"type": "string",
"default": "DNFS",
"enum": [
"DNFS"
]
},
"general": {
"title": "General options",
"description": "General options for this Caslib.",
"type": "object",
"additionalProperties": false,
"properties": {
"path": {
"type": "string",
"title": "Path",
"description": "specifies data source-specific information. For PATH, DNFS and HDFS, this is a file system path.",
"default": "",
"properties": {
"isUserName": {
"enum": [
false
]
},
"isPassword": {
"enum": [
false
]
},
"isPath": {
"enum": [
false
]
},
"isHideValue": {
"enum": [
false
]
},
"isRequired": {
"enum": [
false
]
},
"isCommon": {
"enum": [
true
]
},
"toolTip": {
"enum": [
"Specifies data source-specific information. For PATH, DNFS and HDFS, this is a file system path."
]
}
}
},
"hidden": {
"type": "boolean",
"title": "Hidden",
"description": "when set to True, the Caslib is added as a hidden Caslib.",
"default": false,
"properties": {
"isHideValue": {
"enum": [
false
]
},
"isRequired": {
"enum": [
false
]
},
"isCommon": {
"enum": [
true
]
},
"toolTip": {
"enum": [
"When set to True, the Caslib is added as a hidden Caslib."
]
}
}
},
"transient": {
"type": "boolean",
"title": "Transient",
"description": "when set to True, the Caslib is added as a transient Caslib.",
"default": false,
"properties": {
"isHideValue": {
"enum": [
false
]
},
"isRequired": {
"enum": [
false
]
},
"isCommon": {
"enum": [
true
]
},
"toolTip": {
"enum": [
"When set to True, the Caslib is added as a transient Caslib."
]
}
}
},
"session": {
"type": "boolean",
"title": "Session scope",
"description": "when set to True, the Caslib is scoped to the current session only. Tables that you load in this session cannot be accessed from other sessions. If you specify False, then the Caslib is visible to other sessions, subject to access controls.",
"default": true,
"properties": {
"isHideValue": {
"enum": [
false
]
},
"isRequired": {
"enum": [
false
]
},
"isCommon": {
"enum": [
true
]
},
"toolTip": {
"enum": [
"When set to True, the Caslib is scoped to the current session only. Tables that you load in this session cannot be accessed from other sessions. If you specify False, then the Caslib is visible to other sessions, subject to access controls."
]
}
}
},
"name": {
"type": "string",
"title": "Caslib",
"description": "specifies the name of the Caslib to add.",
"properties": {
"isUserName": {
"enum": [
false
]
},
"isPassword": {
"enum": [
false
]
},
"isPath": {
"enum": [
false
]
},
"isHideValue": {
"enum": [
false
]
},
"isRequired": {
"enum": [
true
]
},
"isCommon": {
"enum": [
true
]
},
"toolTip": {
"enum": [
"Specifies the name of the Caslib to add."
]
}
}
},
"description": {
"type": "string",
"title": "Description",
"description": "specifies a description of the Caslib.",
"default": "",
"properties": {
"isUserName": {
"enum": [
false
]
},
"isPassword": {
"enum": [
false
]
},
"isPath": {
"enum": [
false
]
},
"isHideValue": {
"enum": [
false
]
},
"isRequired": {
"enum": [
false
]
},
"isCommon": {
"enum": [
true
]
},
"toolTip": {
"enum": [
"Specifies a description of the Caslib."
]
}
}
},
"createDirectory": {
"type": "boolean",
"title": "Create directory",
"description": "when set to True, the server attempts to create the directory for the Caslib.",
"default": false,
"properties": {
"isHideValue": {
"enum": [
false
]
},
"isRequired": {
"enum": [
false
]
},
"isCommon": {
"enum": [
true
]
},
"toolTip": {
"enum": [
"When set to True, the server attempts to create the directory for the Caslib."
]
}
}
},
"permission": {
"type": "string",
"title": "Permission",
"description": "specifies the host access controls on the Caslib when directory creation is requested.",
"enum": [
"GroupRead",
"GroupWrite",
"GroupWritePublicRead",
"Private",
"PublicRead",
"PublicWrite"
],
"properties": {
"isUserName": {
"enum": [
false
]
},
"isPassword": {
"enum": [
false
]
},
"isPath": {
"enum": [
false
]
},
"isHideValue": {
"enum": [
false
]
},
"isRequired": {
"enum": [
false
]
},
"isCommon": {
"enum": [
true
]
},
"toolTip": {
"enum": [
"Specifies the host access controls on the Caslib when directory creation is requested."
]
}
}
},
"subDirectories": {
"type": "boolean",
"title": "Subdirectories",
"description": "when set to True, tables and files in subdirectories of the path specified in the Caslib definition are accessible from the Caslib.",
"default": false,
"properties": {
"isHideValue": {
"enum": [
false
]
},
"isRequired": {
"enum": [
false
]
},
"isCommon": {
"enum": [
true
]
},
"toolTip": {
"enum": [
"When set to True, tables and files in subdirectories of the path specified in the Caslib definition are accessible from the Caslib."
]
}
}
},
"activeOnAdd": {
"type": "boolean",
"title": "Active on add",
"description": "when set to True, the new Caslib becomes the active Caslib.",
"default": true,
"properties": {
"isHideValue": {
"enum": [
false
]
},
"isRequired": {
"enum": [
false
]
},
"isCommon": {
"enum": [
true
]
},
"toolTip": {
"enum": [
"When set to True, the new Caslib becomes the active Caslib."
]
}
}
}
}
},
"datasource": {
"title": "Data source options",
"description": "Data source options for this Caslib.",
"type": "object",
"additionalProperties": false,
"properties": {
"srcType": {
"type": "string",
"title": "srcType",
"description": "",
"enum": [
"dnfs"
],
"properties": {
"isUserName": {
"enum": [
false
]
},
"isPassword": {
"enum": [
false
]
},
"isPath": {
"enum": [
false
]
},
"isHideValue": {
"enum": [
false
]
},
"isRequired": {
"enum": [
true
]
},
"isCommon": {
"enum": [
false
]
},
"toolTip": {
"enum": [
""
]
}
}
},
"encryptionPassword": {
"type": "string",
"title": "Data encryption password",
"description": "specifies a password for encrypting or decrypting stored data.",
"properties": {
"isUserName": {
"enum": [
false
]
},
"isPassword": {
"enum": [
true
]
},
"isPath": {
"enum": [
false
]
},
"isHideValue": {
"enum": [
true
]
},
"isRequired": {
"enum": [
false
]
},
"isCommon": {
"enum": [
false
]
},
"toolTip": {
"enum": [
"Specifies a password for encrypting or decrypting stored data."
]
}
}
},
"encryptionDomain": {
"type": "string",
"title": "Encryption domain",
"description": "specifies the name for a collection of data that is stored with a common encryption password.",
"properties": {
"isUserName": {
"enum": [
false
]
},
"isPassword": {
"enum": [
false
]
},
"isPath": {
"enum": [
false
]
},
"isHideValue": {
"enum": [
false
]
},
"isRequired": {
"enum": [
false
]
},
"isCommon": {
"enum": [
false
]
},
"toolTip": {
"enum": [
"Specifies the name for a collection of data that is stored with a common encryption password."
]
}
}
}
}
}
}
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "DNFS",
"description": "dnfs",
"type": "object",
"additionalProperties": false,
"required": [
"engineName"
],
"properties": {
"engineName": {
"title": "DNFS",
"type": "string",
"default": "DNFS",
"enum": [
"DNFS"
]
},
"general": {
"title": "General options",
"description": "General options for this Caslib.",
"type": "object",
"additionalProperties": false,
"properties": {
"path": {
"type": "string",
"title": "Path",
"description": "specifies data source-specific information. For PATH, DNFS and HDFS, this is a file system path.",
"default": "",
"properties": {
"isUserName": {
"enum": [
false
]
},
"isPassword": {
"enum": [
false
]
},
"isPath": {
"enum": [
false
]
},
"isHideValue": {
"enum": [
false
]
},
"isRequired": {
"enum": [
false
]
},
"isCommon": {
"enum": [
true
]
},
"toolTip": {
"enum": [
"Specifies data source-specific information. For PATH, DNFS and HDFS, this is a file system path."
]
}
}
},
"hidden": {
"type": "boolean",
"title": "Hidden",
"description": "when set to True, the Caslib is added as a hidden Caslib.",
"default": false,
"properties": {
"isHideValue": {
"enum": [
false
]
},
"isRequired": {
"enum": [
false
]
},
"isCommon": {
"enum": [
true
]
},
"toolTip": {
"enum": [
"When set to True, the Caslib is added as a hidden Caslib."
]
}
}
},
"transient": {
"type": "boolean",
"title": "Transient",
"description": "when set to True, the Caslib is added as a transient Caslib.",
"default": false,
"properties": {
"isHideValue": {
"enum": [
false
]
},
"isRequired": {
"enum": [
false
]
},
"isCommon": {
"enum": [
true
]
},
"toolTip": {
"enum": [
"When set to True, the Caslib is added as a transient Caslib."
]
}
}
},
"session": {
"type": "boolean",
"title": "Session scope",
"description": "when set to True, the Caslib is scoped to the current session only. Tables that you load in this session cannot be accessed from other sessions. If you specify False, then the Caslib is visible to other sessions, subject to access controls.",
"default": true,
"properties": {
"isHideValue": {
"enum": [
false
]
},
"isRequired": {
"enum": [
false
]
},
"isCommon": {
"enum": [
true
]
},
"toolTip": {
"enum": [
"When set to True, the Caslib is scoped to the current session only. Tables that you load in this session cannot be accessed from other sessions. If you specify False, then the Caslib is visible to other sessions, subject to access controls."
]
}
}
},
"name": {
"type": "string",
"title": "Caslib",
"description": "specifies the name of the Caslib to add.",
"properties": {
"isUserName": {
"enum": [
false
]
},
"isPassword": {
"enum": [
false
]
},
"isPath": {
"enum": [
false
]
},
"isHideValue": {
"enum": [
false
]
},
"isRequired": {
"enum": [
true
]
},
"isCommon": {
"enum": [
true
]
},
"toolTip": {
"enum": [
"Specifies the name of the Caslib to add."
]
}
}
},
"description": {
"type": "string",
"title": "Description",
"description": "specifies a description of the Caslib.",
"default": "",
"properties": {
"isUserName": {
"enum": [
false
]
},
"isPassword": {
"enum": [
false
]
},
"isPath": {
"enum": [
false
]
},
"isHideValue": {
"enum": [
false
]
},
"isRequired": {
"enum": [
false
]
},
"isCommon": {
"enum": [
true
]
},
"toolTip": {
"enum": [
"Specifies a description of the Caslib."
]
}
}
},
"createDirectory": {
"type": "boolean",
"title": "Create directory",
"description": "when set to True, the server attempts to create the directory for the Caslib.",
"default": false,
"properties": {
"isHideValue": {
"enum": [
false
]
},
"isRequired": {
"enum": [
false
]
},
"isCommon": {
"enum": [
true
]
},
"toolTip": {
"enum": [
"When set to True, the server attempts to create the directory for the Caslib."
]
}
}
},
"permission": {
"type": "string",
"title": "Permission",
"description": "specifies the host access controls on the Caslib when directory creation is requested.",
"enum": [
"GroupRead",
"GroupWrite",
"GroupWritePublicRead",
"Private",
"PublicRead",
"PublicWrite"
],
"properties": {
"isUserName": {
"enum": [
false
]
},
"isPassword": {
"enum": [
false
]
},
"isPath": {
"enum": [
false
]
},
"isHideValue": {
"enum": [
false
]
},
"isRequired": {
"enum": [
false
]
},
"isCommon": {
"enum": [
true
]
},
"toolTip": {
"enum": [
"Specifies the host access controls on the Caslib when directory creation is requested."
]
}
}
},
"subDirectories": {
"type": "boolean",
"title": "Subdirectories",
"description": "when set to True, tables and files in subdirectories of the path specified in the Caslib definition are accessible from the Caslib.",
"default": false,
"properties": {
"isHideValue": {
"enum": [
false
]
},
"isRequired": {
"enum": [
false
]
},
"isCommon": {
"enum": [
true
]
},
"toolTip": {
"enum": [
"When set to True, tables and files in subdirectories of the path specified in the Caslib definition are accessible from the Caslib."
]
}
}
},
"activeOnAdd": {
"type": "boolean",
"title": "Active on add",
"description": "when set to True, the new Caslib becomes the active Caslib.",
"default": true,
"properties": {
"isHideValue": {
"enum": [
false
]
},
"isRequired": {
"enum": [
false
]
},
"isCommon": {
"enum": [
true
]
},
"toolTip": {
"enum": [
"When set to True, the new Caslib becomes the active Caslib."
]
}
}
}
}
},
"datasource": {
"title": "Data source options",
"description": "Data source options for this Caslib.",
"type": "object",
"additionalProperties": false,
"properties": {
"srcType": {
"type": "string",
"title": "srcType",
"description": "",
"enum": [
"dnfs"
],
"properties": {
"isUserName": {
"enum": [
false
]
},
"isPassword": {
"enum": [
false
]
},
"isPath": {
"enum": [
false
]
},
"isHideValue": {
"enum": [
false
]
},
"isRequired": {
"enum": [
true
]
},
"isCommon": {
"enum": [
false
]
},
"toolTip": {
"enum": [
""
]
}
}
},
"encryptionPassword": {
"type": "string",
"title": "Data encryption password",
"description": "specifies a password for encrypting or decrypting stored data.",
"properties": {
"isUserName": {
"enum": [
false
]
},
"isPassword": {
"enum": [
true
]
},
"isPath": {
"enum": [
false
]
},
"isHideValue": {
"enum": [
true
]
},
"isRequired": {
"enum": [
false
]
},
"isCommon": {
"enum": [
false
]
},
"toolTip": {
"enum": [
"Specifies a password for encrypting or decrypting stored data."
]
}
}
},
"encryptionDomain": {
"type": "string",
"title": "Encryption domain",
"description": "specifies the name for a collection of data that is stored with a common encryption password.",
"properties": {
"isUserName": {
"enum": [
false
]
},
"isPassword": {
"enum": [
false
]
},
"isPath": {
"enum": [
false
]
},
"isHideValue": {
"enum": [
false
]
},
"isRequired": {
"enum": [
false
]
},
"isCommon": {
"enum": [
false
]
},
"toolTip": {
"enum": [
"Specifies the name for a collection of data that is stored with a common encryption password."
]
}
}
}
}
}
}
}
404 Response
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | engineDefinition |
404 | Not Found | No CAS server or data connector exists at the requested path. | Inline |
Response Schema
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Check data source definition availability
Code samples
# You can also use wget
curl -X HEAD https://example.com/casManagement/servers/{serverName}/dataConnectors/{dataConnectorName}/definition \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/schema+json'
const headers = {
'Accept':'application/schema+json'
};
fetch('https://example.com/casManagement/servers/{serverName}/dataConnectors/{dataConnectorName}/definition',
{
method: 'HEAD',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/schema+json'
}
r = requests.head('https://example.com/casManagement/servers/{serverName}/dataConnectors/{dataConnectorName}/definition', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/schema+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/casManagement/servers/{serverName}/dataConnectors/{dataConnectorName}/definition", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /servers/{serverName}/dataConnectors/{dataConnectorName}/definition
Returns the headers that the corresponding GET returns. Clients might use this to determine whether the data source definition exists.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | The CAS server name for which to get the data connector. |
dataConnectorName | path | string | true | The unique name of this data connector within this CAS server. |
sessionId | query | string | false | Session ID to use when connecting to retrieve the data connector. If not specified, a temporary session is used. |
Example responses
200 Response
"Empty Response"
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | emptyResponse |
404 | Not Found | No CAS server or data source definition exists at the requested path. | None |
Sessions
Contains operations to create and manage CAS server sessions.
Get a list of sessions
Code samples
# You can also use wget
curl -X GET https://example.com/casManagement/servers/{serverName}/sessions \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('https://example.com/casManagement/servers/{serverName}/sessions',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.get('https://example.com/casManagement/servers/{serverName}/sessions', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.collection+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/casManagement/servers/{serverName}/sessions", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /servers/{serverName}/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.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | Server name for which sessions are being requested. |
start | query | integer | false | The starting index of the first item in a page. Defaults to 0. |
limit | query | 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. |
filter | query | 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:
|
sortBy | query | string(sort-criteria) | false | Sort returned items. The sort criteria supports the first-level fields in each item. Some sample sorts:
|
excludeItemLinks | query | boolean | false | Determines whether item links are excluded from results. Defaults to false. |
sessionId | query | string | false | Session ID to use when connecting to retrieve the list of sessions. If not specified, a temporary session will be used. |
Example responses
A sample collection of application/vnd.sas.cas.session.summary objects.
{
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/",
"uri": "/casManagement/servers/cas-shared-default/",
"type": "application/vnd.sas.cas.server"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/sessions?excludeItemLinks=false&start=0&limit=10",
"uri": "/casManagement/servers/cas-shared-default/sessions?excludeItemLinks=false&start=0&limit=10",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.session.summary"
},
{
"method": "GET",
"rel": "collection",
"href": "/casManagement/servers/cas-shared-default/sessions",
"uri": "/casManagement/servers/cas-shared-default/sessions",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.session.summary"
}
],
"name": "sessions",
"accept": "application/vnd.sas.cas.session.summary",
"start": 0,
"count": 1,
"items": [
{
"version": 2,
"id": "3ecd299f-042a-c849-b354-d2961eca5a03",
"name": "SAS Environment Manager:Tue Sep 19 18:41:55 2017",
"state": "Connected",
"authenticationType": "OAuth",
"owner": "userId",
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/sessions",
"uri": "/casManagement/servers/cas-shared-default/sessions",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.session.summary"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/sessions/3ecd299f-042a-c849-b354-d2961eca5a03",
"uri": "/casManagement/servers/cas-shared-default/sessions/3ecd299f-042a-c849-b354-d2961eca5a03",
"type": "application/vnd.sas.cas.session.summary"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/casManagement/servers/cas-shared-default/sessions/3ecd299f-042a-c849-b354-d2961eca5a03",
"uri": "/casManagement/servers/cas-shared-default/sessions/3ecd299f-042a-c849-b354-d2961eca5a03"
}
]
}
],
"limit": 10,
"version": 2
}
{
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/",
"uri": "/casManagement/servers/cas-shared-default/",
"type": "application/vnd.sas.cas.server"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/sessions?excludeItemLinks=false&start=0&limit=10",
"uri": "/casManagement/servers/cas-shared-default/sessions?excludeItemLinks=false&start=0&limit=10",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.session.summary"
},
{
"method": "GET",
"rel": "collection",
"href": "/casManagement/servers/cas-shared-default/sessions",
"uri": "/casManagement/servers/cas-shared-default/sessions",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.session.summary"
}
],
"name": "sessions",
"accept": "application/vnd.sas.cas.session.summary",
"start": 0,
"count": 1,
"items": [
{
"version": 2,
"id": "3ecd299f-042a-c849-b354-d2961eca5a03",
"name": "SAS Environment Manager:Tue Sep 19 18:41:55 2017",
"state": "Connected",
"authenticationType": "OAuth",
"owner": "userId",
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/sessions",
"uri": "/casManagement/servers/cas-shared-default/sessions",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.session.summary"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/sessions/3ecd299f-042a-c849-b354-d2961eca5a03",
"uri": "/casManagement/servers/cas-shared-default/sessions/3ecd299f-042a-c849-b354-d2961eca5a03",
"type": "application/vnd.sas.cas.session.summary"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/casManagement/servers/cas-shared-default/sessions/3ecd299f-042a-c849-b354-d2961eca5a03",
"uri": "/casManagement/servers/cas-shared-default/sessions/3ecd299f-042a-c849-b354-d2961eca5a03"
}
]
}
],
"limit": 10,
"version": 2
}
400 Response
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The list of sessions for the requested CAS server was returned. | casSessionCollection |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | The requested CAS server does not exist. | None |
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. | None |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Create a session
Code samples
# You can also use wget
curl -X POST https://example.com/casManagement/servers/{serverName}/sessions \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.cas.session+json' \
-H 'Accept: application/vnd.sas.cas.session+json'
const inputBody = '{
"authenticationType": "string",
"id": "string",
"locale": "string",
"name": "string",
"nodeCount": 0,
"owner": "string",
"state": "string",
"timeOut": 0
}';
const headers = {
'Content-Type':'application/vnd.sas.cas.session+json',
'Accept':'application/vnd.sas.cas.session+json'
};
fetch('https://example.com/casManagement/servers/{serverName}/sessions',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.cas.session+json',
'Accept': 'application/vnd.sas.cas.session+json'
}
r = requests.post('https://example.com/casManagement/servers/{serverName}/sessions', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.cas.session+json"},
"Accept": []string{"application/vnd.sas.cas.session+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/casManagement/servers/{serverName}/sessions", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /servers/{serverName}/sessions
Creates a new session and returns session information.
Body parameter
{
"authenticationType": "string",
"id": "string",
"locale": "string",
"name": "string",
"nodeCount": 0,
"owner": "string",
"state": "string",
"timeOut": 0
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | Server name in which the session is to be created. |
body | body | casSession | false | none |
Example responses
201 Response
{
"authenticationType": "string",
"id": "string",
"locale": "string",
"name": "string",
"nodeCount": 0,
"owner": "string",
"state": "string",
"timeOut": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Information about the created session was returned. | casSession |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | The requested CAS server does not exist. | None |
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. | None |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
End a session
Code samples
# You can also use wget
curl -X DELETE https://example.com/casManagement/servers/{serverName}/sessions/{sessionId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: */*'
const headers = {
'Accept':'*/*'
};
fetch('https://example.com/casManagement/servers/{serverName}/sessions/{sessionId}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': '*/*'
}
r = requests.delete('https://example.com/casManagement/servers/{serverName}/sessions/{sessionId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"*/*"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "https://example.com/casManagement/servers/{serverName}/sessions/{sessionId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /servers/{serverName}/sessions/{sessionId}
Terminates a session. Sessions that can be terminated are consistent with the permissions of the user. Normally, only sessions owned by the authenticated user can be ended. 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 can be ended.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | Server name containing the session. |
sessionId | path | string | true | Session ID on which to perform the operation. |
superUserSessionId | query | string | false | Session ID being used to delete the specified sessionId with. Has to be a superuser. |
force | query | string | false | Forces the termination of a running CAS action for this session. By default, a session does not terminate until all actions have completed. |
Example responses
400 Response
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | The session was terminated. | None |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | The requested session in the requested server name does not exist. | None |
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. | None |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Get a session
Code samples
# You can also use wget
curl -X GET https://example.com/casManagement/servers/{serverName}/sessions/{sessionId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.cas.session.summary+json'
const headers = {
'Accept':'application/vnd.sas.cas.session.summary+json'
};
fetch('https://example.com/casManagement/servers/{serverName}/sessions/{sessionId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.cas.session.summary+json'
}
r = requests.get('https://example.com/casManagement/servers/{serverName}/sessions/{sessionId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.cas.session.summary+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/casManagement/servers/{serverName}/sessions/{sessionId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /servers/{serverName}/sessions/{sessionId}
Retrieves a single session for a CAS server.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | Server name containing the session being requested. |
sessionId | path | string | true | Session ID being requested. |
superUserSessionId | query | string | false | Session ID being used to view specified sessionId with. Has to be a superuser. |
Example responses
A sample CAS Session summary object.
{
"id": "C691A4B0-b8f6-3e44-b35b-4411de0307da",
"links": [
{
"href": "/casManagement/servers/casServer/sessions",
"itemType": "application/vnd.sas.cas.session.summary",
"method": "GET",
"rel": "up",
"type": "application/vnd.sas.collection",
"uri": "/casManagement/servers/casServer/sessions"
},
{
"href": "/casManagement/servers/casServer/sessions/c691a4b0-b8f6-3e44-b35b-4411de0307da",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.cas.session.summary",
"uri": "/casManagement/servers/casServer/sessions/c691a4b0-b8f6-3e44-b35b-4411de0307da"
},
{
"href": "/casManagement/servers/casServer/sessions/c691a4b0-b8f6-3e44-b35b-4411de0307da",
"method": "DELETE",
"rel": "delete",
"uri": "/cas"
},
{
"href": "/casManagement/servers/casServer/sessions/c691a4b0-b8f6-3e44-b35b-4411de0307da",
"method": "POST",
"rel": "startPermissionsTransaction",
"type": "text/plain",
"uri": "/casManagement/servers/cas/sessions/fdb94838-56a2-254e-a5e6-93c46f31c944?action=start"
}
],
"name": "Session:Mon Mar 28 21:57:43 2016",
"owner": "user",
"state": "Connected",
"transactionState": "none",
"authenticationType": "Active Directory",
"version": 2
}
{
"id": "C691A4B0-b8f6-3e44-b35b-4411de0307da",
"links": [
{
"href": "/casManagement/servers/casServer/sessions",
"itemType": "application/vnd.sas.cas.session.summary",
"method": "GET",
"rel": "up",
"type": "application/vnd.sas.collection",
"uri": "/casManagement/servers/casServer/sessions"
},
{
"href": "/casManagement/servers/casServer/sessions/c691a4b0-b8f6-3e44-b35b-4411de0307da",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.cas.session.summary",
"uri": "/casManagement/servers/casServer/sessions/c691a4b0-b8f6-3e44-b35b-4411de0307da"
},
{
"href": "/casManagement/servers/casServer/sessions/c691a4b0-b8f6-3e44-b35b-4411de0307da",
"method": "DELETE",
"rel": "delete",
"uri": "/cas"
},
{
"href": "/casManagement/servers/casServer/sessions/c691a4b0-b8f6-3e44-b35b-4411de0307da",
"method": "POST",
"rel": "startPermissionsTransaction",
"type": "text/plain",
"uri": "/casManagement/servers/cas/sessions/fdb94838-56a2-254e-a5e6-93c46f31c944?action=start"
}
],
"name": "Session:Mon Mar 28 21:57:43 2016",
"owner": "user",
"state": "Connected",
"transactionState": "none",
"authenticationType": "Active Directory",
"version": 2
}
400 Response
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Information about the requested session was returned. | casSessionSummary |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | The requested session in the requested server name does not exist. | None |
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. | None |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Set the transaction state of a CAS session
Code samples
# You can also use wget
curl -X POST https://example.com/casManagement/servers/{serverName}/sessions/{sessionId}?action=string \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: text/plain'
const headers = {
'Accept':'text/plain'
};
fetch('https://example.com/casManagement/servers/{serverName}/sessions/{sessionId}?action=string',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'text/plain'
}
r = requests.post('https://example.com/casManagement/servers/{serverName}/sessions/{sessionId}', params={
'action': 'string'
}, headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"text/plain"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/casManagement/servers/{serverName}/sessions/{sessionId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /servers/{serverName}/sessions/{sessionId}
Sets the state of the session's transaction (valid values are start, commit, or cancel). Typical workflow would be to use this endpoint to start a transaction on the session. Next, use casAccessManagement lock transactions to lock the necessary objects. Then, modify permissions on those objects. Finally, commit or cancel the changes using this endpoint again.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | The ID of the CAS server the user wishes to check the session state on. |
sessionId | path | string | true | The session ID of the CAS session that is being checked. |
action | query | string | true | Action to take regarding transaction. Valid values are start, commit, and cancel. |
Example responses
400 Response
{"message":"string","id":"string","errorCode":0,"httpStatusCode":0,"details":["string"],"remediation":"string","errors":[null],"links":[{"method":"string","rel":"string","uri":"string","href":"string","title":"string","type":"string","itemType":"string","responseType":"string","responseItemType":"string"}],"version":0}
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The requested session's transaction state was returned. Valid values include started or none. | None |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | The requested CAS server does not exist. | None |
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. | None |
500 | Internal Server Error | The request could not be fulfilled because of an unexpected server error. | None |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Get the state of a CAS session
Code samples
# You can also use wget
curl -X GET https://example.com/casManagement/servers/{serverName}/sessions/{sessionId}/state \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: text/plain'
const headers = {
'Accept':'text/plain'
};
fetch('https://example.com/casManagement/servers/{serverName}/sessions/{sessionId}/state',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'text/plain'
}
r = requests.get('https://example.com/casManagement/servers/{serverName}/sessions/{sessionId}/state', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"text/plain"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/casManagement/servers/{serverName}/sessions/{sessionId}/state", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /servers/{serverName}/sessions/{sessionId}/state
Returns the running state of a specific CAS session.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | The name of the server. |
sessionId | path | string | true | Session ID for which to obtain state. |
Example responses
400 Response
{"message":"string","id":"string","errorCode":0,"httpStatusCode":0,"details":["string"],"remediation":"string","errors":[null],"links":[{"method":"string","rel":"string","uri":"string","href":"string","title":"string","type":"string","itemType":"string","responseType":"string","responseItemType":"string"}],"version":0}
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The requested session's running state was returned. Valid values include running or stopped. | None |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | The requested CAS server does not exist. | None |
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. | None |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Caslibs
Contains operations to create and manage caslibs.
Get a list of caslibs
Code samples
# You can also use wget
curl -X GET https://example.com/casManagement/servers/{serverName}/caslibs \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('https://example.com/casManagement/servers/{serverName}/caslibs',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.get('https://example.com/casManagement/servers/{serverName}/caslibs', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.collection+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/casManagement/servers/{serverName}/caslibs", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /servers/{serverName}/caslibs
Returns a collection of caslibs available on the CAS server. Supports SAS standard paging query parameters, sorting, and filtering. This is a generic call for obtaining Caslib information. Since Caslib data source content varies widely depending on the attributes of a given data source, the information is returned as application/vnd.sas.cas.caslib+json, containing key/value pairs as returned from CAS. For specifics on a given Caslib data source type and its attributes, see the CAS libraries documentation. Schema of items returned in the response collection is included below, and are of type application/vnd.sas.cas.caslib+json.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | Server name for which caslibs are being requested. |
sessionId | query | string | false | Session ID (used when session-specific caslibs are also desired in results). |
includeHidden | query | boolean | false | Determines whether caslibs marked as hidden should be included in the results. Defaults to false. |
start | query | integer | false | The starting index of the first item in a page. Defaults to 0. |
limit | query | 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. |
filter | query | 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:
|
sortBy | query | string(sort-criteria) | false | Sort returned items. The sort criteria supports the first-level fields in each item. Some sample sorts:
|
excludeItemLinks | query | boolean | false | Determines whether item links are excluded from results. Defaults to false. |
Example responses
A sample collection of application/vnd.sas.cas.caslib objects.
{
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/",
"uri": "/casManagement/servers/cas-shared-default/",
"type": "application/vnd.sas.cas.server"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/caslibs?excludeItemLinks=false&start=0&limit=10",
"uri": "/casManagement/servers/cas-shared-default/caslibs?excludeItemLinks=false&start=0&limit=10",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.caslib"
},
{
"method": "GET",
"rel": "collection",
"href": "/casManagement/servers/cas-shared-default/caslibs",
"uri": "/casManagement/servers/cas-shared-default/caslibs",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.caslib"
},
{
"method": "POST",
"rel": "create",
"href": "/casManagement/servers/cas-shared-default/caslibs",
"uri": "/casManagement/servers/cas-shared-default/caslibs",
"type": "application/vnd.sas.cas.caslib"
}
],
"name": "caslibs",
"accept": "application/vnd.sas.cas.caslib",
"start": 0,
"count": 3,
"items": [
{
"version": 1,
"name": "CASUSER(userId)",
"type": "PATH",
"description": "Personal File System Caslib",
"scope": "global",
"path": "/opt/sas/viya/config/data/cas/default/casuserlibraries/userId/",
"hidden": false,
"attributes": [
{
"key": "active",
"value": {
"true": null
}
},
{
"key": "personal",
"value": {
"true": null
}
},
{
"key": "subDirs",
"value": {
"true": null
}
}
],
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/caslibs",
"uri": "/casManagement/servers/cas-shared-default/caslibs",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.caslib"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER(userId)",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER(userId)",
"type": "application/vnd.sas.cas.caslib"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER(userId)",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER(userId)",
"type": "application/vnd.sas.cas.caslib",
"responseType": "application/vnd.sas.cas.caslib"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER(userId)",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER(userId)"
},
{
"method": "GET",
"rel": "tables",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER(userId)/tables",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER(userId)/tables",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.table"
},
{
"method": "GET",
"rel": "sources",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER(userId)/sources",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER(userId)/sources",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.source.table"
},
{
"method": "GET",
"rel": "dataSource",
"href": "/dataSources/providers/cas/sources/cas-shared-default~fs~CASUSER(userId)",
"uri": "/dataSources/providers/cas/sources/cas-shared-default~fs~CASUSER(userId)",
"type": "application/vnd.sas.data.source"
}
],
"transient": true
},
{
"version": 1,
"name": "Public",
"type": "PATH",
"description": "Shared and writeable caslib, accessible to all users.",
"scope": "global",
"path": "/opt/sas/viya/config/data/cas/default/public/",
"hidden": false,
"attributes": [
{
"key": "active",
"value": {
"false": null
}
},
{
"key": "personal",
"value": {
"false": null
}
},
{
"key": "subDirs",
"value": {
"true": null
}
}
],
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/caslibs",
"uri": "/casManagement/servers/cas-shared-default/caslibs",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.caslib"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public",
"type": "application/vnd.sas.cas.caslib"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public",
"type": "application/vnd.sas.cas.caslib",
"responseType": "application/vnd.sas.cas.caslib"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public"
},
{
"method": "GET",
"rel": "tables",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.table"
},
{
"method": "GET",
"rel": "sources",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/sources",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/sources",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.source.table"
},
{
"method": "GET",
"rel": "dataSource",
"href": "/dataSources/providers/cas/sources/cas-shared-default~fs~Public",
"uri": "/dataSources/providers/cas/sources/cas-shared-default~fs~Public",
"type": "application/vnd.sas.data.source"
}
],
"transient": false
},
{
"version": 1,
"name": "Samples",
"type": "PATH",
"description": "Stores sample data (supplied by SAS).",
"scope": "global",
"path": "/opt/sas/viya/config/data/cas/default/samples/",
"hidden": false,
"attributes": [
{
"key": "active",
"value": {
"false": null
}
},
{
"key": "personal",
"value": {
"false": null
}
},
{
"key": "subDirs",
"value": {
"false": null
}
}
],
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/caslibs",
"uri": "/casManagement/servers/cas-shared-default/caslibs",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.caslib"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/caslibs/Samples",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Samples",
"type": "application/vnd.sas.cas.caslib"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/casManagement/servers/cas-shared-default/caslibs/Samples",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Samples",
"type": "application/vnd.sas.cas.caslib",
"responseType": "application/vnd.sas.cas.caslib"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/casManagement/servers/cas-shared-default/caslibs/Samples",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Samples"
},
{
"method": "GET",
"rel": "tables",
"href": "/casManagement/servers/cas-shared-default/caslibs/Samples/tables",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Samples/tables",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.table"
},
{
"method": "GET",
"rel": "sources",
"href": "/casManagement/servers/cas-shared-default/caslibs/Samples/sources",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Samples/sources",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.source.table"
},
{
"method": "GET",
"rel": "dataSource",
"href": "/dataSources/providers/cas/sources/cas-shared-default~fs~Samples",
"uri": "/dataSources/providers/cas/sources/cas-shared-default~fs~Samples",
"type": "application/vnd.sas.data.source"
}
],
"transient": false
}
],
"limit": 10,
"version": 2
}
{
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/",
"uri": "/casManagement/servers/cas-shared-default/",
"type": "application/vnd.sas.cas.server"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/caslibs?excludeItemLinks=false&start=0&limit=10",
"uri": "/casManagement/servers/cas-shared-default/caslibs?excludeItemLinks=false&start=0&limit=10",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.caslib"
},
{
"method": "GET",
"rel": "collection",
"href": "/casManagement/servers/cas-shared-default/caslibs",
"uri": "/casManagement/servers/cas-shared-default/caslibs",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.caslib"
},
{
"method": "POST",
"rel": "create",
"href": "/casManagement/servers/cas-shared-default/caslibs",
"uri": "/casManagement/servers/cas-shared-default/caslibs",
"type": "application/vnd.sas.cas.caslib"
}
],
"name": "caslibs",
"accept": "application/vnd.sas.cas.caslib",
"start": 0,
"count": 3,
"items": [
{
"version": 1,
"name": "CASUSER(userId)",
"type": "PATH",
"description": "Personal File System Caslib",
"scope": "global",
"path": "/opt/sas/viya/config/data/cas/default/casuserlibraries/userId/",
"hidden": false,
"attributes": [
{
"key": "active",
"value": {
"true": null
}
},
{
"key": "personal",
"value": {
"true": null
}
},
{
"key": "subDirs",
"value": {
"true": null
}
}
],
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/caslibs",
"uri": "/casManagement/servers/cas-shared-default/caslibs",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.caslib"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER(userId)",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER(userId)",
"type": "application/vnd.sas.cas.caslib"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER(userId)",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER(userId)",
"type": "application/vnd.sas.cas.caslib",
"responseType": "application/vnd.sas.cas.caslib"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER(userId)",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER(userId)"
},
{
"method": "GET",
"rel": "tables",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER(userId)/tables",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER(userId)/tables",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.table"
},
{
"method": "GET",
"rel": "sources",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER(userId)/sources",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER(userId)/sources",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.source.table"
},
{
"method": "GET",
"rel": "dataSource",
"href": "/dataSources/providers/cas/sources/cas-shared-default~fs~CASUSER(userId)",
"uri": "/dataSources/providers/cas/sources/cas-shared-default~fs~CASUSER(userId)",
"type": "application/vnd.sas.data.source"
}
],
"transient": true
},
{
"version": 1,
"name": "Public",
"type": "PATH",
"description": "Shared and writeable caslib, accessible to all users.",
"scope": "global",
"path": "/opt/sas/viya/config/data/cas/default/public/",
"hidden": false,
"attributes": [
{
"key": "active",
"value": {
"false": null
}
},
{
"key": "personal",
"value": {
"false": null
}
},
{
"key": "subDirs",
"value": {
"true": null
}
}
],
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/caslibs",
"uri": "/casManagement/servers/cas-shared-default/caslibs",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.caslib"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public",
"type": "application/vnd.sas.cas.caslib"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public",
"type": "application/vnd.sas.cas.caslib",
"responseType": "application/vnd.sas.cas.caslib"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public"
},
{
"method": "GET",
"rel": "tables",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.table"
},
{
"method": "GET",
"rel": "sources",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/sources",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/sources",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.source.table"
},
{
"method": "GET",
"rel": "dataSource",
"href": "/dataSources/providers/cas/sources/cas-shared-default~fs~Public",
"uri": "/dataSources/providers/cas/sources/cas-shared-default~fs~Public",
"type": "application/vnd.sas.data.source"
}
],
"transient": false
},
{
"version": 1,
"name": "Samples",
"type": "PATH",
"description": "Stores sample data (supplied by SAS).",
"scope": "global",
"path": "/opt/sas/viya/config/data/cas/default/samples/",
"hidden": false,
"attributes": [
{
"key": "active",
"value": {
"false": null
}
},
{
"key": "personal",
"value": {
"false": null
}
},
{
"key": "subDirs",
"value": {
"false": null
}
}
],
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/caslibs",
"uri": "/casManagement/servers/cas-shared-default/caslibs",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.caslib"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/caslibs/Samples",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Samples",
"type": "application/vnd.sas.cas.caslib"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/casManagement/servers/cas-shared-default/caslibs/Samples",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Samples",
"type": "application/vnd.sas.cas.caslib",
"responseType": "application/vnd.sas.cas.caslib"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/casManagement/servers/cas-shared-default/caslibs/Samples",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Samples"
},
{
"method": "GET",
"rel": "tables",
"href": "/casManagement/servers/cas-shared-default/caslibs/Samples/tables",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Samples/tables",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.table"
},
{
"method": "GET",
"rel": "sources",
"href": "/casManagement/servers/cas-shared-default/caslibs/Samples/sources",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Samples/sources",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.source.table"
},
{
"method": "GET",
"rel": "dataSource",
"href": "/dataSources/providers/cas/sources/cas-shared-default~fs~Samples",
"uri": "/dataSources/providers/cas/sources/cas-shared-default~fs~Samples",
"type": "application/vnd.sas.data.source"
}
],
"transient": false
}
],
"limit": 10,
"version": 2
}
400 Response
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request was successful. | caslibCollection |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | The requested CAS server or Caslib does not exist. | None |
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. | None |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Create a Caslib
Code samples
# You can also use wget
curl -X POST https://example.com/casManagement/servers/{serverName}/caslibs \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.cas.caslib+json' \
-H 'Accept: application/vnd.sas.cas.caslib+json'
const inputBody = '{
"attributes": [
{
"key": "string",
"value": {}
}
],
"description": "string",
"name": "string",
"metadataId": "string",
"path": "string",
"scope": "string",
"hidden": true,
"transient": true,
"type": "string",
"version": 0
}';
const headers = {
'Content-Type':'application/vnd.sas.cas.caslib+json',
'Accept':'application/vnd.sas.cas.caslib+json'
};
fetch('https://example.com/casManagement/servers/{serverName}/caslibs',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.cas.caslib+json',
'Accept': 'application/vnd.sas.cas.caslib+json'
}
r = requests.post('https://example.com/casManagement/servers/{serverName}/caslibs', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.cas.caslib+json"},
"Accept": []string{"application/vnd.sas.cas.caslib+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/casManagement/servers/{serverName}/caslibs", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /servers/{serverName}/caslibs
Defines a new caslib.
Body parameter
{
"attributes": [
{
"key": "string",
"value": {}
}
],
"description": "string",
"name": "string",
"metadataId": "string",
"path": "string",
"scope": "string",
"hidden": true,
"transient": true,
"type": "string",
"version": 0
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | Server name for which caslibs should be defined. |
sessionId | query | string | false | Session ID (useful when session-specific Caslib is desired). |
createDirectory | query | boolean | false | When creating a path-based Caslib, this parameter indicates whether the leaf-node of the path referenced by the Caslib. Should be created if it does not already exist. Applicable when creating a path-based Caslib. Defaults to false. |
body | body | caslib | false | A caslib object. |
Example responses
A sample caslib object.
{
"name": "CASUSER(userId)",
"metadataId": "26ea7916-86af-4547-9180-9876512345cc",
"description": "Personal File System caslib",
"path": "/u/userId/",
"scope": "global",
"type": "PATH",
"hidden": false,
"transient": false,
"version": 1,
"attributes": [
{
"key": "active",
"value": {
"false": null
}
},
{
"key": "personal",
"value": {
"true": null
}
},
{
"key": "subDirs",
"value": {
"true": null
}
}
],
"links": [
{
"href": "/casManagement/servers/casServer/caslibs",
"itemType": "application/vnd.sas.cas.caslib",
"method": "GET",
"rel": "up",
"type": "application/vnd.sas.collection",
"uri": "/casManagement/servers/casServer/caslibs"
},
{
"href": "/casManagement/servers/casServer/caslibs/CASUSER(userId)",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.cas.caslib",
"uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)"
},
{
"href": "casManagement/servers/casServer/caslibs/CASUSER(userId)",
"method": "PATCH",
"rel": "patch",
"responseType": "application/vnd.sas.cas.caslib",
"type": "application/vnd.sas.cas.caslib",
"uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)"
},
{
"href": "/casManagement/servers/casServer/caslibs/CASUSER(userId)",
"method": "DELETE",
"rel": "delete",
"uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)"
},
{
"href": "/casManagement/servers/casServer/caslibs/CASUSER(userId)/tables",
"method": "GET",
"rel": "tables",
"type": "application/vnd.sas.collection",
"uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)/tables"
},
{
"href": "/dataSources/providers/cas/sources/cas-shared-default~fs~CASUSER(userId)",
"method": "GET",
"rel": "dataSource",
"uri": "/dataSources/providers/cas/sources/cas-shared-default~fs~CASUSER(userId)",
"type": "application/vnd.sas.data.source"
}
]
}
{
"name": "CASUSER(userId)",
"metadataId": "26ea7916-86af-4547-9180-9876512345cc",
"description": "Personal File System caslib",
"path": "/u/userId/",
"scope": "global",
"type": "PATH",
"hidden": false,
"transient": false,
"version": 1,
"attributes": [
{
"key": "active",
"value": {
"false": null
}
},
{
"key": "personal",
"value": {
"true": null
}
},
{
"key": "subDirs",
"value": {
"true": null
}
}
],
"links": [
{
"href": "/casManagement/servers/casServer/caslibs",
"itemType": "application/vnd.sas.cas.caslib",
"method": "GET",
"rel": "up",
"type": "application/vnd.sas.collection",
"uri": "/casManagement/servers/casServer/caslibs"
},
{
"href": "/casManagement/servers/casServer/caslibs/CASUSER(userId)",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.cas.caslib",
"uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)"
},
{
"href": "casManagement/servers/casServer/caslibs/CASUSER(userId)",
"method": "PATCH",
"rel": "patch",
"responseType": "application/vnd.sas.cas.caslib",
"type": "application/vnd.sas.cas.caslib",
"uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)"
},
{
"href": "/casManagement/servers/casServer/caslibs/CASUSER(userId)",
"method": "DELETE",
"rel": "delete",
"uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)"
},
{
"href": "/casManagement/servers/casServer/caslibs/CASUSER(userId)/tables",
"method": "GET",
"rel": "tables",
"type": "application/vnd.sas.collection",
"uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)/tables"
},
{
"href": "/dataSources/providers/cas/sources/cas-shared-default~fs~CASUSER(userId)",
"method": "GET",
"rel": "dataSource",
"uri": "/dataSources/providers/cas/sources/cas-shared-default~fs~CASUSER(userId)",
"type": "application/vnd.sas.data.source"
}
]
}
400 Response
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | The Caslib was defined successfully. Information about the defined Caslib is returned. Note that links are returned only for GET calls, and are not included in the POST response (though listed here so that endpoints in this documentation can share the same schema definition). | caslib |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | The requested CAS server does not exist. | None |
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. | None |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Location | string | The location of the newly created resource. |
Create a Caslib with advanced options
Code samples
# You can also use wget
curl -X POST https://example.com/casManagement/servers/{serverName}/caslibs#advanced \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.cas.caslib.create.request+json' \
-H 'Accept: application/vnd.sas.cas.caslib+json'
const inputBody = '{
"createDirectory": true,
"permission": "GROUPWRITE",
"caslib": {
"version": 1,
"name": "mylib",
"type": "PATH",
"description": "My CAS library with create directory and group write.",
"scope": "global",
"path": "/tmp/mylib",
"attributes": [
{
"key": "key name",
"value": {
"value": null
}
}
]
}
}';
const headers = {
'Content-Type':'application/vnd.sas.cas.caslib.create.request+json',
'Accept':'application/vnd.sas.cas.caslib+json'
};
fetch('https://example.com/casManagement/servers/{serverName}/caslibs#advanced',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.cas.caslib.create.request+json',
'Accept': 'application/vnd.sas.cas.caslib+json'
}
r = requests.post('https://example.com/casManagement/servers/{serverName}/caslibs#advanced', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.cas.caslib.create.request+json"},
"Accept": []string{"application/vnd.sas.cas.caslib+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/casManagement/servers/{serverName}/caslibs#advanced", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /servers/{serverName}/caslibs
Defines a new Caslib using more advanced options. Note: If present, remove '#advanced' from the URL before submitting.
Body parameter
A sample request to create a caslib.
{
"createDirectory": true,
"permission": "GROUPWRITE",
"caslib": {
"version": 1,
"name": "mylib",
"type": "PATH",
"description": "My CAS library with create directory and group write.",
"scope": "global",
"path": "/tmp/mylib",
"attributes": [
{
"key": "key name",
"value": {
"value": null
}
}
]
}
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | Server name for which caslibs should be defined. |
sessionId | query | string | false | Session ID (useful when session-specific Caslib is desired). |
body | body | caslibCreateRequest | false | none |
Example responses
A sample caslib object.
{
"name": "CASUSER(userId)",
"metadataId": "26ea7916-86af-4547-9180-9876512345cc",
"description": "Personal File System caslib",
"path": "/u/userId/",
"scope": "global",
"type": "PATH",
"hidden": false,
"transient": false,
"version": 1,
"attributes": [
{
"key": "active",
"value": {
"false": null
}
},
{
"key": "personal",
"value": {
"true": null
}
},
{
"key": "subDirs",
"value": {
"true": null
}
}
],
"links": [
{
"href": "/casManagement/servers/casServer/caslibs",
"itemType": "application/vnd.sas.cas.caslib",
"method": "GET",
"rel": "up",
"type": "application/vnd.sas.collection",
"uri": "/casManagement/servers/casServer/caslibs"
},
{
"href": "/casManagement/servers/casServer/caslibs/CASUSER(userId)",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.cas.caslib",
"uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)"
},
{
"href": "casManagement/servers/casServer/caslibs/CASUSER(userId)",
"method": "PATCH",
"rel": "patch",
"responseType": "application/vnd.sas.cas.caslib",
"type": "application/vnd.sas.cas.caslib",
"uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)"
},
{
"href": "/casManagement/servers/casServer/caslibs/CASUSER(userId)",
"method": "DELETE",
"rel": "delete",
"uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)"
},
{
"href": "/casManagement/servers/casServer/caslibs/CASUSER(userId)/tables",
"method": "GET",
"rel": "tables",
"type": "application/vnd.sas.collection",
"uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)/tables"
},
{
"href": "/dataSources/providers/cas/sources/cas-shared-default~fs~CASUSER(userId)",
"method": "GET",
"rel": "dataSource",
"uri": "/dataSources/providers/cas/sources/cas-shared-default~fs~CASUSER(userId)",
"type": "application/vnd.sas.data.source"
}
]
}
{
"name": "CASUSER(userId)",
"metadataId": "26ea7916-86af-4547-9180-9876512345cc",
"description": "Personal File System caslib",
"path": "/u/userId/",
"scope": "global",
"type": "PATH",
"hidden": false,
"transient": false,
"version": 1,
"attributes": [
{
"key": "active",
"value": {
"false": null
}
},
{
"key": "personal",
"value": {
"true": null
}
},
{
"key": "subDirs",
"value": {
"true": null
}
}
],
"links": [
{
"href": "/casManagement/servers/casServer/caslibs",
"itemType": "application/vnd.sas.cas.caslib",
"method": "GET",
"rel": "up",
"type": "application/vnd.sas.collection",
"uri": "/casManagement/servers/casServer/caslibs"
},
{
"href": "/casManagement/servers/casServer/caslibs/CASUSER(userId)",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.cas.caslib",
"uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)"
},
{
"href": "casManagement/servers/casServer/caslibs/CASUSER(userId)",
"method": "PATCH",
"rel": "patch",
"responseType": "application/vnd.sas.cas.caslib",
"type": "application/vnd.sas.cas.caslib",
"uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)"
},
{
"href": "/casManagement/servers/casServer/caslibs/CASUSER(userId)",
"method": "DELETE",
"rel": "delete",
"uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)"
},
{
"href": "/casManagement/servers/casServer/caslibs/CASUSER(userId)/tables",
"method": "GET",
"rel": "tables",
"type": "application/vnd.sas.collection",
"uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)/tables"
},
{
"href": "/dataSources/providers/cas/sources/cas-shared-default~fs~CASUSER(userId)",
"method": "GET",
"rel": "dataSource",
"uri": "/dataSources/providers/cas/sources/cas-shared-default~fs~CASUSER(userId)",
"type": "application/vnd.sas.data.source"
}
]
}
400 Response
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | The Caslib was defined successfully. Information about the defined Caslib is returned. Note that links are returned only for GET calls, and are not included in the POST response (though listed here so that endpoints in this documentation can share the same schema definition). | caslib |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | The requested CAS server does not exist. | None |
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. | None |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Remove a Caslib definition
Code samples
# You can also use wget
curl -X DELETE https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.delete('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /servers/{serverName}/caslibs/{caslibName}
Removes a Caslib definition.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | Server name containing the Caslib. |
caslibName | path | string | true | The Caslib name on which to perform the operation. |
sessionId | query | string | false | Session ID on which to perform the operation. |
deleteDirectory | query | boolean | false | Set to true to also remove the caslib backing directory for path-based caslibs (if empty). Defaults to false. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | The Caslib definition was removed. | None |
400 | Bad Request | The request parameters were invalid. | None |
404 | Not Found | The requested CAS server or Caslib does not exist. | None |
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. | None |
Get a Caslib
Code samples
# You can also use wget
curl -X GET https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.cas.caslib+json'
const headers = {
'Accept':'application/vnd.sas.cas.caslib+json'
};
fetch('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.cas.caslib+json'
}
r = requests.get('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.cas.caslib+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /servers/{serverName}/caslibs/{caslibName}
Retrieves a single Caslib.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | Server name containing the caslibs being requested. |
caslibName | path | string | true | The Caslib name being requested. |
sessionId | query | string | false | Session ID (used when a session-specific Caslib is being requested). |
Example responses
A sample caslib object.
{
"name": "CASUSER(userId)",
"metadataId": "26ea7916-86af-4547-9180-9876512345cc",
"description": "Personal File System caslib",
"path": "/u/userId/",
"scope": "global",
"type": "PATH",
"hidden": false,
"transient": false,
"version": 1,
"attributes": [
{
"key": "active",
"value": {
"false": null
}
},
{
"key": "personal",
"value": {
"true": null
}
},
{
"key": "subDirs",
"value": {
"true": null
}
}
],
"links": [
{
"href": "/casManagement/servers/casServer/caslibs",
"itemType": "application/vnd.sas.cas.caslib",
"method": "GET",
"rel": "up",
"type": "application/vnd.sas.collection",
"uri": "/casManagement/servers/casServer/caslibs"
},
{
"href": "/casManagement/servers/casServer/caslibs/CASUSER(userId)",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.cas.caslib",
"uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)"
},
{
"href": "casManagement/servers/casServer/caslibs/CASUSER(userId)",
"method": "PATCH",
"rel": "patch",
"responseType": "application/vnd.sas.cas.caslib",
"type": "application/vnd.sas.cas.caslib",
"uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)"
},
{
"href": "/casManagement/servers/casServer/caslibs/CASUSER(userId)",
"method": "DELETE",
"rel": "delete",
"uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)"
},
{
"href": "/casManagement/servers/casServer/caslibs/CASUSER(userId)/tables",
"method": "GET",
"rel": "tables",
"type": "application/vnd.sas.collection",
"uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)/tables"
},
{
"href": "/dataSources/providers/cas/sources/cas-shared-default~fs~CASUSER(userId)",
"method": "GET",
"rel": "dataSource",
"uri": "/dataSources/providers/cas/sources/cas-shared-default~fs~CASUSER(userId)",
"type": "application/vnd.sas.data.source"
}
]
}
{
"name": "CASUSER(userId)",
"metadataId": "26ea7916-86af-4547-9180-9876512345cc",
"description": "Personal File System caslib",
"path": "/u/userId/",
"scope": "global",
"type": "PATH",
"hidden": false,
"transient": false,
"version": 1,
"attributes": [
{
"key": "active",
"value": {
"false": null
}
},
{
"key": "personal",
"value": {
"true": null
}
},
{
"key": "subDirs",
"value": {
"true": null
}
}
],
"links": [
{
"href": "/casManagement/servers/casServer/caslibs",
"itemType": "application/vnd.sas.cas.caslib",
"method": "GET",
"rel": "up",
"type": "application/vnd.sas.collection",
"uri": "/casManagement/servers/casServer/caslibs"
},
{
"href": "/casManagement/servers/casServer/caslibs/CASUSER(userId)",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.cas.caslib",
"uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)"
},
{
"href": "casManagement/servers/casServer/caslibs/CASUSER(userId)",
"method": "PATCH",
"rel": "patch",
"responseType": "application/vnd.sas.cas.caslib",
"type": "application/vnd.sas.cas.caslib",
"uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)"
},
{
"href": "/casManagement/servers/casServer/caslibs/CASUSER(userId)",
"method": "DELETE",
"rel": "delete",
"uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)"
},
{
"href": "/casManagement/servers/casServer/caslibs/CASUSER(userId)/tables",
"method": "GET",
"rel": "tables",
"type": "application/vnd.sas.collection",
"uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)/tables"
},
{
"href": "/dataSources/providers/cas/sources/cas-shared-default~fs~CASUSER(userId)",
"method": "GET",
"rel": "dataSource",
"uri": "/dataSources/providers/cas/sources/cas-shared-default~fs~CASUSER(userId)",
"type": "application/vnd.sas.data.source"
}
]
}
400 Response
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. Information about the requested Caslib was returned. | caslib |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | The requested CAS server or Caslib does not exist. | None |
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. | None |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Edit a global Caslib
Code samples
# You can also use wget
curl -X PATCH https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.cas.caslib+json' \
-H 'Accept: application/vnd.sas.cas.caslib+json'
const inputBody = '{
"attributes": [
{
"key": "string",
"value": {}
}
],
"description": "string",
"name": "string",
"metadataId": "string",
"path": "string",
"scope": "string",
"hidden": true,
"transient": true,
"type": "string",
"version": 0
}';
const headers = {
'Content-Type':'application/vnd.sas.cas.caslib+json',
'Accept':'application/vnd.sas.cas.caslib+json'
};
fetch('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}',
{
method: 'PATCH',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.cas.caslib+json',
'Accept': 'application/vnd.sas.cas.caslib+json'
}
r = requests.patch('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.cas.caslib+json"},
"Accept": []string{"application/vnd.sas.cas.caslib+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PATCH", "https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PATCH /servers/{serverName}/caslibs/{caslibName}
Edits properties of an existing global Caslib. Session Caslib properties cannot be edited. Editable properties include the following: * description * path
Body parameter
{
"attributes": [
{
"key": "string",
"value": {}
}
],
"description": "string",
"name": "string",
"metadataId": "string",
"path": "string",
"scope": "string",
"hidden": true,
"transient": true,
"type": "string",
"version": 0
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | Server name containing the global Caslib to be edited. |
caslibName | path | string | true | The name of the global Caslib to be edited. |
sessionId | query | string | false | Session ID. Note that editing session-based caslibs is not supported. Passing sessionId is provided to avoid creating a new CAS session, improving performance of the call. |
createDirectory | query | string | false | Indicates whether the leaf subdirectory of the path specified should be created when changing the path. If set to true, the directory will be created if it does not exist. Defaults to false. |
body | body | caslib | false | A caslib object. |
Example responses
400 Response
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The Caslib was edited successfully. | None |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | The requested CAS server or Caslib does not exist. | None |
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. | None |
412 | Precondition Failed | Precondition Failed. | Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 412
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Nodes
Contains operations to create and manage worker nodes on a CAS server.
Get a list of nodes
Code samples
# You can also use wget
curl -X GET https://example.com/casManagement/servers/{serverName}/nodes \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('https://example.com/casManagement/servers/{serverName}/nodes',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.get('https://example.com/casManagement/servers/{serverName}/nodes', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.collection+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/casManagement/servers/{serverName}/nodes", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /servers/{serverName}/nodes
Returns a collection of nodes 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.server.node+json.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | Server name for which nodes are being requested. |
sessionId | query | string | false | Session ID to use when connecting to retrieve the list of nodes. If not specified, a temporary session will be used. |
start | query | integer | false | The starting index of the first item in a page. Defaults to 0. |
limit | query | 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. |
filter | query | 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 worker node: filter=eq(role,controller) |
sortBy | query | string(sort-criteria) | false | Sort returned items. The sort criteria supports the first-level fields in each item. An example sort: sortBy=ipAddress:descending . The default sort is by name in ascending order. |
Example responses
200 Response
{
"name": "string",
"start": 0,
"limit": 0,
"count": 0,
"accept": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0,
"items": [
{
"name": "string",
"role": "string",
"ipAddress": "string",
"connected": true,
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The list of nodes for the requested CAS server was returned. | casServerNodeCollection |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | The requested CAS server does not exist. | None |
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. | None |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Add a node
Code samples
# You can also use wget
curl -X POST https://example.com/casManagement/servers/{serverName}/nodes \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.cas.server.node+json' \
-H 'Accept: application/vnd.sas.cas.server.node+json'
const inputBody = '{
"name": "worker1.grid.example.com"
}';
const headers = {
'Content-Type':'application/vnd.sas.cas.server.node+json',
'Accept':'application/vnd.sas.cas.server.node+json'
};
fetch('https://example.com/casManagement/servers/{serverName}/nodes',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.cas.server.node+json',
'Accept': 'application/vnd.sas.cas.server.node+json'
}
r = requests.post('https://example.com/casManagement/servers/{serverName}/nodes', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.cas.server.node+json"},
"Accept": []string{"application/vnd.sas.cas.server.node+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/casManagement/servers/{serverName}/nodes", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /servers/{serverName}/nodes
Adds a worker node to a CAS server and returns the nodes information.
Body parameter
A sample request to create a CAS server node.
{
"name": "worker1.grid.example.com"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | Server name in which the node is to be created. |
superUserSessionId | query | string | false | Session ID being used to add a node. Has to be a superuser. |
body | body | casServerNodeCreateRequest | false | none |
Example responses
Sample information about the definition of a CAS server node.
{
"name": "worker1.grid.example.com",
"version": 1,
"role": "worker",
"ipAddress": "192.168.1.2",
"connected": true,
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/casServer/nodes",
"uri": "/casManagement/servers/casServer/nodes",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server.node"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/nodes/worker1.grid.example.com",
"uri": "/casManagement/servers/cas-shared-default/nodes/worker1.grid.example.com",
"type": "application/vnd.sas.cas.server.node"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/casManagement/servers/cas-shared-default/nodes/worker1.grid.example.com",
"uri": "/casManagement/servers/cas-shared-default/nodes/worker1.grid.example.com"
}
]
}
{
"name": "worker1.grid.example.com",
"version": 1,
"role": "worker",
"ipAddress": "192.168.1.2",
"connected": true,
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/casServer/nodes",
"uri": "/casManagement/servers/casServer/nodes",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server.node"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/nodes/worker1.grid.example.com",
"uri": "/casManagement/servers/cas-shared-default/nodes/worker1.grid.example.com",
"type": "application/vnd.sas.cas.server.node"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/casManagement/servers/cas-shared-default/nodes/worker1.grid.example.com",
"uri": "/casManagement/servers/cas-shared-default/nodes/worker1.grid.example.com"
}
]
}
400 Response
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Information about the created node was returned. | casServerNode |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | The requested CAS server does not exist. | None |
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. | None |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Remove a node
Code samples
# You can also use wget
curl -X DELETE https://example.com/casManagement/servers/{serverName}/nodes/{nodeId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: */*'
const headers = {
'Accept':'*/*'
};
fetch('https://example.com/casManagement/servers/{serverName}/nodes/{nodeId}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': '*/*'
}
r = requests.delete('https://example.com/casManagement/servers/{serverName}/nodes/{nodeId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"*/*"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "https://example.com/casManagement/servers/{serverName}/nodes/{nodeId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /servers/{serverName}/nodes/{nodeId}
Removes a worker node from a CAS server.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | Server name containing the session. |
nodeId | path | string | true | Node ID on which to perform the operation. |
superUserSessionId | query | string | false | Session ID being used to remove the node. Has to be a superuser. |
Example responses
400 Response
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | The node was removed. | None |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | The requested session in the requested server name does not exist, or the node does not exist. | None |
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. | None |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Get a node
Code samples
# You can also use wget
curl -X GET https://example.com/casManagement/servers/{serverName}/nodes/{nodeId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.cas.server.node+json'
const headers = {
'Accept':'application/vnd.sas.cas.server.node+json'
};
fetch('https://example.com/casManagement/servers/{serverName}/nodes/{nodeId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.cas.server.node+json'
}
r = requests.get('https://example.com/casManagement/servers/{serverName}/nodes/{nodeId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.cas.server.node+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/casManagement/servers/{serverName}/nodes/{nodeId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /servers/{serverName}/nodes/{nodeId}
Retrieves a single node for a CAS server.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | Server name containing the session being requested. |
nodeId | path | string | true | Node ID on which to perform the operation. |
sessionId | query | string | false | Session ID to use when connecting to retrieve the node. If not specified, a temporary session will be used. |
Example responses
Sample information about the definition of a CAS server node.
{
"name": "worker1.grid.example.com",
"version": 1,
"role": "worker",
"ipAddress": "192.168.1.2",
"connected": true,
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/casServer/nodes",
"uri": "/casManagement/servers/casServer/nodes",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server.node"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/nodes/worker1.grid.example.com",
"uri": "/casManagement/servers/cas-shared-default/nodes/worker1.grid.example.com",
"type": "application/vnd.sas.cas.server.node"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/casManagement/servers/cas-shared-default/nodes/worker1.grid.example.com",
"uri": "/casManagement/servers/cas-shared-default/nodes/worker1.grid.example.com"
}
]
}
{
"name": "worker1.grid.example.com",
"version": 1,
"role": "worker",
"ipAddress": "192.168.1.2",
"connected": true,
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/casServer/nodes",
"uri": "/casManagement/servers/casServer/nodes",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server.node"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/nodes/worker1.grid.example.com",
"uri": "/casManagement/servers/cas-shared-default/nodes/worker1.grid.example.com",
"type": "application/vnd.sas.cas.server.node"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/casManagement/servers/cas-shared-default/nodes/worker1.grid.example.com",
"uri": "/casManagement/servers/cas-shared-default/nodes/worker1.grid.example.com"
}
]
}
400 Response
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Information about the requested node was returned. | casServerNode |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | The requested session in the requested server name does not exist, or the node requested does not exist. | None |
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. | None |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Sources
Contains operations to return information about data sources.
Get a list of source files or tables
Code samples
# You can also use wget
curl -X GET https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/sources \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/sources',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.get('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/sources', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.collection+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/sources", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /servers/{serverName}/caslibs/{caslibName}/sources
Returns a collection of source files or tables accessible through the data source defined for the Caslib. For path-based caslibs, this list will include files in the file system. For non-path-based caslibs, such as database data sources, this list will include database tables. The list is returned without regard to the loaded or unloaded state of the source file or table. Sorting and filtering are not supported. SAS standard paging query parameters are supported. Schema of items returned in the response collection is included below, and are of type application/vnd.sas.cas.source.table+json.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | Server name for which source tables are being requested. |
caslibName | path | string | true | The Caslib name for which source tables are being requested. |
sessionId | query | string | false | Session ID (used when session-specific tables are also desired in results). |
excludeItemLinks | query | boolean | false | Determines whether item links are excluded from results. Defaults to false. |
start | query | integer | false | The starting index of the first item in a page. Defaults to 0. |
limit | query | 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. |
Example responses
A sample collection of application/vnd.sas.cas.source.table objects.
{
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/",
"type": "application/vnd.sas.cas.caslib"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/sources?excludeItemLinks=false&start=0&limit=2",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/sources?excludeItemLinks=false&start=0&limit=2",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.source.table"
},
{
"method": "GET",
"rel": "collection",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/sources",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/sources",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.source.table"
},
{
"method": "GET",
"rel": "next",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/sources?excludeItemLinks=false&start=2&limit=2",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/sources?excludeItemLinks=false&start=2&limit=2",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "last",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/sources?excludeItemLinks=false&start=16&limit=2",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/sources?excludeItemLinks=false&start=16&limit=2",
"type": "application/vnd.sas.collection"
}
],
"name": "sources",
"accept": "application/vnd.sas.cas.source.table",
"count": 18,
"items": [
{
"name": "MAILORDER.sashdat",
"attributes": {
"owner": "userId",
"size": 244,
"encryption": "NONE",
"permission": "-rwxr-xr-x",
"time": "15Sep2017:20:29:10",
"group": "mygroup"
},
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/sources",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/sources",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.source.table"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/sources/MAILORDER.sashdat",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/sources/MAILORDER.sashdat",
"type": "application/vnd.sas.cas.source.table"
}
]
},
{
"name": "mysasdata.sas7bdat",
"attributes": {
"owner": "userId",
"size": 128,
"permission": "-rw-r--r--",
"time": "15Sep2017:20:29:05",
"group": "mygroup"
},
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/sources",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/sources",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.source.table"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/sources/mysasdata.sas7bdat",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/sources/mysasdata.sas7bdat",
"type": "application/vnd.sas.cas.source.table"
}
]
}
],
"limit": 2,
"version": 2
}
{
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/",
"type": "application/vnd.sas.cas.caslib"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/sources?excludeItemLinks=false&start=0&limit=2",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/sources?excludeItemLinks=false&start=0&limit=2",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.source.table"
},
{
"method": "GET",
"rel": "collection",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/sources",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/sources",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.source.table"
},
{
"method": "GET",
"rel": "next",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/sources?excludeItemLinks=false&start=2&limit=2",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/sources?excludeItemLinks=false&start=2&limit=2",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "last",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/sources?excludeItemLinks=false&start=16&limit=2",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/sources?excludeItemLinks=false&start=16&limit=2",
"type": "application/vnd.sas.collection"
}
],
"name": "sources",
"accept": "application/vnd.sas.cas.source.table",
"count": 18,
"items": [
{
"name": "MAILORDER.sashdat",
"attributes": {
"owner": "userId",
"size": 244,
"encryption": "NONE",
"permission": "-rwxr-xr-x",
"time": "15Sep2017:20:29:10",
"group": "mygroup"
},
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/sources",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/sources",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.source.table"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/sources/MAILORDER.sashdat",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/sources/MAILORDER.sashdat",
"type": "application/vnd.sas.cas.source.table"
}
]
},
{
"name": "mysasdata.sas7bdat",
"attributes": {
"owner": "userId",
"size": 128,
"permission": "-rw-r--r--",
"time": "15Sep2017:20:29:05",
"group": "mygroup"
},
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/sources",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/sources",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.source.table"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/sources/mysasdata.sas7bdat",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/sources/mysasdata.sas7bdat",
"type": "application/vnd.sas.cas.source.table"
}
]
}
],
"limit": 2,
"version": 2
}
400 Response
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. The list of source files or tables for the requested CAS server, CAS library, and optional session was returned. | casSourceTableCollection |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | The requested CAS server or Caslib does not exist. | None |
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. | None |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Get a source file or table
Code samples
# You can also use wget
curl -X GET https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/sources/{sourceName} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.cas.source.table+json'
const headers = {
'Accept':'application/vnd.sas.cas.source.table+json'
};
fetch('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/sources/{sourceName}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.cas.source.table+json'
}
r = requests.get('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/sources/{sourceName}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.cas.source.table+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/sources/{sourceName}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /servers/{serverName}/caslibs/{caslibName}/sources/{sourceName}
Retrieves information about a single source file or table.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | Server name for which source tables are being requested. |
caslibName | path | string | true | The Caslib name for which source tables are being requested. |
sourceName | path | string | true | Source file or table name being requested. |
sessionId | query | string | false | Session ID (used when session-specific tables are also desired in results). |
Example responses
An example of CAS source table information.
{
"attributes": {
"owner": "userId",
"permission": "-rwxr-xr-x",
"size": 18461,
"time": "24Oct2015:01:44:28"
},
"name": "counties.sashdat"
}
{
"attributes": {
"owner": "userId",
"permission": "-rwxr-xr-x",
"size": 18461,
"time": "24Oct2015:01:44:28"
},
"name": "counties.sashdat"
}
400 Response
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. The source file or table information was returned. | casSourceTable |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | The requested CAS server or Caslib does not exist. | None |
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. | None |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Tables
Contains operations to create and manage tables in a caslib.
Get a list of tables
Code samples
# You can also use wget
curl -X GET https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.get('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.collection+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /servers/{serverName}/caslibs/{caslibName}/tables
Returns a collection of tables accessible by the CAS server in the Caslib. Tables in this context refer to both loaded CAS tables as well as unloaded source tables. - For path-based caslibs, the source table shown will be the first matching .sashdat, .sas7bdat, .parquet, or .csv file found, in that order, independent of case. - For non-path-based caslibs (such as DBMS libraries), the source table used will be the first matching source table name found, independent of case. 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.table+json.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | Server name for which tables are being requested. |
caslibName | path | string | true | The Caslib name for which tables are being requested. |
sessionId | query | string | false | Session ID (used when session-specific tables are also desired in results). |
state | query | string | false | Omitting this value includes both loaded and unloaded (source) tables in the result. Specifying a value here filters the results to tables that match a particular state. Valid values include loaded (loaded tables) and unloaded (unloaded tables). |
scope | query | string | false | Omitting this value includes tables of all scopes. Specifying a value here filters the results to tables that match a particular scope. Valid values include session and global. |
sourcesOnly | query | boolean | false | Determines whether source tables should be displayed. Defaults to false. |
excludeItemLinks | query | boolean | false | Determines whether item links are excluded from results. Defaults to false. |
start | query | integer | false | The starting index of the first item in a page. Defaults to 0. |
limit | query | 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. |
filter | query | 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:
|
sortBy | query | string(sort-criteria) | false | Sort returned items. The sort criteria supports the first-level fields in each item. Some sample sorts:
|
Example responses
A sample collection of application/vnd.sas.cas.table objects.
{
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/",
"type": "application/vnd.sas.cas.caslib"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables?scope=all&caslibName=Public&excludeItemLinks=false&sourcesOnly=false&state=all&start=0&limit=2",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables?scope=all&caslibName=Public&excludeItemLinks=false&sourcesOnly=false&state=all&start=0&limit=2",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.table"
},
{
"method": "GET",
"rel": "collection",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.table"
},
{
"method": "GET",
"rel": "next",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables?scope=all&caslibName=Public&excludeItemLinks=false&sourcesOnly=false&state=all&start=2&limit=2",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables?scope=all&caslibName=Public&excludeItemLinks=false&sourcesOnly=false&state=all&start=2&limit=2",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "last",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables?scope=all&caslibName=Public&excludeItemLinks=false&sourcesOnly=false&state=all&start=8&limit=2",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables?scope=all&caslibName=Public&excludeItemLinks=false&sourcesOnly=false&state=all&start=8&limit=2",
"type": "application/vnd.sas.collection"
},
{
"method": "POST",
"rel": "upload",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables",
"responseType": "application/vnd.sas.cas.table"
}
],
"name": "tables",
"accept": "application/vnd.sas.cas.table",
"count": 9,
"items": [
{
"version": 1,
"name": "CONTACTS",
"tableReference": {
"tableUri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~Public/tables/CONTACTS",
"sessionId": "08863edb-02e0-7945-88e7-9f55ebc7a310",
"sourceCaslibName": "Public",
"sourceTableName": "Contacts.sashdat"
},
"scope": "global",
"state": "loaded",
"repeated": false,
"created": "2017-09-15T20:38:06.549Z",
"lastModified": "2017-09-15T20:38:06.551Z",
"lastAccessed": "2017-09-15T20:38:06.550Z",
"createdBy": "userId",
"rowCount": 3276,
"columnCount": 12,
"characterSet": "UTF8",
"encoding": "utf-8",
"serverName": "cas-shared-default",
"caslibName": "Public",
"disconnected": false,
"attributes": {
"owner": "userid",
"size": 796288,
"encryption": "NONE",
"time": "15Sep2017:20:29:02",
"group": "mygroup"
},
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.table"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS",
"type": "application/vnd.sas.cas.table"
},
{
"method": "POST",
"rel": "save",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS",
"type": "application/vnd.sas.cas.table.save.request",
"responseType": "application/vnd.sas.cas.table"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS"
},
{
"method": "GET",
"rel": "summaryStatistics",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/summaryStatistics",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/summaryStatistics",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.column.summary.statistics"
},
{
"method": "GET",
"rel": "distinctCount",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/distinctCount",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/distinctCount",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.column.summary.statistics"
},
{
"method": "PUT",
"rel": "updateScope",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/scope",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/scope",
"responseType": "application/json;text/plain"
},
{
"method": "PUT",
"rel": "updateState",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/state",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/state",
"responseType": "application/json;text/plain"
},
{
"method": "GET",
"rel": "columns",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.column"
},
{
"method": "GET",
"rel": "dataTable",
"href": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~Public/tables/CONTACTS",
"uri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~Public/tables/CONTACTS",
"type": "application/vnd.sas.data.table"
}
]
},
{
"version": 1,
"name": "MYDATA",
"tableReference": {
"tableUri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~Public/tables/MYDATA",
"sessionId": "08863edb-02e0-7945-88e7-9f55ebc7a310",
"sourceCaslibName": "Public",
"sourceTableName": "mydata.sashdat"
},
"scope": "global",
"state": "loaded",
"repeated": false,
"created": "2017-09-15T20:35:02.376Z",
"lastModified": "2017-09-15T20:35:02.377Z",
"lastAccessed": "2017-09-15T20:35:02.377Z",
"createdBy": "userId",
"rowCount": 160,
"columnCount": 9,
"characterSet": "UTF8",
"encoding": "utf-8",
"serverName": "cas-shared-default",
"caslibName": "Public",
"disconnected": true,
"attributes": {
"owner": "userid",
"size": 36928,
"encryption": "NONE",
"time": "15Sep2017:20:29:08",
"group": "mygroup"
},
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.table"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA",
"type": "application/vnd.sas.cas.table"
},
{
"method": "POST",
"rel": "save",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA",
"type": "application/vnd.sas.cas.table.save.request",
"responseType": "application/vnd.sas.cas.table"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA"
},
{
"method": "GET",
"rel": "summaryStatistics",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA/summaryStatistics",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA/summaryStatistics",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.column.summary.statistics"
},
{
"method": "GET",
"rel": "distinctCount",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA/distinctCount",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA/distinctCount",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.column.summary.statistics"
},
{
"method": "PUT",
"rel": "updateScope",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA/scope",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA/scope",
"responseType": "application/json;text/plain"
},
{
"method": "PUT",
"rel": "updateState",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA/state",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA/state",
"responseType": "application/json;text/plain"
},
{
"method": "GET",
"rel": "columns",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA/columns",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA/columns",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.column"
},
{
"method": "GET",
"rel": "dataTable",
"href": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~Public/tables/MYDATA",
"uri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~Public/tables/MYDATA",
"type": "application/vnd.sas.data.table"
}
]
}
],
"version": 2
}
{
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/",
"type": "application/vnd.sas.cas.caslib"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables?scope=all&caslibName=Public&excludeItemLinks=false&sourcesOnly=false&state=all&start=0&limit=2",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables?scope=all&caslibName=Public&excludeItemLinks=false&sourcesOnly=false&state=all&start=0&limit=2",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.table"
},
{
"method": "GET",
"rel": "collection",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.table"
},
{
"method": "GET",
"rel": "next",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables?scope=all&caslibName=Public&excludeItemLinks=false&sourcesOnly=false&state=all&start=2&limit=2",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables?scope=all&caslibName=Public&excludeItemLinks=false&sourcesOnly=false&state=all&start=2&limit=2",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "last",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables?scope=all&caslibName=Public&excludeItemLinks=false&sourcesOnly=false&state=all&start=8&limit=2",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables?scope=all&caslibName=Public&excludeItemLinks=false&sourcesOnly=false&state=all&start=8&limit=2",
"type": "application/vnd.sas.collection"
},
{
"method": "POST",
"rel": "upload",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables",
"responseType": "application/vnd.sas.cas.table"
}
],
"name": "tables",
"accept": "application/vnd.sas.cas.table",
"count": 9,
"items": [
{
"version": 1,
"name": "CONTACTS",
"tableReference": {
"tableUri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~Public/tables/CONTACTS",
"sessionId": "08863edb-02e0-7945-88e7-9f55ebc7a310",
"sourceCaslibName": "Public",
"sourceTableName": "Contacts.sashdat"
},
"scope": "global",
"state": "loaded",
"repeated": false,
"created": "2017-09-15T20:38:06.549Z",
"lastModified": "2017-09-15T20:38:06.551Z",
"lastAccessed": "2017-09-15T20:38:06.550Z",
"createdBy": "userId",
"rowCount": 3276,
"columnCount": 12,
"characterSet": "UTF8",
"encoding": "utf-8",
"serverName": "cas-shared-default",
"caslibName": "Public",
"disconnected": false,
"attributes": {
"owner": "userid",
"size": 796288,
"encryption": "NONE",
"time": "15Sep2017:20:29:02",
"group": "mygroup"
},
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.table"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS",
"type": "application/vnd.sas.cas.table"
},
{
"method": "POST",
"rel": "save",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS",
"type": "application/vnd.sas.cas.table.save.request",
"responseType": "application/vnd.sas.cas.table"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS"
},
{
"method": "GET",
"rel": "summaryStatistics",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/summaryStatistics",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/summaryStatistics",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.column.summary.statistics"
},
{
"method": "GET",
"rel": "distinctCount",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/distinctCount",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/distinctCount",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.column.summary.statistics"
},
{
"method": "PUT",
"rel": "updateScope",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/scope",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/scope",
"responseType": "application/json;text/plain"
},
{
"method": "PUT",
"rel": "updateState",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/state",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/state",
"responseType": "application/json;text/plain"
},
{
"method": "GET",
"rel": "columns",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.column"
},
{
"method": "GET",
"rel": "dataTable",
"href": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~Public/tables/CONTACTS",
"uri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~Public/tables/CONTACTS",
"type": "application/vnd.sas.data.table"
}
]
},
{
"version": 1,
"name": "MYDATA",
"tableReference": {
"tableUri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~Public/tables/MYDATA",
"sessionId": "08863edb-02e0-7945-88e7-9f55ebc7a310",
"sourceCaslibName": "Public",
"sourceTableName": "mydata.sashdat"
},
"scope": "global",
"state": "loaded",
"repeated": false,
"created": "2017-09-15T20:35:02.376Z",
"lastModified": "2017-09-15T20:35:02.377Z",
"lastAccessed": "2017-09-15T20:35:02.377Z",
"createdBy": "userId",
"rowCount": 160,
"columnCount": 9,
"characterSet": "UTF8",
"encoding": "utf-8",
"serverName": "cas-shared-default",
"caslibName": "Public",
"disconnected": true,
"attributes": {
"owner": "userid",
"size": 36928,
"encryption": "NONE",
"time": "15Sep2017:20:29:08",
"group": "mygroup"
},
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.table"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA",
"type": "application/vnd.sas.cas.table"
},
{
"method": "POST",
"rel": "save",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA",
"type": "application/vnd.sas.cas.table.save.request",
"responseType": "application/vnd.sas.cas.table"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA"
},
{
"method": "GET",
"rel": "summaryStatistics",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA/summaryStatistics",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA/summaryStatistics",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.column.summary.statistics"
},
{
"method": "GET",
"rel": "distinctCount",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA/distinctCount",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA/distinctCount",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.column.summary.statistics"
},
{
"method": "PUT",
"rel": "updateScope",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA/scope",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA/scope",
"responseType": "application/json;text/plain"
},
{
"method": "PUT",
"rel": "updateState",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA/state",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA/state",
"responseType": "application/json;text/plain"
},
{
"method": "GET",
"rel": "columns",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA/columns",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA/columns",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.column"
},
{
"method": "GET",
"rel": "dataTable",
"href": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~Public/tables/MYDATA",
"uri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~Public/tables/MYDATA",
"type": "application/vnd.sas.data.table"
}
]
}
],
"version": 2
}
400 Response
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. The list of tables for the requested CAS server, CAS library, and optional session was returned. | tableCollection |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | The requested CAS server or Caslib does not exist. | None |
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. | None |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Upload a data file to the collection of tables
Code samples
# You can also use wget
curl -X POST https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: multipart/form-data' \
-H 'Accept: application/vnd.sas.collection+json'
const inputBody = '{
"sessionId": "string",
"tableName": "string",
"variables": "string",
"indexVars": [
"string"
],
"format": "string",
"label": "string",
"scope": "string",
"replace": true,
"encoding": "string",
"allowTruncation": true,
"allowEmbeddedNewLines": true,
"delimiter": "string",
"varchars": true,
"scanRows": 0,
"threadCount": 0,
"stripBlanks": true,
"containsHeaderRow": true,
"sheetName": "string",
"password": "string",
"decryptionKey": "string",
"stringLengthMultiplier": 0,
"varcharConversionThreshold": 0,
"varcharConversion": 0,
"file": "string"
}';
const headers = {
'Content-Type':'multipart/form-data',
'Accept':'application/vnd.sas.collection+json'
};
fetch('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'multipart/form-data',
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.post('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"multipart/form-data"},
"Accept": []string{"application/vnd.sas.collection+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /servers/{serverName}/caslibs/{caslibName}/tables
Uploads a data file to the table collections using a multipart form-data post. Supported data files are csv, xls, xlsx/xlsm, sas7bdat and sashdat.
Body parameter
sessionId: string
tableName: string
variables: string
indexVars:
- string
format: string
label: string
scope: string
replace: true
encoding: string
allowTruncation: true
allowEmbeddedNewLines: true
delimiter: string
varchars: true
scanRows: 0
threadCount: 0
stripBlanks: true
containsHeaderRow: true
sheetName: string
password: string
decryptionKey: string
stringLengthMultiplier: 0
varcharConversionThreshold: 0
varcharConversion: 0
file: string
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | Server name for which tables are being requested. |
caslibName | path | string | true | The Caslib name for which tables are being requested. |
body | body | object | false | none |
» sessionId | body | string | false | Session ID (used when session-specific tables are also desired in results). |
» tableName | body | string | true | The name of the table to be created. |
» variables | body | string | false | The optional list of variables and their attributes, in JSON format. The value is a single string containing a JSON array of variable objects, each describing a variable and one or more of its attributes. When not specified, the best guess for column attributes will be made. When uploading csv data, containsHeaderRow should be set to true and a header row provided to ensure column names are properly set. This option then further sets attributes of those columns. |
» indexVars | body | [string] | false | An optional list of variables in the uploaded data. The corresponding variables in the resulting table are marked as indexed. The parameter is valid for csv, xls, and xlsx files only. |
» format | body | string | true | Format of the data file. The supported formats are \csv\, \xls\, \xlsx\, \sas7bdat\ and \sashdat. |
» label | body | string | false | Label placed on the new table. |
» scope | body | string | false | The scope to which to load the table. Valid values include global and session. Defaults to global. |
» replace | body | boolean | false | If true, any pre-existing table with the same name will be replaced. Defaults to false. |
» encoding | body | string | false | Encoding of the file contents. The parameter is valid for CSV files only. Defaults to utf-8. |
» allowTruncation | body | boolean | false | Allow truncation of character data that is too long for a given field. The parameter is valid for CSV files only. Defaults to true. |
» allowEmbeddedNewLines | body | boolean | false | Preserves new lines that are embedded in text fields. The parameter is valid for CSV files only. Defaults to false. |
» delimiter | body | string | false | Delimiter character. The parameter is valid for CSV files only. Defaults to ','. |
» varchars | body | boolean | false | Use variable character lengths. The parameter is valid for CSV files only. Defaults to true. |
» scanRows | body | integer(int64) | false | Number of rows to scan when determining column types. The parameter is valid for CSV files only. Default is 20. Set to zero to scan all rows in the file. |
» threadCount | body | integer(int64) | false | Number of threads to use on each CAS node to process the CSV data. The parameter is valid for CSV files only. Default is one thread per licensed CPU. Set to 0 to use the default. |
» stripBlanks | body | boolean | false | If true, remove leading and trailing blanks from character variables. The parameter is valid for CSV files only. Defaults to false. |
» containsHeaderRow | body | boolean | false | If true, first row is used for column names. The parameter is valid for csv, xls and xlsx files only. Defaults to false. |
» sheetName | body | string | false | Specifies the name of worksheet to import from a Microsoft Excel file. The parameter is valid for xls and xlsx files only. If no sheet name is specified, the first sheet is used. |
» password | body | string | false | Password used to read a protected SAS data set. The parameter is valid for sas7bdat files only. |
» decryptionKey | body | string | false | Key used to decrypt the data file. The parameter is valid for sas7bdat and sashdat files only. |
» stringLengthMultiplier | body | integer(double) | false | Specifies to increase the width of fixed-byte-width character columns. The number of bytes needed for multi-byte characters depends on the particular characters in the string. The parameter is valid for sas7bdat files only. |
» varcharConversionThreshold | body | integer(double) | false | Sets a threshold in bytes so that columns of type 'char' whose length meets or exceeds the threshold are converted to type 'varchar'. For example, if varcharConversionThreshold=20, a 'char' column of length 20 is converted to 'varchar' but a 'char' column of length 19 is not converted. The parameter is valid for sas7bdat files only. |
» varcharConversion | body | integer(double) | false | Acts as an alias for varcharConversionThreshold. If both varcharConversion and varcharConversionThreshold are provided, the value of varcharConversionThreshold will be used. The parameter is valid for sas7bdat files only. |
» file | body | string(binary) | true | Data file in one of the supported formats. This MUST be the last parameter. |
Detailed descriptions
» variables: The optional list of variables and their attributes, in JSON format. The value is a single string containing a JSON array of variable objects, each describing a variable and one or more of its attributes. When not specified, the best guess for column attributes will be made. When uploading csv data, containsHeaderRow should be set to true and a header row provided to ensure column names are properly set. This option then further sets attributes of those columns. Each variable in the array may have one or more of the following properties.
Property | Type | Description |
---|---|---|
name (required) | string | specifies the name for the variable. |
label | string | specifies the descriptive label for the variable. |
type | string | specifies the data type for the variable. Sample values include BINARY, CHAR, DATE, DATETIME, DECQUAD, DECSEXT, DOUBLE, INT32, INT64, TIME, VARBINARY, VARCHAR. |
format | string | specifies the format to apply to the variable. |
length | integer | specifies the unformatted length of the variable. This parameter applies to fixed-length character variables (type="CHAR") only. |
formattedLength | integer | specifies the length of format field plus the length of the format precision. |
Sample value |
---|
[ {"name":"Make","type":"VARCHAR"}, {"name":"Model","type":"VARCHAR"}, {"name":"Type","type":"VARCHAR"}, {"name":"Origin","type":"VARCHAR"}, {"name":"Drive train","type":"VARCHAR"}, {"name":"MSRP","type":"VARCHAR", "format":"DOLLAR8."}, {"name":"Invoice","type":"VARCHAR", "format":"DOLLAR8."}, {"name":"Engine Size","type":"DOUBLE"}, {"name":"Cylinders","type":"INT32"}, {"name":"Horsepower","type":"INT32"}, {"name":"City MPG","type":"INT32"}, {"name":"Highway MPG","type":"INT32"}, {"name":"Weight","type":"INT32"}, {"name":"Wheelbase","type":"INT32"}, {"name":"Length","type":"INT32"} ] |
Example responses
A sample application/vnd.sas.cas.table object.
{
"version": 3,
"name": "CUSTOMERS",
"tableReference": {
"tableUri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~CASUSER/tables/CUSTOMERS",
"sessionId": "ad0b5228-cc89-874c-8893-c1c420f6e0cb",
"sourceCaslibName": "CASUSER",
"sourceTableName": "CUSTOMERS.sashdat"
},
"serverName": "cas-shared-default",
"caslibName": "CASUSER",
"scope": "global",
"state": "loaded",
"repeated": false,
"created": "2017-04-11T17:17:15.373Z",
"lastModified": "2017-04-11T18:50:42.106Z",
"createdBy": "userid",
"lastModifiedBy": "userid",
"lastAccessed": "2017-04-11T19:12:13.102Z",
"sourceLastModified": "2017-03-12T03:43:22.101Z",
"label": "My table label",
"rowCount": 160,
"columnCount": 9,
"characterSet": "UTF8",
"encoding": "utf-8",
"disconnected": false,
"attributes": {
"owner": "someuser",
"size": 115704,
"encryption": "NONE",
"time": "18Nov2016:15:27:28",
"group": "users"
},
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.table"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS",
"type": "application/vnd.sas.cas.table"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS"
},
{
"method": "PUT",
"rel": "updateState",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/state",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/state"
},
{
"method": "PUT",
"rel": "updateScope",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/scope",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/scope",
"responseType": "application/json;text/plain"
},
{
"method": "GET",
"rel": "summaryStatistics",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/summaryStatistics",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/summaryStatistics",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.column"
},
{
"method": "GET",
"rel": "distinctCount",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/distinctCount",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/distinctCount",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.column"
},
{
"method": "GET",
"rel": "columns",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/columns",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/columns",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.column"
},
{
"method": "GET",
"rel": "dataTable",
"href": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~CASUSER/tables/CUSTOMERS",
"uri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~CASUSER/tables/CUSTOMERS",
"type": "application/vnd.sas.data.table"
}
]
}
{
"version": 3,
"name": "CUSTOMERS",
"tableReference": {
"tableUri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~CASUSER/tables/CUSTOMERS",
"sessionId": "ad0b5228-cc89-874c-8893-c1c420f6e0cb",
"sourceCaslibName": "CASUSER",
"sourceTableName": "CUSTOMERS.sashdat"
},
"serverName": "cas-shared-default",
"caslibName": "CASUSER",
"scope": "global",
"state": "loaded",
"repeated": false,
"created": "2017-04-11T17:17:15.373Z",
"lastModified": "2017-04-11T18:50:42.106Z",
"createdBy": "userid",
"lastModifiedBy": "userid",
"lastAccessed": "2017-04-11T19:12:13.102Z",
"sourceLastModified": "2017-03-12T03:43:22.101Z",
"label": "My table label",
"rowCount": 160,
"columnCount": 9,
"characterSet": "UTF8",
"encoding": "utf-8",
"disconnected": false,
"attributes": {
"owner": "someuser",
"size": 115704,
"encryption": "NONE",
"time": "18Nov2016:15:27:28",
"group": "users"
},
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.table"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS",
"type": "application/vnd.sas.cas.table"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS"
},
{
"method": "PUT",
"rel": "updateState",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/state",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/state"
},
{
"method": "PUT",
"rel": "updateScope",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/scope",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/scope",
"responseType": "application/json;text/plain"
},
{
"method": "GET",
"rel": "summaryStatistics",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/summaryStatistics",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/summaryStatistics",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.column"
},
{
"method": "GET",
"rel": "distinctCount",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/distinctCount",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/distinctCount",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.column"
},
{
"method": "GET",
"rel": "columns",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/columns",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/columns",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.column"
},
{
"method": "GET",
"rel": "dataTable",
"href": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~CASUSER/tables/CUSTOMERS",
"uri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~CASUSER/tables/CUSTOMERS",
"type": "application/vnd.sas.data.table"
}
]
}
400 Response
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | The list of newly uploaded tables was returned. | tableDetails |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | The requested CAS server or Caslib does not exist. | None |
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. | None |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Create a new in-memory table
Code samples
# You can also use wget
curl -X POST https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables#createTable \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.cas.table.create.request' \
-H 'Accept: application/vnd.sas.collection+json'
const inputBody = '{
"version": 1,
"tableName": "MYCREATEDTABLE 1",
"replace": true,
"columns": [
{
"name": "X",
"label": "Column X",
"type": "CHAR",
"rawLength": 32
},
{
"name": "Y",
"label": "Column Y",
"type": "NUM",
"format": "DATETIME."
},
{
"name": "Z",
"label": "Varchar Z",
"type": "varcHaR",
"rawLength": 75
}
]
}';
const headers = {
'Content-Type':'application/vnd.sas.cas.table.create.request',
'Accept':'application/vnd.sas.collection+json'
};
fetch('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables#createTable',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.cas.table.create.request',
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.post('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables#createTable', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.cas.table.create.request"},
"Accept": []string{"application/vnd.sas.collection+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables#createTable", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /servers/{serverName}/caslibs/{caslibName}/tables#createTable
Creates a new in-memory table from column information.
Body parameter
A sample request body to create an in-memory table from column information.
{
"version": 1,
"tableName": "MYCREATEDTABLE 1",
"replace": true,
"columns": [
{
"name": "X",
"label": "Column X",
"type": "CHAR",
"rawLength": 32
},
{
"name": "Y",
"label": "Column Y",
"type": "NUM",
"format": "DATETIME."
},
{
"name": "Z",
"label": "Varchar Z",
"type": "varcHaR",
"rawLength": 75
}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | Server name for which tables are being requested. |
caslibName | path | string | true | The Caslib name for which tables are being requested. |
sessionId | query | string | false | Session ID used for session table creation. Scope of the session table may be optionally modified to make the table global. |
body | body | casTableCreateRequest | false | none |
Detailed descriptions
sessionId: Session ID used for session table creation. Scope of the session table may be optionally modified to make the table global.
Example responses
A sample application/vnd.sas.cas.table object.
{
"version": 3,
"name": "CUSTOMERS",
"tableReference": {
"tableUri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~CASUSER/tables/CUSTOMERS",
"sessionId": "ad0b5228-cc89-874c-8893-c1c420f6e0cb",
"sourceCaslibName": "CASUSER",
"sourceTableName": "CUSTOMERS.sashdat"
},
"serverName": "cas-shared-default",
"caslibName": "CASUSER",
"scope": "global",
"state": "loaded",
"repeated": false,
"created": "2017-04-11T17:17:15.373Z",
"lastModified": "2017-04-11T18:50:42.106Z",
"createdBy": "userid",
"lastModifiedBy": "userid",
"lastAccessed": "2017-04-11T19:12:13.102Z",
"sourceLastModified": "2017-03-12T03:43:22.101Z",
"label": "My table label",
"rowCount": 160,
"columnCount": 9,
"characterSet": "UTF8",
"encoding": "utf-8",
"disconnected": false,
"attributes": {
"owner": "someuser",
"size": 115704,
"encryption": "NONE",
"time": "18Nov2016:15:27:28",
"group": "users"
},
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.table"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS",
"type": "application/vnd.sas.cas.table"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS"
},
{
"method": "PUT",
"rel": "updateState",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/state",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/state"
},
{
"method": "PUT",
"rel": "updateScope",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/scope",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/scope",
"responseType": "application/json;text/plain"
},
{
"method": "GET",
"rel": "summaryStatistics",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/summaryStatistics",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/summaryStatistics",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.column"
},
{
"method": "GET",
"rel": "distinctCount",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/distinctCount",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/distinctCount",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.column"
},
{
"method": "GET",
"rel": "columns",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/columns",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/columns",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.column"
},
{
"method": "GET",
"rel": "dataTable",
"href": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~CASUSER/tables/CUSTOMERS",
"uri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~CASUSER/tables/CUSTOMERS",
"type": "application/vnd.sas.data.table"
}
]
}
{
"version": 3,
"name": "CUSTOMERS",
"tableReference": {
"tableUri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~CASUSER/tables/CUSTOMERS",
"sessionId": "ad0b5228-cc89-874c-8893-c1c420f6e0cb",
"sourceCaslibName": "CASUSER",
"sourceTableName": "CUSTOMERS.sashdat"
},
"serverName": "cas-shared-default",
"caslibName": "CASUSER",
"scope": "global",
"state": "loaded",
"repeated": false,
"created": "2017-04-11T17:17:15.373Z",
"lastModified": "2017-04-11T18:50:42.106Z",
"createdBy": "userid",
"lastModifiedBy": "userid",
"lastAccessed": "2017-04-11T19:12:13.102Z",
"sourceLastModified": "2017-03-12T03:43:22.101Z",
"label": "My table label",
"rowCount": 160,
"columnCount": 9,
"characterSet": "UTF8",
"encoding": "utf-8",
"disconnected": false,
"attributes": {
"owner": "someuser",
"size": 115704,
"encryption": "NONE",
"time": "18Nov2016:15:27:28",
"group": "users"
},
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.table"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS",
"type": "application/vnd.sas.cas.table"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS"
},
{
"method": "PUT",
"rel": "updateState",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/state",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/state"
},
{
"method": "PUT",
"rel": "updateScope",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/scope",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/scope",
"responseType": "application/json;text/plain"
},
{
"method": "GET",
"rel": "summaryStatistics",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/summaryStatistics",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/summaryStatistics",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.column"
},
{
"method": "GET",
"rel": "distinctCount",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/distinctCount",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/distinctCount",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.column"
},
{
"method": "GET",
"rel": "columns",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/columns",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/columns",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.column"
},
{
"method": "GET",
"rel": "dataTable",
"href": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~CASUSER/tables/CUSTOMERS",
"uri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~CASUSER/tables/CUSTOMERS",
"type": "application/vnd.sas.data.table"
}
]
}
400 Response
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Information about the newly created table. | tableDetails |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | The requested CAS server or Caslib does not exist. | None |
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. | None |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Delete a table from source
Code samples
# You can also use wget
curl -X DELETE https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}?sourceTableName=string&quiet=true&removeAcs=true
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}?sourceTableName=string&quiet=true&removeAcs=true',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.delete('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}', params={
'sourceTableName': 'string', 'quiet': 'true', 'removeAcs': 'true'
})
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}
Deletes a table from Caslib source. Note that is not an unload. This operation physically removes the source table (if the source is writable). For path-based caslibs, this physically removes the file.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | Server name containing the Caslib. |
caslibName | path | string | true | The Caslib name whose source contains the table. |
tableName | path | string | true | The table name to be deleted. |
sessionId | query | string | false | Session ID (used when a session specific Caslib is being accessed). |
sourceTableName | query | string | true | The source file name to delete. This name should be the sourceTableName returned by a GET on this table resource. In general, it must be a possible source file for the table being referenced. For example, if the URL references the table MYTABLE, deletion of yourtable.sashdat would not be allowed, but deletion of MyTable.sashdat would be permitted. Deletion of the source table for non-path-based caslibs is not supported. |
quiet | query | boolean | true | Return success even if source table does not exist. |
removeAcs | query | boolean | true | Remove access controls associated with the source table. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | The source table was deleted. | None |
404 | Not Found | The requested CAS server or Caslib does not exist. | None |
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. | None |
Get a table
Code samples
# You can also use wget
curl -X GET https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.cas.table+json'
const headers = {
'Accept':'application/vnd.sas.cas.table+json'
};
fetch('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.cas.table+json'
}
r = requests.get('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.cas.table+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}
Retrieves table information.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | Server name for which the table is being requested. |
caslibName | path | string | true | The name of the Caslib containing the table. |
tableName | path | string | true | Table name requested. |
sessionId | query | string | false | Session ID (used when session-specific table is being requested). |
detailGroups | query | array[string] | false | A comma-separated list of detail groups to return in the representation. Some detail groups require more time to retrieve. This parameter allows opting-in to the following detail groups in cases where they are not already included:
|
Enumerated Values
Parameter | Value |
---|---|
detailGroups | all |
detailGroups | unloadedColumns |
detailGroups | unloadedRows |
Example responses
A sample application/vnd.sas.cas.table object.
{
"version": 3,
"name": "CUSTOMERS",
"tableReference": {
"tableUri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~CASUSER/tables/CUSTOMERS",
"sessionId": "ad0b5228-cc89-874c-8893-c1c420f6e0cb",
"sourceCaslibName": "CASUSER",
"sourceTableName": "CUSTOMERS.sashdat"
},
"serverName": "cas-shared-default",
"caslibName": "CASUSER",
"scope": "global",
"state": "loaded",
"repeated": false,
"created": "2017-04-11T17:17:15.373Z",
"lastModified": "2017-04-11T18:50:42.106Z",
"createdBy": "userid",
"lastModifiedBy": "userid",
"lastAccessed": "2017-04-11T19:12:13.102Z",
"sourceLastModified": "2017-03-12T03:43:22.101Z",
"label": "My table label",
"rowCount": 160,
"columnCount": 9,
"characterSet": "UTF8",
"encoding": "utf-8",
"disconnected": false,
"attributes": {
"owner": "someuser",
"size": 115704,
"encryption": "NONE",
"time": "18Nov2016:15:27:28",
"group": "users"
},
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.table"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS",
"type": "application/vnd.sas.cas.table"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS"
},
{
"method": "PUT",
"rel": "updateState",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/state",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/state"
},
{
"method": "PUT",
"rel": "updateScope",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/scope",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/scope",
"responseType": "application/json;text/plain"
},
{
"method": "GET",
"rel": "summaryStatistics",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/summaryStatistics",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/summaryStatistics",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.column"
},
{
"method": "GET",
"rel": "distinctCount",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/distinctCount",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/distinctCount",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.column"
},
{
"method": "GET",
"rel": "columns",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/columns",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/columns",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.column"
},
{
"method": "GET",
"rel": "dataTable",
"href": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~CASUSER/tables/CUSTOMERS",
"uri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~CASUSER/tables/CUSTOMERS",
"type": "application/vnd.sas.data.table"
}
]
}
{
"version": 3,
"name": "CUSTOMERS",
"tableReference": {
"tableUri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~CASUSER/tables/CUSTOMERS",
"sessionId": "ad0b5228-cc89-874c-8893-c1c420f6e0cb",
"sourceCaslibName": "CASUSER",
"sourceTableName": "CUSTOMERS.sashdat"
},
"serverName": "cas-shared-default",
"caslibName": "CASUSER",
"scope": "global",
"state": "loaded",
"repeated": false,
"created": "2017-04-11T17:17:15.373Z",
"lastModified": "2017-04-11T18:50:42.106Z",
"createdBy": "userid",
"lastModifiedBy": "userid",
"lastAccessed": "2017-04-11T19:12:13.102Z",
"sourceLastModified": "2017-03-12T03:43:22.101Z",
"label": "My table label",
"rowCount": 160,
"columnCount": 9,
"characterSet": "UTF8",
"encoding": "utf-8",
"disconnected": false,
"attributes": {
"owner": "someuser",
"size": 115704,
"encryption": "NONE",
"time": "18Nov2016:15:27:28",
"group": "users"
},
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.table"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS",
"type": "application/vnd.sas.cas.table"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS"
},
{
"method": "PUT",
"rel": "updateState",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/state",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/state"
},
{
"method": "PUT",
"rel": "updateScope",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/scope",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/scope",
"responseType": "application/json;text/plain"
},
{
"method": "GET",
"rel": "summaryStatistics",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/summaryStatistics",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/summaryStatistics",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.column"
},
{
"method": "GET",
"rel": "distinctCount",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/distinctCount",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/distinctCount",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.column"
},
{
"method": "GET",
"rel": "columns",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/columns",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/columns",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.column"
},
{
"method": "GET",
"rel": "dataTable",
"href": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~CASUSER/tables/CUSTOMERS",
"uri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~CASUSER/tables/CUSTOMERS",
"type": "application/vnd.sas.data.table"
}
]
}
400 Response
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. The table with the specified name was returned. In the case that the loaded table exists in both session and global scope, the single session scope table will be returned. This is consistent with CAS, which will always operate against the table in session scope when both a global and session scope table with the same name exists. | tableDetails |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | The requested CAS server or Caslib does not exist. | None |
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. | None |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Save a table
Code samples
# You can also use wget
curl -X POST https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.cas.table.save.request+json' \
-H 'Accept: application/vnd.sas.cas.table+json'
const inputBody = '{
"version": 2,
"caslibName": "myOutCaslib",
"tableName": "myOptionalNewOutputTableName",
"format": "sashdat",
"compress": true,
"replace": true,
"parameters": {
"param1": "value1",
"param2": "value2"
}
}';
const headers = {
'Content-Type':'application/vnd.sas.cas.table.save.request+json',
'Accept':'application/vnd.sas.cas.table+json'
};
fetch('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.cas.table.save.request+json',
'Accept': 'application/vnd.sas.cas.table+json'
}
r = requests.post('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.cas.table.save.request+json"},
"Accept": []string{"application/vnd.sas.cas.table+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}
Saves a CAS table to a source table.
Body parameter
A sample request body to save a cas table to a source table or external file.
{
"version": 2,
"caslibName": "myOutCaslib",
"tableName": "myOptionalNewOutputTableName",
"format": "sashdat",
"compress": true,
"replace": true,
"parameters": {
"param1": "value1",
"param2": "value2"
}
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | Server name for which the table is being accessed. |
caslibName | path | string | true | The name of the Caslib containing the table. |
tableName | path | string | true | Table name being saved. |
sessionId | query | string | false | Session ID (used when session-specific table is being accessed). |
body | body | casSaveRequest | true | none |
Example responses
400 Response
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | The table was saved successfully. | None |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | The requested CAS server or Caslib does not exist. | None |
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. | None |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Append a table
Code samples
# You can also use wget
curl -X PATCH https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.cas.table.append.request+json' \
-H 'Accept: application/json'
const inputBody = '{
"version": 1,
"sourceCaslib": "myInputCaslib",
"sourceTableName": "myInputTableName",
"singlePass": false,
"filter": "UID=12345"
}';
const headers = {
'Content-Type':'application/vnd.sas.cas.table.append.request+json',
'Accept':'application/json'
};
fetch('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}',
{
method: 'PATCH',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.cas.table.append.request+json',
'Accept': 'application/json'
}
r = requests.patch('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.cas.table.append.request+json"},
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PATCH", "https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PATCH /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}
Appends content to the table from a secondary CAS table.
Body parameter
A sample request body to append one cas table to another.
{
"version": 1,
"sourceCaslib": "myInputCaslib",
"sourceTableName": "myInputTableName",
"singlePass": false,
"filter": "UID=12345"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | Server name for which the tables are being accessed. |
caslibName | path | string | true | The name of the Caslib containing the target table. |
tableName | path | string | true | Table name of the target table. |
sessionId | query | string | false | Session ID (used when a session-specific table is being accessed). |
body | body | casAppendRequest | true | none |
Example responses
400 Response
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The table was appended successfully. | None |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | The requested CAS server or Caslib does not exist. | None |
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. | None |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Change the scope of a loaded CAS table
Code samples
# You can also use wget
curl -X PUT https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/scope?sessionId=string&value=string \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/json'
const headers = {
'Accept':'application/json'
};
fetch('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/scope?sessionId=string&value=string',
{
method: 'PUT',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.put('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/scope', params={
'sessionId': 'string', 'value': 'string'
}, headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/scope", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/scope
Changes the scope of a loaded CAS table from session to global scope (promote). Operation valid only on a session table. Promote target is the same Caslib that contains the session table.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | Server name for which the table is being accessed. |
caslibName | path | string | true | The name of the Caslib containing the table. |
tableName | path | string | true | Table name requested. |
sessionId | query | string | true | The session ID. |
value | query | string | true | The scope to which to change the table. Valid values include global. |
Example responses
400 Response
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
{"message":"string","id":"string","errorCode":0,"httpStatusCode":0,"details":["string"],"remediation":"string","errors":[null],"links":[{"method":"string","rel":"string","uri":"string","href":"string","title":"string","type":"string","itemType":"string","responseType":"string","responseItemType":"string"}],"version":0}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The requested action was successful. New scope is returned. Valid values include session or global. | None |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | The requested CAS server or Caslib does not exist. | None |
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. | None |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Load or unload a table
Code samples
# You can also use wget
curl -X PUT https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/state?value=string \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.cas.table.load.request+json' \
-H 'Accept: application/json'
const inputBody = '{
"version": 3,
"copies": 1,
"label": "My table label",
"outputCaslibName": "MyOutCaslib",
"outputTableName": "MyOutTable",
"parameters": {
"loadParam1": "value1",
"loadParam2": "value2"
},
"replace": false,
"replaceMode": "always",
"scope": "global"
}';
const headers = {
'Content-Type':'application/vnd.sas.cas.table.load.request+json',
'Accept':'application/json'
};
fetch('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/state?value=string',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.cas.table.load.request+json',
'Accept': 'application/json'
}
r = requests.put('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/state', params={
'value': 'string'
}, headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.cas.table.load.request+json"},
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/state", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/state
Modifies the state of a table to loaded or unloaded. Returns loaded or unloaded to indicate the state after the operation.
Body parameter
A sample request body to change the state of a table.
{
"version": 3,
"copies": 1,
"label": "My table label",
"outputCaslibName": "MyOutCaslib",
"outputTableName": "MyOutTable",
"parameters": {
"loadParam1": "value1",
"loadParam2": "value2"
},
"replace": false,
"replaceMode": "always",
"scope": "global"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | Server name containing the table whose state is being modified. |
caslibName | path | string | true | The Caslib name containing the table whose state should be modified. |
tableName | path | string | true | The table name whose state is being modified. |
value | query | string | true | State to which to set the table. Valid values include loaded or unloaded. |
createRelationships | query | boolean | false | Indicates whether relationships data (lineage) should be created when performing the load. Defaults to false. (deprecated) |
sessionId | query | string | false | Session ID containing the table. |
scope | query | string | false | When value=loaded, the optional scope to which to load the table. Valid values include global and session. Defaults to global. If specified at the same time as a casLoadRequest body containing a scope setting, the casLoadRequest scope will override the value specified on this query parameter. |
sourceTableName | query | string | false | The source file or table name from which to load the CAS table. If not specified:
|
body | body | casLoadRequest | false | Optional body, providing greater control over the output when a state change to loaded is requested. In general, state changes will not require this body, and should be performed sending an empty body. When an empty body is submitted, the service will change state of referenced table in the library in which it resides. |
Example responses
400 Response
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
{"message":"string","id":"string","errorCode":0,"httpStatusCode":0,"details":["string"],"remediation":"string","errors":[null],"links":[{"method":"string","rel":"string","uri":"string","href":"string","title":"string","type":"string","itemType":"string","responseType":"string","responseItemType":"string"}],"version":0}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The requested action was successful. The state is returned. Valid values are loaded and unloaded. | None |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | The requested CAS server or Caslib does not exist. | None |
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. | None |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Get the summary for all numeric columns
Code samples
# You can also use wget
curl -X GET https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/summaryStatistics \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/summaryStatistics',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.get('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/summaryStatistics', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.collection+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/summaryStatistics", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/summaryStatistics
Returns the summary for the numeric column values in the loaded CAS table Returns a collection of summaries for the numeric columns in a loaded CAS table. 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.column.summary.statistics+json.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
tableName | path | string | true | The name of table for which column info is requested. |
serverName | path | string | true | The name of the server containing the Caslib. |
caslibName | path | string | true | The name of the Caslib containing the table. |
sessionId | query | string | false | The optional ID of the session containing the Caslib. If unspecified, only tables in global caslibs will be accessible. |
start | query | integer | false | The starting index of the first item in a page. Defaults to 0. |
limit | query | 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. |
Example responses
200 Response
{
"CSS": 0,
"USS": 0,
"coefficientOfVariation": 0,
"columnName": "string",
"max": 0,
"mean": 0,
"min": 0,
"numMissingValues": 0,
"probT": 0,
"stdDev": 0,
"stdErr": 0,
"sum": 0,
"tValue": 0,
"variance": 0,
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The requested table's summary information for all numeric columns was returned. | casColumnSummaryStatistics |
404 | Not Found | The requested CAS server or Caslib does not exist. | None |
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. | None |
Get the distinct count for all columns
Code samples
# You can also use wget
curl -X GET https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/distinctCounts \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/distinctCounts',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.get('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/distinctCounts', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.collection+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/distinctCounts", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/distinctCounts
Returns a collection of distinct count information for the columns in a loaded CAS table. 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.column.distinct.count+json.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
tableName | path | string | true | The name of table for which distinct count info is requested. |
serverName | path | string | true | The name of the server containing the Caslib. |
caslibName | path | string | true | The name of the Caslib containing the table. |
sessionId | query | string | false | The optional ID of the session containing the Caslib. If unspecified, only tables in global caslibs will be accessible. |
start | query | integer | false | The starting index of the first item in a page. Defaults to 0. |
limit | query | 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. |
Example responses
A sample response of a requst for a column's distinct count.
{
"version": 1,
"columnName": "2016/17",
"distinctCount": 30,
"missingCount": 0,
"truncated": false,
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/caslibs/testlib/tables/NBA_2016_TEAMSALARIES/columns/2016/17",
"uri": "/casManagement/servers/cas-shared-default/caslibs/testlib/tables/NBA_2016_TEAMSALARIES/columns/2016/17",
"type": "application/vnd.sas.cas.column"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/caslibs/testlib/tables/NBA_2016_TEAMSALARIES/columns/2016/17/distinctCount",
"uri": "/casManagement/servers/cas-shared-default/caslibs/testlib/tables/NBA_2016_TEAMSALARIES/columns/2016/17/distinctCount",
"type": "application/vnd.sas.cas.column.distinct.count"
}
]
}
{
"version": 1,
"columnName": "2016/17",
"distinctCount": 30,
"missingCount": 0,
"truncated": false,
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/caslibs/testlib/tables/NBA_2016_TEAMSALARIES/columns/2016/17",
"uri": "/casManagement/servers/cas-shared-default/caslibs/testlib/tables/NBA_2016_TEAMSALARIES/columns/2016/17",
"type": "application/vnd.sas.cas.column"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/caslibs/testlib/tables/NBA_2016_TEAMSALARIES/columns/2016/17/distinctCount",
"uri": "/casManagement/servers/cas-shared-default/caslibs/testlib/tables/NBA_2016_TEAMSALARIES/columns/2016/17/distinctCount",
"type": "application/vnd.sas.cas.column.distinct.count"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The requested table's distinct and missing count information for all columns was returned. | casColumnDistinctCount |
404 | Not Found | The requested CAS server or Caslib does not exist. | None |
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. | None |
Columns
Contains operations to return information from columns in a table.
Get a list of columns in a table
Code samples
# You can also use wget
curl -X GET https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.get('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.collection+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns
Returns a collection of column info available for a table. 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.column+json.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
tableName | path | string | true | The name of table for which column info is requested. |
serverName | path | string | true | The name of the server containing the Caslib. |
caslibName | path | string | true | The name of the Caslib containing the table. |
sessionId | query | string | false | The optional ID of the session containing the Caslib. If unspecified, only tables in global caslibs will be accessible. |
start | query | integer | false | The starting index of the first item in a page. Defaults to 0. |
limit | query | 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. |
filter | query | 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:
|
sortBy | query | string(sort-criteria) | false | Sort returned items. The sort criteria supports the first-level fields in each item. Some sample sorts:
|
excludeItemLinks | query | boolean | false | Determines whether item links are excluded from results. Defaults to true. |
Example responses
A sample response containing a collection of application/vnd.sas.cas.column items.
{
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/",
"type": "application/vnd.sas.cas.table"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns?excludeItemLinks=true&sessionId&start=0&limit=10",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns?excludeItemLinks=true&sessionId&start=0&limit=10",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.column"
},
{
"method": "GET",
"rel": "collection",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.column"
},
{
"method": "GET",
"rel": "next",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns?excludeItemLinks=true&sessionId&start=10&limit=10",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns?excludeItemLinks=true&sessionId&start=10&limit=10",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "last",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns?excludeItemLinks=true&sessionId&start=10&limit=10",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns?excludeItemLinks=true&sessionId&start=10&limit=10",
"type": "application/vnd.sas.collection"
}
],
"name": "columns",
"accept": "application/vnd.sas.cas.column",
"count": 12,
"items": [
{
"version": 1,
"name": "ID",
"type": "double",
"rawLength": 8,
"formattedLength": 12,
"numberFormatLength": 0,
"numberFormatDecimals": 0,
"indexed": true
},
{
"version": 1,
"name": "COMPANY",
"type": "char",
"rawLength": 34,
"formattedLength": 34,
"numberFormatLength": 0,
"numberFormatDecimals": 0,
"indexed": false
},
{
"version": 1,
"name": "CONTACT",
"type": "char",
"rawLength": 20,
"formattedLength": 20,
"numberFormatLength": 0,
"numberFormatDecimals": 0,
"indexed": false
},
{
"version": 1,
"name": "ADDRESS",
"type": "char",
"rawLength": 30,
"formattedLength": 30,
"numberFormatLength": 0,
"numberFormatDecimals": 0,
"indexed": false
},
{
"version": 1,
"name": "CITY",
"type": "char",
"rawLength": 28,
"formattedLength": 28,
"numberFormatLength": 0,
"numberFormatDecimals": 0,
"indexed": false
},
{
"version": 1,
"name": "STATE",
"type": "char",
"rawLength": 14,
"formattedLength": 14,
"numberFormatLength": 0,
"numberFormatDecimals": 0,
"indexed": false
},
{
"version": 1,
"name": "PHONE",
"type": "char",
"rawLength": 12,
"formattedLength": 12,
"numberFormatLength": 0,
"numberFormatDecimals": 0,
"indexed": false
},
{
"version": 1,
"name": "OS",
"type": "char",
"rawLength": 16,
"formattedLength": 16,
"numberFormatLength": 0,
"numberFormatDecimals": 0,
"indexed": false
},
{
"version": 1,
"name": "DATABASE",
"type": "char",
"rawLength": 24,
"formattedLength": 24,
"numberFormatLength": 0,
"numberFormatDecimals": 0,
"indexed": false
},
{
"version": 1,
"name": "DATE",
"type": "char",
"rawLength": 15,
"formattedLength": 15,
"numberFormatLength": 0,
"numberFormatDecimals": 0,
"indexed": false
}
],
"version": 2
}
{
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/",
"type": "application/vnd.sas.cas.table"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns?excludeItemLinks=true&sessionId&start=0&limit=10",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns?excludeItemLinks=true&sessionId&start=0&limit=10",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.column"
},
{
"method": "GET",
"rel": "collection",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.column"
},
{
"method": "GET",
"rel": "next",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns?excludeItemLinks=true&sessionId&start=10&limit=10",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns?excludeItemLinks=true&sessionId&start=10&limit=10",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "last",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns?excludeItemLinks=true&sessionId&start=10&limit=10",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns?excludeItemLinks=true&sessionId&start=10&limit=10",
"type": "application/vnd.sas.collection"
}
],
"name": "columns",
"accept": "application/vnd.sas.cas.column",
"count": 12,
"items": [
{
"version": 1,
"name": "ID",
"type": "double",
"rawLength": 8,
"formattedLength": 12,
"numberFormatLength": 0,
"numberFormatDecimals": 0,
"indexed": true
},
{
"version": 1,
"name": "COMPANY",
"type": "char",
"rawLength": 34,
"formattedLength": 34,
"numberFormatLength": 0,
"numberFormatDecimals": 0,
"indexed": false
},
{
"version": 1,
"name": "CONTACT",
"type": "char",
"rawLength": 20,
"formattedLength": 20,
"numberFormatLength": 0,
"numberFormatDecimals": 0,
"indexed": false
},
{
"version": 1,
"name": "ADDRESS",
"type": "char",
"rawLength": 30,
"formattedLength": 30,
"numberFormatLength": 0,
"numberFormatDecimals": 0,
"indexed": false
},
{
"version": 1,
"name": "CITY",
"type": "char",
"rawLength": 28,
"formattedLength": 28,
"numberFormatLength": 0,
"numberFormatDecimals": 0,
"indexed": false
},
{
"version": 1,
"name": "STATE",
"type": "char",
"rawLength": 14,
"formattedLength": 14,
"numberFormatLength": 0,
"numberFormatDecimals": 0,
"indexed": false
},
{
"version": 1,
"name": "PHONE",
"type": "char",
"rawLength": 12,
"formattedLength": 12,
"numberFormatLength": 0,
"numberFormatDecimals": 0,
"indexed": false
},
{
"version": 1,
"name": "OS",
"type": "char",
"rawLength": 16,
"formattedLength": 16,
"numberFormatLength": 0,
"numberFormatDecimals": 0,
"indexed": false
},
{
"version": 1,
"name": "DATABASE",
"type": "char",
"rawLength": 24,
"formattedLength": 24,
"numberFormatLength": 0,
"numberFormatDecimals": 0,
"indexed": false
},
{
"version": 1,
"name": "DATE",
"type": "char",
"rawLength": 15,
"formattedLength": 15,
"numberFormatLength": 0,
"numberFormatDecimals": 0,
"indexed": false
}
],
"version": 2
}
400 Response
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The requested table's column information was returned. | casColumnCollection |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | The requested CAS server or Caslib does not exist. | None |
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. | None |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Create a Column
Code samples
# You can also use wget
curl -X POST https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.cas.column.create.request' \
-H 'Accept: application/vnd.sas.cas.column+json'
const inputBody = '{
"version": 1,
"column": {
"name": "Y",
"label": "New Column",
"type": "num",
"rawLength": 8
},
"outputTable": "MYOUTPUTTABLE",
"replaceTable": true
}';
const headers = {
'Content-Type':'application/vnd.sas.cas.column.create.request',
'Accept':'application/vnd.sas.cas.column+json'
};
fetch('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.cas.column.create.request',
'Accept': 'application/vnd.sas.cas.column+json'
}
r = requests.post('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.cas.column.create.request"},
"Accept": []string{"application/vnd.sas.cas.column+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns
Adds a new column to a table. Since adding a column to a table modifies the in-memory structure of the table, the addition of a column creates a copy of the original table, introducing the new column in the copy. The original table is then removed
Body parameter
A sample request body to create a new column.
{
"version": 1,
"column": {
"name": "Y",
"label": "New Column",
"type": "num",
"rawLength": 8
},
"outputTable": "MYOUTPUTTABLE",
"replaceTable": true
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | Server name for the operation. |
caslibName | path | string | true | The Caslib name containing the input table. |
tableName | path | string | true | The table name. |
sessionId | query | string | false | Session ID (useful when session-specific Caslib is desired). |
body | body | casColumnCreateRequest | false | none |
Example responses
A sample of CAS column information.
{
"version": 3,
"name": "Y",
"label": "New Column",
"type": "double",
"rawLength": 8,
"formattedLength": 8,
"format": "F",
"numberFormatLength": 8,
"numberFormatDecimals": 0,
"indexed": false,
"index": 11,
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CUSTOMERS_UNWRANGLED_DATA/columns",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CUSTOMERS_UNWRANGLED_DATA/columns",
"type": "application/vnd.sas.cas.table"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CUSTOMERS_UNWRANGLED_DATA/columns/Y",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CUSTOMERS_UNWRANGLED_DATA/columns/Y",
"type": "application/vnd.sas.cas.column"
},
{
"method": "GET",
"rel": "frequency",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CUSTOMERS_UNWRANGLED_DATA/columns/Y/frequency",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CUSTOMERS_UNWRANGLED_DATA/columns/Y/frequency",
"type": "application/vnd.sas.cas.column.frequency"
},
{
"method": "GET",
"rel": "distinctCount",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CUSTOMERS_UNWRANGLED_DATA/columns/Y/distinctCount",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CUSTOMERS_UNWRANGLED_DATA/columns/Y/distinctCount",
"type": "application/vnd.sas.cas.column.distinct.count"
},
{
"method": "GET",
"rel": "distinctValues",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CUSTOMERS_UNWRANGLED_DATA/columns/Y/distinctValues",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CUSTOMERS_UNWRANGLED_DATA/columns/Y/distinctValues",
"type": "application/vnd.sas.collection",
"itemType": "text/plain"
},
{
"method": "GET",
"rel": "summaryStatistics",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CUSTOMERS_UNWRANGLED_DATA/columns/Y/summaryStatistics",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CUSTOMERS_UNWRANGLED_DATA/columns/Y/summaryStatistics",
"type": "application/vnd.sas.cas.column.summary.statistics"
}
]
}
{
"version": 3,
"name": "Y",
"label": "New Column",
"type": "double",
"rawLength": 8,
"formattedLength": 8,
"format": "F",
"numberFormatLength": 8,
"numberFormatDecimals": 0,
"indexed": false,
"index": 11,
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CUSTOMERS_UNWRANGLED_DATA/columns",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CUSTOMERS_UNWRANGLED_DATA/columns",
"type": "application/vnd.sas.cas.table"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CUSTOMERS_UNWRANGLED_DATA/columns/Y",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CUSTOMERS_UNWRANGLED_DATA/columns/Y",
"type": "application/vnd.sas.cas.column"
},
{
"method": "GET",
"rel": "frequency",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CUSTOMERS_UNWRANGLED_DATA/columns/Y/frequency",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CUSTOMERS_UNWRANGLED_DATA/columns/Y/frequency",
"type": "application/vnd.sas.cas.column.frequency"
},
{
"method": "GET",
"rel": "distinctCount",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CUSTOMERS_UNWRANGLED_DATA/columns/Y/distinctCount",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CUSTOMERS_UNWRANGLED_DATA/columns/Y/distinctCount",
"type": "application/vnd.sas.cas.column.distinct.count"
},
{
"method": "GET",
"rel": "distinctValues",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CUSTOMERS_UNWRANGLED_DATA/columns/Y/distinctValues",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CUSTOMERS_UNWRANGLED_DATA/columns/Y/distinctValues",
"type": "application/vnd.sas.collection",
"itemType": "text/plain"
},
{
"method": "GET",
"rel": "summaryStatistics",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CUSTOMERS_UNWRANGLED_DATA/columns/Y/summaryStatistics",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CUSTOMERS_UNWRANGLED_DATA/columns/Y/summaryStatistics",
"type": "application/vnd.sas.cas.column.summary.statistics"
}
]
}
400 Response
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | The Column was created successfully. Information about the created Column is returned. | casColumn |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | The requested CAS server does not exist. | None |
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. | None |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Location | string | The location of the newly created resource. |
Get column information
Code samples
# You can also use wget
curl -X GET https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.cas.column+json'
const headers = {
'Accept':'application/vnd.sas.cas.column+json'
};
fetch('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.cas.column+json'
}
r = requests.get('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.cas.column+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}
Returns information about a single column.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
tableName | path | string | true | The name of table for which column info is requested. |
serverName | path | string | true | The name of the server containing the Caslib. |
caslibName | path | string | true | The name of the Caslib containing the table. |
columnName | path | string | true | The name of the column contained in the table. |
sessionId | query | string | false | The optional ID of the session containing the Caslib. If unspecified, only tables in global caslibs will be accessible. |
Example responses
200 Response
{
"index": 0,
"format": "string",
"formattedLength": 0,
"label": "string",
"name": "string",
"numberFormatDecimals": 0,
"numberFormatLength": 0,
"rawLength": 0,
"type": "string",
"version": 0,
"indexed": true
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The requested column information was returned. | casColumn |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | The requested CAS server or Caslib does not exist. | None |
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. | None |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Remove a column
Code samples
# You can also use wget
curl -X DELETE https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.delete('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}
Removes a Column from a loaded table
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | Server name for the operation. |
caslibName | path | string | true | The Caslib name containing the input table. |
tableName | path | string | true | The table name. |
columnName | path | string | true | The column name to be deleted. |
sessionId | query | string | false | Session ID on which to perform the operation. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | The Column was removed. | None |
400 | Bad Request | The request parameters were invalid. | None |
404 | Not Found | The requested CAS server or Caslib does not exist. | None |
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. | None |
Get the distinct count for a column
Code samples
# You can also use wget
curl -X GET https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/distinctCount \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.cas.column.distinct.count+json'
const headers = {
'Accept':'application/vnd.sas.cas.column.distinct.count+json'
};
fetch('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/distinctCount',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.cas.column.distinct.count+json'
}
r = requests.get('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/distinctCount', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.cas.column.distinct.count+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/distinctCount", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/distinctCount
Returns the distinct and missing counts for a single column in the loaded CAS table
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
tableName | path | string | true | The name of table for which column info is requested. |
columnName | path | string | true | The name of column for which distance and missing info is requested. |
serverName | path | string | true | The name of the server containing the Caslib. |
caslibName | path | string | true | The name of the Caslib containing the table. |
sessionId | query | string | false | The optional ID of the session containing the Caslib. If unspecified, only tables in global caslibs will be accessible. |
Example responses
A sample response of a requst for a column's distinct count.
{
"version": 1,
"columnName": "2016/17",
"distinctCount": 30,
"missingCount": 0,
"truncated": false,
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/caslibs/testlib/tables/NBA_2016_TEAMSALARIES/columns/2016/17",
"uri": "/casManagement/servers/cas-shared-default/caslibs/testlib/tables/NBA_2016_TEAMSALARIES/columns/2016/17",
"type": "application/vnd.sas.cas.column"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/caslibs/testlib/tables/NBA_2016_TEAMSALARIES/columns/2016/17/distinctCount",
"uri": "/casManagement/servers/cas-shared-default/caslibs/testlib/tables/NBA_2016_TEAMSALARIES/columns/2016/17/distinctCount",
"type": "application/vnd.sas.cas.column.distinct.count"
}
]
}
{
"version": 1,
"columnName": "2016/17",
"distinctCount": 30,
"missingCount": 0,
"truncated": false,
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/caslibs/testlib/tables/NBA_2016_TEAMSALARIES/columns/2016/17",
"uri": "/casManagement/servers/cas-shared-default/caslibs/testlib/tables/NBA_2016_TEAMSALARIES/columns/2016/17",
"type": "application/vnd.sas.cas.column"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/caslibs/testlib/tables/NBA_2016_TEAMSALARIES/columns/2016/17/distinctCount",
"uri": "/casManagement/servers/cas-shared-default/caslibs/testlib/tables/NBA_2016_TEAMSALARIES/columns/2016/17/distinctCount",
"type": "application/vnd.sas.cas.column.distinct.count"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The requested table's distinct and missing count information for a given column was returned. | casColumnDistinctCount |
404 | Not Found | The requested CAS server or Caslib does not exist. | None |
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. | None |
Get distinct values for a column
Code samples
# You can also use wget
curl -X GET https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/distinctValues
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/distinctValues',
{
method: 'GET'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.get('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/distinctValues')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/distinctValues", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/distinctValues
Returns a collection of distinct values for a single column in a single loaded CAS table. Supports SAS standard paging query parameters. Supports SAS standard paging query parameters, sorting, and filtering. Returned values in the collection are all of the type of the column.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
tableName | path | string | true | The name of table for which column info is requested. |
columnName | path | string | true | The name of column for which distinct values info is requested. |
serverName | path | string | true | The name of the server containing the Caslib. |
caslibName | path | string | true | The name of the Caslib containing the table. |
sessionId | query | string | false | The optional ID of the session containing the Caslib. If unspecified, only tables in global caslibs will be accessible. |
start | query | integer | false | The starting index of the first item in a page. Defaults to 0. |
limit | query | 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. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The requested column's distinct values were returned. | None |
404 | Not Found | The requested CAS server or Caslib does not exist. | None |
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. | None |
Get the frequency for a column
Code samples
# You can also use wget
curl -X GET https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/frequency \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.cas.column.frequency+json'
const headers = {
'Accept':'application/vnd.sas.cas.column.frequency+json'
};
fetch('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/frequency',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.cas.column.frequency+json'
}
r = requests.get('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/frequency', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.cas.column.frequency+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/frequency", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/frequency
Returns the frequency for a single column in the loaded CAS table.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
tableName | path | string | true | The name of table for which column info is requested. |
columnName | path | string | true | The name of column for which frequency info is requested. |
serverName | path | string | true | The name of the server containing the Caslib. |
caslibName | path | string | true | The name of the Caslib containing the table. |
sessionId | query | string | false | The optional ID of the session containing the Caslib. If unspecified, only tables in global caslibs will be accessible. |
limit | query | string | false | The optional limit of the number of items to retrieve. If omitted, a default of 50 will be returned. If set to 0, a limit of 1000 will be returned. |
Example responses
200 Response
{
"columnName": "string",
"columnType": 0,
"frequency": [
{
"formattedValue": "string",
"frequency": 0,
"value": {},
"version": 0
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The requested table's frequency information for a given column was returned. | casColumnFrequency |
404 | Not Found | The requested CAS server or Caslib does not exist. | None |
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. | None |
Get all frequency values for a column
Code samples
# You can also use wget
curl -X POST https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/frequency?outputCaslibName=string&outputTableName=string \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.cas.table+json'
const headers = {
'Accept':'application/vnd.sas.cas.table+json'
};
fetch('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/frequency?outputCaslibName=string&outputTableName=string',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.cas.table+json'
}
r = requests.post('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/frequency', params={
'outputCaslibName': 'string', 'outputTableName': 'string'
}, headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.cas.table+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/frequency", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/frequency
Creates a CAS table containing the frequency for a single column in the loaded CAS table. The result is output to the new CAS table requested by the passed query parameters.
Parameters
Name | In | Type | Required | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
tableName | path | string | true | The name of the input table for which column frequency is requested. | ||||||||||
columnName | path | string | true | The name of column for which frequency info is requested. | ||||||||||
serverName | path | string | true | The name of the server containing the input Caslib. | ||||||||||
caslibName | path | string | true | The name of the Caslib containing the input table. | ||||||||||
outputCaslibName | query | string | true | The name of the Caslib for the output CAS table. | ||||||||||
outputTableName | query | string | true | The name of output CAS table. The following columns of interest will be present in the output table:
|
||||||||||
outputTableScope | query | string | false | The scope of the output table. Valid values in include session and global. Defaults to global. Global caslibs can contain global and session tables. Session caslibs can only contain session tables. | ||||||||||
sessionId | query | string | false | The optional ID of the session containing the Caslib. If unspecified, only tables in global caslibs will be accessible. | ||||||||||
sortBy | query | string | false | The optional order by which to sort the results. If omitted, sorting is not performed. An ascending sort is more performant than a descending sort. Valid sort column names include: Frequency and FmtVar. Valid sort order values include: ascending and descending. When sorting by Frequency, the FmtVar is automatically used as the secondary ascending sort. Sample sortBy values:
|
Example responses
A sample application/vnd.sas.cas.table object.
{
"version": 3,
"name": "CUSTOMERS",
"tableReference": {
"tableUri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~CASUSER/tables/CUSTOMERS",
"sessionId": "ad0b5228-cc89-874c-8893-c1c420f6e0cb",
"sourceCaslibName": "CASUSER",
"sourceTableName": "CUSTOMERS.sashdat"
},
"serverName": "cas-shared-default",
"caslibName": "CASUSER",
"scope": "global",
"state": "loaded",
"repeated": false,
"created": "2017-04-11T17:17:15.373Z",
"lastModified": "2017-04-11T18:50:42.106Z",
"createdBy": "userid",
"lastModifiedBy": "userid",
"lastAccessed": "2017-04-11T19:12:13.102Z",
"sourceLastModified": "2017-03-12T03:43:22.101Z",
"label": "My table label",
"rowCount": 160,
"columnCount": 9,
"characterSet": "UTF8",
"encoding": "utf-8",
"disconnected": false,
"attributes": {
"owner": "someuser",
"size": 115704,
"encryption": "NONE",
"time": "18Nov2016:15:27:28",
"group": "users"
},
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.table"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS",
"type": "application/vnd.sas.cas.table"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS"
},
{
"method": "PUT",
"rel": "updateState",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/state",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/state"
},
{
"method": "PUT",
"rel": "updateScope",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/scope",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/scope",
"responseType": "application/json;text/plain"
},
{
"method": "GET",
"rel": "summaryStatistics",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/summaryStatistics",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/summaryStatistics",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.column"
},
{
"method": "GET",
"rel": "distinctCount",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/distinctCount",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/distinctCount",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.column"
},
{
"method": "GET",
"rel": "columns",
"href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/columns",
"uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/columns",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.column"
},
{
"method": "GET",
"rel": "dataTable",
"href": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~CASUSER/tables/CUSTOMERS",
"uri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~CASUSER/tables/CUSTOMERS",
"type": "application/vnd.sas.data.table"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | The table details for the output table was returned. | tableDetails |
404 | Not Found | The requested CAS server or Caslib does not exist. | None |
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. | None |
Get the summary for a column
Code samples
# You can also use wget
curl -X GET https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/summaryStatistics \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.cas.column.summary.statistics+json'
const headers = {
'Accept':'application/vnd.sas.cas.column.summary.statistics+json'
};
fetch('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/summaryStatistics',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.cas.column.summary.statistics+json'
}
r = requests.get('https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/summaryStatistics', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.cas.column.summary.statistics+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/summaryStatistics", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/summaryStatistics
Returns the summary for a single numeric column in the loaded CAS table.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
tableName | path | string | true | The name of table for which column info is requested. |
columnName | path | string | true | The name of column for which Summary info is requested. |
serverName | path | string | true | The name of the server containing the Caslib. |
caslibName | path | string | true | The name of the Caslib containing the table. |
sessionId | query | string | false | The optional ID of the session containing the Caslib. If unspecified, only tables in global caslibs will be accessible. |
Example responses
200 Response
{
"CSS": 0,
"USS": 0,
"coefficientOfVariation": 0,
"columnName": "string",
"max": 0,
"mean": 0,
"min": 0,
"numMissingValues": 0,
"probT": 0,
"stdDev": 0,
"stdErr": 0,
"sum": 0,
"tValue": 0,
"variance": 0,
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The requested table's summary information for a given column was returned. | casColumnSummaryStatistics |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | The requested CAS server or Caslib does not exist. | None |
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. | None |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Create a frequency table for a column
Code samples
# You can also use wget
curl -X POST https://example.com/casManagement/jobs/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/frequency?outputCaslibName=string&outputTableName=string \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.job.execution.job+json'
const headers = {
'Accept':'application/vnd.sas.job.execution.job+json'
};
fetch('https://example.com/casManagement/jobs/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/frequency?outputCaslibName=string&outputTableName=string',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.job.execution.job+json'
}
r = requests.post('https://example.com/casManagement/jobs/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/frequency', params={
'outputCaslibName': 'string', 'outputTableName': 'string'
}, headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.job.execution.job+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/casManagement/jobs/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/frequency", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /jobs/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/frequency
Creates a job, which gets the frequency for a single column in the loaded CAS table. The result is output to the new CAS table requested by the passed query parameters.
Parameters
Name | In | Type | Required | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
tableName | path | string | true | The name of the input table for which column frequency is requested. | ||||||||||
columnName | path | string | true | The name of column for which frequency info is requested. | ||||||||||
serverName | path | string | true | The name of the server containing the input Caslib. | ||||||||||
caslibName | path | string | true | The name of the Caslib containing the input table. | ||||||||||
outputCaslibName | query | string | true | The name of the Caslib for the output CAS table. | ||||||||||
outputTableName | query | string | true | The name of output CAS table. The following columns of interest are in the output table:
|
||||||||||
outputTableScope | query | string | false | The scope of the output table. Valid values in include session and global. Defaults to global. Global caslibs can contain global and session tables. Session caslibs can only contain session tables. | ||||||||||
sessionId | query | string | false | The optional ID of the session containing the Caslib. If unspecified, only tables in global caslibs will be accessible. | ||||||||||
sortBy | query | string | false | The optional order by which to sort the results. If omitted, sorting is not performed. An ascending sort is more performant than a descending sort. Valid sort column names include: Frequency and FmtVar. Valid sort order values include: ascending and descending. When sorting by Frequency, the FmtVar is automatically used as the secondary ascending sort. Sample sortBy values:
|
Example responses
201 Response
{
"version": 0,
"id": "string",
"state": "string",
"results": {},
"error": {
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
},
"jobRequest": {
"version": 0,
"id": "string",
"name": "string",
"description": "string",
"creationTimeStamp": "string",
"modifiedTimeStamp": "string",
"createdBy": "string",
"modifiedBy": "string",
"jobDefinitionUri": "string",
"jobDefinition": {},
"expiresAfter": "string",
"arguments": {},
"properties": {
"property1": "string",
"property2": "string"
},
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
]
},
"heartbeatInterval": 0,
"heartbeatTimeStamp": "string",
"creationTimeStamp": "string",
"modifiedTimeStamp": "string",
"endTimeStamp": "string",
"expirationTimeStamp": "string",
"createdBy": "string",
"modifiedBy": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | The asynchronous job for obtaining column frequency was submitted. | Inline |
404 | Not Found | The requested CAS server or Caslib does not exist. | None |
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. | None |
Response Schema
Status Code 201
Job
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» version | number | false | none | The version number of the representation. The current version is 2. |
» id | string | true | none | The unique identifier that is generated by the API. |
» state | string | false | none | The current state of the job. Valid values: pending, running, canceled, completed, failed, timedOut |
» results | object | false | none | The output results of the job execution (map of String, String). |
» error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
»» message | string | false | none | The message for the error. |
»» id | string | false | none | The string ID for the error. |
»» errorCode | integer | false | none | The numeric ID for the error. |
»» httpStatusCode | integer | true | none | The HTTP status code for the error. |
»» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
»» remediation | string | false | none | A message that describes how to resolve the error. |
»» errors | [error] | false | none | Any additional errors that occurred. |
»»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
»» links | [link] | false | none | The links that apply to the error. |
»»» Link | link | false | none | A link to a related operation or resource. |
»»»» method | string | false | none | The HTTP method for the link. |
»»»» rel | string | true | none | The relationship of the link to the resource. |
»»»» uri | string | false | none | The relative URI for the link. |
»»»» href | string | false | none | The URL for the link. |
»»»» title | string | false | none | The title for the link. |
»»»» type | string | false | none | The media type or link type for the link. |
»»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
»» version | integer | true | none | The version number of the error representation. This representation is version 2. |
» jobRequest | object | false | none | The job request. |
»» version | integer | false | none | The version number of the representation. The current version is 2. |
»» id | string | true | none | The unique identifier for the job. |
»» name | string | false | none | The name of the job. |
»» description | string | false | none | The description of the job. |
»» creationTimeStamp | string | false | none | The timestamp for when the job was created, in the format of YYYY-MM-DDThh:mm:ss.sssZ . |
»» modifiedTimeStamp | string | false | none | The timestamp for when the job was last modified, in the format of YYYY-MM-DDThh:mm:ss.sssZ . |
»» createdBy | string | false | none | The ID of the user that created or submitted the job. |
»» modifiedBy | string | false | none | The ID of the user that last modified the job. |
»» jobDefinitionUri | string | false | none | The URI of the job definition that is to be executed. |
»» jobDefinition | object | false | none | The definition of the job that is to be executed. |
»» expiresAfter | string | false | none | The duration of time (in W3C XML duration format) after the completion of the job when the job should be deleted by the Job Execution service. |
»» arguments | object | false | none | The values of the arguments described in the job definition. |
»» properties | object | false | none | The value of properties in the format of (map |
»»» additionalProperties | string | false | none | none |
»» links | [link] | false | none | The links that are associated with the job. |
»»» Link | link | false | none | A link to a related operation or resource. |
» heartbeatInterval | integer(int32) | false | none | The interval in seconds that the heartbeatTimeStamp should be updated by the provider or the job times out. The value for the heatbeatInterval is 0 when there is no heartbeat. |
» heartbeatTimeStamp | string | false | none | The timestamp for when the last heartbeat was received, in the format of YYYY-MM-DDThh:mm:ss.sssZ . |
» creationTimeStamp | string | false | none | The timestamp for when the job was created, in the format of YYYY-MM-DDThh:mm:ss.sssZ . |
» modifiedTimeStamp | string | false | none | The timestamp for when the job was last modified, in the format of YYYY-MM-DDThh:mm:ss.sssZ . |
» endTimeStamp | string | false | none | The timestamp for when the state of the job changed to completed or failed, in the format of YYYY-MM-DDThh:mm:ss.sssZ . |
» expirationTimeStamp | string | false | none | The timestamp for when the job expires and will be deleted by the Job Execution service, in the format of YYYY-MM-DDThh:mm:ss.sssZ . This is set by the service after the job has completed based on the value of the expiresAfter member of the job request. |
» createdBy | string | false | none | The ID of the user that created or submitted the job. |
» modifiedBy | string | false | none | The ID of the user that last modified the job. |
» links | [link] | false | none | The links that are associated with the job. |
»» Link | link | false | none | A link to a related operation or resource. |
Provider
Contains operations for data table providers.
Get a collection of tables
Code samples
# You can also use wget
curl -X GET https://example.com/casManagement/dataSources/{dataTableProviderId}/tables \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json' \
-H 'Accept-Item: application/vnd.sas.data.table.summary+json'
const headers = {
'Accept':'application/vnd.sas.collection+json',
'Accept-Item':'application/vnd.sas.data.table.summary+json'
};
fetch('https://example.com/casManagement/dataSources/{dataTableProviderId}/tables',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json',
'Accept-Item': 'application/vnd.sas.data.table.summary+json'
}
r = requests.get('https://example.com/casManagement/dataSources/{dataTableProviderId}/tables', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.collection+json"},
"Accept-Item": []string{"application/vnd.sas.data.table.summary+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/casManagement/dataSources/{dataTableProviderId}/tables", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /dataSources/{dataTableProviderId}/tables
Returns a collection of tables as application/vnd.sas.data.table or application/vnd.sas.data.table.summary. Supports both loaded and unloaded tables.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
start | query | integer | false | The starting index of the first item in a page. Defaults to 0. |
limit | query | 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. |
dataTableProviderId | path | string | true | See Data Tables API documentation for details about dataTableProviderId. A sample value is cas~fs~serverName~fs~caslibName . |
Accept-Item | header | string | false | The desired representation. The Accept-Item options are:
|
loaded | query | boolean | false | Determines whether loaded tables are included in the results. Defaults to true. Note that a value of false does not imply that source tables should be included, only that loaded tables should be excluded. |
scope | query | string | false | When loaded tables are included, determines which loaded tables are returned. Valid values include: - all Includes tables in both session scope and global scope - global Includes tables only in a global scope Defaults to all. |
sources | query | boolean | false | Determines whether source tables are included in the results. Defaults to true. Note that a value of false does not imply that loaded tables should be included, only that source tables should be excluded. |
Enumerated Values
Parameter | Value |
---|---|
Accept-Item | application/vnd.sas.data.table.summary+json |
Accept-Item | application/vnd.sas.data.table+json |
Example responses
400 Response
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. The list of tables was returned. | None |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | The requested CAS server or Caslib does not exist. | None |
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. | None |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Get a table
Code samples
# You can also use wget
curl -X GET https://example.com/casManagement/dataTables/dataSources/{dataTableProviderId}/tables/{tableName} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.data.table+json'
const headers = {
'Accept':'application/vnd.sas.data.table+json'
};
fetch('https://example.com/casManagement/dataTables/dataSources/{dataTableProviderId}/tables/{tableName}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.data.table+json'
}
r = requests.get('https://example.com/casManagement/dataTables/dataSources/{dataTableProviderId}/tables/{tableName}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.data.table+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/casManagement/dataTables/dataSources/{dataTableProviderId}/tables/{tableName}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /dataTables/dataSources/{dataTableProviderId}/tables/{tableName}
Returns a specific table. Supports both loaded and unloaded tables.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
dataTableProviderId | path | string | true | See Data Tables API documentation for details about dataTableProviderId. A sample value is cas~fs~serverName~fs~caslibName . |
tableName | path | string | true | The name of the table. |
loaded | query | boolean | false | Determines whether a loaded table is included in the results. Defaults to true. Note that a value of false does not imply that a source table should be included, only that a loaded table should be excluded. |
scope | query | string | false | When a loaded table is included, determines which loaded table is returned. Valid values include:
|
sources | query | boolean | false | Determines whether a source table is included in the results. Defaults to true. Note that a value of false does not imply that a loaded table should be included, only that a source table should be excluded. |
detailGroups | query | array[string] | false | A comma-separated list of detail groups to return in the representation. Some detail groups require more time to retrieve. This parameter allows opting-in to the following detail groups in cases where they are not already included:
|
Enumerated Values
Parameter | Value |
---|---|
detailGroups | all |
detailGroups | unloadedColumns |
detailGroups | unloadedRows |
Example responses
400 Response
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. The list of tables was returned. | None |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | The requested CAS server or Caslib does not exist. | None |
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. | None |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Loggers
Contains operations to create and manage loggers for a CAS server.
Get a list of loggers
Code samples
# You can also use wget
curl -X GET https://example.com/casManagement/servers/{serverName}/loggers \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('https://example.com/casManagement/servers/{serverName}/loggers',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.get('https://example.com/casManagement/servers/{serverName}/loggers', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.collection+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/casManagement/servers/{serverName}/loggers", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /servers/{serverName}/loggers
Returns a collection of loggers 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.server.logger.summary+json.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | Server name for which nodes are being requested. |
sessionId | query | string | false | Session ID to use when connecting to retrieve the list of nodes. If not specified, a temporary session is used. |
start | query | integer | false | The starting index of the first item in a page. Defaults to 0. |
limit | query | 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. |
filter | query | 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 worker node: filter=eq(role,controller) |
sortBy | query | string(sort-criteria) | false | Sort returned items. An example sort: sortBy=level:descending . The default sort is by name in ascending order. |
Example responses
A sample collection of application/vnd.sas.cas.server.logger.summary objects.
{
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/",
"uri": "/casManagement/servers/cas-shared-default/",
"type": "application/vnd.sas.cas.server"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/loggers?locale=en_US&start=0&limit=50",
"uri": "/casManagement/servers/cas-shared-default/loggers?locale=en_US&start=0&limit=50",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server.logger.summary"
},
{
"method": "GET",
"rel": "collection",
"href": "/casManagement/servers/cas-shared-default/loggers",
"uri": "/casManagement/servers/cas-shared-default/loggers",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server.logger.summary"
}
],
"name": "loggers",
"accept": "application/vnd.sas.cas.server.logger.summary",
"start": 0,
"count": 22,
"items": [
{
"version": 1,
"name": "Admin",
"level": "info"
},
{
"version": 1,
"name": "App",
"level": "info"
},
{
"version": 1,
"name": "App.cas.actions",
"level": "info"
},
{
"version": 1,
"name": "App.cas.table.eventing",
"level": "trace"
},
{
"version": 1,
"name": "App.tk.eam.ssl.Buffer",
"level": "fatal"
},
{
"version": 1,
"name": "App.tk.eam.ssl.openssl102.Locks",
"level": "fatal"
},
{
"version": 1,
"name": "App.tk.eam.ssl.openssl102.Mem",
"level": "fatal"
},
{
"version": 1,
"name": "App.tk.hps.TraceNodes",
"level": "trace"
},
{
"version": 1,
"name": "App.tk.http.server.access",
"level": "error"
},
{
"version": 1,
"name": "App.tk.HTTPC.debug",
"level": "fatal"
},
{
"version": 1,
"name": "App.tk.HTTPC.wire",
"level": "fatal"
},
{
"version": 1,
"name": "Audit",
"level": "info"
},
{
"version": 1,
"name": "Audit.Authentication.cas.function",
"level": "info"
},
{
"version": 1,
"name": "Audit.Authorization.cas.ACChange",
"level": "info"
},
{
"version": 1,
"name": "Audit.Authorization.cas.function",
"level": "info"
},
{
"version": 1,
"name": "Audit.Authorization.cas.IsAuth",
"level": "info"
},
{
"version": 1,
"name": "Audit.Authorization.cas.persist",
"level": "info"
},
{
"version": 1,
"name": "Audit.Authorization.cas.sync",
"level": "info"
},
{
"version": 1,
"name": "Audit.Authorization.cas.xml",
"level": "info"
},
{
"version": 1,
"name": "Logging",
"level": "error"
},
{
"version": 1,
"name": "Perf.cas.actions",
"level": "info"
},
{
"version": 1,
"name": "root",
"level": "error"
}
],
"limit": 50,
"version": 2
}
{
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/",
"uri": "/casManagement/servers/cas-shared-default/",
"type": "application/vnd.sas.cas.server"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/loggers?locale=en_US&start=0&limit=50",
"uri": "/casManagement/servers/cas-shared-default/loggers?locale=en_US&start=0&limit=50",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server.logger.summary"
},
{
"method": "GET",
"rel": "collection",
"href": "/casManagement/servers/cas-shared-default/loggers",
"uri": "/casManagement/servers/cas-shared-default/loggers",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server.logger.summary"
}
],
"name": "loggers",
"accept": "application/vnd.sas.cas.server.logger.summary",
"start": 0,
"count": 22,
"items": [
{
"version": 1,
"name": "Admin",
"level": "info"
},
{
"version": 1,
"name": "App",
"level": "info"
},
{
"version": 1,
"name": "App.cas.actions",
"level": "info"
},
{
"version": 1,
"name": "App.cas.table.eventing",
"level": "trace"
},
{
"version": 1,
"name": "App.tk.eam.ssl.Buffer",
"level": "fatal"
},
{
"version": 1,
"name": "App.tk.eam.ssl.openssl102.Locks",
"level": "fatal"
},
{
"version": 1,
"name": "App.tk.eam.ssl.openssl102.Mem",
"level": "fatal"
},
{
"version": 1,
"name": "App.tk.hps.TraceNodes",
"level": "trace"
},
{
"version": 1,
"name": "App.tk.http.server.access",
"level": "error"
},
{
"version": 1,
"name": "App.tk.HTTPC.debug",
"level": "fatal"
},
{
"version": 1,
"name": "App.tk.HTTPC.wire",
"level": "fatal"
},
{
"version": 1,
"name": "Audit",
"level": "info"
},
{
"version": 1,
"name": "Audit.Authentication.cas.function",
"level": "info"
},
{
"version": 1,
"name": "Audit.Authorization.cas.ACChange",
"level": "info"
},
{
"version": 1,
"name": "Audit.Authorization.cas.function",
"level": "info"
},
{
"version": 1,
"name": "Audit.Authorization.cas.IsAuth",
"level": "info"
},
{
"version": 1,
"name": "Audit.Authorization.cas.persist",
"level": "info"
},
{
"version": 1,
"name": "Audit.Authorization.cas.sync",
"level": "info"
},
{
"version": 1,
"name": "Audit.Authorization.cas.xml",
"level": "info"
},
{
"version": 1,
"name": "Logging",
"level": "error"
},
{
"version": 1,
"name": "Perf.cas.actions",
"level": "info"
},
{
"version": 1,
"name": "root",
"level": "error"
}
],
"limit": 50,
"version": 2
}
400 Response
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The list of loggers for the requested CAS server was returned. | casLoggerCollection |
400 | Bad Request | An error occurred. | Inline |
404 | Not Found | The requested CAS server does not exist. | None |
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. | None |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Add a logger
Code samples
# You can also use wget
curl -X POST https://example.com/casManagement/servers/{serverName}/loggers \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.cas.server.logger+json' \
-H 'Accept: application/vnd.sas.cas.server.logger+json'
const inputBody = '{
"version": 1,
"name": "App",
"level": "info",
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/loggers",
"uri": "/casManagement/servers/cas-shared-default/loggers",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server.logger.summary"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/loggers/App",
"uri": "/casManagement/servers/cas-shared-default/loggers/App",
"type": "application/vnd.sas.cas.server.logger"
}
]
}';
const headers = {
'Content-Type':'application/vnd.sas.cas.server.logger+json',
'Accept':'application/vnd.sas.cas.server.logger+json'
};
fetch('https://example.com/casManagement/servers/{serverName}/loggers',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.cas.server.logger+json',
'Accept': 'application/vnd.sas.cas.server.logger+json'
}
r = requests.post('https://example.com/casManagement/servers/{serverName}/loggers', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.cas.server.logger+json"},
"Accept": []string{"application/vnd.sas.cas.server.logger+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/casManagement/servers/{serverName}/loggers", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /servers/{serverName}/loggers
Adds a logger to a CAS server and returns the logger information.
Body parameter
A sample application/vnd.sas.cas.server.logger object.
{
"version": 1,
"name": "App",
"level": "info",
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/loggers",
"uri": "/casManagement/servers/cas-shared-default/loggers",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server.logger.summary"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/loggers/App",
"uri": "/casManagement/servers/cas-shared-default/loggers/App",
"type": "application/vnd.sas.cas.server.logger"
}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | Server name in which the logger is to be created. |
body | body | casServerLogger | true | none |
Example responses
A sample application/vnd.sas.cas.server.logger object.
{
"version": 1,
"name": "App",
"level": "info",
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/loggers",
"uri": "/casManagement/servers/cas-shared-default/loggers",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server.logger.summary"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/loggers/App",
"uri": "/casManagement/servers/cas-shared-default/loggers/App",
"type": "application/vnd.sas.cas.server.logger"
}
]
}
{
"version": 1,
"name": "App",
"level": "info",
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/loggers",
"uri": "/casManagement/servers/cas-shared-default/loggers",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server.logger.summary"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/loggers/App",
"uri": "/casManagement/servers/cas-shared-default/loggers/App",
"type": "application/vnd.sas.cas.server.logger"
}
]
}
400 Response
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Information about the created logger was returned. | casServerLogger |
400 | Bad Request | An error occurred. | Inline |
404 | Not Found | The requested CAS server does not exist. | None |
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. | None |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Location | string | The location of the newly created resource. |
Get a logger
Code samples
# You can also use wget
curl -X GET https://example.com/casManagement/servers/{serverName}/loggers/{loggerName} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.cas.server.logger.summary+json'
const headers = {
'Accept':'application/vnd.sas.cas.server.logger.summary+json'
};
fetch('https://example.com/casManagement/servers/{serverName}/loggers/{loggerName}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.cas.server.logger.summary+json'
}
r = requests.get('https://example.com/casManagement/servers/{serverName}/loggers/{loggerName}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.cas.server.logger.summary+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/casManagement/servers/{serverName}/loggers/{loggerName}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /servers/{serverName}/loggers/{loggerName}
Retrieves a single logger for a CAS server.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | Server name for which the logger information is being requested. The media type passed to the request determines if either detailed or summary information is returned. In this version of the API, the content of both are the same. Passing an accept header of application/json is equivalent to requesting detailed information. |
loggerName | path | string | true | Logger to delete. |
sessionId | query | string | false | Session ID to use when connecting to retrieve the logger. If not specified, a temporary session is used. |
Example responses
A sample application/vnd.sas.cas.server.logger.summary object.
{
"version": 1,
"name": "App",
"level": "info",
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/loggers",
"uri": "/casManagement/servers/cas-shared-default/loggers",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server.logger.summary"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/loggers/App",
"uri": "/casManagement/servers/cas-shared-default/loggers/App",
"type": "application/vnd.sas.cas.server.logger.summary"
}
]
}
{
"version": 1,
"name": "App",
"level": "info",
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/loggers",
"uri": "/casManagement/servers/cas-shared-default/loggers",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server.logger.summary"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/loggers/App",
"uri": "/casManagement/servers/cas-shared-default/loggers/App",
"type": "application/vnd.sas.cas.server.logger.summary"
}
]
}
{
"version": 1,
"name": "App",
"level": "info",
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/loggers",
"uri": "/casManagement/servers/cas-shared-default/loggers",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server.logger.summary"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/loggers/App",
"uri": "/casManagement/servers/cas-shared-default/loggers/App",
"type": "application/vnd.sas.cas.server.logger.summary"
}
]
}
400 Response
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The requested information about the logger was returned. | casServerLoggerSummary |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | The requested session in the requested server name does not exist, or the logger requested does not exist. | None |
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. | None |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Update a logger
Code samples
# You can also use wget
curl -X PUT https://example.com/casManagement/servers/{serverName}/loggers/{loggerName} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.cas.server.logger+json' \
-H 'Accept: application/vnd.sas.cas.server.logger+json'
const inputBody = '{
"version": 1,
"name": "App",
"level": "info",
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/loggers",
"uri": "/casManagement/servers/cas-shared-default/loggers",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server.logger.summary"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/loggers/App",
"uri": "/casManagement/servers/cas-shared-default/loggers/App",
"type": "application/vnd.sas.cas.server.logger"
}
]
}';
const headers = {
'Content-Type':'application/vnd.sas.cas.server.logger+json',
'Accept':'application/vnd.sas.cas.server.logger+json'
};
fetch('https://example.com/casManagement/servers/{serverName}/loggers/{loggerName}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.cas.server.logger+json',
'Accept': 'application/vnd.sas.cas.server.logger+json'
}
r = requests.put('https://example.com/casManagement/servers/{serverName}/loggers/{loggerName}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.cas.server.logger+json"},
"Accept": []string{"application/vnd.sas.cas.server.logger+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://example.com/casManagement/servers/{serverName}/loggers/{loggerName}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /servers/{serverName}/loggers/{loggerName}
Updates a logger for a CAS server.
Body parameter
A sample application/vnd.sas.cas.server.logger object.
{
"version": 1,
"name": "App",
"level": "info",
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/loggers",
"uri": "/casManagement/servers/cas-shared-default/loggers",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server.logger.summary"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/loggers/App",
"uri": "/casManagement/servers/cas-shared-default/loggers/App",
"type": "application/vnd.sas.cas.server.logger"
}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | Server name for which the logger information is being updated. |
loggerName | path | string | true | Logger to delete. |
sessionId | query | string | false | Session ID to use when connecting to update the logger. If not specified, a temporary session is used. |
body | body | casServerLogger | true | The logger to update. |
Example responses
A sample application/vnd.sas.cas.server.logger object.
{
"version": 1,
"name": "App",
"level": "info",
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/loggers",
"uri": "/casManagement/servers/cas-shared-default/loggers",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server.logger.summary"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/loggers/App",
"uri": "/casManagement/servers/cas-shared-default/loggers/App",
"type": "application/vnd.sas.cas.server.logger"
}
]
}
{
"version": 1,
"name": "App",
"level": "info",
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/loggers",
"uri": "/casManagement/servers/cas-shared-default/loggers",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server.logger.summary"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/loggers/App",
"uri": "/casManagement/servers/cas-shared-default/loggers/App",
"type": "application/vnd.sas.cas.server.logger"
}
]
}
400 Response
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Updated information for the specified logger was returned. | casServerLogger |
304 | Not Modified | The logger was not modified. | None |
400 | Bad Request | An error occurred. | Inline |
404 | Not Found | The requested session in the requested server name does not exist, or the logger requested does not exist. | None |
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. | None |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Remove a logger
Code samples
# You can also use wget
curl -X DELETE https://example.com/casManagement/servers/{serverName}/loggers/{loggerName} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: */*'
const headers = {
'Accept':'*/*'
};
fetch('https://example.com/casManagement/servers/{serverName}/loggers/{loggerName}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': '*/*'
}
r = requests.delete('https://example.com/casManagement/servers/{serverName}/loggers/{loggerName}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"*/*"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "https://example.com/casManagement/servers/{serverName}/loggers/{loggerName}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /servers/{serverName}/loggers/{loggerName}
Removes a logger from a CAS server.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | Server name containing the logger. |
loggerName | path | string | true | Logger to delete. |
Example responses
400 Response
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | The logger was removed. | None |
400 | Bad Request | An error occurred. | Inline |
404 | Not Found | The requested session in the requested server name does not exist, or the logger does not exist. | None |
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. | None |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Policies
Contains operations to create and manage policies on a CAS server.
Get a list of policies
Code samples
# You can also use wget
curl -X GET https://example.com/casManagement/servers/{serverName}/policies \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('https://example.com/casManagement/servers/{serverName}/policies',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.get('https://example.com/casManagement/servers/{serverName}/policies', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.collection+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/casManagement/servers/{serverName}/policies", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /servers/{serverName}/policies
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.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | Server name for which policies are being requested. |
start | query | integer | false | The starting index of the first item in a page. Defaults to 0. |
limit | query | 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. |
filter | query | 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') |
sortBy | query | string(sort-criteria) | false | Sort returned items. An example sort: sortBy=type:descending . The default sort is by name in ascending order. |
Example responses
A sample collection of application/vnd.sas.cas.server.policy.summary objects.
{
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/",
"uri": "/casManagement/servers/cas-shared-default/",
"type": "application/vnd.sas.cas.server"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/policies?locale=en_US&start=0&limit=10",
"uri": "/casManagement/servers/cas-shared-default/policies?locale=en_US&start=0&limit=10",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server.policy.summary"
},
{
"method": "GET",
"rel": "collection",
"href": "/casManagement/servers/cas-shared-default/policies",
"uri": "/casManagement/servers/cas-shared-default/policies",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server.policy.summary"
}
],
"name": "policies",
"accept": "application/vnd.sas.cas.server.policy.summary",
"start": 0,
"count": 4,
"items": [
{
"version": 1,
"name": "cas-shared-default-priority-1",
"type": "priorityLevels",
"attributes": [
{
"key": "localTables",
"value": {
"12000000000": null
}
},
{
"key": "cpu",
"value:": {
"45": null
}
},
{
"key": "globalCasuser",
"value": {
"33000000000": null
}
},
{
"key": "globalCasuserHdfs",
"value": {
"15000000000": null
}
}
]
},
{
"version": 1,
"name": "cas-shared-default-priority-2",
"type": "priorityLevels",
"attributes": [
{
"key": "localTables",
"value": {
"50000000000": null
}
},
{
"key": "cpu",
"value": {
"20": null
}
},
{
"key": "globalCasuser",
"value": {
"50000000000": null
}
},
{
"key": "globalCasuserHdfs",
"value": {
"50000000000": null
}
}
]
},
{
"version": 1,
"name": "cas-shared-default-priority-3",
"type": "priorityLevels",
"attributes": [
{
"key": "cpu",
"value": {
"30": null
}
},
{
"key": "localTables",
"value": {
"10000000000": null
}
},
{
"key": "globalCasuser",
"value": {
"10000000000": null
}
},
{
"key": "globalCasuserHdfs",
"value": {
"10000000000": null
}
}
]
},
{
"version": 1,
"name": "globalCaslibs",
"type": "globalCaslibs",
"attributes": [
{
"key": "_ALL_",
"value": {
"400000000000": null
}
},
{
"key": "HPS",
"value": {
"100000000000": null
}
},
{
"key": "Public",
"value": {
"200000000000": null
}
}
]
}
],
"limit": 10,
"version": 2
}
{
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/",
"uri": "/casManagement/servers/cas-shared-default/",
"type": "application/vnd.sas.cas.server"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/policies?locale=en_US&start=0&limit=10",
"uri": "/casManagement/servers/cas-shared-default/policies?locale=en_US&start=0&limit=10",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server.policy.summary"
},
{
"method": "GET",
"rel": "collection",
"href": "/casManagement/servers/cas-shared-default/policies",
"uri": "/casManagement/servers/cas-shared-default/policies",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server.policy.summary"
}
],
"name": "policies",
"accept": "application/vnd.sas.cas.server.policy.summary",
"start": 0,
"count": 4,
"items": [
{
"version": 1,
"name": "cas-shared-default-priority-1",
"type": "priorityLevels",
"attributes": [
{
"key": "localTables",
"value": {
"12000000000": null
}
},
{
"key": "cpu",
"value:": {
"45": null
}
},
{
"key": "globalCasuser",
"value": {
"33000000000": null
}
},
{
"key": "globalCasuserHdfs",
"value": {
"15000000000": null
}
}
]
},
{
"version": 1,
"name": "cas-shared-default-priority-2",
"type": "priorityLevels",
"attributes": [
{
"key": "localTables",
"value": {
"50000000000": null
}
},
{
"key": "cpu",
"value": {
"20": null
}
},
{
"key": "globalCasuser",
"value": {
"50000000000": null
}
},
{
"key": "globalCasuserHdfs",
"value": {
"50000000000": null
}
}
]
},
{
"version": 1,
"name": "cas-shared-default-priority-3",
"type": "priorityLevels",
"attributes": [
{
"key": "cpu",
"value": {
"30": null
}
},
{
"key": "localTables",
"value": {
"10000000000": null
}
},
{
"key": "globalCasuser",
"value": {
"10000000000": null
}
},
{
"key": "globalCasuserHdfs",
"value": {
"10000000000": null
}
}
]
},
{
"version": 1,
"name": "globalCaslibs",
"type": "globalCaslibs",
"attributes": [
{
"key": "_ALL_",
"value": {
"400000000000": null
}
},
{
"key": "HPS",
"value": {
"100000000000": null
}
},
{
"key": "Public",
"value": {
"200000000000": null
}
}
]
}
],
"limit": 10,
"version": 2
}
400 Response
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The list of policies for the requested CAS server was returned. | casPolicyCollection |
400 | Bad Request | An error occurred. | Inline |
404 | Not Found | The requested CAS server or policy does not exist. | None |
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. | None |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Add a policy
Code samples
# You can also use wget
curl -X POST https://example.com/casManagement/servers/{serverName}/policies \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.cas.server.policy+json' \
-H 'Accept: application/vnd.sas.cas.server.policy+json'
const inputBody = '{
"version": 1,
"name": "cas-shared-default-priority-3",
"type": "priorityLevels",
"attributes": [
{
"key": "cpu",
"value": {
"30": null
}
},
{
"key": "localTables",
"value": {
"10000000000": null
}
},
{
"key": "globalCasuser",
"value": {
"10000000000": null
}
},
{
"key": "globalCasuserHdfs",
"value": {
"10000000000": null
}
}
],
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/policies",
"uri": "/casManagement/servers/cas-shared-default/policies",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server.policy.summary"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/policies/cas-shared-default-priority-3",
"uri": "/casManagement/servers/cas-shared-default/policies/cas-shared-default-priority-3",
"type": "application/vnd.sas.cas.server.policy"
}
]
}';
const headers = {
'Content-Type':'application/vnd.sas.cas.server.policy+json',
'Accept':'application/vnd.sas.cas.server.policy+json'
};
fetch('https://example.com/casManagement/servers/{serverName}/policies',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.cas.server.policy+json',
'Accept': 'application/vnd.sas.cas.server.policy+json'
}
r = requests.post('https://example.com/casManagement/servers/{serverName}/policies', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.cas.server.policy+json"},
"Accept": []string{"application/vnd.sas.cas.server.policy+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/casManagement/servers/{serverName}/policies", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /servers/{serverName}/policies
Adds a policy to a CAS server and returns the created policy information.
Body parameter
A sample application/vnd.sas.cas.server.policy object.
{
"version": 1,
"name": "cas-shared-default-priority-3",
"type": "priorityLevels",
"attributes": [
{
"key": "cpu",
"value": {
"30": null
}
},
{
"key": "localTables",
"value": {
"10000000000": null
}
},
{
"key": "globalCasuser",
"value": {
"10000000000": null
}
},
{
"key": "globalCasuserHdfs",
"value": {
"10000000000": null
}
}
],
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/policies",
"uri": "/casManagement/servers/cas-shared-default/policies",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server.policy.summary"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/policies/cas-shared-default-priority-3",
"uri": "/casManagement/servers/cas-shared-default/policies/cas-shared-default-priority-3",
"type": "application/vnd.sas.cas.server.policy"
}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | Server name in which the policy is to be created. |
body | body | casServerPolicy | true | none |
Example responses
A sample application/vnd.sas.cas.server.policy object.
{
"version": 1,
"name": "cas-shared-default-priority-3",
"type": "priorityLevels",
"attributes": [
{
"key": "cpu",
"value": {
"30": null
}
},
{
"key": "localTables",
"value": {
"10000000000": null
}
},
{
"key": "globalCasuser",
"value": {
"10000000000": null
}
},
{
"key": "globalCasuserHdfs",
"value": {
"10000000000": null
}
}
],
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/policies",
"uri": "/casManagement/servers/cas-shared-default/policies",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server.policy.summary"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/policies/cas-shared-default-priority-3",
"uri": "/casManagement/servers/cas-shared-default/policies/cas-shared-default-priority-3",
"type": "application/vnd.sas.cas.server.policy"
}
]
}
{
"version": 1,
"name": "cas-shared-default-priority-3",
"type": "priorityLevels",
"attributes": [
{
"key": "cpu",
"value": {
"30": null
}
},
{
"key": "localTables",
"value": {
"10000000000": null
}
},
{
"key": "globalCasuser",
"value": {
"10000000000": null
}
},
{
"key": "globalCasuserHdfs",
"value": {
"10000000000": null
}
}
],
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/policies",
"uri": "/casManagement/servers/cas-shared-default/policies",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server.policy.summary"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/policies/cas-shared-default-priority-3",
"uri": "/casManagement/servers/cas-shared-default/policies/cas-shared-default-priority-3",
"type": "application/vnd.sas.cas.server.policy"
}
]
}
400 Response
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Information about the created policy was returned. | casServerPolicy |
400 | Bad Request | An error occurred. | Inline |
404 | Not Found | The requested CAS server does not exist. | None |
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. | None |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Location | string | The location of the newly created resource. |
Get a policy
Code samples
# You can also use wget
curl -X GET https://example.com/casManagement/servers/{serverName}/policies/{policyName} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.cas.server.policy.summary+json'
const headers = {
'Accept':'application/vnd.sas.cas.server.policy.summary+json'
};
fetch('https://example.com/casManagement/servers/{serverName}/policies/{policyName}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.cas.server.policy.summary+json'
}
r = requests.get('https://example.com/casManagement/servers/{serverName}/policies/{policyName}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.cas.server.policy.summary+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/casManagement/servers/{serverName}/policies/{policyName}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /servers/{serverName}/policies/{policyName}
Retrieves a single policy for a CAS server.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | Server name for which the policy information is being requested. The media type passed to the request determines whether detailed or summary information is returned. In this version of the API, the content of both are the same. Passing an accept header of application/json is equivalent to requesting detailed information. |
policyName | path | string | true | Policy to delete. |
Example responses
A sample application/vnd.sas.cas.server.policy.summary object.
{
"version": 1,
"name": "cas-shared-default-priority-3",
"type": "priorityLevels",
"attributes": [
{
"key": "cpu",
"value": {
"30": null
}
},
{
"key": "localTables",
"value": {
"10000000000": null
}
},
{
"key": "globalCasuser",
"value": {
"10000000000": null
}
},
{
"key": "globalCasuserHdfs",
"value": {
"10000000000": null
}
}
],
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/policies",
"uri": "/casManagement/servers/cas-shared-default/policies",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server.policy.summary"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/policies/cas-shared-default-priority-3",
"uri": "/casManagement/servers/cas-shared-default/policies/cas-shared-default-priority-3",
"type": "application/vnd.sas.cas.server.policy.summary"
}
]
}
{
"version": 1,
"name": "cas-shared-default-priority-3",
"type": "priorityLevels",
"attributes": [
{
"key": "cpu",
"value": {
"30": null
}
},
{
"key": "localTables",
"value": {
"10000000000": null
}
},
{
"key": "globalCasuser",
"value": {
"10000000000": null
}
},
{
"key": "globalCasuserHdfs",
"value": {
"10000000000": null
}
}
],
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/policies",
"uri": "/casManagement/servers/cas-shared-default/policies",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server.policy.summary"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/policies/cas-shared-default-priority-3",
"uri": "/casManagement/servers/cas-shared-default/policies/cas-shared-default-priority-3",
"type": "application/vnd.sas.cas.server.policy.summary"
}
]
}
{
"version": 1,
"name": "cas-shared-default-priority-3",
"type": "priorityLevels",
"attributes": [
{
"key": "cpu",
"value": {
"30": null
}
},
{
"key": "localTables",
"value": {
"10000000000": null
}
},
{
"key": "globalCasuser",
"value": {
"10000000000": null
}
},
{
"key": "globalCasuserHdfs",
"value": {
"10000000000": null
}
}
],
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/policies",
"uri": "/casManagement/servers/cas-shared-default/policies",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server.policy.summary"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/policies/cas-shared-default-priority-3",
"uri": "/casManagement/servers/cas-shared-default/policies/cas-shared-default-priority-3",
"type": "application/vnd.sas.cas.server.policy.summary"
}
]
}
400 Response
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The requested information about the policy was returned. | casServerPolicySummary |
400 | Bad Request | An error occurred. | Inline |
404 | Not Found | The requested server name does not exist, or the policy requested does not exist. | None |
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. | None |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Update a policy
Code samples
# You can also use wget
curl -X PUT https://example.com/casManagement/servers/{serverName}/policies/{policyName} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.cas.server.policy+json' \
-H 'Accept: application/vnd.sas.cas.server.policy+json'
const inputBody = '{
"version": 1,
"name": "cas-shared-default-priority-3",
"type": "priorityLevels",
"attributes": [
{
"key": "cpu",
"value": {
"30": null
}
},
{
"key": "localTables",
"value": {
"10000000000": null
}
},
{
"key": "globalCasuser",
"value": {
"10000000000": null
}
},
{
"key": "globalCasuserHdfs",
"value": {
"10000000000": null
}
}
],
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/policies",
"uri": "/casManagement/servers/cas-shared-default/policies",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server.policy.summary"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/policies/cas-shared-default-priority-3",
"uri": "/casManagement/servers/cas-shared-default/policies/cas-shared-default-priority-3",
"type": "application/vnd.sas.cas.server.policy"
}
]
}';
const headers = {
'Content-Type':'application/vnd.sas.cas.server.policy+json',
'Accept':'application/vnd.sas.cas.server.policy+json'
};
fetch('https://example.com/casManagement/servers/{serverName}/policies/{policyName}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.cas.server.policy+json',
'Accept': 'application/vnd.sas.cas.server.policy+json'
}
r = requests.put('https://example.com/casManagement/servers/{serverName}/policies/{policyName}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.cas.server.policy+json"},
"Accept": []string{"application/vnd.sas.cas.server.policy+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://example.com/casManagement/servers/{serverName}/policies/{policyName}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /servers/{serverName}/policies/{policyName}
Updates a policy for a CAS server.
Body parameter
A sample application/vnd.sas.cas.server.policy object.
{
"version": 1,
"name": "cas-shared-default-priority-3",
"type": "priorityLevels",
"attributes": [
{
"key": "cpu",
"value": {
"30": null
}
},
{
"key": "localTables",
"value": {
"10000000000": null
}
},
{
"key": "globalCasuser",
"value": {
"10000000000": null
}
},
{
"key": "globalCasuserHdfs",
"value": {
"10000000000": null
}
}
],
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/policies",
"uri": "/casManagement/servers/cas-shared-default/policies",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server.policy.summary"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/policies/cas-shared-default-priority-3",
"uri": "/casManagement/servers/cas-shared-default/policies/cas-shared-default-priority-3",
"type": "application/vnd.sas.cas.server.policy"
}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | Server name for which the policy information is being updated. |
policyName | path | string | true | Policy to delete. |
body | body | casServerPolicy | true | Fields to update in the existing policy. |
Example responses
A sample application/vnd.sas.cas.server.policy object.
{
"version": 1,
"name": "cas-shared-default-priority-3",
"type": "priorityLevels",
"attributes": [
{
"key": "cpu",
"value": {
"30": null
}
},
{
"key": "localTables",
"value": {
"10000000000": null
}
},
{
"key": "globalCasuser",
"value": {
"10000000000": null
}
},
{
"key": "globalCasuserHdfs",
"value": {
"10000000000": null
}
}
],
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/policies",
"uri": "/casManagement/servers/cas-shared-default/policies",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server.policy.summary"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/policies/cas-shared-default-priority-3",
"uri": "/casManagement/servers/cas-shared-default/policies/cas-shared-default-priority-3",
"type": "application/vnd.sas.cas.server.policy"
}
]
}
{
"version": 1,
"name": "cas-shared-default-priority-3",
"type": "priorityLevels",
"attributes": [
{
"key": "cpu",
"value": {
"30": null
}
},
{
"key": "localTables",
"value": {
"10000000000": null
}
},
{
"key": "globalCasuser",
"value": {
"10000000000": null
}
},
{
"key": "globalCasuserHdfs",
"value": {
"10000000000": null
}
}
],
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/policies",
"uri": "/casManagement/servers/cas-shared-default/policies",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server.policy.summary"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/policies/cas-shared-default-priority-3",
"uri": "/casManagement/servers/cas-shared-default/policies/cas-shared-default-priority-3",
"type": "application/vnd.sas.cas.server.policy"
}
]
}
400 Response
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Updated information for the specified policy was returned. | casServerPolicy |
304 | Not Modified | The policy was not modified. | None |
400 | Bad Request | An error occurred. | Inline |
404 | Not Found | Either the server name does not exist, or the policy for which an update is requested does not exist. | None |
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. | None |
412 | Precondition Failed | Precondition Failed. | Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 412
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Remove a policy
Code samples
# You can also use wget
curl -X DELETE https://example.com/casManagement/servers/{serverName}/policies/{policyName} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: */*'
const headers = {
'Accept':'*/*'
};
fetch('https://example.com/casManagement/servers/{serverName}/policies/{policyName}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': '*/*'
}
r = requests.delete('https://example.com/casManagement/servers/{serverName}/policies/{policyName}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"*/*"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "https://example.com/casManagement/servers/{serverName}/policies/{policyName}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /servers/{serverName}/policies/{policyName}
Removes a policy from a CAS server.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverName | path | string | true | Server name containing the policy. |
policyName | path | string | true | Policy to delete. |
Example responses
400 Response
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | The policy was removed. | None |
400 | Bad Request | An error occurred. | Inline |
404 | Not Found | The server name does not exist, or the policy does not exist. | None |
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. | None |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [error] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1dataSources~1%7BdataTableProviderId%7D~1tables/get/responses/400/content/application~1vnd.sas.collection%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Settings
Contains operations to return settings information.
Get the shared API settings
Code samples
# You can also use wget
curl -X GET https://example.com/casManagement/commons/settings \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.attributes+json'
const headers = {
'Accept':'application/vnd.sas.attributes+json'
};
fetch('https://example.com/casManagement/commons/settings',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.attributes+json'
}
r = requests.get('https://example.com/casManagement/commons/settings', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.attributes+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/casManagement/commons/settings", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /commons/settings
Returns the possible settings that this API shares.
Example responses
A sample settings object.
{
"version": 1,
"links": [
{
"method": "GET",
"rel": "self",
"href": "/casManagement/commons/settings",
"uri": "/casManagement/commons/settings"
}
],
"attributes": {
"application.casServer": "cas-shared-default",
"application.caslib": "AppData",
"default.casServer": "cas-shared-default",
"default.caslib": "Public",
"system.casServer": "cas-shared-default",
"system.caslib": "SystemData",
"reference.caslib": "ReferenceData",
"tempTablesCopiesCount": 0,
"fileUploadEnabled": true,
"maxFileUploadSize": 4096
}
}
{
"version": 1,
"links": [
{
"method": "GET",
"rel": "self",
"href": "/casManagement/commons/settings",
"uri": "/casManagement/commons/settings"
}
],
"attributes": {
"application.casServer": "cas-shared-default",
"application.caslib": "AppData",
"default.casServer": "cas-shared-default",
"default.caslib": "Public",
"system.casServer": "cas-shared-default",
"system.caslib": "SystemData",
"reference.caslib": "ReferenceData",
"tempTablesCopiesCount": 0,
"fileUploadEnabled": true,
"maxFileUploadSize": 4096
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | settings |
Schemas
casColumnCollection
{
"name": "string",
"start": 0,
"limit": 0,
"count": 0,
"accept": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0,
"items": [
{
"index": 0,
"format": "string",
"formattedLength": 0,
"label": "string",
"name": "string",
"numberFormatDecimals": 0,
"numberFormatLength": 0,
"rawLength": 0,
"type": "string",
"version": 0,
"indexed": true
}
]
}
Session Collection
Properties
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2) |
» name | string | false | none | The name of the collection. |
» start | integer(int64) | false | none | The zero-based index of the first item in the collection. |
» limit | integer | false | none | The number of items that were requested for the collection. |
» count | integer(int64) | false | none | If populated indicates the number of items in the collection. |
» accept | string | false | none | A space-delimited list of media types from which an Accept header may be constructed. |
» links | [link] | false | none | The links that apply to the collection. |
» version | integer | false | none | The version number of the collection representation. This representation is version 2. |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» items | [casColumn] | false | none | An array containing CAS column resources. |
casColumn
{
"index": 0,
"format": "string",
"formattedLength": 0,
"label": "string",
"name": "string",
"numberFormatDecimals": 0,
"numberFormatLength": 0,
"rawLength": 0,
"type": "string",
"version": 0,
"indexed": true
}
CAS Column
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
index | integer | false | none | The sequential index number of the column in the table. |
format | string | false | none | The format of the column. |
formattedLength | integer | true | none | The formatted length of the column. |
label | string | false | none | The label of the column. |
name | string | true | none | The name of the column. |
numberFormatDecimals | integer | false | none | The value of the numberFormatDecimals setting on the column. |
numberFormatLength | integer | false | none | The value of the numberFormatLength setting on the column. |
rawLength | integer | true | none | The raw length of the column. |
type | string | true | none | The type of the column. |
version | integer | false | none | Version of this object. |
indexed | boolean | false | none | This value is true if the column is indexed. |
casColumnCreate
{
"name": "string",
"type": "string",
"label": "string",
"format": "string",
"formattedLength": 0,
"numberFormatLength": 0,
"numberFormatDecimals": 0,
"rawLength": 0,
"version": 0
}
CAS Column
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | true | none | The name of the column. |
type | string | true | none | The type of the column. Valid values are CHAR, NUM, VARCHAR. |
label | string | false | none | The label of the column. |
format | string | false | none | The format of the column. |
formattedLength | integer | false | none | The formatted length of the column. |
numberFormatLength | integer | false | none | The value of the numberFormatLength setting on the column. |
numberFormatDecimals | integer | false | none | The value of the numberFormatDecimals setting on the column. |
rawLength | integer | false | none | The raw length of the column. If not specified, or cannot be inferred from other provided values, defaults to 8. |
version | integer | false | none | Version of this object. Default version is 1. |
casColumnCreateRequest
{
"column": {
"name": "string",
"type": "string",
"label": "string",
"format": "string",
"formattedLength": 0,
"numberFormatLength": 0,
"numberFormatDecimals": 0,
"rawLength": 0,
"version": 0
},
"outputTableName": "string",
"replaceTable": true
}
CAS Column Create Request
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
column | casColumnCreate | false | none | Column information. |
outputTableName | string | false | none | Optional output table name. Defaults to the input table name being referenced. |
replaceTable | boolean | false | none | If output table already exists, replace it. Defaults to false. |
casColumnDistinctCount
{
"columnName": "string",
"distinctCount": 0,
"missingCount": 0,
"truncated": true,
"version": 0
}
CAS Column Distinct Count
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
columnName | string | true | none | Name of the column. |
distinctCount | integer | true | none | Number of distinct values. |
missingCount | integer | true | none | Number of missing values. |
truncated | boolean | true | none | True if the counts were truncated. False otherwise. |
version | integer | false | none | The version of this object. |
casColumnFrequency
{
"columnName": "string",
"columnType": 0,
"frequency": [
{
"formattedValue": "string",
"frequency": 0,
"value": {},
"version": 0
}
],
"version": 0
}
CAS Column Frequency
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
columnName | string | true | none | Name of the column. |
columnType | integer | true | none | The column type. |
frequency | [casColumnFrequencyValue] | true | none | List of column frequency values. |
version | integer | false | none | The version of this object. |
casColumnFrequencyValue
{
"formattedValue": "string",
"frequency": 0,
"value": {},
"version": 0
}
CAS Column Frequency Value
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
formattedValue | string | true | none | The formatted value. |
frequency | integer(double) | true | none | The frequency. |
value | object | true | none | The value. |
version | integer | false | none | The version of this object. |
casColumnSummaryStatistics
{
"CSS": 0,
"USS": 0,
"coefficientOfVariation": 0,
"columnName": "string",
"max": 0,
"mean": 0,
"min": 0,
"numMissingValues": 0,
"probT": 0,
"stdDev": 0,
"stdErr": 0,
"sum": 0,
"tValue": 0,
"variance": 0,
"version": 0
}
CAS Column Summary Statistics
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
CSS | integer(double) | true | none | The sum of squares corrected for the mean statistic. |
USS | integer(double) | true | none | The uncorrected sum of squares statistic. |
coefficientOfVariation | integer(double) | true | none | The coefficient of variation statistic. |
columnName | string | true | none | The summary name. |
max | integer(double) | true | none | The max statistic. |
mean | integer(double) | true | none | The mean statistic. |
min | integer(double) | true | none | The min statistic. |
numMissingValues | integer(double) | true | none | The number of missing values statistic. |
probT | integer | true | none | The probT statistic. |
stdDev | integer(double) | true | none | The standard deviation statistic. |
stdErr | integer(double) | true | none | The standard error statistic. |
sum | integer(double) | true | none | The sum statistic. |
tValue | integer(double) | true | none | The tValue statistic. |
variance | integer(double) | true | none | The variance statistic. |
version | integer | false | none | The version of this object. |
casLoadRequest
{
"copies": 0,
"label": "string",
"outputCaslibName": "string",
"outputTableName": "string",
"parameters": {},
"replace": true,
"replaceMode": "string",
"scope": "string"
}
CAS Load Request
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
copies | integer | false | none | Number of copies to create in memory. Defaults to 1. |
label | string | false | none | Label to use on the output table. |
outputCaslibName | string | true | none | Name of the output caslib to which the source table or external file will be loaded. If not specified, defaults to the caslib name containing the table to be loaded. |
outputTableName | string | true | none | Name of the output CAS table. If not specified, defaults to the same name as the table being loaded. |
parameters | object | false | none | A name and value pair map of additional parameters to pass when performing the load. These parameters generally are passed directly to the Caslib source as part of the load operation and are specific to the source type. Exceptions include the following parameters, which are passed directly to the load operation: * importOptions * groupBy * orderBy * vars See the CAS action documentation for loadTable for more information about the valid parameter values. |
replace | boolean | false | none | If true, any pre-existing table with the same name is replaced. Defaults to false. Note that already-loaded global tables cannot be replaced. |
replaceMode | string | false | none | When replace is true, the replace mode to use when the table is already at loaded state. Valid values include: * always - always replace * newer - replace only if the source table is newer than the last time the table was loaded If omitted, defaults to always. |
scope | string | false | none | Scope to which to load the table. Valid values include \session\ and \global. Defaults to \global. |
casSaveRequest
{
"caslibName": "string",
"format": "string",
"replace": true,
"compress": true,
"tableName": "string",
"sourceTableName": "string",
"parameters": {}
}
CAS Save Request
Properties
Name | Type | Required | Restrictions | Description | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
caslibName | string | false | none | Name of the output caslib to which the source table or external file will be written. If not specified, defaults to the caslib name containing the table to be saved. | ||||||||||||||||||||||||||||||||||||||||
format | string | false | none | Format of the output file. Valid values include sashdat, csv, parquet, sas7bdat. Defaults to sashdat. | ||||||||||||||||||||||||||||||||||||||||
replace | boolean | false | none | If true, any pre-existing table with the same name is replaced. Defaults to false. | ||||||||||||||||||||||||||||||||||||||||
compress | boolean | false | none | If true and saving to a sashdat, the saved table is compressed. Defaults to false. | ||||||||||||||||||||||||||||||||||||||||
tableName | string | false | none | Name of the output table or external file. If specified, this name is always used. The file extension will always honor the format requested (or default to sashdat). If this parameter is not specified, the name defaults to the same name as the source of the table being saved, provided it differs in case only from the name of the table being saved. If no source table name is available, then the name will be the same as the table. The following table shows sample scenarios and the value chosen by default for the tableName when this parameter is omitted.
|
||||||||||||||||||||||||||||||||||||||||
sourceTableName | string | false | none | Normally, the source table name for an unloaded table is determined automatically and this option is not required. If specified, this specific source table name is used as the source data to read for the save table operation. | ||||||||||||||||||||||||||||||||||||||||
parameters | object | false | none | A name/value pair map of additional parameters to pass when performing the save in the event that the table being saved is not already in memory as a CAS table and needs to be accessed from the source. These parameters generally are passed directly to the caslib source when accessing the data and are specific to the source type. Exceptions include the following parameters, which are passed directly to the Save operation: * importOptions * groupBy * orderBy * vars See the CAS action documentation for saveTable for details about the valid parameter values. |
casTableCreateRequest
{
"version": 0,
"tableName": "string",
"replace": true,
"columns": [
{
"name": "string",
"type": "string",
"label": "string",
"format": "string",
"formattedLength": 0,
"numberFormatLength": 0,
"numberFormatDecimals": 0,
"rawLength": 0,
"version": 0
}
]
}
CAS Table Create Request
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
version | integer | false | none | The version of the schema. |
tableName | string | false | none | Name of the output table to be created. |
replace | boolean | false | none | If true, any pre-existing loaded table with the same name is replaced. Defaults to false. |
columns | [casColumnCreate] | false | none | [Column information.] |
casAppendRequest
{
"sourceCaslibName": "string",
"sourceTableName": "string",
"singlePass": true,
"filter": "string"
}
CAS Append Request
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
sourceCaslibName | string | false | none | Name of the input caslib containing the table specified by sourceTableName. If not specified, defaults to the caslib name of the target table from the URL. |
sourceTableName | string | false | none | Name of the input table containing the rows to be appended. |
singlePass | boolean | false | none | If true, CAS will avoid creating a transient table for the source table on the server. While this can be efficient, the data might not have stable ordering upon repeated runs. Defaults to false. |
filter | string | false | none | If specified, the filter to be applied to records from the source table. This allows a subset of the source table records to be appended to the target table. If omitted, all source table records will be appended. |
casServerCollection
{
"name": "string",
"start": 0,
"limit": 0,
"count": 0,
"accept": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0,
"items": [
{
"description": "string",
"host": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"name": "string",
"port": 0,
"restPort": 0,
"restProtocol": "string",
"version": 0,
"tags": {
"value": "string"
}
}
]
}
CAS Server Collection
Properties
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | casColumnCollection | false | none | This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2) |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» items | [casServer] | false | none | An array containing casServer resources. |
casServer
{
"description": "string",
"host": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"name": "string",
"port": 0,
"restPort": 0,
"restProtocol": "string",
"version": 0,
"tags": {
"value": "string"
}
}
CAS Server
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
description | string | true | none | Description of the server. |
host | string | true | none | Host name or IP address of the server. |
links | [object] | false | none | The navigable links relative to this media type. |
» Link | object | false | none | A link to a related operation or resource. |
»» method | string | false | none | The HTTP method for the link. |
»» rel | string | true | none | The relationship of the link to the resource. |
»» uri | string | false | none | The relative URI for the link. |
»» href | string | false | none | The URL for the link. |
»» title | string | false | none | The title for the link. |
»» type | string | false | none | The media type or link type for the link. |
»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
name | string | true | none | The unique server name. |
port | integer | true | none | Port on which the server is running. |
restPort | integer | true | none | Port on which the REST server is running. |
restProtocol | string | true | none | The protocol the REST server is using. Values include http or https. |
version | integer | true | none | The version of the schema. |
tags | stringArray | false | none | An array of tag values set on the server. |
casServerConnection
{
"host": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"port": 0,
"serverName": "string",
"sessionId": "string",
"version": 0
}
CAS Server Connection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
host | string | true | none | Host name or IP address of the server. |
links | [link] | false | none | The navigable links relative to this media type. |
port | integer | true | none | Port on which the server is running. |
serverName | string | true | none | The unique server name. |
sessionId | string | false | none | Session ID associated with the connection. |
version | integer | false | none | The version of the schema. |
casServerMetrics
{
"cpuSystemTime": 0,
"cpuUserTime": 0,
"elapsedTime": 0,
"host": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"memory": 0,
"memoryOs": 0,
"memoryQuota": 0,
"memorySystem": 0,
"port": 0,
"serverName": "string",
"systemCores": 0,
"systemNodes": 0,
"systemTotalMemory": 0,
"userId": "string",
"version": 0
}
CAS Server Metrics
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
cpuSystemTime | number(double) | true | none | System CPU time. |
cpuUserTime | number(double) | true | none | User CPU time. |
elapsedTime | number(double) | true | none | Elapsed time. |
host | string | true | none | Host name or IP address of the server. |
links | [link] | false | none | The navigable links relative to this media type. |
memory | integer(int64) | true | none | Total memory. |
memoryOs | integer(int64) | true | none | OS memory. |
memoryQuota | integer(int64) | true | none | Memory quota. |
memorySystem | integer(int64) | true | none | System memory. |
port | integer | true | none | The port on which the server is running. |
serverName | string | true | none | The unique server name. |
systemCores | integer | true | none | Number of system cores. |
systemNodes | integer | true | none | Number of system nodes. |
systemTotalMemory | integer(int64) | true | none | Total system memory. |
userId | string | true | none | Owner of the server process. |
version | integer | false | none | The version of the schema. |
casSessionCollection
{
"name": "string",
"start": 0,
"limit": 0,
"count": 0,
"accept": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0,
"items": [
{
"authenticationType": "string",
"id": "string",
"locale": "string",
"name": "string",
"nodeCount": 0,
"owner": "string",
"state": "string",
"timeOut": 0
}
]
}
Session Collection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
Session Collection | any | false | none | The list of sessions for the requested CAS server. |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | casColumnCollection | false | none | This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2) |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» items | [casSession] | false | none | An array containing CAS session resources. |
casSession
{
"authenticationType": "string",
"id": "string",
"locale": "string",
"name": "string",
"nodeCount": 0,
"owner": "string",
"state": "string",
"timeOut": 0
}
Session
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
authenticationType | string | true | none | The type of authentication used by the session. Valid values include OAuth, Windows, SSPI, External, PAM, Kerberos. |
id | string | true | none | ID of the session. |
locale | string | false | none | The locale of the session. If creating a new session, defaults to the locale of the Accept-Language header passed to the request. Sample values include en-us (US English), zh-cn (Chinese Simplified), ko-kr (Korean). |
name | string | false | none | Name of the session. If not specified, defaults to casManagement. |
nodeCount | integer | false | none | Number of nodes the session will use in the grid. |
owner | string | true | none | Owner of the session. |
state | string | true | none | Connected state of the session. Valid values include Inactive, Connected, Disconnected, Exception, Terminate, Removed. |
timeOut | integer | false | none | Number of seconds after the last connection to the session is closed before session is terminated. |
casSessionSummary
{
"authenticationType": "string",
"id": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"name": "string",
"owner": "string",
"state": "string",
"transactionState": "string"
}
Session Summary
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
authenticationType | string | true | none | The type of authentication used by the session. Valid values include OAuth, Windows, SSPI, External, PAM, Kerberos. |
id | string | true | none | ID of the session. |
links | [link] | false | none | The navigable links relative to this media type. |
name | string | false | none | Name of the session. |
owner | string | true | none | Owner of the session. |
state | string | true | none | Connected state of the session. Valid values include Inactive, Connected, Disconnected, Exception, Terminate, Removed. |
transactionState | string | false | none | State of transaction on the session. Valid values include started and none. |
emptyResponse
"Empty Response"
An empty response.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | string | false | none | An empty response. |
casSourceTableCollection
{
"name": "string",
"start": 0,
"limit": 0,
"count": 0,
"accept": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0,
"items": [
{
"attributes": {},
"name": "string",
"lastModified": "string"
}
]
}
Source Table or File Collection
Properties
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | casColumnCollection | false | none | This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2) |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» items | [casSourceTable] | false | none | An array containing CAS source table or file resources. |
casSourceTable
{
"attributes": {},
"name": "string",
"lastModified": "string"
}
CAS Source Table or File
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
attributes | object | false | none | List of key/object pairs for the attributes of the source table. For example, a path-based CAS library can include attributes for file system attributes, like owner, group, time, permission, or size as reported by the underlying filesystem. A database CAS library can include attributes like catalog or schema. |
name | string | true | none | Name of the table. |
lastModified | string | false | none | Date/time the source file or table was last modified (when available). |
casTableReference
{
"sessionId": "string",
"sourceCaslibName": "string",
"sourceTableName": "string",
"tableUri": "string"
}
Table Reference
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
sessionId | string | false | none | Session ID of the table. For tables in session scope, the session ID is required to access it. |
sourceCaslibName | string | false | none | Optional name of the source caslib corresponding to the table. |
sourceTableName | string | false | none | Optional name of the source table file corresponding to the table. |
tableUri | string | true | none | Reference to the table. |
caslibCollection
{
"name": "string",
"start": 0,
"limit": 0,
"count": 0,
"accept": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0,
"items": [
{
"attributes": [
{
"key": "string",
"value": {}
}
],
"description": "string",
"name": "string",
"metadataId": "string",
"path": "string",
"scope": "string",
"hidden": true,
"transient": true,
"type": "string",
"version": 0
}
]
}
Caslib Collection
Properties
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | casColumnCollection | false | none | This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2) |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» items | [caslib] | false | none | An array containing caslib resources. |
caslib
{
"attributes": [
{
"key": "string",
"value": {}
}
],
"description": "string",
"name": "string",
"metadataId": "string",
"path": "string",
"scope": "string",
"hidden": true,
"transient": true,
"type": "string",
"version": 0
}
Caslib
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
attributes | [keyValueModel] | false | none | Contains an array of key/object pairs related to caslib type-specific settings. Supports simple object types (string, boolean, integer, long) as well as nested arrays. See reference documentation for specific caslib types to determine proper key/object pairs for defining a specific caslib. |
description | string | false | none | Description of the caslib. |
name | string | true | none | Name of the caslib. |
metadataId | string | false | none | A read-only property containing the metadata ID assigned to this caslib. |
path | string | false | none | The path of the caslib. |
scope | string | false | none | The scope of the caslib. Valid values include session or global. |
hidden | boolean | false | none | The hidden value of the caslib. True if this is a hidden caslib. False otherwise. |
transient | boolean | false | none | The transient value of the caslib. True if this is a transient caslib. False otherwise. |
type | string | true | none | Type of the Caslib. Valid values include any caslib type supported by the CAS server, such as Path, HDFS, DNFS, LASR, Teradata, Greenplum, and Oracle. |
version | integer | false | none | The version of this object. |
caslibCreateRequest
{
"caslib": {
"attributes": [
{
"key": "string",
"value": {}
}
],
"description": "string",
"name": "string",
"metadataId": "string",
"path": "string",
"scope": "string",
"hidden": true,
"transient": true,
"type": "string",
"version": 0
},
"createDirectory": true,
"permission": "string",
"version": 0
}
Caslib Create Request
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
caslib | caslib | true | none | The representation of a caslib. Note that links are returned only for GET calls. |
createDirectory | boolean | false | none | Indicates whether the directory in the filesystem should be created when defining the Caslib. |
permission | string | false | none | If the directory is being created, determines the permission to set on the filesystem directory. Valid values include GROUPREAD, GROUPWRITE, GROUPWRITEPUBLICREAD, PRIVATE, PUBLICREAD, and PUBLICWRITE. |
version | integer | false | none | The version of this object. |
keyValueModel
{
"key": "string",
"value": {}
}
Key/Value Array
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
key | string | true | none | The key name. |
value | object | false | none | The value of the key. |
attributesMap
{
"application": {
"casServer": "string",
"caslib": "string"
},
"default": {
"casServer": "string",
"caslib": "string"
},
"reference": {
"casServer": "string",
"caslib": "string"
},
"system": {
"casServer": "string",
"caslib": "string"
},
"tempTablesCopiesCount": 0,
"fileUploadEnabled": true,
"maxFileUploadSize": 0
}
Attributes Nap
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
application | applicationCaslib | false | none | The CAS server and Caslib containing application data, such as map data. |
default | defaultCaslib | false | none | The default CAS server and Caslib for users. |
reference | referenceCaslib | false | none | The CAS server and Caslib containing reference data. |
system | systemCaslib | false | none | The CAS server and Caslib used by the system for data produced during normal operation, such as audit records and monitoring data |
tempTablesCopiesCount | integer | false | none | The number of extra copies of temporary tables. |
fileUploadEnabled | boolean | false | none | The setting used to enable/disable local file uploads. |
maxFileUploadSize | integer | false | none | The maximum file size in megabytes allowed for local file uploads. A value of -1 indicates no size limit. |
applicationCaslib
{
"casServer": "string",
"caslib": "string"
}
Application Caslib
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
casServer | string | false | none | The name of the CAS server. |
caslib | string | false | none | The name of the CAS library. |
defaultCaslib
{
"casServer": "string",
"caslib": "string"
}
Default Caslib
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
casServer | string | false | none | The name of the CAS server. |
caslib | string | false | none | The name of the CAS library. |
referenceCaslib
{
"casServer": "string",
"caslib": "string"
}
Reference Caslib
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
casServer | string | false | none | The name of the CAS server. |
caslib | string | false | none | The name of the CAS library. |
systemCaslib
{
"casServer": "string",
"caslib": "string"
}
System Caslib
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
casServer | string | false | none | The name of the CAS server. |
caslib | string | false | none | The name of the CAS library. |
settings
{
"version": 0,
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"attributes": {
"application": {
"casServer": "string",
"caslib": "string"
},
"default": {
"casServer": "string",
"caslib": "string"
},
"reference": {
"casServer": "string",
"caslib": "string"
},
"system": {
"casServer": "string",
"caslib": "string"
},
"tempTablesCopiesCount": 0,
"fileUploadEnabled": true,
"maxFileUploadSize": 0
}
}
CAS Management Service Settings
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
version | integer | true | none | Version information for this attribute list. |
links | [link] | true | none | The navigable links relative to this media type. |
attributes | attributesMap | true | none | The settings for this service. |
stringArray
{
"value": "string"
}
String Array
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
value | string | true | none | An individual string value. |
tableCollection
{
"name": "string",
"start": 0,
"limit": 0,
"count": 0,
"accept": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0,
"items": [
{
"attributes": {},
"characterSet": "string",
"columnCount": 0,
"created": "string",
"createdBy": "string",
"encoding": "string",
"lastModified": "string",
"lastModifiedBy": "string",
"lastAccessed": "string",
"sourceLastModified": "string",
"label": "string",
"name": "string",
"repeated": true,
"rowCount": 0,
"disconnected": true,
"scope": "string",
"state": "string",
"tableReference": {
"sessionId": "string",
"sourceCaslibName": "string",
"sourceTableName": "string",
"tableUri": "string"
}
}
]
}
Tables Collection
Properties
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | casColumnCollection | false | none | This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2) |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» items | [tableDetails] | false | none | An array containing table resources. |
tableDetails
{
"attributes": {},
"characterSet": "string",
"columnCount": 0,
"created": "string",
"createdBy": "string",
"encoding": "string",
"lastModified": "string",
"lastModifiedBy": "string",
"lastAccessed": "string",
"sourceLastModified": "string",
"label": "string",
"name": "string",
"repeated": true,
"rowCount": 0,
"disconnected": true,
"scope": "string",
"state": "string",
"tableReference": {
"sessionId": "string",
"sourceCaslibName": "string",
"sourceTableName": "string",
"tableUri": "string"
}
}
Table Details
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
attributes | object | false | none | List of key/object pairs for additional attributes of the source table. For example, a path-based CAS library can include attributes for file system attributes, like owner, group, time, permission, or size as reported by the underlying filesystem. |
characterSet | string | true | none | Character set of the table. |
columnCount | integer(int64) | true | none | Number of columns in the table. |
created | string | true | none | Date created represented as a string. |
createdBy | string | true | none | User who created the table in memory. This is the last user who changed the state of the table to 'loaded'. |
encoding | string | true | none | Encoding of the table. |
lastModified | string | true | none | Date last modified represented as a string. |
lastModifiedBy | string | false | none | User who last modified the loaded table in memory. This value is returned only if the in-memory table has been modified. Otherwise, the table has not been modified since loaded by the 'createdBy' user. |
lastAccessed | string | false | none | For loaded tables, the date last accessed is represented as a string. |
sourceLastModified | string | false | none | Date the source file or table was last modified (when available). |
label | string | false | none | Label of the table, if available. |
name | string | true | none | Name of the table. |
repeated | boolean | false | none | True if the table is repeated. |
rowCount | integer(int64) | false | none | Number of rows in the table. Depending upon the cost of obtaining this value, it can be omitted in some cases. |
disconnected | boolean | false | none | Whether the table is disconnected from its original source or not. If value is true, then permissions set on this table will not be set on the original/underlying table. |
scope | string | true | none | For a table with state of loaded, the scope of the loaded table. Valid values are session or global. |
state | string | true | none | Indicates whether a table is loaded into CAS. Valid values are loaded or unloaded. |
tableReference | casTableReference | false | none | Table reference information. |
casServerNodeCollection
{
"name": "string",
"start": 0,
"limit": 0,
"count": 0,
"accept": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0,
"items": [
{
"name": "string",
"role": "string",
"ipAddress": "string",
"connected": true,
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
]
}
Node Collection
Properties
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | casColumnCollection | false | none | This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2) |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» items | [casServerNode] | false | none | An array containing node resources. |
casServerNode
{
"name": "string",
"role": "string",
"ipAddress": "string",
"connected": true,
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
CAS Server Node
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | true | none | The fully qualified domain name of the server node. |
role | string | true | none | The role of the node either 'controller' or 'worker'. |
ipAddress | string | true | none | The IP address of the node. |
connected | boolean | true | none | True if connected to CAS. |
links | [link] | true | none | The navigable links relative to this media type. |
version | integer | true | none | Version of the schema. This representation is version 2. |
casServerNodeCreateRequest
{
"name": "string"
}
CAS Server Node Create Request
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | true | none | The fully qualified domain name of the server node. |
casLoggerCollection
{
"name": "string",
"start": 0,
"limit": 0,
"count": 0,
"accept": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0,
"items": [
{
"name": "string",
"level": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
]
}
Logger Collection
Properties
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | casColumnCollection | false | none | This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2) |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» items | [casServerLoggerSummary] | false | none | An array containing logger resources. |
casServerLoggerSummary
{
"name": "string",
"level": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
CAS Server Logger Summary
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | true | none | The name of the logger. |
level | string | true | none | The level of the logger. Valid level values include info, warn, error, fatal, debug, and trace. |
links | [link] | false | none | The navigable links relative to this media type. |
version | integer | true | none | Version of the schema. This representation is version 1. |
casServerLogger
{
"name": "string",
"level": "string",
"applyToController": true,
"applyToNewSessions": true,
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
CAS Server Logger
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | true | none | The name of the logger. |
level | string | true | none | The level of the logger. Valid level values include info, warn, error, fatal, debug, and trace. |
applyToController | boolean | false | none | This property is used only when modifying logger settings. It is not returned when reading settings. If true, the change will apply both at the controller level and session level. If true, applyToNewSessions option is treated as true. |
applyToNewSessions | boolean | false | none | This property is used only when modifying logger settings. It is not returned when reading settings. If true, the change will apply only to the current session, but will apply to newly created sessions on the CAS server. If false, the change will apply only to the current session, and will not apply to future sessions. Defaults to false if unspecified. If applyToController is set to true, then the change will always apply to new sessions, and applyToNewSessions property is ignored. |
links | [link] | false | none | The navigable links relative to this media type. |
version | integer | true | none | Version of the schema. This representation is version 1. |
casPolicyCollection
{
"name": "string",
"start": 0,
"limit": 0,
"count": 0,
"accept": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0,
"items": [
{
"name": "string",
"type": "string",
"attributes": [
{
"key": "string",
"value": {}
}
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
]
}
Policy Collection
Properties
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | casColumnCollection | false | none | This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2) |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» items | [casServerPolicySummary] | false | none | An array containing policy resources. |
casServerPolicySummary
{
"name": "string",
"type": "string",
"attributes": [
{
"key": "string",
"value": {}
}
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
CAS Server Policy Summary
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | true | none | The name of the policy. |
type | string | true | none | The type of the policy. Valid type values include globalCaslibs, priorityLevels, and priorityAssignments. |
attributes | [keyValueModel] | true | none | List of key/value pairs for the attributes of the policy. See the CAS documentation for details about valid keys and values for each policy type. |
links | [link] | false | none | The navigable links relative to this media type. |
version | integer | true | none | Version of the schema. This representation is version 1. |
casServerPolicy
{
"name": "string",
"type": "string",
"attributes": [
{
"key": "string",
"value": {}
}
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
CAS Server Policy
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | true | none | The name of the policy. |
type | string | true | none | The type of the policy. Valid type values include globalCaslibs, priorityLevels, and priorityAssignments. |
attributes | [keyValueModel] | false | none | List of key/value pairs for the attributes of the policy. See the CAS documentation for details about valid keys and values for each policy type. |
links | [link] | false | none | The navigable links relative to this media type. |
version | integer | true | none | Version of the schema. This representation is version 1. |
updateServerState
{
"state": "running"
}
Update Server State
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
state | string | false | none | State of the server. |
Enumerated Values
Property | Value |
---|---|
state | running |
state | starting |
state | stopping |
state | stopped |
engineCollection
{
"name": "string",
"start": 0,
"limit": 0,
"count": 0,
"accept": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0,
"items": [
{
"version": 0,
"name": "string",
"nickname": "string",
"legalName": "string",
"providerId": "string",
"dataSourceId": "string",
"licensed": true,
"hasDefinition": true,
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
]
}
]
}
Engine Collection
Properties
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | casColumnCollection | false | none | This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2) |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» items | [engine] | true | none | The array that contains engine resources. |
engine
{
"version": 0,
"name": "string",
"nickname": "string",
"legalName": "string",
"providerId": "string",
"dataSourceId": "string",
"licensed": true,
"hasDefinition": true,
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
]
}
Engine
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
version | integer | false | none | The media type's schema version number. |
name | string | false | none | The unique name of this engine within its data source. |
nickname | string | false | none | The user visible nickname of the engine. |
legalName | string | false | none | The engine's short legal name. |
providerId | string | false | none | The unique identifier of this engine's provider. |
dataSourceId | string | false | none | The unique identifier of this engine's parent data source. |
licensed | boolean | false | none | If true, the engine is licensed. If false, the engine is not licensed. |
hasDefinition | boolean | false | none | If true, the engine has an associated definition. If false, the definition link is omitted. |
links | [link] | false | none | The links that apply to this object. |
engineDefinition
{}
Engine Definition
Properties
None
Examples
Github Examples
Detailed examples on how to use this API can be found on Github.
Media Type Samples
Table of Contents generated with DocToc
- application/vnd.sas.api
- application/vnd.sas.collection
- application/vnd.sas.error
- application/vnd.sas.cas.server
- application/vnd.sas.cas.server+json
- application/vnd.sas.cas.server.connection
- application/vnd.sas.cas.server.connection+json
- application/vnd.sas.cas.server.metrics
- application/vnd.sas.cas.server.metrics+json
- application/vnd.sas.cas.server.policy.summary
- application/vnd.sas.cas.server.policy+json
- application/vnd.sas.cas.session.summary
- application/vnd.sas.cas.session+json
- application/vnd.sas.cas.server.node
- application/vnd.sas.cas.caslib
- application/vnd.sas.cas.caslib+json
- application/vnd.sas.cas.table
- application/vnd.sas.cas.table+json
- application/vnd.sas.cas.column
- application/vnd.sas.cas.column+json
- application/vnd.sas.cas.column.distinct.count
- application/vnd.sas.cas.column.distinct.count+json
- application/vnd.sas.cas.column.frequency
- application/vnd.sas.cas.column.frequency+json
- application/vnd.sas.cas.column.summary.statistics
- application/vnd.sas.cas.column.summary.statistics+json
- application/vnd.sas.cas.source.table
- application/vnd.sas.cas.source.table+json
- application/vnd.sas.cas.caslib.create.request
- application/vnd.sas.cas.caslib.create.request+json
- application/vnd.sas.cas.table.load.request
- application/vnd.sas.cas.table.load.request+json
- application/vnd.sas.cas.table.save.request
- application/vnd.sas.cas.table.save.request+json
- application/vnd.sas.cas.table.append.request
- application/vnd.sas.cas.table.append.request+json
- application/vnd.sas.cas.table.reference
application/vnd.sas.api
Contains top-level links for this API. See application/vnd.sas.api
.
application/vnd.sas.collection
A paginated, filterable, sortable collection of resource representations.
See application/vnd.sas.collection
.
In this API, this media type.
represents the collection of one of the resources provided by the API, as indicated in the following table:
Collection | Item type |
---|---|
servers | application/vnd.sas.cas.server |
policies | application/vnd.sas.cas.server.policy |
nodes | application/vnd.sas.cas.server.node |
sessions | application/vnd.sas.cas.session.summary |
caslibs | application/vnd.sas.cas.caslib |
tables | application/vnd.sas.cas.table |
sources | application/vnd.sas.cas.source.table |
columns | application/vnd.sas.cas.column |
application/vnd.sas.error
Contains information about an error that occurred in the request.
See application/vnd.sas.error
application/vnd.sas.cas.server
Detail information about a CAS server.
This media type is described by casServer.
Link Relationships
This media type includes the following links:
Relation | Method | URI | Description |
---|---|---|---|
up | GET | /servers | Returns the collection of CAS server definitions. |
self | GET | /servers/{serverName} | Returns the definition of the CAS server. |
connection | GET | /servers/{serverName}/connection | Returns connection information for server. |
state | GET | /servers/{serverName}/state | Returns state information for server. Returns 'running' or 'stopped'. |
metrics | GET | /servers/{serverName}/metrics | Returns metrics for server. |
sessions | GET | /servers/{serverName}/sessions | Returns the sessions collection. |
createSession | POST | /servers/{serverName}/sessions | Creates a new session on the server. |
caslibs | GET | /servers/{serverName}/caslibs | Returns the caslibs collection. |
dataSource | GET | /dataSources/providers/cas/sources/{serverName} | Returns the dataSources service representation of this CAS server. |
application/vnd.sas.cas.server+json
Here is an example of the JSON representation of this media type.
{
"version": 1,
"name": "cas-shared-default",
"description": "controller",
"host": "myhost.example.com",
"port": 5570,
"restPort": 8777,
"restProtocol": "http",
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers",
"uri": "/casManagement/servers",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default",
"uri": "/casManagement/servers/cas-shared-default",
"type": "application/vnd.sas.cas.server"
},
{
"method": "GET",
"rel": "connection",
"href": "/casManagement/servers/cas-shared-default/connection",
"uri": "/casManagement/servers/cas-shared-default/connection",
"type": "application/vnd.sas.cas.server.connection"
},
{
"method": "GET",
"rel": "state",
"href": "/casManagement/servers/cas-shared-default/state",
"uri": "/casManagement/servers/cas-shared-default/state",
"type": "text/plain"
},
{
"method": "PUT",
"rel": "updateState",
"href": "/casManagement/servers/cas-shared-default/state",
"uri": "/casManagement/servers/cas-shared-default/state",
"type": "text/plain"
},
{
"method": "GET",
"rel": "nodes",
"href": "/casManagement/servers/cas-shared-default/nodes",
"uri": "/casManagement/servers/cas-shared-default/nodes",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server.node"
},
{
"method": "GET",
"rel": "metrics",
"href": "/casManagement/servers/cas-shared-default/metrics",
"uri": "/casManagement/servers/cas-shared-default/metrics",
"type": "application/vnd.sas.cas.server.metrics"
},
{
"method": "GET",
"rel": "sessions",
"href": "/casManagement/servers/cas-shared-default/sessions",
"uri": "/casManagement/servers/cas-shared-default/sessions",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.session.summary"
},
{
"method": "POST",
"rel": "createSession",
"href": "/casManagement/servers/cas-shared-default/sessions",
"uri": "/casManagement/servers/cas-shared-default/sessions",
"type": "application/vnd.sas.cas.session",
"responseType": "application/vnd.sas.cas.session"
},
{
"method": "GET",
"rel": "caslibs",
"href": "/casManagement/servers/cas-shared-default/caslibs",
"uri": "/casManagement/servers/cas-shared-default/caslibs",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.caslib"
},
{
"method": "GET",
"rel": "casProxy",
"href": "/casProxy/servers/cas-shared-default/cas",
"uri": "/casProxy/servers/cas-shared-default/cas",
"type": "application/json"
},
{
"method": "GET",
"rel": "dataSource",
"href": "/dataSources/providers/cas/sources/cas-shared-default",
"uri": "/dataSources/providers/cas/sources/cas-shared-default",
"type": "application/vnd.sas.data.source"
}
],
"tags": [
"appServerEnabled=True",
"rootLibPath=/opt/sas/viya/config/data/cas/default"
]
}
application/vnd.sas.cas.server.connection
CAS server connection information.
This media type is described by casServerConnection.
Link Relationships
This media type includes the following links:
Relation | Method | URI | Description |
---|---|---|---|
self | GET | /servers/{serverName}/connection | Returns connection information for the CAS server. |
up | GET | /servers/{serverName} | Returns the definition of the CAS server. |
application/vnd.sas.cas.server.connection+json
Here is an example of the JSON representation of this media type.
{
"version": 1,
"serverName": "cas-shared-default",
"sessionId": "1234-5432-1234-5423",
"host": "myhost.example.com",
"port": 5570,
"links": [
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/connection",
"uri": "/casManagement/servers/cas-shared-default/connection",
"type": "application/vnd.sas.cas.server.connection"
},
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default",
"uri": "/casManagement/servers/cas-shared-default",
"type": "application/vnd.sas.cas.server"
}
]
}
application/vnd.sas.cas.server.metrics
Metrics about a running CAS server.
This media type is described by casServerMetrics.
Link Relationships
This media type includes the following links:
Relation | Method | URI | Description |
---|---|---|---|
self | GET | /servers/{serverName}/metrics | Returns metrics for the CAS server. |
up | GET | /servers/{serverName} | Returns the definition of the CAS server. |
application/vnd.sas.cas.server.metrics+json
Here is an example of the JSON representation of this media type.
{
"version": 1,
"serverName": "cas-shared-default",
"host": "myhost.example.com",
"port": 5570,
"cpuUserTime": 0.002,
"elapsedTime": 0.003381,
"systemCores": 16,
"systemTotalMemory": 64380059648,
"memoryOs": 9752576,
"systemNodes": 1,
"memoryQuota": 9752576,
"memory": 355424,
"links": [
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/metrics",
"uri": "/casManagement/servers/cas-shared-default/metrics",
"type": "application/vnd.sas.cas.server.metrics"
},
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default",
"uri": "/casManagement/servers/cas-shared-default",
"type": "application/vnd.sas.cas.server"
}
]
}
application/vnd.sas.cas.server.policy.summary
Detail information about a CAS server resource management policy.
This media type is described by casServerPolicy.
Link Relationships
This media type includes the following links:
Relation | Method | URI | Description |
---|---|---|---|
up | GET | /servers/{serverName}/policies | Returns the collection of CAS server policies. |
self | GET | /servers/{serverName}/policies/{policyName} | Returns policy information for the CAS server. |
application/vnd.sas.cas.server.policy+json
Here is an example of a priority level policy.
{
"version": 1,
"name": "cas-shared-default-priority-1",
"type": "priorityLevels",
"attributes": {
"cpu": "30",
"localTables": "10000000000",
"globalCasuser": "10000000000",
"globalCasuserHdfs": "10000000000"
},
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/policies",
"uri": "/casManagement/servers/cas-shared-default/policies",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server.policy.summary"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/policies/cas-shared-default-priority-3",
"uri": "/casManagement/servers/cas-shared-default/policies/cas-shared-default-priority-3",
"type": "application/vnd.sas.cas.server.policy"
}
]
}
Here is an example of a global Caslibs policy.
{
"version": 1,
"name": "cas-shared-default-priority-1",
"type": "priorityLevels",
"attributes": {
"cpu": "30",
"localTables": "10000000000",
"globalCasuser": "10000000000",
"globalCasuserHdfs": "10000000000"
},
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/policies",
"uri": "/casManagement/servers/cas-shared-default/policies",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server.policy.summary"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/policies/cas-shared-default-priority-3",
"uri": "/casManagement/servers/cas-shared-default/policies/cas-shared-default-priority-3",
"type": "application/vnd.sas.cas.server.policy"
}
]
}
Here is an example of a priority assignments policy.
{
"version": 1,
"name": "cas-shared-default-priority-1",
"type": "priorityLevels",
"attributes": {
"cpu": "30",
"localTables": "10000000000",
"globalCasuser": "10000000000",
"globalCasuserHdfs": "10000000000"
},
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/policies",
"uri": "/casManagement/servers/cas-shared-default/policies",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.server.policy.summary"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/policies/cas-shared-default-priority-3",
"uri": "/casManagement/servers/cas-shared-default/policies/cas-shared-default-priority-3",
"type": "application/vnd.sas.cas.server.policy"
}
]
}
application/vnd.sas.cas.session.summary
Summary information about a CAS session.
This media type is described by casSessionSummary.
Link Relationships
This media type includes the following links:
Relation | Method | URI | Description |
---|---|---|---|
self | GET | /servers/{serverName}/sessions/{sessionId} | Returns information about the specified session. |
up | GET | /servers/{serverName}/sessions | Returns information about all sessions. |
delete | DELETE | /servers/{serverName}/sessions/{sessionId} | Ends the session. |
application/vnd.sas.cas.session+json
Here is an example of the JSON representation of this media type.
{
"version": 2,
"id": "b3a9d3f9-1095-d848-85d4-02b19fc4e5cf",
"name": "casManagement:Sat Sep 23 00:30:07 2017",
"state": "Connected",
"transactionState": "none",
"authenticationType": "OAuth",
"owner": "userId",
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/sessions",
"uri": "/casManagement/servers/cas-shared-default/sessions",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.session.summary"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/sessions/b3a9d3f9-1095-d848-85d4-02b19fc4e5cf",
"uri": "/casManagement/servers/cas-shared-default/sessions/b3a9d3f9-1095-d848-85d4-02b19fc4e5cf",
"type": "application/vnd.sas.cas.session.summary"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/casManagement/servers/cas-shared-default/sessions/b3a9d3f9-1095-d848-85d4-02b19fc4e5cf",
"uri": "/casManagement/servers/cas-shared-default/sessions/b3a9d3f9-1095-d848-85d4-02b19fc4e5cf"
},
{
"method": "POST",
"rel": "startPermissionsTransaction",
"href": "/casManagement/servers/cas-shared-default/sessions/b3a9d3f9-1095-d848-85d4-02b19fc4e5cf?action=start",
"uri": "/casManagement/servers/cas-shared-default/sessions/b3a9d3f9-1095-d848-85d4-02b19fc4e5cf?action=start",
"itemType": "text/plain"
}
]
}
application/vnd.sas.cas.server.node
Summary information about a CAS server node.
This media type is described by casServerNode.
Link Relationships
This media type includes the following links:
Relation | Method | URI | Description |
---|---|---|---|
self | GET | /casManagement/servers/cas-shared-default/nodes/mynode.example.com | Returns information about the specified node. |
up | GET | /casManagement/servers/cas-shared-default/nodes | Returns information about all nodes for the CAS server. |
delete | GET | /casManagement/servers/cas-shared-default/nodes/mynode.example.com | Removes the specified node. |
application/vnd.sas.cas.caslib
Detailed information about a caslib.
This media type is described by caslib.
Link Relationships
This media type includes the following links:
Relation | Method | URI | Description |
---|---|---|---|
up | GET | /servers/{serverName}/caslibs | Returns information about all caslibs. |
self | GET | /servers/{serverName}/caslibs/{caslibName} | Returns information about the specified caslib. |
patch | PATCH | /servers/{serverName}/caslibs/{caslibName} | Modifies a caslib definition. Only certain common caslib values can be modified by this call. |
delete | DELETE | /servers/{serverName}/caslibs/{caslibName} | Deletes the caslib definition. |
tables | GET | /servers/{serverName}/caslibs/{caslibName}/tables | Returns the tables collection for this caslib. |
sources | GET | /servers/{serverName}/caslibs/{caslibName}/sources | Returns the sources collection for this caslib. |
dataSource | GET | /dataSources/providers/cas/sources/{serverName}~fs~{caslibName} | Returns the dataSources service link for this caslib. |
application/vnd.sas.cas.caslib+json
Here is an example of the JSON representation of this media type.
{
"version": 1,
"name": "Public",
"type": "PATH",
"description": "Shared and writeable caslib, accessible to all users.",
"scope": "global",
"path": "/opt/sas/viya/config/data/cas/default/public/",
"hidden": false,
"attributes": {
"active": false,
"personal": false,
"subDirs": true
},
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/caslibs",
"uri": "/casManagement/servers/cas-shared-default/caslibs",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.caslib"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public",
"type": "application/vnd.sas.cas.caslib"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public",
"type": "application/vnd.sas.cas.caslib",
"responseType": "application/vnd.sas.cas.caslib"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public"
},
{
"method": "GET",
"rel": "tables",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.table"
},
{
"method": "GET",
"rel": "sources",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/sources",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/sources",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.source.table"
},
{
"method": "GET",
"rel": "dataSource",
"href": "/dataSources/providers/cas/sources/cas-shared-default~fs~Public",
"uri": "/dataSources/providers/cas/sources/cas-shared-default~fs~Public",
"type": "application/vnd.sas.data.source"
}
],
"transient": false
}
application/vnd.sas.cas.table
Represents details of a table. A table in this context refers to a combined representation of both the CAS table and the source table with which it is associated.
This media type is described by tableDetails.
Link Relationships
This media type includes the following links:
Relation | Method | URI | Description |
---|---|---|---|
self | GET | /servers/{serverName}/caslibs/{caslibName}/tables/{tableName} | Returns information about the specified table. |
up | GET | /servers/{serverName}/caslibs/{caslibName}/tables | Returns information about all tables in the specified caslib. |
delete | DELETE | /servers/{serverName}/caslibs/{caslibName}/tables/{tableName} | Deletes (permanently remove) the table from the source of the caslib. This is not the same as an unload. See the stateChange link relation for load or unload functionality. |
save | POST | /servers/{serverName}/caslibs/{caslibName}/tables/{tableName} | Saves the table to a source table or file in the source location of the caslib. |
summaryStatistics | GET | /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/summaryStatistics | Retrieves the summary statistics for all columns in this table. |
distinctCount | GET | /casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/distinctCount | Retrieves distinct count of columns in this table. |
updateState | PUT | /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/state | Changes the loaded or unloaded state of the table. |
updateScope | PUT | /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/scope | Changes the global scope of the table. Used to promote a session table to global scope. |
columns | GET | /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns | Returns information about all columns in the specified table. |
dataTable | GET | /dataTables/dataSources/cas~fs~cas-shared-default~fs~Public/tables/CONTACTS | Returns the dataTables service representation of this table. |
application/vnd.sas.cas.table+json
Here is an example of the JSON representation of this media type.
{
"version": 1,
"name": "CONTACTS",
"tableReference": {
"tableUri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~Public/tables/CONTACTS",
"sessionId": "b3a9d3f9-1095-d848-85d4-02b19fc4e5cf",
"sourceTableName": "Contacts.sashdat"
},
"scope": "global",
"state": "loaded",
"repeated": false,
"created": "2017-09-21T18:52:43.580Z",
"lastModified": "2017-09-21T18:52:43.585Z",
"lastAccessed": "2017-09-21T18:52:43.585Z",
"createdBy": "userId",
"rowCount": 3276,
"columnCount": 12,
"characterSet": "UTF8",
"encoding": "utf-8",
"serverName": "cas-shared-default",
"caslibName": "Public",
"disconnected": false,
"attributes": {
"owner": "cas",
"size": 796288,
"encryption": "NONE",
"time": "21Sep2017:18:48:39",
"group": "sas"
},
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.table"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS",
"type": "application/vnd.sas.cas.table"
},
{
"method": "POST",
"rel": "save",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS",
"type": "application/vnd.sas.cas.table.save.request",
"responseType": "application/vnd.sas.cas.table"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS"
},
{
"method": "GET",
"rel": "summaryStatistics",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/summaryStatistics",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/summaryStatistics",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.column.summary.statistics"
},
{
"method": "GET",
"rel": "distinctCount",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/distinctCount",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/distinctCount",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.column.summary.statistics"
},
{
"method": "PUT",
"rel": "updateScope",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/scope",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/scope",
"responseType": "application/json;text/plain"
},
{
"method": "PUT",
"rel": "updateState",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/state",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/state",
"responseType": "application/json;text/plain"
},
{
"method": "GET",
"rel": "columns",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.column"
},
{
"method": "GET",
"rel": "dataTable",
"href": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~Public/tables/CONTACTS",
"uri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~Public/tables/CONTACTS",
"type": "application/vnd.sas.data.table"
}
]
}
application/vnd.sas.cas.column
Detail information about a CAS table column.
This media type is described by casColumn.
Link Relationships
This media type includes the following links:
Relation | Method | URI | Description |
---|---|---|---|
self | GET | /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName} | Returns information about the specified column. |
up | GET | /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns | Returns information about all columns in the specified table. |
distinctCount | GET | /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/distinctCount | Returns distinct count for the specified columnName. |
distinctValues | GET | /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/distinctValues | Returns distinct values for the specified columnName. |
frequency | GET | /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/frequency | Returns frequency information for the specified columnName. |
summaryStatistics | GET | /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/summaryStatistics | Returns summary statistics for the specified columnName. |
application/vnd.sas.cas.column+json
Here is an example of the JSON representation of this media type.
{
"version": 1,
"name": "COMPANY",
"type": "char",
"rawLength": 34,
"formattedLength": 34,
"numberFormatLength": 0,
"numberFormatDecimals": 0,
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.column"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/COMPANY",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/COMPANY",
"type": "application/vnd.sas.cas.column"
},
{
"method": "GET",
"rel": "distinctCount",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/COMPANY/distinctCount",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/COMPANY/distinctCount",
"type": "application/vnd.sas.cas.column.frequency"
},
{
"method": "GET",
"rel": "distinctValues",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/COMPANY/distinctValues",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/COMPANY/distinctValues",
"type": "application/vnd.sas.collection",
"itemType": "text/plain"
},
{
"method": "GET",
"rel": "frequency",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/COMPANY/frequency",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/COMPANY/frequency",
"type": "application/vnd.sas.cas.column.frequency"
},
{
"method": "GET",
"rel": "summaryStatistics",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/COMPANY/summaryStatistics",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/COMPANY/summaryStatistics",
"type": "application/vnd.sas.cas.column.summary.statistics"
}
]
}
application/vnd.sas.cas.column.distinct.count
The count of distinct values in a column.
This media type is described by casColumnDistinctCount.
Link Relationships
This media type includes the following links:
Relation | Method | URI | Description |
---|---|---|---|
self | GET | /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/distinctCount | Returns distinct count, missing count, and truncated count for the distinct values of the specified column. |
up | GET | /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName} | Returns information about the specified column. |
application/vnd.sas.cas.column.distinct.count+json
Here is an example of the JSON representation of this media type.
{
"version": 1,
"columnName": "COMPANY",
"distinctCount": 1406,
"missingCount": 0,
"truncated": false,
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/COMPANY",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/COMPANY",
"type": "application/vnd.sas.cas.column"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/COMPANY/distinctCount",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/COMPANY/distinctCount",
"type": "application/vnd.sas.cas.column.distinct.count"
}
]
}
application/vnd.sas.cas.column.frequency
Frequency results on a CAS column.
This media type is described by casColumnFrequency.
Link Relationships
This media type includes the following links:
Relation | Method | URI | Description |
---|---|---|---|
self | GET | /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/frequency | Returns frequency information for the specified column. |
up | GET | /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName} | Returns information about the specified column. |
application/vnd.sas.cas.column.frequency+json
Here is an example of the JSON representation of this media type.
{
"version": 1,
"columnName": "STATE",
"columnType": 3,
"frequencyValues": [
{
"value": "CA",
"frequency": 1701,
"formattedValue": "CA"
},
{
"value": "OH",
"frequency": 708,
"formattedValue": "OH"
},
{
"value": "CO",
"frequency": 354,
"formattedValue": "CO"
},
{
"value": "NV",
"frequency": 142,
"formattedValue": "NV"
},
{
"value": "HI",
"frequency": 123,
"formattedValue": "HI"
},
{
"value": "CA.",
"frequency": 60,
"formattedValue": "CA."
},
{
"value": "",
"frequency": 37,
"formattedValue": ""
},
{
"value": "NM",
"frequency": 18,
"formattedValue": "NM"
},
{
"value": "AB",
"frequency": 12,
"formattedValue": "AB"
},
{
"value": "AL",
"frequency": 11,
"formattedValue": "AL"
},
{
"value": "BC",
"frequency": 6,
"formattedValue": "BC"
},
{
"value": "CT",
"frequency": 6,
"formattedValue": "CT"
},
{
"value": "Mich",
"frequency": 6,
"formattedValue": "Mich"
},
{
"value": "Ohio",
"frequency": 6,
"formattedValue": "Ohio"
},
{
"value": "MI",
"frequency": 5,
"formattedValue": "MI"
},
{
"value": "NC",
"frequency": 5,
"formattedValue": "NC"
},
{
"value": " CA",
"frequency": 4,
"formattedValue": " CA"
},
{
"value": "IL",
"frequency": 4,
"formattedValue": "IL"
},
{
"value": "N.C.",
"frequency": 4,
"formattedValue": "N.C."
},
{
"value": "Alabama",
"frequency": 3,
"formattedValue": "Alabama"
},
{
"value": "California",
"frequency": 3,
"formattedValue": "California"
},
{
"value": "FL",
"frequency": 3,
"formattedValue": "FL"
},
{
"value": "NJ",
"frequency": 3,
"formattedValue": "NJ"
},
{
"value": "NY",
"frequency": 3,
"formattedValue": "NY"
},
{
"value": "UT",
"frequency": 3,
"formattedValue": "UT"
},
{
"value": "Alberta",
"frequency": 2,
"formattedValue": "Alberta"
},
{
"value": "Ca.",
"frequency": 2,
"formattedValue": "Ca."
},
{
"value": "Co.",
"frequency": 2,
"formattedValue": "Co."
},
{
"value": "Michigan",
"frequency": 2,
"formattedValue": "Michigan"
},
{
"value": "NE",
"frequency": 2,
"formattedValue": "NE"
},
{
"value": "WA",
"frequency": 2,
"formattedValue": "WA"
},
{
"value": "al",
"frequency": 1,
"formattedValue": "al"
},
{
"value": "alabama",
"frequency": 1,
"formattedValue": "alabama"
},
{
"value": "ALABAMA",
"frequency": 1,
"formattedValue": "ALABAMA"
},
{
"value": "Calif",
"frequency": 1,
"formattedValue": "Calif"
},
{
"value": "HA",
"frequency": 1,
"formattedValue": "HA"
},
{
"value": "Hawaai",
"frequency": 1,
"formattedValue": "Hawaai"
},
{
"value": "Hawaii",
"frequency": 1,
"formattedValue": "Hawaii"
},
{
"value": "Helena",
"frequency": 1,
"formattedValue": "Helena"
},
{
"value": "illinois",
"frequency": 1,
"formattedValue": "illinois"
},
{
"value": "Illinois",
"frequency": 1,
"formattedValue": "Illinois"
},
{
"value": "Jacksonville",
"frequency": 1,
"formattedValue": "Jacksonville"
},
{
"value": "MA",
"frequency": 1,
"formattedValue": "MA"
},
{
"value": "Martinstown",
"frequency": 1,
"formattedValue": "Martinstown"
},
{
"value": "MG",
"frequency": 1,
"formattedValue": "MG"
},
{
"value": "Mich.",
"frequency": 1,
"formattedValue": "Mich."
},
{
"value": "Missouri",
"frequency": 1,
"formattedValue": "Missouri"
},
{
"value": "Mizzou",
"frequency": 1,
"formattedValue": "Mizzou"
},
{
"value": "MN",
"frequency": 1,
"formattedValue": "MN"
},
{
"value": "MO",
"frequency": 1,
"formattedValue": "MO"
}
],
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/STATE",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/STATE",
"type": "application/vnd.sas.cas.column"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/STATE/frequency",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/STATE/frequency",
"type": "application/vnd.sas.cas.column.frequency"
}
]
}
application/vnd.sas.cas.column.summary.statistics
Returns summary statistics for a numeric column.
This media type is described by casColumnSummaryStatistics.
Link Relationships
This media type includes the following links:
Relation | Method | URI | Description |
---|---|---|---|
self | GET | /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/summaryStatistics | Returns summary information about the specified column. |
up | GET | /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName} | Returns information about the specified column. |
application/vnd.sas.cas.column.summary.statistics+json
Here is an example of the JSON representation of this media type.
{
"version": 1,
"columnName": "VALUE",
"min": 1,
"max": 11267,
"mean": 1644.1684981684982,
"sum": 5386296,
"stdDev": 974.6179404092851,
"stdErr": 17.027953475469996,
"coefficientOfVariation": 59.27725421664197,
"numMissingValues": 0,
"n": 3276,
"variance": 949880.1297676369,
"tValue": 96.55702316411907,
"probT": 0,
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/ID",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/ID",
"type": "application/vnd.sas.cas.column"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/ID/summaryStatistics",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/ID/summaryStatistics",
"type": "application/vnd.sas.cas.column.summary.statistics"
}
],
"uss": 11966835630,
"css": 3110857424.989011
}
application/vnd.sas.cas.source.table
Detail information about the source file or table in the specified caslib. Source 'table' in this context refers to either a file or table, depending on the type of associated caslib. For example, path-based caslibs return file information, while non-path-based caslibs return table information.
This media type is described by casSourceTable.
Link Relationships
This media type includes the following links:
Relation | Method | URI | Description |
---|---|---|---|
self | GET | /servers/{serverName}/caslibs/{caslibName}/sources/{sourceName} | Returns information about the specified source file or table. |
up | GET | /servers/{serverName}/caslibs/{caslibName}/sources | Returns information about all source files or tables in the specified caslib. |
application/vnd.sas.cas.source.table+json
Here is an example of the JSON representation of this media type.
{
"name": "Contacts.sashdat",
"attributes": {
"owner": "userId",
"size": 777,
"encryption": "NONE",
"permission": "-rwxr-xr-x",
"time": "21Sep2017:18:48:39",
"group": "mygroup"
},
"links": [
{
"method": "GET",
"rel": "up",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/sources",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/sources",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.cas.source.table"
},
{
"method": "GET",
"rel": "self",
"href": "/casManagement/servers/cas-shared-default/caslibs/Public/sources/Contacts.sashdat",
"uri": "/casManagement/servers/cas-shared-default/caslibs/Public/sources/Contacts.sashdat",
"type": "application/vnd.sas.cas.source.table"
}
]
}
application/vnd.sas.cas.caslib.create.request
Parameters for specifying a caslib.
This media type is described by caslibCreateRequest.
Link Relationships
This media type is used in the body of the request, so it does not have associated links.
application/vnd.sas.cas.caslib.create.request+json
Here is an example of the JSON representation of this media type.
{
"createDirectory": true,
"permission": "GroupWrite",
"caslib": {
"version": 1,
"name": "MyCaslib",
"type": "PATH",
"description": "My data",
"scope": "global",
"path": "/some/path/on/disk",
}
}
application/vnd.sas.cas.table.load.request
Parameters for loading a source into memory as a CAS table.
This media type is described by casLoadRequest.
Link Relationships
This media type is used in the body of the request, so it does not have associated links.
application/vnd.sas.cas.table.load.request+json
Here is an example of the JSON representation of this media type.
{
"outputCaslibName":"MyOutCaslib",
"outputTableName":"MyOutTable",
"label":"My table label",
"replace": false,
"scope":"global",
"copies": 1
}
Here is an example of the JSON representation of this media type.
with import options and filtering.
{
"outputCaslibName":"MyOutCaslib",
"outputTableName":"MyOutTable",
"label": "My Table Label",
"replace": false,
"scope": "global",
"parameters":
{
"importOptions":
{
"allowTruncation": true,
"delimiter": ",",
"encoding": "utf-8",
"fileType": "csv",
"getNames": true,
"guessRows": 50.0,
"nThreads": 0.0,
"stripBlanks": false,
"varChars": false
}
},
"where": "NAME ? \"Mr.\""
}
application/vnd.sas.cas.table.save.request
Parameters for saving a loaded CAS table (or unloaded source file or table) as a source file or table.
This media type is described by casSaveRequest.
Link Relationships
This media type is used in the body of the request, so it does not have associated links.
application/vnd.sas.cas.table.save.request+json
Here is an example of the JSON representation of this media type.
{
"format": "csv",
"replace": true
}
Here is an example of the JSON representation of this media type.
with a CSV format.
{
"format": "csv",
"replace": true
}
Here is an example of the JSON representation of this media type.
with a SASHDAT format.
{
"format": "sashdat",
"replace": true
}
Here is an example of the JSON representation of this media type.
saved as a different name.
{
"caslibName":"{{caslibName}}",
"tableName" :"SAVED_AS_{{tableName}}",
"replace": true
}
application/vnd.sas.cas.table.append.request
Parameters for appending rows to a loaded CAS table.
This media type is described by casAppendRequest.
Link Relationships
This media type is used in the body of the request, so it does not have associated links.
application/vnd.sas.cas.table.append.request+json
Here is an example of the JSON representation of this media type.
{
"sourceCaslib": "Public",
"sourceTableName": "MYTABLE"
}
Here is an example of the JSON representation of this media type.
with a filter applied on the source table.
{
"sourceCaslib": "Public",
"sourceTableName": "MYTABLE",
"filter": "UID=12345"
}
application/vnd.sas.cas.table.reference
Represents a dataTables service link and source information about a tableDetails object.
This media type is described by casTableReference.
Link Relationships
This media type represents an embedded model, so it does not have link relationships.
application/vnd.sas.cas.table.reference+json
Here is an example of the JSON representation of this media type.
{
"tableUri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~Public/tables/CONTACTS",
"sessionId": "b3a9d3f9-1095-d848-85d4-02b19fc4e5cf",
"sourceTableName": "Contacts.sashdat"
}
Table of Contents generated with DocToc
Entity Relationship Diagram
Root
Path: '/'
The root of the API. This resource contains links to the top-level resources in the API. The response uses the 'application/vnd.sas.api' media type.
Links
The 'GET /' response include the following links.
Relation | Method | Description |
---|---|---|
collection |
GET |
Returns the collection of the top-level resources in the API. |
Response type:application/vnd.sas.collection |
||
Response item type: 'application/vnd.sas.cas.server' |
CAS Servers
Path: '/servers'
This endpoint provides a collection of CAS server resources.
Links
The response includes the following links:
Relation | Method | Description |
---|---|---|
collection |
GET |
Returns a collection of CAS server resources. |
Request type: application/vnd.sas.cas.format.source |
||
Response type: application/vnd.sas.cas.format.library |
Job Definitions
Base URLs:
- http://mock-jobDefinitions.apifirst.unx.sas.com/jobDefinitions
Terms of service Email: SAS Developers Web: SAS Developers
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
The Job Definitions API enables users to manage job definitions. Overview
The Job Definitions API manages job definitions using the Create, Read, Update, and Delete operations. A Job Definition is a batch execution that contains a list of input parameters, a job type, and a "code" attribute.
Security
AuthorizationAuthenticated users have access (create, update, read, delete, add, remove) to job definitions created by themselves by default. Folders API authorizations are applied to job definitions contained in folders. If there is no explicit PROHIBIT by a folder API rule to disable access granted by the job definition API, then rules on a folder have no impact.
The Authorization API automatically protects any endpoints of any API that includes dependencies on it. This dependency intercepts calls to the endpoints and builds an authorization context, which is then sent to the Authorization API for evaluation. If the context is granted permission to perform the request action on that endpoint, it returns an HTTP status code of 200 and allows the request to proceed. If the context is prohibited, it returns an HTTP status code of 403 and the request does not continue further. This access is controlled by authorization rules that can be created through bootstrapping, by an administrative user, or by other methods.Authentication The Job Definition API is secured and only accessible by authenticated users.
Terminology
- job definition a batch execution that contains a list of input parameters, a job type, and a "code" attribute. A job definition can run in multiple execution environments, based on the type of the job.
Usage Notes
Operations
Root
Contains the operations for the root resource.
Get a list of top-level resource links
Code samples
# You can also use wget
curl -X GET http://mock-jobDefinitions.apifirst.unx.sas.com/jobDefinitions/ \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.api+json'
const headers = {
'Accept':'application/vnd.sas.api+json'
};
fetch('http://mock-jobDefinitions.apifirst.unx.sas.com/jobDefinitions/',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.api+json'
}
r = requests.get('http://mock-jobDefinitions.apifirst.unx.sas.com/jobDefinitions/', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.api+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-jobDefinitions.apifirst.unx.sas.com/jobDefinitions/", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /
The API root. Returns a list of links to the top-level resources that are surfaced through the API.
Example responses
Here is a sample response when using GET on the root resource.
{
"version": 1,
"links": [
{
"method": "GET",
"rel": "job-definitions",
"href": "/jobDefinitions/definitions",
"uri": "/jobDefinitions/definitions",
"type": "application/vnd.sas.collection"
},
{
"method": "POST",
"rel": "createJobDefinition",
"href": "/jobDefinitions/definitions",
"uri": "/jobDefinitions/definitions",
"type": "application/vnd.sas.job.definition"
},
{
"method": "POST",
"rel": "createJobDefinitions",
"href": "/jobDefinitions/definitions",
"uri": "/jobDefinitions/definitions",
"type": "application/vnd.sas.collection"
}
]
}
{
"version": 1,
"links": [
{
"method": "GET",
"rel": "job-definitions",
"href": "/jobDefinitions/definitions",
"uri": "/jobDefinitions/definitions",
"type": "application/vnd.sas.collection"
},
{
"method": "POST",
"rel": "createJobDefinition",
"href": "/jobDefinitions/definitions",
"uri": "/jobDefinitions/definitions",
"type": "application/vnd.sas.job.definition"
},
{
"method": "POST",
"rel": "createJobDefinitions",
"href": "/jobDefinitions/definitions",
"uri": "/jobDefinitions/definitions",
"type": "application/vnd.sas.collection"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | api |
Check service availability
Code samples
# You can also use wget
curl -X HEAD http://mock-jobDefinitions.apifirst.unx.sas.com/jobDefinitions/
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('http://mock-jobDefinitions.apifirst.unx.sas.com/jobDefinitions/',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('http://mock-jobDefinitions.apifirst.unx.sas.com/jobDefinitions/')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "http://mock-jobDefinitions.apifirst.unx.sas.com/jobDefinitions/", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /
Returns header information and checks the status of the Job Definitions service.
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. The service is available. | None |
Definitions
Contains the operations for job definitions.
Create a job definition
Code samples
# You can also use wget
curl -X POST http://mock-jobDefinitions.apifirst.unx.sas.com/jobDefinitions/definitions \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.job.definition+json' \
-H 'Accept: application/vnd.sas.job.definition+json' \
-H 'accept: string'
const inputBody = '{
"version": 2,
"name": "Simple proc print",
"description": "Show the contents of sashelp.class using PROC PRINT",
"type": "Compute",
"parameters": [
{
"version": 1,
"name": "_contextName",
"defaultValue": "SAS Job Execution compute context",
"type": "CHARACTER",
"label": "Context Name",
"required": false
}
],
"code": "ods html style=HTMLBlue;\nproc print data=sashelp.class; run; quit;\nods html close;"
}';
const headers = {
'Content-Type':'application/vnd.sas.job.definition+json',
'Accept':'application/vnd.sas.job.definition+json',
'accept':'string'
};
fetch('http://mock-jobDefinitions.apifirst.unx.sas.com/jobDefinitions/definitions',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.job.definition+json',
'Accept': 'application/vnd.sas.job.definition+json',
'accept': 'string'
}
r = requests.post('http://mock-jobDefinitions.apifirst.unx.sas.com/jobDefinitions/definitions', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.job.definition+json"},
"Accept": []string{"application/vnd.sas.job.definition+json"},
"accept": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-jobDefinitions.apifirst.unx.sas.com/jobDefinitions/definitions", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /definitions
Creates a job definition.
Body parameter
Sample body to create a job definition.
{
"version": 2,
"name": "Simple proc print",
"description": "Show the contents of sashelp.class using PROC PRINT",
"type": "Compute",
"parameters": [
{
"version": 1,
"name": "_contextName",
"defaultValue": "SAS Job Execution compute context",
"type": "CHARACTER",
"label": "Context Name",
"required": false
}
],
"code": "ods html style=HTMLBlue;\nproc print data=sashelp.class; run; quit;\nods html close;"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
parentFolderUri | query | string | false | The URI of the parent folder to contain the job definition. |
accept | header | string | false | Accept header value for the versioned media type corresponding to the version to be returned. |
body | body | jobDefinition | false | The job definition to create. |
Example responses
This is sample response when using POST to create a job definition.
{
"creationTimeStamp": "2021-11-11T22:41:36.106Z",
"modifiedTimeStamp": "2021-11-11T22:41:36.111Z",
"createdBy": "user1",
"modifiedBy": "user1",
"version": 2,
"id": "d7a112d7-b5df-4343-9161-4c264d678447",
"name": "Simple proc print",
"description": "Show the contents of sashelp.class using PROC PRINT",
"type": "Compute",
"parameters": [
{
"version": 1,
"name": "_contextName",
"defaultValue": "SAS Job Execution compute context",
"type": "CHARACTER",
"label": "Context Name",
"required": false
}
],
"code": "ods html style=HTMLBlue;\nproc print data=sashelp.class; run; quit;\nods html close;",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobDefinitions/definitions/d7a112d7-b5df-4343-9161-4c264d678447",
"uri": "/jobDefinitions/definitions/d7a112d7-b5df-4343-9161-4c264d678447",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobDefinitions/definitions/d7a112d7-b5df-4343-9161-4c264d678447",
"uri": "/jobDefinitions/definitions/d7a112d7-b5df-4343-9161-4c264d678447",
"type": "application/vnd.sas.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobDefinitions/definitions/d7a112d7-b5df-4343-9161-4c264d678447",
"uri": "/jobDefinitions/definitions/d7a112d7-b5df-4343-9161-4c264d678447",
"type": "application/vnd.sas.job.definition",
"responseType": "application/vnd.sas.job.definition"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobDefinitions/definitions/d7a112d7-b5df-4343-9161-4c264d678447",
"uri": "/jobDefinitions/definitions/d7a112d7-b5df-4343-9161-4c264d678447"
}
],
"properties": []
}
{
"creationTimeStamp": "2021-11-11T22:41:36.106Z",
"modifiedTimeStamp": "2021-11-11T22:41:36.111Z",
"createdBy": "user1",
"modifiedBy": "user1",
"version": 2,
"id": "d7a112d7-b5df-4343-9161-4c264d678447",
"name": "Simple proc print",
"description": "Show the contents of sashelp.class using PROC PRINT",
"type": "Compute",
"parameters": [
{
"version": 1,
"name": "_contextName",
"defaultValue": "SAS Job Execution compute context",
"type": "CHARACTER",
"label": "Context Name",
"required": false
}
],
"code": "ods html style=HTMLBlue;\nproc print data=sashelp.class; run; quit;\nods html close;",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobDefinitions/definitions/d7a112d7-b5df-4343-9161-4c264d678447",
"uri": "/jobDefinitions/definitions/d7a112d7-b5df-4343-9161-4c264d678447",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobDefinitions/definitions/d7a112d7-b5df-4343-9161-4c264d678447",
"uri": "/jobDefinitions/definitions/d7a112d7-b5df-4343-9161-4c264d678447",
"type": "application/vnd.sas.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobDefinitions/definitions/d7a112d7-b5df-4343-9161-4c264d678447",
"uri": "/jobDefinitions/definitions/d7a112d7-b5df-4343-9161-4c264d678447",
"type": "application/vnd.sas.job.definition",
"responseType": "application/vnd.sas.job.definition"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobDefinitions/definitions/d7a112d7-b5df-4343-9161-4c264d678447",
"uri": "/jobDefinitions/definitions/d7a112d7-b5df-4343-9161-4c264d678447"
}
],
"properties": []
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | The job definition was created. | jobDefinition |
400 | Bad Request | The request was invalid. | errorResponse |
415 | Unsupported Media Type | The requested media type is not supported. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Last-Modified | string | The HTTP-date string that represents the timestamp of the last update to this object. | |
201 | Etag | string | A tag that identifies the revision of this object. | |
201 | Location | string | The location of the resource. |
Get a collection of job definitions
Code samples
# You can also use wget
curl -X GET http://mock-jobDefinitions.apifirst.unx.sas.com/jobDefinitions/definitions \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('http://mock-jobDefinitions.apifirst.unx.sas.com/jobDefinitions/definitions',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.get('http://mock-jobDefinitions.apifirst.unx.sas.com/jobDefinitions/definitions', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.collection+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-jobDefinitions.apifirst.unx.sas.com/jobDefinitions/definitions", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /definitions
Returns a list of job definitions.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
start | query | integer | false | The index of the first job definition to return. The default value is 0. |
limit | query | integer | false | The maximum number of job definitions to return. The default value is 10. |
filter | query | string | false | Filters the results of the query. |
sortBy | query | string | false | Defines how the returned job definitions are sorted. |
Example responses
This is sample response when using GET to get job definitions.
{
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/jobDefinitions/definitions",
"uri": "/jobDefinitions/definitions",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "self",
"href": "/jobDefinitions/definitions?start=0&limit=10",
"uri": "/jobDefinitions/definitions?start=0&limit=10",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "next",
"href": "/jobDefinitions/definitions?start=10&limit=10",
"uri": "/jobDefinitions/definitions?start=10&limit=10",
"type": "application/vnd.sas.collection"
},
{
"method": "POST",
"rel": "createJobDefinition",
"href": "/jobDefinitions/definitions",
"uri": "/jobDefinitions/definitions",
"type": "application/vnd.sas.job.definition",
"responseType": "application/vnd.sas.job.definition"
}
],
"name": "jobdefinitions",
"accept": "application/vnd.sas.job.definition",
"start": 0,
"items": [
{
"creationTimeStamp": "2021-11-08T19:25:29.590Z",
"modifiedTimeStamp": "2021-11-08T19:25:29.658Z",
"createdBy": "sas.modelRepository",
"modifiedBy": "sas.modelRepository",
"version": 2,
"id": "c2283c0e-c69c-48cb-b314-84207afe7cb0",
"name": "Default Model Manager Scoring Job Definition",
"type": "Compute",
"parameters": [
{
"version": 1,
"name": "_contextName",
"defaultValue": "SAS Model Manager compute context",
"type": "CHARACTER",
"label": "Context Name",
"required": false
},
{
"version": 1,
"name": "_omitJsonLog",
"defaultValue": "true",
"type": "BOOLEAN",
"required": false
}
],
"code": "{mappedCode}",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobDefinitions/definitions/c2283c0e-c69c-48cb-b314-84207afe7cb0",
"uri": "/jobDefinitions/definitions/c2283c0e-c69c-48cb-b314-84207afe7cb0",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobDefinitions/definitions/c2283c0e-c69c-48cb-b314-84207afe7cb0",
"uri": "/jobDefinitions/definitions/c2283c0e-c69c-48cb-b314-84207afe7cb0",
"type": "application/vnd.sas.summary"
}
],
"properties": [
{
"name": "type",
"value": "scoring"
},
{
"name": "objecttype",
"value": "sas.models.model"
}
]
},
{
"creationTimeStamp": "2021-11-08T19:25:35.973Z",
"modifiedTimeStamp": "2021-11-08T19:25:35.976Z",
"createdBy": "sas.analyticsFlows",
"modifiedBy": "sas.analyticsFlows",
"version": 2,
"id": "801d5009-3b33-41c1-b7e4-b33f77248ede",
"name": "Analytics Flow Job Definition",
"type": "AnalyticsFlow",
"parameters": [
{
"version": 1,
"name": "flowId",
"type": "CHARACTER",
"label": "Flow ID",
"required": true
},
{
"version": 1,
"name": "toNodeUri",
"type": "CHARACTER",
"label": "ID of final node to run",
"required": false
},
{
"version": 1,
"name": "casServerId",
"defaultValue": "cas",
"type": "CHARACTER",
"label": "ID of CAS Server to use for Component execution",
"required": false
},
{
"version": 1,
"name": "casSessionName",
"defaultValue": "AdvancedAnalyticSession",
"type": "CHARACTER",
"label": "Name of CAS Session to use for Component execution",
"required": false
},
{
"version": 1,
"name": "contextName",
"type": "CHARACTER",
"label": "Name of Compute Context to use for Component execution",
"required": false
}
],
"code": "",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobDefinitions/definitions/801d5009-3b33-41c1-b7e4-b33f77248ede",
"uri": "/jobDefinitions/definitions/801d5009-3b33-41c1-b7e4-b33f77248ede",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobDefinitions/definitions/801d5009-3b33-41c1-b7e4-b33f77248ede",
"uri": "/jobDefinitions/definitions/801d5009-3b33-41c1-b7e4-b33f77248ede",
"type": "application/vnd.sas.summary"
}
],
"properties": []
},
{
"creationTimeStamp": "2021-11-08T19:25:41.775Z",
"modifiedTimeStamp": "2021-11-08T19:25:41.776Z",
"createdBy": "sas.audit",
"modifiedBy": "sas.audit",
"version": 2,
"id": "7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"name": "CAS Audit table update",
"description": "After upload of new Audit data into a temporary CAS table, this job appends the new data to the existing Audit data",
"type": "casl",
"parameters": [
{
"version": 1,
"name": "%VAR-expireDate",
"type": "CHARACTER",
"required": true
},
{
"version": 1,
"name": "%VAR-tempTableName",
"type": "CHARACTER",
"required": true
},
{
"version": 1,
"name": "%VAR-targetCaslib",
"type": "CHARACTER",
"required": true
},
{
"version": 1,
"name": "serverId",
"defaultValue": "cas-shared-default",
"type": "CHARACTER",
"required": false
}
],
"code": "whereStr=cat(\"'Time Stamp'n <= '\", expireDate, \"'\");\ndeleteRows / table={name='AUDIT' caslib=targetCaslib, where=whereStr};\nrun;\ncodeStr=cat(\"data AUDIT(caslib=\", targetCaslib, \" append=yes);set \", tempTableName, \"(caslib=\", targetCaslib, \");run;\");\ndatastep.runCode / code=codeStr;\nrun;\ntable.save status=sc / name='AUDIT' caslib=targetCaslib replace=true table={ name='AUDIT' caslib=targetCaslib };\nrun;\ntable.dropTable name='AUDIT' caslib=targetCaslib;\nrun;\ntable.dropTable name=tempTableName caslib=targetCaslib;\nrun;",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.summary"
}
],
"properties": []
},
{
"creationTimeStamp": "2021-11-08T19:27:14.440Z",
"modifiedTimeStamp": "2021-11-08T19:27:14.442Z",
"createdBy": "sas.SASDataExplorer",
"modifiedBy": "sas.SASDataExplorer",
"version": 2,
"id": "3ec9e0c3-6ef8-42d0-b233-807005322050",
"name": "Copy CasTable",
"type": "casl",
"parameters": [
{
"version": 1,
"name": "sessionId",
"type": "CHARACTER",
"label": "CAS Session Id",
"required": false
},
{
"version": 1,
"name": "serverId",
"type": "CHARACTER",
"label": "CAS Server Id",
"required": true
},
{
"version": 1,
"name": "%VAR-sourceCasLib",
"type": "CHARACTER",
"label": "Source CAS Library",
"required": true
},
{
"version": 1,
"name": "%VAR-destinationCasLib",
"type": "CHARACTER",
"label": "Destination CAS Library",
"required": true
},
{
"version": 1,
"name": "%VAR-sourceTable",
"type": "CHARACTER",
"label": "Source Table Name",
"required": true
},
{
"version": 1,
"name": "%VAR-destinationTable",
"type": "CHARACTER",
"label": "Destination Table Name",
"required": true
},
{
"version": 1,
"name": "%VAR-destinationTableLabel",
"defaultValue": "",
"type": "CHARACTER",
"label": "Destination Table Label",
"required": false
},
{
"version": 1,
"name": "%VAR-replace",
"defaultValue": "1",
"type": "NUMERIC",
"label": "Replace destination table flag (true = replace)",
"required": true
},
{
"version": 1,
"name": "%VAR-promote",
"defaultValue": "1",
"type": "NUMERIC",
"label": "Scope in which to load table (true = global and false = session)",
"required": true
},
{
"version": 1,
"name": "%VAR-replication",
"defaultValue": "1",
"type": "NUMERIC",
"label": "Specifies the number of copies of the table to make for fault tolerance.",
"required": true
},
{
"version": 1,
"name": "%VAR-data_explorer_submission_id",
"type": "CHARACTER",
"label": "Unique identifier by which UI tracks this job",
"required": false
}
],
"code": "session server;\n \n/* IF NOT doing a Replace, check if target table exists and fail if it does */\ncheckReplace(replace, destinationCasLib, destinationTable);\n \n/* Save CAS table to DESTINATION caslib backing store */\nsave status=rc result=r / caslib=destinationCasLib name=destinationTable\n table={caslib=sourceCasLib name=sourceTable} replace=replace;\ncheckStatus(rc, \"Error saving table\", 3);\n\n/* pull the path of the source that was saved - to be used in load below */\ndestinationPath=dictionary(r, \"name\");\n\n/* Unload session table from memory in destination caslib */\ndropTableIfExists(destinationCasLib, destinationTable);\n \n/* Unload global table if exists */\ndropTableIfExists(destinationCasLib, destinationTable);\n\n/* Load table into memory in destination caslib */\nloadTable status=rc result=r / caslib=destinationCasLib path=destinationPath\n casOut={caslib=destinationCasLib name=destinationTable label=destinationTableLabel}\n promote=promote;\ncheckStatus(rc, \"Error promoting table\", 4);\n \nfunction checkStatus(rc, logMessage, errorCode);\n if rc.statusCode != 0 then do;\n print logMessage;\n print \"UserErrorCode: \"||errorCode;\n exit 1;\n end;\nend;\n \nfunction doesTableExist(casLib, casTable);\n tableExists result=r status=rc / caslib=casLib table=casTable;\n tableExists = dictionary(r, \"exists\");\n return tableExists;\nend func;\n \nfunction dropTableIfExists(casLib,casTable);\n tableExists = doesTableExist(casLib, casTable);\n if tableExists != 0 then do;\n print \"Dropping table: \"||casLib||\".\"||casTable;\n dropTable result=r status=rc/ caslib=casLib table=casTable quiet=0;\n checkStatus(rc, \"Error dropping table: \"||casLib||\".\"||casTable, 5);\n end;\nend func;\n\nfunction checkReplace(replace, caslib, table);\n if replace == false then do;\n exists = doesTableExist(caslib, table);\n if (exists !=0) then do;\n print \"Table already exists and replace flag is set to false.\";\n print \"UserErrorCode: 1\";\n exit 1;\n end;\n end;\nend func;\n\n\n",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobDefinitions/definitions/3ec9e0c3-6ef8-42d0-b233-807005322050",
"uri": "/jobDefinitions/definitions/3ec9e0c3-6ef8-42d0-b233-807005322050",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobDefinitions/definitions/3ec9e0c3-6ef8-42d0-b233-807005322050",
"uri": "/jobDefinitions/definitions/3ec9e0c3-6ef8-42d0-b233-807005322050",
"type": "application/vnd.sas.summary"
}
],
"properties": [
{
"name": "REST_EXECUTION_PROVIDER_ASSUME_URIS_ENCODED",
"value": "true"
}
]
},
{
"creationTimeStamp": "2021-11-08T19:25:46.589Z",
"modifiedTimeStamp": "2021-11-08T19:26:08.473Z",
"createdBy": "sas.analyticsPipelines",
"modifiedBy": "sas.analyticsFlows",
"version": 2,
"id": "aac6228d-bb53-41cd-be3f-857cf0e9c692",
"name": "Copy CasTable (v2)",
"type": "casl",
"parameters": [
{
"version": 1,
"name": "sessionId",
"type": "CHARACTER",
"label": "CAS Session Id",
"required": false
},
{
"version": 1,
"name": "serverId",
"type": "CHARACTER",
"label": "CAS Server Id",
"required": true
},
{
"version": 1,
"name": "%VAR-sourceCasLib",
"type": "CHARACTER",
"label": "Source CAS Library",
"required": true
},
{
"version": 1,
"name": "%VAR-destinationCasLib",
"type": "CHARACTER",
"label": "Destination CAS Library",
"required": true
},
{
"version": 1,
"name": "%VAR-sourceTable",
"type": "CHARACTER",
"label": "Source Table Name",
"required": true
},
{
"version": 1,
"name": "%VAR-destinationTable",
"type": "CHARACTER",
"label": "Destination Table Name",
"required": true
},
{
"version": 1,
"name": "%VAR-destinationTableLabel",
"defaultValue": "",
"type": "CHARACTER",
"label": "Destination Table Label",
"required": false
},
{
"version": 1,
"name": "%VAR-replace",
"defaultValue": "1",
"type": "NUMERIC",
"label": "Replace destination table flag (true = replace)",
"required": true
},
{
"version": 1,
"name": "%VAR-saveType",
"defaultValue": "sashdat",
"type": "CHARACTER",
"label": "The type of file to save to (file extension)",
"required": false
},
{
"version": 1,
"name": "%VAR-promote",
"defaultValue": "1",
"type": "NUMERIC",
"label": "Scope in which to load table (true = global and false = session)",
"required": true
},
{
"version": 1,
"name": "%VAR-replication",
"defaultValue": "1",
"type": "NUMERIC",
"label": "Specifies the number of copies of the table to make for fault tolerance.",
"required": true
},
{
"version": 1,
"name": "%VAR-data_explorer_submission_id",
"type": "CHARACTER",
"label": "Unique identifier by which UI tracks this job",
"required": false
}
],
"code": "session server;\n\n/* Taken from https://gitlab.sas.com/dmv-gerrit/data-explorer-ui/-/blob/branch/src/main/resources/definitions/JobDefinition_CopyTable-v2.casl */\n \n/* IF NOT doing a Replace, check if target table exists and fail if it does */\ncheckReplace(replace, destinationCasLib, destinationTable);\n\n/* Save CAS table to DESTINATION caslib backing store */\n/* Save will automatically save as type represented by file ext */\nsaveName=destinationTable;\nif(saveType != \"\") then do;\n saveName=destinationTable || \".\" || saveType;\nend;\nsave status=rc result=r / caslib=destinationCasLib name=saveName\n table={caslib=sourceCasLib name=sourceTable} replace=replace viewAsTable=TRUE;\ncheckStatus(rc, \"Error saving table\", 3);\n\n/* pull the path of the source that was saved - to be used in load below */\ndestinationPath=dictionary(r, \"name\");\n\n/* Unload session table from memory in destination caslib */\ndropTableIfExists(destinationCasLib, destinationTable);\n\n/* Unload global table if exists */\ndropTableIfExists(destinationCasLib, destinationTable);\n\n/* Load table into memory in destination caslib */\nloadTable status=rc result=r / caslib=destinationCasLib path=destinationPath\n casOut={caslib=destinationCasLib name=destinationTable label=destinationTableLabel}\n promote=promote;\ncheckStatus(rc, \"Error promoting table\", 4);\n \nfunction checkStatus(rc, logMessage, errorCode);\n if rc.statusCode != 0 then do;\n print logMessage;\n print \"UserErrorCode: \"||errorCode;\n exit 1;\n end;\nend;\n \nfunction doesTableExist(casLib, casTable);\n tableExists result=r status=rc / caslib=casLib table=casTable;\n tableExists = dictionary(r, \"exists\");\n return tableExists;\nend func;\n \nfunction dropTableIfExists(casLib,casTable);\n tableExists = doesTableExist(casLib, casTable);\n if tableExists != 0 then do;\n print \"Dropping table: \"||casLib||\".\"||casTable;\n dropTable result=r status=rc/ caslib=casLib table=casTable quiet=0;\n checkStatus(rc, \"Error dropping table: \"||casLib||\".\"||casTable, 5);\n end;\nend func;\n\nfunction checkReplace(replace, caslib, table);\n if replace == false then do;\n exists = doesTableExist(caslib, table);\n if (exists !=0) then do;\n print \"Table already exists and replace flag is set to false.\";\n print \"UserErrorCode: 1\";\n exit 1;\n end;\n end;\nend func;\n\n\n",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobDefinitions/definitions/aac6228d-bb53-41cd-be3f-857cf0e9c692",
"uri": "/jobDefinitions/definitions/aac6228d-bb53-41cd-be3f-857cf0e9c692",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobDefinitions/definitions/aac6228d-bb53-41cd-be3f-857cf0e9c692",
"uri": "/jobDefinitions/definitions/aac6228d-bb53-41cd-be3f-857cf0e9c692",
"type": "application/vnd.sas.summary"
}
],
"properties": [
{
"name": "REST_EXECUTION_PROVIDER_ASSUME_URIS_ENCODED",
"value": "true"
}
]
},
{
"creationTimeStamp": "2021-11-08T19:27:16.626Z",
"modifiedTimeStamp": "2021-11-08T19:27:16.629Z",
"createdBy": "sas.SASDataExplorer",
"modifiedBy": "sas.SASDataExplorer",
"version": 2,
"id": "faf6228d-bb53-41cd-be3f-857cf0e9c692",
"name": "Copy CasTable (v2)",
"type": "casl",
"parameters": [
{
"version": 1,
"name": "sessionId",
"type": "CHARACTER",
"label": "CAS Session Id",
"required": false
},
{
"version": 1,
"name": "serverId",
"type": "CHARACTER",
"label": "CAS Server Id",
"required": true
},
{
"version": 1,
"name": "%VAR-sourceCasLib",
"type": "CHARACTER",
"label": "Source CAS Library",
"required": true
},
{
"version": 1,
"name": "%VAR-destinationCasLib",
"type": "CHARACTER",
"label": "Destination CAS Library",
"required": true
},
{
"version": 1,
"name": "%VAR-sourceTable",
"type": "CHARACTER",
"label": "Source Table Name",
"required": true
},
{
"version": 1,
"name": "%VAR-destinationTable",
"type": "CHARACTER",
"label": "Destination Table Name",
"required": true
},
{
"version": 1,
"name": "%VAR-destinationTableLabel",
"defaultValue": "",
"type": "CHARACTER",
"label": "Destination Table Label",
"required": false
},
{
"version": 1,
"name": "%VAR-replace",
"defaultValue": "1",
"type": "NUMERIC",
"label": "Replace destination table flag (true = replace)",
"required": true
},
{
"version": 1,
"name": "%VAR-saveType",
"defaultValue": "",
"type": "CHARACTER",
"label": "The type of file to save to (file extension)",
"required": true
},
{
"version": 1,
"name": "%VAR-promote",
"defaultValue": "1",
"type": "NUMERIC",
"label": "Scope in which to load table (true = global and false = session)",
"required": true
},
{
"version": 1,
"name": "%VAR-replication",
"defaultValue": "1",
"type": "NUMERIC",
"label": "Specifies the number of copies of the table to make for fault tolerance.",
"required": true
},
{
"version": 1,
"name": "%VAR-data_explorer_submission_id",
"type": "CHARACTER",
"label": "Unique identifier by which UI tracks this job",
"required": false
}
],
"code": "session server;\n \n/* IF NOT doing a Replace, check if target table exists and fail if it does */\ncheckReplace(replace, destinationCasLib, destinationTable);\n\n/* Save CAS table to DESTINATION caslib backing store */\n/* Save will automatically save as type represented by file ext */\nsaveName=destinationTable;\nif(saveType != \"\") then do;\n saveName=destinationTable || \".\" || saveType;\nend;\nsave status=rc result=r / caslib=destinationCasLib name=saveName\n table={caslib=sourceCasLib name=sourceTable} replace=replace;\ncheckStatus(rc, \"Error saving table\", 3);\n\n/* pull the path of the source that was saved - to be used in load below */\ndestinationPath=dictionary(r, \"name\");\n\n/* Unload session table from memory in destination caslib */\ndropTableIfExists(destinationCasLib, destinationTable);\n\n/* Unload global table if exists */\ndropTableIfExists(destinationCasLib, destinationTable);\n\n/* Load table into memory in destination caslib */\nloadTable status=rc result=r / caslib=destinationCasLib path=destinationPath\n casOut={caslib=destinationCasLib name=destinationTable label=destinationTableLabel}\n promote=promote;\ncheckStatus(rc, \"Error promoting table\", 4);\n \nfunction checkStatus(rc, logMessage, errorCode);\n if rc.statusCode != 0 then do;\n print logMessage;\n print \"UserErrorCode: \"||errorCode;\n exit 1;\n end;\nend;\n \nfunction doesTableExist(casLib, casTable);\n tableExists result=r status=rc / caslib=casLib table=casTable;\n tableExists = dictionary(r, \"exists\");\n return tableExists;\nend func;\n \nfunction dropTableIfExists(casLib,casTable);\n tableExists = doesTableExist(casLib, casTable);\n if tableExists != 0 then do;\n print \"Dropping table: \"||casLib||\".\"||casTable;\n dropTable result=r status=rc/ caslib=casLib table=casTable quiet=0;\n checkStatus(rc, \"Error dropping table: \"||casLib||\".\"||casTable, 5);\n end;\nend func;\n\nfunction checkReplace(replace, caslib, table);\n if replace == false then do;\n exists = doesTableExist(caslib, table);\n if (exists !=0) then do;\n print \"Table already exists and replace flag is set to false.\";\n print \"UserErrorCode: 1\";\n exit 1;\n end;\n end;\nend func;\n\n\n",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobDefinitions/definitions/faf6228d-bb53-41cd-be3f-857cf0e9c692",
"uri": "/jobDefinitions/definitions/faf6228d-bb53-41cd-be3f-857cf0e9c692",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobDefinitions/definitions/faf6228d-bb53-41cd-be3f-857cf0e9c692",
"uri": "/jobDefinitions/definitions/faf6228d-bb53-41cd-be3f-857cf0e9c692",
"type": "application/vnd.sas.summary"
}
],
"properties": [
{
"name": "REST_EXECUTION_PROVIDER_ASSUME_URIS_ENCODED",
"value": "true"
}
]
},
{
"creationTimeStamp": "2021-11-08T19:27:24.858Z",
"modifiedTimeStamp": "2021-11-08T19:27:24.860Z",
"createdBy": "sas.SASDataExplorer",
"modifiedBy": "sas.SASDataExplorer",
"version": 2,
"id": "97639c7d-b715-48da-ac9f-c1aa42cce1f1",
"name": "Import Table - Images",
"type": "casl",
"parameters": [
{
"version": 1,
"name": "sessionId",
"type": "CHARACTER",
"label": "CAS Session Id (optional)",
"required": false
},
{
"version": 1,
"name": "serverId",
"type": "CHARACTER",
"label": "CAS Server Id",
"required": true
},
{
"version": 1,
"name": "%VAR-sourceCasLib",
"type": "CHARACTER",
"label": "CAS Library",
"required": true
},
{
"version": 1,
"name": "%VAR-destinationCasLib",
"type": "CHARACTER",
"label": "CAS Library",
"required": true
},
{
"version": 1,
"name": "%VAR-destinationTable",
"type": "CHARACTER",
"label": "Table name",
"required": true
},
{
"version": 1,
"name": "%VAR-replace",
"defaultValue": "1",
"type": "NUMERIC",
"label": "Replace table flag (true = replace)",
"required": true
},
{
"version": 1,
"name": "%VAR-promote",
"defaultValue": "1",
"type": "NUMERIC",
"label": "Scope in which to load table (1 = global and 0 = session)",
"required": true
},
{
"version": 1,
"name": "%VAR-replication",
"defaultValue": "1",
"type": "NUMERIC",
"label": "Specifies the number of copies of the table to make for fault tolerance.",
"required": true
},
{
"version": 1,
"name": "%VAR-persist",
"defaultValue": "1",
"type": "NUMERIC",
"label": "Persist destination table flag (true = save table to destination caslib backing store)",
"required": true
},
{
"version": 1,
"name": "%VAR-destinationTableLabel",
"defaultValue": "",
"type": "CHARACTER",
"label": "Destination Table Label",
"required": false
},
{
"version": 1,
"name": "%VAR-sourceTableSourceName",
"defaultValue": "",
"type": "CHARACTER",
"label": "Path of image(s) to load, leave blank to load all images",
"required": true
},
{
"version": 1,
"name": "%VAR-recurse",
"defaultValue": "0",
"type": "NUMERIC",
"label": "Flag to recurse subdirectories",
"required": true
},
{
"version": 1,
"name": "%VAR-decode",
"defaultValue": "0",
"type": "NUMERIC",
"label": "Flag to decompress image and add metadata",
"required": true
},
{
"version": 1,
"name": "%VAR-series",
"defaultValue": "0",
"type": "NUMERIC",
"label": "Flag to set if images are a series",
"required": true
},
{
"version": 1,
"name": "%VAR-dicom",
"defaultValue": "0",
"type": "NUMERIC",
"label": "Flag to set dicom option",
"required": true
},
{
"version": 1,
"name": "%VAR-reverse",
"defaultValue": "0",
"type": "NUMERIC",
"label": "Flag to set reverse option",
"required": true
},
{
"version": 1,
"name": "%VAR-pathIsList",
"defaultValue": "0",
"type": "NUMERIC",
"label": "Flag to set pathIsList option",
"required": true
},
{
"version": 1,
"name": "%VAR-labelLevels",
"defaultValue": "0",
"type": "NUMERIC",
"label": "Specifies the maximum number of directory levels to include in the label",
"required": true
},
{
"version": 1,
"name": "%VAR-saveType",
"defaultValue": "",
"type": "CHARACTER",
"label": "The type of file to save to (file extension)",
"required": true
},
{
"version": 1,
"name": "%VAR-addColumns",
"defaultValue": "{}",
"type": "TABLE",
"label": "Specifies the metadata columns to add to the image",
"required": true
},
{
"version": 1,
"name": "%VAR-advancedOptionsTable",
"defaultValue": "{}",
"type": "TABLE",
"label": "Load image advanced import options",
"required": false
},
{
"version": 1,
"name": "%VAR-data_explorer_submission_id",
"type": "CHARACTER",
"label": "Unique identifier by which UI tracks this job",
"required": false
}
],
"code": "session server;\nloadactionset \"image\";\n\nloadParms={ caslib=sourceCasLib\n path=sourceTableSourceName\n decode=decode\n labelLevels=labelLevels\n pathIsList=pathIsList\n recurse=recurse\n casOut={ caslib=destinationCasLib\n name=destinationTable\n label=destinationTableLabel\n promote=false }\n};\n\nif (series = 1) then\n loadParms[\"series\"] = {\n dicom=dicom,\n reverse=reverse\n };\n\n/* Add columns if we have them */\nhasColumns=isNonEmptyList(addColumns);\nif (decode = 1 and hasColumns == true) then\n /* If decode = 1, the user can add metadata columns */\n loadParms[\"addColumns\"] = addColumns;\n\n/* Adds advanced option key/values to loadParameters */\n/* This allows advanced options to specify extra parameters or overwrite existing ones */\ndo k, v over advancedOptionsTable;\n loadParms[k] = v;\nend;\n\n/* IF NOT doing a Replace, check if target table exists and fail if it does */\ncheckReplace(replace, destinationCaslib, destinationTable);\n\n/* If not persisting, take promote status from job argument (false for initial load otherwise) */\nif(persist == false) then do;\n loadParms[\"casOut\"][\"promote\"] = promote;\n /* Unload session table from memory in destination caslib */\n dropTableIfExists(destinationCasLib, destinationTable);\n /* Unload global table from memory */\n dropTableIfExists(destinationCasLib, destinationTable);\nend;\nprint loadParms;\nimage.loadImages status=rc result=r / loadParms;\n\ncheckStatus(rc, \"Error loading images\", 4);\n\n/* If persisting, do save and then loadTable */\nif(persist == true) then do;\n /* Save CAS table to DESTINATION caslib backing store */\n /* Save will automatically save as type represented by file ext */\n saveName=destinationTable;\n if(saveType != \"\") then do;\n saveName=destinationTable || \".\" || saveType;\n end;\n save status=rc result=r / caslib=destinationCasLib\n name=saveName\n table={ caslib=destinationCasLib\n name=destinationTable }\n replace=replace;\n checkStatus(rc, \"Error saving images table\", 3);\n loadPath=dictionary(r, \"name\");\n loadCasLib=destinationCasLib;\n\n /* We should be ok dropping twice here, since we have already checked the replace flag above */\n\n /* Unload session table from memory in destination caslib */\n dropTableIfExists(destinationCasLib, destinationTable);\n /* Unload global table from memory */\n dropTableIfExists(destinationCasLib, destinationTable);\n\n /* Set up the parameters for the loadTable action below based on saved location above along with label and replication args*/\n loadParms={ caslib=loadCasLib\n path=loadPath\n casOut={ caslib=destinationCasLib\n name=destinationTable\n label=destinationTableLabel\n replication=replication }\n promote=promote };\n print loadParms;\n loadTable status=rc result=r / loadParms;\n checkStatus(rc, \"Error loading final table\", 4);\nend;\n\nfunction checkStatus(rc, logMessage, errorCode);\n if rc.statusCode != 0 then do;\n print logMessage;\n print \"UserErrorCode: \"||errorCode;\n exit 1;\n end;\nend;\n\nfunction doesTableExist(casLib, casTable);\n tableExists result=r status=rc / caslib=casLib table=casTable;\n tableExists = dictionary(r, \"exists\");\n return tableExists;\nend func;\n\nfunction dropTableIfExists(casLib,casTable);\n tableExists = doesTableExist(casLib, casTable);\n if tableExists != 0 then do;\n print \"Dropping table: \"||casLib||\".\"||casTable;\n dropTable result=r status=rc/ caslib=casLib table=casTable quiet=0;\n checkStatus(rc, \"Error dropping table: \"||casLib||\".\"||casTable, 5);\n end;\nend func;\n\nfunction checkReplace(replace, caslib, table);\n if replace == false then do;\n exists = doesTableExist(caslib, table);\n if (exists !=0) then do;\n print \"Table already exists and replace flag is set to false.\";\n print \"UserErrorCode: 1\";\n exit 1;\n end;\n end;\nend func;\n\nfunction isNonEmptyList(listArg);\n if isList(listArg) then do;\n nElements = dim(listArg);\n end;\n else do;\n nElements = 0;\n end;\n if nElements > 0 then do;\n return true;\n end;\n return false;\nend;",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobDefinitions/definitions/97639c7d-b715-48da-ac9f-c1aa42cce1f1",
"uri": "/jobDefinitions/definitions/97639c7d-b715-48da-ac9f-c1aa42cce1f1",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobDefinitions/definitions/97639c7d-b715-48da-ac9f-c1aa42cce1f1",
"uri": "/jobDefinitions/definitions/97639c7d-b715-48da-ac9f-c1aa42cce1f1",
"type": "application/vnd.sas.summary"
}
],
"properties": [
{
"name": "REST_EXECUTION_PROVIDER_ASSUME_URIS_ENCODED",
"value": "true"
}
]
},
{
"creationTimeStamp": "2021-11-08T19:27:27.084Z",
"modifiedTimeStamp": "2021-11-08T19:27:27.086Z",
"createdBy": "sas.SASDataExplorer",
"modifiedBy": "sas.SASDataExplorer",
"version": 2,
"id": "afbed716-533f-48ec-a17b-44cc62735eb7",
"name": "Load Table",
"type": "casl",
"parameters": [
{
"version": 1,
"name": "sessionId",
"type": "CHARACTER",
"label": "CAS Session Id (optional)",
"required": false
},
{
"version": 1,
"name": "serverId",
"type": "CHARACTER",
"label": "CAS Server Id",
"required": true
},
{
"version": 1,
"name": "%VAR-sourceCasLib",
"type": "CHARACTER",
"label": "CAS Library",
"required": true
},
{
"version": 1,
"name": "%VAR-sourceTable",
"type": "CHARACTER",
"label": "Table name",
"required": true
},
{
"version": 1,
"name": "%VAR-sourceTableSourceName",
"type": "CHARACTER",
"label": "Source Table Source Name",
"required": true
},
{
"version": 1,
"name": "%VAR-replace",
"defaultValue": "1",
"type": "NUMERIC",
"label": "Replace table flag (true = replace)",
"required": true
},
{
"version": 1,
"name": "%VAR-promote",
"defaultValue": "1",
"type": "NUMERIC",
"label": "Scope in which to load table (1 = global and 0 = session)",
"required": true
},
{
"version": 1,
"name": "%VAR-data_explorer_submission_id",
"type": "CHARACTER",
"label": "Unique identifier by which UI tracks this job",
"required": false
}
],
"code": "session server;\n\n/* IF NOT doing a Replace, check if target table exists and fail if it does */\ncheckReplace(replace, sourceCasLib, sourceTable);\n\n/* IF doing a Replace, unload table from memory in caslib - drop 1 (two drops in case both session and global exist) */\ndropTableIfExists(sourceCasLib, sourceTable);\n\n/* IF doing a Replace, unload table from memory in caslib - drop 2 */\ndropTableIfExists(sourceCasLib, sourceTable);\n\n/* IF promote set: Load table into memory in caslib as global table */\nloadTable status=rc result=r / caslib=sourceCasLib path=sourceTableSourceName\n casOut={caslib=sourceCasLib name=sourceTable} promote=promote;\ncheckStatus(rc, \"Error promoting table\", 4);\n\nfunction checkStatus(rc, logMessage, errorCode);\n if rc.statusCode != 0 then do;\n print logMessage;\n print \"UserErrorCode: \"||errorCode;\n exit 1;\n end;\nend;\n\nfunction doesTableExist(casLib, casTable);\n tableExists result=r status=rc / caslib=casLib table=casTable;\n tableExists = dictionary(r, \"exists\");\n return tableExists;\nend func;\n\nfunction dropTableIfExists(casLib,casTable);\n tableExists = doesTableExist(casLib, casTable);\n if tableExists != 0 then do;\n print \"Dropping table: \"||casLib||\".\"||casTable;\n dropTable result=r status=rc/ caslib=casLib table=casTable quiet=0;\n checkStatus(rc, \"Error dropping table: \"||casLib||\".\"||casTable, 5);\n end;\nend func;\n\nfunction checkReplace(replace, caslib, table);\n if replace == false then do;\n exists = doesTableExist(caslib, table);\n if (exists !=0) then do;\n print \"Table already exists and replace flag is set to false.\";\n print \"UserErrorCode: 1\";\n exit 1;\n end;\n end;\nend func;\n\n",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobDefinitions/definitions/afbed716-533f-48ec-a17b-44cc62735eb7",
"uri": "/jobDefinitions/definitions/afbed716-533f-48ec-a17b-44cc62735eb7",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobDefinitions/definitions/afbed716-533f-48ec-a17b-44cc62735eb7",
"uri": "/jobDefinitions/definitions/afbed716-533f-48ec-a17b-44cc62735eb7",
"type": "application/vnd.sas.summary"
}
],
"properties": [
{
"name": "REST_EXECUTION_PROVIDER_ASSUME_URIS_ENCODED",
"value": "true"
}
]
},
{
"creationTimeStamp": "2021-11-08T19:29:15.330Z",
"modifiedTimeStamp": "2021-11-08T19:29:15.331Z",
"createdBy": "sas.SASDataExplorer",
"modifiedBy": "sas.SASDataExplorer",
"version": 2,
"id": "e8969cab-f037-43b4-aab3-abb206f7bdf8",
"name": "Import Table - Google Drive (v2)",
"type": "casl",
"parameters": [
{
"version": 1,
"name": "sessionId",
"type": "CHARACTER",
"label": "CAS Session Id",
"required": false
},
{
"version": 1,
"name": "serverId",
"type": "CHARACTER",
"label": "CAS Server Id",
"required": true
},
{
"version": 1,
"name": "%VAR-sourceCasLib",
"type": "CHARACTER",
"label": "Source CAS Library",
"required": true
},
{
"version": 1,
"name": "%VAR-destinationCasLib",
"type": "CHARACTER",
"label": "Destination CAS Library",
"required": true
},
{
"version": 1,
"name": "%VAR-sourceTableSourceName",
"type": "CHARACTER",
"label": "Source Table Name",
"required": true
},
{
"version": 1,
"name": "%VAR-sourceTable",
"type": "CHARACTER",
"label": "Source Table Name",
"required": true
},
{
"version": 1,
"name": "%VAR-destinationTable",
"type": "CHARACTER",
"label": "Destination Table Name",
"required": true
},
{
"version": 1,
"name": "%VAR-destinationTableLabel",
"defaultValue": "",
"type": "CHARACTER",
"label": "Destination Table Label",
"required": false
},
{
"version": 1,
"name": "%VAR-replace",
"defaultValue": "1",
"type": "NUMERIC",
"label": "Replace destination table flag (true = replace)",
"required": true
},
{
"version": 1,
"name": "%VAR-persist",
"defaultValue": "1",
"type": "NUMERIC",
"label": "Persist destination table flag (true = save table to destination caslib backing store)",
"required": true
},
{
"version": 1,
"name": "%VAR-replication",
"defaultValue": "1",
"type": "NUMERIC",
"label": "Specifies the number of copies of the table to make for fault tolerance.",
"required": true
},
{
"version": 1,
"name": "%VAR-promote",
"defaultValue": "1",
"type": "NUMERIC",
"label": "Scope in which to load table (1 = global and 0 = session)",
"required": true
},
{
"version": 1,
"name": "%VAR-description",
"defaultValue": "Temporary caslib for google drive import",
"type": "CHARACTER",
"label": "Temporary caslib for google drive import",
"required": false
},
{
"version": 1,
"name": "%VAR-scope",
"defaultValue": "session",
"type": "CHARACTER",
"label": "Scope for temporary caslib for google drive import",
"required": false
},
{
"version": 1,
"name": "%VAR-type",
"defaultValue": "google drive",
"type": "CHARACTER",
"label": "Type of caslib for import",
"required": false
},
{
"version": 1,
"name": "%VAR-path",
"defaultValue": "",
"type": "CHARACTER",
"label": "Path for import",
"required": false
},
{
"version": 1,
"name": "%VAR-dataSourceAttributesTable",
"defaultValue": "{}",
"type": "TABLE",
"label": "Add caslib attributes",
"required": true
},
{
"version": 1,
"name": "%VAR-dataSourceOptionsTable",
"defaultValue": "{}",
"type": "TABLE",
"label": "Load table parameters",
"required": true
},
{
"version": 1,
"name": "preferences",
"defaultValue": "{}",
"type": "TABLE",
"label": "Import google drive preferences. Consumed by middle-tier after the job has completed successfully.",
"required": false
}
],
"code": "session server;\n\n/* add more variables as required */\nscriptContext[\"adhocCaslib\"] = sourceCasLib;\nscriptContext[\"dropAdhocCaslib\"] = false;\n\n/* code assumes promote == true */\n\naddCasLibParams={\n description = description,\n name = sourceCasLib,\n dataSource = {\n srcType=dataSourceAttributesTable.srcType\n }\n};\n\naddCaslib status=rc result=r / addCasLibParams;\ncheckStatus(scriptContext, rc, \"Error creating session cas lib\", 1);\n\nscriptContext[\"dropAdhocCaslib\"] = true;\n\n/* Set up the parameters to load the table with */\nloadParms={\n caslib = sourceCasLib,\n path = sourceTableSourceName,\n casOut = { caslib = destinationCasLib,\n name = destinationTable,\n label = destinationTableLabel,\n replace = replace,\n replication = replication },\n dataSourceOptions = {\n ddsgoogledrive_apiToken = dataSourceOptionsTable.ddsgoogledrive_apiToken,\n ddsgoogledrive_filePath = dataSourceOptionsTable.ddsgoogledrive_filePath,\n ddsgoogledrive_fileId = dataSourceOptionsTable.ddsgoogledrive_fileId,\n ddsgoogledrive_fileName = dataSourceOptionsTable.ddsgoogledrive_fileName,\n ddsgoogledrive_mimeType = dataSourceOptionsTable.ddsgoogledrive_mimeType,\n ddsgoogledrive_importOptions = dataSourceOptionsTable.ddsgoogledrive_importOptions,\n ddsgoogledrive_httpProxyServer = dataSourceOptionsTable.ddsgoogledrive_httpProxyServer,\n ddsgoogledrive_httpProxyPort = dataSourceOptionsTable.ddsgoogledrive_httpProxyPort\n }\n};\n\n/* IF NOT doing a Replace, check if target table exists and fail if it does */\ncheckReplace(scriptContext, replace, destinationCasLib, destinationTable);\n\n/*\n call to setSessOpt required else one will get \"Base table or view not found ORA-00942: table or view does not exist error\"\n it appears google drive provider doesn't use casOut.caslib correctly\n*/\nsetSessOpt status=rc result=r / caslib=destinationCasLib;\n\nif persist == true then do;\n /*\n promote defaults to false when not specified\n setting explicitly in order to emphasize that 1st loadTable must be session scoped\n */\n loadParms[\"promote\"] = false;\n\n checkStatus(scriptContext, rc, \"Error setting default caslib to \" || destinationCasLib, 2);\n\n print \"Loading table with load parameters: \";\n print loadParms;\n loadTable status=rc result=r / loadParms;\n checkStatus(scriptContext, rc, \"Error loading initial session table\", 2);\n\n /* Save CAS table to DESTINATION caslib backing store */\n save status=rc result=r / caslib=destinationCasLib,\n name=destinationTable,\n table={ caslib=destinationCasLib\n name=destinationTable },\n replace=replace;\n checkStatus(scriptContext, rc, \"Error saving table\", 3);\n\n loadPath=dictionary(r, \"name\");\n loadCasLib=destinationCasLib;\n \n /* Set up the parameters for the loadTable action below based on saved location above along with label and replication args*/\n loadParms={caslib=loadCasLib\n path=loadPath\n casOut={ caslib=destinationCasLib\n name=destinationTable\n label=destinationTableLabel\n replication=replication }\n promote=promote};\nend;\nelse do;\n /* we are not saving, but we may be promoting, so add promote to the loadParms */\n loadParms[\"promote\"]=promote;\n loadParms[\"casOut\"][\"replace\"]=false;\nend;\n\n/* We should be ok dropping twice here, since we have already checked the replace flag above */\n\n/* Unload session table from memory in destination caslib */\ndropTableIfExists(scriptContext, destinationCasLib, destinationTable);\n/* Unload global table from memory */\ndropTableIfExists(scriptContext, destinationCasLib, destinationTable);\n\n/* Load table into memory in destination caslib as global table */\nprint loadParms;\nloadTable status=rc result=r / loadParms;\ncheckStatus(scriptContext, rc, \"Error loading final table\", 4);\n\ndropCasLib(scriptContext);\n\nfunction hasVarList(vars);\n if isList(vars) then do;\n nvars = dim(vars);\n end;\n else do;\n nvars = 0;\n end;\n if nVars>0 then do;\n return true;\n end;\n return false;\nend;\n\nfunction checkStatus(context, rc, logMessage, errorCode);\n if rc.statusCode != 0 then do;\n print logMessage;\n print \"UserErrorCode: \"||errorCode;\n dropCasLib(context);\n exit 1;\n end;\nend func;\n\nfunction doesTableExist(casLib, casTable);\n tableExists result=r status=rc / caslib=casLib table=casTable;\n tableExists = dictionary(r, \"exists\");\n return tableExists;\nend func;\n\nfunction dropTableIfExists(context, casLib,casTable);\n tableExists = doesTableExist(casLib, casTable);\n if tableExists != 0 then do;\n print \"Dropping table: \"||casLib||\".\"||casTable;\n dropTable result=r status=rc/ caslib=casLib table=casTable quiet=0;\n checkStatus(context, rc, \"Error dropping table: \"||casLib||\".\"||casTable, 5);\n end;\nend func;\n\nfunction dropCasLib(context);\n if context[\"dropAdhocCaslib\"] then do;\n context[\"dropAdhocCaslib\"] = false;\n dropCaslib status=rc result=r / caslib=context[\"adhocCaslib\"] quiet=false;\n if rc.statusCode != 0 then do;\n print \"Error dropping temp session cas lib: \" || casLib;\n end;\n end;\n\nend func;\n\nfunction checkReplace(context, replace, caslib, table);\n if replace == false then do;\n exists = doesTableExist(caslib, table);\n if (exists != 0) then do;\n print \"Table already exists and replace flag is set to false.\";\n print \"UserErrorCode: 1\";\n dropCasLib(context);\n exit 1;\n end;\n end;\nend func;",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobDefinitions/definitions/e8969cab-f037-43b4-aab3-abb206f7bdf8",
"uri": "/jobDefinitions/definitions/e8969cab-f037-43b4-aab3-abb206f7bdf8",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobDefinitions/definitions/e8969cab-f037-43b4-aab3-abb206f7bdf8",
"uri": "/jobDefinitions/definitions/e8969cab-f037-43b4-aab3-abb206f7bdf8",
"type": "application/vnd.sas.summary"
}
],
"properties": [
{
"name": "REST_EXECUTION_PROVIDER_ASSUME_URIS_ENCODED",
"value": "true"
}
]
},
{
"creationTimeStamp": "2021-11-08T19:27:43.273Z",
"modifiedTimeStamp": "2021-11-08T19:27:43.275Z",
"createdBy": "sas.SASDataExplorer",
"modifiedBy": "sas.SASDataExplorer",
"version": 2,
"id": "b582a48f-0f09-4652-8dec-a39f7f953e83",
"name": "Unload Table",
"type": "casl",
"parameters": [
{
"version": 1,
"name": "sessionId",
"type": "CHARACTER",
"label": "CAS Session Id (optional)",
"required": false
},
{
"version": 1,
"name": "serverId",
"type": "CHARACTER",
"label": "CAS Server Id",
"required": true
},
{
"version": 1,
"name": "%VAR-sourceCasLib",
"type": "CHARACTER",
"label": "CAS Library",
"required": true
},
{
"version": 1,
"name": "%VAR-sourceTable",
"type": "CHARACTER",
"label": "Table Name",
"required": true
},
{
"version": 1,
"name": "data_explorer_submission_id",
"type": "CHARACTER",
"label": "Unique identifier by which UI tracks this job",
"required": false
}
],
"code": "/* IF doing a Replace, unload table from memory in caslib - drop 1 (two drops in case both session and global exist) */\ndropTableIfExists(sourceCasLib, sourceTable);\n\n/* IF doing a Replace, unload table from memory in caslib - drop 2 */\ndropTableIfExists(sourceCasLib, sourceTable);\n\nfunction checkStatus(rc, logMessage, errorCode);\n if rc.statusCode != 0 then do;\n print logMessage;\n print \"UserErrorCode: \"||errorCode;\n exit 1;\n end;\nend;\n\nfunction doesTableExist(casLib, casTable);\n tableExists result=r status=rc / caslib=casLib table=casTable;\n tableExists = dictionary(r, \"exists\");\n return tableExists;\nend func;\n\nfunction dropTableIfExists(casLib,casTable);\n tableExists = doesTableExist(casLib, casTable);\n if tableExists != 0 then do;\n print \"Dropping table: \"||casLib||\".\"||casTable;\n dropTable result=r status=rc/ caslib=casLib table=casTable quiet=0;\n checkStatus(rc, \"Error dropping table: \"||casLib||\".\"||casTable, 5);\n end;\nend func;",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobDefinitions/definitions/b582a48f-0f09-4652-8dec-a39f7f953e83",
"uri": "/jobDefinitions/definitions/b582a48f-0f09-4652-8dec-a39f7f953e83",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobDefinitions/definitions/b582a48f-0f09-4652-8dec-a39f7f953e83",
"uri": "/jobDefinitions/definitions/b582a48f-0f09-4652-8dec-a39f7f953e83",
"type": "application/vnd.sas.summary"
}
],
"properties": [
{
"name": "REST_EXECUTION_PROVIDER_ASSUME_URIS_ENCODED",
"value": "true"
}
]
}
],
"limit": 10,
"version": 2
}
{
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/jobDefinitions/definitions",
"uri": "/jobDefinitions/definitions",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "self",
"href": "/jobDefinitions/definitions?start=0&limit=10",
"uri": "/jobDefinitions/definitions?start=0&limit=10",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "next",
"href": "/jobDefinitions/definitions?start=10&limit=10",
"uri": "/jobDefinitions/definitions?start=10&limit=10",
"type": "application/vnd.sas.collection"
},
{
"method": "POST",
"rel": "createJobDefinition",
"href": "/jobDefinitions/definitions",
"uri": "/jobDefinitions/definitions",
"type": "application/vnd.sas.job.definition",
"responseType": "application/vnd.sas.job.definition"
}
],
"name": "jobdefinitions",
"accept": "application/vnd.sas.job.definition",
"start": 0,
"items": [
{
"creationTimeStamp": "2021-11-08T19:25:29.590Z",
"modifiedTimeStamp": "2021-11-08T19:25:29.658Z",
"createdBy": "sas.modelRepository",
"modifiedBy": "sas.modelRepository",
"version": 2,
"id": "c2283c0e-c69c-48cb-b314-84207afe7cb0",
"name": "Default Model Manager Scoring Job Definition",
"type": "Compute",
"parameters": [
{
"version": 1,
"name": "_contextName",
"defaultValue": "SAS Model Manager compute context",
"type": "CHARACTER",
"label": "Context Name",
"required": false
},
{
"version": 1,
"name": "_omitJsonLog",
"defaultValue": "true",
"type": "BOOLEAN",
"required": false
}
],
"code": "{mappedCode}",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobDefinitions/definitions/c2283c0e-c69c-48cb-b314-84207afe7cb0",
"uri": "/jobDefinitions/definitions/c2283c0e-c69c-48cb-b314-84207afe7cb0",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobDefinitions/definitions/c2283c0e-c69c-48cb-b314-84207afe7cb0",
"uri": "/jobDefinitions/definitions/c2283c0e-c69c-48cb-b314-84207afe7cb0",
"type": "application/vnd.sas.summary"
}
],
"properties": [
{
"name": "type",
"value": "scoring"
},
{
"name": "objecttype",
"value": "sas.models.model"
}
]
},
{
"creationTimeStamp": "2021-11-08T19:25:35.973Z",
"modifiedTimeStamp": "2021-11-08T19:25:35.976Z",
"createdBy": "sas.analyticsFlows",
"modifiedBy": "sas.analyticsFlows",
"version": 2,
"id": "801d5009-3b33-41c1-b7e4-b33f77248ede",
"name": "Analytics Flow Job Definition",
"type": "AnalyticsFlow",
"parameters": [
{
"version": 1,
"name": "flowId",
"type": "CHARACTER",
"label": "Flow ID",
"required": true
},
{
"version": 1,
"name": "toNodeUri",
"type": "CHARACTER",
"label": "ID of final node to run",
"required": false
},
{
"version": 1,
"name": "casServerId",
"defaultValue": "cas",
"type": "CHARACTER",
"label": "ID of CAS Server to use for Component execution",
"required": false
},
{
"version": 1,
"name": "casSessionName",
"defaultValue": "AdvancedAnalyticSession",
"type": "CHARACTER",
"label": "Name of CAS Session to use for Component execution",
"required": false
},
{
"version": 1,
"name": "contextName",
"type": "CHARACTER",
"label": "Name of Compute Context to use for Component execution",
"required": false
}
],
"code": "",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobDefinitions/definitions/801d5009-3b33-41c1-b7e4-b33f77248ede",
"uri": "/jobDefinitions/definitions/801d5009-3b33-41c1-b7e4-b33f77248ede",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobDefinitions/definitions/801d5009-3b33-41c1-b7e4-b33f77248ede",
"uri": "/jobDefinitions/definitions/801d5009-3b33-41c1-b7e4-b33f77248ede",
"type": "application/vnd.sas.summary"
}
],
"properties": []
},
{
"creationTimeStamp": "2021-11-08T19:25:41.775Z",
"modifiedTimeStamp": "2021-11-08T19:25:41.776Z",
"createdBy": "sas.audit",
"modifiedBy": "sas.audit",
"version": 2,
"id": "7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"name": "CAS Audit table update",
"description": "After upload of new Audit data into a temporary CAS table, this job appends the new data to the existing Audit data",
"type": "casl",
"parameters": [
{
"version": 1,
"name": "%VAR-expireDate",
"type": "CHARACTER",
"required": true
},
{
"version": 1,
"name": "%VAR-tempTableName",
"type": "CHARACTER",
"required": true
},
{
"version": 1,
"name": "%VAR-targetCaslib",
"type": "CHARACTER",
"required": true
},
{
"version": 1,
"name": "serverId",
"defaultValue": "cas-shared-default",
"type": "CHARACTER",
"required": false
}
],
"code": "whereStr=cat(\"'Time Stamp'n <= '\", expireDate, \"'\");\ndeleteRows / table={name='AUDIT' caslib=targetCaslib, where=whereStr};\nrun;\ncodeStr=cat(\"data AUDIT(caslib=\", targetCaslib, \" append=yes);set \", tempTableName, \"(caslib=\", targetCaslib, \");run;\");\ndatastep.runCode / code=codeStr;\nrun;\ntable.save status=sc / name='AUDIT' caslib=targetCaslib replace=true table={ name='AUDIT' caslib=targetCaslib };\nrun;\ntable.dropTable name='AUDIT' caslib=targetCaslib;\nrun;\ntable.dropTable name=tempTableName caslib=targetCaslib;\nrun;",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.summary"
}
],
"properties": []
},
{
"creationTimeStamp": "2021-11-08T19:27:14.440Z",
"modifiedTimeStamp": "2021-11-08T19:27:14.442Z",
"createdBy": "sas.SASDataExplorer",
"modifiedBy": "sas.SASDataExplorer",
"version": 2,
"id": "3ec9e0c3-6ef8-42d0-b233-807005322050",
"name": "Copy CasTable",
"type": "casl",
"parameters": [
{
"version": 1,
"name": "sessionId",
"type": "CHARACTER",
"label": "CAS Session Id",
"required": false
},
{
"version": 1,
"name": "serverId",
"type": "CHARACTER",
"label": "CAS Server Id",
"required": true
},
{
"version": 1,
"name": "%VAR-sourceCasLib",
"type": "CHARACTER",
"label": "Source CAS Library",
"required": true
},
{
"version": 1,
"name": "%VAR-destinationCasLib",
"type": "CHARACTER",
"label": "Destination CAS Library",
"required": true
},
{
"version": 1,
"name": "%VAR-sourceTable",
"type": "CHARACTER",
"label": "Source Table Name",
"required": true
},
{
"version": 1,
"name": "%VAR-destinationTable",
"type": "CHARACTER",
"label": "Destination Table Name",
"required": true
},
{
"version": 1,
"name": "%VAR-destinationTableLabel",
"defaultValue": "",
"type": "CHARACTER",
"label": "Destination Table Label",
"required": false
},
{
"version": 1,
"name": "%VAR-replace",
"defaultValue": "1",
"type": "NUMERIC",
"label": "Replace destination table flag (true = replace)",
"required": true
},
{
"version": 1,
"name": "%VAR-promote",
"defaultValue": "1",
"type": "NUMERIC",
"label": "Scope in which to load table (true = global and false = session)",
"required": true
},
{
"version": 1,
"name": "%VAR-replication",
"defaultValue": "1",
"type": "NUMERIC",
"label": "Specifies the number of copies of the table to make for fault tolerance.",
"required": true
},
{
"version": 1,
"name": "%VAR-data_explorer_submission_id",
"type": "CHARACTER",
"label": "Unique identifier by which UI tracks this job",
"required": false
}
],
"code": "session server;\n \n/* IF NOT doing a Replace, check if target table exists and fail if it does */\ncheckReplace(replace, destinationCasLib, destinationTable);\n \n/* Save CAS table to DESTINATION caslib backing store */\nsave status=rc result=r / caslib=destinationCasLib name=destinationTable\n table={caslib=sourceCasLib name=sourceTable} replace=replace;\ncheckStatus(rc, \"Error saving table\", 3);\n\n/* pull the path of the source that was saved - to be used in load below */\ndestinationPath=dictionary(r, \"name\");\n\n/* Unload session table from memory in destination caslib */\ndropTableIfExists(destinationCasLib, destinationTable);\n \n/* Unload global table if exists */\ndropTableIfExists(destinationCasLib, destinationTable);\n\n/* Load table into memory in destination caslib */\nloadTable status=rc result=r / caslib=destinationCasLib path=destinationPath\n casOut={caslib=destinationCasLib name=destinationTable label=destinationTableLabel}\n promote=promote;\ncheckStatus(rc, \"Error promoting table\", 4);\n \nfunction checkStatus(rc, logMessage, errorCode);\n if rc.statusCode != 0 then do;\n print logMessage;\n print \"UserErrorCode: \"||errorCode;\n exit 1;\n end;\nend;\n \nfunction doesTableExist(casLib, casTable);\n tableExists result=r status=rc / caslib=casLib table=casTable;\n tableExists = dictionary(r, \"exists\");\n return tableExists;\nend func;\n \nfunction dropTableIfExists(casLib,casTable);\n tableExists = doesTableExist(casLib, casTable);\n if tableExists != 0 then do;\n print \"Dropping table: \"||casLib||\".\"||casTable;\n dropTable result=r status=rc/ caslib=casLib table=casTable quiet=0;\n checkStatus(rc, \"Error dropping table: \"||casLib||\".\"||casTable, 5);\n end;\nend func;\n\nfunction checkReplace(replace, caslib, table);\n if replace == false then do;\n exists = doesTableExist(caslib, table);\n if (exists !=0) then do;\n print \"Table already exists and replace flag is set to false.\";\n print \"UserErrorCode: 1\";\n exit 1;\n end;\n end;\nend func;\n\n\n",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobDefinitions/definitions/3ec9e0c3-6ef8-42d0-b233-807005322050",
"uri": "/jobDefinitions/definitions/3ec9e0c3-6ef8-42d0-b233-807005322050",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobDefinitions/definitions/3ec9e0c3-6ef8-42d0-b233-807005322050",
"uri": "/jobDefinitions/definitions/3ec9e0c3-6ef8-42d0-b233-807005322050",
"type": "application/vnd.sas.summary"
}
],
"properties": [
{
"name": "REST_EXECUTION_PROVIDER_ASSUME_URIS_ENCODED",
"value": "true"
}
]
},
{
"creationTimeStamp": "2021-11-08T19:25:46.589Z",
"modifiedTimeStamp": "2021-11-08T19:26:08.473Z",
"createdBy": "sas.analyticsPipelines",
"modifiedBy": "sas.analyticsFlows",
"version": 2,
"id": "aac6228d-bb53-41cd-be3f-857cf0e9c692",
"name": "Copy CasTable (v2)",
"type": "casl",
"parameters": [
{
"version": 1,
"name": "sessionId",
"type": "CHARACTER",
"label": "CAS Session Id",
"required": false
},
{
"version": 1,
"name": "serverId",
"type": "CHARACTER",
"label": "CAS Server Id",
"required": true
},
{
"version": 1,
"name": "%VAR-sourceCasLib",
"type": "CHARACTER",
"label": "Source CAS Library",
"required": true
},
{
"version": 1,
"name": "%VAR-destinationCasLib",
"type": "CHARACTER",
"label": "Destination CAS Library",
"required": true
},
{
"version": 1,
"name": "%VAR-sourceTable",
"type": "CHARACTER",
"label": "Source Table Name",
"required": true
},
{
"version": 1,
"name": "%VAR-destinationTable",
"type": "CHARACTER",
"label": "Destination Table Name",
"required": true
},
{
"version": 1,
"name": "%VAR-destinationTableLabel",
"defaultValue": "",
"type": "CHARACTER",
"label": "Destination Table Label",
"required": false
},
{
"version": 1,
"name": "%VAR-replace",
"defaultValue": "1",
"type": "NUMERIC",
"label": "Replace destination table flag (true = replace)",
"required": true
},
{
"version": 1,
"name": "%VAR-saveType",
"defaultValue": "sashdat",
"type": "CHARACTER",
"label": "The type of file to save to (file extension)",
"required": false
},
{
"version": 1,
"name": "%VAR-promote",
"defaultValue": "1",
"type": "NUMERIC",
"label": "Scope in which to load table (true = global and false = session)",
"required": true
},
{
"version": 1,
"name": "%VAR-replication",
"defaultValue": "1",
"type": "NUMERIC",
"label": "Specifies the number of copies of the table to make for fault tolerance.",
"required": true
},
{
"version": 1,
"name": "%VAR-data_explorer_submission_id",
"type": "CHARACTER",
"label": "Unique identifier by which UI tracks this job",
"required": false
}
],
"code": "session server;\n\n/* Taken from https://gitlab.sas.com/dmv-gerrit/data-explorer-ui/-/blob/branch/src/main/resources/definitions/JobDefinition_CopyTable-v2.casl */\n \n/* IF NOT doing a Replace, check if target table exists and fail if it does */\ncheckReplace(replace, destinationCasLib, destinationTable);\n\n/* Save CAS table to DESTINATION caslib backing store */\n/* Save will automatically save as type represented by file ext */\nsaveName=destinationTable;\nif(saveType != \"\") then do;\n saveName=destinationTable || \".\" || saveType;\nend;\nsave status=rc result=r / caslib=destinationCasLib name=saveName\n table={caslib=sourceCasLib name=sourceTable} replace=replace viewAsTable=TRUE;\ncheckStatus(rc, \"Error saving table\", 3);\n\n/* pull the path of the source that was saved - to be used in load below */\ndestinationPath=dictionary(r, \"name\");\n\n/* Unload session table from memory in destination caslib */\ndropTableIfExists(destinationCasLib, destinationTable);\n\n/* Unload global table if exists */\ndropTableIfExists(destinationCasLib, destinationTable);\n\n/* Load table into memory in destination caslib */\nloadTable status=rc result=r / caslib=destinationCasLib path=destinationPath\n casOut={caslib=destinationCasLib name=destinationTable label=destinationTableLabel}\n promote=promote;\ncheckStatus(rc, \"Error promoting table\", 4);\n \nfunction checkStatus(rc, logMessage, errorCode);\n if rc.statusCode != 0 then do;\n print logMessage;\n print \"UserErrorCode: \"||errorCode;\n exit 1;\n end;\nend;\n \nfunction doesTableExist(casLib, casTable);\n tableExists result=r status=rc / caslib=casLib table=casTable;\n tableExists = dictionary(r, \"exists\");\n return tableExists;\nend func;\n \nfunction dropTableIfExists(casLib,casTable);\n tableExists = doesTableExist(casLib, casTable);\n if tableExists != 0 then do;\n print \"Dropping table: \"||casLib||\".\"||casTable;\n dropTable result=r status=rc/ caslib=casLib table=casTable quiet=0;\n checkStatus(rc, \"Error dropping table: \"||casLib||\".\"||casTable, 5);\n end;\nend func;\n\nfunction checkReplace(replace, caslib, table);\n if replace == false then do;\n exists = doesTableExist(caslib, table);\n if (exists !=0) then do;\n print \"Table already exists and replace flag is set to false.\";\n print \"UserErrorCode: 1\";\n exit 1;\n end;\n end;\nend func;\n\n\n",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobDefinitions/definitions/aac6228d-bb53-41cd-be3f-857cf0e9c692",
"uri": "/jobDefinitions/definitions/aac6228d-bb53-41cd-be3f-857cf0e9c692",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobDefinitions/definitions/aac6228d-bb53-41cd-be3f-857cf0e9c692",
"uri": "/jobDefinitions/definitions/aac6228d-bb53-41cd-be3f-857cf0e9c692",
"type": "application/vnd.sas.summary"
}
],
"properties": [
{
"name": "REST_EXECUTION_PROVIDER_ASSUME_URIS_ENCODED",
"value": "true"
}
]
},
{
"creationTimeStamp": "2021-11-08T19:27:16.626Z",
"modifiedTimeStamp": "2021-11-08T19:27:16.629Z",
"createdBy": "sas.SASDataExplorer",
"modifiedBy": "sas.SASDataExplorer",
"version": 2,
"id": "faf6228d-bb53-41cd-be3f-857cf0e9c692",
"name": "Copy CasTable (v2)",
"type": "casl",
"parameters": [
{
"version": 1,
"name": "sessionId",
"type": "CHARACTER",
"label": "CAS Session Id",
"required": false
},
{
"version": 1,
"name": "serverId",
"type": "CHARACTER",
"label": "CAS Server Id",
"required": true
},
{
"version": 1,
"name": "%VAR-sourceCasLib",
"type": "CHARACTER",
"label": "Source CAS Library",
"required": true
},
{
"version": 1,
"name": "%VAR-destinationCasLib",
"type": "CHARACTER",
"label": "Destination CAS Library",
"required": true
},
{
"version": 1,
"name": "%VAR-sourceTable",
"type": "CHARACTER",
"label": "Source Table Name",
"required": true
},
{
"version": 1,
"name": "%VAR-destinationTable",
"type": "CHARACTER",
"label": "Destination Table Name",
"required": true
},
{
"version": 1,
"name": "%VAR-destinationTableLabel",
"defaultValue": "",
"type": "CHARACTER",
"label": "Destination Table Label",
"required": false
},
{
"version": 1,
"name": "%VAR-replace",
"defaultValue": "1",
"type": "NUMERIC",
"label": "Replace destination table flag (true = replace)",
"required": true
},
{
"version": 1,
"name": "%VAR-saveType",
"defaultValue": "",
"type": "CHARACTER",
"label": "The type of file to save to (file extension)",
"required": true
},
{
"version": 1,
"name": "%VAR-promote",
"defaultValue": "1",
"type": "NUMERIC",
"label": "Scope in which to load table (true = global and false = session)",
"required": true
},
{
"version": 1,
"name": "%VAR-replication",
"defaultValue": "1",
"type": "NUMERIC",
"label": "Specifies the number of copies of the table to make for fault tolerance.",
"required": true
},
{
"version": 1,
"name": "%VAR-data_explorer_submission_id",
"type": "CHARACTER",
"label": "Unique identifier by which UI tracks this job",
"required": false
}
],
"code": "session server;\n \n/* IF NOT doing a Replace, check if target table exists and fail if it does */\ncheckReplace(replace, destinationCasLib, destinationTable);\n\n/* Save CAS table to DESTINATION caslib backing store */\n/* Save will automatically save as type represented by file ext */\nsaveName=destinationTable;\nif(saveType != \"\") then do;\n saveName=destinationTable || \".\" || saveType;\nend;\nsave status=rc result=r / caslib=destinationCasLib name=saveName\n table={caslib=sourceCasLib name=sourceTable} replace=replace;\ncheckStatus(rc, \"Error saving table\", 3);\n\n/* pull the path of the source that was saved - to be used in load below */\ndestinationPath=dictionary(r, \"name\");\n\n/* Unload session table from memory in destination caslib */\ndropTableIfExists(destinationCasLib, destinationTable);\n\n/* Unload global table if exists */\ndropTableIfExists(destinationCasLib, destinationTable);\n\n/* Load table into memory in destination caslib */\nloadTable status=rc result=r / caslib=destinationCasLib path=destinationPath\n casOut={caslib=destinationCasLib name=destinationTable label=destinationTableLabel}\n promote=promote;\ncheckStatus(rc, \"Error promoting table\", 4);\n \nfunction checkStatus(rc, logMessage, errorCode);\n if rc.statusCode != 0 then do;\n print logMessage;\n print \"UserErrorCode: \"||errorCode;\n exit 1;\n end;\nend;\n \nfunction doesTableExist(casLib, casTable);\n tableExists result=r status=rc / caslib=casLib table=casTable;\n tableExists = dictionary(r, \"exists\");\n return tableExists;\nend func;\n \nfunction dropTableIfExists(casLib,casTable);\n tableExists = doesTableExist(casLib, casTable);\n if tableExists != 0 then do;\n print \"Dropping table: \"||casLib||\".\"||casTable;\n dropTable result=r status=rc/ caslib=casLib table=casTable quiet=0;\n checkStatus(rc, \"Error dropping table: \"||casLib||\".\"||casTable, 5);\n end;\nend func;\n\nfunction checkReplace(replace, caslib, table);\n if replace == false then do;\n exists = doesTableExist(caslib, table);\n if (exists !=0) then do;\n print \"Table already exists and replace flag is set to false.\";\n print \"UserErrorCode: 1\";\n exit 1;\n end;\n end;\nend func;\n\n\n",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobDefinitions/definitions/faf6228d-bb53-41cd-be3f-857cf0e9c692",
"uri": "/jobDefinitions/definitions/faf6228d-bb53-41cd-be3f-857cf0e9c692",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobDefinitions/definitions/faf6228d-bb53-41cd-be3f-857cf0e9c692",
"uri": "/jobDefinitions/definitions/faf6228d-bb53-41cd-be3f-857cf0e9c692",
"type": "application/vnd.sas.summary"
}
],
"properties": [
{
"name": "REST_EXECUTION_PROVIDER_ASSUME_URIS_ENCODED",
"value": "true"
}
]
},
{
"creationTimeStamp": "2021-11-08T19:27:24.858Z",
"modifiedTimeStamp": "2021-11-08T19:27:24.860Z",
"createdBy": "sas.SASDataExplorer",
"modifiedBy": "sas.SASDataExplorer",
"version": 2,
"id": "97639c7d-b715-48da-ac9f-c1aa42cce1f1",
"name": "Import Table - Images",
"type": "casl",
"parameters": [
{
"version": 1,
"name": "sessionId",
"type": "CHARACTER",
"label": "CAS Session Id (optional)",
"required": false
},
{
"version": 1,
"name": "serverId",
"type": "CHARACTER",
"label": "CAS Server Id",
"required": true
},
{
"version": 1,
"name": "%VAR-sourceCasLib",
"type": "CHARACTER",
"label": "CAS Library",
"required": true
},
{
"version": 1,
"name": "%VAR-destinationCasLib",
"type": "CHARACTER",
"label": "CAS Library",
"required": true
},
{
"version": 1,
"name": "%VAR-destinationTable",
"type": "CHARACTER",
"label": "Table name",
"required": true
},
{
"version": 1,
"name": "%VAR-replace",
"defaultValue": "1",
"type": "NUMERIC",
"label": "Replace table flag (true = replace)",
"required": true
},
{
"version": 1,
"name": "%VAR-promote",
"defaultValue": "1",
"type": "NUMERIC",
"label": "Scope in which to load table (1 = global and 0 = session)",
"required": true
},
{
"version": 1,
"name": "%VAR-replication",
"defaultValue": "1",
"type": "NUMERIC",
"label": "Specifies the number of copies of the table to make for fault tolerance.",
"required": true
},
{
"version": 1,
"name": "%VAR-persist",
"defaultValue": "1",
"type": "NUMERIC",
"label": "Persist destination table flag (true = save table to destination caslib backing store)",
"required": true
},
{
"version": 1,
"name": "%VAR-destinationTableLabel",
"defaultValue": "",
"type": "CHARACTER",
"label": "Destination Table Label",
"required": false
},
{
"version": 1,
"name": "%VAR-sourceTableSourceName",
"defaultValue": "",
"type": "CHARACTER",
"label": "Path of image(s) to load, leave blank to load all images",
"required": true
},
{
"version": 1,
"name": "%VAR-recurse",
"defaultValue": "0",
"type": "NUMERIC",
"label": "Flag to recurse subdirectories",
"required": true
},
{
"version": 1,
"name": "%VAR-decode",
"defaultValue": "0",
"type": "NUMERIC",
"label": "Flag to decompress image and add metadata",
"required": true
},
{
"version": 1,
"name": "%VAR-series",
"defaultValue": "0",
"type": "NUMERIC",
"label": "Flag to set if images are a series",
"required": true
},
{
"version": 1,
"name": "%VAR-dicom",
"defaultValue": "0",
"type": "NUMERIC",
"label": "Flag to set dicom option",
"required": true
},
{
"version": 1,
"name": "%VAR-reverse",
"defaultValue": "0",
"type": "NUMERIC",
"label": "Flag to set reverse option",
"required": true
},
{
"version": 1,
"name": "%VAR-pathIsList",
"defaultValue": "0",
"type": "NUMERIC",
"label": "Flag to set pathIsList option",
"required": true
},
{
"version": 1,
"name": "%VAR-labelLevels",
"defaultValue": "0",
"type": "NUMERIC",
"label": "Specifies the maximum number of directory levels to include in the label",
"required": true
},
{
"version": 1,
"name": "%VAR-saveType",
"defaultValue": "",
"type": "CHARACTER",
"label": "The type of file to save to (file extension)",
"required": true
},
{
"version": 1,
"name": "%VAR-addColumns",
"defaultValue": "{}",
"type": "TABLE",
"label": "Specifies the metadata columns to add to the image",
"required": true
},
{
"version": 1,
"name": "%VAR-advancedOptionsTable",
"defaultValue": "{}",
"type": "TABLE",
"label": "Load image advanced import options",
"required": false
},
{
"version": 1,
"name": "%VAR-data_explorer_submission_id",
"type": "CHARACTER",
"label": "Unique identifier by which UI tracks this job",
"required": false
}
],
"code": "session server;\nloadactionset \"image\";\n\nloadParms={ caslib=sourceCasLib\n path=sourceTableSourceName\n decode=decode\n labelLevels=labelLevels\n pathIsList=pathIsList\n recurse=recurse\n casOut={ caslib=destinationCasLib\n name=destinationTable\n label=destinationTableLabel\n promote=false }\n};\n\nif (series = 1) then\n loadParms[\"series\"] = {\n dicom=dicom,\n reverse=reverse\n };\n\n/* Add columns if we have them */\nhasColumns=isNonEmptyList(addColumns);\nif (decode = 1 and hasColumns == true) then\n /* If decode = 1, the user can add metadata columns */\n loadParms[\"addColumns\"] = addColumns;\n\n/* Adds advanced option key/values to loadParameters */\n/* This allows advanced options to specify extra parameters or overwrite existing ones */\ndo k, v over advancedOptionsTable;\n loadParms[k] = v;\nend;\n\n/* IF NOT doing a Replace, check if target table exists and fail if it does */\ncheckReplace(replace, destinationCaslib, destinationTable);\n\n/* If not persisting, take promote status from job argument (false for initial load otherwise) */\nif(persist == false) then do;\n loadParms[\"casOut\"][\"promote\"] = promote;\n /* Unload session table from memory in destination caslib */\n dropTableIfExists(destinationCasLib, destinationTable);\n /* Unload global table from memory */\n dropTableIfExists(destinationCasLib, destinationTable);\nend;\nprint loadParms;\nimage.loadImages status=rc result=r / loadParms;\n\ncheckStatus(rc, \"Error loading images\", 4);\n\n/* If persisting, do save and then loadTable */\nif(persist == true) then do;\n /* Save CAS table to DESTINATION caslib backing store */\n /* Save will automatically save as type represented by file ext */\n saveName=destinationTable;\n if(saveType != \"\") then do;\n saveName=destinationTable || \".\" || saveType;\n end;\n save status=rc result=r / caslib=destinationCasLib\n name=saveName\n table={ caslib=destinationCasLib\n name=destinationTable }\n replace=replace;\n checkStatus(rc, \"Error saving images table\", 3);\n loadPath=dictionary(r, \"name\");\n loadCasLib=destinationCasLib;\n\n /* We should be ok dropping twice here, since we have already checked the replace flag above */\n\n /* Unload session table from memory in destination caslib */\n dropTableIfExists(destinationCasLib, destinationTable);\n /* Unload global table from memory */\n dropTableIfExists(destinationCasLib, destinationTable);\n\n /* Set up the parameters for the loadTable action below based on saved location above along with label and replication args*/\n loadParms={ caslib=loadCasLib\n path=loadPath\n casOut={ caslib=destinationCasLib\n name=destinationTable\n label=destinationTableLabel\n replication=replication }\n promote=promote };\n print loadParms;\n loadTable status=rc result=r / loadParms;\n checkStatus(rc, \"Error loading final table\", 4);\nend;\n\nfunction checkStatus(rc, logMessage, errorCode);\n if rc.statusCode != 0 then do;\n print logMessage;\n print \"UserErrorCode: \"||errorCode;\n exit 1;\n end;\nend;\n\nfunction doesTableExist(casLib, casTable);\n tableExists result=r status=rc / caslib=casLib table=casTable;\n tableExists = dictionary(r, \"exists\");\n return tableExists;\nend func;\n\nfunction dropTableIfExists(casLib,casTable);\n tableExists = doesTableExist(casLib, casTable);\n if tableExists != 0 then do;\n print \"Dropping table: \"||casLib||\".\"||casTable;\n dropTable result=r status=rc/ caslib=casLib table=casTable quiet=0;\n checkStatus(rc, \"Error dropping table: \"||casLib||\".\"||casTable, 5);\n end;\nend func;\n\nfunction checkReplace(replace, caslib, table);\n if replace == false then do;\n exists = doesTableExist(caslib, table);\n if (exists !=0) then do;\n print \"Table already exists and replace flag is set to false.\";\n print \"UserErrorCode: 1\";\n exit 1;\n end;\n end;\nend func;\n\nfunction isNonEmptyList(listArg);\n if isList(listArg) then do;\n nElements = dim(listArg);\n end;\n else do;\n nElements = 0;\n end;\n if nElements > 0 then do;\n return true;\n end;\n return false;\nend;",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobDefinitions/definitions/97639c7d-b715-48da-ac9f-c1aa42cce1f1",
"uri": "/jobDefinitions/definitions/97639c7d-b715-48da-ac9f-c1aa42cce1f1",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobDefinitions/definitions/97639c7d-b715-48da-ac9f-c1aa42cce1f1",
"uri": "/jobDefinitions/definitions/97639c7d-b715-48da-ac9f-c1aa42cce1f1",
"type": "application/vnd.sas.summary"
}
],
"properties": [
{
"name": "REST_EXECUTION_PROVIDER_ASSUME_URIS_ENCODED",
"value": "true"
}
]
},
{
"creationTimeStamp": "2021-11-08T19:27:27.084Z",
"modifiedTimeStamp": "2021-11-08T19:27:27.086Z",
"createdBy": "sas.SASDataExplorer",
"modifiedBy": "sas.SASDataExplorer",
"version": 2,
"id": "afbed716-533f-48ec-a17b-44cc62735eb7",
"name": "Load Table",
"type": "casl",
"parameters": [
{
"version": 1,
"name": "sessionId",
"type": "CHARACTER",
"label": "CAS Session Id (optional)",
"required": false
},
{
"version": 1,
"name": "serverId",
"type": "CHARACTER",
"label": "CAS Server Id",
"required": true
},
{
"version": 1,
"name": "%VAR-sourceCasLib",
"type": "CHARACTER",
"label": "CAS Library",
"required": true
},
{
"version": 1,
"name": "%VAR-sourceTable",
"type": "CHARACTER",
"label": "Table name",
"required": true
},
{
"version": 1,
"name": "%VAR-sourceTableSourceName",
"type": "CHARACTER",
"label": "Source Table Source Name",
"required": true
},
{
"version": 1,
"name": "%VAR-replace",
"defaultValue": "1",
"type": "NUMERIC",
"label": "Replace table flag (true = replace)",
"required": true
},
{
"version": 1,
"name": "%VAR-promote",
"defaultValue": "1",
"type": "NUMERIC",
"label": "Scope in which to load table (1 = global and 0 = session)",
"required": true
},
{
"version": 1,
"name": "%VAR-data_explorer_submission_id",
"type": "CHARACTER",
"label": "Unique identifier by which UI tracks this job",
"required": false
}
],
"code": "session server;\n\n/* IF NOT doing a Replace, check if target table exists and fail if it does */\ncheckReplace(replace, sourceCasLib, sourceTable);\n\n/* IF doing a Replace, unload table from memory in caslib - drop 1 (two drops in case both session and global exist) */\ndropTableIfExists(sourceCasLib, sourceTable);\n\n/* IF doing a Replace, unload table from memory in caslib - drop 2 */\ndropTableIfExists(sourceCasLib, sourceTable);\n\n/* IF promote set: Load table into memory in caslib as global table */\nloadTable status=rc result=r / caslib=sourceCasLib path=sourceTableSourceName\n casOut={caslib=sourceCasLib name=sourceTable} promote=promote;\ncheckStatus(rc, \"Error promoting table\", 4);\n\nfunction checkStatus(rc, logMessage, errorCode);\n if rc.statusCode != 0 then do;\n print logMessage;\n print \"UserErrorCode: \"||errorCode;\n exit 1;\n end;\nend;\n\nfunction doesTableExist(casLib, casTable);\n tableExists result=r status=rc / caslib=casLib table=casTable;\n tableExists = dictionary(r, \"exists\");\n return tableExists;\nend func;\n\nfunction dropTableIfExists(casLib,casTable);\n tableExists = doesTableExist(casLib, casTable);\n if tableExists != 0 then do;\n print \"Dropping table: \"||casLib||\".\"||casTable;\n dropTable result=r status=rc/ caslib=casLib table=casTable quiet=0;\n checkStatus(rc, \"Error dropping table: \"||casLib||\".\"||casTable, 5);\n end;\nend func;\n\nfunction checkReplace(replace, caslib, table);\n if replace == false then do;\n exists = doesTableExist(caslib, table);\n if (exists !=0) then do;\n print \"Table already exists and replace flag is set to false.\";\n print \"UserErrorCode: 1\";\n exit 1;\n end;\n end;\nend func;\n\n",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobDefinitions/definitions/afbed716-533f-48ec-a17b-44cc62735eb7",
"uri": "/jobDefinitions/definitions/afbed716-533f-48ec-a17b-44cc62735eb7",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobDefinitions/definitions/afbed716-533f-48ec-a17b-44cc62735eb7",
"uri": "/jobDefinitions/definitions/afbed716-533f-48ec-a17b-44cc62735eb7",
"type": "application/vnd.sas.summary"
}
],
"properties": [
{
"name": "REST_EXECUTION_PROVIDER_ASSUME_URIS_ENCODED",
"value": "true"
}
]
},
{
"creationTimeStamp": "2021-11-08T19:29:15.330Z",
"modifiedTimeStamp": "2021-11-08T19:29:15.331Z",
"createdBy": "sas.SASDataExplorer",
"modifiedBy": "sas.SASDataExplorer",
"version": 2,
"id": "e8969cab-f037-43b4-aab3-abb206f7bdf8",
"name": "Import Table - Google Drive (v2)",
"type": "casl",
"parameters": [
{
"version": 1,
"name": "sessionId",
"type": "CHARACTER",
"label": "CAS Session Id",
"required": false
},
{
"version": 1,
"name": "serverId",
"type": "CHARACTER",
"label": "CAS Server Id",
"required": true
},
{
"version": 1,
"name": "%VAR-sourceCasLib",
"type": "CHARACTER",
"label": "Source CAS Library",
"required": true
},
{
"version": 1,
"name": "%VAR-destinationCasLib",
"type": "CHARACTER",
"label": "Destination CAS Library",
"required": true
},
{
"version": 1,
"name": "%VAR-sourceTableSourceName",
"type": "CHARACTER",
"label": "Source Table Name",
"required": true
},
{
"version": 1,
"name": "%VAR-sourceTable",
"type": "CHARACTER",
"label": "Source Table Name",
"required": true
},
{
"version": 1,
"name": "%VAR-destinationTable",
"type": "CHARACTER",
"label": "Destination Table Name",
"required": true
},
{
"version": 1,
"name": "%VAR-destinationTableLabel",
"defaultValue": "",
"type": "CHARACTER",
"label": "Destination Table Label",
"required": false
},
{
"version": 1,
"name": "%VAR-replace",
"defaultValue": "1",
"type": "NUMERIC",
"label": "Replace destination table flag (true = replace)",
"required": true
},
{
"version": 1,
"name": "%VAR-persist",
"defaultValue": "1",
"type": "NUMERIC",
"label": "Persist destination table flag (true = save table to destination caslib backing store)",
"required": true
},
{
"version": 1,
"name": "%VAR-replication",
"defaultValue": "1",
"type": "NUMERIC",
"label": "Specifies the number of copies of the table to make for fault tolerance.",
"required": true
},
{
"version": 1,
"name": "%VAR-promote",
"defaultValue": "1",
"type": "NUMERIC",
"label": "Scope in which to load table (1 = global and 0 = session)",
"required": true
},
{
"version": 1,
"name": "%VAR-description",
"defaultValue": "Temporary caslib for google drive import",
"type": "CHARACTER",
"label": "Temporary caslib for google drive import",
"required": false
},
{
"version": 1,
"name": "%VAR-scope",
"defaultValue": "session",
"type": "CHARACTER",
"label": "Scope for temporary caslib for google drive import",
"required": false
},
{
"version": 1,
"name": "%VAR-type",
"defaultValue": "google drive",
"type": "CHARACTER",
"label": "Type of caslib for import",
"required": false
},
{
"version": 1,
"name": "%VAR-path",
"defaultValue": "",
"type": "CHARACTER",
"label": "Path for import",
"required": false
},
{
"version": 1,
"name": "%VAR-dataSourceAttributesTable",
"defaultValue": "{}",
"type": "TABLE",
"label": "Add caslib attributes",
"required": true
},
{
"version": 1,
"name": "%VAR-dataSourceOptionsTable",
"defaultValue": "{}",
"type": "TABLE",
"label": "Load table parameters",
"required": true
},
{
"version": 1,
"name": "preferences",
"defaultValue": "{}",
"type": "TABLE",
"label": "Import google drive preferences. Consumed by middle-tier after the job has completed successfully.",
"required": false
}
],
"code": "session server;\n\n/* add more variables as required */\nscriptContext[\"adhocCaslib\"] = sourceCasLib;\nscriptContext[\"dropAdhocCaslib\"] = false;\n\n/* code assumes promote == true */\n\naddCasLibParams={\n description = description,\n name = sourceCasLib,\n dataSource = {\n srcType=dataSourceAttributesTable.srcType\n }\n};\n\naddCaslib status=rc result=r / addCasLibParams;\ncheckStatus(scriptContext, rc, \"Error creating session cas lib\", 1);\n\nscriptContext[\"dropAdhocCaslib\"] = true;\n\n/* Set up the parameters to load the table with */\nloadParms={\n caslib = sourceCasLib,\n path = sourceTableSourceName,\n casOut = { caslib = destinationCasLib,\n name = destinationTable,\n label = destinationTableLabel,\n replace = replace,\n replication = replication },\n dataSourceOptions = {\n ddsgoogledrive_apiToken = dataSourceOptionsTable.ddsgoogledrive_apiToken,\n ddsgoogledrive_filePath = dataSourceOptionsTable.ddsgoogledrive_filePath,\n ddsgoogledrive_fileId = dataSourceOptionsTable.ddsgoogledrive_fileId,\n ddsgoogledrive_fileName = dataSourceOptionsTable.ddsgoogledrive_fileName,\n ddsgoogledrive_mimeType = dataSourceOptionsTable.ddsgoogledrive_mimeType,\n ddsgoogledrive_importOptions = dataSourceOptionsTable.ddsgoogledrive_importOptions,\n ddsgoogledrive_httpProxyServer = dataSourceOptionsTable.ddsgoogledrive_httpProxyServer,\n ddsgoogledrive_httpProxyPort = dataSourceOptionsTable.ddsgoogledrive_httpProxyPort\n }\n};\n\n/* IF NOT doing a Replace, check if target table exists and fail if it does */\ncheckReplace(scriptContext, replace, destinationCasLib, destinationTable);\n\n/*\n call to setSessOpt required else one will get \"Base table or view not found ORA-00942: table or view does not exist error\"\n it appears google drive provider doesn't use casOut.caslib correctly\n*/\nsetSessOpt status=rc result=r / caslib=destinationCasLib;\n\nif persist == true then do;\n /*\n promote defaults to false when not specified\n setting explicitly in order to emphasize that 1st loadTable must be session scoped\n */\n loadParms[\"promote\"] = false;\n\n checkStatus(scriptContext, rc, \"Error setting default caslib to \" || destinationCasLib, 2);\n\n print \"Loading table with load parameters: \";\n print loadParms;\n loadTable status=rc result=r / loadParms;\n checkStatus(scriptContext, rc, \"Error loading initial session table\", 2);\n\n /* Save CAS table to DESTINATION caslib backing store */\n save status=rc result=r / caslib=destinationCasLib,\n name=destinationTable,\n table={ caslib=destinationCasLib\n name=destinationTable },\n replace=replace;\n checkStatus(scriptContext, rc, \"Error saving table\", 3);\n\n loadPath=dictionary(r, \"name\");\n loadCasLib=destinationCasLib;\n \n /* Set up the parameters for the loadTable action below based on saved location above along with label and replication args*/\n loadParms={caslib=loadCasLib\n path=loadPath\n casOut={ caslib=destinationCasLib\n name=destinationTable\n label=destinationTableLabel\n replication=replication }\n promote=promote};\nend;\nelse do;\n /* we are not saving, but we may be promoting, so add promote to the loadParms */\n loadParms[\"promote\"]=promote;\n loadParms[\"casOut\"][\"replace\"]=false;\nend;\n\n/* We should be ok dropping twice here, since we have already checked the replace flag above */\n\n/* Unload session table from memory in destination caslib */\ndropTableIfExists(scriptContext, destinationCasLib, destinationTable);\n/* Unload global table from memory */\ndropTableIfExists(scriptContext, destinationCasLib, destinationTable);\n\n/* Load table into memory in destination caslib as global table */\nprint loadParms;\nloadTable status=rc result=r / loadParms;\ncheckStatus(scriptContext, rc, \"Error loading final table\", 4);\n\ndropCasLib(scriptContext);\n\nfunction hasVarList(vars);\n if isList(vars) then do;\n nvars = dim(vars);\n end;\n else do;\n nvars = 0;\n end;\n if nVars>0 then do;\n return true;\n end;\n return false;\nend;\n\nfunction checkStatus(context, rc, logMessage, errorCode);\n if rc.statusCode != 0 then do;\n print logMessage;\n print \"UserErrorCode: \"||errorCode;\n dropCasLib(context);\n exit 1;\n end;\nend func;\n\nfunction doesTableExist(casLib, casTable);\n tableExists result=r status=rc / caslib=casLib table=casTable;\n tableExists = dictionary(r, \"exists\");\n return tableExists;\nend func;\n\nfunction dropTableIfExists(context, casLib,casTable);\n tableExists = doesTableExist(casLib, casTable);\n if tableExists != 0 then do;\n print \"Dropping table: \"||casLib||\".\"||casTable;\n dropTable result=r status=rc/ caslib=casLib table=casTable quiet=0;\n checkStatus(context, rc, \"Error dropping table: \"||casLib||\".\"||casTable, 5);\n end;\nend func;\n\nfunction dropCasLib(context);\n if context[\"dropAdhocCaslib\"] then do;\n context[\"dropAdhocCaslib\"] = false;\n dropCaslib status=rc result=r / caslib=context[\"adhocCaslib\"] quiet=false;\n if rc.statusCode != 0 then do;\n print \"Error dropping temp session cas lib: \" || casLib;\n end;\n end;\n\nend func;\n\nfunction checkReplace(context, replace, caslib, table);\n if replace == false then do;\n exists = doesTableExist(caslib, table);\n if (exists != 0) then do;\n print \"Table already exists and replace flag is set to false.\";\n print \"UserErrorCode: 1\";\n dropCasLib(context);\n exit 1;\n end;\n end;\nend func;",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobDefinitions/definitions/e8969cab-f037-43b4-aab3-abb206f7bdf8",
"uri": "/jobDefinitions/definitions/e8969cab-f037-43b4-aab3-abb206f7bdf8",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobDefinitions/definitions/e8969cab-f037-43b4-aab3-abb206f7bdf8",
"uri": "/jobDefinitions/definitions/e8969cab-f037-43b4-aab3-abb206f7bdf8",
"type": "application/vnd.sas.summary"
}
],
"properties": [
{
"name": "REST_EXECUTION_PROVIDER_ASSUME_URIS_ENCODED",
"value": "true"
}
]
},
{
"creationTimeStamp": "2021-11-08T19:27:43.273Z",
"modifiedTimeStamp": "2021-11-08T19:27:43.275Z",
"createdBy": "sas.SASDataExplorer",
"modifiedBy": "sas.SASDataExplorer",
"version": 2,
"id": "b582a48f-0f09-4652-8dec-a39f7f953e83",
"name": "Unload Table",
"type": "casl",
"parameters": [
{
"version": 1,
"name": "sessionId",
"type": "CHARACTER",
"label": "CAS Session Id (optional)",
"required": false
},
{
"version": 1,
"name": "serverId",
"type": "CHARACTER",
"label": "CAS Server Id",
"required": true
},
{
"version": 1,
"name": "%VAR-sourceCasLib",
"type": "CHARACTER",
"label": "CAS Library",
"required": true
},
{
"version": 1,
"name": "%VAR-sourceTable",
"type": "CHARACTER",
"label": "Table Name",
"required": true
},
{
"version": 1,
"name": "data_explorer_submission_id",
"type": "CHARACTER",
"label": "Unique identifier by which UI tracks this job",
"required": false
}
],
"code": "/* IF doing a Replace, unload table from memory in caslib - drop 1 (two drops in case both session and global exist) */\ndropTableIfExists(sourceCasLib, sourceTable);\n\n/* IF doing a Replace, unload table from memory in caslib - drop 2 */\ndropTableIfExists(sourceCasLib, sourceTable);\n\nfunction checkStatus(rc, logMessage, errorCode);\n if rc.statusCode != 0 then do;\n print logMessage;\n print \"UserErrorCode: \"||errorCode;\n exit 1;\n end;\nend;\n\nfunction doesTableExist(casLib, casTable);\n tableExists result=r status=rc / caslib=casLib table=casTable;\n tableExists = dictionary(r, \"exists\");\n return tableExists;\nend func;\n\nfunction dropTableIfExists(casLib,casTable);\n tableExists = doesTableExist(casLib, casTable);\n if tableExists != 0 then do;\n print \"Dropping table: \"||casLib||\".\"||casTable;\n dropTable result=r status=rc/ caslib=casLib table=casTable quiet=0;\n checkStatus(rc, \"Error dropping table: \"||casLib||\".\"||casTable, 5);\n end;\nend func;",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobDefinitions/definitions/b582a48f-0f09-4652-8dec-a39f7f953e83",
"uri": "/jobDefinitions/definitions/b582a48f-0f09-4652-8dec-a39f7f953e83",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobDefinitions/definitions/b582a48f-0f09-4652-8dec-a39f7f953e83",
"uri": "/jobDefinitions/definitions/b582a48f-0f09-4652-8dec-a39f7f953e83",
"type": "application/vnd.sas.summary"
}
],
"properties": [
{
"name": "REST_EXECUTION_PROVIDER_ASSUME_URIS_ENCODED",
"value": "true"
}
]
}
],
"limit": 10,
"version": 2
}
This is sample BadRequest response when using GET definitions with an invalid filter.
{
"errorCode": 1100,
"message": "Unsupported function in filter request: fsdafa",
"details": [
"traceId: 5a747af1547a6ef7",
"path: /jobDefinitions/definitions"
],
"links": [],
"version": 2,
"httpStatusCode": 400
}
{
"errorCode": 1100,
"message": "Unsupported function in filter request: fsdafa",
"details": [
"traceId: 5a747af1547a6ef7",
"path: /jobDefinitions/definitions"
],
"links": [],
"version": 2,
"httpStatusCode": 400
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | jobDefinitionCollection |
400 | Bad Request | The request was invalid. An invalid filter or combination of request parameters was provided. | error2 |
Create job definitions
Code samples
# You can also use wget
curl -X POST http://mock-jobDefinitions.apifirst.unx.sas.com/jobDefinitions/definitions#multiPost \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.collection+json' \
-H 'Accept: application/vnd.sas.collection+json' \
-H 'accept: string'
const inputBody = '{
"items": [
{
"version": 2,
"name": "Simple proc print",
"description": "Show the contents of sashelp.class using PROC PRINT",
"type": "Compute",
"parameters": [
{
"version": 1,
"name": "_contextName",
"defaultValue": "SAS Job Execution compute context",
"type": "CHARACTER",
"label": "Context Name",
"required": false
}
],
"code": "ods html style=HTMLBlue;\nproc print data=sashelp.class; run; quit;\nods html close;"
},
{
"version": 2,
"name": "Unload Table",
"type": "casl",
"parameters": [
{
"version": 1,
"name": "sessionId",
"type": "CHARACTER",
"label": "CAS Session Id (optional)",
"required": false
},
{
"version": 1,
"name": "serverId",
"type": "CHARACTER",
"label": "CAS Server Id",
"required": true
},
{
"version": 1,
"name": "%VAR-sourceCasLib",
"type": "CHARACTER",
"label": "CAS Library",
"required": true
},
{
"version": 1,
"name": "%VAR-sourceTable",
"type": "CHARACTER",
"label": "Table Name",
"required": true
},
{
"version": 1,
"name": "data_explorer_submission_id",
"type": "CHARACTER",
"label": "Unique identifier by which UI tracks this job",
"required": false
}
],
"code": "/* IF doing a Replace, unload table from memory in caslib - drop 1 (two drops in case both session and global exist) */\ndropTableIfExists(sourceCasLib, sourceTable);\n\n/* IF doing a Replace, unload table from memory in caslib - drop 2 */\ndropTableIfExists(sourceCasLib, sourceTable);\n\nfunction checkStatus(rc, logMessage, errorCode);\n if rc.statusCode != 0 then do;\n print logMessage;\n print \"UserErrorCode: \"||errorCode;\n exit 1;\n end;\nend;\n\nfunction doesTableExist(casLib, casTable);\n tableExists result=r status=rc / caslib=casLib table=casTable;\n tableExists = dictionary(r, \"exists\");\n return tableExists;\nend func;\n\nfunction dropTableIfExists(casLib,casTable);\n tableExists = doesTableExist(casLib, casTable);\n if tableExists != 0 then do;\n print \"Dropping table: \"||casLib||\".\"||casTable;\n dropTable result=r status=rc/ caslib=casLib table=casTable quiet=0;\n checkStatus(rc, \"Error dropping table: \"||casLib||\".\"||casTable, 5);\n end;\nend func;",
"properties": [
{
"name": "REST_EXECUTION_PROVIDER_ASSUME_URIS_ENCODED",
"value": "true"
}
]
}
]
}';
const headers = {
'Content-Type':'application/vnd.sas.collection+json',
'Accept':'application/vnd.sas.collection+json',
'accept':'string'
};
fetch('http://mock-jobDefinitions.apifirst.unx.sas.com/jobDefinitions/definitions#multiPost',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.collection+json',
'Accept': 'application/vnd.sas.collection+json',
'accept': 'string'
}
r = requests.post('http://mock-jobDefinitions.apifirst.unx.sas.com/jobDefinitions/definitions#multiPost', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.collection+json"},
"Accept": []string{"application/vnd.sas.collection+json"},
"accept": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-jobDefinitions.apifirst.unx.sas.com/jobDefinitions/definitions#multiPost", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /definitions#multiPost
Creates multiple job definitions.
Body parameter
Sample body to create multiple job definitions.
{
"items": [
{
"version": 2,
"name": "Simple proc print",
"description": "Show the contents of sashelp.class using PROC PRINT",
"type": "Compute",
"parameters": [
{
"version": 1,
"name": "_contextName",
"defaultValue": "SAS Job Execution compute context",
"type": "CHARACTER",
"label": "Context Name",
"required": false
}
],
"code": "ods html style=HTMLBlue;\nproc print data=sashelp.class; run; quit;\nods html close;"
},
{
"version": 2,
"name": "Unload Table",
"type": "casl",
"parameters": [
{
"version": 1,
"name": "sessionId",
"type": "CHARACTER",
"label": "CAS Session Id (optional)",
"required": false
},
{
"version": 1,
"name": "serverId",
"type": "CHARACTER",
"label": "CAS Server Id",
"required": true
},
{
"version": 1,
"name": "%VAR-sourceCasLib",
"type": "CHARACTER",
"label": "CAS Library",
"required": true
},
{
"version": 1,
"name": "%VAR-sourceTable",
"type": "CHARACTER",
"label": "Table Name",
"required": true
},
{
"version": 1,
"name": "data_explorer_submission_id",
"type": "CHARACTER",
"label": "Unique identifier by which UI tracks this job",
"required": false
}
],
"code": "/* IF doing a Replace, unload table from memory in caslib - drop 1 (two drops in case both session and global exist) */\ndropTableIfExists(sourceCasLib, sourceTable);\n\n/* IF doing a Replace, unload table from memory in caslib - drop 2 */\ndropTableIfExists(sourceCasLib, sourceTable);\n\nfunction checkStatus(rc, logMessage, errorCode);\n if rc.statusCode != 0 then do;\n print logMessage;\n print \"UserErrorCode: \"||errorCode;\n exit 1;\n end;\nend;\n\nfunction doesTableExist(casLib, casTable);\n tableExists result=r status=rc / caslib=casLib table=casTable;\n tableExists = dictionary(r, \"exists\");\n return tableExists;\nend func;\n\nfunction dropTableIfExists(casLib,casTable);\n tableExists = doesTableExist(casLib, casTable);\n if tableExists != 0 then do;\n print \"Dropping table: \"||casLib||\".\"||casTable;\n dropTable result=r status=rc/ caslib=casLib table=casTable quiet=0;\n checkStatus(rc, \"Error dropping table: \"||casLib||\".\"||casTable, 5);\n end;\nend func;",
"properties": [
{
"name": "REST_EXECUTION_PROVIDER_ASSUME_URIS_ENCODED",
"value": "true"
}
]
}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
parentFolderUri | query | string | false | The URI of the parent folder to contain the job definition. |
accept | header | string | false | Accept header value for the versioned media type corresponding to the version to be returned. |
body | body | jobDefinitionCollection | false | The job definitions to create. |
Example responses
This is sample response when using POST to create multiple definitions.
{
"links": [],
"name": "items",
"items": [
{
"creationTimeStamp": "2021-11-08T19:25:29.590Z",
"modifiedTimeStamp": "2021-11-08T19:25:29.658Z",
"createdBy": "sas.modelRepository",
"modifiedBy": "sas.modelRepository",
"version": 2,
"id": "c2283c0e-c69c-48cb-b314-84207afe7cb0",
"name": "Default Model Manager Scoring Job Definition",
"type": "Compute",
"parameters": [
{
"version": 1,
"name": "_contextName",
"defaultValue": "SAS Model Manager compute context",
"type": "CHARACTER",
"label": "Context Name",
"required": false
},
{
"version": 1,
"name": "_omitJsonLog",
"defaultValue": "true",
"type": "BOOLEAN",
"required": false
}
],
"code": "{mappedCode}",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobDefinitions/definitions/c2283c0e-c69c-48cb-b314-84207afe7cb0",
"uri": "/jobDefinitions/definitions/c2283c0e-c69c-48cb-b314-84207afe7cb0",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobDefinitions/definitions/c2283c0e-c69c-48cb-b314-84207afe7cb0",
"uri": "/jobDefinitions/definitions/c2283c0e-c69c-48cb-b314-84207afe7cb0",
"type": "application/vnd.sas.summary"
}
],
"properties": [
{
"name": "type",
"value": "scoring"
},
{
"name": "objecttype",
"value": "sas.models.model"
}
]
},
{
"creationTimeStamp": "2021-11-08T19:25:35.973Z",
"modifiedTimeStamp": "2021-11-08T19:25:35.976Z",
"createdBy": "sas.analyticsFlows",
"modifiedBy": "sas.analyticsFlows",
"version": 2,
"id": "801d5009-3b33-41c1-b7e4-b33f77248ede",
"name": "Analytics Flow Job Definition",
"type": "AnalyticsFlow",
"parameters": [
{
"version": 1,
"name": "flowId",
"type": "CHARACTER",
"label": "Flow ID",
"required": true
},
{
"version": 1,
"name": "toNodeUri",
"type": "CHARACTER",
"label": "ID of final node to run",
"required": false
},
{
"version": 1,
"name": "casServerId",
"defaultValue": "cas",
"type": "CHARACTER",
"label": "ID of CAS Server to use for Component execution",
"required": false
},
{
"version": 1,
"name": "casSessionName",
"defaultValue": "AdvancedAnalyticSession",
"type": "CHARACTER",
"label": "Name of CAS Session to use for Component execution",
"required": false
},
{
"version": 1,
"name": "contextName",
"type": "CHARACTER",
"label": "Name of Compute Context to use for Component execution",
"required": false
}
],
"code": "",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobDefinitions/definitions/801d5009-3b33-41c1-b7e4-b33f77248ede",
"uri": "/jobDefinitions/definitions/801d5009-3b33-41c1-b7e4-b33f77248ede",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobDefinitions/definitions/801d5009-3b33-41c1-b7e4-b33f77248ede",
"uri": "/jobDefinitions/definitions/801d5009-3b33-41c1-b7e4-b33f77248ede",
"type": "application/vnd.sas.summary"
}
],
"properties": []
}
],
"version": 2
}
This is sample BadRequest response when using POST to create multiple definitions.
{
"errorCode": 0,
"message": "The request body was missing or invalid.",
"details": [
"traceId: d0028cbf2fea304c",
"path: /jobDefinitions/definitions"
],
"links": [],
"version": 2,
"httpStatusCode": 400
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. The items in the response MUST match 1 to 1 with the items in the request. If the job definition was created successfully, then the item in the response will be an application/vnd.sas.job.definition object. If the create failed for a particular job definition, then the corresponding item in the response will be an application/vnd.sas.error object. | jobDefinitionCollection |
400 | Bad Request | The request was invalid. | error2 |
415 | Unsupported Media Type | The requested media type is not supported. | None |
Get headers for a job definition
Code samples
# You can also use wget
curl -X HEAD http://mock-jobDefinitions.apifirst.unx.sas.com/jobDefinitions/definitions/{definitionId}
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('http://mock-jobDefinitions.apifirst.unx.sas.com/jobDefinitions/definitions/{definitionId}',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('http://mock-jobDefinitions.apifirst.unx.sas.com/jobDefinitions/definitions/{definitionId}')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "http://mock-jobDefinitions.apifirst.unx.sas.com/jobDefinitions/definitions/{definitionId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /definitions/{definitionId}
Retrieves headers for a job definition. Can also be used to check if a job definition exists.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
definitionId | path | string | true | The ID of the job definition. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. The job definition exists. | None |
404 | Not Found | No job definition exists at the requested path. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | The HTTP-date string that represents the timestamp of the most recent update to this object. | |
200 | Etag | string | A tag that identifies the revision of this object. |
Get the job definition summary
Code samples
# You can also use wget
curl -X GET http://mock-jobDefinitions.apifirst.unx.sas.com/jobDefinitions/definitions/{definitionId}#resourceSummary \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.summary+json'
const headers = {
'Accept':'application/vnd.sas.summary+json'
};
fetch('http://mock-jobDefinitions.apifirst.unx.sas.com/jobDefinitions/definitions/{definitionId}#resourceSummary',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.summary+json'
}
r = requests.get('http://mock-jobDefinitions.apifirst.unx.sas.com/jobDefinitions/definitions/{definitionId}#resourceSummary', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.summary+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-jobDefinitions.apifirst.unx.sas.com/jobDefinitions/definitions/{definitionId}#resourceSummary", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /definitions/{definitionId}
Returns the summary representation of the job definition that is specified by the provided job definition ID.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
definitionId | path | string | true | The ID of the job definition. |
Example responses
This is sample response when using GET to get a job definition summary.
{
"creationTimeStamp": "2021-11-11T22:41:36.106Z",
"modifiedTimeStamp": "2021-11-12T14:49:51.505Z",
"createdBy": "user1",
"modifiedBy": "user1",
"id": "d7a112d7-b5df-4343-9161-4c264d678447",
"type": "jobDefinition",
"name": "Simple proc print",
"description": "Show the contents of sashelp.class using PROC PRINT",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobDefinitions/definitions/d7a112d7-b5df-4343-9161-4c264d678447",
"uri": "/jobDefinitions/definitions/d7a112d7-b5df-4343-9161-4c264d678447",
"type": "application/vnd.sas.job.definition"
}
],
"version": 2
}
This is sample NotFound response when using GET definition as resource summary.
{
"errorCode": 0,
"message": "Job definition not found for id c2283c0e-c69c-48cb-b314-84207afe7cb0.",
"details": [
"traceId: 40ec7b91ec8ebffb",
"path: /jobDefinitions/definitions/c2283c0e-c69c-48cb-b314-84207afe7cb0x"
],
"links": [],
"version": 2,
"httpStatusCode": 404
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | resourceSummary |
404 | Not Found | No resource exists at the requested path. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | The HTTP-date string that represents the timestamp of the most recent update to this object. | |
200 | Etag | string | A tag that identifies the revision of this object. |
Get a job definition
Code samples
# You can also use wget
curl -X GET http://mock-jobDefinitions.apifirst.unx.sas.com/jobDefinitions/definitions/{definitionId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.job.definition+json'
const headers = {
'Accept':'application/vnd.sas.job.definition+json'
};
fetch('http://mock-jobDefinitions.apifirst.unx.sas.com/jobDefinitions/definitions/{definitionId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.job.definition+json'
}
r = requests.get('http://mock-jobDefinitions.apifirst.unx.sas.com/jobDefinitions/definitions/{definitionId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.job.definition+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-jobDefinitions.apifirst.unx.sas.com/jobDefinitions/definitions/{definitionId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /definitions/{definitionId}
Returns the job definition that is specified by the provided job definition ID.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
definitionId | path | string | true | The ID of the job definition. |
Example responses
This is sample response when using GET to get a job definition.
{
"creationTimeStamp": "2021-11-12T14:59:22.788Z",
"modifiedTimeStamp": "2021-11-12T14:59:22.792Z",
"createdBy": "user1",
"modifiedBy": "user1",
"version": 2,
"id": "4748cee3-0eb2-4815-ab04-cd2bbd878cb4",
"name": "Simple proc print",
"description": "Show the contents of sashelp.class using PROC PRINT",
"type": "Compute",
"parameters": [
{
"version": 1,
"name": "_contextName",
"defaultValue": "SAS Job Execution compute context",
"type": "CHARACTER",
"label": "Context Name",
"required": false
}
],
"code": "ods html style=HTMLBlue;\nproc print data=sashelp.class; run; quit;\nods html close;",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobDefinitions/definitions/4748cee3-0eb2-4815-ab04-cd2bbd878cb4",
"uri": "/jobDefinitions/definitions/4748cee3-0eb2-4815-ab04-cd2bbd878cb4",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobDefinitions/definitions/4748cee3-0eb2-4815-ab04-cd2bbd878cb4",
"uri": "/jobDefinitions/definitions/4748cee3-0eb2-4815-ab04-cd2bbd878cb4",
"type": "application/vnd.sas.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobDefinitions/definitions/4748cee3-0eb2-4815-ab04-cd2bbd878cb4",
"uri": "/jobDefinitions/definitions/4748cee3-0eb2-4815-ab04-cd2bbd878cb4",
"type": "application/vnd.sas.job.definition",
"responseType": "application/vnd.sas.job.definition"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobDefinitions/definitions/4748cee3-0eb2-4815-ab04-cd2bbd878cb4",
"uri": "/jobDefinitions/definitions/4748cee3-0eb2-4815-ab04-cd2bbd878cb4"
}
],
"properties": []
}
{
"creationTimeStamp": "2021-11-12T14:59:22.788Z",
"modifiedTimeStamp": "2021-11-12T14:59:22.792Z",
"createdBy": "user1",
"modifiedBy": "user1",
"version": 2,
"id": "4748cee3-0eb2-4815-ab04-cd2bbd878cb4",
"name": "Simple proc print",
"description": "Show the contents of sashelp.class using PROC PRINT",
"type": "Compute",
"parameters": [
{
"version": 1,
"name": "_contextName",
"defaultValue": "SAS Job Execution compute context",
"type": "CHARACTER",
"label": "Context Name",
"required": false
}
],
"code": "ods html style=HTMLBlue;\nproc print data=sashelp.class; run; quit;\nods html close;",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobDefinitions/definitions/4748cee3-0eb2-4815-ab04-cd2bbd878cb4",
"uri": "/jobDefinitions/definitions/4748cee3-0eb2-4815-ab04-cd2bbd878cb4",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobDefinitions/definitions/4748cee3-0eb2-4815-ab04-cd2bbd878cb4",
"uri": "/jobDefinitions/definitions/4748cee3-0eb2-4815-ab04-cd2bbd878cb4",
"type": "application/vnd.sas.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobDefinitions/definitions/4748cee3-0eb2-4815-ab04-cd2bbd878cb4",
"uri": "/jobDefinitions/definitions/4748cee3-0eb2-4815-ab04-cd2bbd878cb4",
"type": "application/vnd.sas.job.definition",
"responseType": "application/vnd.sas.job.definition"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobDefinitions/definitions/4748cee3-0eb2-4815-ab04-cd2bbd878cb4",
"uri": "/jobDefinitions/definitions/4748cee3-0eb2-4815-ab04-cd2bbd878cb4"
}
],
"properties": []
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | jobDefinition |
404 | Not Found | No resource exists at the requested path. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | The HTTP-date string that represents the timestamp of the most recent update to this object. | |
200 | Etag | string | A tag that identifies the revision of this object. |
Update a job definition
Code samples
# You can also use wget
curl -X PUT http://mock-jobDefinitions.apifirst.unx.sas.com/jobDefinitions/definitions/{definitionId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.job.definition+json' \
-H 'Accept: application/vnd.sas.job.definition+json' \
-H 'If-Match: string' \
-H 'If-Unmodified-Since: string'
const inputBody = '{
"version": 2,
"id": "35d7b64c-bd29-4a28-9d16-94d897224487",
"name": "Proc print with AGE filter",
"description": "Show the contents of sashelp.class using PROC PRINT and filtering by AGE.",
"type": "Compute",
"parameters": [
{
"version": 1,
"name": "_contextName",
"defaultValue": "SAS Job Execution compute context",
"type": "CHARACTER",
"label": "Context Name",
"required": false
},
{
"version": 1,
"name": "AGE",
"defaultValue": "10",
"type": "NUMERIC",
"label": "Lowest age for report",
"required": false
}
],
"code": "ods html style=HTMLBlue;\nproc print data=sashelp.class; where age > &AGE; run; quit;\nods html close;"
}';
const headers = {
'Content-Type':'application/vnd.sas.job.definition+json',
'Accept':'application/vnd.sas.job.definition+json',
'If-Match':'string',
'If-Unmodified-Since':'string'
};
fetch('http://mock-jobDefinitions.apifirst.unx.sas.com/jobDefinitions/definitions/{definitionId}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.job.definition+json',
'Accept': 'application/vnd.sas.job.definition+json',
'If-Match': 'string',
'If-Unmodified-Since': 'string'
}
r = requests.put('http://mock-jobDefinitions.apifirst.unx.sas.com/jobDefinitions/definitions/{definitionId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.job.definition+json"},
"Accept": []string{"application/vnd.sas.job.definition+json"},
"If-Match": []string{"string"},
"If-Unmodified-Since": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "http://mock-jobDefinitions.apifirst.unx.sas.com/jobDefinitions/definitions/{definitionId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /definitions/{definitionId}
Updates the job definition specified by the provided job definition ID.
Body parameter
Sample body to update a job definition.
{
"version": 2,
"id": "35d7b64c-bd29-4a28-9d16-94d897224487",
"name": "Proc print with AGE filter",
"description": "Show the contents of sashelp.class using PROC PRINT and filtering by AGE.",
"type": "Compute",
"parameters": [
{
"version": 1,
"name": "_contextName",
"defaultValue": "SAS Job Execution compute context",
"type": "CHARACTER",
"label": "Context Name",
"required": false
},
{
"version": 1,
"name": "AGE",
"defaultValue": "10",
"type": "NUMERIC",
"label": "Lowest age for report",
"required": false
}
],
"code": "ods html style=HTMLBlue;\nproc print data=sashelp.class; where age > &AGE; run; quit;\nods html close;"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
definitionId | path | string | true | ID of the job definition to update. |
parentFolderUri | query | string | false | The URI of the parent folder to contain the job definition. If the job definition is in a different folder, it will be moved to the specified parent folder. |
If-Match | header | string | false | The entity tag obtained from the most recent ETag response header of this Job Definition. Must match the current entity tag for the Job Definition. |
If-Unmodified-Since | header | string | false | Ignored when If-Match is specified. The timestamp obtained from the most recent Last-Modified response header of this Job Definition. Must be later than or equal to the timestamp when the Job Definition was last modified. |
body | body | jobDefinition | true | description |
Example responses
This is sample response when using PUT to update a job definition.
{
"creationTimeStamp": "2021-11-12T14:59:22.788Z",
"modifiedTimeStamp": "2021-11-12T15:01:11.417Z",
"createdBy": "user1",
"modifiedBy": "user1",
"version": 2,
"id": "4748cee3-0eb2-4815-ab04-cd2bbd878cb4",
"name": "Proc print with AGE filter",
"description": "Show the contents of sashelp.class using PROC PRINT and filtering by AGE.",
"type": "Compute",
"parameters": [
{
"version": 1,
"name": "_contextName",
"defaultValue": "SAS Job Execution compute context",
"type": "CHARACTER",
"label": "Context Name",
"required": false
},
{
"version": 1,
"name": "AGE",
"defaultValue": "10",
"type": "NUMERIC",
"label": "Lowest age for report",
"required": false
}
],
"code": "ods html style=HTMLBlue;\nproc print data=sashelp.class; where age > &AGE; run; quit;\nods html close;",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobDefinitions/definitions/4748cee3-0eb2-4815-ab04-cd2bbd878cb4",
"uri": "/jobDefinitions/definitions/4748cee3-0eb2-4815-ab04-cd2bbd878cb4",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobDefinitions/definitions/4748cee3-0eb2-4815-ab04-cd2bbd878cb4",
"uri": "/jobDefinitions/definitions/4748cee3-0eb2-4815-ab04-cd2bbd878cb4",
"type": "application/vnd.sas.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobDefinitions/definitions/4748cee3-0eb2-4815-ab04-cd2bbd878cb4",
"uri": "/jobDefinitions/definitions/4748cee3-0eb2-4815-ab04-cd2bbd878cb4",
"type": "application/vnd.sas.job.definition",
"responseType": "application/vnd.sas.job.definition"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobDefinitions/definitions/4748cee3-0eb2-4815-ab04-cd2bbd878cb4",
"uri": "/jobDefinitions/definitions/4748cee3-0eb2-4815-ab04-cd2bbd878cb4"
}
],
"properties": []
}
{
"creationTimeStamp": "2021-11-12T14:59:22.788Z",
"modifiedTimeStamp": "2021-11-12T15:01:11.417Z",
"createdBy": "user1",
"modifiedBy": "user1",
"version": 2,
"id": "4748cee3-0eb2-4815-ab04-cd2bbd878cb4",
"name": "Proc print with AGE filter",
"description": "Show the contents of sashelp.class using PROC PRINT and filtering by AGE.",
"type": "Compute",
"parameters": [
{
"version": 1,
"name": "_contextName",
"defaultValue": "SAS Job Execution compute context",
"type": "CHARACTER",
"label": "Context Name",
"required": false
},
{
"version": 1,
"name": "AGE",
"defaultValue": "10",
"type": "NUMERIC",
"label": "Lowest age for report",
"required": false
}
],
"code": "ods html style=HTMLBlue;\nproc print data=sashelp.class; where age > &AGE; run; quit;\nods html close;",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobDefinitions/definitions/4748cee3-0eb2-4815-ab04-cd2bbd878cb4",
"uri": "/jobDefinitions/definitions/4748cee3-0eb2-4815-ab04-cd2bbd878cb4",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobDefinitions/definitions/4748cee3-0eb2-4815-ab04-cd2bbd878cb4",
"uri": "/jobDefinitions/definitions/4748cee3-0eb2-4815-ab04-cd2bbd878cb4",
"type": "application/vnd.sas.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobDefinitions/definitions/4748cee3-0eb2-4815-ab04-cd2bbd878cb4",
"uri": "/jobDefinitions/definitions/4748cee3-0eb2-4815-ab04-cd2bbd878cb4",
"type": "application/vnd.sas.job.definition",
"responseType": "application/vnd.sas.job.definition"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobDefinitions/definitions/4748cee3-0eb2-4815-ab04-cd2bbd878cb4",
"uri": "/jobDefinitions/definitions/4748cee3-0eb2-4815-ab04-cd2bbd878cb4"
}
],
"properties": []
}
This is sample Precondition Failed error response when using PUT to update a definition.
{
"errorCode": 1013,
"message": "The values for the request header field \"If-Match\" (\"lf1catym\") and the resource's entity tag (\"lfwq2bto\") are not the same.",
"details": [
"traceId: 1876b1728d67c5bf",
"path: /jobDefinitions/definitions/c2283c0e-c69c-48cb-b314-84207afe7cb0"
],
"remediation": "Get the latest representation of the resource, and apply the desired changes. Retry the operation with the modified representation and the entity tag from the response header field \"ETag\".",
"links": [],
"version": 2,
"httpStatusCode": 412
}
{
"errorCode": 1013,
"message": "The values for the request header field \"If-Match\" (\"lf1catym\") and the resource's entity tag (\"lfwq2bto\") are not the same.",
"details": [
"traceId: 1876b1728d67c5bf",
"path: /jobDefinitions/definitions/c2283c0e-c69c-48cb-b314-84207afe7cb0"
],
"remediation": "Get the latest representation of the resource, and apply the desired changes. Retry the operation with the modified representation and the entity tag from the response header field \"ETag\".",
"links": [],
"version": 2,
"httpStatusCode": 412
}
This is sample Precondition Required error response when using PUT to update a definition.
{
"errorCode": 1010,
"message": "One of the following request header fields is required: \"If-Match\" or \"If-Unmodified-Since\".",
"details": [
"traceId: 13d8eff6357c607d",
"path: /jobDefinitions/definitions/c2283c0e-c69c-48cb-b314-84207afe7cb0"
],
"remediation": "In the request header, include one of the following: the resource's entity tag for the field \"If-Match\", or the resource's last-modified timestamp for the field \"If-Unmodified-Since\".",
"links": [],
"version": 2,
"httpStatusCode": 428
}
{
"errorCode": 1010,
"message": "One of the following request header fields is required: \"If-Match\" or \"If-Unmodified-Since\".",
"details": [
"traceId: 13d8eff6357c607d",
"path: /jobDefinitions/definitions/c2283c0e-c69c-48cb-b314-84207afe7cb0"
],
"remediation": "In the request header, include one of the following: the resource's entity tag for the field \"If-Match\", or the resource's last-modified timestamp for the field \"If-Unmodified-Since\".",
"links": [],
"version": 2,
"httpStatusCode": 428
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | jobDefinition |
400 | Bad Request | The request was invalid. | errorResponse |
412 | Precondition Failed | The If-Match request header did not match the resource's entity tag, or the If-Unmodified-Since request header was earlier than the resource's last modified timestamp. |
error2 |
415 | Unsupported Media Type | The requested media type is not supported. | None |
428 | Precondition Required | The request was missing a If-Match or If-Unmodified-Since header. |
error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | The HTTP-date string that represents the timestamp of the most recent update to this object. | |
200 | Etag | string | A tag that identifies the revision of this object. |
Delete a job definition
Code samples
# You can also use wget
curl -X DELETE http://mock-jobDefinitions.apifirst.unx.sas.com/jobDefinitions/definitions/{definitionId}
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('http://mock-jobDefinitions.apifirst.unx.sas.com/jobDefinitions/definitions/{definitionId}',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.delete('http://mock-jobDefinitions.apifirst.unx.sas.com/jobDefinitions/definitions/{definitionId}')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "http://mock-jobDefinitions.apifirst.unx.sas.com/jobDefinitions/definitions/{definitionId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /definitions/{definitionId}
Deletes the job definition specified by the provided job definition ID.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
definitionId | path | string | true | The ID of the job definition. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | The job definition was deleted. | None |
404 | Not Found | No resource exists at the requested path. | None |
Schemas
jobDefinitionParameter
{
"name": "string",
"type": "string",
"label": "string",
"required": true,
"defaultValue": "string",
"version": 0
}
Job Definition Parameter Schema
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | false | none | The name of the parameter. |
type | string | false | none | The type of the parameter (TABLE, NUMERIC, DATE, CHARACTER). |
label | string | false | none | The display value for the name of this parameter. |
required | boolean | false | none | Specifies if the parameter is required for execution. |
defaultValue | string | false | none | The default value for this parameter, if one is not specified at execution time. |
version | integer | false | none | The version number of the representation. The current version is 1. |
jobDefinition
{
"id": "string",
"name": "string",
"description": "string",
"type": "string",
"code": "string",
"parameters": [
{
"name": "string",
"type": "string",
"label": "string",
"required": true,
"defaultValue": "string",
"version": 0
}
],
"properties": [
{
"name": "string",
"value": "string"
}
],
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedBy": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Job Definition Schema
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | The unique identifier for the job that is generated by the API. |
name | string | false | none | The name of the job. |
description | string | false | none | The description of the job. |
type | string | false | none | The type of job. This property determines the execution provider that executes this job. |
code | string | false | none | Execution provider specific code to be executed. |
parameters | [jobDefinitionParameter] | false | none | An array of input parameters to be collected when executing this job definition |
properties | [resourceProperty] | false | none | An array of name/value pairs needed to execute a job definition The maximum name length is 100. |
creationTimeStamp | string(date-time) | false | none | The timestamp when the job was created, in the format of YYYY-MM-DDThh:mm:ss.sssZ. |
modifiedTimeStamp | string(date-time) | false | none | The timestamp when the job was last modified, in the format of YYYY-MM-DDThh:mm:ss.sssZ. |
createdBy | string | false | none | The name of the user who created the job. |
modifiedBy | string | false | none | The name of the last user who modified this object. |
links | [link] | false | none | Links that apply to this object. Includes "self", "alternate", "update" and "delete". |
version | integer | false | none | The version number of the representation. The current version is 2. |
jobDefinitionCollection
{
"name": "string",
"start": 0,
"limit": 0,
"count": 0,
"accept": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0,
"items": [
{
"id": "string",
"name": "string",
"description": "string",
"type": "string",
"code": "string",
"parameters": [
{
"name": "string",
"type": "string",
"label": "string",
"required": true,
"defaultValue": "string",
"version": 0
}
],
"properties": [
{
"name": "string",
"value": "string"
}
],
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedBy": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
]
}
Job Definition Collection
Properties
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | baseCollection2 | false | none | This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2) |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» items | [jobDefinition] | true | none | An array that contains job definition resources. |
baseCollection2
{
"name": "string",
"start": 0,
"limit": 0,
"count": 0,
"accept": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Base Collection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | false | none | The name of the collection. |
start | integer(int64) | false | none | The zero-based index of the first item in the collection. |
limit | integer | false | none | The number of items that were requested for the collection. |
count | integer(int64) | false | none | If populated indicates the number of items in the collection. |
accept | string | false | none | A space-delimited list of media types from which an Accept header can be constructed. |
links | [link] | false | none | The links that apply to the collection. |
version | integer | false | none | The version number of the collection representation. This representation is version 2. |
link
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
Link
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
method | string | false | none | The HTTP method for the link. |
rel | string | true | none | The relationship of the link to the resource. |
uri | string | false | none | The relative URI for the link. |
href | string | false | none | The URL for the link. |
title | string | false | none | The title for the link. |
type | string | false | none | The media type or link type for the link. |
itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
error2
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Error
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
message | string | false | none | The message for the error. |
id | string | false | none | The string ID for the error. |
errorCode | integer | false | none | The numeric ID for the error. |
httpStatusCode | integer | true | none | The HTTP status code for the error. |
details | [string] | false | none | Messages that provide additional details about the cause of the error. |
remediation | string | false | none | A message that describes how to resolve the error. |
errors | [error2] | false | none | Any additional errors that occurred. |
links | [link] | false | none | The links that apply to the error. |
version | integer | true | none | The version number of the error representation. This representation is version 2. |
api
{
"version": 1,
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
]
}
API
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
version | integer | true | none | The version number of the API representation. This is version 3. |
links | [link] | true | none | The API's top-level links. |
resourceSummary
{
"name": "string",
"id": "string",
"type": "string",
"description": "string",
"typeDefName": "string",
"iconUri": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Resource Summary Schema
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | false | none | The name of the resource. |
id | string | false | none | The id of the resource. |
type | string | false | none | The resource type. |
description | string | false | none | The resource description. |
typeDefName | string | false | none | The name of the TypeDef. |
iconUri | string | false | none | The icon URI. |
links | [link] | false | none | Paging links that apply to this object. |
version | integer | false | none | The version of the resource summary schema. This is version 2. |
resourceProperty
{
"name": "string",
"value": "string"
}
Resource Property Schema
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | false | none | The name. |
value | string | false | none | The value. |
Examples
Github Examples
Detailed examples on how to use this API can be found on Github.
Job Execution
Base URLs:
- http://mock-jobExecution.apifirst.unx.sas.com/jobExecution
Terms of service Email: SAS Developers Web: SAS Developers
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
The Job Execution API is used to execute and manage asynchronous jobs across environments. Overview
The Job Execution API acts as a gateway to execute jobs. Jobs are created to be executed by this API. The API then decides which execution provider can best execute the job based on the type of job.
Events
Events are generated to indicate changes in the execution state of jobs created by the Job Execution API. Typical consumers for such events are other APIs or applications interested in changes in job state (for example, the completion of an executing job). Because both the submitter and creator are part of the event-routing key, an API (such as Workflow) has the option of listening to job events from only the jobs that it has submitted. Alternatively, an application component (such as Job Monitor) can listen to all submitters. Events are written to the sas.job exchange. The AMQP routing key for all job event payloads is:job.[type].[jobId].[submitter].[creator].[stateValue]
For example: job.state.d37ba178-a115-4162-8289-7132491e1306.workflow.jobExecution.completed
State Details
An additional member calledstateDetails
of type string has been added to the Job representation object to supplement the state
member (also a string) when needed. stateDetails
supplements by providing an indication that additional information is available. It is an indicator and not the actual information. The purpose of the stateDetails
member is for providers to provide a hint, when applicable, about the state set and for that hint to be used by components that convey state information to clients. The Job Execution API itself does not use or validate the hint values. Because the hint values are not validated, hint values can be added (as the need arises) without having to publish a new version of Job Execution Service (JES), the rep JAR or any of the other JES libraries. Only the completed
state supports a value for stateDetails
. The following set of hints are applicable to the completed
state: - info
- warning
- error
- fatal
- diagnostic
info
, warning
, error
, and fatal
values are intended to correspond to different severity levels of messages that are displayed in the log. There is an implied severity hierarchy, with info
being the lowest and fatal
being the highest. If the provider messages use a similar severity model, and you do not have to scan the log to determine the level of the most severe message, then set that level in the field. The diagnostic
value is meant to be used when the above model, for whatever reason, cannot be used and there is something noteworthy to report. Information is conveyed either via the log or in the error
member. Existing providers setting the stateDetails
member for a completed job should set the same state as before (completed
) in the state
member, thereby maintaining backward compatibility for tools that are not updated to handle the new stateDetails
member.
Security
AuthorizationAny authenticated user can
The Authorization API automatically protects any endpoints of any API that includes dependencies on it. This dependency intercepts calls to the endpoints and builds an authorization context, which is then sent to the Authorization API for evaluation.GET
orHEAD
the root of the API and can create a Job. All other permissions (read, update, delete, add, and remove for the Job object) are granted only to the user who created the job. Other SAS APIs and applications are authorized to load job requests via the bootstrap mechanism.- If the context is granted permission to perform the request action on that endpoint, it returns an HTTP status code of 200 and allows the request to proceed.
- If the context is prohibited, it returns an HTTP status code of 403 and the request does not continue.
This access is controlled by authorization rules that can be created through bootstrapping, by an administrative user, or by other methods.
Authentication The endpoints that result in a job being executed are invoked with an access token. This can be an access token obtained on behalf of a user or an access token obtained from client credentials. If invoked with an access token on behalf of a user, the Job Execution API attempts to obtain a new access token on behalf of the user and to use this new access token in all requests made by JES, including requests to the provider to execute the job. If JES is not able to obtain a new access token on behalf of the user, the original access token continues to be used.
JES-obtained access tokens have the same lifetime as those obtained at the application level, except that the clock starts when JES obtains the token and not when the user signs in. If a job invoked with an access token on behalf of a user times out because the default lifetime is too small, the Job might fail.
The lifetime of the JES-obtained tokens can be increased by setting the Consul property config/jobExecution/oauth2.client.accessTokenValidity to an appropriate value, which represents the lifetime expressed in seconds. For example, setting it to 86400 results in the tokens obtained by JES lasting for 86400 seconds (or 24 hours).
Job Execution should be restarted after the consul property is set. After the Job completes, JES does not revoke tokens that it created. Instead, tokens expire at the end of their lifetime.
If Job Execution is not able to obtain an access token on behalf of a user, it propagates the token from the request made to execute the job.
Terminology
- job definition: a batch execution. Job definitions are managed by the Job Definitions API.
- job request: information about the job definition to be executed and the list of run-time arguments used for this particular request. The job definition can be either included in the job request or referenced.
- job: a container for an asynchronous operation. A job is created when a job request is submitted. It represents an instance of a job execution.
- job execution provider: an execution environment, usually an independent API, that is called by the job execution API to execute a job request. The provider takes the created job instance and executes it in an environment that is appropriate for the job type.
Error Codes
HTTP Status Code | Error Code | Description |
---|---|---|
400 | 31502 | The job request members cannot be updated on the job (application/vnd.sas.job.execution.job) |
400 | 31504 | The user-specified timestamp in the request is not a valid timestamp of the format yyyy-MM-ddTHH:mm:ss.SSSZ . |
400 | 31505 | The state was not specified in the value-query parameter or the body of the request. |
400 | 31506 | The specified state is not a valid value. |
400 | 31507 | Could not find a provider object in the JES provider cache for the job-definition type in the request submitted for execution. |
400 | 31508 | Attempting to access the provider service to execute the submitted request returned an HTTP status of 503 (Service Unavailable). |
405 | 31501 | The job already completed and is now read only. |
409 | 31503 | The job has not yet completed. The expiration timestamp cannot be set. |
Error Code | Description |
---|---|
31500 | The job timed out after failing to receive a heartbeat. |
31508 | Attempting to access the provider service to execute the submitted request returned an HTTP status of 503 (Service Unavailable). |
31509 | Execution in the provider service resulted in an error. Its text, if available, is included in the error object. |
31510 | Set by the provider library in the Job object if an exception in the provider is not caught by the provider but gets caught by the library. |
Usage Notes
Overview
The Job Execution API is intended to provide a common mechanism for executing and managing asynchronous jobs across environments. This API works in conjunction with the Job Definitions API. You can use the Job Definitions API to create a definition for any existing Job Execution Provider. You can then execute this definition using the Job Execution API. State change events are generated as a job proceeds through its life cycle.
Operations
Root
Contains the root of the Job Execution API.
Get a collection of top-level links
Code samples
# You can also use wget
curl -X GET http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/ \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.api+json'
const headers = {
'Accept':'application/vnd.sas.api+json'
};
fetch('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.api+json'
}
r = requests.get('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.api+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /
Returns a collection of links to the top-level collections surfaced through this API.
Example responses
This is an example response when using
GET
on the root resource.
{
"version": 1,
"links": [
{
"method": "GET",
"rel": "jobs",
"href": "/jobExecution/jobs",
"uri": "/jobExecution/jobs",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.job",
"responseItemType": "application/vnd.sas.job.execution.job"
},
{
"method": "POST",
"rel": "create",
"href": "/jobExecution/jobs",
"uri": "/jobExecution/jobs",
"type": "application/vnd.sas.job.execution.job.request",
"responseType": "application/vnd.sas.job.execution.job"
},
{
"method": "GET",
"rel": "jobRequests",
"href": "/jobExecution/jobRequests",
"uri": "/jobExecution/jobRequests",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.job.request"
}
]
}
{
"version": 1,
"links": [
{
"method": "GET",
"rel": "jobs",
"href": "/jobExecution/jobs",
"uri": "/jobExecution/jobs",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.job",
"responseItemType": "application/vnd.sas.job.execution.job"
},
{
"method": "POST",
"rel": "create",
"href": "/jobExecution/jobs",
"uri": "/jobExecution/jobs",
"type": "application/vnd.sas.job.execution.job.request",
"responseType": "application/vnd.sas.job.execution.job"
},
{
"method": "GET",
"rel": "jobRequests",
"href": "/jobExecution/jobRequests",
"uri": "/jobExecution/jobRequests",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.job.request"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | api |
Check API availability
Code samples
# You can also use wget
curl -X HEAD http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /
Returns the header information that the corresponding GET
returns. Clients can use this to determine whether the API is running.
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. The API is running and available. | None |
Jobs
Contains the operations for the Jobs resource.
Submit a job request
Code samples
# You can also use wget
curl -X POST http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.job.execution.job.request+json' \
-H 'Accept: application/vnd.sas.job.execution.job+json' \
-H 'Delegate-Domain: string'
const inputBody = '{
"name": "proc print example",
"description": "ods output with age 14 cutoff",
"jobDefinitionUri": "/jobDefinitions/definitions/2cbe5f60-1391-42db-a857-271e83eb7e48",
"arguments": {
"AGE": "14"
}
}';
const headers = {
'Content-Type':'application/vnd.sas.job.execution.job.request+json',
'Accept':'application/vnd.sas.job.execution.job+json',
'Delegate-Domain':'string'
};
fetch('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.job.execution.job.request+json',
'Accept': 'application/vnd.sas.job.execution.job+json',
'Delegate-Domain': 'string'
}
r = requests.post('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.job.execution.job.request+json"},
"Accept": []string{"application/vnd.sas.job.execution.job+json"},
"Delegate-Domain": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /jobs
Submits a job request.
Body parameter
This is an example body when submitting a job. In this example, the following request body overrides the "AGE" argument defined in Job Definition.
{
"name": "proc print example",
"description": "ods output with age 14 cutoff",
"jobDefinitionUri": "/jobDefinitions/definitions/2cbe5f60-1391-42db-a857-271e83eb7e48",
"arguments": {
"AGE": "14"
}
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
annotationUri | query | string | false | Adds the created job as a member of the specified annotation. |
submitter | query | string | false | Persisted in the submittedByApplication member of the created Job and used as the submitter portion of the job state change event routing key. Only characters in the set [a-zA-Z0-9] and hyphen are valid with a maximum of 64 characters. |
Delegate-Domain | header | string | false | Name of a credential domain of type OAuth2.0. The credential secret is retrieved to impersonate a group-managed service account for the current request. |
body | body | jobRequest | true | The job request that describes the job to be executed. |
Detailed descriptions
Delegate-Domain: Name of a credential domain of type OAuth2.0. The credential secret is retrieved to impersonate a group-managed service account for the current request.
Example responses
This is example response when using
POST
to submit a job.
{
"creationTimeStamp": "2018-03-12T19:21:15.877Z",
"modifiedTimeStamp": "2018-03-12T19:21:16.105Z",
"createdBy": "user1",
"modifiedBy": "user1",
"version": 3,
"id": "f9dbe76c-1a13-491e-b1e4-eda2219a2320",
"jobRequest": {
"version": 3,
"name": "proc print example",
"description": "ods output with age 14 cutoff",
"jobDefinitionUri": "/jobDefinitions/definitions/dabd2a63-ae2f-4559-b110-ad989ff642a5",
"jobDefinition": {
"creationTimeStamp": "2018-03-12T19:20:22.136Z",
"modifiedTimeStamp": "2018-03-12T19:20:22.136Z",
"createdBy": "user1",
"modifiedBy": "user1",
"version": 2,
"id": "dabd2a63-ae2f-4559-b110-ad989ff642a5",
"name": "Simple proc print",
"type": "Compute",
"parameters": [
{
"version": 1,
"name": "_contextName",
"defaultValue": "SAS Job Execution compute context",
"type": "CHARACTER",
"label": "Context Name",
"required": false
},
{
"version": 1,
"name": "AGE",
"defaultValue": "10",
"type": "NUMERIC",
"label": "Lowest age for report",
"required": false
}
],
"code": "ods html style=HTMLBlue;\nproc print data=sashelp.class; where age > &AGE; run; quit;\nods html close;",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobDefinitions/definitions/dabd2a63-ae2f-4559-b110-ad989ff642a5",
"uri": "/jobDefinitions/definitions/dabd2a63-ae2f-4559-b110-ad989ff642a5",
"type": "application/vnd.sas.job.definition"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobDefinitions/definitions/dabd2a63-ae2f-4559-b110-ad989ff642a5",
"uri": "/jobDefinitions/definitions/dabd2a63-ae2f-4559-b110-ad989ff642a5",
"type": "application/vnd.sas.job.definition",
"responseType": "application/vnd.sas.job.definition"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobDefinitions/definitions/dabd2a63-ae2f-4559-b110-ad989ff642a5",
"uri": "/jobDefinitions/definitions/dabd2a63-ae2f-4559-b110-ad989ff642a5"
}
],
"properties": []
},
"arguments": {
"_contextName": "SAS Job Execution compute context",
"AGE": "14"
},
"properties": [],
"createdByApplication": "jobExecution"
},
"state": "running",
"submittedByApplication": "workflow",
"heartbeatInterval": 0,
"elapsedTime": 546,
"results": {},
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobs/f9dbe76c-1a13-491e-b1e4-eda2219a2320",
"uri": "/jobExecution/jobs/f9dbe76c-1a13-491e-b1e4-eda2219a2320",
"type": "application/vnd.sas.job.execution.job"
},
{
"method": "GET",
"rel": "state",
"href": "/jobExecution/jobs/f9dbe76c-1a13-491e-b1e4-eda2219a2320/state",
"uri": "/jobExecution/jobs/f9dbe76c-1a13-491e-b1e4-eda2219a2320/state",
"type": "text/plain"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobExecution/jobs/f9dbe76c-1a13-491e-b1e4-eda2219a2320",
"uri": "/jobExecution/jobs/f9dbe76c-1a13-491e-b1e4-eda2219a2320",
"type": "application/vnd.sas.job.execution.job",
"responseType": "application/vnd.sas.job.execution.job"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobExecution/jobs/f9dbe76c-1a13-491e-b1e4-eda2219a2320",
"uri": "/jobExecution/jobs/f9dbe76c-1a13-491e-b1e4-eda2219a2320"
},
{
"method": "PUT",
"rel": "updateState",
"href": "/jobExecution/jobs/f9dbe76c-1a13-491e-b1e4-eda2219a2320/state",
"uri": "/jobExecution/jobs/f9dbe76c-1a13-491e-b1e4-eda2219a2320/state",
"type": "text/plain"
},
{
"method": "POST",
"rel": "updateHeartbeatTimeStamp",
"href": "/jobExecution/jobs/f9dbe76c-1a13-491e-b1e4-eda2219a2320/heartbeatTimeStamp",
"uri": "/jobExecution/jobs/f9dbe76c-1a13-491e-b1e4-eda2219a2320/heartbeatTimeStamp",
"type": "text/plain"
},
{
"method": "GET",
"rel": "jobDefinition",
"href": "/jobDefinitions/definitions/dabd2a63-ae2f-4559-b110-ad989ff642a5",
"uri": "/jobDefinitions/definitions/dabd2a63-ae2f-4559-b110-ad989ff642a5",
"type": "application/vnd.sas.job.definition"
}
]
}
{
"creationTimeStamp": "2018-03-12T19:21:15.877Z",
"modifiedTimeStamp": "2018-03-12T19:21:16.105Z",
"createdBy": "user1",
"modifiedBy": "user1",
"version": 3,
"id": "f9dbe76c-1a13-491e-b1e4-eda2219a2320",
"jobRequest": {
"version": 3,
"name": "proc print example",
"description": "ods output with age 14 cutoff",
"jobDefinitionUri": "/jobDefinitions/definitions/dabd2a63-ae2f-4559-b110-ad989ff642a5",
"jobDefinition": {
"creationTimeStamp": "2018-03-12T19:20:22.136Z",
"modifiedTimeStamp": "2018-03-12T19:20:22.136Z",
"createdBy": "user1",
"modifiedBy": "user1",
"version": 2,
"id": "dabd2a63-ae2f-4559-b110-ad989ff642a5",
"name": "Simple proc print",
"type": "Compute",
"parameters": [
{
"version": 1,
"name": "_contextName",
"defaultValue": "SAS Job Execution compute context",
"type": "CHARACTER",
"label": "Context Name",
"required": false
},
{
"version": 1,
"name": "AGE",
"defaultValue": "10",
"type": "NUMERIC",
"label": "Lowest age for report",
"required": false
}
],
"code": "ods html style=HTMLBlue;\nproc print data=sashelp.class; where age > &AGE; run; quit;\nods html close;",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobDefinitions/definitions/dabd2a63-ae2f-4559-b110-ad989ff642a5",
"uri": "/jobDefinitions/definitions/dabd2a63-ae2f-4559-b110-ad989ff642a5",
"type": "application/vnd.sas.job.definition"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobDefinitions/definitions/dabd2a63-ae2f-4559-b110-ad989ff642a5",
"uri": "/jobDefinitions/definitions/dabd2a63-ae2f-4559-b110-ad989ff642a5",
"type": "application/vnd.sas.job.definition",
"responseType": "application/vnd.sas.job.definition"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobDefinitions/definitions/dabd2a63-ae2f-4559-b110-ad989ff642a5",
"uri": "/jobDefinitions/definitions/dabd2a63-ae2f-4559-b110-ad989ff642a5"
}
],
"properties": []
},
"arguments": {
"_contextName": "SAS Job Execution compute context",
"AGE": "14"
},
"properties": [],
"createdByApplication": "jobExecution"
},
"state": "running",
"submittedByApplication": "workflow",
"heartbeatInterval": 0,
"elapsedTime": 546,
"results": {},
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobs/f9dbe76c-1a13-491e-b1e4-eda2219a2320",
"uri": "/jobExecution/jobs/f9dbe76c-1a13-491e-b1e4-eda2219a2320",
"type": "application/vnd.sas.job.execution.job"
},
{
"method": "GET",
"rel": "state",
"href": "/jobExecution/jobs/f9dbe76c-1a13-491e-b1e4-eda2219a2320/state",
"uri": "/jobExecution/jobs/f9dbe76c-1a13-491e-b1e4-eda2219a2320/state",
"type": "text/plain"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobExecution/jobs/f9dbe76c-1a13-491e-b1e4-eda2219a2320",
"uri": "/jobExecution/jobs/f9dbe76c-1a13-491e-b1e4-eda2219a2320",
"type": "application/vnd.sas.job.execution.job",
"responseType": "application/vnd.sas.job.execution.job"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobExecution/jobs/f9dbe76c-1a13-491e-b1e4-eda2219a2320",
"uri": "/jobExecution/jobs/f9dbe76c-1a13-491e-b1e4-eda2219a2320"
},
{
"method": "PUT",
"rel": "updateState",
"href": "/jobExecution/jobs/f9dbe76c-1a13-491e-b1e4-eda2219a2320/state",
"uri": "/jobExecution/jobs/f9dbe76c-1a13-491e-b1e4-eda2219a2320/state",
"type": "text/plain"
},
{
"method": "POST",
"rel": "updateHeartbeatTimeStamp",
"href": "/jobExecution/jobs/f9dbe76c-1a13-491e-b1e4-eda2219a2320/heartbeatTimeStamp",
"uri": "/jobExecution/jobs/f9dbe76c-1a13-491e-b1e4-eda2219a2320/heartbeatTimeStamp",
"type": "text/plain"
},
{
"method": "GET",
"rel": "jobDefinition",
"href": "/jobDefinitions/definitions/dabd2a63-ae2f-4559-b110-ad989ff642a5",
"uri": "/jobDefinitions/definitions/dabd2a63-ae2f-4559-b110-ad989ff642a5",
"type": "application/vnd.sas.job.definition"
}
]
}
This is an example of a Bad Request response to a
POST
to submit job request.
{
"errorCode": 0,
"message": "The request body was missing or invalid.",
"details": [
"traceId: 76faa88466a3e85c",
"path: /jobExecution/jobRequests"
],
"links": [],
"version": 2,
"httpStatusCode": 400
}
This is an example of an Unsupported Media Type response to a
POST
to submit a job request.
{
"errorCode": 0,
"message": "The value (application/vnd.sas.job+json) for the request header field \"Content-Type\" does not specify a supported media type.",
"details": [
"traceId: 0bc7bc5d2abb119b",
"path: /jobExecution/jobRequests"
],
"remediation": "For the request header field \"Content-Type\", specify one of the following media types: \"application/json\", \"application/vnd.sas.job.execution.job.request+json\".",
"links": [],
"version": 2,
"httpStatusCode": 415
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | The job was created. | job |
400 | Bad Request | The request was not valid. | error2 |
415 | Unsupported Media Type | The requested media type is not supported. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | ETag | string | The entity tag for the job. | |
201 | Last-Modified | string | The timestamp that indicates when the job was last modified. It uses the format in EEE, dd MMM yyyy HH:mm:ss GMT . |
|
201 | Location | string | The URL location of the newly created job. |
Get a list of jobs
Code samples
# You can also use wget
curl -X GET http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json' \
-H 'Delegate-Domain: string'
const headers = {
'Accept':'application/vnd.sas.collection+json',
'Delegate-Domain':'string'
};
fetch('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json',
'Delegate-Domain': 'string'
}
r = requests.get('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.collection+json"},
"Delegate-Domain": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /jobs
Returns a collection of job resources. Standard paging, filtering, and sorting options are specified in the Parameters section.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
start | query | integer | false | The zero-based index of the first job to return. The default is 0 (zero). |
limit | query | integer | false | The maximum number of jobs to return in this page of results. The actual number of returned jobs might be less if the collection has been exhausted. The default is 10. If a large number is specified, it is recommended to combine a filter with the query to improve performance. |
filter | query | string(filter-criteria) | false | The criteria used to filter the returned jobs. The following queries are examples:
|
sortBy | query | string(sort-criteria) | false | Defines how the returned jobs are sorted. The default sort order is descending on the creation timestamp field. The following sorts are examples:
|
Delegate-Domain | header | string | false | Name of a credential domain of type OAuth2.0. The credential secret is retrieved to impersonate a group-managed service account for the current request. |
Detailed descriptions
Delegate-Domain: Name of a credential domain of type OAuth2.0. The credential secret is retrieved to impersonate a group-managed service account for the current request.
Example responses
This is an example of using
GET
to return jobs.
{
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/jobExecution/jobs",
"uri": "/jobExecution/jobs",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.job"
},
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobs?sortBy=creationTimeStamp:descending&start=0&limit=10",
"uri": "/jobExecution/jobs?sortBy=creationTimeStamp:descending&start=0&limit=10",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.job"
},
{
"method": "GET",
"rel": "next",
"href": "/jobExecution/jobs?sortBy=creationTimeStamp:descending&start=10&limit=10",
"uri": "/jobExecution/jobs?sortBy=creationTimeStamp:descending&start=10&limit=10",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "up",
"href": "/jobExecution/",
"uri": "/jobExecution/",
"type": "application/vnd.sas.job.execution.job"
},
{
"method": "POST",
"rel": "submitJob",
"href": "/jobExecution/jobs",
"uri": "/jobExecution/jobs",
"type": "application/vnd.sas.job.execution.job.request",
"responseType": "application/vnd.sas.job.execution.job"
},
{
"method": "POST",
"rel": "submitJobs",
"href": "/jobExecution/jobRequests/@selection/jobs",
"uri": "/jobExecution/jobRequests/@selection/jobs",
"type": "application/vnd.sas.selection",
"responseType": "application/vnd.sas.collection"
},
{
"method": "PUT",
"rel": "updateStates",
"href": "/jobExecution/jobs/@selection/state",
"uri": "/jobExecution/jobs/@selection/state",
"type": "application/vnd.sas.selection",
"responseType": "application/vnd.sas.collection"
}
],
"name": "jobs",
"accept": "application/vnd.sas.job.execution.job",
"start": 0,
"count": 2,
"items": [
{
"creationTimeStamp": "2022-04-07T14:00:02.853Z",
"modifiedTimeStamp": "2022-04-07T14:00:05.389Z",
"createdBy": "sas.audit",
"modifiedBy": "sas.audit",
"version": 4,
"id": "f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b",
"jobRequest": {
"version": 3,
"name": "Update CAS Audit data",
"jobDefinitionUri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"jobDefinition": {
"creationTimeStamp": "2022-04-06T22:08:06.127Z",
"modifiedTimeStamp": "2022-04-06T22:08:06.131Z",
"createdBy": "sas.audit",
"modifiedBy": "sas.audit",
"version": 2,
"id": "7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"name": "CAS Audit table update",
"description": "After upload of new Audit data into a temporary CAS table, this job appends the new data to the existing Audit data",
"type": "casl",
"parameters": [
{
"version": 1,
"name": "%VAR-expireDate",
"type": "CHARACTER",
"required": true
},
{
"version": 1,
"name": "%VAR-tempTableName",
"type": "CHARACTER",
"required": true
},
{
"version": 1,
"name": "%VAR-targetCaslib",
"type": "CHARACTER",
"required": true
},
{
"version": 1,
"name": "serverId",
"defaultValue": "cas-shared-default",
"type": "CHARACTER",
"required": false
}
],
"code": "whereStr=cat(\"'Timestamp'n <= '\", expireDate, \"'\");\ndeleteRows / table={name='AUDIT' caslib=targetCaslib, where=whereStr};\nrun;\ncodeStr=cat(\"data AUDIT(caslib=\", targetCaslib, \" append=yes);set \", tempTableName, \"(caslib=\", targetCaslib, \");run;\");\ndatastep.runCode / code=codeStr;\nrun;\ntable.save status=sc / name='AUDIT' caslib=targetCaslib replace=true table={ name='AUDIT' caslib=targetCaslib };\nrun;\ntable.dropTable name='AUDIT' caslib=targetCaslib;\nrun;\ntable.dropTable name=tempTableName caslib=targetCaslib;\nrun;",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.job.definition",
"responseType": "application/vnd.sas.job.definition"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309"
}
],
"properties": []
},
"arguments": {
"%VAR-expireDate": "2022-03-31T14:00:02.000Z",
"%VAR-targetCaslib": "SystemData",
"%VAR-tempTableName": "audit_2869981866",
"serverId": "cas-shared-default"
},
"properties": [],
"createdByApplication": "jobExecution"
},
"state": "completed",
"endTimeStamp": "2022-04-07T14:00:05.387Z",
"heartbeatTimeStamp": "2022-04-07T14:00:03.119Z",
"submittedByApplication": "audit-service",
"heartbeatInterval": 300,
"elapsedTime": 2534,
"results": {
"debuginfo_1": "",
"severity_1": "normal",
"statusCode_1": "0",
"reason_1": "ok",
"executedCode": "expireDate=\"2022-03-31T14:00:02Z\";\ntempTableName=\"audit_2869981866\";\ntargetCaslib=\"SystemData\";\nwhereStr=cat(\"'Timestamp'n <= '\", expireDate, \"'\");\ndeleteRows / table={name='AUDIT' caslib=targetCaslib, where=whereStr};\nrun;\ncodeStr=cat(\"data AUDIT(caslib=\", targetCaslib, \" append=yes);set \", tempTableName, \"(caslib=\", targetCaslib, \");run;\");\ndatastep.runCode / code=codeStr;\nrun;\ntable.save status=sc / name='AUDIT' caslib=targetCaslib replace=true table={ name='AUDIT' caslib=targetCaslib };\nrun;\ntable.dropTable name='AUDIT' caslib=targetCaslib;\nrun;\ntable.dropTable name=tempTableName caslib=targetCaslib;\nrun;",
"status_1": ""
},
"logLocation": "/files/files/e96dd0d1-9158-4a09-9d55-eb56383d73cd",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b",
"uri": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b",
"type": "application/vnd.sas.job.execution.job"
},
{
"method": "GET",
"rel": "state",
"href": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b/state",
"uri": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b/state",
"type": "text/plain"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b",
"uri": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b",
"type": "application/vnd.sas.job.execution.job",
"responseType": "application/vnd.sas.job.execution.job"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b",
"uri": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b"
},
{
"method": "PUT",
"rel": "updateState",
"href": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b/state",
"uri": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b/state",
"type": "text/plain"
},
{
"method": "POST",
"rel": "updateHeartbeatTimeStamp",
"href": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b/heartbeatTimeStamp",
"uri": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b/heartbeatTimeStamp",
"type": "text/plain"
},
{
"method": "GET",
"rel": "jobDefinition",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "log",
"href": "/files/files/e96dd0d1-9158-4a09-9d55-eb56383d73cd",
"uri": "/files/files/e96dd0d1-9158-4a09-9d55-eb56383d73cd"
}
]
},
{
"creationTimeStamp": "2022-04-07T12:00:03.166Z",
"modifiedTimeStamp": "2022-04-07T12:00:05.290Z",
"createdBy": "sas.audit",
"modifiedBy": "sas.audit",
"version": 4,
"id": "79d9a2e8-aa85-4e27-a249-8646e1323707",
"jobRequest": {
"version": 3,
"name": "Update CAS Audit data",
"jobDefinitionUri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"jobDefinition": {
"creationTimeStamp": "2022-04-06T22:08:06.127Z",
"modifiedTimeStamp": "2022-04-06T22:08:06.131Z",
"createdBy": "sas.audit",
"modifiedBy": "sas.audit",
"version": 2,
"id": "7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"name": "CAS Audit table update",
"description": "After upload of new Audit data into a temporary CAS table, this job appends the new data to the existing Audit data",
"type": "casl",
"parameters": [
{
"version": 1,
"name": "%VAR-expireDate",
"type": "CHARACTER",
"required": true
},
{
"version": 1,
"name": "%VAR-tempTableName",
"type": "CHARACTER",
"required": true
},
{
"version": 1,
"name": "%VAR-targetCaslib",
"type": "CHARACTER",
"required": true
},
{
"version": 1,
"name": "serverId",
"defaultValue": "cas-shared-default",
"type": "CHARACTER",
"required": false
}
],
"code": "whereStr=cat(\"'Timestamp'n <= '\", expireDate, \"'\");\ndeleteRows / table={name='AUDIT' caslib=targetCaslib, where=whereStr};\nrun;\ncodeStr=cat(\"data AUDIT(caslib=\", targetCaslib, \" append=yes);set \", tempTableName, \"(caslib=\", targetCaslib, \");run;\");\ndatastep.runCode / code=codeStr;\nrun;\ntable.save status=sc / name='AUDIT' caslib=targetCaslib replace=true table={ name='AUDIT' caslib=targetCaslib };\nrun;\ntable.dropTable name='AUDIT' caslib=targetCaslib;\nrun;\ntable.dropTable name=tempTableName caslib=targetCaslib;\nrun;",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.job.definition",
"responseType": "application/vnd.sas.job.definition"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309"
}
],
"properties": []
},
"arguments": {
"%VAR-expireDate": "2022-03-31T12:00:02.000Z",
"%VAR-targetCaslib": "SystemData",
"%VAR-tempTableName": "audit_4114136195",
"serverId": "cas-shared-default"
},
"properties": [],
"createdByApplication": "jobExecution"
},
"state": "completed",
"endTimeStamp": "2022-04-07T12:00:05.287Z",
"heartbeatTimeStamp": "2022-04-07T12:00:03.267Z",
"submittedByApplication": "audit-service",
"heartbeatInterval": 300,
"elapsedTime": 2121,
"results": {
"debuginfo_1": "",
"severity_1": "normal",
"statusCode_1": "0",
"reason_1": "ok",
"executedCode": "expireDate=\"2022-03-31T12:00:02Z\";\ntempTableName=\"audit_4114136195\";\ntargetCaslib=\"SystemData\";\nwhereStr=cat(\"'Timestamp'n <= '\", expireDate, \"'\");\ndeleteRows / table={name='AUDIT' caslib=targetCaslib, where=whereStr};\nrun;\ncodeStr=cat(\"data AUDIT(caslib=\", targetCaslib, \" append=yes);set \", tempTableName, \"(caslib=\", targetCaslib, \");run;\");\ndatastep.runCode / code=codeStr;\nrun;\ntable.save status=sc / name='AUDIT' caslib=targetCaslib replace=true table={ name='AUDIT' caslib=targetCaslib };\nrun;\ntable.dropTable name='AUDIT' caslib=targetCaslib;\nrun;\ntable.dropTable name=tempTableName caslib=targetCaslib;\nrun;",
"status_1": ""
},
"logLocation": "/files/files/9bc09fa1-2f94-4bec-9999-299401c6a472",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707",
"uri": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707",
"type": "application/vnd.sas.job.execution.job"
},
{
"method": "GET",
"rel": "state",
"href": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707/state",
"uri": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707/state",
"type": "text/plain"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707",
"uri": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707",
"type": "application/vnd.sas.job.execution.job",
"responseType": "application/vnd.sas.job.execution.job"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707",
"uri": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707"
},
{
"method": "PUT",
"rel": "updateState",
"href": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707/state",
"uri": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707/state",
"type": "text/plain"
},
{
"method": "POST",
"rel": "updateHeartbeatTimeStamp",
"href": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707/heartbeatTimeStamp",
"uri": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707/heartbeatTimeStamp",
"type": "text/plain"
},
{
"method": "GET",
"rel": "jobDefinition",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "log",
"href": "/files/files/9bc09fa1-2f94-4bec-9999-299401c6a472",
"uri": "/files/files/9bc09fa1-2f94-4bec-9999-299401c6a472"
}
]
}
],
"limit": 10,
"version": 2
}
{
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/jobExecution/jobs",
"uri": "/jobExecution/jobs",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.job"
},
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobs?sortBy=creationTimeStamp:descending&start=0&limit=10",
"uri": "/jobExecution/jobs?sortBy=creationTimeStamp:descending&start=0&limit=10",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.job"
},
{
"method": "GET",
"rel": "next",
"href": "/jobExecution/jobs?sortBy=creationTimeStamp:descending&start=10&limit=10",
"uri": "/jobExecution/jobs?sortBy=creationTimeStamp:descending&start=10&limit=10",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "up",
"href": "/jobExecution/",
"uri": "/jobExecution/",
"type": "application/vnd.sas.job.execution.job"
},
{
"method": "POST",
"rel": "submitJob",
"href": "/jobExecution/jobs",
"uri": "/jobExecution/jobs",
"type": "application/vnd.sas.job.execution.job.request",
"responseType": "application/vnd.sas.job.execution.job"
},
{
"method": "POST",
"rel": "submitJobs",
"href": "/jobExecution/jobRequests/@selection/jobs",
"uri": "/jobExecution/jobRequests/@selection/jobs",
"type": "application/vnd.sas.selection",
"responseType": "application/vnd.sas.collection"
},
{
"method": "PUT",
"rel": "updateStates",
"href": "/jobExecution/jobs/@selection/state",
"uri": "/jobExecution/jobs/@selection/state",
"type": "application/vnd.sas.selection",
"responseType": "application/vnd.sas.collection"
}
],
"name": "jobs",
"accept": "application/vnd.sas.job.execution.job",
"start": 0,
"count": 2,
"items": [
{
"creationTimeStamp": "2022-04-07T14:00:02.853Z",
"modifiedTimeStamp": "2022-04-07T14:00:05.389Z",
"createdBy": "sas.audit",
"modifiedBy": "sas.audit",
"version": 4,
"id": "f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b",
"jobRequest": {
"version": 3,
"name": "Update CAS Audit data",
"jobDefinitionUri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"jobDefinition": {
"creationTimeStamp": "2022-04-06T22:08:06.127Z",
"modifiedTimeStamp": "2022-04-06T22:08:06.131Z",
"createdBy": "sas.audit",
"modifiedBy": "sas.audit",
"version": 2,
"id": "7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"name": "CAS Audit table update",
"description": "After upload of new Audit data into a temporary CAS table, this job appends the new data to the existing Audit data",
"type": "casl",
"parameters": [
{
"version": 1,
"name": "%VAR-expireDate",
"type": "CHARACTER",
"required": true
},
{
"version": 1,
"name": "%VAR-tempTableName",
"type": "CHARACTER",
"required": true
},
{
"version": 1,
"name": "%VAR-targetCaslib",
"type": "CHARACTER",
"required": true
},
{
"version": 1,
"name": "serverId",
"defaultValue": "cas-shared-default",
"type": "CHARACTER",
"required": false
}
],
"code": "whereStr=cat(\"'Timestamp'n <= '\", expireDate, \"'\");\ndeleteRows / table={name='AUDIT' caslib=targetCaslib, where=whereStr};\nrun;\ncodeStr=cat(\"data AUDIT(caslib=\", targetCaslib, \" append=yes);set \", tempTableName, \"(caslib=\", targetCaslib, \");run;\");\ndatastep.runCode / code=codeStr;\nrun;\ntable.save status=sc / name='AUDIT' caslib=targetCaslib replace=true table={ name='AUDIT' caslib=targetCaslib };\nrun;\ntable.dropTable name='AUDIT' caslib=targetCaslib;\nrun;\ntable.dropTable name=tempTableName caslib=targetCaslib;\nrun;",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.job.definition",
"responseType": "application/vnd.sas.job.definition"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309"
}
],
"properties": []
},
"arguments": {
"%VAR-expireDate": "2022-03-31T14:00:02.000Z",
"%VAR-targetCaslib": "SystemData",
"%VAR-tempTableName": "audit_2869981866",
"serverId": "cas-shared-default"
},
"properties": [],
"createdByApplication": "jobExecution"
},
"state": "completed",
"endTimeStamp": "2022-04-07T14:00:05.387Z",
"heartbeatTimeStamp": "2022-04-07T14:00:03.119Z",
"submittedByApplication": "audit-service",
"heartbeatInterval": 300,
"elapsedTime": 2534,
"results": {
"debuginfo_1": "",
"severity_1": "normal",
"statusCode_1": "0",
"reason_1": "ok",
"executedCode": "expireDate=\"2022-03-31T14:00:02Z\";\ntempTableName=\"audit_2869981866\";\ntargetCaslib=\"SystemData\";\nwhereStr=cat(\"'Timestamp'n <= '\", expireDate, \"'\");\ndeleteRows / table={name='AUDIT' caslib=targetCaslib, where=whereStr};\nrun;\ncodeStr=cat(\"data AUDIT(caslib=\", targetCaslib, \" append=yes);set \", tempTableName, \"(caslib=\", targetCaslib, \");run;\");\ndatastep.runCode / code=codeStr;\nrun;\ntable.save status=sc / name='AUDIT' caslib=targetCaslib replace=true table={ name='AUDIT' caslib=targetCaslib };\nrun;\ntable.dropTable name='AUDIT' caslib=targetCaslib;\nrun;\ntable.dropTable name=tempTableName caslib=targetCaslib;\nrun;",
"status_1": ""
},
"logLocation": "/files/files/e96dd0d1-9158-4a09-9d55-eb56383d73cd",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b",
"uri": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b",
"type": "application/vnd.sas.job.execution.job"
},
{
"method": "GET",
"rel": "state",
"href": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b/state",
"uri": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b/state",
"type": "text/plain"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b",
"uri": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b",
"type": "application/vnd.sas.job.execution.job",
"responseType": "application/vnd.sas.job.execution.job"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b",
"uri": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b"
},
{
"method": "PUT",
"rel": "updateState",
"href": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b/state",
"uri": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b/state",
"type": "text/plain"
},
{
"method": "POST",
"rel": "updateHeartbeatTimeStamp",
"href": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b/heartbeatTimeStamp",
"uri": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b/heartbeatTimeStamp",
"type": "text/plain"
},
{
"method": "GET",
"rel": "jobDefinition",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "log",
"href": "/files/files/e96dd0d1-9158-4a09-9d55-eb56383d73cd",
"uri": "/files/files/e96dd0d1-9158-4a09-9d55-eb56383d73cd"
}
]
},
{
"creationTimeStamp": "2022-04-07T12:00:03.166Z",
"modifiedTimeStamp": "2022-04-07T12:00:05.290Z",
"createdBy": "sas.audit",
"modifiedBy": "sas.audit",
"version": 4,
"id": "79d9a2e8-aa85-4e27-a249-8646e1323707",
"jobRequest": {
"version": 3,
"name": "Update CAS Audit data",
"jobDefinitionUri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"jobDefinition": {
"creationTimeStamp": "2022-04-06T22:08:06.127Z",
"modifiedTimeStamp": "2022-04-06T22:08:06.131Z",
"createdBy": "sas.audit",
"modifiedBy": "sas.audit",
"version": 2,
"id": "7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"name": "CAS Audit table update",
"description": "After upload of new Audit data into a temporary CAS table, this job appends the new data to the existing Audit data",
"type": "casl",
"parameters": [
{
"version": 1,
"name": "%VAR-expireDate",
"type": "CHARACTER",
"required": true
},
{
"version": 1,
"name": "%VAR-tempTableName",
"type": "CHARACTER",
"required": true
},
{
"version": 1,
"name": "%VAR-targetCaslib",
"type": "CHARACTER",
"required": true
},
{
"version": 1,
"name": "serverId",
"defaultValue": "cas-shared-default",
"type": "CHARACTER",
"required": false
}
],
"code": "whereStr=cat(\"'Timestamp'n <= '\", expireDate, \"'\");\ndeleteRows / table={name='AUDIT' caslib=targetCaslib, where=whereStr};\nrun;\ncodeStr=cat(\"data AUDIT(caslib=\", targetCaslib, \" append=yes);set \", tempTableName, \"(caslib=\", targetCaslib, \");run;\");\ndatastep.runCode / code=codeStr;\nrun;\ntable.save status=sc / name='AUDIT' caslib=targetCaslib replace=true table={ name='AUDIT' caslib=targetCaslib };\nrun;\ntable.dropTable name='AUDIT' caslib=targetCaslib;\nrun;\ntable.dropTable name=tempTableName caslib=targetCaslib;\nrun;",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.job.definition",
"responseType": "application/vnd.sas.job.definition"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309"
}
],
"properties": []
},
"arguments": {
"%VAR-expireDate": "2022-03-31T12:00:02.000Z",
"%VAR-targetCaslib": "SystemData",
"%VAR-tempTableName": "audit_4114136195",
"serverId": "cas-shared-default"
},
"properties": [],
"createdByApplication": "jobExecution"
},
"state": "completed",
"endTimeStamp": "2022-04-07T12:00:05.287Z",
"heartbeatTimeStamp": "2022-04-07T12:00:03.267Z",
"submittedByApplication": "audit-service",
"heartbeatInterval": 300,
"elapsedTime": 2121,
"results": {
"debuginfo_1": "",
"severity_1": "normal",
"statusCode_1": "0",
"reason_1": "ok",
"executedCode": "expireDate=\"2022-03-31T12:00:02Z\";\ntempTableName=\"audit_4114136195\";\ntargetCaslib=\"SystemData\";\nwhereStr=cat(\"'Timestamp'n <= '\", expireDate, \"'\");\ndeleteRows / table={name='AUDIT' caslib=targetCaslib, where=whereStr};\nrun;\ncodeStr=cat(\"data AUDIT(caslib=\", targetCaslib, \" append=yes);set \", tempTableName, \"(caslib=\", targetCaslib, \");run;\");\ndatastep.runCode / code=codeStr;\nrun;\ntable.save status=sc / name='AUDIT' caslib=targetCaslib replace=true table={ name='AUDIT' caslib=targetCaslib };\nrun;\ntable.dropTable name='AUDIT' caslib=targetCaslib;\nrun;\ntable.dropTable name=tempTableName caslib=targetCaslib;\nrun;",
"status_1": ""
},
"logLocation": "/files/files/9bc09fa1-2f94-4bec-9999-299401c6a472",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707",
"uri": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707",
"type": "application/vnd.sas.job.execution.job"
},
{
"method": "GET",
"rel": "state",
"href": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707/state",
"uri": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707/state",
"type": "text/plain"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707",
"uri": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707",
"type": "application/vnd.sas.job.execution.job",
"responseType": "application/vnd.sas.job.execution.job"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707",
"uri": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707"
},
{
"method": "PUT",
"rel": "updateState",
"href": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707/state",
"uri": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707/state",
"type": "text/plain"
},
{
"method": "POST",
"rel": "updateHeartbeatTimeStamp",
"href": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707/heartbeatTimeStamp",
"uri": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707/heartbeatTimeStamp",
"type": "text/plain"
},
{
"method": "GET",
"rel": "jobDefinition",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "log",
"href": "/files/files/9bc09fa1-2f94-4bec-9999-299401c6a472",
"uri": "/files/files/9bc09fa1-2f94-4bec-9999-299401c6a472"
}
]
}
],
"limit": 10,
"version": 2
}
This is an example of a Bad Request response for a
GET
to return all jobs. This example uses an invalid filter name.
{
"errorCode": 1100,
"message": "Unsupported function in filter request: nojakj",
"details": [
"traceId: f80fb285f501eb33",
"path: /jobExecution/jobs"
],
"links": [],
"version": 2,
"httpStatusCode": 400
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | jobCollection |
400 | Bad Request | The request was not valid. An invalid filter or combination of request parameters was provided. | error2 |
Get all jobs
Code samples
# You can also use wget
curl -X POST http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs#withQuery \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: text/plain' \
-H 'Accept: application/vnd.sas.collection+json' \
-H 'Delegate-Domain: string'
const inputBody = 'string';
const headers = {
'Content-Type':'text/plain',
'Accept':'application/vnd.sas.collection+json',
'Delegate-Domain':'string'
};
fetch('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs#withQuery',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'text/plain',
'Accept': 'application/vnd.sas.collection+json',
'Delegate-Domain': 'string'
}
r = requests.post('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs#withQuery', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"text/plain"},
"Accept": []string{"application/vnd.sas.collection+json"},
"Delegate-Domain": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs#withQuery", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /jobs
Returns all jobs by using a filter in the body of the request. This is intended for large filters that are too long to be used as a query parameter. Standard paging, filtering, and sorting options are specified in the Parameters section.
Body parameter
string
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
start | query | integer | false | The zero-based index of the first job to return. The default is 0 (zero). |
limit | query | integer | false | The maximum number of jobs to return in this page of results. The actual number of returned jobs might be less if the collection has been exhausted. The default is 10. |
sortBy | query | string(sort-criteria) | false | Defines how the returned jobs are sorted. The default sort order is descending on the creation timestamp field. The following sorts are examples:
|
Delegate-Domain | header | string | false | Name of a credential domain of type OAuth2.0. The credential secret is retrieved to impersonate a group-managed service account for the current request. |
body | body | string | false | The criteria for filtering the returned jobs. See the Filtering in REST APIs article for more information about how to construct a request. The following request bodies are examples:
|
Detailed descriptions
Delegate-Domain: Name of a credential domain of type OAuth2.0. The credential secret is retrieved to impersonate a group-managed service account for the current request.
Example responses
This is an example of using
GET
to return jobs.
{
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/jobExecution/jobs",
"uri": "/jobExecution/jobs",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.job"
},
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobs?sortBy=creationTimeStamp:descending&start=0&limit=10",
"uri": "/jobExecution/jobs?sortBy=creationTimeStamp:descending&start=0&limit=10",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.job"
},
{
"method": "GET",
"rel": "next",
"href": "/jobExecution/jobs?sortBy=creationTimeStamp:descending&start=10&limit=10",
"uri": "/jobExecution/jobs?sortBy=creationTimeStamp:descending&start=10&limit=10",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "up",
"href": "/jobExecution/",
"uri": "/jobExecution/",
"type": "application/vnd.sas.job.execution.job"
},
{
"method": "POST",
"rel": "submitJob",
"href": "/jobExecution/jobs",
"uri": "/jobExecution/jobs",
"type": "application/vnd.sas.job.execution.job.request",
"responseType": "application/vnd.sas.job.execution.job"
},
{
"method": "POST",
"rel": "submitJobs",
"href": "/jobExecution/jobRequests/@selection/jobs",
"uri": "/jobExecution/jobRequests/@selection/jobs",
"type": "application/vnd.sas.selection",
"responseType": "application/vnd.sas.collection"
},
{
"method": "PUT",
"rel": "updateStates",
"href": "/jobExecution/jobs/@selection/state",
"uri": "/jobExecution/jobs/@selection/state",
"type": "application/vnd.sas.selection",
"responseType": "application/vnd.sas.collection"
}
],
"name": "jobs",
"accept": "application/vnd.sas.job.execution.job",
"start": 0,
"count": 2,
"items": [
{
"creationTimeStamp": "2022-04-07T14:00:02.853Z",
"modifiedTimeStamp": "2022-04-07T14:00:05.389Z",
"createdBy": "sas.audit",
"modifiedBy": "sas.audit",
"version": 4,
"id": "f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b",
"jobRequest": {
"version": 3,
"name": "Update CAS Audit data",
"jobDefinitionUri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"jobDefinition": {
"creationTimeStamp": "2022-04-06T22:08:06.127Z",
"modifiedTimeStamp": "2022-04-06T22:08:06.131Z",
"createdBy": "sas.audit",
"modifiedBy": "sas.audit",
"version": 2,
"id": "7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"name": "CAS Audit table update",
"description": "After upload of new Audit data into a temporary CAS table, this job appends the new data to the existing Audit data",
"type": "casl",
"parameters": [
{
"version": 1,
"name": "%VAR-expireDate",
"type": "CHARACTER",
"required": true
},
{
"version": 1,
"name": "%VAR-tempTableName",
"type": "CHARACTER",
"required": true
},
{
"version": 1,
"name": "%VAR-targetCaslib",
"type": "CHARACTER",
"required": true
},
{
"version": 1,
"name": "serverId",
"defaultValue": "cas-shared-default",
"type": "CHARACTER",
"required": false
}
],
"code": "whereStr=cat(\"'Timestamp'n <= '\", expireDate, \"'\");\ndeleteRows / table={name='AUDIT' caslib=targetCaslib, where=whereStr};\nrun;\ncodeStr=cat(\"data AUDIT(caslib=\", targetCaslib, \" append=yes);set \", tempTableName, \"(caslib=\", targetCaslib, \");run;\");\ndatastep.runCode / code=codeStr;\nrun;\ntable.save status=sc / name='AUDIT' caslib=targetCaslib replace=true table={ name='AUDIT' caslib=targetCaslib };\nrun;\ntable.dropTable name='AUDIT' caslib=targetCaslib;\nrun;\ntable.dropTable name=tempTableName caslib=targetCaslib;\nrun;",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.job.definition",
"responseType": "application/vnd.sas.job.definition"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309"
}
],
"properties": []
},
"arguments": {
"%VAR-expireDate": "2022-03-31T14:00:02.000Z",
"%VAR-targetCaslib": "SystemData",
"%VAR-tempTableName": "audit_2869981866",
"serverId": "cas-shared-default"
},
"properties": [],
"createdByApplication": "jobExecution"
},
"state": "completed",
"endTimeStamp": "2022-04-07T14:00:05.387Z",
"heartbeatTimeStamp": "2022-04-07T14:00:03.119Z",
"submittedByApplication": "audit-service",
"heartbeatInterval": 300,
"elapsedTime": 2534,
"results": {
"debuginfo_1": "",
"severity_1": "normal",
"statusCode_1": "0",
"reason_1": "ok",
"executedCode": "expireDate=\"2022-03-31T14:00:02Z\";\ntempTableName=\"audit_2869981866\";\ntargetCaslib=\"SystemData\";\nwhereStr=cat(\"'Timestamp'n <= '\", expireDate, \"'\");\ndeleteRows / table={name='AUDIT' caslib=targetCaslib, where=whereStr};\nrun;\ncodeStr=cat(\"data AUDIT(caslib=\", targetCaslib, \" append=yes);set \", tempTableName, \"(caslib=\", targetCaslib, \");run;\");\ndatastep.runCode / code=codeStr;\nrun;\ntable.save status=sc / name='AUDIT' caslib=targetCaslib replace=true table={ name='AUDIT' caslib=targetCaslib };\nrun;\ntable.dropTable name='AUDIT' caslib=targetCaslib;\nrun;\ntable.dropTable name=tempTableName caslib=targetCaslib;\nrun;",
"status_1": ""
},
"logLocation": "/files/files/e96dd0d1-9158-4a09-9d55-eb56383d73cd",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b",
"uri": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b",
"type": "application/vnd.sas.job.execution.job"
},
{
"method": "GET",
"rel": "state",
"href": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b/state",
"uri": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b/state",
"type": "text/plain"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b",
"uri": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b",
"type": "application/vnd.sas.job.execution.job",
"responseType": "application/vnd.sas.job.execution.job"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b",
"uri": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b"
},
{
"method": "PUT",
"rel": "updateState",
"href": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b/state",
"uri": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b/state",
"type": "text/plain"
},
{
"method": "POST",
"rel": "updateHeartbeatTimeStamp",
"href": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b/heartbeatTimeStamp",
"uri": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b/heartbeatTimeStamp",
"type": "text/plain"
},
{
"method": "GET",
"rel": "jobDefinition",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "log",
"href": "/files/files/e96dd0d1-9158-4a09-9d55-eb56383d73cd",
"uri": "/files/files/e96dd0d1-9158-4a09-9d55-eb56383d73cd"
}
]
},
{
"creationTimeStamp": "2022-04-07T12:00:03.166Z",
"modifiedTimeStamp": "2022-04-07T12:00:05.290Z",
"createdBy": "sas.audit",
"modifiedBy": "sas.audit",
"version": 4,
"id": "79d9a2e8-aa85-4e27-a249-8646e1323707",
"jobRequest": {
"version": 3,
"name": "Update CAS Audit data",
"jobDefinitionUri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"jobDefinition": {
"creationTimeStamp": "2022-04-06T22:08:06.127Z",
"modifiedTimeStamp": "2022-04-06T22:08:06.131Z",
"createdBy": "sas.audit",
"modifiedBy": "sas.audit",
"version": 2,
"id": "7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"name": "CAS Audit table update",
"description": "After upload of new Audit data into a temporary CAS table, this job appends the new data to the existing Audit data",
"type": "casl",
"parameters": [
{
"version": 1,
"name": "%VAR-expireDate",
"type": "CHARACTER",
"required": true
},
{
"version": 1,
"name": "%VAR-tempTableName",
"type": "CHARACTER",
"required": true
},
{
"version": 1,
"name": "%VAR-targetCaslib",
"type": "CHARACTER",
"required": true
},
{
"version": 1,
"name": "serverId",
"defaultValue": "cas-shared-default",
"type": "CHARACTER",
"required": false
}
],
"code": "whereStr=cat(\"'Timestamp'n <= '\", expireDate, \"'\");\ndeleteRows / table={name='AUDIT' caslib=targetCaslib, where=whereStr};\nrun;\ncodeStr=cat(\"data AUDIT(caslib=\", targetCaslib, \" append=yes);set \", tempTableName, \"(caslib=\", targetCaslib, \");run;\");\ndatastep.runCode / code=codeStr;\nrun;\ntable.save status=sc / name='AUDIT' caslib=targetCaslib replace=true table={ name='AUDIT' caslib=targetCaslib };\nrun;\ntable.dropTable name='AUDIT' caslib=targetCaslib;\nrun;\ntable.dropTable name=tempTableName caslib=targetCaslib;\nrun;",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.job.definition",
"responseType": "application/vnd.sas.job.definition"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309"
}
],
"properties": []
},
"arguments": {
"%VAR-expireDate": "2022-03-31T12:00:02.000Z",
"%VAR-targetCaslib": "SystemData",
"%VAR-tempTableName": "audit_4114136195",
"serverId": "cas-shared-default"
},
"properties": [],
"createdByApplication": "jobExecution"
},
"state": "completed",
"endTimeStamp": "2022-04-07T12:00:05.287Z",
"heartbeatTimeStamp": "2022-04-07T12:00:03.267Z",
"submittedByApplication": "audit-service",
"heartbeatInterval": 300,
"elapsedTime": 2121,
"results": {
"debuginfo_1": "",
"severity_1": "normal",
"statusCode_1": "0",
"reason_1": "ok",
"executedCode": "expireDate=\"2022-03-31T12:00:02Z\";\ntempTableName=\"audit_4114136195\";\ntargetCaslib=\"SystemData\";\nwhereStr=cat(\"'Timestamp'n <= '\", expireDate, \"'\");\ndeleteRows / table={name='AUDIT' caslib=targetCaslib, where=whereStr};\nrun;\ncodeStr=cat(\"data AUDIT(caslib=\", targetCaslib, \" append=yes);set \", tempTableName, \"(caslib=\", targetCaslib, \");run;\");\ndatastep.runCode / code=codeStr;\nrun;\ntable.save status=sc / name='AUDIT' caslib=targetCaslib replace=true table={ name='AUDIT' caslib=targetCaslib };\nrun;\ntable.dropTable name='AUDIT' caslib=targetCaslib;\nrun;\ntable.dropTable name=tempTableName caslib=targetCaslib;\nrun;",
"status_1": ""
},
"logLocation": "/files/files/9bc09fa1-2f94-4bec-9999-299401c6a472",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707",
"uri": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707",
"type": "application/vnd.sas.job.execution.job"
},
{
"method": "GET",
"rel": "state",
"href": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707/state",
"uri": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707/state",
"type": "text/plain"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707",
"uri": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707",
"type": "application/vnd.sas.job.execution.job",
"responseType": "application/vnd.sas.job.execution.job"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707",
"uri": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707"
},
{
"method": "PUT",
"rel": "updateState",
"href": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707/state",
"uri": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707/state",
"type": "text/plain"
},
{
"method": "POST",
"rel": "updateHeartbeatTimeStamp",
"href": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707/heartbeatTimeStamp",
"uri": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707/heartbeatTimeStamp",
"type": "text/plain"
},
{
"method": "GET",
"rel": "jobDefinition",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "log",
"href": "/files/files/9bc09fa1-2f94-4bec-9999-299401c6a472",
"uri": "/files/files/9bc09fa1-2f94-4bec-9999-299401c6a472"
}
]
}
],
"limit": 10,
"version": 2
}
{
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/jobExecution/jobs",
"uri": "/jobExecution/jobs",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.job"
},
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobs?sortBy=creationTimeStamp:descending&start=0&limit=10",
"uri": "/jobExecution/jobs?sortBy=creationTimeStamp:descending&start=0&limit=10",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.job"
},
{
"method": "GET",
"rel": "next",
"href": "/jobExecution/jobs?sortBy=creationTimeStamp:descending&start=10&limit=10",
"uri": "/jobExecution/jobs?sortBy=creationTimeStamp:descending&start=10&limit=10",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "up",
"href": "/jobExecution/",
"uri": "/jobExecution/",
"type": "application/vnd.sas.job.execution.job"
},
{
"method": "POST",
"rel": "submitJob",
"href": "/jobExecution/jobs",
"uri": "/jobExecution/jobs",
"type": "application/vnd.sas.job.execution.job.request",
"responseType": "application/vnd.sas.job.execution.job"
},
{
"method": "POST",
"rel": "submitJobs",
"href": "/jobExecution/jobRequests/@selection/jobs",
"uri": "/jobExecution/jobRequests/@selection/jobs",
"type": "application/vnd.sas.selection",
"responseType": "application/vnd.sas.collection"
},
{
"method": "PUT",
"rel": "updateStates",
"href": "/jobExecution/jobs/@selection/state",
"uri": "/jobExecution/jobs/@selection/state",
"type": "application/vnd.sas.selection",
"responseType": "application/vnd.sas.collection"
}
],
"name": "jobs",
"accept": "application/vnd.sas.job.execution.job",
"start": 0,
"count": 2,
"items": [
{
"creationTimeStamp": "2022-04-07T14:00:02.853Z",
"modifiedTimeStamp": "2022-04-07T14:00:05.389Z",
"createdBy": "sas.audit",
"modifiedBy": "sas.audit",
"version": 4,
"id": "f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b",
"jobRequest": {
"version": 3,
"name": "Update CAS Audit data",
"jobDefinitionUri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"jobDefinition": {
"creationTimeStamp": "2022-04-06T22:08:06.127Z",
"modifiedTimeStamp": "2022-04-06T22:08:06.131Z",
"createdBy": "sas.audit",
"modifiedBy": "sas.audit",
"version": 2,
"id": "7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"name": "CAS Audit table update",
"description": "After upload of new Audit data into a temporary CAS table, this job appends the new data to the existing Audit data",
"type": "casl",
"parameters": [
{
"version": 1,
"name": "%VAR-expireDate",
"type": "CHARACTER",
"required": true
},
{
"version": 1,
"name": "%VAR-tempTableName",
"type": "CHARACTER",
"required": true
},
{
"version": 1,
"name": "%VAR-targetCaslib",
"type": "CHARACTER",
"required": true
},
{
"version": 1,
"name": "serverId",
"defaultValue": "cas-shared-default",
"type": "CHARACTER",
"required": false
}
],
"code": "whereStr=cat(\"'Timestamp'n <= '\", expireDate, \"'\");\ndeleteRows / table={name='AUDIT' caslib=targetCaslib, where=whereStr};\nrun;\ncodeStr=cat(\"data AUDIT(caslib=\", targetCaslib, \" append=yes);set \", tempTableName, \"(caslib=\", targetCaslib, \");run;\");\ndatastep.runCode / code=codeStr;\nrun;\ntable.save status=sc / name='AUDIT' caslib=targetCaslib replace=true table={ name='AUDIT' caslib=targetCaslib };\nrun;\ntable.dropTable name='AUDIT' caslib=targetCaslib;\nrun;\ntable.dropTable name=tempTableName caslib=targetCaslib;\nrun;",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.job.definition",
"responseType": "application/vnd.sas.job.definition"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309"
}
],
"properties": []
},
"arguments": {
"%VAR-expireDate": "2022-03-31T14:00:02.000Z",
"%VAR-targetCaslib": "SystemData",
"%VAR-tempTableName": "audit_2869981866",
"serverId": "cas-shared-default"
},
"properties": [],
"createdByApplication": "jobExecution"
},
"state": "completed",
"endTimeStamp": "2022-04-07T14:00:05.387Z",
"heartbeatTimeStamp": "2022-04-07T14:00:03.119Z",
"submittedByApplication": "audit-service",
"heartbeatInterval": 300,
"elapsedTime": 2534,
"results": {
"debuginfo_1": "",
"severity_1": "normal",
"statusCode_1": "0",
"reason_1": "ok",
"executedCode": "expireDate=\"2022-03-31T14:00:02Z\";\ntempTableName=\"audit_2869981866\";\ntargetCaslib=\"SystemData\";\nwhereStr=cat(\"'Timestamp'n <= '\", expireDate, \"'\");\ndeleteRows / table={name='AUDIT' caslib=targetCaslib, where=whereStr};\nrun;\ncodeStr=cat(\"data AUDIT(caslib=\", targetCaslib, \" append=yes);set \", tempTableName, \"(caslib=\", targetCaslib, \");run;\");\ndatastep.runCode / code=codeStr;\nrun;\ntable.save status=sc / name='AUDIT' caslib=targetCaslib replace=true table={ name='AUDIT' caslib=targetCaslib };\nrun;\ntable.dropTable name='AUDIT' caslib=targetCaslib;\nrun;\ntable.dropTable name=tempTableName caslib=targetCaslib;\nrun;",
"status_1": ""
},
"logLocation": "/files/files/e96dd0d1-9158-4a09-9d55-eb56383d73cd",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b",
"uri": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b",
"type": "application/vnd.sas.job.execution.job"
},
{
"method": "GET",
"rel": "state",
"href": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b/state",
"uri": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b/state",
"type": "text/plain"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b",
"uri": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b",
"type": "application/vnd.sas.job.execution.job",
"responseType": "application/vnd.sas.job.execution.job"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b",
"uri": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b"
},
{
"method": "PUT",
"rel": "updateState",
"href": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b/state",
"uri": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b/state",
"type": "text/plain"
},
{
"method": "POST",
"rel": "updateHeartbeatTimeStamp",
"href": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b/heartbeatTimeStamp",
"uri": "/jobExecution/jobs/f7cb59f8-0f73-4f5c-b7d5-24e9e70e3a9b/heartbeatTimeStamp",
"type": "text/plain"
},
{
"method": "GET",
"rel": "jobDefinition",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "log",
"href": "/files/files/e96dd0d1-9158-4a09-9d55-eb56383d73cd",
"uri": "/files/files/e96dd0d1-9158-4a09-9d55-eb56383d73cd"
}
]
},
{
"creationTimeStamp": "2022-04-07T12:00:03.166Z",
"modifiedTimeStamp": "2022-04-07T12:00:05.290Z",
"createdBy": "sas.audit",
"modifiedBy": "sas.audit",
"version": 4,
"id": "79d9a2e8-aa85-4e27-a249-8646e1323707",
"jobRequest": {
"version": 3,
"name": "Update CAS Audit data",
"jobDefinitionUri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"jobDefinition": {
"creationTimeStamp": "2022-04-06T22:08:06.127Z",
"modifiedTimeStamp": "2022-04-06T22:08:06.131Z",
"createdBy": "sas.audit",
"modifiedBy": "sas.audit",
"version": 2,
"id": "7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"name": "CAS Audit table update",
"description": "After upload of new Audit data into a temporary CAS table, this job appends the new data to the existing Audit data",
"type": "casl",
"parameters": [
{
"version": 1,
"name": "%VAR-expireDate",
"type": "CHARACTER",
"required": true
},
{
"version": 1,
"name": "%VAR-tempTableName",
"type": "CHARACTER",
"required": true
},
{
"version": 1,
"name": "%VAR-targetCaslib",
"type": "CHARACTER",
"required": true
},
{
"version": 1,
"name": "serverId",
"defaultValue": "cas-shared-default",
"type": "CHARACTER",
"required": false
}
],
"code": "whereStr=cat(\"'Timestamp'n <= '\", expireDate, \"'\");\ndeleteRows / table={name='AUDIT' caslib=targetCaslib, where=whereStr};\nrun;\ncodeStr=cat(\"data AUDIT(caslib=\", targetCaslib, \" append=yes);set \", tempTableName, \"(caslib=\", targetCaslib, \");run;\");\ndatastep.runCode / code=codeStr;\nrun;\ntable.save status=sc / name='AUDIT' caslib=targetCaslib replace=true table={ name='AUDIT' caslib=targetCaslib };\nrun;\ntable.dropTable name='AUDIT' caslib=targetCaslib;\nrun;\ntable.dropTable name=tempTableName caslib=targetCaslib;\nrun;",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.job.definition",
"responseType": "application/vnd.sas.job.definition"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309"
}
],
"properties": []
},
"arguments": {
"%VAR-expireDate": "2022-03-31T12:00:02.000Z",
"%VAR-targetCaslib": "SystemData",
"%VAR-tempTableName": "audit_4114136195",
"serverId": "cas-shared-default"
},
"properties": [],
"createdByApplication": "jobExecution"
},
"state": "completed",
"endTimeStamp": "2022-04-07T12:00:05.287Z",
"heartbeatTimeStamp": "2022-04-07T12:00:03.267Z",
"submittedByApplication": "audit-service",
"heartbeatInterval": 300,
"elapsedTime": 2121,
"results": {
"debuginfo_1": "",
"severity_1": "normal",
"statusCode_1": "0",
"reason_1": "ok",
"executedCode": "expireDate=\"2022-03-31T12:00:02Z\";\ntempTableName=\"audit_4114136195\";\ntargetCaslib=\"SystemData\";\nwhereStr=cat(\"'Timestamp'n <= '\", expireDate, \"'\");\ndeleteRows / table={name='AUDIT' caslib=targetCaslib, where=whereStr};\nrun;\ncodeStr=cat(\"data AUDIT(caslib=\", targetCaslib, \" append=yes);set \", tempTableName, \"(caslib=\", targetCaslib, \");run;\");\ndatastep.runCode / code=codeStr;\nrun;\ntable.save status=sc / name='AUDIT' caslib=targetCaslib replace=true table={ name='AUDIT' caslib=targetCaslib };\nrun;\ntable.dropTable name='AUDIT' caslib=targetCaslib;\nrun;\ntable.dropTable name=tempTableName caslib=targetCaslib;\nrun;",
"status_1": ""
},
"logLocation": "/files/files/9bc09fa1-2f94-4bec-9999-299401c6a472",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707",
"uri": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707",
"type": "application/vnd.sas.job.execution.job"
},
{
"method": "GET",
"rel": "state",
"href": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707/state",
"uri": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707/state",
"type": "text/plain"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707",
"uri": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707",
"type": "application/vnd.sas.job.execution.job",
"responseType": "application/vnd.sas.job.execution.job"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707",
"uri": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707"
},
{
"method": "PUT",
"rel": "updateState",
"href": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707/state",
"uri": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707/state",
"type": "text/plain"
},
{
"method": "POST",
"rel": "updateHeartbeatTimeStamp",
"href": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707/heartbeatTimeStamp",
"uri": "/jobExecution/jobs/79d9a2e8-aa85-4e27-a249-8646e1323707/heartbeatTimeStamp",
"type": "text/plain"
},
{
"method": "GET",
"rel": "jobDefinition",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "log",
"href": "/files/files/9bc09fa1-2f94-4bec-9999-299401c6a472",
"uri": "/files/files/9bc09fa1-2f94-4bec-9999-299401c6a472"
}
]
}
],
"limit": 10,
"version": 2
}
This is an example of a Bad Request response for a
GET
to return all jobs. This example uses an invalid filter name.
{
"errorCode": 1100,
"message": "Unsupported function in filter request: nojakj",
"details": [
"traceId: f80fb285f501eb33",
"path: /jobExecution/jobs"
],
"links": [],
"version": 2,
"httpStatusCode": 400
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. The jobs (if any) are returned in a resource collection. | jobCollection |
400 | Bad Request | The request was not valid. An invalid request occurs in the following scenarios:
|
error2 |
Update the state of multiple jobs
Code samples
# You can also use wget
curl -X PUT http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/@selection/state \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.selection+json' \
-H 'Accept: application/vnd.sas.collection+json'
const inputBody = '{
"version": 1,
"type": "uri",
"resources": [
"/jobExecution/jobs/de941a62-9099-4081-b696-23ffad922963",
"/jobExecution/jobs/efc70058-4731-4ffd-8f2e-3da6f472fd6e",
"/jobExecution/jobs/368d5e04-c3d4-493d-8b1a-2c24816ef71d"
]
}';
const headers = {
'Content-Type':'application/vnd.sas.selection+json',
'Accept':'application/vnd.sas.collection+json'
};
fetch('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/@selection/state',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.selection+json',
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.put('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/@selection/state', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.selection+json"},
"Accept": []string{"application/vnd.sas.collection+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/@selection/state", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /jobs/@selection/state
Updates the state of multiple jobs. The new state must be set as the value-query parameter. The request body identifies the jobs to update. The selection type must be URI and the resources are an array of URIs that identify the jobs. The items in the response MUST match 1-to-1 with the items in the request. If the update is successful, the item in the response is an application/vnd.sas.summary object. If the update failed for a particular job, the corresponding item in the response is an application/vnd.sas.error object.
Body parameter
This is an example body when changing the state of multiple jobs using the multi-PUT.
{
"version": 1,
"type": "uri",
"resources": [
"/jobExecution/jobs/de941a62-9099-4081-b696-23ffad922963",
"/jobExecution/jobs/efc70058-4731-4ffd-8f2e-3da6f472fd6e",
"/jobExecution/jobs/368d5e04-c3d4-493d-8b1a-2c24816ef71d"
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
value | query | string | false | The value of the state. |
body | body | resourceSelection | false | The resource-selection URIs that identify the jobs whose states must be updated. |
Example responses
This is an example of using
PUT
to update the state of multiple jobs.
{
"links": [],
"name": "items",
"items": [
{
"id": "1c2b0fea-d0f9-4073-a79c-61cf779bb97d",
"type": "application/vnd.sas.job.execution.job",
"name": "Balance updates",
"version": 2
},
{
"id": "018c5b29-c2d2-4180-b205-b5f8da1b3886",
"type": "application/vnd.sas.job.execution.job",
"name": "Update Monthly data",
"version": 2
}
],
"version": 2
}
This is an example of a Bad Request response for a
PUT
to update the state of multiple jobs. This example uses an invalid selection type.
{
"errorCode": 401,
"message": "Full authentication is required to access this resource",
"details": [
"path: /jobExecution/jobRequests/@selection/jobs"
],
"links": [],
"version": 2,
"httpStatusCode": 401
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. The items in the response MUST match 1-to-1 with the items in the request. If the update is successful, the item in the response is an application/vnd.sas.summary object. If the update failed for a particular job, the corresponding item in the response is an application/vnd.sas.error object. | updateJobsStateCollection |
400 | Bad Request | The request was not valid. An invalid request occurs in the following scenarios:
|
error2 |
Get a job
Code samples
# You can also use wget
curl -X GET http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.job.execution.job+json' \
-H 'Delegate-Domain: string'
const headers = {
'Accept':'application/vnd.sas.job.execution.job+json',
'Delegate-Domain':'string'
};
fetch('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.job.execution.job+json',
'Delegate-Domain': 'string'
}
r = requests.get('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.job.execution.job+json"},
"Delegate-Domain": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /jobs/{jobId}
Returns information about one job based on its unique ID. After the job execution has completed, various execution artifacts can be obtained from the results
member of the returned job (application/vnd.sas.job.execution.job). The items returned in the results
map are provider specific. A log, if available, can be obtained from the logLocation
member of the job.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
jobId | path | string | true | The ID of job. |
Delegate-Domain | header | string | false | Name of a credential domain of type OAuth2.0. The credential secret is retrieved to impersonate a group-managed service account for the current request. |
Detailed descriptions
Delegate-Domain: Name of a credential domain of type OAuth2.0. The credential secret is retrieved to impersonate a group-managed service account for the current request.
Example responses
This is an example of using
GET
to obtain a specific job.
{
"creationTimeStamp": "2018-03-12T18:48:29.471Z",
"modifiedTimeStamp": "2018-03-12T18:48:42.753Z",
"createdBy": "user1",
"modifiedBy": "user1",
"version": 3,
"id": "6efcf389-7d63-4929-b532-13be28460eea",
"jobRequest": {
"version": 3,
"name": "proc print",
"description": "ods output",
"jobDefinitionUri": "/jobDefinitions/definitions/aa3065a0-8ef6-42d1-965d-e77652aea7af",
"jobDefinition": {
"creationTimeStamp": "2018-03-12T18:46:31.665Z",
"modifiedTimeStamp": "2018-03-12T18:46:31.666Z",
"createdBy": "user1",
"modifiedBy": "user1",
"version": 2,
"id": "aa3065a0-8ef6-42d1-965d-e77652aea7af",
"name": "Simple proc print",
"type": "Compute",
"parameters": [
{
"version": 1,
"name": "_contextName",
"defaultValue": "SAS Job Execution compute context",
"type": "CHARACTER",
"label": "Context Name",
"required": false
}
],
"code": "ods html style=HTMLBlue;\nproc print data=sashelp.class; run; quit;\nods html close;",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobDefinitions/definitions/aa3065a0-8ef6-42d1-965d-e77652aea7af",
"uri": "/jobDefinitions/definitions/aa3065a0-8ef6-42d1-965d-e77652aea7af",
"type": "application/vnd.sas.job.definition"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobDefinitions/definitions/aa3065a0-8ef6-42d1-965d-e77652aea7af",
"uri": "/jobDefinitions/definitions/aa3065a0-8ef6-42d1-965d-e77652aea7af",
"type": "application/vnd.sas.job.definition",
"responseType": "application/vnd.sas.job.definition"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobDefinitions/definitions/aa3065a0-8ef6-42d1-965d-e77652aea7af",
"uri": "/jobDefinitions/definitions/aa3065a0-8ef6-42d1-965d-e77652aea7af"
}
],
"properties": []
},
"arguments": {
"_contextName": "SAS Job Execution compute context"
},
"properties": [],
"createdByApplication": "jobExecution"
},
"state": "completed",
"endTimeStamp": "2018-03-12T18:48:42.753Z",
"submittedByApplication": "jobExecution",
"heartbeatInterval": 0,
"elapsedTime": 13282,
"results": {
"COMPUTE_CONTEXT": "SAS Job Execution compute context",
"sashtml.htm": "/files/files/4908deb5-1b61-4473-a54a-aa02710b611b",
"D4363A55-6BC1-1C49-B559-8CFFC570DCF3.log.txt": "/files/files/96fb540c-b6be-4fc0-b2c1-3dbb5a3873f4",
"D4363A55-6BC1-1C49-B559-8CFFC570DCF3.list": "/files/files/f5e9d616-ad1b-49cf-a96c-26d2d2bfb567",
"COMPUTE_JOB": "D4363A55-6BC1-1C49-B559-8CFFC570DCF3",
"D4363A55-6BC1-1C49-B559-8CFFC570DCF3.list.txt": "/files/files/fcc792d1-bb57-4456-89fe-651c94d9f536",
"COMPUTE_SESSION": "53cd7934-767d-4823-8fd0-24f0fe9af953-ses0000 Ended."
},
"logLocation": "/files/files/3303a3eb-2a6c-4123-9f9b-7d20993edd2b",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobs/6efcf389-7d63-4929-b532-13be28460eea",
"uri": "/jobExecution/jobs/6efcf389-7d63-4929-b532-13be28460eea",
"type": "application/vnd.sas.job.execution.job"
},
{
"method": "GET",
"rel": "state",
"href": "/jobExecution/jobs/6efcf389-7d63-4929-b532-13be28460eea/state",
"uri": "/jobExecution/jobs/6efcf389-7d63-4929-b532-13be28460eea/state",
"type": "text/plain"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobExecution/jobs/6efcf389-7d63-4929-b532-13be28460eea",
"uri": "/jobExecution/jobs/6efcf389-7d63-4929-b532-13be28460eea",
"type": "application/vnd.sas.job.execution.job",
"responseType": "application/vnd.sas.job.execution.job"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobExecution/jobs/6efcf389-7d63-4929-b532-13be28460eea",
"uri": "/jobExecution/jobs/6efcf389-7d63-4929-b532-13be28460eea"
},
{
"method": "PUT",
"rel": "updateState",
"href": "/jobExecution/jobs/6efcf389-7d63-4929-b532-13be28460eea/state",
"uri": "/jobExecution/jobs/6efcf389-7d63-4929-b532-13be28460eea/state",
"type": "text/plain"
},
{
"method": "POST",
"rel": "updateHeartbeatTimeStamp",
"href": "/jobExecution/jobs/6efcf389-7d63-4929-b532-13be28460eea/heartbeatTimeStamp",
"uri": "/jobExecution/jobs/6efcf389-7d63-4929-b532-13be28460eea/heartbeatTimeStamp",
"type": "text/plain"
},
{
"method": "GET",
"rel": "jobDefinition",
"href": "/jobDefinitions/definitions/aa3065a0-8ef6-42d1-965d-e77652aea7af",
"uri": "/jobDefinitions/definitions/aa3065a0-8ef6-42d1-965d-e77652aea7af",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "log",
"href": "/files/files/3303a3eb-2a6c-4123-9f9b-7d20993edd2b",
"uri": "/files/files/3303a3eb-2a6c-4123-9f9b-7d20993edd2b"
}
]
}
{
"creationTimeStamp": "2018-03-12T18:48:29.471Z",
"modifiedTimeStamp": "2018-03-12T18:48:42.753Z",
"createdBy": "user1",
"modifiedBy": "user1",
"version": 3,
"id": "6efcf389-7d63-4929-b532-13be28460eea",
"jobRequest": {
"version": 3,
"name": "proc print",
"description": "ods output",
"jobDefinitionUri": "/jobDefinitions/definitions/aa3065a0-8ef6-42d1-965d-e77652aea7af",
"jobDefinition": {
"creationTimeStamp": "2018-03-12T18:46:31.665Z",
"modifiedTimeStamp": "2018-03-12T18:46:31.666Z",
"createdBy": "user1",
"modifiedBy": "user1",
"version": 2,
"id": "aa3065a0-8ef6-42d1-965d-e77652aea7af",
"name": "Simple proc print",
"type": "Compute",
"parameters": [
{
"version": 1,
"name": "_contextName",
"defaultValue": "SAS Job Execution compute context",
"type": "CHARACTER",
"label": "Context Name",
"required": false
}
],
"code": "ods html style=HTMLBlue;\nproc print data=sashelp.class; run; quit;\nods html close;",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobDefinitions/definitions/aa3065a0-8ef6-42d1-965d-e77652aea7af",
"uri": "/jobDefinitions/definitions/aa3065a0-8ef6-42d1-965d-e77652aea7af",
"type": "application/vnd.sas.job.definition"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobDefinitions/definitions/aa3065a0-8ef6-42d1-965d-e77652aea7af",
"uri": "/jobDefinitions/definitions/aa3065a0-8ef6-42d1-965d-e77652aea7af",
"type": "application/vnd.sas.job.definition",
"responseType": "application/vnd.sas.job.definition"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobDefinitions/definitions/aa3065a0-8ef6-42d1-965d-e77652aea7af",
"uri": "/jobDefinitions/definitions/aa3065a0-8ef6-42d1-965d-e77652aea7af"
}
],
"properties": []
},
"arguments": {
"_contextName": "SAS Job Execution compute context"
},
"properties": [],
"createdByApplication": "jobExecution"
},
"state": "completed",
"endTimeStamp": "2018-03-12T18:48:42.753Z",
"submittedByApplication": "jobExecution",
"heartbeatInterval": 0,
"elapsedTime": 13282,
"results": {
"COMPUTE_CONTEXT": "SAS Job Execution compute context",
"sashtml.htm": "/files/files/4908deb5-1b61-4473-a54a-aa02710b611b",
"D4363A55-6BC1-1C49-B559-8CFFC570DCF3.log.txt": "/files/files/96fb540c-b6be-4fc0-b2c1-3dbb5a3873f4",
"D4363A55-6BC1-1C49-B559-8CFFC570DCF3.list": "/files/files/f5e9d616-ad1b-49cf-a96c-26d2d2bfb567",
"COMPUTE_JOB": "D4363A55-6BC1-1C49-B559-8CFFC570DCF3",
"D4363A55-6BC1-1C49-B559-8CFFC570DCF3.list.txt": "/files/files/fcc792d1-bb57-4456-89fe-651c94d9f536",
"COMPUTE_SESSION": "53cd7934-767d-4823-8fd0-24f0fe9af953-ses0000 Ended."
},
"logLocation": "/files/files/3303a3eb-2a6c-4123-9f9b-7d20993edd2b",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobs/6efcf389-7d63-4929-b532-13be28460eea",
"uri": "/jobExecution/jobs/6efcf389-7d63-4929-b532-13be28460eea",
"type": "application/vnd.sas.job.execution.job"
},
{
"method": "GET",
"rel": "state",
"href": "/jobExecution/jobs/6efcf389-7d63-4929-b532-13be28460eea/state",
"uri": "/jobExecution/jobs/6efcf389-7d63-4929-b532-13be28460eea/state",
"type": "text/plain"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobExecution/jobs/6efcf389-7d63-4929-b532-13be28460eea",
"uri": "/jobExecution/jobs/6efcf389-7d63-4929-b532-13be28460eea",
"type": "application/vnd.sas.job.execution.job",
"responseType": "application/vnd.sas.job.execution.job"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobExecution/jobs/6efcf389-7d63-4929-b532-13be28460eea",
"uri": "/jobExecution/jobs/6efcf389-7d63-4929-b532-13be28460eea"
},
{
"method": "PUT",
"rel": "updateState",
"href": "/jobExecution/jobs/6efcf389-7d63-4929-b532-13be28460eea/state",
"uri": "/jobExecution/jobs/6efcf389-7d63-4929-b532-13be28460eea/state",
"type": "text/plain"
},
{
"method": "POST",
"rel": "updateHeartbeatTimeStamp",
"href": "/jobExecution/jobs/6efcf389-7d63-4929-b532-13be28460eea/heartbeatTimeStamp",
"uri": "/jobExecution/jobs/6efcf389-7d63-4929-b532-13be28460eea/heartbeatTimeStamp",
"type": "text/plain"
},
{
"method": "GET",
"rel": "jobDefinition",
"href": "/jobDefinitions/definitions/aa3065a0-8ef6-42d1-965d-e77652aea7af",
"uri": "/jobDefinitions/definitions/aa3065a0-8ef6-42d1-965d-e77652aea7af",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "log",
"href": "/files/files/3303a3eb-2a6c-4123-9f9b-7d20993edd2b",
"uri": "/files/files/3303a3eb-2a6c-4123-9f9b-7d20993edd2b"
}
]
}
This is an example of a NOT FOUND response for the
GET
of a specific job.
{
"errorCode": 0,
"message": "Job not found with ID: 41e44582-e556-448e-95a0-5340d94ce55ex.",
"details": [
"traceId: 5207de02ddac30de",
"path: /jobExecution/jobs/41e44582-e556-448e-95a0-5340d94ce55ex"
],
"links": [],
"version": 2,
"httpStatusCode": 404
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | job |
404 | Not Found | No job exists at the requested path. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | The entity tag for the job. | |
200 | Last-Modified | string | The timestamp for the job request that indicates when it was last modified. It uses the format EEE, dd MMM yyyy HH:mm:ss GMT . |
Check job availability
Code samples
# You can also use wget
curl -X HEAD http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Delegate-Domain: string'
const headers = {
'Delegate-Domain':'string'
};
fetch('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}',
{
method: 'HEAD',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Delegate-Domain': 'string'
}
r = requests.head('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Delegate-Domain": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /jobs/{jobId}
Returns the headers for the job that the corresponding GET
returns. Clients can use this operation to determine whether the job exists.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
jobId | path | string | true | The ID of the job. |
Delegate-Domain | header | string | false | Name of a credential domain of type OAuth2.0. The credential secret is retrieved to impersonate a group-managed service account for the current request. |
Detailed descriptions
Delegate-Domain: Name of a credential domain of type OAuth2.0. The credential secret is retrieved to impersonate a group-managed service account for the current request.
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
404 | Not Found | No job exists at the requested path. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | The entity tag for the job. | |
200 | Last-Modified | string | The timestamp for the job request that indicates when it was last modified. It uses the format EEE, dd MMM yyyy HH:mm:ss GMT . |
Update or replace an existing job
Code samples
# You can also use wget
curl -X PUT http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.job.execution.job+json' \
-H 'Accept: application/vnd.sas.job.execution.job+json' \
-H 'If-Match: string' \
-H 'If-Unmodified-Since: string' \
-H 'Delegate-Domain: string'
const inputBody = '{
"creationTimeStamp": "2022-04-07T20:00:02.338Z",
"modifiedTimeStamp": "2022-04-07T20:00:03.977Z",
"createdBy": "sas.audit",
"modifiedBy": "sas.audit",
"version": 4,
"id": "859ad72d-5fa2-470c-9d43-f7a65829ae5f",
"jobRequest": {
"version": 3,
"name": "Update CAS Audit data",
"jobDefinitionUri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"jobDefinition": {
"creationTimeStamp": "2022-04-06T22:08:06.127Z",
"modifiedTimeStamp": "2022-04-06T22:08:06.131Z",
"createdBy": "sas.audit",
"modifiedBy": "sas.audit",
"version": 2,
"id": "7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"name": "CAS Audit table update",
"description": "After upload of new Audit data into a temporary CAS table, this job appends the new data to the existing Audit data.",
"type": "casl",
"parameters": [
{
"version": 1,
"name": "%VAR-expireDate",
"type": "CHARACTER",
"required": true
},
{
"version": 1,
"name": "%VAR-tempTableName",
"type": "CHARACTER",
"required": true
},
{
"version": 1,
"name": "%VAR-targetCaslib",
"type": "CHARACTER",
"required": true
},
{
"version": 1,
"name": "serverId",
"defaultValue": "cas-shared-default",
"type": "CHARACTER",
"required": false
}
],
"code": "whereStr=cat(\"'Timestamp'n <= '\", expireDate, \"'\");\ndeleteRows / table={name='AUDIT' caslib=targetCaslib, where=whereStr};\nrun;\ncodeStr=cat(\"data AUDIT(caslib=\", targetCaslib, \" append=yes);set \", tempTableName, \"(caslib=\", targetCaslib, \");run;\");\ndatastep.runCode / code=codeStr;\nrun;\ntable.save status=sc / name='AUDIT' caslib=targetCaslib replace=true table={ name='AUDIT' caslib=targetCaslib };\nrun;\ntable.dropTable name='AUDIT' caslib=targetCaslib;\nrun;\ntable.dropTable name=tempTableName caslib=targetCaslib;\nrun;",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.job.definition",
"responseType": "application/vnd.sas.job.definition"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309"
}
],
"properties": []
},
"arguments": {
"%VAR-expireDate": "2022-03-31T20:00:01.000Z",
"%VAR-targetCaslib": "SystemData",
"%VAR-tempTableName": "audit_2992476099",
"serverId": "cas-shared-default"
},
"properties": [],
"createdByApplication": "jobExecution"
},
"state": "completed",
"endTimeStamp": "2022-04-07T20:00:03.975Z",
"heartbeatTimeStamp": "2022-04-07T20:00:02.431Z",
"submittedByApplication": "audit-service",
"heartbeatInterval": 300,
"elapsedTime": 1637,
"results": {
"debuginfo_1": "",
"severity_1": "normal",
"statusCode_1": "0",
"reason_1": "ok",
"executedCode": "expireDate=\"2022-03-31T20:00:01Z\";\ntempTableName=\"audit_2992476099\";\ntargetCaslib=\"SystemData\";\nwhereStr=cat(\"'Timestamp'n <= '\", expireDate, \"'\");\ndeleteRows / table={name='AUDIT' caslib=targetCaslib, where=whereStr};\nrun;\ncodeStr=cat(\"data AUDIT(caslib=\", targetCaslib, \" append=yes);set \", tempTableName, \"(caslib=\", targetCaslib, \");run;\");\ndatastep.runCode / code=codeStr;\nrun;\ntable.save status=sc / name='AUDIT' caslib=targetCaslib replace=true table={ name='AUDIT' caslib=targetCaslib };\nrun;\ntable.dropTable name='AUDIT' caslib=targetCaslib;\nrun;\ntable.dropTable name=tempTableName caslib=targetCaslib;\nrun;",
"status_1": ""
},
"logLocation": "/files/files/4e5356eb-5b9e-45e4-bc11-7c865a4e14db"
}';
const headers = {
'Content-Type':'application/vnd.sas.job.execution.job+json',
'Accept':'application/vnd.sas.job.execution.job+json',
'If-Match':'string',
'If-Unmodified-Since':'string',
'Delegate-Domain':'string'
};
fetch('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.job.execution.job+json',
'Accept': 'application/vnd.sas.job.execution.job+json',
'If-Match': 'string',
'If-Unmodified-Since': 'string',
'Delegate-Domain': 'string'
}
r = requests.put('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.job.execution.job+json"},
"Accept": []string{"application/vnd.sas.job.execution.job+json"},
"If-Match": []string{"string"},
"If-Unmodified-Since": []string{"string"},
"Delegate-Domain": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /jobs/{jobId}
Updates or replaces the specified job. Note: Only execution providers can use this operation.
Body parameter
This is an example body to update a job.
{
"creationTimeStamp": "2022-04-07T20:00:02.338Z",
"modifiedTimeStamp": "2022-04-07T20:00:03.977Z",
"createdBy": "sas.audit",
"modifiedBy": "sas.audit",
"version": 4,
"id": "859ad72d-5fa2-470c-9d43-f7a65829ae5f",
"jobRequest": {
"version": 3,
"name": "Update CAS Audit data",
"jobDefinitionUri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"jobDefinition": {
"creationTimeStamp": "2022-04-06T22:08:06.127Z",
"modifiedTimeStamp": "2022-04-06T22:08:06.131Z",
"createdBy": "sas.audit",
"modifiedBy": "sas.audit",
"version": 2,
"id": "7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"name": "CAS Audit table update",
"description": "After upload of new Audit data into a temporary CAS table, this job appends the new data to the existing Audit data.",
"type": "casl",
"parameters": [
{
"version": 1,
"name": "%VAR-expireDate",
"type": "CHARACTER",
"required": true
},
{
"version": 1,
"name": "%VAR-tempTableName",
"type": "CHARACTER",
"required": true
},
{
"version": 1,
"name": "%VAR-targetCaslib",
"type": "CHARACTER",
"required": true
},
{
"version": 1,
"name": "serverId",
"defaultValue": "cas-shared-default",
"type": "CHARACTER",
"required": false
}
],
"code": "whereStr=cat(\"'Timestamp'n <= '\", expireDate, \"'\");\ndeleteRows / table={name='AUDIT' caslib=targetCaslib, where=whereStr};\nrun;\ncodeStr=cat(\"data AUDIT(caslib=\", targetCaslib, \" append=yes);set \", tempTableName, \"(caslib=\", targetCaslib, \");run;\");\ndatastep.runCode / code=codeStr;\nrun;\ntable.save status=sc / name='AUDIT' caslib=targetCaslib replace=true table={ name='AUDIT' caslib=targetCaslib };\nrun;\ntable.dropTable name='AUDIT' caslib=targetCaslib;\nrun;\ntable.dropTable name=tempTableName caslib=targetCaslib;\nrun;",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.job.definition",
"responseType": "application/vnd.sas.job.definition"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309"
}
],
"properties": []
},
"arguments": {
"%VAR-expireDate": "2022-03-31T20:00:01.000Z",
"%VAR-targetCaslib": "SystemData",
"%VAR-tempTableName": "audit_2992476099",
"serverId": "cas-shared-default"
},
"properties": [],
"createdByApplication": "jobExecution"
},
"state": "completed",
"endTimeStamp": "2022-04-07T20:00:03.975Z",
"heartbeatTimeStamp": "2022-04-07T20:00:02.431Z",
"submittedByApplication": "audit-service",
"heartbeatInterval": 300,
"elapsedTime": 1637,
"results": {
"debuginfo_1": "",
"severity_1": "normal",
"statusCode_1": "0",
"reason_1": "ok",
"executedCode": "expireDate=\"2022-03-31T20:00:01Z\";\ntempTableName=\"audit_2992476099\";\ntargetCaslib=\"SystemData\";\nwhereStr=cat(\"'Timestamp'n <= '\", expireDate, \"'\");\ndeleteRows / table={name='AUDIT' caslib=targetCaslib, where=whereStr};\nrun;\ncodeStr=cat(\"data AUDIT(caslib=\", targetCaslib, \" append=yes);set \", tempTableName, \"(caslib=\", targetCaslib, \");run;\");\ndatastep.runCode / code=codeStr;\nrun;\ntable.save status=sc / name='AUDIT' caslib=targetCaslib replace=true table={ name='AUDIT' caslib=targetCaslib };\nrun;\ntable.dropTable name='AUDIT' caslib=targetCaslib;\nrun;\ntable.dropTable name=tempTableName caslib=targetCaslib;\nrun;",
"status_1": ""
},
"logLocation": "/files/files/4e5356eb-5b9e-45e4-bc11-7c865a4e14db"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
jobId | path | string | true | The ID of the job. |
If-Match | header | string | false | The entity tag obtained from the most recent ETag response header of this job. It must match the current entity tag for the job. |
If-Unmodified-Since | header | string | false | Ignored when If-Match is specified. The timestamp obtained from the most recent Last-Modified response header of this job. It must be later than or equal to the timestamp when the job was last modified. |
Delegate-Domain | header | string | false | Name of a credential domain of type OAuth2.0. The credential secret is retrieved to impersonate a group-managed service account for the current request. |
body | body | job | true | The new job values. |
Detailed descriptions
Delegate-Domain: Name of a credential domain of type OAuth2.0. The credential secret is retrieved to impersonate a group-managed service account for the current request.
Example responses
This is an example response to a
PUT
to update a job.
{
"creationTimeStamp": "2022-04-07T20:00:02.338Z",
"modifiedTimeStamp": "2022-04-07T20:00:03.977Z",
"createdBy": "sas.audit",
"modifiedBy": "sas.audit",
"version": 4,
"id": "859ad72d-5fa2-470c-9d43-f7a65829ae5f",
"jobRequest": {
"version": 3,
"name": "Update CAS Audit data",
"jobDefinitionUri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"jobDefinition": {
"creationTimeStamp": "2022-04-06T22:08:06.127Z",
"modifiedTimeStamp": "2022-04-06T22:08:06.131Z",
"createdBy": "sas.audit",
"modifiedBy": "sas.audit",
"version": 2,
"id": "7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"name": "CAS Audit table update",
"description": "After upload of new Audit data into a temporary CAS table, this job appends the new data to the existing Audit data.",
"type": "casl",
"parameters": [
{
"version": 1,
"name": "%VAR-expireDate",
"type": "CHARACTER",
"required": true
},
{
"version": 1,
"name": "%VAR-tempTableName",
"type": "CHARACTER",
"required": true
},
{
"version": 1,
"name": "%VAR-targetCaslib",
"type": "CHARACTER",
"required": true
},
{
"version": 1,
"name": "serverId",
"defaultValue": "cas-shared-default",
"type": "CHARACTER",
"required": false
}
],
"code": "whereStr=cat(\"'Timestamp'n <= '\", expireDate, \"'\");\ndeleteRows / table={name='AUDIT' caslib=targetCaslib, where=whereStr};\nrun;\ncodeStr=cat(\"data AUDIT(caslib=\", targetCaslib, \" append=yes);set \", tempTableName, \"(caslib=\", targetCaslib, \");run;\");\ndatastep.runCode / code=codeStr;\nrun;\ntable.save status=sc / name='AUDIT' caslib=targetCaslib replace=true table={ name='AUDIT' caslib=targetCaslib };\nrun;\ntable.dropTable name='AUDIT' caslib=targetCaslib;\nrun;\ntable.dropTable name=tempTableName caslib=targetCaslib;\nrun;",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.job.definition",
"responseType": "application/vnd.sas.job.definition"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309"
}
],
"properties": []
},
"arguments": {
"%VAR-expireDate": "2022-03-31T20:00:01.000Z",
"%VAR-targetCaslib": "SystemData",
"%VAR-tempTableName": "audit_2992476099",
"serverId": "cas-shared-default"
},
"properties": [],
"createdByApplication": "jobExecution"
},
"state": "completed",
"endTimeStamp": "2022-04-07T20:00:03.975Z",
"heartbeatTimeStamp": "2022-04-07T20:00:02.431Z",
"submittedByApplication": "audit-service",
"heartbeatInterval": 300,
"elapsedTime": 1637,
"results": {
"debuginfo_1": "",
"severity_1": "normal",
"statusCode_1": "0",
"reason_1": "ok",
"executedCode": "expireDate=\"2022-03-31T20:00:01Z\";\ntempTableName=\"audit_2992476099\";\ntargetCaslib=\"SystemData\";\nwhereStr=cat(\"'Timestamp'n <= '\", expireDate, \"'\");\ndeleteRows / table={name='AUDIT' caslib=targetCaslib, where=whereStr};\nrun;\ncodeStr=cat(\"data AUDIT(caslib=\", targetCaslib, \" append=yes);set \", tempTableName, \"(caslib=\", targetCaslib, \");run;\");\ndatastep.runCode / code=codeStr;\nrun;\ntable.save status=sc / name='AUDIT' caslib=targetCaslib replace=true table={ name='AUDIT' caslib=targetCaslib };\nrun;\ntable.dropTable name='AUDIT' caslib=targetCaslib;\nrun;\ntable.dropTable name=tempTableName caslib=targetCaslib;\nrun;",
"status_1": ""
},
"logLocation": "/files/files/4e5356eb-5b9e-45e4-bc11-7c865a4e14db"
}
{
"creationTimeStamp": "2022-04-07T20:00:02.338Z",
"modifiedTimeStamp": "2022-04-07T20:00:03.977Z",
"createdBy": "sas.audit",
"modifiedBy": "sas.audit",
"version": 4,
"id": "859ad72d-5fa2-470c-9d43-f7a65829ae5f",
"jobRequest": {
"version": 3,
"name": "Update CAS Audit data",
"jobDefinitionUri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"jobDefinition": {
"creationTimeStamp": "2022-04-06T22:08:06.127Z",
"modifiedTimeStamp": "2022-04-06T22:08:06.131Z",
"createdBy": "sas.audit",
"modifiedBy": "sas.audit",
"version": 2,
"id": "7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"name": "CAS Audit table update",
"description": "After upload of new Audit data into a temporary CAS table, this job appends the new data to the existing Audit data.",
"type": "casl",
"parameters": [
{
"version": 1,
"name": "%VAR-expireDate",
"type": "CHARACTER",
"required": true
},
{
"version": 1,
"name": "%VAR-tempTableName",
"type": "CHARACTER",
"required": true
},
{
"version": 1,
"name": "%VAR-targetCaslib",
"type": "CHARACTER",
"required": true
},
{
"version": 1,
"name": "serverId",
"defaultValue": "cas-shared-default",
"type": "CHARACTER",
"required": false
}
],
"code": "whereStr=cat(\"'Timestamp'n <= '\", expireDate, \"'\");\ndeleteRows / table={name='AUDIT' caslib=targetCaslib, where=whereStr};\nrun;\ncodeStr=cat(\"data AUDIT(caslib=\", targetCaslib, \" append=yes);set \", tempTableName, \"(caslib=\", targetCaslib, \");run;\");\ndatastep.runCode / code=codeStr;\nrun;\ntable.save status=sc / name='AUDIT' caslib=targetCaslib replace=true table={ name='AUDIT' caslib=targetCaslib };\nrun;\ntable.dropTable name='AUDIT' caslib=targetCaslib;\nrun;\ntable.dropTable name=tempTableName caslib=targetCaslib;\nrun;",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.job.definition"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"type": "application/vnd.sas.job.definition",
"responseType": "application/vnd.sas.job.definition"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",
"uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309"
}
],
"properties": []
},
"arguments": {
"%VAR-expireDate": "2022-03-31T20:00:01.000Z",
"%VAR-targetCaslib": "SystemData",
"%VAR-tempTableName": "audit_2992476099",
"serverId": "cas-shared-default"
},
"properties": [],
"createdByApplication": "jobExecution"
},
"state": "completed",
"endTimeStamp": "2022-04-07T20:00:03.975Z",
"heartbeatTimeStamp": "2022-04-07T20:00:02.431Z",
"submittedByApplication": "audit-service",
"heartbeatInterval": 300,
"elapsedTime": 1637,
"results": {
"debuginfo_1": "",
"severity_1": "normal",
"statusCode_1": "0",
"reason_1": "ok",
"executedCode": "expireDate=\"2022-03-31T20:00:01Z\";\ntempTableName=\"audit_2992476099\";\ntargetCaslib=\"SystemData\";\nwhereStr=cat(\"'Timestamp'n <= '\", expireDate, \"'\");\ndeleteRows / table={name='AUDIT' caslib=targetCaslib, where=whereStr};\nrun;\ncodeStr=cat(\"data AUDIT(caslib=\", targetCaslib, \" append=yes);set \", tempTableName, \"(caslib=\", targetCaslib, \");run;\");\ndatastep.runCode / code=codeStr;\nrun;\ntable.save status=sc / name='AUDIT' caslib=targetCaslib replace=true table={ name='AUDIT' caslib=targetCaslib };\nrun;\ntable.dropTable name='AUDIT' caslib=targetCaslib;\nrun;\ntable.dropTable name=tempTableName caslib=targetCaslib;\nrun;",
"status_1": ""
},
"logLocation": "/files/files/4e5356eb-5b9e-45e4-bc11-7c865a4e14db"
}
This is an example of a BAD REQUEST response for the
PUT
of a specific job.
{
"errorCode": 0,
"message": "Job with ID: 859ad72d-5fa2-470c-9d43-f7a65829ae5fx does not match passed in ID: 859ad72d-5fa2-470c-9d43-f7a65829ae5f.",
"details": [
"traceId: 9a815587dd2fe13a",
"path: /jobExecution/jobs/859ad72d-5fa2-470c-9d43-f7a65829ae5f"
],
"links": [],
"version": 2,
"httpStatusCode": 400
}
{
"errorCode": 0,
"message": "Job with ID: 859ad72d-5fa2-470c-9d43-f7a65829ae5fx does not match passed in ID: 859ad72d-5fa2-470c-9d43-f7a65829ae5f.",
"details": [
"traceId: 9a815587dd2fe13a",
"path: /jobExecution/jobs/859ad72d-5fa2-470c-9d43-f7a65829ae5f"
],
"links": [],
"version": 2,
"httpStatusCode": 400
}
This is an example of a NOT FOUND response for the
PUT
of a specific job.
{
"errorCode": 0,
"message": "Job not found with ID: 859ad72d-5fa2-470c-9d43-f7a65829ae5fx.",
"details": [
"traceId: a2e53b8f0f5a028d",
"path: /jobExecution/jobs/859ad72d-5fa2-470c-9d43-f7a65829ae5fx"
],
"links": [],
"version": 2,
"httpStatusCode": 404
}
{
"errorCode": 0,
"message": "Job not found with ID: 859ad72d-5fa2-470c-9d43-f7a65829ae5fx.",
"details": [
"traceId: a2e53b8f0f5a028d",
"path: /jobExecution/jobs/859ad72d-5fa2-470c-9d43-f7a65829ae5fx"
],
"links": [],
"version": 2,
"httpStatusCode": 404
}
This is an example of a METHOD NOT FOUND response for the
PUT
of a specific job.
{
"errorCode": 31501,
"message": "The job 859ad72d-5fa2-470c-9d43-f7a65829ae5f has already finished and can no longer be updated.",
"details": [
"traceId: d2cde67e40af8178",
"path: /jobExecution/jobs/859ad72d-5fa2-470c-9d43-f7a65829ae5f"
],
"links": [],
"version": 2,
"httpStatusCode": 405
}
{
"errorCode": 31501,
"message": "The job 859ad72d-5fa2-470c-9d43-f7a65829ae5f has already finished and can no longer be updated.",
"details": [
"traceId: d2cde67e40af8178",
"path: /jobExecution/jobs/859ad72d-5fa2-470c-9d43-f7a65829ae5f"
],
"links": [],
"version": 2,
"httpStatusCode": 405
}
This is an example of a PRECONDITION FAILED response for the
PUT
of a specific job.
{
"errorCode": 1013,
"message": "The values for the request header field \"If-Match\" (\"l1pfbamhx\") and the resource's entity tag (\"l1pfbamh\") are not the same.",
"details": [
"traceId: 76005450033a2c11",
"path: /jobExecution/jobs/859ad72d-5fa2-470c-9d43-f7a65829ae5f"
],
"remediation": "Get the latest representation of the resource and apply the desired changes. Retry the operation with the modified representation and the entity tag from the response header field \"ETag\".",
"links": [],
"version": 2,
"httpStatusCode": 412
}
This is an example of an UNSUPPORTED MEDIA TYPE response for the
PUT
of a specific job.
{
"errorCode": 0,
"message": "The value (text/plain) for the request header field \"Content-Type\" does not specify a supported media type.",
"details": [
"traceId: d8c87bb382d349a1",
"path: /jobExecution/jobs/859ad72d-5fa2-470c-9d43-f7a65829ae5f"
],
"remediation": "For the request header field \"Content-Type\", specify one of the following media types: \"application/vnd.sas.job.execution.job+json\", \"application/json\".",
"links": [],
"version": 2,
"httpStatusCode": 415
}
{
"errorCode": 0,
"message": "The value (text/plain) for the request header field \"Content-Type\" does not specify a supported media type.",
"details": [
"traceId: d8c87bb382d349a1",
"path: /jobExecution/jobs/859ad72d-5fa2-470c-9d43-f7a65829ae5f"
],
"remediation": "For the request header field \"Content-Type\", specify one of the following media types: \"application/vnd.sas.job.execution.job+json\", \"application/json\".",
"links": [],
"version": 2,
"httpStatusCode": 415
}
This is an example of a PRECONDITION REQUIRED response for the
PUT
of a specific job.
{
"errorCode": 1010,
"message": "One of the following request header fields is required: \"If-Match\" or \"If-Unmodified-Since\".",
"details": [
"traceId: 62d43e87dbebbc7c",
"path: /jobExecution/jobs/859ad72d-5fa2-470c-9d43-f7a65829ae5f"
],
"remediation": "In the request header, include one of the following values: the resource's entity tag for the field \"If-Match\" or the resource's last-modified timestamp for the field \"If-Unmodified-Since\".",
"links": [],
"version": 2,
"httpStatusCode": 428
}
{
"errorCode": 1010,
"message": "One of the following request header fields is required: \"If-Match\" or \"If-Unmodified-Since\".",
"details": [
"traceId: 62d43e87dbebbc7c",
"path: /jobExecution/jobs/859ad72d-5fa2-470c-9d43-f7a65829ae5f"
],
"remediation": "In the request header, include one of the following values: the resource's entity tag for the field \"If-Match\" or the resource's last-modified timestamp for the field \"If-Unmodified-Since\".",
"links": [],
"version": 2,
"httpStatusCode": 428
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. The job updated successfully. | job |
400 | Bad Request | The request was not valid. This occurs when the user provides an ID in the request that does not match the ID in the path of the URL. | error2 |
404 | Not Found | No job exists at the requested path. | error2 |
405 | Method Not Allowed | The request could not be completed due to a conflict with the current state of the resource. The job has already completed and can no longer be updated (error code 31501). | error2 |
412 | Precondition Failed | The If-Match request header did not match the resource's entity tag or the If-Unmodified-Since request header was earlier than the resource's last modified timestamp. |
error2 |
415 | Unsupported Media Type | The requested media type is not supported. | error2 |
428 | Precondition Required | The request was missing a If-Match or If-Unmodified-Since header. |
error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | The entity tag for the job. | |
200 | Last-Modified | string | The timestamp for the job request that indicates when it was last modified. It uses the format EEE, dd MMM yyyy HH:mm:ss GMT . |
Delete a job
Code samples
# You can also use wget
curl -X DELETE http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.error+json' \
-H 'Delegate-Domain: string'
const headers = {
'Accept':'application/vnd.sas.error+json',
'Delegate-Domain':'string'
};
fetch('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.error+json',
'Delegate-Domain': 'string'
}
r = requests.delete('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.error+json"},
"Delegate-Domain": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /jobs/{jobId}
Deletes the job, if the job is no longer required. If the Job Request (application/vnd.sas.job.execution.job.request) is submitted without an "expiresAfter" setting, it is the client's responsibility to delete the job from the system when it is no longer needed. If the job's logLocation is present, a delete request is issued to the log as well. The only exception is if the log is stored in files service and its parentUri points to a resource other than this job.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
jobId | path | string | true | The ID of the job. |
Delegate-Domain | header | string | false | Name of a credential domain of type OAuth2.0. The credential secret is retrieved to impersonate a group-managed service account for the current request. |
Detailed descriptions
Delegate-Domain: Name of a credential domain of type OAuth2.0. The credential secret is retrieved to impersonate a group-managed service account for the current request.
Example responses
This is an example of a NOT FOUND response for the DELETE of a specific job.
{
"errorCode": 0,
"message": "Job not found with ID: 41e44582-e556-448e-95a0-5340d94ce55ex.",
"details": [
"traceId: 5207de02ddac30de",
"path: /jobExecution/jobs/41e44582-e556-448e-95a0-5340d94ce55ex"
],
"links": [],
"version": 2,
"httpStatusCode": 404
}
{
"errorCode": 0,
"message": "Job not found with ID: 41e44582-e556-448e-95a0-5340d94ce55ex.",
"details": [
"traceId: 5207de02ddac30de",
"path: /jobExecution/jobs/41e44582-e556-448e-95a0-5340d94ce55ex"
],
"links": [],
"version": 2,
"httpStatusCode": 404
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | The job was deleted. | None |
404 | Not Found | No job exists at the requested path. | error2 |
Get the state of the job
Code samples
# You can also use wget
curl -X GET http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}/state \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: text/plain'
const headers = {
'Accept':'text/plain'
};
fetch('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}/state',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'text/plain'
}
r = requests.get('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}/state', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"text/plain"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}/state", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /jobs/{jobId}/state
Returns the following states: pending, running, canceled, completed, or failed.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
jobId | path | string | true | The ID of the job. |
Example responses
200 Response
"completed"
404 Response
"ErrorResponse[version=2,status=404,err=0,id=<null>,message=Job not found with ID: 859ad72d-5fa2-470c-9d43-f7a65829ae5xf.,detail=[traceId: e07db28a5fbe58e0, path: /jobExecution/jobs/859ad72d-5fa2-470c-9d43-f7a65829ae5xf/state],remediation=<null>,targetUri=<null>,errors=<null>,links=[]]"
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | string |
404 | Not Found | No job exists at the requested path. | string |
Check whether the job state exists
Code samples
# You can also use wget
curl -X HEAD http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}/state
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}/state',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}/state')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}/state", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /jobs/{jobId}/state
Returns the header information for the job state that the corresponding GET
returns.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
jobId | path | string | true | The ID of the job. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
404 | Not Found | No job exists at the requested path. | None |
Update the state of the job
Code samples
# You can also use wget
curl -X PUT http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}/state \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: text/plain' \
-H 'Accept: text/plain'
const inputBody = 'string';
const headers = {
'Content-Type':'text/plain',
'Accept':'text/plain'
};
fetch('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}/state',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'text/plain',
'Accept': 'text/plain'
}
r = requests.put('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}/state', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"text/plain"},
"Accept": []string{"text/plain"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}/state", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /jobs/{jobId}/state
Updates the state of the current job. The new state must be set as either the value-query parameter or in the body of the request. The value-query parameter takes precedence if both are specified. If neither is specified, a 400 bad request error response is returned (error code 31505).
Body parameter
string
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
jobId | path | string | true | The ID of the job. |
value | query | string | false | The value of the state. If this value and the body specify a state, then this value takes precedence. |
body | body | string | false | The new value of the state. |
Example responses
400 Response
"ErrorResponse[version=2,status=400,err=31506,id=<null>,message=Unknown job state: completedxxx.,detail=[traceId: 57a10d5ac37e77c6, path: /jobExecution/jobs/3b8f6385-9aa8-4039-8036-e31392b5cb82/state],remediation=<null>,targetUri=<null>,errors=<null>,links=[]]"
404 Response
"ErrorResponse[version=2,status=404,err=0,id=<null>,message=Job not found with ID: 3b8f6385-9aa8-4039-8036-e31392b5cb82xx.,detail=[traceId: c89d154a48a2e541, path: /jobExecution/jobs/3b8f6385-9aa8-4039-8036-e31392b5cb82xx/state],remediation=<null>,targetUri=<null>,errors=<null>,links=[]]"
405 Response
"ErrorResponse[version=2,status=405,err=31501,id=<null>,message=The job 859ad72d-5fa2-470c-9d43-f7a65829ae5f has already finished, and can no longer be updated.,detail=[traceId: defd90e131729576, path: /jobExecution/jobs/859ad72d-5fa2-470c-9d43-f7a65829ae5f/state],remediation=<null>,targetUri=<null>,errors=<null>,links=[]]"
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
400 | Bad Request | The request was not valid. An invalid request occurs in the following scenarios:
|
string |
404 | Not Found | No job exists at the requested path. | string |
405 | Method Not Allowed | The request could not be completed due to a conflict with the current state of the resource. The job has already completed and can no longer be updated (error code 31501). | string |
Get the heartbeat timestamp
Code samples
# You can also use wget
curl -X GET http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}/heartbeatTimeStamp \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: text/plain'
const headers = {
'Accept':'text/plain'
};
fetch('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}/heartbeatTimeStamp',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'text/plain'
}
r = requests.get('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}/heartbeatTimeStamp', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"text/plain"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}/heartbeatTimeStamp", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /jobs/{jobId}/heartbeatTimeStamp
Returns a timestamp that represents the last received heartbeat update of the job. It uses the format yyyy-MM-ddTHH:mm:ss.SSSZ.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
jobId | path | string | true | The ID of the job. |
Example responses
200 Response
"2022-04-07T23:59:31.570Z"
404 Response
"ErrorResponse[version=2,status=404,err=0,id=<null>,message=Job not found with ID: 3b8f6385-9aa8-4039-8036-e31392b5cb82x.,detail=[traceId: daecb3ac58b0ba60, path: /jobExecution/jobs/3b8f6385-9aa8-4039-8036-e31392b5cb82x/heartbeatTimeStamp],remediation=<null>,targetUri=<null>,errors=<null>,links=[]]"
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | string |
204 | No Content | The heartbeatTimeStamp has not been set yet. | None |
404 | Not Found | No job exists at the requested path. | string |
Check whether the heartbeat timestamp exists
Code samples
# You can also use wget
curl -X HEAD http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}/heartbeatTimeStamp
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}/heartbeatTimeStamp',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}/heartbeatTimeStamp')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}/heartbeatTimeStamp", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /jobs/{jobId}/heartbeatTimeStamp
Returns the header information for the heartbeat timestamp job.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
jobId | path | string | true | The ID of the job. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
204 | No Content | The heartbeatTimeStamp has not been set yet. |
None |
404 | Not Found | No job exists at the requested path. | None |
Set the heartbeat timestamp
Code samples
# You can also use wget
curl -X POST http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}/heartbeatTimeStamp \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: text/plain'
const headers = {
'Accept':'text/plain'
};
fetch('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}/heartbeatTimeStamp',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'text/plain'
}
r = requests.post('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}/heartbeatTimeStamp', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"text/plain"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}/heartbeatTimeStamp", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /jobs/{jobId}/heartbeatTimeStamp
Updates the job's heartbeat timestamp. The heartbeat timestamp value is updated when the API receives this request. The body of this request should be empty, and it is ignored if provided.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
jobId | path | string | true | The ID of the job. |
Example responses
200 Response
"2022-04-08T13:08:05.867Z"
404 Response
"ErrorResponse[version=2,status=404,err=0,id=<null>,message=Job not found with ID: fb4e1369-544c-47ca-bd70-10d892795d71x.,detail=[traceId: b1f1c435561d114c, path: /jobExecution/jobs/fb4e1369-544c-47ca-bd70-10d892795d71x/heartbeatTimeStamp],remediation=<null>,targetUri=<null>,errors=<null>,links=[]]"
405 Response
"ErrorResponse[version=2,status=405,err=31501,id=<null>,message=The job fb4e1369-544c-47ca-bd70-10d892795d71 has already finished, and can no longer be updated.,detail=[traceId: 9e727b7bd2b84038, path: /jobExecution/jobs/fb4e1369-544c-47ca-bd70-10d892795d71/heartbeatTimeStamp],remediation=<null>,targetUri=<null>,errors=<null>,links=[]]"
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | string |
404 | Not Found | No job exists at the requested path. | string |
405 | Method Not Allowed | The job has already completed and can no longer be updated. | string |
Get the expiration timestamp
Code samples
# You can also use wget
curl -X GET http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}/expirationTimeStamp \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: text/plain'
const headers = {
'Accept':'text/plain'
};
fetch('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}/expirationTimeStamp',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'text/plain'
}
r = requests.get('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}/expirationTimeStamp', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"text/plain"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}/expirationTimeStamp", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /jobs/{jobId}/expirationTimeStamp
Retrieves the expiration timestamp as a data string the format yyyy-MM-ddTHH:mm:ss.SSSZ. The timestamp indicates when this job expired and was deleted.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
jobId | path | string | true | The ID of the job. |
Example responses
200 Response
"2022-04-07T23:59:31.570Z"
204 Response
"string"
404 Response
"ErrorResponse[version=2,status=404,err=0,id=<null>,message=Job not found with ID: 3b8f6385-9aa8-4039-8036-xe31392b5cb82.,detail=[traceId: 728582bc607955b8, path: /jobExecution/jobs/3b8f6385-9aa8-4039-8036-xe31392b5cb82/expirationTimeStamp],remediation=<null>,targetUri=<null>,errors=<null>,links=[]]"
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | string |
204 | No Content | The expiration timestamp is not set. | string |
404 | Not Found | No job exists at the requested path. | string |
Get the headers for the job-expiration timestamp
Code samples
# You can also use wget
curl -X HEAD http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}/expirationTimeStamp
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}/expirationTimeStamp',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}/expirationTimeStamp')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}/expirationTimeStamp", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /jobs/{jobId}/expirationTimeStamp
Returns the header information for the job-expiration timestamp.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
jobId | path | string | true | The ID of the job. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
204 | No Content | The expiration timestamp is not set. | None |
404 | Not Found | No job exists at the requested path. | None |
Set the expiration timestamp
Code samples
# You can also use wget
curl -X PUT http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}/expirationTimeStamp \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: text/plain'
const headers = {
'Accept':'text/plain'
};
fetch('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}/expirationTimeStamp',
{
method: 'PUT',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'text/plain'
}
r = requests.put('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}/expirationTimeStamp', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"text/plain"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobs/{jobId}/expirationTimeStamp", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /jobs/{jobId}/expirationTimeStamp
Updates the job's expiration timestamp with a data string in the format yyyy-MM-ddTHH:mm:ss.SSSZ. To clear the expiration timestamp, provide an empty value for the value-query parameter. The body of this request must be empty. Until the job has completed, this operation returns a 409 conflict with an error code of 31503.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
jobId | path | string | true | The ID of the job. |
value | query | string | false | The expiration timestamp in the format yyyy-MM-ddTHH:mm:ss.SSSZ. To clear the expirationTimeStamp, leave this field empty. |
Example responses
200 Response
"2023-04-07T23:59:31.570Z"
400 Response
"ErrorResponse[version=2,status=400,err=31504,id=<null>,message=The provided expiration timestamp 23-04-07T23:59:31.570Z is not a valid timestamp: java.time.format.DateTimeParseException: Text '23-04-07T23:59:31.570Z' could not be parsed at index 0,detail=[traceId: 53cad1cfd8cc447e, path: /jobExecution/jobs/3b8f6385-9aa8-4039-8036-e31392b5cb82/expirationTimeStamp],remediation=<null>,targetUri=<null>,errors=<null>,links=[]]"
404 Response
"ErrorResponse[version=2,status=404,err=0,id=<null>,message=Job not found with ID: 3b8f6385-9aa8-4039-8036-xe31392b5cb82.,detail=[traceId: f01a14543f874a34, path: /jobExecution/jobs/3b8f6385-9aa8-4039-8036-xe31392b5cb82/expirationTimeStamp],remediation=<null>,targetUri=<null>,errors=<null>,links=[]]"
409 Response
"ErrorResponse[version=2,status=409,err=31503,id=<null>,message=The expiration timestamp of job 9b346923-4771-4be7-bc6b-5e4e9c18c9e9 cannot be set until the job has finished.,detail=[traceId: 63fcebb08d236b65, path: /jobExecution/jobs/9b346923-4771-4be7-bc6b-5e4e9c18c9e9/expirationTimeStamp],remediation=<null>,targetUri=<null>,errors=<null>,links=[]]"
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. The timestamp is returned in a string format of yyyy-MM-ddTHH:mm:ss.SSSZ. | string |
204 | No Content | The expiration timestamp is not set. | None |
400 | Bad Request | The request was not valid. The request included a timestamp that was not in the format yyyy-MM-ddTHH:mm:ss.SSSZ (error code 31504). | string |
404 | Not Found | No job exists at the requested path. | string |
409 | Conflict | The request could not be completed due to a conflict with the current state of the resource. The job has not yet completed and the expiration timestamp cannot be set (error code 31503). | string |
JobRequests
Contains the operations for the Job Requests resource.
Get a list of job requests
Code samples
# You can also use wget
curl -X GET http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.get('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.collection+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /jobRequests
Returns a collection of application/vnd.sas.job.execution.job.request resources. Standard paging, filtering, and sorting options are specified in the Parameters section.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
start | query | integer | false | The starting index of the first job request in a page. The default is 0 (zero). |
limit | query | integer | false | The maximum number of job requests to return in this page of results. The actual number of returned job requests might be less if the collection has been exhausted. The default is 10. |
filter | query | string(filter-criteria) | false | The criteria for filtering the returned job requests. The supported functions are: and, or, not, eq, lt, le, gt, ge, contains, startsWith, endsWith, and isNull. The following queries are examples:
|
sortBy | query | string(sort-criteria) | false | Specifies how to sort the returned job requests. The sort criteria supports all job requests in either ascending or descending order except for jobDefinition, links, or version. The following sorts are examples:
|
Example responses
This is an example of using
GET
to return job requests.
{
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/jobExecution/jobRequests",
"uri": "/jobExecution/jobRequests",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.job.request"
},
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobRequests?sortBy=name:ascending&start=0&limit=10",
"uri": "/jobExecution/jobRequests?sortBy=name:ascending&start=0&limit=10",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.job.request"
},
{
"method": "GET",
"rel": "next",
"href": "/jobExecution/jobRequests?sortBy=name:ascending&start=10&limit=10",
"uri": "/jobExecution/jobRequests?sortBy=name:ascending&start=10&limit=10",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.job.request"
},
{
"method": "GET",
"rel": "up",
"href": "/jobExecution",
"uri": "/jobExecution",
"type": "application/vnd.sas.api"
},
{
"method": "POST",
"rel": "createJobRequest",
"href": "/jobExecution/jobRequests",
"uri": "/jobExecution/jobRequests",
"type": "application/vnd.sas.job.execution.job.request"
},
{
"method": "POST",
"rel": "import",
"href": "/jobExecution/jobRequests",
"uri": "/jobExecution/jobRequests",
"type": "application/vnd.sas.transfer.object",
"responseType": "application/vnd.sas.summary"
}
],
"name": "jobRequests",
"accept": "application/vnd.sas.job.execution.job.request",
"start": 0,
"count": 2,
"items": [
{
"creationTimeStamp": "2022-04-06T22:09:12.929Z",
"modifiedTimeStamp": "2022-04-06T22:09:12.929Z",
"createdBy": "sas.catalog",
"modifiedBy": "sas.catalog",
"version": 3,
"id": "fe697677-15a8-4d33-807c-6c34b743bb8b",
"name": "List Catalogs",
"jobDefinition": {
"creationTimeStamp": "1901-01-01T00:00:00.000Z",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"version": 1,
"name": "List Catalogs",
"type": "Compute",
"parameters": [],
"code": "%macro web_list_catalogs(library);\n\t%let library=%upcase(&library);\n proc sql ;\n create table work.catalogs as select memname as Catalog, memtype as \n Type, engine as Engine from sashelp.vmember where \n libname=\"&library\" and memtype=\"CATALOG\";\n run;\n title \"Catalogs in &library\";\n\n proc print data=work.catalogs;\n run;\n%mend;\n\n%web_list_catalogs(SASHELP);\n",
"properties": []
},
"arguments": {
"_contextName": "SAS Job Execution compute context"
},
"properties": [],
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b",
"uri": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b",
"type": "application/vnd.sas.job.execution.job.request"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b",
"uri": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b",
"type": "application/vnd.sas.summary"
},
{
"method": "GET",
"rel": "export",
"href": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b",
"uri": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b",
"type": "application/vnd.sas.transfer.object"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b",
"uri": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b",
"uri": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b",
"type": "application/vnd.sas.job.execution.job.request"
},
{
"method": "PUT",
"rel": "import",
"href": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b",
"uri": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b",
"type": "application/vnd.sas.transfer.object",
"responseType": "application/vnd.sas.summary"
},
{
"method": "GET",
"rel": "up",
"href": "/jobExecution/jobRequests",
"uri": "/jobExecution/jobRequests",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.job.request"
},
{
"method": "GET",
"rel": "jobs",
"href": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b/jobs",
"uri": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b/jobs",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.job"
},
{
"method": "POST",
"rel": "submitJob",
"href": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b/jobs",
"uri": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b/jobs",
"responseType": "application/vnd.sas.job.execution.job"
}
]
},
{
"creationTimeStamp": "2022-04-06T22:09:32.844Z",
"modifiedTimeStamp": "2022-04-06T22:09:32.844Z",
"createdBy": "sas.dataFlows",
"modifiedBy": "sas.dataFlows",
"version": 3,
"id": "1af4342a-41ef-4d70-bbfc-a2ef96687890",
"name": "Rebuild Catalog index \"dataflows\"",
"description": "Rebuild Information Catalog Index \"dataflows\"",
"jobDefinition": {
"creationTimeStamp": "1901-01-01T00:00:00.000Z",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"version": 0,
"name": "indexMaintenance",
"type": "CATALOG",
"parameters": [],
"code": "{\"index\":\"dataflows\"}",
"properties": []
},
"arguments": {},
"properties": [],
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobRequests/1af4342a-41ef-4d70-bbfc-a2ef96687890",
"uri": "/jobExecution/jobRequests/1af4342a-41ef-4d70-bbfc-a2ef96687890",
"type": "application/vnd.sas.job.execution.job.request"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobExecution/jobRequests/1af4342a-41ef-4d70-bbfc-a2ef96687890",
"uri": "/jobExecution/jobRequests/1af4342a-41ef-4d70-bbfc-a2ef96687890",
"type": "application/vnd.sas.summary"
},
{
"method": "GET",
"rel": "export",
"href": "/jobExecution/jobRequests/1af4342a-41ef-4d70-bbfc-a2ef96687890",
"uri": "/jobExecution/jobRequests/1af4342a-41ef-4d70-bbfc-a2ef96687890",
"type": "application/vnd.sas.transfer.object"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobExecution/jobRequests/1af4342a-41ef-4d70-bbfc-a2ef96687890",
"uri": "/jobExecution/jobRequests/1af4342a-41ef-4d70-bbfc-a2ef96687890"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobExecution/jobRequests/1af4342a-41ef-4d70-bbfc-a2ef96687890",
"uri": "/jobExecution/jobRequests/1af4342a-41ef-4d70-bbfc-a2ef96687890",
"type": "application/vnd.sas.job.execution.job.request"
},
{
"method": "PUT",
"rel": "import",
"href": "/jobExecution/jobRequests/1af4342a-41ef-4d70-bbfc-a2ef96687890",
"uri": "/jobExecution/jobRequests/1af4342a-41ef-4d70-bbfc-a2ef96687890",
"type": "application/vnd.sas.transfer.object",
"responseType": "application/vnd.sas.summary"
},
{
"method": "GET",
"rel": "up",
"href": "/jobExecution/jobRequests",
"uri": "/jobExecution/jobRequests",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.job.request"
},
{
"method": "GET",
"rel": "jobs",
"href": "/jobExecution/jobRequests/1af4342a-41ef-4d70-bbfc-a2ef96687890/jobs",
"uri": "/jobExecution/jobRequests/1af4342a-41ef-4d70-bbfc-a2ef96687890/jobs",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.job"
},
{
"method": "POST",
"rel": "submitJob",
"href": "/jobExecution/jobRequests/1af4342a-41ef-4d70-bbfc-a2ef96687890/jobs",
"uri": "/jobExecution/jobRequests/1af4342a-41ef-4d70-bbfc-a2ef96687890/jobs",
"responseType": "application/vnd.sas.job.execution.job"
}
]
}
],
"limit": 2,
"version": 2
}
{
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/jobExecution/jobRequests",
"uri": "/jobExecution/jobRequests",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.job.request"
},
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobRequests?sortBy=name:ascending&start=0&limit=10",
"uri": "/jobExecution/jobRequests?sortBy=name:ascending&start=0&limit=10",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.job.request"
},
{
"method": "GET",
"rel": "next",
"href": "/jobExecution/jobRequests?sortBy=name:ascending&start=10&limit=10",
"uri": "/jobExecution/jobRequests?sortBy=name:ascending&start=10&limit=10",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.job.request"
},
{
"method": "GET",
"rel": "up",
"href": "/jobExecution",
"uri": "/jobExecution",
"type": "application/vnd.sas.api"
},
{
"method": "POST",
"rel": "createJobRequest",
"href": "/jobExecution/jobRequests",
"uri": "/jobExecution/jobRequests",
"type": "application/vnd.sas.job.execution.job.request"
},
{
"method": "POST",
"rel": "import",
"href": "/jobExecution/jobRequests",
"uri": "/jobExecution/jobRequests",
"type": "application/vnd.sas.transfer.object",
"responseType": "application/vnd.sas.summary"
}
],
"name": "jobRequests",
"accept": "application/vnd.sas.job.execution.job.request",
"start": 0,
"count": 2,
"items": [
{
"creationTimeStamp": "2022-04-06T22:09:12.929Z",
"modifiedTimeStamp": "2022-04-06T22:09:12.929Z",
"createdBy": "sas.catalog",
"modifiedBy": "sas.catalog",
"version": 3,
"id": "fe697677-15a8-4d33-807c-6c34b743bb8b",
"name": "List Catalogs",
"jobDefinition": {
"creationTimeStamp": "1901-01-01T00:00:00.000Z",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"version": 1,
"name": "List Catalogs",
"type": "Compute",
"parameters": [],
"code": "%macro web_list_catalogs(library);\n\t%let library=%upcase(&library);\n proc sql ;\n create table work.catalogs as select memname as Catalog, memtype as \n Type, engine as Engine from sashelp.vmember where \n libname=\"&library\" and memtype=\"CATALOG\";\n run;\n title \"Catalogs in &library\";\n\n proc print data=work.catalogs;\n run;\n%mend;\n\n%web_list_catalogs(SASHELP);\n",
"properties": []
},
"arguments": {
"_contextName": "SAS Job Execution compute context"
},
"properties": [],
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b",
"uri": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b",
"type": "application/vnd.sas.job.execution.job.request"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b",
"uri": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b",
"type": "application/vnd.sas.summary"
},
{
"method": "GET",
"rel": "export",
"href": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b",
"uri": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b",
"type": "application/vnd.sas.transfer.object"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b",
"uri": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b",
"uri": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b",
"type": "application/vnd.sas.job.execution.job.request"
},
{
"method": "PUT",
"rel": "import",
"href": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b",
"uri": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b",
"type": "application/vnd.sas.transfer.object",
"responseType": "application/vnd.sas.summary"
},
{
"method": "GET",
"rel": "up",
"href": "/jobExecution/jobRequests",
"uri": "/jobExecution/jobRequests",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.job.request"
},
{
"method": "GET",
"rel": "jobs",
"href": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b/jobs",
"uri": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b/jobs",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.job"
},
{
"method": "POST",
"rel": "submitJob",
"href": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b/jobs",
"uri": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b/jobs",
"responseType": "application/vnd.sas.job.execution.job"
}
]
},
{
"creationTimeStamp": "2022-04-06T22:09:32.844Z",
"modifiedTimeStamp": "2022-04-06T22:09:32.844Z",
"createdBy": "sas.dataFlows",
"modifiedBy": "sas.dataFlows",
"version": 3,
"id": "1af4342a-41ef-4d70-bbfc-a2ef96687890",
"name": "Rebuild Catalog index \"dataflows\"",
"description": "Rebuild Information Catalog Index \"dataflows\"",
"jobDefinition": {
"creationTimeStamp": "1901-01-01T00:00:00.000Z",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"version": 0,
"name": "indexMaintenance",
"type": "CATALOG",
"parameters": [],
"code": "{\"index\":\"dataflows\"}",
"properties": []
},
"arguments": {},
"properties": [],
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobRequests/1af4342a-41ef-4d70-bbfc-a2ef96687890",
"uri": "/jobExecution/jobRequests/1af4342a-41ef-4d70-bbfc-a2ef96687890",
"type": "application/vnd.sas.job.execution.job.request"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobExecution/jobRequests/1af4342a-41ef-4d70-bbfc-a2ef96687890",
"uri": "/jobExecution/jobRequests/1af4342a-41ef-4d70-bbfc-a2ef96687890",
"type": "application/vnd.sas.summary"
},
{
"method": "GET",
"rel": "export",
"href": "/jobExecution/jobRequests/1af4342a-41ef-4d70-bbfc-a2ef96687890",
"uri": "/jobExecution/jobRequests/1af4342a-41ef-4d70-bbfc-a2ef96687890",
"type": "application/vnd.sas.transfer.object"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobExecution/jobRequests/1af4342a-41ef-4d70-bbfc-a2ef96687890",
"uri": "/jobExecution/jobRequests/1af4342a-41ef-4d70-bbfc-a2ef96687890"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobExecution/jobRequests/1af4342a-41ef-4d70-bbfc-a2ef96687890",
"uri": "/jobExecution/jobRequests/1af4342a-41ef-4d70-bbfc-a2ef96687890",
"type": "application/vnd.sas.job.execution.job.request"
},
{
"method": "PUT",
"rel": "import",
"href": "/jobExecution/jobRequests/1af4342a-41ef-4d70-bbfc-a2ef96687890",
"uri": "/jobExecution/jobRequests/1af4342a-41ef-4d70-bbfc-a2ef96687890",
"type": "application/vnd.sas.transfer.object",
"responseType": "application/vnd.sas.summary"
},
{
"method": "GET",
"rel": "up",
"href": "/jobExecution/jobRequests",
"uri": "/jobExecution/jobRequests",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.job.request"
},
{
"method": "GET",
"rel": "jobs",
"href": "/jobExecution/jobRequests/1af4342a-41ef-4d70-bbfc-a2ef96687890/jobs",
"uri": "/jobExecution/jobRequests/1af4342a-41ef-4d70-bbfc-a2ef96687890/jobs",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.job"
},
{
"method": "POST",
"rel": "submitJob",
"href": "/jobExecution/jobRequests/1af4342a-41ef-4d70-bbfc-a2ef96687890/jobs",
"uri": "/jobExecution/jobRequests/1af4342a-41ef-4d70-bbfc-a2ef96687890/jobs",
"responseType": "application/vnd.sas.job.execution.job"
}
]
}
],
"limit": 2,
"version": 2
}
This is an example of a Bad Request response to a
GET
job requests.
{
"errorCode": 1125,
"message": "The start parameter must be greater or equal to zero.",
"details": [
"traceId: 53998af1d9abfeab",
"path: /jobExecution/jobRequests"
],
"links": [],
"version": 2,
"httpStatusCode": 400
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. The job requests (if any) are returned in a resource collection. | jobRequestCollection |
400 | Bad Request | The request was not valid. An invalid request occurs in the following scenarios:
|
error2 |
Create a job request
Code samples
# You can also use wget
curl -X POST http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.job.execution.job.request+json' \
-H 'Accept: application/vnd.sas.job.execution.job.request+json'
const inputBody = '{
"name": "sashelp class distribution",
"description": "ods output with age 14 cutoff",
"jobDefinitionUri": "/jobDefinitions/definitions/dabd2a63-ae2f-4559-b110-ad989ff642a5",
"arguments": {
"AGE": "14"
},
"createdByApplication": "jobrequestui"
}';
const headers = {
'Content-Type':'application/vnd.sas.job.execution.job.request+json',
'Accept':'application/vnd.sas.job.execution.job.request+json'
};
fetch('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.job.execution.job.request+json',
'Accept': 'application/vnd.sas.job.execution.job.request+json'
}
r = requests.post('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.job.execution.job.request+json"},
"Accept": []string{"application/vnd.sas.job.execution.job.request+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /jobRequests
Creates a new job request.
If the Job Request is submitted without an "expiresAfter" setting, it is the client's responsibility to delete the job from the system when it is no longer needed. A delete request can be issued using the job's "delete" link.
Body parameter
This is an example body to create a job request.
{
"name": "sashelp class distribution",
"description": "ods output with age 14 cutoff",
"jobDefinitionUri": "/jobDefinitions/definitions/dabd2a63-ae2f-4559-b110-ad989ff642a5",
"arguments": {
"AGE": "14"
},
"createdByApplication": "jobrequestui"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
parentFolderUri | query | string | false | The URI of the parent folder in which to save the job request. |
body | body | jobRequest | true | The job request to be created. |
Example responses
This is an example response when using
POST
to create a job request.
{
"creationTimeStamp": "2018-03-12T19:37:28.318Z",
"modifiedTimeStamp": "2018-03-12T19:37:28.318Z",
"createdBy": "user1",
"modifiedBy": "user1",
"version": 3,
"id": "f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
"name": "sashelp class distribution",
"description": "ods output with age 14 cutoff",
"jobDefinitionUri": "/jobDefinitions/definitions/dabd2a63-ae2f-4559-b110-ad989ff642a5",
"arguments": {
"AGE": "14",
"_contextName": "SAS Job Execution compute context"
},
"properties": [],
"createdByApplication": "jobrequestui",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
"uri": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
"type": "application/vnd.sas.job.execution.job.request"
},
{
"method": "GET",
"rel": "export",
"href": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
"uri": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
"type": "application/vnd.sas.transfer.object"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
"uri": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
"uri": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
"type": "application/vnd.sas.job.execution.job.request"
},
{
"method": "PUT",
"rel": "import",
"href": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
"uri": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
"type": "application/vnd.sas.transfer.object",
"responseType": "application/vnd.sas.summary"
},
{
"method": "GET",
"rel": "up",
"href": "/jobExecution/jobRequests",
"uri": "/jobExecution/jobRequests",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.job.request"
},
{
"method": "GET",
"rel": "jobs",
"href": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b/jobs",
"uri": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b/jobs",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.job"
},
{
"method": "POST",
"rel": "submitJob",
"href": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b/jobs",
"uri": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b/jobs",
"responseType": "application/vnd.sas.job.execution.job"
}
]
}
{
"creationTimeStamp": "2018-03-12T19:37:28.318Z",
"modifiedTimeStamp": "2018-03-12T19:37:28.318Z",
"createdBy": "user1",
"modifiedBy": "user1",
"version": 3,
"id": "f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
"name": "sashelp class distribution",
"description": "ods output with age 14 cutoff",
"jobDefinitionUri": "/jobDefinitions/definitions/dabd2a63-ae2f-4559-b110-ad989ff642a5",
"arguments": {
"AGE": "14",
"_contextName": "SAS Job Execution compute context"
},
"properties": [],
"createdByApplication": "jobrequestui",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
"uri": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
"type": "application/vnd.sas.job.execution.job.request"
},
{
"method": "GET",
"rel": "export",
"href": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
"uri": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
"type": "application/vnd.sas.transfer.object"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
"uri": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
"uri": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
"type": "application/vnd.sas.job.execution.job.request"
},
{
"method": "PUT",
"rel": "import",
"href": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
"uri": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
"type": "application/vnd.sas.transfer.object",
"responseType": "application/vnd.sas.summary"
},
{
"method": "GET",
"rel": "up",
"href": "/jobExecution/jobRequests",
"uri": "/jobExecution/jobRequests",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.job.request"
},
{
"method": "GET",
"rel": "jobs",
"href": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b/jobs",
"uri": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b/jobs",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.job"
},
{
"method": "POST",
"rel": "submitJob",
"href": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b/jobs",
"uri": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b/jobs",
"responseType": "application/vnd.sas.job.execution.job"
}
]
}
This is an example of a Bad Request response to a
POST
to submit job request. In this example, the definition is missing.
{
"errorCode": 0,
"message": "Either a job definition ID or an embedded job definition is required in a job request.",
"details": [
"traceId: 940cc9a4b023973d",
"path: /jobExecution/jobRequests"
],
"links": [],
"version": 2,
"httpStatusCode": 400
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | The job request was created. | jobRequest |
400 | Bad Request | The request was not valid. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Location | string | Provides the URI of the newly created job request. | |
201 | ETag | string | The entity tag for the job request. | |
201 | Last-Modified | string | The timestamp for the job request that indicates when it was last modified. It uses the format EEE, dd MMM yyyy HH:mm:ss GMT . |
Get a job request summary
Code samples
# You can also use wget
curl -X GET http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests/{jobRequestId}#resourceSummary \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.summary+json' \
-H 'Delegate-Domain: string'
const headers = {
'Accept':'application/vnd.sas.summary+json',
'Delegate-Domain':'string'
};
fetch('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests/{jobRequestId}#resourceSummary',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.summary+json',
'Delegate-Domain': 'string'
}
r = requests.get('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests/{jobRequestId}#resourceSummary', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.summary+json"},
"Delegate-Domain": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests/{jobRequestId}#resourceSummary", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /jobRequests/{jobRequestId}
Returns the summary representation about a single job request based on its unique ID.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
jobRequestId | path | string | true | The ID of the job request. |
Delegate-Domain | header | string | false | Name of a credential domain of type OAuth2.0. The credential secret is retrieved to impersonate a group-managed service account for the current request. |
Detailed descriptions
Delegate-Domain: Name of a credential domain of type OAuth2.0. The credential secret is retrieved to impersonate a group-managed service account for the current request.
Example responses
This is an example response when using
GET
to obtain the job request as a resource summary.
{
"creationTimeStamp": "2022-04-06T22:09:12.929Z",
"modifiedTimeStamp": "2022-04-06T22:09:12.929Z",
"createdBy": "sas.catalog",
"modifiedBy": "sas.catalog",
"id": "fe697677-15a8-4d33-807c-6c34b743bb8b",
"type": "jobRequest",
"name": "Load metadata into the Information Catalog",
"description": "Load metadata for supported SAS content",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b",
"uri": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b",
"type": "application/vnd.sas.job.execution.job.request"
}
],
"version": 2
}
This is an example of a NOT FOUND response for the
GET
of a specific job request.
{
"errorCode": 0,
"message": "Job request not found with ID: fe697677-15a8-4d33-807c-6c34b743bb8bx",
"details": [
"traceId: c20b38c5cc2d06af",
"path: /jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8bx"
],
"links": [],
"version": 2,
"httpStatusCode": 404
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | resourceSummary |
404 | Not Found | No job request exists at the requested path. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | The entity tag for the job request. | |
200 | Last-Modified | string | The timestamp for the job request that indicates when it was last modified. It uses the format EEE, dd MMM yyyy HH:mm:ss GMT . |
Check whether the job-request summary exists
Code samples
# You can also use wget
curl -X HEAD http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests/{jobRequestId}#resourceSummary \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Delegate-Domain: string'
const headers = {
'Delegate-Domain':'string'
};
fetch('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests/{jobRequestId}#resourceSummary',
{
method: 'HEAD',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Delegate-Domain': 'string'
}
r = requests.head('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests/{jobRequestId}#resourceSummary', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Delegate-Domain": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests/{jobRequestId}#resourceSummary", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /jobRequests/{jobRequestId}
Returns the header information for the job-request summary.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
jobRequestId | path | string | true | The ID of the job request. |
Delegate-Domain | header | string | false | Name of a credential domain of type OAuth2.0. The credential secret is retrieved to impersonate a group-managed service account for the current request. |
Detailed descriptions
Delegate-Domain: Name of a credential domain of type OAuth2.0. The credential secret is retrieved to impersonate a group-managed service account for the current request.
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
404 | Not Found | No job request exists at the requested path. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | The entity tag for the job request. | |
200 | Last-Modified | string | The timestamp for the job request that indicates when it was last modified. It uses the format EEE, dd MMM yyyy HH:mm:ss GMT . |
Get a job request
Code samples
# You can also use wget
curl -X GET http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests/{jobRequestId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.job.execution.job.request+json' \
-H 'Delegate-Domain: string'
const headers = {
'Accept':'application/vnd.sas.job.execution.job.request+json',
'Delegate-Domain':'string'
};
fetch('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests/{jobRequestId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.job.execution.job.request+json',
'Delegate-Domain': 'string'
}
r = requests.get('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests/{jobRequestId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.job.execution.job.request+json"},
"Delegate-Domain": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests/{jobRequestId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /jobRequests/{jobRequestId}
Returns information about a single job request based on its unique ID.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
jobRequestId | path | string | true | The ID of the job request. |
Delegate-Domain | header | string | false | Name of a credential domain of type OAuth2.0. The credential secret is retrieved to impersonate a group-managed service account for the current request. |
Detailed descriptions
Delegate-Domain: Name of a credential domain of type OAuth2.0. The credential secret is retrieved to impersonate a group-managed service account for the current request.
Example responses
This is an example response when using
GET
to obtain a job request.
{
"creationTimeStamp": "2022-04-06T22:09:12.929Z",
"modifiedTimeStamp": "2022-04-06T22:09:12.929Z",
"createdBy": "sas.catalog",
"modifiedBy": "sas.catalog",
"version": 3,
"id": "fe697677-15a8-4d33-807c-6c34b743bb8b",
"name": "List Catalogs",
"jobDefinition": {
"creationTimeStamp": "1901-01-01T00:00:00.000Z",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"version": 1,
"name": "List Catalogs",
"type": "Compute",
"parameters": [],
"code": "%macro web_list_catalogs(library);\n\t%let library=%upcase(&library);\n proc sql ;\n create table work.catalogs as select memname as Catalog, memtype as \n Type, engine as Engine from sashelp.vmember where \n libname=\"&library\" and memtype=\"CATALOG\";\n run;\n title \"Catalogs in &library\";\n\n proc print data=work.catalogs;\n run;\n%mend;\n\n%web_list_catalogs(SASHELP);\n",
"properties": []
},
"arguments": {
"_contextName": "SAS Job Execution compute context"
},
"properties": [],
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b",
"uri": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b",
"type": "application/vnd.sas.job.execution.job.request"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b",
"uri": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b",
"type": "application/vnd.sas.summary"
},
{
"method": "GET",
"rel": "export",
"href": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b",
"uri": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b",
"type": "application/vnd.sas.transfer.object"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b",
"uri": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b",
"uri": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b",
"type": "application/vnd.sas.job.execution.job.request"
},
{
"method": "PUT",
"rel": "import",
"href": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b",
"uri": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b",
"type": "application/vnd.sas.transfer.object",
"responseType": "application/vnd.sas.summary"
},
{
"method": "GET",
"rel": "up",
"href": "/jobExecution/jobRequests",
"uri": "/jobExecution/jobRequests",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.job.request"
},
{
"method": "GET",
"rel": "jobs",
"href": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b/jobs",
"uri": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b/jobs",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.job"
},
{
"method": "POST",
"rel": "submitJob",
"href": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b/jobs",
"uri": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b/jobs",
"responseType": "application/vnd.sas.job.execution.job"
}
]
}
{
"creationTimeStamp": "2022-04-06T22:09:12.929Z",
"modifiedTimeStamp": "2022-04-06T22:09:12.929Z",
"createdBy": "sas.catalog",
"modifiedBy": "sas.catalog",
"version": 3,
"id": "fe697677-15a8-4d33-807c-6c34b743bb8b",
"name": "List Catalogs",
"jobDefinition": {
"creationTimeStamp": "1901-01-01T00:00:00.000Z",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"version": 1,
"name": "List Catalogs",
"type": "Compute",
"parameters": [],
"code": "%macro web_list_catalogs(library);\n\t%let library=%upcase(&library);\n proc sql ;\n create table work.catalogs as select memname as Catalog, memtype as \n Type, engine as Engine from sashelp.vmember where \n libname=\"&library\" and memtype=\"CATALOG\";\n run;\n title \"Catalogs in &library\";\n\n proc print data=work.catalogs;\n run;\n%mend;\n\n%web_list_catalogs(SASHELP);\n",
"properties": []
},
"arguments": {
"_contextName": "SAS Job Execution compute context"
},
"properties": [],
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b",
"uri": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b",
"type": "application/vnd.sas.job.execution.job.request"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b",
"uri": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b",
"type": "application/vnd.sas.summary"
},
{
"method": "GET",
"rel": "export",
"href": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b",
"uri": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b",
"type": "application/vnd.sas.transfer.object"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b",
"uri": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b",
"uri": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b",
"type": "application/vnd.sas.job.execution.job.request"
},
{
"method": "PUT",
"rel": "import",
"href": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b",
"uri": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b",
"type": "application/vnd.sas.transfer.object",
"responseType": "application/vnd.sas.summary"
},
{
"method": "GET",
"rel": "up",
"href": "/jobExecution/jobRequests",
"uri": "/jobExecution/jobRequests",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.job.request"
},
{
"method": "GET",
"rel": "jobs",
"href": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b/jobs",
"uri": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b/jobs",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.job"
},
{
"method": "POST",
"rel": "submitJob",
"href": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b/jobs",
"uri": "/jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b/jobs",
"responseType": "application/vnd.sas.job.execution.job"
}
]
}
This is an example of a NOT FOUND response for the
GET
of a specific job request.
{
"errorCode": 0,
"message": "Job request not found with ID: fe697677-15a8-4d33-807c-6c34b743bb8bx",
"details": [
"traceId: c20b38c5cc2d06af",
"path: /jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8bx"
],
"links": [],
"version": 2,
"httpStatusCode": 404
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | jobRequest |
404 | Not Found | No job request exists at the requested path. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | The entity tag for the job request. | |
200 | Last-Modified | string | The timestamp for the job request that indicates when it was last modified. It uses the format EEE, dd MMM yyyy HH:mm:ss GMT . |
Check whether the job request exists
Code samples
# You can also use wget
curl -X HEAD http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests/{jobRequestId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Delegate-Domain: string'
const headers = {
'Delegate-Domain':'string'
};
fetch('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests/{jobRequestId}',
{
method: 'HEAD',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Delegate-Domain': 'string'
}
r = requests.head('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests/{jobRequestId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Delegate-Domain": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests/{jobRequestId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /jobRequests/{jobRequestId}
Returns the header information for the job request.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
jobRequestId | path | string | true | The ID of the job request. |
Delegate-Domain | header | string | false | Name of a credential domain of type OAuth2.0. The credential secret is retrieved to impersonate a group-managed service account for the current request. |
Detailed descriptions
Delegate-Domain: Name of a credential domain of type OAuth2.0. The credential secret is retrieved to impersonate a group-managed service account for the current request.
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
404 | Not Found | No job request exists at the requested path. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | The entity tag for the job request. | |
200 | Last-Modified | string | The timestamp for the job request that indicates when it was last modified. It uses the format EEE, dd MMM yyyy HH:mm:ss GMT . |
Update a job request
Code samples
# You can also use wget
curl -X PUT http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests/{jobRequestId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.job.execution.job.request+json' \
-H 'Accept: application/vnd.sas.job.execution.job.request+json' \
-H 'If-Match: string' \
-H 'If-Unmodified-Since: string' \
-H 'Delegate-Domain: string'
const inputBody = '{
"id": "{{JOBREQID}}",
"name": "sashelp.class distribution",
"description": "ods output with age 14 cutoff",
"jobDefinitionUri": "/jobDefinitions/definitions/dabd2a63-ae2f-4559-b110-ad989ff642a5",
"arguments": {
"AGE": "14"
}
}';
const headers = {
'Content-Type':'application/vnd.sas.job.execution.job.request+json',
'Accept':'application/vnd.sas.job.execution.job.request+json',
'If-Match':'string',
'If-Unmodified-Since':'string',
'Delegate-Domain':'string'
};
fetch('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests/{jobRequestId}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.job.execution.job.request+json',
'Accept': 'application/vnd.sas.job.execution.job.request+json',
'If-Match': 'string',
'If-Unmodified-Since': 'string',
'Delegate-Domain': 'string'
}
r = requests.put('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests/{jobRequestId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.job.execution.job.request+json"},
"Accept": []string{"application/vnd.sas.job.execution.job.request+json"},
"If-Match": []string{"string"},
"If-Unmodified-Since": []string{"string"},
"Delegate-Domain": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests/{jobRequestId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /jobRequests/{jobRequestId}
Updates an existing job request via a full replacement of the resource. The ID field might not be modified by this operation.
Body parameter
This is an example body to update a job request.
{
"id": "{{JOBREQID}}",
"name": "sashelp.class distribution",
"description": "ods output with age 14 cutoff",
"jobDefinitionUri": "/jobDefinitions/definitions/dabd2a63-ae2f-4559-b110-ad989ff642a5",
"arguments": {
"AGE": "14"
}
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
jobRequestId | path | string | true | The ID of the job request. |
If-Match | header | string | false | The entity tag obtained from the most recent ETag response header of this job request. Must match the current entity tag for the job request. |
If-Unmodified-Since | header | string | false | Ignored when If-Match is specified. The timestamp obtained from the most recent Last-Modified response header of this job request. Must be later than or equal to the timestamp when the job request was last modified. |
parentFolderUri | query | string | false | The URI of the parent folder in which to save the job request. If the job request is in a different folder, it is moved to the specified parent folder. |
Delegate-Domain | header | string | false | Name of a credential domain of type OAuth2.0. The credential secret is retrieved to impersonate a group-managed service account for the current request. |
body | body | jobRequest | true | The job request to be updated. |
Detailed descriptions
Delegate-Domain: Name of a credential domain of type OAuth2.0. The credential secret is retrieved to impersonate a group-managed service account for the current request.
Example responses
This is an example response when using
PUT
to update a job request.
{
"creationTimeStamp": "2018-03-12T19:37:28.318Z",
"modifiedTimeStamp": "2018-03-12T19:51:07.178Z",
"createdBy": "user1",
"modifiedBy": "user1",
"version": 3,
"id": "f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
"name": "sashelp.class distribution",
"description": "ods output with age 14 cutoff",
"jobDefinitionUri": "/jobDefinitions/definitions/dabd2a63-ae2f-4559-b110-ad989ff642a5",
"arguments": {
"_contextName": "SAS Job Execution compute context",
"AGE": "14"
},
"properties": [],
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
"uri": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
"type": "application/vnd.sas.job.execution.job.request"
},
{
"method": "GET",
"rel": "export",
"href": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
"uri": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
"type": "application/vnd.sas.transfer.object"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
"uri": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
"uri": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
"type": "application/vnd.sas.job.execution.job.request"
},
{
"method": "PUT",
"rel": "import",
"href": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
"uri": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
"type": "application/vnd.sas.transfer.object",
"responseType": "application/vnd.sas.summary"
},
{
"method": "GET",
"rel": "up",
"href": "/jobExecution/jobRequests",
"uri": "/jobExecution/jobRequests",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.job.request"
},
{
"method": "GET",
"rel": "jobs",
"href": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b/jobs",
"uri": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b/jobs",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.job"
},
{
"method": "POST",
"rel": "submitJob",
"href": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b/jobs",
"uri": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b/jobs",
"responseType": "application/vnd.sas.job.execution.job"
}
]
}
{
"creationTimeStamp": "2018-03-12T19:37:28.318Z",
"modifiedTimeStamp": "2018-03-12T19:51:07.178Z",
"createdBy": "user1",
"modifiedBy": "user1",
"version": 3,
"id": "f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
"name": "sashelp.class distribution",
"description": "ods output with age 14 cutoff",
"jobDefinitionUri": "/jobDefinitions/definitions/dabd2a63-ae2f-4559-b110-ad989ff642a5",
"arguments": {
"_contextName": "SAS Job Execution compute context",
"AGE": "14"
},
"properties": [],
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
"uri": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
"type": "application/vnd.sas.job.execution.job.request"
},
{
"method": "GET",
"rel": "export",
"href": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
"uri": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
"type": "application/vnd.sas.transfer.object"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
"uri": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
"uri": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
"type": "application/vnd.sas.job.execution.job.request"
},
{
"method": "PUT",
"rel": "import",
"href": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
"uri": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b",
"type": "application/vnd.sas.transfer.object",
"responseType": "application/vnd.sas.summary"
},
{
"method": "GET",
"rel": "up",
"href": "/jobExecution/jobRequests",
"uri": "/jobExecution/jobRequests",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.job.request"
},
{
"method": "GET",
"rel": "jobs",
"href": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b/jobs",
"uri": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b/jobs",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.job"
},
{
"method": "POST",
"rel": "submitJob",
"href": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b/jobs",
"uri": "/jobExecution/jobRequests/f9c52f58-9639-45ae-b24c-23cfff0b2f5b/jobs",
"responseType": "application/vnd.sas.job.execution.job"
}
]
}
This is an example of a Bad Request response to a
PUT
job request.
{
"errorCode": 0,
"message": "Job request with ID: 7a49c947-9023-4636-94d6-935a7d2715a7 does not match passed in id: fe697677-15a8-4d33-807c-6c34b743bb8b.",
"details": [
"traceId: 296db44bebfcb9a8",
"path: /jobExecution/jobRequests/7a49c947-9023-4636-94d6-935a7d2715a7"
],
"links": [],
"version": 2,
"httpStatusCode": 400
}
{
"errorCode": 0,
"message": "Job request with ID: 7a49c947-9023-4636-94d6-935a7d2715a7 does not match passed in id: fe697677-15a8-4d33-807c-6c34b743bb8b.",
"details": [
"traceId: 296db44bebfcb9a8",
"path: /jobExecution/jobRequests/7a49c947-9023-4636-94d6-935a7d2715a7"
],
"links": [],
"version": 2,
"httpStatusCode": 400
}
This is an example of a NOT FOUND response for the
PUT
of a specific job request.
{
"errorCode": 0,
"message": "Job request not found with ID: fe697677-15a8-4d33-807c-6c34b743bb8bx",
"details": [
"traceId: 5207de02ddac30de",
"path: /jobExecution/jobs/41e44582-e556-448e-95a0-5340d94ce55ex"
],
"links": [],
"version": 2,
"httpStatusCode": 404
}
{
"errorCode": 0,
"message": "Job request not found with ID: fe697677-15a8-4d33-807c-6c34b743bb8bx",
"details": [
"traceId: 5207de02ddac30de",
"path: /jobExecution/jobs/41e44582-e556-448e-95a0-5340d94ce55ex"
],
"links": [],
"version": 2,
"httpStatusCode": 404
}
This is an example of a PRECONDITION FAILED response for the
PUT
of a specific job request.
{
"errorCode": 1013,
"message": "The values for the request header field \"If-Match\" (\"l1o4hj35\") and the resource's entity tag (\"l1quxgzu\") are not the same.",
"details": [
"traceId: 8c0fa6d82a8a9b5c",
"path: /jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b"
],
"remediation": "Get the latest representation of the resource and apply the desired changes. Retry the operation with the modified representation and the entity tag from the response header field \"ETag\".",
"links": [],
"version": 2,
"httpStatusCode": 412
}
{
"errorCode": 1013,
"message": "The values for the request header field \"If-Match\" (\"l1o4hj35\") and the resource's entity tag (\"l1quxgzu\") are not the same.",
"details": [
"traceId: 8c0fa6d82a8a9b5c",
"path: /jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b"
],
"remediation": "Get the latest representation of the resource and apply the desired changes. Retry the operation with the modified representation and the entity tag from the response header field \"ETag\".",
"links": [],
"version": 2,
"httpStatusCode": 412
}
This is an example of an Unsupported Media Type response to a
PUT
to update a job request.
{
"errorCode": 0,
"message": "The value (text/plain) for the request header field \"Content-Type\" does not specify a supported media type.",
"details": [
"traceId: ab0b7e198ea62e26",
"path: /jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b"
],
"remediation": "For the request header field \"Content-Type\", specify one of the following media types: \"application/json\", \"application/vnd.sas.job.execution.job.request+json\", \"application/vnd.sas.transfer.object+json\".",
"links": [],
"version": 2,
"httpStatusCode": 415
}
{
"errorCode": 0,
"message": "The value (text/plain) for the request header field \"Content-Type\" does not specify a supported media type.",
"details": [
"traceId: ab0b7e198ea62e26",
"path: /jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b"
],
"remediation": "For the request header field \"Content-Type\", specify one of the following media types: \"application/json\", \"application/vnd.sas.job.execution.job.request+json\", \"application/vnd.sas.transfer.object+json\".",
"links": [],
"version": 2,
"httpStatusCode": 415
}
This is an example of a PRECONDITION REQUIRED response for the
PUT
of a specific job request.
{
"errorCode": 1010,
"message": "One of the following request header fields is required: \"If-Match\" or \"If-Unmodified-Since\".",
"details": [
"traceId: fcd340f35781ab52",
"path: /jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b"
],
"remediation": "In the request header, include one of the following: the resource's entity tag for the field \"If-Match\", or the resource's last-modified timestamp for the field \"If-Unmodified-Since\".",
"links": [],
"version": 2,
"httpStatusCode": 428
}
{
"errorCode": 1010,
"message": "One of the following request header fields is required: \"If-Match\" or \"If-Unmodified-Since\".",
"details": [
"traceId: fcd340f35781ab52",
"path: /jobExecution/jobRequests/fe697677-15a8-4d33-807c-6c34b743bb8b"
],
"remediation": "In the request header, include one of the following: the resource's entity tag for the field \"If-Match\", or the resource's last-modified timestamp for the field \"If-Unmodified-Since\".",
"links": [],
"version": 2,
"httpStatusCode": 428
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. The job request definition updated successfully. | jobRequest |
400 | Bad Request | The request was not valid. This occurs when the user provides an ID in the request that does not match the ID in the path of the URL. | error2 |
404 | Not Found | No job request exists at the requested path. | error2 |
412 | Precondition Failed | The If-Match request header did not match the resource's entity tag, or the If-Unmodified-Since request header was earlier than the resource's last modified timestamp. |
error2 |
415 | Unsupported Media Type | The requested media type is not supported. | error2 |
428 | Precondition Required | The request was missing an If-Match or If-Unmodified-Since header. |
error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | The entity tag for the job request. | |
200 | Last-Modified | string | The timestamp for the job request that indicates when it was last modified. It uses the format EEE, dd MMM yyyy HH:mm:ss GMT . |
Delete a job request
Code samples
# You can also use wget
curl -X DELETE http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests/{jobRequestId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/json' \
-H 'Delegate-Domain: string'
const headers = {
'Accept':'application/json',
'Delegate-Domain':'string'
};
fetch('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests/{jobRequestId}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json',
'Delegate-Domain': 'string'
}
r = requests.delete('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests/{jobRequestId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"Delegate-Domain": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests/{jobRequestId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /jobRequests/{jobRequestId}
Deletes the specified job request.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
jobRequestId | path | string | true | The ID of the job request. |
Delegate-Domain | header | string | false | Name of a credential domain of type OAuth2.0. The credential secret is retrieved to impersonate a group-managed service account for the current request. |
Detailed descriptions
Delegate-Domain: Name of a credential domain of type OAuth2.0. The credential secret is retrieved to impersonate a group-managed service account for the current request.
Example responses
This is an example of a NOT FOUND response for the delete of a specific job request.
{
"errorCode": 0,
"message": "Job request not found with ID: fe697677-15a8-4d33-807c-6c34b743bb8bx",
"details": [
"traceId: 5207de02ddac30de",
"path: /jobExecution/jobs/41e44582-e556-448e-95a0-5340d94ce55ex"
],
"links": [],
"version": 2,
"httpStatusCode": 404
}
{
"errorCode": 0,
"message": "Job request not found with ID: fe697677-15a8-4d33-807c-6c34b743bb8bx",
"details": [
"traceId: 5207de02ddac30de",
"path: /jobExecution/jobs/41e44582-e556-448e-95a0-5340d94ce55ex"
],
"links": [],
"version": 2,
"httpStatusCode": 404
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | The job request was deleted. | None |
404 | Not Found | No job request exists at the requested path. | error2 |
Submit multiple jobs using the specified job requests
Code samples
# You can also use wget
curl -X POST http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests/@selection/jobs \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.selection+json' \
-H 'Accept: application/vnd.sas.collection+json'
const inputBody = '{
"version": 1,
"type": "uri",
"resources": [
"/jobExecution/jobRequests/de941a62-9099-4081-b696-23ffad922963",
"/jobExecution/jobRequests/efc70058-4731-4ffd-8f2e-3da6f472fd6e",
"/jobExecution/jobRequests/368d5e04-c3d4-493d-8b1a-2c24816ef71d"
]
}';
const headers = {
'Content-Type':'application/vnd.sas.selection+json',
'Accept':'application/vnd.sas.collection+json'
};
fetch('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests/@selection/jobs',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.selection+json',
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.post('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests/@selection/jobs', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.selection+json"},
"Accept": []string{"application/vnd.sas.collection+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests/@selection/jobs", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /jobRequests/@selection/jobs
Submits jobs using the job-request URIs specified in the body resource selection. The request body identifies the job requests to submit. The selection type must be URI and the resources must be an array of URIs that identify the job requests. The items in the response MUST match 1-to-1 with the items in the request. If the job is submitted successfully, the corresponding item in the response is an application/vnd.sas.job.execution.job object. If the job submission failed, the corresponding item in the response is an application/vnd.sas.error object.
Body parameter
This is an example body of submitting multiple jobs using the multi-POST.
{
"version": 1,
"type": "uri",
"resources": [
"/jobExecution/jobRequests/de941a62-9099-4081-b696-23ffad922963",
"/jobExecution/jobRequests/efc70058-4731-4ffd-8f2e-3da6f472fd6e",
"/jobExecution/jobRequests/368d5e04-c3d4-493d-8b1a-2c24816ef71d"
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
submitter | query | string | false | Persisted in the submittedByApplication member of the created Job and used as the submitter portion of the job state change event routing key. Only characters in the set [a-zA-Z0-9] and hyphen are valid with a maximum of 64 characters. |
body | body | resourceSelection | false | none |
Example responses
This is an example of using
POST
to submit multiple jobs.
{
"links": [],
"name": "items",
"items": [
{
"creationTimeStamp": "2021-11-09T13:51:33.352Z",
"modifiedTimeStamp": "2021-11-09T13:51:33.794Z",
"createdBy": "user1",
"modifiedBy": "user1",
"version": 4,
"id": "1b891edb-69a0-412c-b0d0-482f14882455",
"jobRequest": {
"creationTimeStamp": "2021-11-09T13:49:08.793Z",
"modifiedTimeStamp": "2021-11-09T13:49:08.793Z",
"createdBy": "user1",
"modifiedBy": "user1",
"version": 3,
"id": "7a49c947-9023-4636-94d6-935a7d2715a7",
"name": "Update tasks",
"description": "Job that will update tasks.",
"jobDefinition": {
"version": 1,
"name": "Update tasks",
"type": "Compute",
"parameters": [
{
"version": 1,
"name": "_contextName",
"defaultValue": "SAS Job Execution compute context",
"type": "CHARACTER",
"label": "Context Name",
"required": false
}
],
"code": "data a;x=1;do while (x < 50) ; call sleep(30000);end;run;quit;\n;",
"properties": []
},
"arguments": {
"_contextName": "SAS Job Execution compute context"
},
"properties": [],
"createdByApplication": "jobExecution",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobRequests/7a49c947-9023-4636-94d6-935a7d2715a7",
"uri": "/jobExecution/jobRequests/7a49c947-9023-4636-94d6-935a7d2715a7",
"type": "application/vnd.sas.job.execution.job.request"
}
]
},
"state": "running",
"heartbeatTimeStamp": "2021-11-09T13:51:33.788Z",
"submittedByApplication": "jobExecution",
"heartbeatInterval": 600,
"elapsedTime": 515,
"results": {},
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobs/1b891edb-69a0-412c-b0d0-482f14882455",
"uri": "/jobExecution/jobs/1b891edb-69a0-412c-b0d0-482f14882455",
"type": "application/vnd.sas.job.execution.job"
},
{
"method": "GET",
"rel": "state",
"href": "/jobExecution/jobs/1b891edb-69a0-412c-b0d0-482f14882455/state",
"uri": "/jobExecution/jobs/1b891edb-69a0-412c-b0d0-482f14882455/state",
"type": "text/plain"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobExecution/jobs/1b891edb-69a0-412c-b0d0-482f14882455",
"uri": "/jobExecution/jobs/1b891edb-69a0-412c-b0d0-482f14882455",
"type": "application/vnd.sas.job.execution.job",
"responseType": "application/vnd.sas.job.execution.job"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobExecution/jobs/1b891edb-69a0-412c-b0d0-482f14882455",
"uri": "/jobExecution/jobs/1b891edb-69a0-412c-b0d0-482f14882455"
},
{
"method": "PUT",
"rel": "updateState",
"href": "/jobExecution/jobs/1b891edb-69a0-412c-b0d0-482f14882455/state",
"uri": "/jobExecution/jobs/1b891edb-69a0-412c-b0d0-482f14882455/state",
"type": "text/plain"
},
{
"method": "POST",
"rel": "updateHeartbeatTimeStamp",
"href": "/jobExecution/jobs/1b891edb-69a0-412c-b0d0-482f14882455/heartbeatTimeStamp",
"uri": "/jobExecution/jobs/1b891edb-69a0-412c-b0d0-482f14882455/heartbeatTimeStamp",
"type": "text/plain"
},
{
"method": "GET",
"rel": "jobRequest",
"href": "/jobExecution/jobRequests/7a49c947-9023-4636-94d6-935a7d2715a7",
"uri": "/jobExecution/jobRequests/7a49c947-9023-4636-94d6-935a7d2715a7",
"type": "application/vnd.sas.job.execution.job.request"
}
]
},
{
"creationTimeStamp": "2021-11-09T13:51:33.909Z",
"modifiedTimeStamp": "2021-11-09T13:51:34.340Z",
"createdBy": "user1",
"modifiedBy": "user1",
"version": 4,
"id": "f3b188cc-3fde-43bd-a848-c1482fa5e588",
"jobRequest": {
"creationTimeStamp": "2021-11-09T13:50:16.194Z",
"modifiedTimeStamp": "2021-11-09T13:50:16.194Z",
"createdBy": "user1",
"modifiedBy": "user1",
"version": 3,
"id": "a43f3071-707e-45d1-a750-5e7b06bc98c6",
"name": "Monthly Results",
"description": "Monthly results.",
"jobDefinition": {
"version": 1,
"name": "Monthly Results",
"type": "Compute",
"parameters": [
{
"version": 1,
"name": "_contextName",
"defaultValue": "SAS Job Execution compute context",
"type": "CHARACTER",
"label": "Context Name",
"required": false
}
],
"code": "data a;x=1;do while (x < 50) ; call sleep(30000);end;run;quit;\n;",
"properties": []
},
"arguments": {
"_contextName": "SAS Job Execution compute context"
},
"properties": [],
"createdByApplication": "jobExecution",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobRequests/a43f3071-707e-45d1-a750-5e7b06bc98c6",
"uri": "/jobExecution/jobRequests/a43f3071-707e-45d1-a750-5e7b06bc98c6",
"type": "application/vnd.sas.job.execution.job.request"
}
]
},
"state": "running",
"heartbeatTimeStamp": "2021-11-09T13:51:34.333Z",
"submittedByApplication": "jobExecution",
"heartbeatInterval": 600,
"elapsedTime": 475,
"results": {},
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobs/f3b188cc-3fde-43bd-a848-c1482fa5e588",
"uri": "/jobExecution/jobs/f3b188cc-3fde-43bd-a848-c1482fa5e588",
"type": "application/vnd.sas.job.execution.job"
},
{
"method": "GET",
"rel": "state",
"href": "/jobExecution/jobs/f3b188cc-3fde-43bd-a848-c1482fa5e588/state",
"uri": "/jobExecution/jobs/f3b188cc-3fde-43bd-a848-c1482fa5e588/state",
"type": "text/plain"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobExecution/jobs/f3b188cc-3fde-43bd-a848-c1482fa5e588",
"uri": "/jobExecution/jobs/f3b188cc-3fde-43bd-a848-c1482fa5e588",
"type": "application/vnd.sas.job.execution.job",
"responseType": "application/vnd.sas.job.execution.job"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobExecution/jobs/f3b188cc-3fde-43bd-a848-c1482fa5e588",
"uri": "/jobExecution/jobs/f3b188cc-3fde-43bd-a848-c1482fa5e588"
},
{
"method": "PUT",
"rel": "updateState",
"href": "/jobExecution/jobs/f3b188cc-3fde-43bd-a848-c1482fa5e588/state",
"uri": "/jobExecution/jobs/f3b188cc-3fde-43bd-a848-c1482fa5e588/state",
"type": "text/plain"
},
{
"method": "POST",
"rel": "updateHeartbeatTimeStamp",
"href": "/jobExecution/jobs/f3b188cc-3fde-43bd-a848-c1482fa5e588/heartbeatTimeStamp",
"uri": "/jobExecution/jobs/f3b188cc-3fde-43bd-a848-c1482fa5e588/heartbeatTimeStamp",
"type": "text/plain"
},
{
"method": "GET",
"rel": "jobRequest",
"href": "/jobExecution/jobRequests/a43f3071-707e-45d1-a750-5e7b06bc98c6",
"uri": "/jobExecution/jobRequests/a43f3071-707e-45d1-a750-5e7b06bc98c6",
"type": "application/vnd.sas.job.execution.job.request"
}
]
}
],
"version": 2
}
This is an example of using
POST
to submit multiple jobs. Some succeed and one fails.
{
"links": [],
"name": "items",
"items": [
{
"creationTimeStamp": "2021-11-09T13:51:33.352Z",
"modifiedTimeStamp": "2021-11-09T13:51:33.794Z",
"createdBy": "user1",
"modifiedBy": "user1",
"version": 4,
"id": "1b891edb-69a0-412c-b0d0-482f14882455",
"jobRequest": {
"creationTimeStamp": "2021-11-09T13:49:08.793Z",
"modifiedTimeStamp": "2021-11-09T13:49:08.793Z",
"createdBy": "user1",
"modifiedBy": "user1",
"version": 3,
"id": "7a49c947-9023-4636-94d6-935a7d2715a7",
"name": "Update tasks",
"description": "Job that will update tasks.",
"jobDefinition": {
"version": 1,
"name": "Update tasks",
"type": "Compute",
"parameters": [
{
"version": 1,
"name": "_contextName",
"defaultValue": "SAS Job Execution compute context",
"type": "CHARACTER",
"label": "Context Name",
"required": false
}
],
"code": "data a;x=1;do while (x < 50) ; call sleep(30000);end;run;quit;\n;",
"properties": []
},
"arguments": {
"_contextName": "SAS Job Execution compute context"
},
"properties": [],
"createdByApplication": "jobExecution",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobRequests/7a49c947-9023-4636-94d6-935a7d2715a7",
"uri": "/jobExecution/jobRequests/7a49c947-9023-4636-94d6-935a7d2715a7",
"type": "application/vnd.sas.job.execution.job.request"
}
]
},
"state": "running",
"heartbeatTimeStamp": "2021-11-09T13:51:33.788Z",
"submittedByApplication": "jobExecution",
"heartbeatInterval": 600,
"elapsedTime": 515,
"results": {},
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobs/1b891edb-69a0-412c-b0d0-482f14882455",
"uri": "/jobExecution/jobs/1b891edb-69a0-412c-b0d0-482f14882455",
"type": "application/vnd.sas.job.execution.job"
},
{
"method": "GET",
"rel": "state",
"href": "/jobExecution/jobs/1b891edb-69a0-412c-b0d0-482f14882455/state",
"uri": "/jobExecution/jobs/1b891edb-69a0-412c-b0d0-482f14882455/state",
"type": "text/plain"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobExecution/jobs/1b891edb-69a0-412c-b0d0-482f14882455",
"uri": "/jobExecution/jobs/1b891edb-69a0-412c-b0d0-482f14882455",
"type": "application/vnd.sas.job.execution.job",
"responseType": "application/vnd.sas.job.execution.job"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobExecution/jobs/1b891edb-69a0-412c-b0d0-482f14882455",
"uri": "/jobExecution/jobs/1b891edb-69a0-412c-b0d0-482f14882455"
},
{
"method": "PUT",
"rel": "updateState",
"href": "/jobExecution/jobs/1b891edb-69a0-412c-b0d0-482f14882455/state",
"uri": "/jobExecution/jobs/1b891edb-69a0-412c-b0d0-482f14882455/state",
"type": "text/plain"
},
{
"method": "POST",
"rel": "updateHeartbeatTimeStamp",
"href": "/jobExecution/jobs/1b891edb-69a0-412c-b0d0-482f14882455/heartbeatTimeStamp",
"uri": "/jobExecution/jobs/1b891edb-69a0-412c-b0d0-482f14882455/heartbeatTimeStamp",
"type": "text/plain"
},
{
"method": "GET",
"rel": "jobRequest",
"href": "/jobExecution/jobRequests/7a49c947-9023-4636-94d6-935a7d2715a7",
"uri": "/jobExecution/jobRequests/7a49c947-9023-4636-94d6-935a7d2715a7",
"type": "application/vnd.sas.job.execution.job.request"
}
]
},
{
"errorCode": 0,
"message": "Job request not found with ID: a1fd3a90-d33e-47c7-bae3-2125ec86389f",
"details": [],
"links": [],
"version": 2,
"httpStatusCode": 404
},
{
"creationTimeStamp": "2021-11-09T13:51:33.909Z",
"modifiedTimeStamp": "2021-11-09T13:51:34.340Z",
"createdBy": "user1",
"modifiedBy": "user1",
"version": 4,
"id": "f3b188cc-3fde-43bd-a848-c1482fa5e588",
"jobRequest": {
"creationTimeStamp": "2021-11-09T13:50:16.194Z",
"modifiedTimeStamp": "2021-11-09T13:50:16.194Z",
"createdBy": "user1",
"modifiedBy": "user1",
"version": 3,
"id": "a43f3071-707e-45d1-a750-5e7b06bc98c6",
"name": "Monthly Results",
"description": "Monthly results.",
"jobDefinition": {
"version": 1,
"name": "Monthly Results",
"type": "Compute",
"parameters": [
{
"version": 1,
"name": "_contextName",
"defaultValue": "SAS Job Execution compute context",
"type": "CHARACTER",
"label": "Context Name",
"required": false
}
],
"code": "data a;x=1;do while (x < 50) ; call sleep(30000);end;run;quit;\n;",
"properties": []
},
"arguments": {
"_contextName": "SAS Job Execution compute context"
},
"properties": [],
"createdByApplication": "jobExecution",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobRequests/a43f3071-707e-45d1-a750-5e7b06bc98c6",
"uri": "/jobExecution/jobRequests/a43f3071-707e-45d1-a750-5e7b06bc98c6",
"type": "application/vnd.sas.job.execution.job.request"
}
]
},
"state": "running",
"heartbeatTimeStamp": "2021-11-09T13:51:34.333Z",
"submittedByApplication": "jobExecution",
"heartbeatInterval": 600,
"elapsedTime": 475,
"results": {},
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobs/f3b188cc-3fde-43bd-a848-c1482fa5e588",
"uri": "/jobExecution/jobs/f3b188cc-3fde-43bd-a848-c1482fa5e588",
"type": "application/vnd.sas.job.execution.job"
},
{
"method": "GET",
"rel": "state",
"href": "/jobExecution/jobs/f3b188cc-3fde-43bd-a848-c1482fa5e588/state",
"uri": "/jobExecution/jobs/f3b188cc-3fde-43bd-a848-c1482fa5e588/state",
"type": "text/plain"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobExecution/jobs/f3b188cc-3fde-43bd-a848-c1482fa5e588",
"uri": "/jobExecution/jobs/f3b188cc-3fde-43bd-a848-c1482fa5e588",
"type": "application/vnd.sas.job.execution.job",
"responseType": "application/vnd.sas.job.execution.job"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobExecution/jobs/f3b188cc-3fde-43bd-a848-c1482fa5e588",
"uri": "/jobExecution/jobs/f3b188cc-3fde-43bd-a848-c1482fa5e588"
},
{
"method": "PUT",
"rel": "updateState",
"href": "/jobExecution/jobs/f3b188cc-3fde-43bd-a848-c1482fa5e588/state",
"uri": "/jobExecution/jobs/f3b188cc-3fde-43bd-a848-c1482fa5e588/state",
"type": "text/plain"
},
{
"method": "POST",
"rel": "updateHeartbeatTimeStamp",
"href": "/jobExecution/jobs/f3b188cc-3fde-43bd-a848-c1482fa5e588/heartbeatTimeStamp",
"uri": "/jobExecution/jobs/f3b188cc-3fde-43bd-a848-c1482fa5e588/heartbeatTimeStamp",
"type": "text/plain"
},
{
"method": "GET",
"rel": "jobRequest",
"href": "/jobExecution/jobRequests/a43f3071-707e-45d1-a750-5e7b06bc98c6",
"uri": "/jobExecution/jobRequests/a43f3071-707e-45d1-a750-5e7b06bc98c6",
"type": "application/vnd.sas.job.execution.job.request"
}
]
}
],
"version": 2
}
This is an example of a Bad Request response to a
POST
of multiple job requests.
{
"errorCode": 0,
"message": "Invalid selection type. A resource selection type of URI is required.",
"details": [
"traceId: e4627ced752993a4",
"path: /jobExecution/jobRequests/@selection/jobs"
],
"links": [],
"version": 2,
"httpStatusCode": 400
}
{
"errorCode": 0,
"message": "Invalid selection type. A resource selection type of URI is required.",
"details": [
"traceId: e4627ced752993a4",
"path: /jobExecution/jobRequests/@selection/jobs"
],
"links": [],
"version": 2,
"httpStatusCode": 400
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | jobSubmitCollection |
400 | Bad Request | The request was not valid. An invalid request occurs in the following scenarios:
|
error2 |
Get list of jobs associated with a job request
Code samples
# You can also use wget
curl -X GET http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests/{jobRequestId}/jobs \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json' \
-H 'Delegate-Domain: string'
const headers = {
'Accept':'application/vnd.sas.collection+json',
'Delegate-Domain':'string'
};
fetch('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests/{jobRequestId}/jobs',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json',
'Delegate-Domain': 'string'
}
r = requests.get('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests/{jobRequestId}/jobs', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.collection+json"},
"Delegate-Domain": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests/{jobRequestId}/jobs", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /jobRequests/{jobRequestId}/jobs
Returns a collection of application/vnd.sas.job.execution.job resources that were submitted using the specified job request. Standard paging, filtering, and sorting options are specified in the Parameters section.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
jobRequestId | path | string | true | The ID of the job request. |
start | query | integer | false | The zero-based index of the first job to return. The default is 0 (zero). |
limit | query | integer | false | Represents the maximum number of jobs to return in this page of results. The actual number of returned jobs might be less if the collection has been exhausted. The default is 10. |
filter | query | string(filter-criteria) | false | Filter criteria for returned jobs. The following queries are examples:
|
sortBy | query | string(sort-criteria) | false | Specifies how to sort the returned jobs. The default sort order is descending on the creationTimeStamp field. The following sorts are examples:
|
Delegate-Domain | header | string | false | Name of a credential domain of type OAuth2.0. The credential secret is retrieved to impersonate a group-managed service account for the current request. |
Detailed descriptions
Delegate-Domain: Name of a credential domain of type OAuth2.0. The credential secret is retrieved to impersonate a group-managed service account for the current request.
Example responses
This is example get job requests jobs response.
{
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4/jobs",
"uri": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4/jobs",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.job"
},
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4/jobs?sortBy=creationTimeStamp:descending&start=0&limit=10",
"uri": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4/jobs?sortBy=creationTimeStamp:descending&start=0&limit=10",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.job"
},
{
"method": "GET",
"rel": "up",
"href": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4/",
"uri": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4/",
"type": "application/vnd.sas.job.execution.job"
},
{
"method": "POST",
"rel": "submitJob",
"href": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4/jobs",
"uri": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4/jobs",
"responseType": "application/vnd.sas.job.execution.job"
}
],
"name": "jobs",
"accept": "application/vnd.sas.job.execution.job",
"start": 0,
"count": 6,
"items": [
{
"creationTimeStamp": "2022-04-12T20:12:32.653Z",
"modifiedTimeStamp": "2022-04-12T20:12:54.053Z",
"createdBy": "user1",
"modifiedBy": "user1",
"version": 4,
"id": "fd4f8d7c-2fa0-4753-a537-45deb08e3fe2",
"jobRequest": {
"creationTimeStamp": "2022-04-11T21:36:15.155Z",
"modifiedTimeStamp": "2022-04-11T21:36:15.155Z",
"createdBy": "sas.catalog",
"modifiedBy": "sas.catalog",
"version": 3,
"id": "3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4",
"name": "List Catalogs",
"jobDefinition": {
"creationTimeStamp": "1901-01-01T00:00:00.000Z",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"version": 1,
"name": "List Catalogs",
"type": "Compute",
"parameters": [],
"code": "%macro web_list_catalogs(library);\n\t%let library=%upcase(&library);\n proc sql ;\n create table work.catalogs as select memname as Catalog, memtype as \n Type, engine as Engine from sashelp.vmember where \n libname=\"&library\" and memtype=\"CATALOG\";\n run;\n title \"Catalogs in &library\";\n\n proc print data=work.catalogs;\n run;\n%mend;\n\n%web_list_catalogs(SASHELP);\n",
"properties": []
},
"arguments": {
"_contextName": "SAS Job Execution compute context"
},
"properties": [],
"createdByApplication": "jobExecution",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4",
"uri": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4",
"type": "application/vnd.sas.job.execution.job.request"
}
]
},
"state": "completed",
"endTimeStamp": "2022-04-12T20:12:54.053Z",
"heartbeatTimeStamp": "2022-04-12T20:12:33.797Z",
"submittedByApplication": "jobExecution",
"heartbeatInterval": 600,
"elapsedTime": 21400,
"results": {
"COMPUTE_CONTEXT": "SAS Studio compute context",
"#LN00007": "/files/files/98e4ae4b-76ce-40c6-9404-e786ba4a913c",
"#LN00006": "/files/files/746ae002-c220-4525-ab0f-d832a165169c",
"35F69210-3CCB-A043-9D00-7532BDB6465D.log.txt": "/files/files/e5508264-58c0-4ad4-aa1e-8798e0c42435",
"COMPUTE_JOB": "35F69210-3CCB-A043-9D00-7532BDB6465D",
"COMPUTE_SESSION": "30ac3ff7-8b32-4210-8c1f-85aecaf0f0d3-ses0000 ended."
},
"logLocation": "/files/files/3d597573-e225-45cf-9b53-47ac4b2501c6",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobs/fd4f8d7c-2fa0-4753-a537-45deb08e3fe2",
"uri": "/jobExecution/jobs/fd4f8d7c-2fa0-4753-a537-45deb08e3fe2",
"type": "application/vnd.sas.job.execution.job"
},
{
"method": "GET",
"rel": "state",
"href": "/jobExecution/jobs/fd4f8d7c-2fa0-4753-a537-45deb08e3fe2/state",
"uri": "/jobExecution/jobs/fd4f8d7c-2fa0-4753-a537-45deb08e3fe2/state",
"type": "text/plain"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobExecution/jobs/fd4f8d7c-2fa0-4753-a537-45deb08e3fe2",
"uri": "/jobExecution/jobs/fd4f8d7c-2fa0-4753-a537-45deb08e3fe2",
"type": "application/vnd.sas.job.execution.job",
"responseType": "application/vnd.sas.job.execution.job"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobExecution/jobs/fd4f8d7c-2fa0-4753-a537-45deb08e3fe2",
"uri": "/jobExecution/jobs/fd4f8d7c-2fa0-4753-a537-45deb08e3fe2"
},
{
"method": "PUT",
"rel": "updateState",
"href": "/jobExecution/jobs/fd4f8d7c-2fa0-4753-a537-45deb08e3fe2/state",
"uri": "/jobExecution/jobs/fd4f8d7c-2fa0-4753-a537-45deb08e3fe2/state",
"type": "text/plain"
},
{
"method": "POST",
"rel": "updateHeartbeatTimeStamp",
"href": "/jobExecution/jobs/fd4f8d7c-2fa0-4753-a537-45deb08e3fe2/heartbeatTimeStamp",
"uri": "/jobExecution/jobs/fd4f8d7c-2fa0-4753-a537-45deb08e3fe2/heartbeatTimeStamp",
"type": "text/plain"
},
{
"method": "GET",
"rel": "jobRequest",
"href": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4",
"uri": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4",
"type": "application/vnd.sas.job.execution.job.request"
},
{
"method": "GET",
"rel": "log",
"href": "/files/files/3d597573-e225-45cf-9b53-47ac4b2501c6",
"uri": "/files/files/3d597573-e225-45cf-9b53-47ac4b2501c6"
}
]
}
],
"limit": 10,
"version": 2
}
{
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4/jobs",
"uri": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4/jobs",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.job"
},
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4/jobs?sortBy=creationTimeStamp:descending&start=0&limit=10",
"uri": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4/jobs?sortBy=creationTimeStamp:descending&start=0&limit=10",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.job"
},
{
"method": "GET",
"rel": "up",
"href": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4/",
"uri": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4/",
"type": "application/vnd.sas.job.execution.job"
},
{
"method": "POST",
"rel": "submitJob",
"href": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4/jobs",
"uri": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4/jobs",
"responseType": "application/vnd.sas.job.execution.job"
}
],
"name": "jobs",
"accept": "application/vnd.sas.job.execution.job",
"start": 0,
"count": 6,
"items": [
{
"creationTimeStamp": "2022-04-12T20:12:32.653Z",
"modifiedTimeStamp": "2022-04-12T20:12:54.053Z",
"createdBy": "user1",
"modifiedBy": "user1",
"version": 4,
"id": "fd4f8d7c-2fa0-4753-a537-45deb08e3fe2",
"jobRequest": {
"creationTimeStamp": "2022-04-11T21:36:15.155Z",
"modifiedTimeStamp": "2022-04-11T21:36:15.155Z",
"createdBy": "sas.catalog",
"modifiedBy": "sas.catalog",
"version": 3,
"id": "3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4",
"name": "List Catalogs",
"jobDefinition": {
"creationTimeStamp": "1901-01-01T00:00:00.000Z",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"version": 1,
"name": "List Catalogs",
"type": "Compute",
"parameters": [],
"code": "%macro web_list_catalogs(library);\n\t%let library=%upcase(&library);\n proc sql ;\n create table work.catalogs as select memname as Catalog, memtype as \n Type, engine as Engine from sashelp.vmember where \n libname=\"&library\" and memtype=\"CATALOG\";\n run;\n title \"Catalogs in &library\";\n\n proc print data=work.catalogs;\n run;\n%mend;\n\n%web_list_catalogs(SASHELP);\n",
"properties": []
},
"arguments": {
"_contextName": "SAS Job Execution compute context"
},
"properties": [],
"createdByApplication": "jobExecution",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4",
"uri": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4",
"type": "application/vnd.sas.job.execution.job.request"
}
]
},
"state": "completed",
"endTimeStamp": "2022-04-12T20:12:54.053Z",
"heartbeatTimeStamp": "2022-04-12T20:12:33.797Z",
"submittedByApplication": "jobExecution",
"heartbeatInterval": 600,
"elapsedTime": 21400,
"results": {
"COMPUTE_CONTEXT": "SAS Studio compute context",
"#LN00007": "/files/files/98e4ae4b-76ce-40c6-9404-e786ba4a913c",
"#LN00006": "/files/files/746ae002-c220-4525-ab0f-d832a165169c",
"35F69210-3CCB-A043-9D00-7532BDB6465D.log.txt": "/files/files/e5508264-58c0-4ad4-aa1e-8798e0c42435",
"COMPUTE_JOB": "35F69210-3CCB-A043-9D00-7532BDB6465D",
"COMPUTE_SESSION": "30ac3ff7-8b32-4210-8c1f-85aecaf0f0d3-ses0000 ended."
},
"logLocation": "/files/files/3d597573-e225-45cf-9b53-47ac4b2501c6",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobs/fd4f8d7c-2fa0-4753-a537-45deb08e3fe2",
"uri": "/jobExecution/jobs/fd4f8d7c-2fa0-4753-a537-45deb08e3fe2",
"type": "application/vnd.sas.job.execution.job"
},
{
"method": "GET",
"rel": "state",
"href": "/jobExecution/jobs/fd4f8d7c-2fa0-4753-a537-45deb08e3fe2/state",
"uri": "/jobExecution/jobs/fd4f8d7c-2fa0-4753-a537-45deb08e3fe2/state",
"type": "text/plain"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobExecution/jobs/fd4f8d7c-2fa0-4753-a537-45deb08e3fe2",
"uri": "/jobExecution/jobs/fd4f8d7c-2fa0-4753-a537-45deb08e3fe2",
"type": "application/vnd.sas.job.execution.job",
"responseType": "application/vnd.sas.job.execution.job"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobExecution/jobs/fd4f8d7c-2fa0-4753-a537-45deb08e3fe2",
"uri": "/jobExecution/jobs/fd4f8d7c-2fa0-4753-a537-45deb08e3fe2"
},
{
"method": "PUT",
"rel": "updateState",
"href": "/jobExecution/jobs/fd4f8d7c-2fa0-4753-a537-45deb08e3fe2/state",
"uri": "/jobExecution/jobs/fd4f8d7c-2fa0-4753-a537-45deb08e3fe2/state",
"type": "text/plain"
},
{
"method": "POST",
"rel": "updateHeartbeatTimeStamp",
"href": "/jobExecution/jobs/fd4f8d7c-2fa0-4753-a537-45deb08e3fe2/heartbeatTimeStamp",
"uri": "/jobExecution/jobs/fd4f8d7c-2fa0-4753-a537-45deb08e3fe2/heartbeatTimeStamp",
"type": "text/plain"
},
{
"method": "GET",
"rel": "jobRequest",
"href": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4",
"uri": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4",
"type": "application/vnd.sas.job.execution.job.request"
},
{
"method": "GET",
"rel": "log",
"href": "/files/files/3d597573-e225-45cf-9b53-47ac4b2501c6",
"uri": "/files/files/3d597573-e225-45cf-9b53-47ac4b2501c6"
}
]
}
],
"limit": 10,
"version": 2
}
This is an example of a Bad Request response to a
GET
job request jobs.
{
"errorCode": 1126,
"message": "The limit parameter must be greater or equal to zero.",
"details": [
"traceId: 5d6244b36dea012d",
"path: /jobExecution/jobRequests/71d7f203-4a30-4471-9f35-b29e32126b5c/jobs"
],
"links": [],
"version": 2,
"httpStatusCode": 400
}
{
"errorCode": 1126,
"message": "The limit parameter must be greater or equal to zero.",
"details": [
"traceId: 5d6244b36dea012d",
"path: /jobExecution/jobRequests/71d7f203-4a30-4471-9f35-b29e32126b5c/jobs"
],
"links": [],
"version": 2,
"httpStatusCode": 400
}
This is an example of a Not Found response to
GET
job request jobs.
{
"errorCode": 0,
"message": "Job request not found with ID: 71d7f203-4a30-4471-9f35-b29e32126b5cx",
"details": [
"traceId: ce7ea434b871b7bc",
"path: /jobExecution/jobRequests/71d7f203-4a30-4471-9f35-b29e32126b5cx/jobs"
],
"links": [],
"version": 2,
"httpStatusCode": 404
}
{
"errorCode": 0,
"message": "Job request not found with ID: 71d7f203-4a30-4471-9f35-b29e32126b5cx",
"details": [
"traceId: ce7ea434b871b7bc",
"path: /jobExecution/jobRequests/71d7f203-4a30-4471-9f35-b29e32126b5cx/jobs"
],
"links": [],
"version": 2,
"httpStatusCode": 404
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. The job requests (if any) are returned in a resource collection. | jobCollection |
400 | Bad Request | The request was not valid. An invalid request occurs in the following scenarios:
|
error2 |
404 | Not Found | No provider exists at the requested path. | error2 |
Submit a job using the specified job request
Code samples
# You can also use wget
curl -X POST http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests/{jobRequestId}/jobs \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.job.execution.job+json' \
-H 'Delegate-Domain: string'
const headers = {
'Accept':'application/vnd.sas.job.execution.job+json',
'Delegate-Domain':'string'
};
fetch('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests/{jobRequestId}/jobs',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.job.execution.job+json',
'Delegate-Domain': 'string'
}
r = requests.post('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests/{jobRequestId}/jobs', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.job.execution.job+json"},
"Delegate-Domain": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests/{jobRequestId}/jobs", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /jobRequests/{jobRequestId}/jobs
Submits a job using the job request specified in the path parameter jobRequestId. The body for this request must be empty. The returned job stores the following members from the specified job request in its jobRequest
member to allow for future retrieval: ID, createdBy, creationTimeStamp, modifiedBy, and modifiedTimeStamp.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
jobRequestId | path | string | true | The ID of the job request. |
submitter | query | string | false | Persisted in the submittedByApplication member of the created Job and used as the submitter portion of the job state change event routing key. Only characters in the set [a-zA-Z0-9] and hyphen are valid with a maximum of 64 characters. Do note the misspelled "sumbitter" query described below. |
sumbitter | query | string | false | Persisted in the submittedByApplication member of the created Job and used as the submitter portion of the job state change event routing key. Only characters in the set [a-zA-Z0-9] and hyphen are valid with a maximum of 64 characters. Do note the misspelling in the query parameter name to reflect the misspelling in the version 3 implementation. This misspelled query parameter is now deprecated and the correctly spelled "submitter" has been implemented and documented (see previous entry). If both query parameters are specified, then their values must be the same. |
Delegate-Domain | header | string | false | Name of a credential domain of type OAuth2.0. The credential secret is retrieved to impersonate a group-managed service account for the current request. |
Detailed descriptions
Delegate-Domain: Name of a credential domain of type OAuth2.0. The credential secret is retrieved to impersonate a group-managed service account for the current request.
Example responses
This is example response when using
POST
to create a job request job.
{
"creationTimeStamp": "2022-04-12T19:52:42.297Z",
"modifiedTimeStamp": "2022-04-12T19:52:47.855Z",
"createdBy": "user1",
"modifiedBy": "user1",
"version": 4,
"id": "5324e52f-4b1b-46b8-bbf9-a039c1091fab",
"jobRequest": {
"creationTimeStamp": "2022-04-11T21:36:15.155Z",
"modifiedTimeStamp": "2022-04-11T21:36:15.155Z",
"createdBy": "sas.catalog",
"modifiedBy": "sas.catalog",
"version": 3,
"id": "3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4",
"name": "List Catalogs",
"jobDefinition": {
"creationTimeStamp": "1901-01-01T00:00:00.000Z",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"version": 1,
"name": "List Catalogs",
"type": "Compute",
"parameters": [],
"code": "%macro web_list_catalogs(library);\n\t%let library=%upcase(&library);\n proc sql ;\n create table work.catalogs as select memname as Catalog, memtype as \n Type, engine as Engine from sashelp.vmember where \n libname=\"&library\" and memtype=\"CATALOG\";\n run;\n title \"Catalogs in &library\";\n\n proc print data=work.catalogs;\n run;\n%mend;\n\n%web_list_catalogs(SASHELP);\n",
"properties": []
},
"arguments": {
"_contextName": "SAS Job Execution compute context"
},
"properties": [],
"createdByApplication": "jobExecution",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4",
"uri": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4",
"type": "application/vnd.sas.job.execution.job.request"
}
]
},
"state": "running",
"heartbeatTimeStamp": "2022-04-12T19:52:47.840Z",
"submittedByApplication": "jobExecution",
"heartbeatInterval": 600,
"elapsedTime": 5608,
"results": {},
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobs/5324e52f-4b1b-46b8-bbf9-a039c1091fab",
"uri": "/jobExecution/jobs/5324e52f-4b1b-46b8-bbf9-a039c1091fab",
"type": "application/vnd.sas.job.execution.job"
},
{
"method": "GET",
"rel": "state",
"href": "/jobExecution/jobs/5324e52f-4b1b-46b8-bbf9-a039c1091fab/state",
"uri": "/jobExecution/jobs/5324e52f-4b1b-46b8-bbf9-a039c1091fab/state",
"type": "text/plain"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobExecution/jobs/5324e52f-4b1b-46b8-bbf9-a039c1091fab",
"uri": "/jobExecution/jobs/5324e52f-4b1b-46b8-bbf9-a039c1091fab",
"type": "application/vnd.sas.job.execution.job",
"responseType": "application/vnd.sas.job.execution.job"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobExecution/jobs/5324e52f-4b1b-46b8-bbf9-a039c1091fab",
"uri": "/jobExecution/jobs/5324e52f-4b1b-46b8-bbf9-a039c1091fab"
},
{
"method": "PUT",
"rel": "updateState",
"href": "/jobExecution/jobs/5324e52f-4b1b-46b8-bbf9-a039c1091fab/state",
"uri": "/jobExecution/jobs/5324e52f-4b1b-46b8-bbf9-a039c1091fab/state",
"type": "text/plain"
},
{
"method": "POST",
"rel": "updateHeartbeatTimeStamp",
"href": "/jobExecution/jobs/5324e52f-4b1b-46b8-bbf9-a039c1091fab/heartbeatTimeStamp",
"uri": "/jobExecution/jobs/5324e52f-4b1b-46b8-bbf9-a039c1091fab/heartbeatTimeStamp",
"type": "text/plain"
},
{
"method": "GET",
"rel": "jobRequest",
"href": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4",
"uri": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4",
"type": "application/vnd.sas.job.execution.job.request"
}
]
}
{
"creationTimeStamp": "2022-04-12T19:52:42.297Z",
"modifiedTimeStamp": "2022-04-12T19:52:47.855Z",
"createdBy": "user1",
"modifiedBy": "user1",
"version": 4,
"id": "5324e52f-4b1b-46b8-bbf9-a039c1091fab",
"jobRequest": {
"creationTimeStamp": "2022-04-11T21:36:15.155Z",
"modifiedTimeStamp": "2022-04-11T21:36:15.155Z",
"createdBy": "sas.catalog",
"modifiedBy": "sas.catalog",
"version": 3,
"id": "3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4",
"name": "List Catalogs",
"jobDefinition": {
"creationTimeStamp": "1901-01-01T00:00:00.000Z",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"version": 1,
"name": "List Catalogs",
"type": "Compute",
"parameters": [],
"code": "%macro web_list_catalogs(library);\n\t%let library=%upcase(&library);\n proc sql ;\n create table work.catalogs as select memname as Catalog, memtype as \n Type, engine as Engine from sashelp.vmember where \n libname=\"&library\" and memtype=\"CATALOG\";\n run;\n title \"Catalogs in &library\";\n\n proc print data=work.catalogs;\n run;\n%mend;\n\n%web_list_catalogs(SASHELP);\n",
"properties": []
},
"arguments": {
"_contextName": "SAS Job Execution compute context"
},
"properties": [],
"createdByApplication": "jobExecution",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4",
"uri": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4",
"type": "application/vnd.sas.job.execution.job.request"
}
]
},
"state": "running",
"heartbeatTimeStamp": "2022-04-12T19:52:47.840Z",
"submittedByApplication": "jobExecution",
"heartbeatInterval": 600,
"elapsedTime": 5608,
"results": {},
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobs/5324e52f-4b1b-46b8-bbf9-a039c1091fab",
"uri": "/jobExecution/jobs/5324e52f-4b1b-46b8-bbf9-a039c1091fab",
"type": "application/vnd.sas.job.execution.job"
},
{
"method": "GET",
"rel": "state",
"href": "/jobExecution/jobs/5324e52f-4b1b-46b8-bbf9-a039c1091fab/state",
"uri": "/jobExecution/jobs/5324e52f-4b1b-46b8-bbf9-a039c1091fab/state",
"type": "text/plain"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobExecution/jobs/5324e52f-4b1b-46b8-bbf9-a039c1091fab",
"uri": "/jobExecution/jobs/5324e52f-4b1b-46b8-bbf9-a039c1091fab",
"type": "application/vnd.sas.job.execution.job",
"responseType": "application/vnd.sas.job.execution.job"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobExecution/jobs/5324e52f-4b1b-46b8-bbf9-a039c1091fab",
"uri": "/jobExecution/jobs/5324e52f-4b1b-46b8-bbf9-a039c1091fab"
},
{
"method": "PUT",
"rel": "updateState",
"href": "/jobExecution/jobs/5324e52f-4b1b-46b8-bbf9-a039c1091fab/state",
"uri": "/jobExecution/jobs/5324e52f-4b1b-46b8-bbf9-a039c1091fab/state",
"type": "text/plain"
},
{
"method": "POST",
"rel": "updateHeartbeatTimeStamp",
"href": "/jobExecution/jobs/5324e52f-4b1b-46b8-bbf9-a039c1091fab/heartbeatTimeStamp",
"uri": "/jobExecution/jobs/5324e52f-4b1b-46b8-bbf9-a039c1091fab/heartbeatTimeStamp",
"type": "text/plain"
},
{
"method": "GET",
"rel": "jobRequest",
"href": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4",
"uri": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4",
"type": "application/vnd.sas.job.execution.job.request"
}
]
}
This is an example of a Bad Request response to
POST
job request job.
{
"errorCode": 0,
"message": "Both query parameters submitter (\"steph2\") and submitter (\"steph\") should not be specified.",
"details": [
"traceId: 3bde71b81ee51316",
"path: /jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4/jobs"
],
"links": [],
"version": 2,
"httpStatusCode": 400
}
{
"errorCode": 0,
"message": "Both query parameters submitter (\"steph2\") and submitter (\"steph\") should not be specified.",
"details": [
"traceId: 3bde71b81ee51316",
"path: /jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4/jobs"
],
"links": [],
"version": 2,
"httpStatusCode": 400
}
This is an example of a Not Found response to a
POST
job request job.
{
"errorCode": 0,
"message": "Job request not found with ID: 3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4x",
"details": [
"traceId: 006d298f5bd1bf7e",
"path: /jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4x/jobs"
],
"links": [],
"version": 2,
"httpStatusCode": 404
}
{
"errorCode": 0,
"message": "Job request not found with ID: 3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4x",
"details": [
"traceId: 006d298f5bd1bf7e",
"path: /jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4x/jobs"
],
"links": [],
"version": 2,
"httpStatusCode": 404
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | The job request was created. | job |
400 | Bad Request | The request was not valid. | error2 |
404 | Not Found | No job request exists at the requested path. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | ETag | string | The entity tag for the job. | |
201 | Last-Modified | string | The timestamp for the job request that indicates when it was last modified. It uses the format EEE, dd MMM yyyy HH:mm:ss GMT . |
|
201 | Location | string | The URL location of the newly created job request job. |
Get a filtered list of jobs associated with the job request
Code samples
# You can also use wget
curl -X POST http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests/{jobRequestId}/jobs#withQuery \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: text/plain' \
-H 'Accept: application/vnd.sas.collection+json' \
-H 'Delegate-Domain: string'
const inputBody = 'string';
const headers = {
'Content-Type':'text/plain',
'Accept':'application/vnd.sas.collection+json',
'Delegate-Domain':'string'
};
fetch('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests/{jobRequestId}/jobs#withQuery',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'text/plain',
'Accept': 'application/vnd.sas.collection+json',
'Delegate-Domain': 'string'
}
r = requests.post('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests/{jobRequestId}/jobs#withQuery', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"text/plain"},
"Accept": []string{"application/vnd.sas.collection+json"},
"Delegate-Domain": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/jobRequests/{jobRequestId}/jobs#withQuery", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /jobRequests/{jobRequestId}/jobs
Returns a collection of application/vnd.sas.job.execution.job resources that were submitted using the specified job request. This particular call takes the filter in the body of the request to allow large filters that exceed standard URL length limits. Standard paging, filtering, and sorting options are specified in the Parameters section.
Body parameter
string
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
jobRequestId | path | string | true | The ID of the job request. |
start | query | integer | false | Represents the zero-based index of the first job to return. The default is 0 (zero). |
limit | query | integer | false | Represents the maximum number of jobs to return in this page of results. The actual number of returned jobs might be less if the collection has been exhausted. The default is 10. |
sortBy | query | string(sort-criteria) | false | This determines the sort order of the returned jobs. The default sort order is descending on the creationTimeStamp field. the following sorts are examples:
|
Delegate-Domain | header | string | false | Name of a credential domain of type OAuth2.0. The credential secret is retrieved to impersonate a group-managed service account for the current request. |
body | body | string | false | This determines the filter criteria for the returned jobs. The following request bodies are examples:
|
Detailed descriptions
Delegate-Domain: Name of a credential domain of type OAuth2.0. The credential secret is retrieved to impersonate a group-managed service account for the current request.
Example responses
This is example response when using get job request jobs by filter
{
"links": [
{
"method": "POST",
"rel": "collection",
"href": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4/jobs",
"uri": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4/jobs",
"type": "text/plain",
"responseType": "application/vnd.sas.collection",
"responseItemType": "application/vnd.sas.job.execution.job"
},
{
"method": "POST",
"rel": "self",
"href": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4/jobs",
"uri": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4/jobs",
"type": "text/plain",
"responseType": "application/vnd.sas.collection",
"responseItemType": "application/vnd.sas.job.execution.job"
},
{
"method": "POST",
"rel": "up",
"href": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4/",
"uri": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4/",
"type": "text/plain",
"responseType": "application/vnd.sas.collection",
"responseItemType": "application/vnd.sas.job.execution.job"
},
{
"method": "POST",
"rel": "submitJob",
"href": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4/jobs",
"uri": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4/jobs",
"responseType": "application/vnd.sas.job.execution.job"
}
],
"name": "jobs",
"accept": "application/vnd.sas.job.execution.job",
"start": 0,
"count": 2,
"items": [
{
"creationTimeStamp": "2022-04-12T20:25:53.936Z",
"modifiedTimeStamp": "2022-04-12T20:26:14.424Z",
"createdBy": "user1",
"modifiedBy": "user1",
"version": 4,
"id": "2f52eecc-054b-45b0-837c-b3c21c6115a2",
"jobRequest": {
"creationTimeStamp": "2022-04-11T21:36:15.155Z",
"modifiedTimeStamp": "2022-04-11T21:36:15.155Z",
"createdBy": "sas.catalog",
"modifiedBy": "sas.catalog",
"version": 3,
"id": "3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4",
"name": "List Catalogs",
"jobDefinition": {
"creationTimeStamp": "1901-01-01T00:00:00.000Z",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"version": 1,
"name": "List Catalogs",
"type": "Compute",
"parameters": [],
"code": "%macro web_list_catalogs(library);\n\t%let library=%upcase(&library);\n proc sql ;\n create table work.catalogs as select memname as Catalog, memtype as \n Type, engine as Engine from sashelp.vmember where \n libname=\"&library\" and memtype=\"CATALOG\";\n run;\n title \"Catalogs in &library\";\n\n proc print data=work.catalogs;\n run;\n%mend;\n\n%web_list_catalogs(SASHELP);\n",
"properties": []
},
"arguments": {
"_contextName": "SAS Job Execution compute context"
},
"properties": [],
"createdByApplication": "jobExecution",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4",
"uri": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4",
"type": "application/vnd.sas.job.execution.job.request"
}
]
},
"state": "completed",
"endTimeStamp": "2022-04-12T20:26:14.423Z",
"heartbeatTimeStamp": "2022-04-12T20:25:54.349Z",
"submittedByApplication": "jobExecution",
"heartbeatInterval": 600,
"elapsedTime": 20487,
"results": {
"COMPUTE_CONTEXT": "SAS Studio compute context",
"1BCC3AB5-DC93-1040-8B87-B95E92D48DC5.log.txt": "/files/files/9ad6e3f4-998a-4512-922b-985ffa2f35bd",
"#LN00007": "/files/files/596eb924-93c7-48c8-a79c-b206f6f06df9",
"#LN00006": "/files/files/76962281-348a-4f57-978b-d3e42cd0677b",
"COMPUTE_JOB": "1BCC3AB5-DC93-1040-8B87-B95E92D48DC5",
"COMPUTE_SESSION": "13a661bb-68cc-4061-b49c-c989422c7199-ses0000 ended."
},
"logLocation": "/files/files/e685b834-ca4a-4de5-97e1-53474c3cfe7e",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobs/2f52eecc-054b-45b0-837c-b3c21c6115a2",
"uri": "/jobExecution/jobs/2f52eecc-054b-45b0-837c-b3c21c6115a2",
"type": "application/vnd.sas.job.execution.job"
},
{
"method": "GET",
"rel": "state",
"href": "/jobExecution/jobs/2f52eecc-054b-45b0-837c-b3c21c6115a2/state",
"uri": "/jobExecution/jobs/2f52eecc-054b-45b0-837c-b3c21c6115a2/state",
"type": "text/plain"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobExecution/jobs/2f52eecc-054b-45b0-837c-b3c21c6115a2",
"uri": "/jobExecution/jobs/2f52eecc-054b-45b0-837c-b3c21c6115a2",
"type": "application/vnd.sas.job.execution.job",
"responseType": "application/vnd.sas.job.execution.job"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobExecution/jobs/2f52eecc-054b-45b0-837c-b3c21c6115a2",
"uri": "/jobExecution/jobs/2f52eecc-054b-45b0-837c-b3c21c6115a2"
},
{
"method": "PUT",
"rel": "updateState",
"href": "/jobExecution/jobs/2f52eecc-054b-45b0-837c-b3c21c6115a2/state",
"uri": "/jobExecution/jobs/2f52eecc-054b-45b0-837c-b3c21c6115a2/state",
"type": "text/plain"
},
{
"method": "POST",
"rel": "updateHeartbeatTimeStamp",
"href": "/jobExecution/jobs/2f52eecc-054b-45b0-837c-b3c21c6115a2/heartbeatTimeStamp",
"uri": "/jobExecution/jobs/2f52eecc-054b-45b0-837c-b3c21c6115a2/heartbeatTimeStamp",
"type": "text/plain"
},
{
"method": "GET",
"rel": "jobRequest",
"href": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4",
"uri": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4",
"type": "application/vnd.sas.job.execution.job.request"
},
{
"method": "GET",
"rel": "log",
"href": "/files/files/e685b834-ca4a-4de5-97e1-53474c3cfe7e",
"uri": "/files/files/e685b834-ca4a-4de5-97e1-53474c3cfe7e"
}
]
},
{
"creationTimeStamp": "2022-04-12T20:25:09.668Z",
"modifiedTimeStamp": "2022-04-12T20:25:30.334Z",
"createdBy": "user1",
"modifiedBy": "user1",
"version": 4,
"id": "f47d224c-5951-47df-b188-488635e04706",
"jobRequest": {
"creationTimeStamp": "2022-04-11T21:36:15.155Z",
"modifiedTimeStamp": "2022-04-11T21:36:15.155Z",
"createdBy": "sas.catalog",
"modifiedBy": "sas.catalog",
"version": 3,
"id": "3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4",
"name": "List Catalogs",
"jobDefinition": {
"creationTimeStamp": "1901-01-01T00:00:00.000Z",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"version": 1,
"name": "List Catalogs",
"type": "Compute",
"parameters": [],
"code": "%macro web_list_catalogs(library);\n\t%let library=%upcase(&library);\n proc sql ;\n create table work.catalogs as select memname as Catalog, memtype as \n Type, engine as Engine from sashelp.vmember where \n libname=\"&library\" and memtype=\"CATALOG\";\n run;\n title \"Catalogs in &library\";\n\n proc print data=work.catalogs;\n run;\n%mend;\n\n%web_list_catalogs(SASHELP);\n",
"properties": []
},
"arguments": {
"_contextName": "SAS Job Execution compute context"
},
"properties": [],
"createdByApplication": "jobExecution",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4",
"uri": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4",
"type": "application/vnd.sas.job.execution.job.request"
}
]
},
"state": "completed",
"endTimeStamp": "2022-04-12T20:25:30.333Z",
"heartbeatTimeStamp": "2022-04-12T20:25:10.755Z",
"submittedByApplication": "jobExecution",
"heartbeatInterval": 600,
"elapsedTime": 20665,
"results": {
"COMPUTE_CONTEXT": "SAS Studio compute context",
"#LN00007": "/files/files/3dd98070-7e7c-4790-9520-8c3457788d4d",
"#LN00006": "/files/files/6b607655-ec5d-4f80-b328-dcb44c193e21",
"COMPUTE_JOB": "57E97ADB-4900-A241-A0B1-90DD5E96D781",
"COMPUTE_SESSION": "b7260a74-e5f6-42fa-bcd9-431b98544148-ses0000 ended.",
"57E97ADB-4900-A241-A0B1-90DD5E96D781.log.txt": "/files/files/1b327089-72e3-4a93-a7e5-ea7615abfead"
},
"logLocation": "/files/files/030e858d-47f4-45eb-b9b4-2073257d16b8",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobs/f47d224c-5951-47df-b188-488635e04706",
"uri": "/jobExecution/jobs/f47d224c-5951-47df-b188-488635e04706",
"type": "application/vnd.sas.job.execution.job"
},
{
"method": "GET",
"rel": "state",
"href": "/jobExecution/jobs/f47d224c-5951-47df-b188-488635e04706/state",
"uri": "/jobExecution/jobs/f47d224c-5951-47df-b188-488635e04706/state",
"type": "text/plain"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobExecution/jobs/f47d224c-5951-47df-b188-488635e04706",
"uri": "/jobExecution/jobs/f47d224c-5951-47df-b188-488635e04706",
"type": "application/vnd.sas.job.execution.job",
"responseType": "application/vnd.sas.job.execution.job"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobExecution/jobs/f47d224c-5951-47df-b188-488635e04706",
"uri": "/jobExecution/jobs/f47d224c-5951-47df-b188-488635e04706"
},
{
"method": "PUT",
"rel": "updateState",
"href": "/jobExecution/jobs/f47d224c-5951-47df-b188-488635e04706/state",
"uri": "/jobExecution/jobs/f47d224c-5951-47df-b188-488635e04706/state",
"type": "text/plain"
},
{
"method": "POST",
"rel": "updateHeartbeatTimeStamp",
"href": "/jobExecution/jobs/f47d224c-5951-47df-b188-488635e04706/heartbeatTimeStamp",
"uri": "/jobExecution/jobs/f47d224c-5951-47df-b188-488635e04706/heartbeatTimeStamp",
"type": "text/plain"
},
{
"method": "GET",
"rel": "jobRequest",
"href": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4",
"uri": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4",
"type": "application/vnd.sas.job.execution.job.request"
},
{
"method": "GET",
"rel": "log",
"href": "/files/files/030e858d-47f4-45eb-b9b4-2073257d16b8",
"uri": "/files/files/030e858d-47f4-45eb-b9b4-2073257d16b8"
}
]
}
],
"limit": 10,
"version": 2
}
{
"links": [
{
"method": "POST",
"rel": "collection",
"href": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4/jobs",
"uri": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4/jobs",
"type": "text/plain",
"responseType": "application/vnd.sas.collection",
"responseItemType": "application/vnd.sas.job.execution.job"
},
{
"method": "POST",
"rel": "self",
"href": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4/jobs",
"uri": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4/jobs",
"type": "text/plain",
"responseType": "application/vnd.sas.collection",
"responseItemType": "application/vnd.sas.job.execution.job"
},
{
"method": "POST",
"rel": "up",
"href": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4/",
"uri": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4/",
"type": "text/plain",
"responseType": "application/vnd.sas.collection",
"responseItemType": "application/vnd.sas.job.execution.job"
},
{
"method": "POST",
"rel": "submitJob",
"href": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4/jobs",
"uri": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4/jobs",
"responseType": "application/vnd.sas.job.execution.job"
}
],
"name": "jobs",
"accept": "application/vnd.sas.job.execution.job",
"start": 0,
"count": 2,
"items": [
{
"creationTimeStamp": "2022-04-12T20:25:53.936Z",
"modifiedTimeStamp": "2022-04-12T20:26:14.424Z",
"createdBy": "user1",
"modifiedBy": "user1",
"version": 4,
"id": "2f52eecc-054b-45b0-837c-b3c21c6115a2",
"jobRequest": {
"creationTimeStamp": "2022-04-11T21:36:15.155Z",
"modifiedTimeStamp": "2022-04-11T21:36:15.155Z",
"createdBy": "sas.catalog",
"modifiedBy": "sas.catalog",
"version": 3,
"id": "3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4",
"name": "List Catalogs",
"jobDefinition": {
"creationTimeStamp": "1901-01-01T00:00:00.000Z",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"version": 1,
"name": "List Catalogs",
"type": "Compute",
"parameters": [],
"code": "%macro web_list_catalogs(library);\n\t%let library=%upcase(&library);\n proc sql ;\n create table work.catalogs as select memname as Catalog, memtype as \n Type, engine as Engine from sashelp.vmember where \n libname=\"&library\" and memtype=\"CATALOG\";\n run;\n title \"Catalogs in &library\";\n\n proc print data=work.catalogs;\n run;\n%mend;\n\n%web_list_catalogs(SASHELP);\n",
"properties": []
},
"arguments": {
"_contextName": "SAS Job Execution compute context"
},
"properties": [],
"createdByApplication": "jobExecution",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4",
"uri": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4",
"type": "application/vnd.sas.job.execution.job.request"
}
]
},
"state": "completed",
"endTimeStamp": "2022-04-12T20:26:14.423Z",
"heartbeatTimeStamp": "2022-04-12T20:25:54.349Z",
"submittedByApplication": "jobExecution",
"heartbeatInterval": 600,
"elapsedTime": 20487,
"results": {
"COMPUTE_CONTEXT": "SAS Studio compute context",
"1BCC3AB5-DC93-1040-8B87-B95E92D48DC5.log.txt": "/files/files/9ad6e3f4-998a-4512-922b-985ffa2f35bd",
"#LN00007": "/files/files/596eb924-93c7-48c8-a79c-b206f6f06df9",
"#LN00006": "/files/files/76962281-348a-4f57-978b-d3e42cd0677b",
"COMPUTE_JOB": "1BCC3AB5-DC93-1040-8B87-B95E92D48DC5",
"COMPUTE_SESSION": "13a661bb-68cc-4061-b49c-c989422c7199-ses0000 ended."
},
"logLocation": "/files/files/e685b834-ca4a-4de5-97e1-53474c3cfe7e",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobs/2f52eecc-054b-45b0-837c-b3c21c6115a2",
"uri": "/jobExecution/jobs/2f52eecc-054b-45b0-837c-b3c21c6115a2",
"type": "application/vnd.sas.job.execution.job"
},
{
"method": "GET",
"rel": "state",
"href": "/jobExecution/jobs/2f52eecc-054b-45b0-837c-b3c21c6115a2/state",
"uri": "/jobExecution/jobs/2f52eecc-054b-45b0-837c-b3c21c6115a2/state",
"type": "text/plain"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobExecution/jobs/2f52eecc-054b-45b0-837c-b3c21c6115a2",
"uri": "/jobExecution/jobs/2f52eecc-054b-45b0-837c-b3c21c6115a2",
"type": "application/vnd.sas.job.execution.job",
"responseType": "application/vnd.sas.job.execution.job"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobExecution/jobs/2f52eecc-054b-45b0-837c-b3c21c6115a2",
"uri": "/jobExecution/jobs/2f52eecc-054b-45b0-837c-b3c21c6115a2"
},
{
"method": "PUT",
"rel": "updateState",
"href": "/jobExecution/jobs/2f52eecc-054b-45b0-837c-b3c21c6115a2/state",
"uri": "/jobExecution/jobs/2f52eecc-054b-45b0-837c-b3c21c6115a2/state",
"type": "text/plain"
},
{
"method": "POST",
"rel": "updateHeartbeatTimeStamp",
"href": "/jobExecution/jobs/2f52eecc-054b-45b0-837c-b3c21c6115a2/heartbeatTimeStamp",
"uri": "/jobExecution/jobs/2f52eecc-054b-45b0-837c-b3c21c6115a2/heartbeatTimeStamp",
"type": "text/plain"
},
{
"method": "GET",
"rel": "jobRequest",
"href": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4",
"uri": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4",
"type": "application/vnd.sas.job.execution.job.request"
},
{
"method": "GET",
"rel": "log",
"href": "/files/files/e685b834-ca4a-4de5-97e1-53474c3cfe7e",
"uri": "/files/files/e685b834-ca4a-4de5-97e1-53474c3cfe7e"
}
]
},
{
"creationTimeStamp": "2022-04-12T20:25:09.668Z",
"modifiedTimeStamp": "2022-04-12T20:25:30.334Z",
"createdBy": "user1",
"modifiedBy": "user1",
"version": 4,
"id": "f47d224c-5951-47df-b188-488635e04706",
"jobRequest": {
"creationTimeStamp": "2022-04-11T21:36:15.155Z",
"modifiedTimeStamp": "2022-04-11T21:36:15.155Z",
"createdBy": "sas.catalog",
"modifiedBy": "sas.catalog",
"version": 3,
"id": "3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4",
"name": "List Catalogs",
"jobDefinition": {
"creationTimeStamp": "1901-01-01T00:00:00.000Z",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"version": 1,
"name": "List Catalogs",
"type": "Compute",
"parameters": [],
"code": "%macro web_list_catalogs(library);\n\t%let library=%upcase(&library);\n proc sql ;\n create table work.catalogs as select memname as Catalog, memtype as \n Type, engine as Engine from sashelp.vmember where \n libname=\"&library\" and memtype=\"CATALOG\";\n run;\n title \"Catalogs in &library\";\n\n proc print data=work.catalogs;\n run;\n%mend;\n\n%web_list_catalogs(SASHELP);\n",
"properties": []
},
"arguments": {
"_contextName": "SAS Job Execution compute context"
},
"properties": [],
"createdByApplication": "jobExecution",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4",
"uri": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4",
"type": "application/vnd.sas.job.execution.job.request"
}
]
},
"state": "completed",
"endTimeStamp": "2022-04-12T20:25:30.333Z",
"heartbeatTimeStamp": "2022-04-12T20:25:10.755Z",
"submittedByApplication": "jobExecution",
"heartbeatInterval": 600,
"elapsedTime": 20665,
"results": {
"COMPUTE_CONTEXT": "SAS Studio compute context",
"#LN00007": "/files/files/3dd98070-7e7c-4790-9520-8c3457788d4d",
"#LN00006": "/files/files/6b607655-ec5d-4f80-b328-dcb44c193e21",
"COMPUTE_JOB": "57E97ADB-4900-A241-A0B1-90DD5E96D781",
"COMPUTE_SESSION": "b7260a74-e5f6-42fa-bcd9-431b98544148-ses0000 ended.",
"57E97ADB-4900-A241-A0B1-90DD5E96D781.log.txt": "/files/files/1b327089-72e3-4a93-a7e5-ea7615abfead"
},
"logLocation": "/files/files/030e858d-47f4-45eb-b9b4-2073257d16b8",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/jobs/f47d224c-5951-47df-b188-488635e04706",
"uri": "/jobExecution/jobs/f47d224c-5951-47df-b188-488635e04706",
"type": "application/vnd.sas.job.execution.job"
},
{
"method": "GET",
"rel": "state",
"href": "/jobExecution/jobs/f47d224c-5951-47df-b188-488635e04706/state",
"uri": "/jobExecution/jobs/f47d224c-5951-47df-b188-488635e04706/state",
"type": "text/plain"
},
{
"method": "PUT",
"rel": "update",
"href": "/jobExecution/jobs/f47d224c-5951-47df-b188-488635e04706",
"uri": "/jobExecution/jobs/f47d224c-5951-47df-b188-488635e04706",
"type": "application/vnd.sas.job.execution.job",
"responseType": "application/vnd.sas.job.execution.job"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/jobExecution/jobs/f47d224c-5951-47df-b188-488635e04706",
"uri": "/jobExecution/jobs/f47d224c-5951-47df-b188-488635e04706"
},
{
"method": "PUT",
"rel": "updateState",
"href": "/jobExecution/jobs/f47d224c-5951-47df-b188-488635e04706/state",
"uri": "/jobExecution/jobs/f47d224c-5951-47df-b188-488635e04706/state",
"type": "text/plain"
},
{
"method": "POST",
"rel": "updateHeartbeatTimeStamp",
"href": "/jobExecution/jobs/f47d224c-5951-47df-b188-488635e04706/heartbeatTimeStamp",
"uri": "/jobExecution/jobs/f47d224c-5951-47df-b188-488635e04706/heartbeatTimeStamp",
"type": "text/plain"
},
{
"method": "GET",
"rel": "jobRequest",
"href": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4",
"uri": "/jobExecution/jobRequests/3c6338bf-a2a0-4d2a-89d2-22d64ffb69e4",
"type": "application/vnd.sas.job.execution.job.request"
},
{
"method": "GET",
"rel": "log",
"href": "/files/files/030e858d-47f4-45eb-b9b4-2073257d16b8",
"uri": "/files/files/030e858d-47f4-45eb-b9b4-2073257d16b8"
}
]
}
],
"limit": 10,
"version": 2
}
This is an example of a Bad Request response to a
GET
job request jobs.
{
"errorCode": 1126,
"message": "The limit parameter must be greater or equal to zero.",
"details": [
"traceId: 5d6244b36dea012d",
"path: /jobExecution/jobRequests/71d7f203-4a30-4471-9f35-b29e32126b5c/jobs"
],
"links": [],
"version": 2,
"httpStatusCode": 400
}
{
"errorCode": 1126,
"message": "The limit parameter must be greater or equal to zero.",
"details": [
"traceId: 5d6244b36dea012d",
"path: /jobExecution/jobRequests/71d7f203-4a30-4471-9f35-b29e32126b5c/jobs"
],
"links": [],
"version": 2,
"httpStatusCode": 400
}
This is an example of a Not Found response to
GET
job request jobs.
{
"errorCode": 0,
"message": "Job request not found with ID: 71d7f203-4a30-4471-9f35-b29e32126b5cx",
"details": [
"traceId: ce7ea434b871b7bc",
"path: /jobExecution/jobRequests/71d7f203-4a30-4471-9f35-b29e32126b5cx/jobs"
],
"links": [],
"version": 2,
"httpStatusCode": 404
}
{
"errorCode": 0,
"message": "Job request not found with ID: 71d7f203-4a30-4471-9f35-b29e32126b5cx",
"details": [
"traceId: ce7ea434b871b7bc",
"path: /jobExecution/jobRequests/71d7f203-4a30-4471-9f35-b29e32126b5cx/jobs"
],
"links": [],
"version": 2,
"httpStatusCode": 404
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. The jobs (if any) are returned in a resource collection. | jobCollection |
400 | Bad Request | The request was not valid. An invalid request occurs in the following scenarios:
|
error2 |
404 | Not Found | No job request exists at the requested path. | error2 |
Providers
Contains the operations for the Providers resource.
Get a list of providers
Code samples
# You can also use wget
curl -X GET http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/providers \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json' \
-H 'Accept-Item: application/vnd.sas.job.execution.provider.summary+json'
const headers = {
'Accept':'application/vnd.sas.collection+json',
'Accept-Item':'application/vnd.sas.job.execution.provider.summary+json'
};
fetch('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/providers',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json',
'Accept-Item': 'application/vnd.sas.job.execution.provider.summary+json'
}
r = requests.get('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/providers', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.collection+json"},
"Accept-Item": []string{"application/vnd.sas.job.execution.provider.summary+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/providers", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /providers
Returns a collection of application/vnd.sas.job.execution.provider resources. Standard paging, filtering, and sorting options are specified in the Parameters section.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Item | header | string | false | The desired column representation. The Accept-Item options are:
|
start | query | integer | false | The zero-based index of the first provider to be returned. The default is 0 (zero). |
limit | query | integer | false | The maximum number of providers to return in this page of results. The actual number of returned providers might be less if the collection has been exhausted. The default is 10. |
filter | query | string(filter-criteria) | false | Filter criteria for the returned providers. The only valid filter is by id . The supported functions are: and, or, not, eq, lt, le, gt, ge, contains, startsWith, endsWith, isNull. The following queries are examples:
|
sortBy | query | string(sort-criteria) | false | Specifies how the providers are sorted. The only valid sorting option is the ID field. The default sort order is ascending on the ID field. The following sorts are examples:
|
Enumerated Values
Parameter | Value |
---|---|
Accept-Item | application/vnd.sas.job.execution.provider.summary+json |
Accept-Item | application/vnd.sas.job.execution.provider+json |
Example responses
Get providers response
{
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/jobExecution/providers",
"uri": "/jobExecution/providers",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/providers?start=0&limit=10",
"uri": "/jobExecution/providers?start=0&limit=10",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.provider.summary"
},
{
"method": "GET",
"rel": "next",
"href": "/jobExecution/providers?start=10&limit=10",
"uri": "/jobExecution/providers?start=10&limit=10",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "last",
"href": "/jobExecution/providers?start=10&limit=10",
"uri": "/jobExecution/providers?start=10&limit=10",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "up",
"href": "/jobExecution/",
"uri": "/jobExecution/",
"type": "application/vnd.sas.api"
}
],
"name": "providers",
"accept": "application/vnd.sas.job.execution.provider.summary application/vnd.sas.job.execution.provider",
"start": 0,
"count": 2,
"items": [
{
"id": "AnalyticsFlow",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/providers/AnalyticsFlow",
"uri": "/jobExecution/providers/AnalyticsFlow",
"type": "application/vnd.sas.job.execution.provider"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobExecution/providers/AnalyticsFlow",
"uri": "/jobExecution/providers/AnalyticsFlow",
"type": "application/vnd.sas.job.execution.provider.summary"
},
{
"method": "GET",
"rel": "up",
"href": "/jobExecution/providers",
"uri": "/jobExecution/providers",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.provider.summary"
}
],
"version": 1
},
{
"id": "Compute",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/providers/Compute",
"uri": "/jobExecution/providers/Compute",
"type": "application/vnd.sas.job.execution.provider"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobExecution/providers/Compute",
"uri": "/jobExecution/providers/Compute",
"type": "application/vnd.sas.job.execution.provider.summary"
},
{
"method": "GET",
"rel": "up",
"href": "/jobExecution/providers",
"uri": "/jobExecution/providers",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.provider.summary"
}
],
"version": 1
}
],
"limit": 10,
"version": 2
}
{
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/jobExecution/providers",
"uri": "/jobExecution/providers",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/providers?start=0&limit=10",
"uri": "/jobExecution/providers?start=0&limit=10",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.provider.summary"
},
{
"method": "GET",
"rel": "next",
"href": "/jobExecution/providers?start=10&limit=10",
"uri": "/jobExecution/providers?start=10&limit=10",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "last",
"href": "/jobExecution/providers?start=10&limit=10",
"uri": "/jobExecution/providers?start=10&limit=10",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "up",
"href": "/jobExecution/",
"uri": "/jobExecution/",
"type": "application/vnd.sas.api"
}
],
"name": "providers",
"accept": "application/vnd.sas.job.execution.provider.summary application/vnd.sas.job.execution.provider",
"start": 0,
"count": 2,
"items": [
{
"id": "AnalyticsFlow",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/providers/AnalyticsFlow",
"uri": "/jobExecution/providers/AnalyticsFlow",
"type": "application/vnd.sas.job.execution.provider"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobExecution/providers/AnalyticsFlow",
"uri": "/jobExecution/providers/AnalyticsFlow",
"type": "application/vnd.sas.job.execution.provider.summary"
},
{
"method": "GET",
"rel": "up",
"href": "/jobExecution/providers",
"uri": "/jobExecution/providers",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.provider.summary"
}
],
"version": 1
},
{
"id": "Compute",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/providers/Compute",
"uri": "/jobExecution/providers/Compute",
"type": "application/vnd.sas.job.execution.provider"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobExecution/providers/Compute",
"uri": "/jobExecution/providers/Compute",
"type": "application/vnd.sas.job.execution.provider.summary"
},
{
"method": "GET",
"rel": "up",
"href": "/jobExecution/providers",
"uri": "/jobExecution/providers",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.provider.summary"
}
],
"version": 1
}
],
"limit": 10,
"version": 2
}
This is an example of a Bad Request response to
GET
providers.
{
"errorCode": 0,
"message": "The start parameter must be greater than or equal to zero.",
"details": [
"traceId: 5b1a8a8cee185add",
"path: /jobExecution/providers"
],
"links": [],
"version": 2,
"httpStatusCode": 400
}
{
"errorCode": 0,
"message": "The start parameter must be greater than or equal to zero.",
"details": [
"traceId: 5b1a8a8cee185add",
"path: /jobExecution/providers"
],
"links": [],
"version": 2,
"httpStatusCode": 400
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. The providers (if any) are returned in a resource collection. | providerSummaryCollection |
400 | Bad Request | The request was not valid. An invalid request occurs in the following scenarios:
|
error2 |
Get provider information
Code samples
# You can also use wget
curl -X GET http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/providers/{providerId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.job.execution.provider+json'
const headers = {
'Accept':'application/vnd.sas.job.execution.provider+json'
};
fetch('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/providers/{providerId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.job.execution.provider+json'
}
r = requests.get('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/providers/{providerId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.job.execution.provider+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/providers/{providerId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /providers/{providerId}
Returns information about a single provider based on its unique ID.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
providerId | path | string | true | The ID of the provider. |
Example responses
Get provider response.
{
"id": "Compute",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/providers/Compute",
"uri": "/jobExecution/providers/Compute",
"type": "application/vnd.sas.job.execution.provider"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobExecution/providers/Compute",
"uri": "/jobExecution/providers/Compute",
"type": "application/vnd.sas.job.execution.provider.summary"
},
{
"method": "GET",
"rel": "up",
"href": "/jobExecution/providers",
"uri": "/jobExecution/providers",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.provider.summary"
}
],
"version": 1,
"heartbeatInterval": 600
}
{
"id": "Compute",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/providers/Compute",
"uri": "/jobExecution/providers/Compute",
"type": "application/vnd.sas.job.execution.provider"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobExecution/providers/Compute",
"uri": "/jobExecution/providers/Compute",
"type": "application/vnd.sas.job.execution.provider.summary"
},
{
"method": "GET",
"rel": "up",
"href": "/jobExecution/providers",
"uri": "/jobExecution/providers",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.provider.summary"
}
],
"version": 1,
"heartbeatInterval": 600
}
{
"id": "Compute",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/jobExecution/providers/Compute",
"uri": "/jobExecution/providers/Compute",
"type": "application/vnd.sas.job.execution.provider"
},
{
"method": "GET",
"rel": "alternate",
"href": "/jobExecution/providers/Compute",
"uri": "/jobExecution/providers/Compute",
"type": "application/vnd.sas.job.execution.provider.summary"
},
{
"method": "GET",
"rel": "up",
"href": "/jobExecution/providers",
"uri": "/jobExecution/providers",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.job.execution.provider.summary"
}
],
"version": 1,
"heartbeatInterval": 600
}
This is an example of a Not Found response to a
GET
provider.
{
"errorCode": 0,
"message": "The execution provider \"Computex\" could not be found.",
"details": [
"traceId: 5b425b19ea3b3609",
"path: /jobExecution/providers/Computex"
],
"links": [],
"version": 2,
"httpStatusCode": 404
}
{
"errorCode": 0,
"message": "The execution provider \"Computex\" could not be found.",
"details": [
"traceId: 5b425b19ea3b3609",
"path: /jobExecution/providers/Computex"
],
"links": [],
"version": 2,
"httpStatusCode": 404
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | provider |
404 | Not Found | No job request exists at the requested path. | error2 |
Check whether a provider exists
Code samples
# You can also use wget
curl -X HEAD http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/providers/{providerId}
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/providers/{providerId}',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/providers/{providerId}')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "http://mock-jobExecution.apifirst.unx.sas.com/jobExecution/providers/{providerId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /providers/{providerId}
Returns the header information for the provider.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
providerId | path | string | true | The ID of the provider. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
404 | Not Found | The provider does not exist at the requested path. | None |
Schemas
jobDefinitionParameter
{
"name": "string",
"type": "string",
"label": "string",
"required": true,
"defaultValue": "string",
"version": 0
}
Job Definition Parameter Schema
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | false | none | The name of the parameter. |
type | string | false | none | The type of the parameter (TABLE, NUMERIC, DATE, CHARACTER). |
label | string | false | none | The display value for the name of this parameter. |
required | boolean | false | none | Specifies if the parameter is required for execution. |
defaultValue | string | false | none | The default value for this parameter, if one is not specified at execution time. |
version | integer | false | none | The version number of the representation. The current version is 1. |
jobDefinition
{
"id": "string",
"name": "string",
"description": "string",
"type": "string",
"code": "string",
"parameters": [
{
"name": "string",
"type": "string",
"label": "string",
"required": true,
"defaultValue": "string",
"version": 0
}
],
"properties": [
{
"name": "string",
"value": "string"
}
],
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedBy": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Job Definition Schema
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | The unique identifier for the job that is generated by the API. |
name | string | false | none | The name of the job. |
description | string | false | none | The description of the job. |
type | string | false | none | The type of job. This property determines the execution provider that executes this job. |
code | string | false | none | Execution-provider-specific code to be executed. |
parameters | [jobDefinitionParameter] | false | none | An array of input parameters to be collected when executing this job definition |
properties | [resourceProperty] | false | none | An array of name-value pairs required to execute a job definition The maximum name length is 100. |
creationTimeStamp | string(date-time) | false | none | The timestamp when the job was created. It uses the format YYYY-MM-DDThh:mm:ss.sssZ . |
modifiedTimeStamp | string(date-time) | false | none | The timestamp when the job was last modified. It uses the format YYYY-MM-DDThh:mm:ss.sssZ . |
createdBy | string | false | none | The name of the user who created the job. |
modifiedBy | string | false | none | The name of the last user who modified this object. |
links | [link] | false | none | Links that apply to this object. Includes "self" and "alternate". |
version | integer | false | none | The version number of the representation. The current version is 2. |
jobRequest
{
"id": "string",
"name": "string",
"description": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedBy": "string",
"jobDefinitionUri": "string",
"jobDefinition": {
"id": "string",
"name": "string",
"description": "string",
"type": "string",
"code": "string",
"parameters": [
{
"name": "string",
"type": "string",
"label": "string",
"required": true,
"defaultValue": "string",
"version": 0
}
],
"properties": [
{
"name": "string",
"value": "string"
}
],
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedBy": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
},
"expiresAfter": "string",
"arguments": {
"property1": "string",
"property2": "string"
},
"properties": [
{
"name": "string",
"value": "string"
}
],
"createdByApplication": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Job Request Schema
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | The unique identifier for the job request. This is only required for a persisted job request. |
name | string | false | none | The name of the job request. |
description | string | false | none | The description of the job request. |
creationTimeStamp | string(date-time) | false | none | The timestamp when the job request was created. It uses the format YYYY-MM-DDThh:mm:ss.sssZ . This is set only on a persisted job request. |
modifiedTimeStamp | string(date-time) | false | none | The timestamp when the job request was last modified. It uses the format YYYY-MM-DDThh:mm:ss.sssZ . This is set only on a persisted job request. |
createdBy | string | false | none | The name of the user who created the job request. This is set only on a persisted job request. |
modifiedBy | string | false | none | The name of the last user who modified this object. This is set only on a persisted job request |
jobDefinitionUri | string | false | none | The URI of the job definition that is to be executed. Either the jobDefinitionUri or the jobDefinition property must be set in a job request submitted to Job Execution service for execution. |
jobDefinition | jobDefinition | false | none | The job definition. |
expiresAfter | string | false | none | The duration of time (in W3C XML duration format) after the completion of the job when the job must be deleted by the Job Execution service. If a value is specified for this property, it overrides any value specified by the provider's /commons/settings endpoint for the job request. For a job request that is embedded in the application/vnd.sas.job.execution.job media type, if a value is not already set for the expiresAfter property, the value is set by the Job Execution service to the provider's value, if one exists. |
arguments | object | false | none | The values of the arguments are name-value pairs specified as a map of string keys and values. Values can be supplied for parameters not defined in the job definition. The maximum name length is 100. Hibernate does not persist a map entry with a null value. Therefore, a persisted Job Request does not contain such entries. For a job request that is embedded in the 'application/vnd.sas.job.execution.job' media type, this value is set by the Job Execution service and contains the complete set of arguments to use in the execution by the provider. Arguments that already exist in the original job request are left unchanged. If there are arguments in the job definition that do not exist in the original job request arguments map, those arguments and any default values, including null values, are added to the arguments map. However, because the Job object is persisted before being sent to the provider, no entries for such null-value arguments in the Job are sent to the provider (because of the Hibernate behavior of not persisting map/collection entries with null values). The Job Execution service also guarantees that any required argument has an associated non-null value. |
» additionalProperties | string | false | none | none |
properties | [resourceProperty] | false | none | The value of properties are name-value pairs specified as a map of string keys and values. The maximum name length is 100. |
createdByApplication | string | false | none | The application that created the job request. The value is typically from the spring.application.name property. The value is used as the "creator" in the routing key of the Job State Change events, and if it is not present in the job request the value "jobExecution" is used. Valid characters are [a-zA-Z0-9] and the hyphen. |
links | [link] | false | none | Links that apply to this object. Includes "self", "alternate", "export", "delete", "update", "import", "up", "jobs" and "submitJob". |
version | integer | false | none | The version number of the representation. The current version is 3. |
job
{
"id": "string",
"state": "pending",
"stateDetails": "string",
"results": {
"property1": "string",
"property2": "string"
},
"error": {
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
},
"jobRequest": {
"id": "string",
"name": "string",
"description": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedBy": "string",
"jobDefinitionUri": "string",
"jobDefinition": {
"id": "string",
"name": "string",
"description": "string",
"type": "string",
"code": "string",
"parameters": [
{
"name": "string",
"type": "string",
"label": "string",
"required": true,
"defaultValue": "string",
"version": 0
}
],
"properties": [
{
"name": "string",
"value": "string"
}
],
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedBy": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
},
"expiresAfter": "string",
"arguments": {
"property1": "string",
"property2": "string"
},
"properties": [
{
"name": "string",
"value": "string"
}
],
"createdByApplication": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
},
"heartbeatInterval": 0,
"heartbeatTimeStamp": "2019-08-24T14:15:22Z",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"endTimeStamp": "2019-08-24T14:15:22Z",
"elapsedTime": 0,
"logLocation": "string",
"expirationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedBy": "string",
"submittedByApplication": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Execution Job Schema
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | The unique identifier that is generated by the API. |
state | string | false | none | The current state of the job. |
stateDetails | string | false | none | Details that supplement the "state" by providing a hint that additional information is available. It is a hint and not the actual information. The purpose of this field is for providers to provide a hint, where applicable, about the state set and for that hint to be used by components which convey state information to clients. It must be set in conjunction with "state". |
results | object | false | none | The output of the job execution as a map of string keys and values. |
» additionalProperties | string | false | none | none |
error | error2 | false | none | The representation of an error. |
jobRequest | jobRequest | false | none | The job request. |
heartbeatInterval | integer(int32) | false | none | The interval in seconds that the heartbeatTimeStamp is updated by the provider before the job times out. This is 0 if there is no heartbeat. |
heartbeatTimeStamp | string(date-time) | false | none | The timestamp identifying when the last heartbeat was received. It uses the format YYYY-MM-DDThh:mm:ss.sssZ . |
creationTimeStamp | string(date-time) | false | none | The timestamp identifying when the job was created. It uses the format YYYY-MM-DDThh:mm:ss.sssZ . |
modifiedTimeStamp | string(date-time) | false | none | The timestamp identifying when the job was last modified. It uses the format YYYY-MM-DDThh:mm:ss.sssZ . |
endTimeStamp | string(date-time) | false | none | The timestamp identifying when the job state changed to completed or failed. It uses the format YYYY-MM-DDThh:mm:ss.sssZ . |
elapsedTime | number | false | none | If the job has ended, the value is the difference between the endTimeStamp and the creationTimeStamp. If the job has not ended, the value is the difference between the time that this representation was created and the creationTimeStamp. The units are in milliseconds. A value of -1 is returned if a value is not set for the creationTimeStamp. |
logLocation | string | false | none | The URI for the log, if one exists. The provider might provide additional information. |
expirationTimeStamp | string(date-time) | false | none | The timestamp when the job expired and is deleted by the Job Execution service. It uses the format YYYY-MM-DDThh:mm:ss.sssZ . This is set by the service after the job has completed based on the value of the expiresAfter member of the job request. |
createdBy | string | false | none | The name of the user who created or submitted the job. |
modifiedBy | string | false | none | The name of the last user who modified this object. |
submittedByApplication | string | false | none | Value of the query parameter "submitter" on the POST endpoints to submit a job. If the query parameter is not present, the createdByApplication value from the embedded JobRequest is used. The createdByApplication value in the embedded JobRequest that is used is the same as what was in the submitted job request if one was present. If it is not present, the value "jobExecution" is used. The submittedByApplication value is used as the "submitter" in the routing routing key of Job State Change events. Only characters in the set [a-zA-Z0-9] and hyphen are valid for submitter. |
links | [link] | false | none | Links that apply to this object. Includes "self", "state", "update", "delete", "updateState", "updateHeartbeatTimeStamp", "jobRequest" and "log". |
version | integer | false | none | The version number of the representation. The current version is 4. |
Enumerated Values
Property | Value |
---|---|
state | pending |
state | running |
state | canceled |
state | completed |
state | failed |
state | timedOut |
jobRequestCollection
{
"name": "string",
"start": 0,
"limit": 0,
"count": 0,
"accept": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0,
"items": [
{
"id": "string",
"name": "string",
"description": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedBy": "string",
"jobDefinitionUri": "string",
"jobDefinition": {
"id": "string",
"name": "string",
"description": "string",
"type": "string",
"code": "string",
"parameters": [
{
"name": "string",
"type": "string",
"label": "string",
"required": true,
"defaultValue": "string",
"version": 0
}
],
"properties": [
{
"name": "string",
"value": "string"
}
],
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedBy": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
},
"expiresAfter": "string",
"arguments": {
"property1": "string",
"property2": "string"
},
"properties": [
{
"name": "string",
"value": "string"
}
],
"createdByApplication": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
]
}
Job Request Collection
Properties
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | baseCollection2 | false | none | This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2). |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» items | [jobRequest] | true | none | An array containing job-request resources. |
jobCollection
{
"name": "string",
"start": 0,
"limit": 0,
"count": 0,
"accept": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0,
"items": [
{
"id": "string",
"state": "pending",
"stateDetails": "string",
"results": {
"property1": "string",
"property2": "string"
},
"error": {
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
},
"jobRequest": {
"id": "string",
"name": "string",
"description": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedBy": "string",
"jobDefinitionUri": "string",
"jobDefinition": {
"id": "string",
"name": "string",
"description": "string",
"type": "string",
"code": "string",
"parameters": [
{
"name": "string",
"type": "string",
"label": "string",
"required": true,
"defaultValue": "string",
"version": 0
}
],
"properties": [
{
"name": "string",
"value": "string"
}
],
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedBy": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
},
"expiresAfter": "string",
"arguments": {
"property1": "string",
"property2": "string"
},
"properties": [
{
"name": "string",
"value": "string"
}
],
"createdByApplication": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
},
"heartbeatInterval": 0,
"heartbeatTimeStamp": "2019-08-24T14:15:22Z",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"endTimeStamp": "2019-08-24T14:15:22Z",
"elapsedTime": 0,
"logLocation": "string",
"expirationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedBy": "string",
"submittedByApplication": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
]
}
Job Collection
Properties
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | baseCollection2 | false | none | This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2). |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» items | [job] | true | none | An array that contains job resources. |
resourceProperty
{
"name": "string",
"value": "string"
}
Resource Property
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | false | none | The name. |
value | string | false | none | The value. |
providerSummary
{
"id": "string",
"version": 0,
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
]
}
Provider Summary
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | The unique provider identifier. |
version | integer | false | none | The version of the provider schema. |
links | [link] | false | none | The links that apply to this resource. |
provider
{
"id": "string",
"version": 0,
"heartbeatInterval": 0,
"expiresAfter": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
]
}
Provider
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | The unique provider identifier. |
version | integer | false | none | The version of the provider schema. |
heartbeatInterval | integer(int32) | false | none | The interval (in seconds) that the heartbeatTimeStamp is updated by the provider before the job times out. This is 0 if there is no heartbeat. |
expiresAfter | string | false | none | The duration of time (in W3C XML duration format) after the job is complete when the job must be deleted by the job execution API. For example, to indicate that the job expires after 30 days, write: P30D . |
links | [link] | false | none | The links that apply to this resource. |
providerSummaryCollection
{
"name": "string",
"start": 0,
"limit": 0,
"count": 0,
"accept": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0,
"items": [
{
"id": "string",
"version": 0,
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
]
}
]
}
Provider Summary Collection
Properties
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | baseCollection2 | false | none | This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2). |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» items | [providerSummary] | true | none | An array containing provider resources. |
jobSubmitCollection
{
"name": "string",
"start": 0,
"limit": 0,
"count": 0,
"accept": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0,
"items": [
{
"id": "string",
"state": "pending",
"stateDetails": "string",
"results": {
"property1": "string",
"property2": "string"
},
"error": {
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
},
"jobRequest": {
"id": "string",
"name": "string",
"description": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedBy": "string",
"jobDefinitionUri": "string",
"jobDefinition": {
"id": "string",
"name": "string",
"description": "string",
"type": "string",
"code": "string",
"parameters": [
{
"name": "string",
"type": "string",
"label": "string",
"required": true,
"defaultValue": "string",
"version": 0
}
],
"properties": [
{
"name": "string",
"value": "string"
}
],
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedBy": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
},
"expiresAfter": "string",
"arguments": {
"property1": "string",
"property2": "string"
},
"properties": [
{
"name": "string",
"value": "string"
}
],
"createdByApplication": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
},
"heartbeatInterval": 0,
"heartbeatTimeStamp": "2019-08-24T14:15:22Z",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"endTimeStamp": "2019-08-24T14:15:22Z",
"elapsedTime": 0,
"logLocation": "string",
"expirationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedBy": "string",
"submittedByApplication": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
]
}
Collection of job objects and possibly error objects.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
Collection of job objects and possibly error objects. | any | false | none | A collection of job or error objects. When submitting multiple jobs, the items in the response MUST match 1-to-1 with the items in the request. The corresponding item is either a job object or an error object. |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | baseCollection2 | false | none | This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2). |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» items | [jobOrError] | false | none | Job objects and error objects. |
jobOrError
{
"id": "string",
"state": "pending",
"stateDetails": "string",
"results": {
"property1": "string",
"property2": "string"
},
"error": {
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
},
"jobRequest": {
"id": "string",
"name": "string",
"description": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedBy": "string",
"jobDefinitionUri": "string",
"jobDefinition": {
"id": "string",
"name": "string",
"description": "string",
"type": "string",
"code": "string",
"parameters": [
{
"name": "string",
"type": "string",
"label": "string",
"required": true,
"defaultValue": "string",
"version": 0
}
],
"properties": [
{
"name": "string",
"value": "string"
}
],
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedBy": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
},
"expiresAfter": "string",
"arguments": {
"property1": "string",
"property2": "string"
},
"properties": [
{
"name": "string",
"value": "string"
}
],
"createdByApplication": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
},
"heartbeatInterval": 0,
"heartbeatTimeStamp": "2019-08-24T14:15:22Z",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"endTimeStamp": "2019-08-24T14:15:22Z",
"elapsedTime": 0,
"logLocation": "string",
"expirationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedBy": "string",
"submittedByApplication": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Job or error object
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
Job or error object | any | false | none | A job object or error object. |
oneOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | job | false | none | The execution job. |
xor
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | error2 | false | none | The representation of an error. |
updateJobsStateCollection
{
"name": "string",
"start": 0,
"limit": 0,
"count": 0,
"accept": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0,
"items": [
{
"name": "string",
"id": "string",
"type": "string",
"description": "string",
"typeDefName": "string",
"iconUri": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
]
}
Collection of resource summary and possibly error objects.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
Collection of resource summary and possibly error objects. | any | false | none | A collection of resource summary or error objects. When updating the state of multiple jobs, the items in the response MUST match 1-to-1 with the items in the request. The corresponding item is either a resource-summary object or an error object. |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | baseCollection2 | false | none | This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2). |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» items | [resourceSummaryOrError] | false | none | Resource-summary objects and error objects. |
resourceSummaryOrError
{
"name": "string",
"id": "string",
"type": "string",
"description": "string",
"typeDefName": "string",
"iconUri": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Resource summary or error object
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
Resource summary or error object | any | false | none | A resource-summary object or error object. |
oneOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | resourceSummary | false | none | The resource-summary object. |
xor
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | error2 | false | none | The representation of an error. |
resourceSummary
{
"name": "string",
"id": "string",
"type": "string",
"description": "string",
"typeDefName": "string",
"iconUri": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Resource Summary Schema
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | false | none | The name of the resource. |
id | string | false | none | The ID of the resource. |
type | string | false | none | The resource type. |
description | string | false | none | The resource description. |
typeDefName | string | false | none | The name of the TypeDef. |
iconUri | string | false | none | The icon URI. |
links | [link] | false | none | Paging links that apply to this object. |
version | integer | false | none | The version of the resource-summary schema. This is version 2. |
baseCollection2
{
"name": "string",
"start": 0,
"limit": 0,
"count": 0,
"accept": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Base Collection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | false | none | The name of the collection. |
start | integer(int64) | false | none | The zero-based index of the first item in the collection. |
limit | integer | false | none | The number of items that were requested for the collection. |
count | integer(int64) | false | none | If populated, indicates the number of items in the collection. |
accept | string | false | none | A space-delimited list of media types from which an Accept header can be constructed. |
links | [link] | false | none | The links that apply to the collection. |
version | integer | false | none | The version number of the collection representation. This representation is version 2. |
link
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
Link
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
method | string | false | none | The HTTP method for the link. |
rel | string | true | none | The relationship of the link to the resource. |
uri | string | false | none | The relative URI for the link. |
href | string | false | none | The URL for the link. |
title | string | false | none | The title for the link. |
type | string | false | none | The media type or link type for the link. |
itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
error2
{
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Error
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
message | string | false | none | The message for the error. |
id | string | false | none | The string ID for the error. |
errorCode | integer | false | none | The numeric ID for the error. |
httpStatusCode | integer | true | none | The HTTP status code for the error. |
details | [string] | false | none | Messages that provide additional details about the cause of the error. |
remediation | string | false | none | A message that describes how to resolve the error. |
errors | [error2] | false | none | Any additional errors that occurred. |
links | [link] | false | none | The links that apply to the error. |
version | integer | true | none | The version number of the error representation. This representation is version 2. |
resourceSelection
{
"name": "string",
"type": "id",
"template": "https://example.com",
"resources": [
"string"
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
Resource Selection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | false | none | The ID of the selection. |
type | string | false | none | Specifies whether the resources array contains IDs, URIs, or both. If \"id\", the array contains resource identifiers only. This is the default if \"type\" is omitted. If \"uri\", the array contains resource URIs. If \"mixed\", the array contains a mixture of identifiers and URIs. |
template | string(uri) | false | none | A URI template in which the {id} parameter can be replaced with a value from the \"resources\" array in order to yield the URI of the identified resource. |
resources | [string] | true | none | The selected resources as an array of resource IDs or URIs. |
links | [link] | false | none | The links that apply to the selection. |
version | integer | true | none | The schema version number of this media type. This representation is version 1. |
Enumerated Values
Property | Value |
---|---|
type | id |
type | uri |
type | mixed |
api
{
"version": 1,
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
]
}
API
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
version | integer | true | none | The version number of the API representation. This is version 3. |
links | [link] | true | none | The API's top-level links. |
Examples
Github Examples
Detailed examples on how to use this API can be found on Github.
Compute
Base URLs:
- https://example.com/compute
Terms of service Email: SAS Developers Web: SAS Developers
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
The Compute API enables users to submit and execute SAS code using REST calls. Users can manage Compute contexts, create sessions, submit jobs, and access information about the session.
Usage Notes
Overview
The Compute API defines the replacement for the application servers that were used for SAS 9. The Compute API enables clients to perform the following tasks:
- Submit and execute SAS code.
- Obtain the SAS log or listing information from executed SAS code.
- View output that is generated by a SAS code submission.
- Access SAS data sets that are created by a SAS code submission.
- Access SAS filerefs that are created by a SAS code submission.
- Access SAS variables that are defined and used in a SAS code submission.
- Retrieve information about engines that are available in a session.
The Compute API can define a Compute context using Create, Read, Update, and Delete operations. A Compute context is analogous to the SAS Application Server from the SAS V9 engine. There are also endpoints that enable you to request a Compute session. A Compute session runs on a SAS Compute Server and serves as the access point to SAS language processing in this environment. A Compute session replaces the functionality of the SAS Workspace Server and SAS Stored Process Server from SAS 9.
The Compute API enables the following tasks:
- Define a Compute context.
- Manage a Compute context.
- Create a Compute session to work in.
- Reference resources from other APIs.
- Submit a job to run in a Compute session. A job can be a single line of SAS code or a complex SAS program.
- Obtain the log of all submitted SAS code during a Compute session.
- Obtain the listing output of all submitted SAS code during a Compute session.
- Obtain links to results for output that is generated by a job that you submitted during a Compute session.
- Access SAS data sets that are available to you.
- Access files via SAS filerefs that are available to you.
- Access SAS macro variables that are defined during a Compute session.
- Retrieve information about available engines in the system.
- Access or update SAS options that are available during a Compute session.
The Compute API also acts as a provider for the following APIs. The Compute API registers itself as a provider with the name Compute when it interacts with these APIs.
- Job Execution API
- Data Sources API
- Data Tables API
- Row Sets API
Life Cycle Management
There are several resources that are available to the Compute API. These resources have different life cycles, depending on their usage by clients. This section describes the life cycles of these resources.
SAS Compute Server
A SAS Compute Server is a running process. The Compute API forwards requests to the SAS Compute Server for processing. When a client requests a Compute session from the Compute API, the Compute API determines whether there are any SAS Compute Servers that can handle the request. The client provides a Compute context when requesting a Compute session, and the Compute API attempts to find a suitable SAS Compute Server to handle the request for that context. If no suitable SAS Compute Server is found, a new SAS Compute Server process is launched, and a Compute session is created for the new SAS Compute Server.
Compute Session
A Compute session is created on the SAS Compute Server when a client needs to perform tasks. The client makes a request for a session via the Compute API. The Compute session is the starting point for most actions that take place inside of the SAS Compute Server. Currently, a Compute session lifetime is controlled by the client. When a client has completed work with a Compute session, it then uses the appropriate Delete command to destroy the Compute session.
You can configure Compute sessions to time-out after a time of inactivity. You can set the time-out period in the Compute context or in the Compute session request that you use to create the Compute session. After the specified period of inactivity passes, the session is destroyed.
Note: Compute sessions are strongly tied to the SAS Compute Server that they are running on. A Compute session cannot be migrated to another SAS Compute Server, and the Compute session state is not maintained if the associated SAS Compute Server fails.
Jobs
Jobs are units of SAS code that are executed by the client in the Compute session. A job has a state that describes where it is in its life cycle. A completed job might continue to be accessed for information such as listings, logs or results. Output from a job might be available to the data and file endpoints of the Compute session.
After a job is destroyed via the appropriate DELETE request, the log, listing, and result resources that are associated with
that job are no longer available via the jobs path for a session. However, the log, listing, and result resources
are available to the session, and you can reach them via the session/
If a session that contained a job is destroyed, then all jobs and all resources that are associated with those jobs are destroyed as well.
Logs, Listings, and Results
The log, listing, and result resources are generated by the execution of a job. However, their lifetime is governed
by the Compute session that the job was executed in. Multiple jobs can execute in a session. Each of these jobs might
create its own logs, listings, and results. You can access the resources for a particular job by going
directly to the desired endpoint under sessions/
When a job is destroyed, the content of the log, listing, and result resources that are associated with that job are still available via the session. When a session is destroyed, all logs, listings, and results are destroyed, as are all jobs for that session.
Data Access
The Compute session allows access to any data sets that are available. These data sets might be generated from a variety of sources:
- an underlying SAS configuration, such as sasv9.cfg (for example, SASHELP)
- libraries that are configured when a session or job is requested
- a job that executes in a session
Clients might also use the data endpoints to create libraries and upload data sets that are used by SAS code that is executed in the same Compute session.
Regardless, generated data sets are associated with a Compute session and are available as long as the Compute session is available. When a session is destroyed, the generated data sets are no longer available via that session. If the data sets are part of a persisted data storage area, you can continue to access them. If the generated data sets are stored in a transient area that is owned by the destroyed Compute session (for example, SASWORK), then the data sets are destroyed also.
File Access
A Compute session enables you to access files that are available to it.
Your Compute session can access files via the /filerefs endpoint with SAS filerefs. These filerefs are generally created by the SAS code that executes within a job. Clients might create filerefs via the /filerefs endpoint, and you can use these filerefs in SAS code that executes in the same Compute session.
These filerefs are associated with a Compute session and are available for the duration of the Compute Session. When a session is destroyed, associated filerefs are no longer available via that session. If the underlying files are part of a persisted data storage area, then those files continue to exist. If the files are kept in a transient area owned by a destroyed Compute session, then those files are also destroyed.
Your Compute session can also access files via the /files endpoint with file or directory paths. Files or directories can be created through the /files endpoint. You can also retrieve file or directory properties, upload files, or download files. Via the /files endpoint, you can also do typical file operations like copy or rename a file.
When you provide a file or directory path in the /files URL, follow these guidelines:
- Replace a forward slash character '/' with "~fs~".
- Replace a backward slash character '\' with "~rs~".
- Replace a semicolon character ';' with "~sc~".
- Replace a tilde character '~' with double tildes "~~".
Attributes
The following attributes can be set in the media types for requests that are used in the Compute API.
sessionInactiveTimeout
- Valid:
Context Request
,Session Request
- Type: Integer
- Units: Seconds
Sets the inactivity time-out for a session. If specified in a Compute context request, then the attribute is in effect for any session that is created from that context. If specified in a session request, then the attribute applies to that session only.
- If the value is positive, then a session is terminated if it is inactive for longer than the specified time period.
- If the value is negative or unset, then the default value of 15 minutes is used.
- If the value is 0, then the session does not terminate due to inactivity.
resetLogLineNumbers
- Valid:
Job Request
- Type: Boolean
- Availability: Added in version 2 of the resource.
If this attribute is set for a job request, then the log line numbers are reset to 0 immediately before the job begins execution.
allowXCMD
- Valid:
Context Request
- Type: String
- Availability: Added in version 3 of the API.
This attribute instructs the Compute sessions that are created from the Compute context to allow XCMDs. By default, XCMDs are disabled. An administrator can choose to enable XCMDs. By setting the value to "true", the administrator can allow any authorized user of the Compute context to use XCMDs. If the administrator sets the value to a name, such as "powerUsers", then the users that are members of that Identity group are allowed to use XCMDs.
homeDirectory
- Valid:
Context Request
,Session Request
- Type: String
- Availability: Added in version 3 of the API.
This attribute specifies the home directory for a Compute session. All relative paths in /files endpoints are relative to the home directory of a Compute session. By default, the home directory of a Compute session is set as the current working directory of the Compute server. The home directory of a Compute session remains as a constant for the duration of that Compute session. The home directory has the same life time as the Compute session.
unsafeJobCharacters
- Valid:
Context Request
- Type: String
- Availability: Added in version 3 of the API.
This attribute specifies the characters that the Compute session should remove from a value when the characters are part of a variable value that is received as input to a job. By default, the following character is stripped out:
- ; (semicolon)
The following characters are masked by the %NRSTR quoting function:
- & (ampersand)
- " (double-quote)
- ' (single-quote)
- % (percent)
When this attribute is set, it lists the characters that should be removed in addition to the characters that are listed above. The characters that are listed above are always handled in the manner indicated when this attribute is enabled. If you set this attribute to an empty string (""), then the feature is disabled. Even when the attribute is disabled, semicolons (;) are always stripped from a variable value.
runServerAs
- Valid:
Context Request
- Type: String
- Availability: Added in version 3 of the API.
This attribute specifies the account that runs any servers that are launched for this Compute context. The specified account is considered a shared service account, and all Compute servers that are launched for this Compute context run under this account. The value should correspond to the user name of a Service Account Credential that is stored by the Credentials service. See "Service Account Credentials" in the Examples section for more information.
reuseServerProcesses
- Valid:
Context Request
- Type: Boolean
- Availability: Added in version 3 of the API.
This attribute enables servers that are launched for this Compute context to be reused. The servers must also have a runServerAs attribute specified.
serverInactiveTimeout
- Valid:
Context Request
- Type: Integer
- Availability: Added in version 3 of the API.
This attribute is applicable when reuseServerProcesses is enabled. The attribute value specifies the amount of time in seconds that a server is allowed to remain inactive before being terminated. A server is inactive when it has no currently active Compute sessions.
serverReuseLimit
- Valid:
Context Request
- Type: Integer
- Availability: Added in version 3 of the API.
This attribute is applicable when reuseServerProcesses is enabled. The attribute value specifies the maximum number of times that Compute sessions can be created on each server that is launched. If this value is n, then when the *n*th Compute session is created, no additional sessions are created. When the *n*th session ends, the server terminates.
serverMinAvailable
- Valid:
Context Request
- Type: Integer
- Availability: Added in version 5 of the API.
This attribute is applicable when reuseServerProcesses is enabled. The attribute value specifies the minimum number of Compute server processes that the Compute service keeps available. This setting allows for an application to have a server process ready to use and not have to wait for the process to launch.
NOTE: Limitations that might be imposed by the environment such as resource constraints or workload management rules are followed.
Terminology
AutoExecLines
SAS code that is executed as a traditional autoexec file for a session that is instantiated. You can store this code in a Compute context, or you can specify the code when you request a Compute session.
Compute context
a definition of a Compute service configuration. A context is scoped to the service that uses it. For example, SASStudioContext is associated with the SASStudio service. The context contains the basic properties and information that is used to define the SAS Compute Server that initiated it. The context also contains the basic behaviors of any Compute session.
Compute service
a mid-tier Java based service that provides an entry point into the SAS Compute Server for processing requests to SAS.
Compute session
a resource that is held by a server and represents a user's context on that server. SAS code submissions are made to a Compute session that uses the identity of the user. Logs, listing information, and results are retrieved from a session.
environment
a structure that is used in requests for new sessions or jobs. An environment has two parts: options and data sources. Use an environment to add to configuration information that is stored in a Compute context.
job
a single execution request to a Compute session. A job might be a single line of SAS code or a complex program. In either case, if you submit the code as a single execution request, then the code is tracked as a job. You can retrieve logs, listing information, and results for a job.
listing
the classic SAS output that is generated when you submit SAS code.
log
the SAS log that is generated when SAS code executes.
options
traditional SAS options that are applied to either a session or a job. These options are defined as an array of strings, and each string represents an individual SAS option.
result
output from SAS code execution, such as ODS output. The SAS Compute Server captures the output, stores it on the server, and provides the user with links to retrieve it.
SAS Compute Server
a back-end server process that provides access to SAS Foundation. The server is launched and managed by the Compute service. The server allows users to request Compute sessions that submit work and get results.
service account credential
a credential that identifies the user account that runs a server. The service account credential is stored by the Credentials service, and
the Compute service uses the service account credential to run SAS Compute Servers. If you start a SAS Compute Server that
is defined by a Compute context with the runServerAs
attribute specified, then the Compute service starts that SAS Compute
Server as the user account that is specified in the attribute. In this case, a subsequent Compute session that runs on the
newly started SAS Compute Server is still associated with the requesting user and not with the account
that started the SAS Compute Server. See "Service Account Credentials" in the Examples section for more information.
table
a SAS data set, in the context of the Compute service.
view
a virtual table that is based on the result set of an SQL query that is made against an existing table or SAS data set.
Error Codes
HTTP Status Code | Error Code | Description |
---|---|---|
207 | 5737 | The request was successful, but there were non-critical errors handling the log, listing, or results. |
400 | 5001 | The request was invalid. The server is in an invalid state and cannot process the request. |
400 | 5006 | The request was invalid. The server is unable to process the request that was submitted. |
400 | 5009 | The request was invalid. The payload for this request is missing. |
400 | 5010 | The request was invalid. The payload for this request could not be processed. |
400 | 5014 | The request was invalid. No token is available for the server to communicate with other services. |
400 | 5023 | The request was invalid. The specified Accept-language header cannot be used by the server. |
400 | 5024 | The request was invalid. The specified filter function is not supported by the server. |
400 | 5025 | The request was invalid. The specified filter function contains invalid arguments. |
400 | 5026 | The request was invalid. The specified filter function is not formatted correctly. |
400 | 5027 | The request was invalid. The requested endpoint does not support filtering. |
400 | 5028 | The request was invalid. The specified sortBy option is not supported by the server. |
400 | 5029 | The request was invalid. The specified sortBy option contains invalid arguments. |
400 | 5030 | The request was invalid. The specified sortBy option references an invalid or non-existent key. |
400 | 5031 | The request was invalid. The specified sortBy option references a value that is not sortable. |
400 | 5032 | The request was invalid. The specified endpoint does not support sorting. |
400 | 5106 | The request was invalid. A resource that you requested is invalid. |
400 | 5107 | The request was invalid. A resource that you requested is of an unknown type. |
400 | 5202 | The request was invalid. There was no SAS code submitted in this job request. |
400 | 5203 | The request was invalid. The SAS code submitted in this job request is invalid. |
400 | 5205 | The request was invalid. The job request contains an invalid variable. |
400 | 5206 | The request was invalid. The job request contains an invalid option. |
400 | 5207 | The request was invalid. The specified query parameter for the log or listing endpoint is not valid. |
400 | 5209 | The request was invalid. The body of the request for streaming log or listing output to the Files Service was missing or did not conform to the schema. |
400 | 5210 | The request was invalid. Job log or listing output cannot be streamed while the job is still running. |
400 | 5211 | The request was invalid. There is no log or listing output available to stream. |
400 | 5305 | The request was invalid. The request exceeded the number of rows in the table. |
400 | 5306 | The request was invalid. The selection of columns in the table has failed. |
400 | 5307 | The request was invalid. The request has exceeded the number of columns in the table. |
400 | 5315 | The request was invalid. A password is required to access the table. |
400 | 5316 | The request was invalid. The specified table could not be opened. |
400 | 5318 | The request was invalid. There is a problem with the WHERE clause in the request. |
400 | 5320 | The request was invalid. The specified table cannot be renamed. |
400 | 5326 | The request was invalid. The request to update the column failed. |
400 | 5327 | The request was invalid. The request to update the column failed due to a naming conflict. |
400 | 5334 | The request was invalid. The library name that was included in the path contains too many characters. |
400 | 5335 | The request was invalid. The library assignment request is missing the required parameter name . |
400 | 5336 | The request was invalid. The specified format is not compatible with the column. |
400 | 5337 | The request was invalid. The specified value of the fileProtectionEncoding field is not supported by the server. |
400 | 5338 | The request was invalid. One or more of the values of the fileProtection field could not be decoded by the server. |
400 | 5339 | The request was invalid. The format or informat name is invalid. |
400 | 5340 | The request was invalid. The format or informat length value is invalid. |
400 | 5341 | The request was invalid. The format or informat decimal value is invalid. |
400 | 5342 | The request was invalid. One or more table formats could not be loaded. |
400 | 5400 | The request was invalid. The requested fileref could not be found. |
400 | 5401 | The request was invalid. The requested access method for the fileref is not supported by this server. |
400 | 5402 | The request was invalid. The fileref requested already exists. |
400 | 5403 | The request was invalid. The options in the fileref request cannot be processed. |
400 | 5404 | The request was invalid. The assignment of the fileref in the request has failed. |
400 | 5405 | The request was invalid. The requested fileref name cannot be longer than 8 characters. |
400 | 5406 | The request was invalid. The name of the fileref access method cannot be longer than 8 characters. |
400 | 5408 | The request was invalid. The requested fileref cannot be deassigned. |
400 | 5410 | The request was invalid. The deletion of the physical file that is associated with the fileref has failed. |
400 | 5411 | The request was invalid. The response for the fileref resource could not be generated. |
400 | 5412 | The request was invalid. The physical file that is associated with the fileref already exists. |
400 | 5413 | The request was invalid. The fileref name is missing. |
400 | 5414 | The request was invalid. The directory that is associated with the fileref could not be opened. |
400 | 5415 | The request was invalid. The directory that is associated with the fileref could not be closed. |
400 | 5416 | The request was invalid. The server was unable to determine the members of the directory that is associated with the fileref. |
400 | 5418 | The request was invalid. The specified entry does not exist in the directory-based fileref. |
400 | 5419 | The request was invalid. The physical file that is associated with the fileref could not be opened. |
400 | 5420 | The request was invalid. The physical file that is associated with the fileref could not be closed. |
400 | 5421 | The request was invalid. Reading from the physical file that is associated with the fileref has failed. |
400 | 5422 | The request was invalid. Writing to the physical file that is associated with the fileref has failed. |
400 | 5424 | The request was invalid. A mix of files and directories in the path for the requested fileref is not supported. |
400 | 5426 | The request was invalid. The subdirectory of the directory that is associated with the fileref could not be opened. |
400 | 5427 | The request was invalid. The member of the directory that is associated with the fileref could not be closed. |
400 | 5428 | The request was invalid. The subdirectory of the directory that is associated with the fileref could not be closed. |
400 | 5429 | The request was invalid. Reading from the member of the directory that is associated with the fileref has failed. |
400 | 5430 | The request was invalid. Writing to the member of the directory that is associated with the fileref has failed. |
400 | 5431 | The request was invalid. The member of the fileref is a subdirectory and cannot be updated directly. |
400 | 5432 | The request was invalid. The fileref request is missing a quotation mark in the path name. |
400 | 5434 | The request was invalid. The requested file access method is invalid. |
400 | 5436 | The request was invalid. The requested path is too long. |
400 | 5437 | The request was invalid. The requested file or directory information is not available. |
400 | 5444 | The request was invalid. The request could not be fulfilled because the disk quota has been exceeded. |
400 | 5445 | The request was invalid. The requested path is invalid. |
400 | 5452 | The request was invalid. Provide a name in the request body. |
400 | 5455 | The request was invalid. The host returned an error message during the processing of the path. |
400 | 5456 | The request was invalid. There is a missing parenthesis in the concatenated pathname for the fileref. |
400 | 5457 | The request was invalid. The requested path contains directory traversal that is disallowed by this compute session. |
400 | 5500 | The request was invalid. The value that is given for the specified option cannot be set. |
400 | 5501 | The request was invalid. The request is missing the option name. |
400 | 5502 | The request was invalid. The specified option cannot be obtained. |
400 | 5503 | The request was invalid. The value that was provided for the specified option is invalid. |
400 | 5504 | The request was invalid. The requested variable is invalid. |
400 | 5700 | The request was invalid. The jobRequest field is not provided. |
400 | 5701 | The request was invalid. The jobDefinition field is not provided. |
400 | 5718 | The request was invalid. An invalid URI has been returned in the job results link. |
400 | 5719 | The request was invalid. The jobDefinition field is not provided. More details are available. |
400 | 5720 | The request was invalid. A specific link that is required from the job was missing. |
400 | 5734 | The request was invalid. The context name or session identifier is missing. |
400 | 5735 | The request was invalid. The job request contains an invalid argument. |
400 | 5738 | The request was invalid. The log or listing for the job was too large. |
400 | 5739 | The request was invalid. The job request cannot contain both a context identifier and a context name or session identifier. |
400 | 5761 | The request was invalid. The format of the table identifier is invalid. |
400 | 5762 | The request was invalid. The specified query parameter for paging is invalid. |
400 | 5803 | The request was invalid. The ID of the object in the URL does not match the context that is supplied in the request body. |
400 | 5815 | The request was invalid. The launch type that you specified is unsupported. |
400 | 5826 | The request was invalid. A launch via the Launcher service requires a launcher context name or identifier. |
400 | 5828 | The request was invalid. The launcher context that is associated with this request is not found. |
400 | 5829 | The request was invalid. The Compute service was unable to format the SAS Compute Server command. |
400 | 5841 | The request was invalid. A context with the specified name already exists. |
400 | 5845 | The request was invalid. The Compute context name must not be null. |
400 | 5846 | The request was invalid. The value of the Accept-Item header that is provided to the GET request to /compute/contexts is not valid. |
400 | 5847 | The request was invalid. The value of the Accept-Item header that is provided to the GET request to /compute/sessions is not valid. |
400 | 5850 | The request was invalid. The resource name for the Compute context must not be null. |
400 | 5851 | The request was invalid. Each resource name within a Compute context must be unique. |
400 | 5852 | The request was invalid. The resource type for the Compute context must not be null. |
400 | 5853 | The request was invalid. The resource URI for the Compute context must not be null. |
400 | 5854 | The request was invalid. The attempt to launch a SAS Compute Server using the service account failed, because a service account credential is not available. |
400 | 5855 | The request was invalid. The value of the runServerAs attribute must not be empty or blank. |
400 | 5857 | The request was invalid. Run reusable processes on the SAS Compute Server by specifying a shared service account. The Compute context includes a reuseServerProcesses attribute but not the required runServerAs attribute. |
400 | 5858 | The request was invalid. The value for the serverReuseLimit attribute must be a nonnegative integer. |
400 | 5859 | The request was invalid. The value for the serverInactiveTimeout attribute must be a nonnegative integer. |
400 | 5860 | The request was invalid. The Compute context name must not be over 100 characters long. |
400 | 5861 | The request was invalid. The Compute context description must not be over 1000 characters long. |
400 | 5862 | The request was invalid. The resource name for the Compute context must not be over 40 character long. |
400 | 5863 | The request was invalid. The resource type for the Compute context must not be over 100 character long. |
400 | 5864 | The request was invalid. The resource URI for the Compute context must not be over 500 character long. |
400 | 5865 | The request was invalid. The Context context could not be deleted because it is in use by one or more Compute servers. |
400 | 5866 | The request was invalid. The value for the serverMinAvailable attribute must be a nonnegative integer. |
400 | 5867 | The request was invalid. The Compute context workload queue name must not be over 250 characters long. |
400 | 5869 | The request was invalid. The value for the reuseServerProcesses attribute must be true or false. |
401 | 5022 | The user was not authenticated. |
403 | 5103 | The user did not have the necessary permissions. |
403 | 5321 | The user did not have the necessary permissions. The request to rename the table is invalid. |
403 | 5322 | The user did not have the necessary permissions. The table cannot be renamed because it is read only. |
403 | 5323 | The user did not have the necessary permissions. The label that is given for the table update is invalid. |
403 | 5324 | The user did not have the necessary permissions. The label that is given for the table could not be updated. |
403 | 5325 | The user did not have the necessary permissions. The column in the requested table cannot be updated, because the table is read only. |
403 | 5328 | The user did not have the necessary permissions. The table cannot be updated because it is read only. |
403 | 5423 | The user did not have the necessary permissions to access to the physical file that is associated with the fileref. |
403 | 5443 | The user did not have the necessary permissions to create the specified directory. |
403 | 5856 | The user did not have the necessary permissions to get the launcher contexts. |
403 | 5813 | The user did not have the necessary permissions to launch a process. |
403 | 5848 | The Compute service does not have the necessary permissions to create authorization rules. |
403 | 5849 | The Compute service does not have the necessary permissions to delete all of the existing authorization rules that are related to a Compute context. |
403 | 5329 | The user did not have the necessary permissions. The deletion of system libraries is not allowed. |
403 | 5330 | The user did not have the necessary permissions. The library cannot be accessed. |
403 | 5331 | The user did not have the necessary permissions to rename the specified table in the library. |
403 | 5332 | The user did not have the necessary permissions to alter a table in the specified library. |
403 | 5450 | The request was invalid. Provide a file path instead of a directory path. |
403 | 5454 | The user did not have the necessary permissions. The file or directory is in use and is locked. |
404 | 5007 | No endpoint exists at the requested path. |
404 | 5008 | No API or endpoint exists at the requested path. The server is unable to route the request. |
404 | 5105 | No session exists at the requested path. |
404 | 5108 | No engine exists at the requested path. |
404 | 5204 | No job exists at the requested path. |
404 | 5300 | No library exists at the requested path. |
404 | 5301 | No library exists at the requested path. |
404 | 5314 | No table exists at the requested path. |
404 | 5317 | No column exists at the requested path. |
404 | 5319 | No table exists at the requested path. |
404 | 5407 | No fileref exists at the requested path. |
404 | 5409 | No physical file exists that is associated with the requested fileref. |
404 | 5417 | No parent exists for the requested fileref. |
404 | 5425 | The request is invalid. The member of the directory that is associated with the fileref could not be opened. |
404 | 5433 | No physical files exist in the concatenated list that is associated with the requested fileref. |
404 | 5435 | No file or directory exists at the requested path. |
404 | 5448 | No file exists at the requested path. |
404 | 5449 | No file exists at the requested path. |
404 | 5505 | No variable exists at the requested path. |
404 | 5756 | No session exists at the requested path. |
404 | 5758 | No resource exists at the requested path. |
404 | 5759 | No resource exists at the requested path, and an error was returned. |
404 | 5760 | No resource exists at the requested path. |
404 | 5836 | No server exists at the requested path. The identifier was invalid. |
404 | 5837 | No session exists at the requested path. The identifier was invalid. |
404 | 5842 | No context exists at the requested path. The identifier was invalid. |
404 | 5844 | No context exists at the requested path. |
405 | 5019 | The request was invalid. The specified method is invalid for this request. |
406 | 5016 | The request was invalid. An invalid header was provided to the server. |
406 | 5020 | The request was invalid. The specified Accept header is not supported. |
406 | 5021 | The request was invalid. The specified Content-type header is not supported. |
409 | 5453 | The request was invalid. The file or directory already exists. |
409 | 5868 | The request was invalid. The updated Compute context is not based on the most recently saved Compute context. |
412 | 5034 | The request was invalid. The requested update requires that a precondition be met, but the precondition failed. |
428 | 5033 | The request was invalid. The specified update requires that a precondition be met before it can be processed. |
500 | 5000 | The request could not be fulfilled because of an unexpected server error. |
500 | 5002 | The request could not be fulfilled because of an unexpected server error. The server is unable to load a module that is required by the server. |
500 | 5003 | The request could not be fulfilled because of an unexpected server error. The server is unable to create endpoints that are needed to service requests. |
500 | 5004 | The request could not be fulfilled because of an unexpected server error. The server is unable to send a response for this request. |
500 | 5005 | The request could not be fulfilled because of an unexpected server error. The server is unable to communicate with the client or another service. |
500 | 5011 | The request could not be fulfilled because of an unexpected server error. The server has failed to initialize. |
500 | 5012 | The request could not be fulfilled because of an unexpected server error. The server was unable to obtain a port from which to listen for HTTP requests. |
500 | 5013 | The request could not be fulfilled because of an unexpected server error. The specified port for monitoring HTTP requests is invalid. |
500 | 5015 | The request could not be fulfilled because of an unexpected server error. The server cannot register itself with the Launcher API. |
500 | 5017 | The request could not be fulfilled because of an unexpected server error. The server was unable to build a response. |
500 | 5018 | The request could not be fulfilled because of an unexpected server error. The server is unable to process incoming authorization tokens. |
500 | 5100 | The request could not be fulfilled because of an unexpected server error. The session the request could not be processed. |
500 | 5101 | The request could not be fulfilled because of an unexpected server error. The session that you requested could not be created. |
500 | 5102 | The request could not be fulfilled because of an unexpected server error. The delete request for the session could not be processed. |
500 | 5104 | The request could not be fulfilled because of an unexpected server error. The context that is referenced does not exist. |
500 | 5110 | The request could not be fulfilled because of an unexpected server error. The server is unable to determine the list of available engines. |
500 | 5111 | The request could not be fulfilled because of an unexpected server error. The listing is not available for retrieval from the session. |
500 | 5112 | The request could not be fulfilled because of an unexpected server error. The log is not available for retrieval from the session. |
500 | 5113 | The request could not be fulfilled because of an unexpected server error. The session is in a stopped or failed state and cannot respond. |
500 | 5114 | The request could not be fulfilled because of an unexpected server error. A time-out occurred while trying to cancel the session or job. |
500 | 5200 | The request could not be fulfilled because of an unexpected server error. The server was unable to process the job request. |
500 | 5201 | The request could not be fulfilled because of an unexpected server error. The server was unable to delete the requested job. |
500 | 5208 | The request could not be fulfilled because of an unexpected server error. The server was unable to submit an upload request to the Files service or the Files service failed to process the request. |
500 | 5302 | The request could not be fulfilled because of an unexpected server error. The members of the requested library could not be listed. |
500 | 5303 | The request could not be fulfilled because of an unexpected server error. The end of data was reached before the request was completed. |
500 | 5304 | The request could not be fulfilled because of an unexpected server error. A data error was encountered while processing the request. |
500 | 5308 | The request could not be fulfilled because of an unexpected server error. An error occurred when attempting to assign the library. |
500 | 5309 | The request could not be fulfilled because of an unexpected server error. An error occurred when attempting to list the libraries that are available to this session. |
500 | 5310 | The request could not be fulfilled because of an unexpected server error. The requested order for this table could not be set. |
500 | 5311 | The request could not be fulfilled because of an unexpected server error. An index is required in order to provide the requested ordering of the table. |
500 | 5312 | The request could not be fulfilled because of an unexpected server error. The requested ordering of the table resulted in a partial match. |
500 | 5313 | The request could not be fulfilled because of an unexpected server error. The requested library could not be deassigned. |
500 | 5333 | The request could not be fulfilled because of an unexpected server error. The user who made the request did not have permissions to open the file. |
500 | 5438 | The request could not be fulfilled because of an unexpected server error. The response items cannot be generated. |
500 | 5439 | The request could not be fulfilled because of an unexpected server error. The response links cannot be generated. |
500 | 5451 | The request could not be fulfilled because of an unexpected server error. The request failed to write the file. |
500 | 5702 | The request could not be fulfilled because of an unexpected server error. The job request has no associated SAS code. |
500 | 5703 | The request could not be fulfilled because of an unexpected server error. The SAS code that is associated with the job request is invalid. |
500 | 5704 | The request could not be fulfilled because of an unexpected server error. An error occurred while running the job. |
500 | 5705 | The request could not be fulfilled because of an unexpected server error. An error occurred when the job was submitted to the Compute service. |
500 | 5706 | The request could not be fulfilled because of an unexpected server error. There was no job condition code returned when the job completed. |
500 | 5707 | The request could not be fulfilled because of an unexpected server error. The job was canceled by the user with a RUN CANCEL statement. |
500 | 5708 | The request could not be fulfilled because of an unexpected server error. The job was canceled by a user with an ATTN or BREAK command. |
500 | 5709 | The request could not be fulfilled because of an unexpected server error. An error in the code has caused the session to enter syntax-check mode. |
500 | 5710 | The request could not be fulfilled because of an unexpected server error. The job has completed, but there are warning messages. |
500 | 5711 | The request could not be fulfilled because of an unexpected server error. The job was canceled by the user with an ABORT CANCEL statement. |
500 | 5712 | The request could not be fulfilled because of an unexpected server error. The job was canceled by the user with an ABORT CANCEL FILE statement. |
500 | 5713 | The request could not be fulfilled because of an unexpected server error. The SAS code that was submitted contained an error. |
500 | 5714 | The request could not be fulfilled because of an unexpected server error. An error occurred when polling the job state. |
500 | 5715 | The request could not be fulfilled because of an unexpected server error. There is no update link available from the job. |
500 | 5716 | The request could not be fulfilled because of an unexpected server error. The update link that is provided has not returned an updated job. |
500 | 5717 | The request could not be fulfilled because of an unexpected server error. No links were returned from the job. |
500 | 5721 | The request could not be fulfilled because of an unexpected server error. The Compute session has not returned any links. |
500 | 5722 | The request could not be fulfilled because of an unexpected server error. A specific link that is required from the session is missing. |
500 | 5723 | The request could not be fulfilled because of an unexpected server error. The Compute session returned incorrect variable information. |
500 | 5724 | The request could not be fulfilled because of an unexpected server error. The response that was returned from the Compute service could not be processed. |
500 | 5725 | The request could not be fulfilled because of an unexpected server error. The state link is missing from the job. |
500 | 5726 | The request could not be fulfilled because of an unexpected server error. The update link is missing from the job. |
500 | 5727 | The request could not be fulfilled because of an unexpected server error. The log link is missing from the job. |
500 | 5729 | The request could not be fulfilled because of an unexpected server error. The job link is missing from the session. |
500 | 5730 | The request could not be fulfilled because of an unexpected server error. The log link is missing from the job. |
500 | 5732 | The request could not be fulfilled because of an unexpected server error. Resources that are associated with the Files service could not be found. |
500 | 5733 | The request could not be fulfilled because of an unexpected server error. The content link for the Files service is missing. |
500 | 5736 | The request could not be fulfilled because of an unexpected server error. The createSession link is missing from the session. |
500 | 5740 | The request could not be fulfilled because of an unexpected server error. The job could not be completed because the Compute service terminated unexpectedly. |
500 | 5750 | The request could not be fulfilled because of an unexpected server error. The data provider was unable to find the requested libraries. |
500 | 5751 | The request could not be fulfilled because of an unexpected server error. The data provider was unable to find the requested data table. |
500 | 5752 | The request could not be fulfilled because of an unexpected server error. The data provider was unable to create a session. |
500 | 5753 | The request could not be fulfilled because of an unexpected server error. The data provider was unable to process the response from the service. |
500 | 5754 | The request could not be fulfilled because of an unexpected server error. The data provider was unable to process the collection response from the service. |
500 | 5755 | The request could not be fulfilled because of an unexpected server error. A session could not be created for the given resource. |
500 | 5757 | The request could not be fulfilled because of an unexpected server error. An error occurred when attempting to communicate with the session. |
500 | 5800 | The request could not be fulfilled because of an unexpected server error. The Compute service failed when communicating with another service or server. |
500 | 5801 | The request could not be fulfilled because of an unexpected server error. Specify a context value to update an object. |
500 | 5802 | The request could not be fulfilled because of an unexpected server error. Specify a context value to create an object. |
500 | 5806 | The request could not be fulfilled because of an unexpected server error. The service is unable to convert the property value to JSON. |
500 | 5807 | The request could not be fulfilled because of an unexpected server error. The service is unable to convert the property representation to JSON. |
500 | 5808 | The request could not be fulfilled because of an unexpected server error. The service is unable to deserialize the JSON value for a property. |
500 | 5809 | The request could not be fulfilled because of an unexpected server error. The service is unable to convert JSON to a property representation. |
500 | 5810 | The request could not be fulfilled because of an unexpected server error. Provide a context identifier for this GET request. |
500 | 5811 | The request could not be fulfilled because of an unexpected server error. Provide a context identifier for this DELETE request. |
500 | 5812 | The request could not be fulfilled because of an unexpected server error. Provide a context identifier for this UPDATE request. |
500 | 5814 | The request could not be fulfilled because of an unexpected server error. The access token for the user could not be obtained. Either the current thread is not executing in the context of a request, or the token has expired and could not be renewed. |
500 | 5816 | The request could not be fulfilled because of an unexpected server error. The launch type that you specified is unknown. |
500 | 5818 | The request could not be fulfilled because of an unexpected server error. There is no launcher context identifier in the launch properties. |
500 | 5819 | The request could not be fulfilled because of an unexpected server error. There is no launcher process identifier in the launch properties. |
500 | 5820 | The request could not be fulfilled because of an unexpected server error. There is no delete process link in the launch properties. |
500 | 5821 | The request could not be fulfilled because of an unexpected server error. The specified launch type is invalid. |
500 | 5822 | The request could not be fulfilled because of an unexpected server error. The service is unable to convert JSON to the required type. |
500 | 5823 | The request could not be fulfilled because of an unexpected server error. The service is unable to convert a value to JSON. |
500 | 5824 | The request could not be fulfilled because of an unexpected server error. The launch type that is associated with this launch is invalid. |
500 | 5825 | The request could not be fulfilled because of an unexpected server error. The launch type that is associated with the destruction of this launch is invalid. |
500 | 5827 | The request could not be fulfilled because of an unexpected server error. The context is missing the launcher context name or identifier. |
500 | 5830 | The request could not be fulfilled because of an unexpected server error. The SAS Compute Server process did not initialize in the time allowed. |
500 | 5831 | The request could not be fulfilled because of an unexpected server error. The service was interrupted while waiting for a process to start. |
500 | 5832 | The request could not be fulfilled because of an unexpected server error. The SAS Compute Server process terminated unexpectedly. |
500 | 5833 | The request could not be fulfilled because of an unexpected server error. The Launcher service was unable to launch the SAS Compute Server. |
500 | 5834 | The request could not be fulfilled because of an unexpected server error. The SAS Compute Server process is in an invalid state. |
500 | 5835 | The request could not be fulfilled because of an unexpected server error. A command is required for a service-based launch. |
500 | 5838 | The request could not be fulfilled because of an unexpected server error. Provide a non-null value for responseType or responseTypeRef. |
500 | 5840 | The request could not be fulfilled because of an unexpected server error. Provide a context request value. |
500 | 5843 | The request could not be fulfilled because of an unexpected server error. Specify a context name. |
501 | 5109 | The request could not be fulfilled because of an unexpected server error. The specified engine exists, but it does not support returning options. |
501 | 5763 | The request could not be fulfilled because of an unexpected server error. The given query parameter for paging is not supported. |
Operations
Root
Contains the operations for the root resource of the Compute API.
Check service availability
Code samples
# You can also use wget
curl -X HEAD https://example.com/compute/
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/compute/',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/compute/')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/compute/", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /
Checks the availability of the service.
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Get API resource links
Code samples
# You can also use wget
curl -X GET https://example.com/compute/ \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.api+json'
const headers = {
'Accept':'application/vnd.sas.api+json'
};
fetch('https://example.com/compute/',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.api+json'
}
r = requests.get('https://example.com/compute/', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.api+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /
Returns a list of links to the top level resources in this API.
Example responses
200 Response
{
"version": 1,
"links": [
{
"method": "GET",
"rel": "contexts",
"href": "/compute/contexts",
"uri": "/compute/contexts",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.context"
},
{
"method": "GET",
"rel": "contextSummaries",
"href": "/compute/contexts",
"uri": "/compute/contexts",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.context.summary"
},
{
"method": "POST",
"rel": "createContext",
"href": "/compute/contexts",
"uri": "/compute/contexts",
"type": "application/vnd.sas.compute.context.request",
"responseType": "application/vnd.sas.compute.context"
},
{
"method": "GET",
"rel": "servers",
"href": "/compute/servers",
"uri": "/compute/servers",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.server"
},
{
"method": "GET",
"rel": "serverSummaries",
"href": "/compute/servers",
"uri": "/compute/servers",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.server.summary"
},
{
"method": "GET",
"rel": "sessions",
"href": "/compute/sessions",
"uri": "/compute/sessions",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.session"
},
{
"method": "GET",
"rel": "sessionSummaries",
"href": "/compute/sessions",
"uri": "/compute/sessions",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.session.summary"
}
]
}
{
"version": 1,
"links": [
{
"method": "GET",
"rel": "contexts",
"href": "/compute/contexts",
"uri": "/compute/contexts",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.context"
},
{
"method": "GET",
"rel": "contextSummaries",
"href": "/compute/contexts",
"uri": "/compute/contexts",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.context.summary"
},
{
"method": "POST",
"rel": "createContext",
"href": "/compute/contexts",
"uri": "/compute/contexts",
"type": "application/vnd.sas.compute.context.request",
"responseType": "application/vnd.sas.compute.context"
},
{
"method": "GET",
"rel": "servers",
"href": "/compute/servers",
"uri": "/compute/servers",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.server"
},
{
"method": "GET",
"rel": "serverSummaries",
"href": "/compute/servers",
"uri": "/compute/servers",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.server.summary"
},
{
"method": "GET",
"rel": "sessions",
"href": "/compute/sessions",
"uri": "/compute/sessions",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.session"
},
{
"method": "GET",
"rel": "sessionSummaries",
"href": "/compute/sessions",
"uri": "/compute/sessions",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.session.summary"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | Inline |
Response Schema
Status Code 200
API
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» version | integer | true | none | The version number of the API representation. This is version 1. |
» links | [link] | true | none | The API's top-level links. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Contexts
Contains the operations to create SAS Compute Server definitions.
Check endpoint availability
Code samples
# You can also use wget
curl -X HEAD https://example.com/compute/contexts
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/compute/contexts',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/compute/contexts')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/compute/contexts", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /contexts
Determines whether an endpoint is currently available.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
start | query | integer | false | Returns the offset of first context definition to return. The default value is "0". |
limit | query | integer | false | Returns the maximum number of context definitions to return. The default value is "10". |
filter | query | string(filter-criteria) | false | Specifies the filter criteria for returned context definitions. |
sortBy | query | string(sort-criteria) | false | Sorts returned context definitions. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
404 | Not Found | No context endpoint exists at the requested path. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Get context definitions
Code samples
# You can also use wget
curl -X GET https://example.com/compute/contexts \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json' \
-H 'Accept-Item: application/vnd.sas.compute.context+json'
const headers = {
'Accept':'application/vnd.sas.collection+json',
'Accept-Item':'application/vnd.sas.compute.context+json'
};
fetch('https://example.com/compute/contexts',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json',
'Accept-Item': 'application/vnd.sas.compute.context+json'
}
r = requests.get('https://example.com/compute/contexts', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.collection+json"},
"Accept-Item": []string{"application/vnd.sas.compute.context+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/contexts", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /contexts
Returns a list of Compute context definitions. Standard paging, filtering, and sorting options are provided. By default, this endpoint returns a summary of the available information about the contexts. Specify an Accept-Item header with the value application/vnd.sas.compute.context+json to get all available information for each context.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Item | header | string | false | Specifies the desired context representation. The Accept-Item options are:
|
start | query | integer | false | Specifies the offset of the first context definition to return. The default value is "0". |
limit | query | integer | false | Specifies the maximum number of context definitions to return. The default value is "10". |
filter | query | string(filter-criteria) | false | Specifies the filter criteria for returned context definitions. |
sortBy | query | string(sort-criteria) | false | Sorts returned context definitions. |
Enumerated Values
Parameter | Value |
---|---|
Accept-Item | application/vnd.sas.compute.context+json |
Accept-Item | application/vnd.sas.compute.context.summary+json |
Example responses
200 Response
{
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/compute/contexts",
"uri": "/compute/contexts",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "self",
"href": "/compute/contexts?start=0&limit=10",
"uri": "/compute/contexts?start=0&limit=10",
"type": "application/vnd.sas.collection"
},
{
"method": "PUT",
"rel": "createContext",
"href": "/compute/contexts",
"uri": "/compute/contexts",
"type": "application/vnd.sas.compute.context",
"responseType": "application/vnd.sas.compute.context"
}
],
"name": "items",
"accept": "application/vnd.sas.compute.context",
"start": 0,
"count": 1,
"items": [
{
"description": "My Application Context",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context"
},
{
"method": "GET",
"rel": "alternate",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context.summary"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12"
},
{
"method": "POST",
"rel": "createSession",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions",
"type": "application/vnd.sas.compute.session.request",
"responseType": "application/vnd.sas.compute.session"
}
],
"id": "MyApp",
"version": 1,
"name": "MyApp"
}
],
"limit": 10,
"version": 2
}
{
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/compute/contexts",
"uri": "/compute/contexts",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "self",
"href": "/compute/contexts?start=0&limit=10",
"uri": "/compute/contexts?start=0&limit=10",
"type": "application/vnd.sas.collection"
},
{
"method": "PUT",
"rel": "createContext",
"href": "/compute/contexts",
"uri": "/compute/contexts",
"type": "application/vnd.sas.compute.context",
"responseType": "application/vnd.sas.compute.context"
}
],
"name": "items",
"accept": "application/vnd.sas.compute.context",
"start": 0,
"count": 1,
"items": [
{
"description": "My Application Context",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context"
},
{
"method": "GET",
"rel": "alternate",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context.summary"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12"
},
{
"method": "POST",
"rel": "createSession",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions",
"type": "application/vnd.sas.compute.session.request",
"responseType": "application/vnd.sas.compute.session"
}
],
"id": "MyApp",
"version": 1,
"name": "MyApp"
}
],
"limit": 10,
"version": 2
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | contextSummaryCollection |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Create a context definition
Code samples
# You can also use wget
curl -X POST https://example.com/compute/contexts \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.compute.context.request+json' \
-H 'Accept: application/vnd.sas.compute.context+json'
const inputBody = '{
"name": "MyApp",
"version": 4,
"description": "My Application Context",
"attributes": {
"sessionInactiveTimeout": 60
},
"launchContext": {
"contextName": "compsrv"
},
"launchType": "service",
"authorizedUsers": [
"myUser"
],
"mediaTypeMap": {
"csv": "application/vnd.ms-excel"
},
"resources": [
{
"name": "file1",
"uri": "/files/files/ea0d3ee1-894f-4936-bc2b-f611a878a0dd",
"type": "application/vnd.sas.file",
"scope": "SESSION",
"options": {
"LRECL": 1024
}
}
],
"queueName": "MyAppQueue",
"x-widdershins-oldRef": "#/components/schemas/contextRequest/example"
}';
const headers = {
'Content-Type':'application/vnd.sas.compute.context.request+json',
'Accept':'application/vnd.sas.compute.context+json'
};
fetch('https://example.com/compute/contexts',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.compute.context.request+json',
'Accept': 'application/vnd.sas.compute.context+json'
}
r = requests.post('https://example.com/compute/contexts', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.compute.context.request+json"},
"Accept": []string{"application/vnd.sas.compute.context+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/compute/contexts", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /contexts
Creates a context definition. The new context is assigned a unique ID. The contextName namespace is managed by you, and the contextName must be unique. You can update contexts by performing a PUT on the corresponding URL.
Body parameter
{
"name": "MyApp",
"version": 4,
"description": "My Application Context",
"attributes": {
"sessionInactiveTimeout": 60
},
"launchContext": {
"contextName": "compsrv"
},
"launchType": "service",
"authorizedUsers": [
"myUser"
],
"mediaTypeMap": {
"csv": "application/vnd.ms-excel"
},
"resources": [
{
"name": "file1",
"uri": "/files/files/ea0d3ee1-894f-4936-bc2b-f611a878a0dd",
"type": "application/vnd.sas.file",
"scope": "SESSION",
"options": {
"LRECL": 1024
}
}
],
"queueName": "MyAppQueue",
"x-widdershins-oldRef": "#/components/schemas/contextRequest/example"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | contextRequest | true | Specifies a context request. |
Example responses
201 Response
{
"description": "My Application Context",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context"
},
{
"method": "GET",
"rel": "alternate",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context",
"responseType": "application/vnd.sas.compute.context"
},
{
"method": "PUT",
"rel": "updateWithRules",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context.request",
"responseType": "application/vnd.sas.compute.context"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12"
},
{
"method": "POST",
"rel": "createSession",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions",
"type": "application/vnd.sas.compute.session.request",
"responseType": "application/vnd.sas.compute.session"
},
{
"method": "GET",
"rel": "rules",
"href": "/authorization/rules?filter=eq(objectUri,'/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions')",
"uri": "/authorization/rules?filter=eq(objectUri,'/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions')",
"type": "application/vnd.sas.collection",
"responseType": "application/vnd.sas.authorization.rule"
}
],
"launchType": "service",
"launchContext": {
"contextName": "compsrv"
},
"attributes": {
"sessionInactiveTimeout": 60
},
"mediaTypeMap": {
"csv": "application/vnd.ms-excel"
},
"createdBy": "myUserID",
"modifiedBy": "myUserID",
"modifiedTimeStamp": "2018-05-04T18:02:27.780Z",
"creationTimeStamp": "2018-05-04T18:02:27.749Z",
"id": "309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"version": 4,
"name": "MyApp",
"queueName": "MyAppQueue",
"resources": [
{
"name": "file1",
"uri": "/files/files/ea0d3ee1-894f-4936-bc2b-f611a878a0dd",
"type": "application/vnd.sas.file",
"scope": "SESSION",
"options": {
"LRECL": 1024
}
}
]
}
{
"description": "My Application Context",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context"
},
{
"method": "GET",
"rel": "alternate",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context",
"responseType": "application/vnd.sas.compute.context"
},
{
"method": "PUT",
"rel": "updateWithRules",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context.request",
"responseType": "application/vnd.sas.compute.context"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12"
},
{
"method": "POST",
"rel": "createSession",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions",
"type": "application/vnd.sas.compute.session.request",
"responseType": "application/vnd.sas.compute.session"
},
{
"method": "GET",
"rel": "rules",
"href": "/authorization/rules?filter=eq(objectUri,'/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions')",
"uri": "/authorization/rules?filter=eq(objectUri,'/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions')",
"type": "application/vnd.sas.collection",
"responseType": "application/vnd.sas.authorization.rule"
}
],
"launchType": "service",
"launchContext": {
"contextName": "compsrv"
},
"attributes": {
"sessionInactiveTimeout": 60
},
"mediaTypeMap": {
"csv": "application/vnd.ms-excel"
},
"createdBy": "myUserID",
"modifiedBy": "myUserID",
"modifiedTimeStamp": "2018-05-04T18:02:27.780Z",
"creationTimeStamp": "2018-05-04T18:02:27.749Z",
"id": "309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"version": 4,
"name": "MyApp",
"queueName": "MyAppQueue",
"resources": [
{
"name": "file1",
"uri": "/files/files/ea0d3ee1-894f-4936-bc2b-f611a878a0dd",
"type": "application/vnd.sas.file",
"scope": "SESSION",
"options": {
"LRECL": 1024
}
}
]
}
{
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context"
},
{
"method": "GET",
"rel": "alternate",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context.summary"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12"
},
{
"method": "POST",
"rel": "createSession",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions",
"type": "application/vnd.sas.compute.session.request",
"responseType": "application/vnd.sas.compute.session"
}
],
"id": "309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"version": 2,
"createdBy": "myUserID",
"name": "MyApp"
}
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | A context definition was created. | contextSummary |
400 | Bad Request | The request was invalid. The contextName is already in use, or the request body is invalid. | Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | ETag | string | Specifies a tag that identifies this revision of this object. | |
201 | Location | string | Specifies the URI of the created context. |
Delete a context definition
Code samples
# You can also use wget
curl -X DELETE https://example.com/compute/contexts/{contextId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.error+json'
const headers = {
'Accept':'application/vnd.sas.error+json'
};
fetch('https://example.com/compute/contexts/{contextId}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.error+json'
}
r = requests.delete('https://example.com/compute/contexts/{contextId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.error+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "https://example.com/compute/contexts/{contextId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /contexts/{contextId}
Deletes the context definition that has the specified contextId.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
contextId | path | string | true | Deletes the context definition with the specified ID. |
Example responses
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | The context was deleted. | None |
400 | Bad Request | The context at the requested path could not be deleted because it is in use by one or more Compute servers. | Inline |
404 | Not Found | No context definition exists at the requested path. | Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Get a context definition
Code samples
# You can also use wget
curl -X GET https://example.com/compute/contexts/{contextId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.compute.context+json'
const headers = {
'Accept':'application/vnd.sas.compute.context+json'
};
fetch('https://example.com/compute/contexts/{contextId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.compute.context+json'
}
r = requests.get('https://example.com/compute/contexts/{contextId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.compute.context+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/contexts/{contextId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /contexts/{contextId}
Returns the context definition that has the specified contextId.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
contextId | path | string | true | Returns the context definition with the specified ID. |
Example responses
200 Response
{
"description": "My Application Context",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context"
},
{
"method": "GET",
"rel": "alternate",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context",
"responseType": "application/vnd.sas.compute.context"
},
{
"method": "PUT",
"rel": "updateWithRules",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context.request",
"responseType": "application/vnd.sas.compute.context"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12"
},
{
"method": "POST",
"rel": "createSession",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions",
"type": "application/vnd.sas.compute.session.request",
"responseType": "application/vnd.sas.compute.session"
},
{
"method": "GET",
"rel": "rules",
"href": "/authorization/rules?filter=eq(objectUri,'/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions')",
"uri": "/authorization/rules?filter=eq(objectUri,'/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions')",
"type": "application/vnd.sas.collection",
"responseType": "application/vnd.sas.authorization.rule"
}
],
"launchType": "service",
"launchContext": {
"contextName": "compsrv"
},
"attributes": {
"sessionInactiveTimeout": 60
},
"mediaTypeMap": {
"csv": "application/vnd.ms-excel"
},
"createdBy": "myUserID",
"modifiedBy": "myUserID",
"modifiedTimeStamp": "2018-05-04T18:02:27.780Z",
"creationTimeStamp": "2018-05-04T18:02:27.749Z",
"id": "309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"version": 4,
"name": "MyApp",
"queueName": "MyAppQueue",
"resources": [
{
"name": "file1",
"uri": "/files/files/ea0d3ee1-894f-4936-bc2b-f611a878a0dd",
"type": "application/vnd.sas.file",
"scope": "SESSION",
"options": {
"LRECL": 1024
}
}
]
}
{
"description": "My Application Context",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context"
},
{
"method": "GET",
"rel": "alternate",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context",
"responseType": "application/vnd.sas.compute.context"
},
{
"method": "PUT",
"rel": "updateWithRules",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context.request",
"responseType": "application/vnd.sas.compute.context"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12"
},
{
"method": "POST",
"rel": "createSession",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions",
"type": "application/vnd.sas.compute.session.request",
"responseType": "application/vnd.sas.compute.session"
},
{
"method": "GET",
"rel": "rules",
"href": "/authorization/rules?filter=eq(objectUri,'/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions')",
"uri": "/authorization/rules?filter=eq(objectUri,'/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions')",
"type": "application/vnd.sas.collection",
"responseType": "application/vnd.sas.authorization.rule"
}
],
"launchType": "service",
"launchContext": {
"contextName": "compsrv"
},
"attributes": {
"sessionInactiveTimeout": 60
},
"mediaTypeMap": {
"csv": "application/vnd.ms-excel"
},
"createdBy": "myUserID",
"modifiedBy": "myUserID",
"modifiedTimeStamp": "2018-05-04T18:02:27.780Z",
"creationTimeStamp": "2018-05-04T18:02:27.749Z",
"id": "309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"version": 4,
"name": "MyApp",
"queueName": "MyAppQueue",
"resources": [
{
"name": "file1",
"uri": "/files/files/ea0d3ee1-894f-4936-bc2b-f611a878a0dd",
"type": "application/vnd.sas.file",
"scope": "SESSION",
"options": {
"LRECL": 1024
}
}
]
}
{
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context"
},
{
"method": "GET",
"rel": "alternate",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context.summary"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12"
},
{
"method": "POST",
"rel": "createSession",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions",
"type": "application/vnd.sas.compute.session.request",
"responseType": "application/vnd.sas.compute.session"
}
],
"id": "309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"version": 2,
"createdBy": "myUserID",
"name": "MyApp"
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | contextSummary |
404 | Not Found | No context definition exists at the requested path. | Inline |
Response Schema
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | Specifies the tag that identifies the revision of this object. |
Verify that a context exists
Code samples
# You can also use wget
curl -X HEAD https://example.com/compute/contexts/{contextId}
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/compute/contexts/{contextId}',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/compute/contexts/{contextId}')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/compute/contexts/{contextId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /contexts/{contextId}
Determines whether the specified context exists.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
contextId | path | string | true | Specifies the context to check. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
404 | Not Found | No context definition exists at the requested path. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | Specifies a tag that identifies the revision of this object. |
Update a context definition
Code samples
# You can also use wget
curl -X PUT https://example.com/compute/contexts/{contextId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.compute.context+json' \
-H 'Accept: application/vnd.sas.compute.context+json' \
-H 'If-Match: string'
const inputBody = '{
"description": "My Application Context",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context"
},
{
"method": "GET",
"rel": "alternate",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context",
"responseType": "application/vnd.sas.compute.context"
},
{
"method": "PUT",
"rel": "updateWithRules",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context.request",
"responseType": "application/vnd.sas.compute.context"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12"
},
{
"method": "POST",
"rel": "createSession",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions",
"type": "application/vnd.sas.compute.session.request",
"responseType": "application/vnd.sas.compute.session"
},
{
"method": "GET",
"rel": "rules",
"href": "/authorization/rules?filter=eq(objectUri,'/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions')",
"uri": "/authorization/rules?filter=eq(objectUri,'/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions')",
"type": "application/vnd.sas.collection",
"responseType": "application/vnd.sas.authorization.rule"
}
],
"launchType": "service",
"launchContext": {
"contextName": "compsrv"
},
"attributes": {
"sessionInactiveTimeout": 60
},
"mediaTypeMap": {
"csv": "application/vnd.ms-excel"
},
"createdBy": "myUserID",
"modifiedBy": "myUserID",
"modifiedTimeStamp": "2018-05-04T18:02:27.780Z",
"creationTimeStamp": "2018-05-04T18:02:27.749Z",
"id": "309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"version": 4,
"name": "MyApp",
"queueName": "MyAppQueue",
"resources": [
{
"name": "file1",
"uri": "/files/files/ea0d3ee1-894f-4936-bc2b-f611a878a0dd",
"type": "application/vnd.sas.file",
"scope": "SESSION",
"options": {
"LRECL": 1024
}
}
]
}';
const headers = {
'Content-Type':'application/vnd.sas.compute.context+json',
'Accept':'application/vnd.sas.compute.context+json',
'If-Match':'string'
};
fetch('https://example.com/compute/contexts/{contextId}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.compute.context+json',
'Accept': 'application/vnd.sas.compute.context+json',
'If-Match': 'string'
}
r = requests.put('https://example.com/compute/contexts/{contextId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.compute.context+json"},
"Accept": []string{"application/vnd.sas.compute.context+json"},
"If-Match": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://example.com/compute/contexts/{contextId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /contexts/{contextId}
Updates a context definition. Changing a context does not affect any sessions that are currently running on the server that is instantiated by that context. Servers that are created after updating the context use the current definition. If the contextId matches the ID of an existing context, that context is updated. Otherwise, an error is returned. The request must include the current ETag of the context as the value of the If-Match request header to prevent concurrent updates. The current ETag of the context is provided in the value of the ETag response header of any endpoint that produces application/vnd.sas.compute.context.
Body parameter
{
"description": "My Application Context",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context"
},
{
"method": "GET",
"rel": "alternate",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context",
"responseType": "application/vnd.sas.compute.context"
},
{
"method": "PUT",
"rel": "updateWithRules",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context.request",
"responseType": "application/vnd.sas.compute.context"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12"
},
{
"method": "POST",
"rel": "createSession",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions",
"type": "application/vnd.sas.compute.session.request",
"responseType": "application/vnd.sas.compute.session"
},
{
"method": "GET",
"rel": "rules",
"href": "/authorization/rules?filter=eq(objectUri,'/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions')",
"uri": "/authorization/rules?filter=eq(objectUri,'/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions')",
"type": "application/vnd.sas.collection",
"responseType": "application/vnd.sas.authorization.rule"
}
],
"launchType": "service",
"launchContext": {
"contextName": "compsrv"
},
"attributes": {
"sessionInactiveTimeout": 60
},
"mediaTypeMap": {
"csv": "application/vnd.ms-excel"
},
"createdBy": "myUserID",
"modifiedBy": "myUserID",
"modifiedTimeStamp": "2018-05-04T18:02:27.780Z",
"creationTimeStamp": "2018-05-04T18:02:27.749Z",
"id": "309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"version": 4,
"name": "MyApp",
"queueName": "MyAppQueue",
"resources": [
{
"name": "file1",
"uri": "/files/files/ea0d3ee1-894f-4936-bc2b-f611a878a0dd",
"type": "application/vnd.sas.file",
"scope": "SESSION",
"options": {
"LRECL": 1024
}
}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
contextId | path | string | true | Specifies the ID of the context definition. |
If-Match | header | string | true | Specifies the current ETag of the context that you are updating. |
body | body | context | true | context definition |
Example responses
200 Response
{
"description": "My Application Context",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context"
},
{
"method": "GET",
"rel": "alternate",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context",
"responseType": "application/vnd.sas.compute.context"
},
{
"method": "PUT",
"rel": "updateWithRules",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context.request",
"responseType": "application/vnd.sas.compute.context"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12"
},
{
"method": "POST",
"rel": "createSession",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions",
"type": "application/vnd.sas.compute.session.request",
"responseType": "application/vnd.sas.compute.session"
},
{
"method": "GET",
"rel": "rules",
"href": "/authorization/rules?filter=eq(objectUri,'/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions')",
"uri": "/authorization/rules?filter=eq(objectUri,'/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions')",
"type": "application/vnd.sas.collection",
"responseType": "application/vnd.sas.authorization.rule"
}
],
"launchType": "service",
"launchContext": {
"contextName": "compsrv"
},
"attributes": {
"sessionInactiveTimeout": 60
},
"mediaTypeMap": {
"csv": "application/vnd.ms-excel"
},
"createdBy": "myUserID",
"modifiedBy": "myUserID",
"modifiedTimeStamp": "2018-05-04T18:02:27.780Z",
"creationTimeStamp": "2018-05-04T18:02:27.749Z",
"id": "309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"version": 4,
"name": "MyApp",
"queueName": "MyAppQueue",
"resources": [
{
"name": "file1",
"uri": "/files/files/ea0d3ee1-894f-4936-bc2b-f611a878a0dd",
"type": "application/vnd.sas.file",
"scope": "SESSION",
"options": {
"LRECL": 1024
}
}
]
}
{
"description": "My Application Context",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context"
},
{
"method": "GET",
"rel": "alternate",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context",
"responseType": "application/vnd.sas.compute.context"
},
{
"method": "PUT",
"rel": "updateWithRules",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context.request",
"responseType": "application/vnd.sas.compute.context"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12"
},
{
"method": "POST",
"rel": "createSession",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions",
"type": "application/vnd.sas.compute.session.request",
"responseType": "application/vnd.sas.compute.session"
},
{
"method": "GET",
"rel": "rules",
"href": "/authorization/rules?filter=eq(objectUri,'/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions')",
"uri": "/authorization/rules?filter=eq(objectUri,'/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions')",
"type": "application/vnd.sas.collection",
"responseType": "application/vnd.sas.authorization.rule"
}
],
"launchType": "service",
"launchContext": {
"contextName": "compsrv"
},
"attributes": {
"sessionInactiveTimeout": 60
},
"mediaTypeMap": {
"csv": "application/vnd.ms-excel"
},
"createdBy": "myUserID",
"modifiedBy": "myUserID",
"modifiedTimeStamp": "2018-05-04T18:02:27.780Z",
"creationTimeStamp": "2018-05-04T18:02:27.749Z",
"id": "309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"version": 4,
"name": "MyApp",
"queueName": "MyAppQueue",
"resources": [
{
"name": "file1",
"uri": "/files/files/ea0d3ee1-894f-4936-bc2b-f611a878a0dd",
"type": "application/vnd.sas.file",
"scope": "SESSION",
"options": {
"LRECL": 1024
}
}
]
}
{
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context"
},
{
"method": "GET",
"rel": "alternate",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context.summary"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12"
},
{
"method": "POST",
"rel": "createSession",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions",
"type": "application/vnd.sas.compute.session.request",
"responseType": "application/vnd.sas.compute.session"
}
],
"id": "309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"version": 2,
"createdBy": "myUserID",
"name": "MyApp"
}
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
409 Response
{
"summary": "Conflict error response",
"description": "This is an example of an error response for a resource update conflict.",
"value": {
"version": 2,
"httpStatusCode": 409,
"message": "Conflict",
"details": [
"The updated resource is not based on the most recently saved resource."
]
}
}
{
"summary": "Conflict error response",
"description": "This is an example of an error response for a resource update conflict.",
"value": {
"version": 2,
"httpStatusCode": 409,
"message": "Conflict",
"details": [
"The updated resource is not based on the most recently saved resource."
]
}
}
412 Response
{
"summary": "Precondition failed error response",
"description": "This is an example of an error response for a conditional request with an invalid precondition.",
"value": {
"version": 2,
"httpStatusCode": 412,
"message": "Precondition Failed",
"details": [
"A precondition for a conditional request has failed."
]
}
}
{
"summary": "Precondition failed error response",
"description": "This is an example of an error response for a conditional request with an invalid precondition.",
"value": {
"version": 2,
"httpStatusCode": 412,
"message": "Precondition Failed",
"details": [
"A precondition for a conditional request has failed."
]
}
}
428 Response
{
"summary": "Precondition required error response",
"description": "This is an example of an error response for a conditional request with a missing precondition.",
"value": {
"version": 2,
"httpStatusCode": 428,
"message": "Precondition Required",
"details": [
"The server refused to accept the request because a precondition is missing."
]
}
}
{
"summary": "Precondition required error response",
"description": "This is an example of an error response for a conditional request with a missing precondition.",
"value": {
"version": 2,
"httpStatusCode": 428,
"message": "Precondition Required",
"details": [
"The server refused to accept the request because a precondition is missing."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | contextSummary |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No context definition exists at the requested path. | Inline |
409 | Conflict | The updated context included in the request was not based on the most recently saved context. A concurrent request updated the context while this request was in process. | Inline |
412 | Precondition Failed | The If-Match request header did not match the resource's entity tag, or the If-Unmodified-Since request header did not match the resources last modified timestamp. |
Inline |
428 | Precondition Required | The request headers did not include an If-Match or If-Unmodified-Since precondition. |
Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 409
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 412
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 428
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Etag | string | Specifies a tag that identifies the revision of this object. |
Request new session
Code samples
# You can also use wget
curl -X POST https://example.com/compute/contexts/{contextId}/sessions \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.compute.session.request+json' \
-H 'Accept: application/vnd.sas.compute.session+json'
const inputBody = '{
"version": 1,
"name": "MySession",
"description": "This is my session for doing some simple work.",
"attributes": {
"sessionInactiveTimeout": 60
},
"environment": {
"options": [
"memsize=4g",
"fullstimer"
]
},
"resources": [
{
"name": "file1",
"uri": "/files/files/ea0d3ee1-894f-4936-bc2b-f611a878a0dd",
"type": "application/vnd.sas.file",
"scope": "SESSION",
"options": {
"LRECL": 1024
}
}
],
"x-widdershins-oldRef": "#/components/schemas/sessionRequest/example"
}';
const headers = {
'Content-Type':'application/vnd.sas.compute.session.request+json',
'Accept':'application/vnd.sas.compute.session+json'
};
fetch('https://example.com/compute/contexts/{contextId}/sessions',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.compute.session.request+json',
'Accept': 'application/vnd.sas.compute.session+json'
}
r = requests.post('https://example.com/compute/contexts/{contextId}/sessions', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.compute.session.request+json"},
"Accept": []string{"application/vnd.sas.compute.session+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/compute/contexts/{contextId}/sessions", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /contexts/{contextId}/sessions
Creates a new session that is based on the Compute context definition that corresponds to the contextId path variable. If a reusable SAS Compute Server is available to handle this session, a new session is created on that SAS Compute Server. Otherwise, a new SAS Compute Server is created and the new session is created on that SAS Compute Server. The new session is associated with the identity of the requester. URLs that define how to access the session are returned. The contextId matches the ID member of a known context entry. The Location header contains the URI of the created session resource.
Body parameter
{
"version": 1,
"name": "MySession",
"description": "This is my session for doing some simple work.",
"attributes": {
"sessionInactiveTimeout": 60
},
"environment": {
"options": [
"memsize=4g",
"fullstimer"
]
},
"resources": [
{
"name": "file1",
"uri": "/files/files/ea0d3ee1-894f-4936-bc2b-f611a878a0dd",
"type": "application/vnd.sas.file",
"scope": "SESSION",
"options": {
"LRECL": 1024
}
}
],
"x-widdershins-oldRef": "#/components/schemas/sessionRequest/example"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
contextId | path | string | true | Specifies the context definition ID. |
body | body | sessionRequest | false | none |
Example responses
201 Response
{
"listingStatistics": {
"lineCount": 5,
"modifiedTimeStamp": "2017-02-20T19:17:33.000Z"
},
"logStatistics": {
"lineCount": 45,
"modifiedTimeStamp": "2017-02-20T19:17:33.000Z"
},
"serviceAPIVersion": 4,
"sessionConditionCode": 0,
"stateElapsedTime": 21,
"attributes": {
"sessionInactiveTimeout": 60
},
"state": "idle",
"owner": "myUserID",
"environment": {
"options": [
"memsize=4g",
"fullstimer"
]
},
"creationTimeStamp": "2016-09-28T14:26:14.000Z",
"serverId": "c1a108bb-6019-4876-807f-eeac467b9c08",
"description": "This is my test session.",
"id": "c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"type": "application/vnd.sas.compute.session"
},
{
"method": "GET",
"rel": "alternate",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"type": "application/vnd.sas.compute.session.summary"
},
{
"method": "GET",
"rel": "state",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/state",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/state",
"type": "text/plain"
},
{
"method": "PUT",
"rel": "cancel",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/state?state=canceled",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/state?state=canceled"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000"
},
{
"method": "POST",
"rel": "execute",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/jobs",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/jobs",
"type": "application/vnd.sas.compute.job.request",
"responseType": "application/vnd.sas.compute.job"
},
{
"method": "GET",
"rel": "jobs",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/jobs",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/jobs",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.job"
},
{
"method": "GET",
"rel": "files",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/filerefs",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/filerefs",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.fileref.summary"
},
{
"method": "POST",
"rel": "assignFileref",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/filerefs",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/filerefs",
"type": "application/vnd.sas.compute.fileref.request",
"responseType": "application/vnd.sas.compute.fileref"
},
{
"method": "GET",
"rel": "librefs",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/data",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/data",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.library.summary"
},
{
"method": "GET",
"rel": "log",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/log",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/log",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.log.line"
},
{
"method": "GET",
"rel": "listing",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/listing",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/listing",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.log.line"
},
{
"method": "GET",
"rel": "results",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/results",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/results",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.result"
}
],
"version": 2,
"name": "MySession"
}
{
"listingStatistics": {
"lineCount": 5,
"modifiedTimeStamp": "2017-02-20T19:17:33.000Z"
},
"logStatistics": {
"lineCount": 45,
"modifiedTimeStamp": "2017-02-20T19:17:33.000Z"
},
"serviceAPIVersion": 4,
"sessionConditionCode": 0,
"stateElapsedTime": 21,
"attributes": {
"sessionInactiveTimeout": 60
},
"state": "idle",
"owner": "myUserID",
"environment": {
"options": [
"memsize=4g",
"fullstimer"
]
},
"creationTimeStamp": "2016-09-28T14:26:14.000Z",
"serverId": "c1a108bb-6019-4876-807f-eeac467b9c08",
"description": "This is my test session.",
"id": "c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"type": "application/vnd.sas.compute.session"
},
{
"method": "GET",
"rel": "alternate",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"type": "application/vnd.sas.compute.session.summary"
},
{
"method": "GET",
"rel": "state",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/state",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/state",
"type": "text/plain"
},
{
"method": "PUT",
"rel": "cancel",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/state?state=canceled",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/state?state=canceled"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000"
},
{
"method": "POST",
"rel": "execute",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/jobs",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/jobs",
"type": "application/vnd.sas.compute.job.request",
"responseType": "application/vnd.sas.compute.job"
},
{
"method": "GET",
"rel": "jobs",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/jobs",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/jobs",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.job"
},
{
"method": "GET",
"rel": "files",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/filerefs",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/filerefs",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.fileref.summary"
},
{
"method": "POST",
"rel": "assignFileref",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/filerefs",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/filerefs",
"type": "application/vnd.sas.compute.fileref.request",
"responseType": "application/vnd.sas.compute.fileref"
},
{
"method": "GET",
"rel": "librefs",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/data",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/data",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.library.summary"
},
{
"method": "GET",
"rel": "log",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/log",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/log",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.log.line"
},
{
"method": "GET",
"rel": "listing",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/listing",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/listing",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.log.line"
},
{
"method": "GET",
"rel": "results",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/results",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/results",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.result"
}
],
"version": 2,
"name": "MySession"
}
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | A session and data were created. | session |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No context definition exists at the requested path. | Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Location | string | Specifies the URI of the created job resource. |
Servers
Contains the operations for SAS Compute Server instances.
Get active servers
Code samples
# You can also use wget
curl -X GET https://example.com/compute/servers \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json' \
-H 'Accept-Item: application/vnd.sas.compute.server+json'
const headers = {
'Accept':'application/vnd.sas.collection+json',
'Accept-Item':'application/vnd.sas.compute.server+json'
};
fetch('https://example.com/compute/servers',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json',
'Accept-Item': 'application/vnd.sas.compute.server+json'
}
r = requests.get('https://example.com/compute/servers', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.collection+json"},
"Accept-Item": []string{"application/vnd.sas.compute.server+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/servers", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /servers
Returns a list of active servers. Standard paging, filtering, and sorting options are provided. This method is restricted to users with ADMIN permission on this URL for monitoring purposes. By default, this endpoint returns a summary of the available information about the active servers. Specify an Accept-Item header with the value application/vnd.sas.compute.server+json to get all available information for each server.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Item | header | string | false | Specifies the desired server representation. The Accept-Item options are:
|
serverId | query | string | false | Returns only the active server that matches the serverId. The serverId is a unique identifier for an active SAS Compute Server instance. |
contextName | query | string | false | Returns only active servers for the specified context definition. |
start | query | integer | false | Specifies the offset of first active server listing to return. The default value is "0". |
limit | query | integer | false | Specifies the maximum number of active server listings to return. The default value is "10". |
filter | query | string(filter-criteria) | false | Specifies the filter criteria for returned active server listings. |
sortBy | query | string(sort-criteria) | false | Sorts returned active server listings. |
Enumerated Values
Parameter | Value |
---|---|
Accept-Item | application/vnd.sas.compute.server+json |
Accept-Item | application/vnd.sas.compute.server.summary+json |
Example responses
200 Response
{
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/compute/servers",
"uri": "/compute/servers",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "self",
"href": "/compute/servers?start=0&limit=10",
"uri": "/compute/servers?start=0&limit=10",
"type": "application/vnd.sas.collection"
}
],
"name": "items",
"accept": "application/vnd.sas.compute.server.summary",
"items": [
{
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/servers/71fc2eae-272c-45b4-aaf7-76f6cf259400",
"uri": "/compute/servers/71fc2eae-272c-45b4-aaf7-76f6cf259400",
"type": "application/vnd.sas.compute.server"
},
{
"method": "GET",
"rel": "alternate",
"href": "/compute/servers/71fc2eae-272c-45b4-aaf7-76f6cf259400",
"uri": "/compute/servers/71fc2eae-272c-45b4-aaf7-76f6cf259400",
"type": "application/vnd.sas.compute.server.summary"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/compute/servers/71fc2eae-272c-45b4-aaf7-76f6cf259400",
"uri": "/compute/servers/71fc2eae-272c-45b4-aaf7-76f6cf259400"
}
],
"id": "71fc2eae-272c-45b4-aaf7-76f6cf259400"
}
],
"version": 2
}
{
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/compute/servers",
"uri": "/compute/servers",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "self",
"href": "/compute/servers?start=0&limit=10",
"uri": "/compute/servers?start=0&limit=10",
"type": "application/vnd.sas.collection"
}
],
"name": "items",
"accept": "application/vnd.sas.compute.server.summary",
"items": [
{
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/servers/71fc2eae-272c-45b4-aaf7-76f6cf259400",
"uri": "/compute/servers/71fc2eae-272c-45b4-aaf7-76f6cf259400",
"type": "application/vnd.sas.compute.server"
},
{
"method": "GET",
"rel": "alternate",
"href": "/compute/servers/71fc2eae-272c-45b4-aaf7-76f6cf259400",
"uri": "/compute/servers/71fc2eae-272c-45b4-aaf7-76f6cf259400",
"type": "application/vnd.sas.compute.server.summary"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/compute/servers/71fc2eae-272c-45b4-aaf7-76f6cf259400",
"uri": "/compute/servers/71fc2eae-272c-45b4-aaf7-76f6cf259400"
}
],
"id": "71fc2eae-272c-45b4-aaf7-76f6cf259400"
}
],
"version": 2
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | serverSummaryCollection |
404 | Not Found | No resource exists at the requested path. | Inline |
Response Schema
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Check endpoint availability
Code samples
# You can also use wget
curl -X HEAD https://example.com/compute/servers
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/compute/servers',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/compute/servers')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/compute/servers", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /servers
Determine whether the servers endpoint is currently available.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverId | query | string | false | Returns the active server that matches a serverId. The serverId is a unique identifier for an active SAS Compute Server instance. |
contextName | query | string | false | Returns active servers for the specified context definition. |
start | query | integer | false | Specifies the offset of the first active server listing to return. The default value is "0". |
limit | query | integer | false | Specifies the maximum number of active server listings to return. The default value is "10". |
filter | query | string(filter-criteria) | false | Specifies the filter criteria for returned active server listings. |
sortBy | query | string(sort-criteria) | false | Sorts returned active server listings. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
404 | Not Found | No server endpoint exists at the requested path. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Stop the server
Code samples
# You can also use wget
curl -X DELETE https://example.com/compute/servers/{serverId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.error+json'
const headers = {
'Accept':'application/vnd.sas.error+json'
};
fetch('https://example.com/compute/servers/{serverId}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.error+json'
}
r = requests.delete('https://example.com/compute/servers/{serverId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.error+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "https://example.com/compute/servers/{serverId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /servers/{serverId}
Stops the specified server instance. The user must have administration permissions on the server to perform this request.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverId | path | string | true | Specifies the ID of the server definition. |
Example responses
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
202 | Accepted | The request has been accepted, but the processing has not been completed. An attempt to check the state of the server returns "stopped". This response is returned in cases when the server cannot immediately stop, but stops when the current process has completed. | None |
204 | No Content | The server was deleted. | None |
404 | Not Found | No server exists at the requested path. | Inline |
Response Schema
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Get links for the active server
Code samples
# You can also use wget
curl -X GET https://example.com/compute/servers/{serverId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.compute.server+json'
const headers = {
'Accept':'application/vnd.sas.compute.server+json'
};
fetch('https://example.com/compute/servers/{serverId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.compute.server+json'
}
r = requests.get('https://example.com/compute/servers/{serverId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.compute.server+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/servers/{serverId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /servers/{serverId}
Returns links and information for the active server instance. The serverId is a unique identifier for an active SAS Compute Server instance.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverId | path | string | true | Returns the active server for this server identifier. |
Example responses
200 Response
{
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf",
"uri": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf",
"type": "application/vnd.sas.compute.server"
},
{
"method": "GET",
"rel": "alternate",
"href": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf",
"uri": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf",
"type": "application/vnd.sas.compute.server.summary"
},
{
"method": "GET",
"rel": "collection",
"href": "/compute/servers",
"uri": "/compute/servers",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.server"
},
{
"method": "GET",
"rel": "state",
"href": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf/state",
"uri": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf/state",
"type": "text/plain"
},
{
"method": "GET",
"rel": "sessions",
"href": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf/sessions",
"uri": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf/sessions",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.session"
},
{
"method": "POST",
"rel": "createsession",
"href": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf/sessions",
"uri": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf/sessions",
"type": "application/vnd.sas.compute.session"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf",
"uri": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf"
}
],
"contextName": "MyApp",
"id": "fc40be99-470c-4142-83c5-2ca7068f28bf"
}
{
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf",
"uri": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf",
"type": "application/vnd.sas.compute.server"
},
{
"method": "GET",
"rel": "alternate",
"href": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf",
"uri": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf",
"type": "application/vnd.sas.compute.server.summary"
},
{
"method": "GET",
"rel": "collection",
"href": "/compute/servers",
"uri": "/compute/servers",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.server"
},
{
"method": "GET",
"rel": "state",
"href": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf/state",
"uri": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf/state",
"type": "text/plain"
},
{
"method": "GET",
"rel": "sessions",
"href": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf/sessions",
"uri": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf/sessions",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.session"
},
{
"method": "POST",
"rel": "createsession",
"href": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf/sessions",
"uri": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf/sessions",
"type": "application/vnd.sas.compute.session"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf",
"uri": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf"
}
],
"contextName": "MyApp",
"id": "fc40be99-470c-4142-83c5-2ca7068f28bf"
}
{
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf",
"uri": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf",
"type": "application/vnd.sas.compute.server"
},
{
"method": "GET",
"rel": "alternate",
"href": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf",
"uri": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf",
"type": "application/vnd.sas.compute.server.summary"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf",
"uri": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf"
}
],
"id": "fc40be99-470c-4142-83c5-2ca7068f28bf"
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | serverSummary |
404 | Not Found | No server exists at the requested path. | Inline |
Response Schema
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | Specifies a tag that identifies the revision of this object. |
Verify that a server exists
Code samples
# You can also use wget
curl -X HEAD https://example.com/compute/servers/{serverId}
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/compute/servers/{serverId}',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/compute/servers/{serverId}')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/compute/servers/{serverId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /servers/{serverId}
Determines whether the specified server exists.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverId | path | string | true | Returns the active server for this server identifier. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
404 | Not Found | No server exists at the requested path. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | Specifies a tag that identifies the revision of this object. |
Get server status
Code samples
# You can also use wget
curl -X GET https://example.com/compute/servers/{serverId}/state \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: text/plain'
const headers = {
'Accept':'text/plain'
};
fetch('https://example.com/compute/servers/{serverId}/state',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'text/plain'
}
r = requests.get('https://example.com/compute/servers/{serverId}/state', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"text/plain"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/servers/{serverId}/state", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /servers/{serverId}/state
Gets the current status of a server. The value that is returned is either running or stopped.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverId | path | string | true | Specifies the ID of the server. |
Example responses
200 Response
"running"
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | string |
404 | Not Found | No server exists at the requested path. | Inline |
Response Schema
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | Specifies a tag that identifies the revision of this object. |
Check server status endpoint
Code samples
# You can also use wget
curl -X HEAD https://example.com/compute/servers/{serverId}/state
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/compute/servers/{serverId}/state',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/compute/servers/{serverId}/state')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/compute/servers/{serverId}/state", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /servers/{serverId}/state
Determines whether the status endpoint for a server is available.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverId | path | string | true | Specifies the ID of the server. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
404 | Not Found | No resource exists at the requested path. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | Specifies a tag that identifies the revision of this object. |
Get active sessions for server
Code samples
# You can also use wget
curl -X GET https://example.com/compute/servers/{serverId}/sessions \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json' \
-H 'Accept-Item: application/vnd.sas.compute.session+json'
const headers = {
'Accept':'application/vnd.sas.collection+json',
'Accept-Item':'application/vnd.sas.compute.session+json'
};
fetch('https://example.com/compute/servers/{serverId}/sessions',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json',
'Accept-Item': 'application/vnd.sas.compute.session+json'
}
r = requests.get('https://example.com/compute/servers/{serverId}/sessions', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.collection+json"},
"Accept-Item": []string{"application/vnd.sas.compute.session+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/servers/{serverId}/sessions", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /servers/{serverId}/sessions
Gets a paginated list of sessions that are owned by the requested service instance. Standard paging, filtering, and sorting options are provided.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Item | header | string | false | Returns the desired session representation. The Accept-Item options are:
|
serverId | path | string | true | Specifies the ID of the server definition. |
start | query | integer | false | Specifies the offset of first session to return. The default value is "0". |
limit | query | integer | false | Specifies the maximum number of sessions to return. The default value is "10". |
filter | query | string(filter-criteria) | false | Specifies the filter criteria for returned sessions. |
sortBy | query | string(sort-criteria) | false | Sorts returned sessions. |
Enumerated Values
Parameter | Value |
---|---|
Accept-Item | application/vnd.sas.compute.session+json |
Accept-Item | application/vnd.sas.compute.session.summary+json |
Example responses
200 Response
{
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/compute/sessions",
"uri": "/compute/sessions",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "self",
"href": "/compute/sessions?start=0&limit=10",
"uri": "/compute/sessions?start=0&limit=10",
"type": "application/vnd.sas.collection"
}
],
"name": "items",
"accept": "application/vnd.sas.compute.session.summary",
"count": 1,
"items": [
{
"id": "c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"type": "application/vnd.sas.compute.session"
},
{
"method": "GET",
"rel": "alternate",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"type": "application/vnd.sas.compute.session.summary"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000"
}
],
"version": 1,
"name": "MySession"
}
],
"version": 2
}
{
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/compute/sessions",
"uri": "/compute/sessions",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "self",
"href": "/compute/sessions?start=0&limit=10",
"uri": "/compute/sessions?start=0&limit=10",
"type": "application/vnd.sas.collection"
}
],
"name": "items",
"accept": "application/vnd.sas.compute.session.summary",
"count": 1,
"items": [
{
"id": "c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"type": "application/vnd.sas.compute.session"
},
{
"method": "GET",
"rel": "alternate",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"type": "application/vnd.sas.compute.session.summary"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000"
}
],
"version": 1,
"name": "MySession"
}
],
"version": 2
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | sessionSummaryCollection |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Check sessions endpoint for a server
Code samples
# You can also use wget
curl -X HEAD https://example.com/compute/servers/{serverId}/sessions
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/compute/servers/{serverId}/sessions',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/compute/servers/{serverId}/sessions')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/compute/servers/{serverId}/sessions", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /servers/{serverId}/sessions
Determines whether the session endpoint for a server is available.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
serverId | path | string | true | Specifies the ID of the server definition. |
start | query | integer | false | Specifies the offset of first session to return. The default value is "0". |
limit | query | integer | false | Specifies the maximum number of sessions to return. The default value is "10". |
filter | query | string(filter-criteria) | false | Specifies the filter criteria for returned sessions. |
sortBy | query | string(sort-criteria) | false | Sorts returned sessions. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
404 | Not Found | No resource exists at the requested path. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Sessions
Contains the operations for sessions that run on a server and handle SAS requests.
Get active compute sessions
Code samples
# You can also use wget
curl -X GET https://example.com/compute/sessions \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json' \
-H 'Accept-Item: application/vnd.sas.compute.session+json'
const headers = {
'Accept':'application/vnd.sas.collection+json',
'Accept-Item':'application/vnd.sas.compute.session+json'
};
fetch('https://example.com/compute/sessions',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json',
'Accept-Item': 'application/vnd.sas.compute.session+json'
}
r = requests.get('https://example.com/compute/sessions', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.collection+json"},
"Accept-Item": []string{"application/vnd.sas.compute.session+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/sessions", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /sessions
Gets a paginated list of sessions. Standard paging, filtering, and sorting options are provided. By default, this endpoint returns a summary of the available information about the sessions. Specify an Accept-Item header with the value application/vnd.sas.compute.session+json to get all available information for each session.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Item | header | string | false | Specifies the desired session representation. The Accept-Item options are:
|
start | query | integer | false | Specifies the offset of first session to return. The default value is "0". |
limit | query | integer | false | Specifies the maximum number of sessions to return. The default value is "10". |
filter | query | string(filter-criteria) | false | Specifies the filter criteria for returned sessions. |
sortBy | query | string(sort-criteria) | false | Sorts returned sessions. |
Enumerated Values
Parameter | Value |
---|---|
Accept-Item | application/vnd.sas.compute.session+json |
Accept-Item | application/vnd.sas.compute.session.summary+json |
Example responses
200 Response
{
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/compute/sessions",
"uri": "/compute/sessions",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "self",
"href": "/compute/sessions?start=0&limit=10",
"uri": "/compute/sessions?start=0&limit=10",
"type": "application/vnd.sas.collection"
}
],
"name": "items",
"accept": "application/vnd.sas.compute.session.summary",
"count": 1,
"items": [
{
"id": "c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"type": "application/vnd.sas.compute.session"
},
{
"method": "GET",
"rel": "alternate",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"type": "application/vnd.sas.compute.session.summary"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000"
}
],
"version": 1,
"name": "MySession"
}
],
"version": 2
}
{
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/compute/sessions",
"uri": "/compute/sessions",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "self",
"href": "/compute/sessions?start=0&limit=10",
"uri": "/compute/sessions?start=0&limit=10",
"type": "application/vnd.sas.collection"
}
],
"name": "items",
"accept": "application/vnd.sas.compute.session.summary",
"count": 1,
"items": [
{
"id": "c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"type": "application/vnd.sas.compute.session"
},
{
"method": "GET",
"rel": "alternate",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"type": "application/vnd.sas.compute.session.summary"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000"
}
],
"version": 1,
"name": "MySession"
}
],
"version": 2
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | sessionSummaryCollection |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Check endpoint availability
Code samples
# You can also use wget
curl -X HEAD https://example.com/compute/sessions
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/compute/sessions',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/compute/sessions')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/compute/sessions", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /sessions
Determines whether a session endpoint is available.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
start | query | integer | false | Specifies the offset of the first session to return. The default value is "0". |
limit | query | integer | false | Maximum number of sessions to return. The default value is "10". |
filter | query | string(filter-criteria) | false | Specifies the filter criteria for returned sessions. |
sortBy | query | string(sort-criteria) | false | Sorts returned sessions. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Get session state
Code samples
# You can also use wget
curl -X GET https://example.com/compute/sessions/{sessionId}/state \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: text/plain' \
-H 'If-None-Match: string'
const headers = {
'Accept':'text/plain',
'If-None-Match':'string'
};
fetch('https://example.com/compute/sessions/{sessionId}/state',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'text/plain',
'If-None-Match': 'string'
}
r = requests.get('https://example.com/compute/sessions/{sessionId}/state', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"text/plain"},
"If-None-Match": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/sessions/{sessionId}/state", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /sessions/{sessionId}/state
Returns the session state.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
wait | query | integer | false | Specifies the request time-out, in seconds. This parameter is ignored unless it is specified in combination with the If-None-Match header. If the state of the resource remains unchanged until the specified number of seconds has elapsed, then a status of 304 is returned. The request determines whether the current state matches the state when the ETag was specified via the If-None-Match header. If the state differs within the specified time period, then the new state is returned. |
If-None-Match | header | string | false | Specifies the ETag associated with a value of the session state. |
Example responses
200 Response
"running"
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | string |
304 | Not Modified | The session state has not changed since the request was issued using the ETag that is specified in the If-None-Match header. |
None |
400 | Bad Request | The request was invalid. The session is in a state that cannot process this request. | Inline |
404 | Not Found | No resource exists at the requested path. | Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | Specifies a tag that identifies the revision of this object. |
Check state availability
Code samples
# You can also use wget
curl -X HEAD https://example.com/compute/sessions/{sessionId}/state \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'If-None-Match: string'
const headers = {
'If-None-Match':'string'
};
fetch('https://example.com/compute/sessions/{sessionId}/state',
{
method: 'HEAD',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'If-None-Match': 'string'
}
r = requests.head('https://example.com/compute/sessions/{sessionId}/state', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"If-None-Match": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/compute/sessions/{sessionId}/state", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /sessions/{sessionId}/state
Determines whether the state endpoint is available.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session whose state endpoint you are checking. |
wait | query | integer | false | Specifies the request time-out, in seconds. This parameter is ignored unless it is specified in combination with the If-None-Match header. If the state of the resource remains unchanged until the specified number of seconds has elapsed, then a status of 304 is returned. The request determines whether the current state matches the state when the ETag was specified via the If-None-Match header. If the state differs within the specified time period, then the new state is returned. |
If-None-Match | header | string | false | Specifies the ETag that is associated with a value of the session state. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
304 | Not Modified | The session state has not changed since the request was issued using the ETag that is specified in the If-None-Match header. |
None |
404 | Not Found | No resource exists at the requested path. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | Specifies a tag that identifies the revision of this object. |
Set state of a session
Code samples
# You can also use wget
curl -X PUT https://example.com/compute/sessions/{sessionId}/state?value=canceled \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.error+json' \
-H 'If-Match: string'
const headers = {
'Accept':'application/vnd.sas.error+json',
'If-Match':'string'
};
fetch('https://example.com/compute/sessions/{sessionId}/state?value=canceled',
{
method: 'PUT',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.error+json',
'If-Match': 'string'
}
r = requests.put('https://example.com/compute/sessions/{sessionId}/state', params={
'value': 'canceled'
}, headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.error+json"},
"If-Match": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://example.com/compute/sessions/{sessionId}/state", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /sessions/{sessionId}/state
Sets the current state of a session. Use this method to cancel running code by setting the state to canceled.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
value | query | string | true | Specifies the new session state, such as canceled. |
If-Match | header | string | true | Specifies the ETag of the session that you are updating. |
Enumerated Values
Parameter | Value |
---|---|
value | canceled |
value | deleted |
Example responses
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
412 Response
{
"summary": "Precondition failed error response",
"description": "This is an example of an error response for a conditional request with an invalid precondition.",
"value": {
"version": 2,
"httpStatusCode": 412,
"message": "Precondition Failed",
"details": [
"A precondition for a conditional request has failed."
]
}
}
{
"summary": "Precondition failed error response",
"description": "This is an example of an error response for a conditional request with an invalid precondition.",
"value": {
"version": 2,
"httpStatusCode": 412,
"message": "Precondition Failed",
"details": [
"A precondition for a conditional request has failed."
]
}
}
428 Response
{
"summary": "Precondition required error response",
"description": "This is an example of an error response for a conditional request with a missing precondition.",
"value": {
"version": 2,
"httpStatusCode": 428,
"message": "Precondition Required",
"details": [
"The server refused to accept the request because a precondition is missing."
]
}
}
{
"summary": "Precondition required error response",
"description": "This is an example of an error response for a conditional request with a missing precondition.",
"value": {
"version": 2,
"httpStatusCode": 428,
"message": "Precondition Required",
"details": [
"The server refused to accept the request because a precondition is missing."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. The updated state was returned. | None |
400 | Bad Request | The request was invalid. An invalid state was provided for this session. | Inline |
404 | Not Found | No session exists at the requested path. | Inline |
412 | Precondition Failed | The If-Match request header did not match the resource's entity tag, or the If-Unmodified-Since request header did not match the resources last modified timestamp. |
Inline |
428 | Precondition Required | The request headers did not include an If-Match or If-Unmodified-Since precondition. |
Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 412
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 428
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Etag | string | Specifies a tag that identifies the revision of this session. |
Delete session
Code samples
# You can also use wget
curl -X DELETE https://example.com/compute/sessions/{sessionId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.error+json'
const headers = {
'Accept':'application/vnd.sas.error+json'
};
fetch('https://example.com/compute/sessions/{sessionId}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.error+json'
}
r = requests.delete('https://example.com/compute/sessions/{sessionId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.error+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "https://example.com/compute/sessions/{sessionId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /sessions/{sessionId}
Deletes the specified session.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string | true | Specifies the ID of the session. |
Example responses
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
202 | Accepted | The request has been accepted, but the processing has not been completed. This response is returned in cases when the session cannot immediately be stopped, but stops when the current processing has completed. | None |
204 | No Content | The session was deleted. | None |
404 | Not Found | No session exists at the requested path. | Inline |
Response Schema
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Get current session information
Code samples
# You can also use wget
curl -X GET https://example.com/compute/sessions/{sessionId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.compute.session+json'
const headers = {
'Accept':'application/vnd.sas.compute.session+json'
};
fetch('https://example.com/compute/sessions/{sessionId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.compute.session+json'
}
r = requests.get('https://example.com/compute/sessions/{sessionId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.compute.session+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/sessions/{sessionId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /sessions/{sessionId}
Returns a representation of the session that includes links for the session.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
Example responses
200 Response
{
"listingStatistics": {
"lineCount": 5,
"modifiedTimeStamp": "2017-02-20T19:17:33.000Z"
},
"logStatistics": {
"lineCount": 45,
"modifiedTimeStamp": "2017-02-20T19:17:33.000Z"
},
"serviceAPIVersion": 4,
"sessionConditionCode": 0,
"stateElapsedTime": 21,
"attributes": {
"sessionInactiveTimeout": 60
},
"state": "idle",
"owner": "myUserID",
"environment": {
"options": [
"memsize=4g",
"fullstimer"
]
},
"creationTimeStamp": "2016-09-28T14:26:14.000Z",
"serverId": "c1a108bb-6019-4876-807f-eeac467b9c08",
"description": "This is my test session.",
"id": "c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"type": "application/vnd.sas.compute.session"
},
{
"method": "GET",
"rel": "alternate",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"type": "application/vnd.sas.compute.session.summary"
},
{
"method": "GET",
"rel": "state",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/state",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/state",
"type": "text/plain"
},
{
"method": "PUT",
"rel": "cancel",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/state?state=canceled",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/state?state=canceled"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000"
},
{
"method": "POST",
"rel": "execute",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/jobs",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/jobs",
"type": "application/vnd.sas.compute.job.request",
"responseType": "application/vnd.sas.compute.job"
},
{
"method": "GET",
"rel": "jobs",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/jobs",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/jobs",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.job"
},
{
"method": "GET",
"rel": "files",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/filerefs",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/filerefs",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.fileref.summary"
},
{
"method": "POST",
"rel": "assignFileref",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/filerefs",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/filerefs",
"type": "application/vnd.sas.compute.fileref.request",
"responseType": "application/vnd.sas.compute.fileref"
},
{
"method": "GET",
"rel": "librefs",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/data",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/data",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.library.summary"
},
{
"method": "GET",
"rel": "log",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/log",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/log",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.log.line"
},
{
"method": "GET",
"rel": "listing",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/listing",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/listing",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.log.line"
},
{
"method": "GET",
"rel": "results",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/results",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/results",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.result"
}
],
"version": 2,
"name": "MySession"
}
{
"listingStatistics": {
"lineCount": 5,
"modifiedTimeStamp": "2017-02-20T19:17:33.000Z"
},
"logStatistics": {
"lineCount": 45,
"modifiedTimeStamp": "2017-02-20T19:17:33.000Z"
},
"serviceAPIVersion": 4,
"sessionConditionCode": 0,
"stateElapsedTime": 21,
"attributes": {
"sessionInactiveTimeout": 60
},
"state": "idle",
"owner": "myUserID",
"environment": {
"options": [
"memsize=4g",
"fullstimer"
]
},
"creationTimeStamp": "2016-09-28T14:26:14.000Z",
"serverId": "c1a108bb-6019-4876-807f-eeac467b9c08",
"description": "This is my test session.",
"id": "c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"type": "application/vnd.sas.compute.session"
},
{
"method": "GET",
"rel": "alternate",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"type": "application/vnd.sas.compute.session.summary"
},
{
"method": "GET",
"rel": "state",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/state",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/state",
"type": "text/plain"
},
{
"method": "PUT",
"rel": "cancel",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/state?state=canceled",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/state?state=canceled"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000"
},
{
"method": "POST",
"rel": "execute",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/jobs",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/jobs",
"type": "application/vnd.sas.compute.job.request",
"responseType": "application/vnd.sas.compute.job"
},
{
"method": "GET",
"rel": "jobs",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/jobs",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/jobs",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.job"
},
{
"method": "GET",
"rel": "files",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/filerefs",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/filerefs",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.fileref.summary"
},
{
"method": "POST",
"rel": "assignFileref",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/filerefs",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/filerefs",
"type": "application/vnd.sas.compute.fileref.request",
"responseType": "application/vnd.sas.compute.fileref"
},
{
"method": "GET",
"rel": "librefs",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/data",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/data",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.library.summary"
},
{
"method": "GET",
"rel": "log",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/log",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/log",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.log.line"
},
{
"method": "GET",
"rel": "listing",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/listing",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/listing",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.log.line"
},
{
"method": "GET",
"rel": "results",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/results",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/results",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.result"
}
],
"version": 2,
"name": "MySession"
}
{
"id": "c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"type": "application/vnd.sas.compute.session"
},
{
"method": "GET",
"rel": "alternate",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"type": "application/vnd.sas.compute.session.summary"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000"
}
],
"version": 1,
"name": "MySession"
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | sessionSummary |
404 | Not Found | No session exists at the requested path. | Inline |
Response Schema
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | Specifies a tag that identifies the revision of this object. |
Verify session availability
Code samples
# You can also use wget
curl -X HEAD https://example.com/compute/sessions/{sessionId}
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/compute/sessions/{sessionId}',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/compute/sessions/{sessionId}')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/compute/sessions/{sessionId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /sessions/{sessionId}
Determines whether the specified session is available.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session that you are checking. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
404 | Not Found | No session exists at the requested path. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | Specifies a tag that identifies the revision of this object. |
Jobs
Contains the operations for submitting session jobs.
Execute SAS code in a session
Code samples
# You can also use wget
curl -X POST https://example.com/compute/sessions/{sessionId}/jobs \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.compute.job.request+json' \
-H 'Accept: application/vnd.sas.compute.job+json'
const inputBody = '{
"version": 2,
"name": "MyOptions",
"description": "Getting the options for my session.",
"code": [
"proc options;",
"run;"
],
"attributes": {
"resetLogLineNumbers": false
},
"x-widdershins-oldRef": "#/components/schemas/jobRequest/example"
}';
const headers = {
'Content-Type':'application/vnd.sas.compute.job.request+json',
'Accept':'application/vnd.sas.compute.job+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/jobs',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.compute.job.request+json',
'Accept': 'application/vnd.sas.compute.job+json'
}
r = requests.post('https://example.com/compute/sessions/{sessionId}/jobs', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.compute.job.request+json"},
"Accept": []string{"application/vnd.sas.compute.job+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/compute/sessions/{sessionId}/jobs", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /sessions/{sessionId}/jobs
Executes SAS code in the specified session. Code is always submitted asynchronously. URLs are returned that contain endpoints. The Location header contains the URI of the job resource. You might submit the code directly in a request or as a reference to a File service resource.
Body parameter
{
"version": 2,
"name": "MyOptions",
"description": "Getting the options for my session.",
"code": [
"proc options;",
"run;"
],
"attributes": {
"resetLogLineNumbers": false
},
"x-widdershins-oldRef": "#/components/schemas/jobRequest/example"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string | true | Specifies the ID of the session. |
body | body | jobRequest | true | Specifies the job submission request. |
Example responses
201 Response
{
"listingStatistics": {
"lineCount": 5,
"modifiedTimeStamp": "2017-02-20T19:17:33.000Z"
},
"logStatistics": {
"lineCount": 45,
"modifiedTimeStamp": "2017-02-20T19:17:33.000Z"
},
"completedTimeStamp": "2016-05-20T16:16:10.000Z",
"creationTimeStamp": "2016-05-20T16:16:10.000Z",
"id": "0",
"jobConditionCode": 0,
"links": [
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.job",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/state",
"method": "GET",
"rel": "state",
"type": "text/plain",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/state"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/state?value=canceled",
"method": "PUT",
"rel": "cancel",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/state?value=canceled"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0",
"method": "DELETE",
"rel": "delete",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/log",
"itemType": "application/vnd.sas.compute.log.line",
"method": "GET",
"rel": "log",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/log"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/listing",
"itemType": "application/vnd.sas.compute.log.line",
"method": "GET",
"rel": "listing",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/listing"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/results",
"method": "GET",
"rel": "results",
"type": "application/vnd.sas.compute.result",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/results"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000",
"method": "GET",
"rel": "up",
"type": "application/vnd.sas.compute.session",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000"
}
],
"sessionId": "4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000",
"state": "completed",
"version": 1
}
{
"listingStatistics": {
"lineCount": 5,
"modifiedTimeStamp": "2017-02-20T19:17:33.000Z"
},
"logStatistics": {
"lineCount": 45,
"modifiedTimeStamp": "2017-02-20T19:17:33.000Z"
},
"completedTimeStamp": "2016-05-20T16:16:10.000Z",
"creationTimeStamp": "2016-05-20T16:16:10.000Z",
"id": "0",
"jobConditionCode": 0,
"links": [
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.job",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/state",
"method": "GET",
"rel": "state",
"type": "text/plain",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/state"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/state?value=canceled",
"method": "PUT",
"rel": "cancel",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/state?value=canceled"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0",
"method": "DELETE",
"rel": "delete",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/log",
"itemType": "application/vnd.sas.compute.log.line",
"method": "GET",
"rel": "log",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/log"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/listing",
"itemType": "application/vnd.sas.compute.log.line",
"method": "GET",
"rel": "listing",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/listing"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/results",
"method": "GET",
"rel": "results",
"type": "application/vnd.sas.compute.result",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/results"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000",
"method": "GET",
"rel": "up",
"type": "application/vnd.sas.compute.session",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000"
}
],
"sessionId": "4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000",
"state": "completed",
"version": 1
}
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | A job was created. | job |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No session exists at the requested path. | Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Location | string | Specifies the URI of the created job resource. |
Get the current jobs for a session
Code samples
# You can also use wget
curl -X GET https://example.com/compute/sessions/{sessionId}/jobs \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/jobs',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.get('https://example.com/compute/sessions/{sessionId}/jobs', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.collection+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/sessions/{sessionId}/jobs", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /sessions/{sessionId}/jobs
Returns a collection of all the current jobs for a session. Standard paging, filtering, and sorting options are provided.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string | true | Specifies the ID of the session. |
jobId | query | string | false | Returns jobs that match the specified jobId. |
start | query | integer | false | Specifies the offset of the first job to return. The default value is "0". |
limit | query | integer | false | Specifies the maximum number of jobs to return. The default value is "10". |
filter | query | string(filter-criteria) | false | Specifies the filter criteria for returned jobs. |
sortBy | query | string(sort-criteria) | false | Sorts returned jobs. |
Example responses
200 Response
{
"accept": "application/vnd.sas.compute.job",
"count": 1,
"items": [
{
"completedTimeStamp": "2016-05-20T16:16:10.000Z",
"creationTimeStamp": "2016-05-20T16:16:10.000Z",
"id": "0",
"jobConditionCode": 0,
"links": [
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.job",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/state",
"method": "GET",
"rel": "state",
"type": "text/plain",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/state"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/state?value=canceled",
"method": "PUT",
"rel": "cancel",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/state?value=canceled"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0",
"method": "DELETE",
"rel": "delete",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/log",
"itemType": "application/vnd.sas.compute.log.line",
"method": "GET",
"rel": "log",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/log"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/listing",
"itemType": "application/vnd.sas.compute.log.line",
"method": "GET",
"rel": "listing",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/listing"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/results",
"method": "GET",
"rel": "results",
"type": "application/vnd.sas.compute.result",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/results"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000",
"method": "GET",
"rel": "up",
"type": "application/vnd.sas.compute.session",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000"
}
],
"sessionId": "4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000",
"state": "completed"
}
],
"limit": 10,
"links": [
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs?start=0&limit=10",
"itemType": "application/vnd.sas.compute.job",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs?start=0&limit=10"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs",
"itemType": "application/vnd.sas.compute.job",
"method": "GET",
"rel": "collection",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs",
"method": "POST",
"rel": "create",
"type": "application/vnd.sas.compute.job",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs"
}
],
"name": "Current Jobs",
"start": 0,
"version": 2
}
{
"accept": "application/vnd.sas.compute.job",
"count": 1,
"items": [
{
"completedTimeStamp": "2016-05-20T16:16:10.000Z",
"creationTimeStamp": "2016-05-20T16:16:10.000Z",
"id": "0",
"jobConditionCode": 0,
"links": [
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.job",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/state",
"method": "GET",
"rel": "state",
"type": "text/plain",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/state"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/state?value=canceled",
"method": "PUT",
"rel": "cancel",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/state?value=canceled"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0",
"method": "DELETE",
"rel": "delete",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/log",
"itemType": "application/vnd.sas.compute.log.line",
"method": "GET",
"rel": "log",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/log"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/listing",
"itemType": "application/vnd.sas.compute.log.line",
"method": "GET",
"rel": "listing",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/listing"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/results",
"method": "GET",
"rel": "results",
"type": "application/vnd.sas.compute.result",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/results"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000",
"method": "GET",
"rel": "up",
"type": "application/vnd.sas.compute.session",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000"
}
],
"sessionId": "4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000",
"state": "completed"
}
],
"limit": 10,
"links": [
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs?start=0&limit=10",
"itemType": "application/vnd.sas.compute.job",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs?start=0&limit=10"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs",
"itemType": "application/vnd.sas.compute.job",
"method": "GET",
"rel": "collection",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs",
"method": "POST",
"rel": "create",
"type": "application/vnd.sas.compute.job",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs"
}
],
"name": "Current Jobs",
"start": 0,
"version": 2
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | jobCollection |
404 | Not Found | No session exists at the requested path. | Inline |
Response Schema
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Check endpoint availability
Code samples
# You can also use wget
curl -X HEAD https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/state \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'If-None-Match: string'
const headers = {
'If-None-Match':'string'
};
fetch('https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/state',
{
method: 'HEAD',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'If-None-Match': 'string'
}
r = requests.head('https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/state', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"If-None-Match": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/state", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /sessions/{sessionId}/jobs/{jobId}/state
Determines whether the state can be determined for a job.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
jobId | path | string | true | Specifies the ID of the job to return information for. |
wait | query | integer | false | Specifies the request time-out, in seconds. This parameter is ignored unless it is specified in combination with the If-None-Match header. If the state of the resource remains unchanged until the specified number of seconds has elapsed, then a status of 304 is returned. The request determines whether the current state matches the state when the ETag was specified via the If-None-Match header. If the state differs within the specified time period, then the new state is returned. |
If-None-Match | header | string | false | Specifies the ETag that is associated with a value of the job state. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
304 | Not Modified | The session state has not changed since the request was issued using the ETag that is specified in the If-None-Match header. |
None |
400 | Bad Request | The request was invalid. The session is in a state that cannot process this request. | None |
404 | Not Found | No resource exists at the requested path. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | Specifies a tag that identifies the revision of this object. |
Delete a job
Code samples
# You can also use wget
curl -X DELETE https://example.com/compute/sessions/{sessionId}/jobs/{jobId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.error+json'
const headers = {
'Accept':'application/vnd.sas.error+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/jobs/{jobId}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.error+json'
}
r = requests.delete('https://example.com/compute/sessions/{sessionId}/jobs/{jobId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.error+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "https://example.com/compute/sessions/{sessionId}/jobs/{jobId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /sessions/{sessionId}/jobs/{jobId}
Deletes a job and all job access points into a session from this job. The log, listing, and results that were created by the job are also deleted. Actual job resources are still available via the session, until the session is destroyed.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string | true | Specifies the ID of the session. |
jobId | path | string | true | Specifies the ID of the job. |
Example responses
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | The job was deleted. | None |
404 | Not Found | No resource exists at the requested path. | Inline |
Response Schema
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Get information about a job
Code samples
# You can also use wget
curl -X GET https://example.com/compute/sessions/{sessionId}/jobs/{jobId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.compute.job+json'
const headers = {
'Accept':'application/vnd.sas.compute.job+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/jobs/{jobId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.compute.job+json'
}
r = requests.get('https://example.com/compute/sessions/{sessionId}/jobs/{jobId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.compute.job+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/sessions/{sessionId}/jobs/{jobId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /sessions/{sessionId}/jobs/{jobId}
Returns information about a specified job. This information includes the job's current state and links to other endpoints that are associated with the job, such as results, log, or output.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
jobId | path | string | true | Specifies the ID of the job to return information for. |
Example responses
200 Response
{
"listingStatistics": {
"lineCount": 5,
"modifiedTimeStamp": "2017-02-20T19:17:33.000Z"
},
"logStatistics": {
"lineCount": 45,
"modifiedTimeStamp": "2017-02-20T19:17:33.000Z"
},
"completedTimeStamp": "2016-05-20T16:16:10.000Z",
"creationTimeStamp": "2016-05-20T16:16:10.000Z",
"id": "0",
"jobConditionCode": 0,
"links": [
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.job",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/state",
"method": "GET",
"rel": "state",
"type": "text/plain",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/state"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/state?value=canceled",
"method": "PUT",
"rel": "cancel",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/state?value=canceled"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0",
"method": "DELETE",
"rel": "delete",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/log",
"itemType": "application/vnd.sas.compute.log.line",
"method": "GET",
"rel": "log",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/log"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/listing",
"itemType": "application/vnd.sas.compute.log.line",
"method": "GET",
"rel": "listing",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/listing"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/results",
"method": "GET",
"rel": "results",
"type": "application/vnd.sas.compute.result",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/results"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000",
"method": "GET",
"rel": "up",
"type": "application/vnd.sas.compute.session",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000"
}
],
"sessionId": "4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000",
"state": "completed",
"version": 1
}
{
"listingStatistics": {
"lineCount": 5,
"modifiedTimeStamp": "2017-02-20T19:17:33.000Z"
},
"logStatistics": {
"lineCount": 45,
"modifiedTimeStamp": "2017-02-20T19:17:33.000Z"
},
"completedTimeStamp": "2016-05-20T16:16:10.000Z",
"creationTimeStamp": "2016-05-20T16:16:10.000Z",
"id": "0",
"jobConditionCode": 0,
"links": [
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.job",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/state",
"method": "GET",
"rel": "state",
"type": "text/plain",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/state"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/state?value=canceled",
"method": "PUT",
"rel": "cancel",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/state?value=canceled"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0",
"method": "DELETE",
"rel": "delete",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/log",
"itemType": "application/vnd.sas.compute.log.line",
"method": "GET",
"rel": "log",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/log"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/listing",
"itemType": "application/vnd.sas.compute.log.line",
"method": "GET",
"rel": "listing",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/listing"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/results",
"method": "GET",
"rel": "results",
"type": "application/vnd.sas.compute.result",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/results"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000",
"method": "GET",
"rel": "up",
"type": "application/vnd.sas.compute.session",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000"
}
],
"sessionId": "4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000",
"state": "completed",
"version": 1
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | job |
404 | Not Found | No resource exists at the requested path. | Inline |
Response Schema
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | Specifies a tag that identifies the revision of this object. |
Verify that a job exists
Code samples
# You can also use wget
curl -X HEAD https://example.com/compute/sessions/{sessionId}/jobs/{jobId}
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/compute/sessions/{sessionId}/jobs/{jobId}',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/compute/sessions/{sessionId}/jobs/{jobId}')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/compute/sessions/{sessionId}/jobs/{jobId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /sessions/{sessionId}/jobs/{jobId}
Determines whether the specified job exists.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
jobId | path | string | true | Specifies the ID of the job to query. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
404 | Not Found | No resource exists at the requested path. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | Specifies a tag that identifies the revision of this object. |
Get current state of a job
Code samples
# You can also use wget
curl -X GET https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/state \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: text/plain' \
-H 'If-None-Match: string'
const headers = {
'Accept':'text/plain',
'If-None-Match':'string'
};
fetch('https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/state',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'text/plain',
'If-None-Match': 'string'
}
r = requests.get('https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/state', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"text/plain"},
"If-None-Match": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/state", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /sessions/{sessionId}/jobs/{jobId}/state
Returns the current state of the specified job.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
jobId | path | string | true | Specifies the ID of the job to return information for. |
wait | query | integer | false | Specifies the request time-out, in seconds. This parameter is ignored unless it is specified in combination with the If-None-Match header. If the state of the resource remains unchanged until the specified number of seconds has elapsed, then a status of 304 is returned. The request determines whether the current state matches the state when the ETag was specified via the If-None-Match header. If the state differs within the specified time period, then the new state is returned. |
If-None-Match | header | string | false | Specifies the ETag that is associated with a value of the job state. |
Example responses
200 Response
"running"
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | string |
304 | Not Modified | The session state has not changed since the request was issued using the ETag that is specified in the If-None-Match header. |
None |
400 | Bad Request | The request was invalid. The session is in a state that cannot process this request. | Inline |
404 | Not Found | No resource exists at the requested path. | Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | Specifies a tag that identifies the revision of this object. |
Set current state of a job
Code samples
# You can also use wget
curl -X PUT https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/state?value=canceled \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: text/plain' \
-H 'If-Match: string'
const headers = {
'Accept':'text/plain',
'If-Match':'string'
};
fetch('https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/state?value=canceled',
{
method: 'PUT',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'text/plain',
'If-Match': 'string'
}
r = requests.put('https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/state', params={
'value': 'canceled'
}, headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"text/plain"},
"If-Match": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/state", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /sessions/{sessionId}/jobs/{jobId}/state
Sets the current state of the specified job. For example, you can use this method to set the state to canceled.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
jobId | path | string | true | Specifies the ID of the job whose state you want to update. |
value | query | string | true | Specifies the new job state, such as canceled. |
If-Match | header | string | true | Specifies the current ETag of the job being updated. |
Enumerated Values
Parameter | Value |
---|---|
value | canceled |
value | deleted |
Example responses
200 Response
"canceled"
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
409 Response
{
"summary": "Conflict error response",
"description": "This is an example of an error response for a resource update conflict.",
"value": {
"version": 2,
"httpStatusCode": 409,
"message": "Conflict",
"details": [
"The updated resource is not based on the most recently saved resource."
]
}
}
{
"summary": "Conflict error response",
"description": "This is an example of an error response for a resource update conflict.",
"value": {
"version": 2,
"httpStatusCode": 409,
"message": "Conflict",
"details": [
"The updated resource is not based on the most recently saved resource."
]
}
}
412 Response
{
"summary": "Precondition failed error response",
"description": "This is an example of an error response for a conditional request with an invalid precondition.",
"value": {
"version": 2,
"httpStatusCode": 412,
"message": "Precondition Failed",
"details": [
"A precondition for a conditional request has failed."
]
}
}
{
"summary": "Precondition failed error response",
"description": "This is an example of an error response for a conditional request with an invalid precondition.",
"value": {
"version": 2,
"httpStatusCode": 412,
"message": "Precondition Failed",
"details": [
"A precondition for a conditional request has failed."
]
}
}
428 Response
{
"summary": "Precondition required error response",
"description": "This is an example of an error response for a conditional request with a missing precondition.",
"value": {
"version": 2,
"httpStatusCode": 428,
"message": "Precondition Required",
"details": [
"The server refused to accept the request because a precondition is missing."
]
}
}
{
"summary": "Precondition required error response",
"description": "This is an example of an error response for a conditional request with a missing precondition.",
"value": {
"version": 2,
"httpStatusCode": 428,
"message": "Precondition Required",
"details": [
"The server refused to accept the request because a precondition is missing."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. The updated state was returned. | string |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No resource exists at the requested path. | Inline |
409 | Conflict | The state request conflicts with current state of the job. | Inline |
412 | Precondition Failed | The If-Match request header did not match the resource's entity tag, or the If-Unmodified-Since request header did not match the resources last modified timestamp. |
Inline |
428 | Precondition Required | The request headers did not include an If-Match or If-Unmodified-Since precondition. |
Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 409
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 412
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 428
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Etag | string | Specifies a tag that identifies the revision of this job. |
Listings
Contains the operations for retrieving SAS output information from a job.
Retrieve listing information for a session
Code samples
# You can also use wget
curl -X GET https://example.com/compute/sessions/{sessionId}/listing \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/listing',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.get('https://example.com/compute/sessions/{sessionId}/listing', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.collection+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/sessions/{sessionId}/listing", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /sessions/{sessionId}/listing
Retrieves the listing output associated with a session. This operation returns a collection in which each entry is of the type application/vnd.sas.compute.log.line.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string | true | Specifies the ID of the session. |
start | query | integer(int64) | false | Specifies the offset of the first item in the collection. The first line is at start=0. |
limit | query | integer(int32) | false | Specifies the number of items in this page. |
type | query | string | false | Restricts listing information to those entries whose type matches the query. Specify multiple types by separating them with a ' |
timeout | query | integer | false | Specifies the request time-out in seconds. |
Example responses
200 Response
{
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/listing?start=0&limit=5",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/listing?start=0&limit=5",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.log.line"
},
{
"method": "GET",
"rel": "collection",
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/listing",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/listing",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.log.line"
}
],
"name": "Session List",
"accept": "application/vnd.sas.compute.log.line",
"start": 0,
"count": 5,
"items": [
{
"line": "1 The SAS System 15:26 Friday, May 20, 2016 1",
"type": "title"
},
{
"line": " ",
"type": "title"
},
{
"line": " Obs x",
"type": "hilighted"
},
{
"line": " ",
"type": "normal"
},
{
"line": " 1 3",
"type": "normal"
}
],
"limit": 5,
"version": 2
}
{
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/listing?start=0&limit=5",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/listing?start=0&limit=5",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.log.line"
},
{
"method": "GET",
"rel": "collection",
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/listing",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/listing",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.log.line"
}
],
"name": "Session List",
"accept": "application/vnd.sas.compute.log.line",
"start": 0,
"count": 5,
"items": [
{
"line": "1 The SAS System 15:26 Friday, May 20, 2016 1",
"type": "title"
},
{
"line": " ",
"type": "title"
},
{
"line": " Obs x",
"type": "hilighted"
},
{
"line": " ",
"type": "normal"
},
{
"line": " 1 3",
"type": "normal"
}
],
"limit": 5,
"version": 2
}
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | sessionListingCollection |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No resource exists at the requested path. | Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Check for a session listing
Code samples
# You can also use wget
curl -X HEAD https://example.com/compute/sessions/{sessionId}/listing
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/compute/sessions/{sessionId}/listing',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/compute/sessions/{sessionId}/listing')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/compute/sessions/{sessionId}/listing", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /sessions/{sessionId}/listing
Determines whether a session listing is available.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string | true | Specifies the ID of the session. |
start | query | integer(int64) | false | Specifies the offset of the first item in the collection. The first line is at start=0. |
limit | query | integer(int32) | false | Specifies the number of items in this page. |
type | query | string | false | Restricts listing information to those entries whose type matches the query. Specify multiple types by separating them with a ' |
timeout | query | integer | false | Specifies the request time-out in seconds. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No resource exists at the requested path. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Upload session listing output to the Files service
Code samples
# You can also use wget
curl -X POST https://example.com/compute/sessions/{sessionId}/listing \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.compute.output.stream.file.request+json' \
-H 'Accept: application/vnd.sas.file+json'
const inputBody = '{
"version": 1,
"attributes": {
"format": "prefixedText"
},
"x-widdershins-oldRef": "#/components/schemas/outputStreamFileRequest/example"
}';
const headers = {
'Content-Type':'application/vnd.sas.compute.output.stream.file.request+json',
'Accept':'application/vnd.sas.file+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/listing',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.compute.output.stream.file.request+json',
'Accept': 'application/vnd.sas.file+json'
}
r = requests.post('https://example.com/compute/sessions/{sessionId}/listing', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.compute.output.stream.file.request+json"},
"Accept": []string{"application/vnd.sas.file+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/compute/sessions/{sessionId}/listing", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /sessions/{sessionId}/listing
Uploads session listing output to the Files service and returns the representation of the file resource containing the output. The file is created in one of two formats, based on the value of the property "format" specified in the post body. If "collection" is specified as the value of "format", the output file is rendered as application/vnd.sas.collection+json. If the format is specified as "prefixedText", the output is text/plain in which each line of output is prefixed with the name of the line type followed by a colon. In either case, all available output is returned; neither pagination nor filtering is supported.
Body parameter
{
"version": 1,
"attributes": {
"format": "prefixedText"
},
"x-widdershins-oldRef": "#/components/schemas/outputStreamFileRequest/example"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string | true | Specifies the ID of the session. |
body | body | outputStreamFileRequest | true | Specifies the request to stream output to the Files service. |
Example responses
201 Response
{
"summary": "File resource version 4",
"description": "Here is the response for file resource version 4",
"value": {
"creationTimeStamp": "2022-03-31T20:00:03.609Z",
"modifiedTimeStamp": "2022-03-31T20:00:03.826Z",
"createdBy": "sas.audit",
"modifiedBy": "sas.audit",
"id": "cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"parentUri": "/jobExecution/jobs/b9fe292d-2a4e-434c-8154-5f490b4b9257",
"properties": {
"LastState": "running",
"JobRequest": "",
"Job": "b9fe292d-2a4e-434c-8154-5f490b4b9257",
"Provider": "casl"
},
"contentDisposition": "text/plain",
"contentType": "text/plain",
"description": "Log File for Job b9fe292d-2a4e-434c-8154-5f490b4b9257",
"documentType": "log",
"encoding": "UTF-8",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"type": "application/vnd.sas.file"
},
{
"method": "GET",
"rel": "alternate",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"type": "application/vnd.sas.summary"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"type": "application/vnd.sas.file",
"responseType": "application/vnd.sas.file"
},
{
"method": "PUT",
"rel": "update",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"type": "application/vnd.sas.file",
"responseType": "application/vnd.sas.file"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7"
},
{
"method": "GET",
"rel": "content",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
"type": "text/plain"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
"type": "*/*",
"responseType": "application/vnd.sas.file"
},
{
"method": "POST",
"rel": "copyFile",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
"responseType": "application/vnd.sas.file"
},
{
"method": "POST",
"rel": "create",
"href": "/files/files",
"uri": "/files/files",
"type": "*/*",
"responseType": "application/vnd.sas.file"
}
],
"name": "2022-03-31T20:00:03Z-results.log",
"size": 742,
"searchable": false,
"fileStatus": "unlocked",
"fileVersion": 0,
"expirationTimeStamp": "2022-04-07T20:00:03.651Z",
"virusDetected": false,
"urlDetected": false,
"quarantine": false,
"version": 4
}
}
{
"summary": "File resource version 4",
"description": "Here is the response for file resource version 4",
"value": {
"creationTimeStamp": "2022-03-31T20:00:03.609Z",
"modifiedTimeStamp": "2022-03-31T20:00:03.826Z",
"createdBy": "sas.audit",
"modifiedBy": "sas.audit",
"id": "cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"parentUri": "/jobExecution/jobs/b9fe292d-2a4e-434c-8154-5f490b4b9257",
"properties": {
"LastState": "running",
"JobRequest": "",
"Job": "b9fe292d-2a4e-434c-8154-5f490b4b9257",
"Provider": "casl"
},
"contentDisposition": "text/plain",
"contentType": "text/plain",
"description": "Log File for Job b9fe292d-2a4e-434c-8154-5f490b4b9257",
"documentType": "log",
"encoding": "UTF-8",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"type": "application/vnd.sas.file"
},
{
"method": "GET",
"rel": "alternate",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"type": "application/vnd.sas.summary"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"type": "application/vnd.sas.file",
"responseType": "application/vnd.sas.file"
},
{
"method": "PUT",
"rel": "update",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"type": "application/vnd.sas.file",
"responseType": "application/vnd.sas.file"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7"
},
{
"method": "GET",
"rel": "content",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
"type": "text/plain"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
"type": "*/*",
"responseType": "application/vnd.sas.file"
},
{
"method": "POST",
"rel": "copyFile",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
"responseType": "application/vnd.sas.file"
},
{
"method": "POST",
"rel": "create",
"href": "/files/files",
"uri": "/files/files",
"type": "*/*",
"responseType": "application/vnd.sas.file"
}
],
"name": "2022-03-31T20:00:03Z-results.log",
"size": 742,
"searchable": false,
"fileStatus": "unlocked",
"fileVersion": 0,
"expirationTimeStamp": "2022-04-07T20:00:03.651Z",
"virusDetected": false,
"urlDetected": false,
"quarantine": false,
"version": 4
}
}
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
406 Response
{
"summary": "Not acceptable error response",
"description": "This is an example of an error response for a request without an acceptable response type.",
"value": {
"version": 2,
"httpStatusCode": 406,
"message": "Conflict",
"details": [
"The server could produce a response matching the list of acceptable values defined in the request."
]
}
}
{
"summary": "Not acceptable error response",
"description": "This is an example of an error response for a request without an acceptable response type.",
"value": {
"version": 2,
"httpStatusCode": 406,
"message": "Conflict",
"details": [
"The server could produce a response matching the list of acceptable values defined in the request."
]
}
}
415 Response
{
"summary": "Unsupported media type error response",
"description": "This is an example of an error response for a request with payload of an unsupported type.",
"value": {
"version": 2,
"httpStatusCode": 415,
"message": "Unsupported Media Type",
"details": [
"The server refused to accept the request because the payload format is in an unsupported format."
]
}
}
{
"summary": "Unsupported media type error response",
"description": "This is an example of an error response for a request with payload of an unsupported type.",
"value": {
"version": 2,
"httpStatusCode": 415,
"message": "Unsupported Media Type",
"details": [
"The server refused to accept the request because the payload format is in an unsupported format."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | A file containing the output was created in the Files service. | Inline |
400 | Bad Request | The request was invalid. This can occur because the request body does not satisfy the schema for application/vnd.sas.compute.output.stream.file.request. It can also occur if the client is building its request URI and there is no session listing output. This problem can be avoided by using the links for the session resource; a link will not exist unless output is available. | Inline |
406 | Not Acceptable | The server is not capable of producing the media type specified in the Accept header. | Inline |
415 | Unsupported Media Type | The server does not support the media type specified in the Content-Type header. | Inline |
Response Schema
Status Code 201
File Resource
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
File Resource | any | false | none | An object representing a file |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» anonymous | object | false | none | This class is used to provide common attributes and behaviors around tracking who and when objects were created and modified to representation objects. |
»» createdBy | string | false | none | The username of whoever created the resource. |
»» modifiedBy | string | false | none | The username of whoever last modified the resource. |
»» creationTimeStamp | string(date-time) | false | none | The timestamp for when the resource was created. |
»» modifiedTimeStamp | string(date-time) | false | none | The timestamp for when the resource was last modified. |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» anonymous | object | false | none | none |
»» parentUri | string | false | none | URI of the object which is either associated or linked with file resource |
»» properties | object | false | none | Properties specific to this file. Each property uses a "key" : "value" format and a comma is used as the separator between properties. |
»»» additionalProperties | string | false | none | none |
»» contentDisposition | string | false | none | Value for Content Disposition header which will be set in response while downloading the file |
»» contentType | string | false | none | Type of the content |
»» description | string | false | none | Description of the document |
»» documentType | string | false | none | Type of the document |
»» encoding | string | false | none | Encoding of the document |
»» id | string | false | none | Id of the file resource |
»» links | [link] | false | none | Links that apply to this object. Includes "self", "content", "patch", "update" and "delete" |
»»» Link | link | false | none | A link to a related operation or resource. |
»»»» method | string | false | none | The HTTP method for the link. |
»»»» rel | string | true | none | The relationship of the link to the resource. |
»»»» uri | string | false | none | The relative URI for the link. |
»»»» href | string | false | none | The URL for the link. |
»»»» title | string | false | none | The title for the link. |
»»»» type | string | false | none | The media type or link type for the link. |
»»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
»» name | string | false | none | Name of the document |
»» size | integer | false | none | Byte size of the document content |
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 406
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 415
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Location | string | Specifies the URI of the created file resource. | |
201 | Etag | string | Specifies a tag that identifies the revision of this object. |
Retrieve listing information for a session as text.
Code samples
# You can also use wget
curl -X GET https://example.com/compute/sessions/{sessionId}/listing#asText \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.error+json'
const headers = {
'Accept':'application/vnd.sas.error+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/listing#asText',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.error+json'
}
r = requests.get('https://example.com/compute/sessions/{sessionId}/listing#asText', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.error+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/sessions/{sessionId}/listing#asText", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /sessions/{sessionId}/listing#asText
Retrieves the listing output associated with a session as text.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string | true | Specifies the ID of the session. |
Example responses
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No resource exists at the requested path. | Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Check for session listing as text.
Code samples
# You can also use wget
curl -X HEAD https://example.com/compute/sessions/{sessionId}/listing#asText
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/compute/sessions/{sessionId}/listing#asText',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/compute/sessions/{sessionId}/listing#asText')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/compute/sessions/{sessionId}/listing#asText", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /sessions/{sessionId}/listing#asText
Determines whether a session listing is available as text.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string | true | Specifies the ID of the session. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No resource exists at the requested path. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Retrieve listing information for a job
Code samples
# You can also use wget
curl -X GET https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/listing \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/listing',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.get('https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/listing', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.collection+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/listing", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /sessions/{sessionId}/jobs/{jobId}/listing
Retrieves the listing output associated with a job. A job listing is a subset of the session listing. Therefore, the first line of a job listing begins at a location (offset) within the session listing. This operation returns a collection in which each entry is of the type application/vnd.sas.compute.log.line.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string | true | Specifies the ID of the session. |
jobId | path | string | true | Specifies the ID of the job. |
start | query | integer(int64) | false | Specifies the offset of the first item in the collection. The first line is at start=0. |
limit | query | integer(int32) | false | Specifies the number of items in this page. |
type | query | string | false | Restricts listing information to those entries whose type matches the query. Specify multiple types by separating them with a ' |
timeout | query | integer | false | Specifies the request time-out in seconds. |
Example responses
200 Response
{
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/jobs/0/listing?start=0&limit=5",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/jobs/0/listing?start=0&limit=5",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.log.line"
},
{
"method": "GET",
"rel": "collection",
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/jobs/0/listing",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/jobs/0/listing",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.log.line"
}
],
"name": "Job List",
"accept": "application/vnd.sas.compute.log.line",
"start": 0,
"count": 5,
"items": [
{
"line": "1 The SAS System 15:26 Friday, May 20, 2016 1",
"type": "title"
},
{
"line": " ",
"type": "title"
},
{
"line": " Obs x",
"type": "hilighted"
},
{
"line": " ",
"type": "normal"
},
{
"line": " 1 3",
"type": "normal"
}
],
"limit": 5,
"version": 2
}
{
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/jobs/0/listing?start=0&limit=5",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/jobs/0/listing?start=0&limit=5",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.log.line"
},
{
"method": "GET",
"rel": "collection",
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/jobs/0/listing",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/jobs/0/listing",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.log.line"
}
],
"name": "Job List",
"accept": "application/vnd.sas.compute.log.line",
"start": 0,
"count": 5,
"items": [
{
"line": "1 The SAS System 15:26 Friday, May 20, 2016 1",
"type": "title"
},
{
"line": " ",
"type": "title"
},
{
"line": " Obs x",
"type": "hilighted"
},
{
"line": " ",
"type": "normal"
},
{
"line": " 1 3",
"type": "normal"
}
],
"limit": 5,
"version": 2
}
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | jobListingCollection |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No resource exists at the requested path. | Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Check for a job listing
Code samples
# You can also use wget
curl -X HEAD https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/listing
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/listing',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/listing')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/listing", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /sessions/{sessionId}/jobs/{jobId}/listing
Determines whether a job listing exists.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string | true | Specifies the ID of the session. |
jobId | path | string | true | Specifies the ID of the job. |
start | query | integer(int64) | false | Specifies the offset of the first item in the collection. The first line is at start=0. |
limit | query | integer(int32) | false | Specifies the number of items in this page. |
type | query | string | false | Restricts listing information to those entries whose type matches the query. Specify multiple types by separating them with a ' |
timeout | query | integer | false | Specifies the request time-out in seconds. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No resource exists at the requested path. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Upload job listing output to the Files service
Code samples
# You can also use wget
curl -X POST https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/listing \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.compute.output.stream.file.request+json' \
-H 'Accept: application/vnd.sas.file+json'
const inputBody = '{
"version": 1,
"attributes": {
"format": "prefixedText"
},
"x-widdershins-oldRef": "#/components/schemas/outputStreamFileRequest/example"
}';
const headers = {
'Content-Type':'application/vnd.sas.compute.output.stream.file.request+json',
'Accept':'application/vnd.sas.file+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/listing',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.compute.output.stream.file.request+json',
'Accept': 'application/vnd.sas.file+json'
}
r = requests.post('https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/listing', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.compute.output.stream.file.request+json"},
"Accept": []string{"application/vnd.sas.file+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/listing", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /sessions/{sessionId}/jobs/{jobId}/listing
Uploads job listing output to the Files service and returns the representation of the file resource containing the output. The file is created in one of two formats, based on the value of the property "format" specified in the post body. If "collection" is specified as the value of "format", the output file is rendered as application/vnd.sas.collection+json. If the format is specified as "prefixedText", the output is text/plain in which each line of output is prefixed with the name of the line type followed by a colon. In either case, all available output is returned; neither pagination nor filtering is supported.
Body parameter
{
"version": 1,
"attributes": {
"format": "prefixedText"
},
"x-widdershins-oldRef": "#/components/schemas/outputStreamFileRequest/example"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string | true | Specifies the ID of the session. |
jobId | path | string | true | Specifies the ID of the job. |
body | body | outputStreamFileRequest | true | Specifies the request to stream output to the Files service. |
Example responses
201 Response
{
"summary": "File resource version 4",
"description": "Here is the response for file resource version 4",
"value": {
"creationTimeStamp": "2022-03-31T20:00:03.609Z",
"modifiedTimeStamp": "2022-03-31T20:00:03.826Z",
"createdBy": "sas.audit",
"modifiedBy": "sas.audit",
"id": "cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"parentUri": "/jobExecution/jobs/b9fe292d-2a4e-434c-8154-5f490b4b9257",
"properties": {
"LastState": "running",
"JobRequest": "",
"Job": "b9fe292d-2a4e-434c-8154-5f490b4b9257",
"Provider": "casl"
},
"contentDisposition": "text/plain",
"contentType": "text/plain",
"description": "Log File for Job b9fe292d-2a4e-434c-8154-5f490b4b9257",
"documentType": "log",
"encoding": "UTF-8",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"type": "application/vnd.sas.file"
},
{
"method": "GET",
"rel": "alternate",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"type": "application/vnd.sas.summary"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"type": "application/vnd.sas.file",
"responseType": "application/vnd.sas.file"
},
{
"method": "PUT",
"rel": "update",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"type": "application/vnd.sas.file",
"responseType": "application/vnd.sas.file"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7"
},
{
"method": "GET",
"rel": "content",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
"type": "text/plain"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
"type": "*/*",
"responseType": "application/vnd.sas.file"
},
{
"method": "POST",
"rel": "copyFile",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
"responseType": "application/vnd.sas.file"
},
{
"method": "POST",
"rel": "create",
"href": "/files/files",
"uri": "/files/files",
"type": "*/*",
"responseType": "application/vnd.sas.file"
}
],
"name": "2022-03-31T20:00:03Z-results.log",
"size": 742,
"searchable": false,
"fileStatus": "unlocked",
"fileVersion": 0,
"expirationTimeStamp": "2022-04-07T20:00:03.651Z",
"virusDetected": false,
"urlDetected": false,
"quarantine": false,
"version": 4
}
}
{
"summary": "File resource version 4",
"description": "Here is the response for file resource version 4",
"value": {
"creationTimeStamp": "2022-03-31T20:00:03.609Z",
"modifiedTimeStamp": "2022-03-31T20:00:03.826Z",
"createdBy": "sas.audit",
"modifiedBy": "sas.audit",
"id": "cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"parentUri": "/jobExecution/jobs/b9fe292d-2a4e-434c-8154-5f490b4b9257",
"properties": {
"LastState": "running",
"JobRequest": "",
"Job": "b9fe292d-2a4e-434c-8154-5f490b4b9257",
"Provider": "casl"
},
"contentDisposition": "text/plain",
"contentType": "text/plain",
"description": "Log File for Job b9fe292d-2a4e-434c-8154-5f490b4b9257",
"documentType": "log",
"encoding": "UTF-8",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"type": "application/vnd.sas.file"
},
{
"method": "GET",
"rel": "alternate",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"type": "application/vnd.sas.summary"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"type": "application/vnd.sas.file",
"responseType": "application/vnd.sas.file"
},
{
"method": "PUT",
"rel": "update",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"type": "application/vnd.sas.file",
"responseType": "application/vnd.sas.file"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7"
},
{
"method": "GET",
"rel": "content",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
"type": "text/plain"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
"type": "*/*",
"responseType": "application/vnd.sas.file"
},
{
"method": "POST",
"rel": "copyFile",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
"responseType": "application/vnd.sas.file"
},
{
"method": "POST",
"rel": "create",
"href": "/files/files",
"uri": "/files/files",
"type": "*/*",
"responseType": "application/vnd.sas.file"
}
],
"name": "2022-03-31T20:00:03Z-results.log",
"size": 742,
"searchable": false,
"fileStatus": "unlocked",
"fileVersion": 0,
"expirationTimeStamp": "2022-04-07T20:00:03.651Z",
"virusDetected": false,
"urlDetected": false,
"quarantine": false,
"version": 4
}
}
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
406 Response
{
"summary": "Not acceptable error response",
"description": "This is an example of an error response for a request without an acceptable response type.",
"value": {
"version": 2,
"httpStatusCode": 406,
"message": "Conflict",
"details": [
"The server could produce a response matching the list of acceptable values defined in the request."
]
}
}
{
"summary": "Not acceptable error response",
"description": "This is an example of an error response for a request without an acceptable response type.",
"value": {
"version": 2,
"httpStatusCode": 406,
"message": "Conflict",
"details": [
"The server could produce a response matching the list of acceptable values defined in the request."
]
}
}
415 Response
{
"summary": "Unsupported media type error response",
"description": "This is an example of an error response for a request with payload of an unsupported type.",
"value": {
"version": 2,
"httpStatusCode": 415,
"message": "Unsupported Media Type",
"details": [
"The server refused to accept the request because the payload format is in an unsupported format."
]
}
}
{
"summary": "Unsupported media type error response",
"description": "This is an example of an error response for a request with payload of an unsupported type.",
"value": {
"version": 2,
"httpStatusCode": 415,
"message": "Unsupported Media Type",
"details": [
"The server refused to accept the request because the payload format is in an unsupported format."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | A file containing the output was created in the Files service. | Inline |
400 | Bad Request | The request was invalid. This can occur because the request body does not satisfy the schema for application/vnd.sas.compute.output.stream.file.request. It can also occur if the client is building its request URI and there is no job listing output. This problem can be avoided by using the links for the job resource; a link will not exist unless output is available. | Inline |
406 | Not Acceptable | The server is not capable of producing the media type specified in the Accept header. | Inline |
415 | Unsupported Media Type | The server does not support the media type specified in the Content-Type header. | Inline |
Response Schema
Status Code 201
File Resource
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
File Resource | any | false | none | An object representing a file |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» anonymous | object | false | none | This class is used to provide common attributes and behaviors around tracking who and when objects were created and modified to representation objects. |
»» createdBy | string | false | none | The username of whoever created the resource. |
»» modifiedBy | string | false | none | The username of whoever last modified the resource. |
»» creationTimeStamp | string(date-time) | false | none | The timestamp for when the resource was created. |
»» modifiedTimeStamp | string(date-time) | false | none | The timestamp for when the resource was last modified. |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» anonymous | object | false | none | none |
»» parentUri | string | false | none | URI of the object which is either associated or linked with file resource |
»» properties | object | false | none | Properties specific to this file. Each property uses a "key" : "value" format and a comma is used as the separator between properties. |
»»» additionalProperties | string | false | none | none |
»» contentDisposition | string | false | none | Value for Content Disposition header which will be set in response while downloading the file |
»» contentType | string | false | none | Type of the content |
»» description | string | false | none | Description of the document |
»» documentType | string | false | none | Type of the document |
»» encoding | string | false | none | Encoding of the document |
»» id | string | false | none | Id of the file resource |
»» links | [link] | false | none | Links that apply to this object. Includes "self", "content", "patch", "update" and "delete" |
»»» Link | link | false | none | A link to a related operation or resource. |
»»»» method | string | false | none | The HTTP method for the link. |
»»»» rel | string | true | none | The relationship of the link to the resource. |
»»»» uri | string | false | none | The relative URI for the link. |
»»»» href | string | false | none | The URL for the link. |
»»»» title | string | false | none | The title for the link. |
»»»» type | string | false | none | The media type or link type for the link. |
»»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
»» name | string | false | none | Name of the document |
»» size | integer | false | none | Byte size of the document content |
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 406
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 415
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Location | string | Specifies the URI of the created file resource. | |
201 | Etag | string | Specifies a tag that identifies the revision of this object. |
Retrieve listing information for a job as text.
Code samples
# You can also use wget
curl -X GET https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/listing#asText \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.error+json'
const headers = {
'Accept':'application/vnd.sas.error+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/listing#asText',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.error+json'
}
r = requests.get('https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/listing#asText', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.error+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/listing#asText", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /sessions/{sessionId}/jobs/{jobId}/listing#asText
Retrieves the listing output associated with a job as text.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string | true | Specifies the ID of the session. |
jobId | path | string | true | Specifies the ID of the job. |
Example responses
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No resource exists at the requested path. | Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description | |
400 | Content-Type | string | No description |
Check for job listing as text
Code samples
# You can also use wget
curl -X HEAD https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/listing#asText
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/listing#asText',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/listing#asText')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/listing#asText", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /sessions/{sessionId}/jobs/{jobId}/listing#asText
Determines whether a job listing exists as text.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string | true | Specifies the ID of the session. |
jobId | path | string | true | Specifies the ID of the job. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No resource exists at the requested path. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Logs
Contains the operations for retrieving log information from a job.
Retrieve a job log
Code samples
# You can also use wget
curl -X GET https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/log \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/log',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.get('https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/log', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.collection+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/log", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /sessions/{sessionId}/jobs/{jobId}/log
Retrieves the log output associated with a job. A job log is a subset of the session log. Therefore, the first line of a job log begins at a location (offset) within the session log. This operation returns a collection in which each entry is of the type application/vnd.sas.compute.log.line.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string | true | Specifies the ID of the session. |
jobId | path | string | true | Specifies the ID of the job. |
start | query | integer(int64) | false | Specifies the offset of the first item in a collection. The first line is at start=0. |
limit | query | integer(int32) | false | Specifies the number of items in a page. |
type | query | string | false | Restricts log collection to those entries with a specified type. Specify multiple types in a query by separating them with a ' |
timeout | query | integer | false | Specifies the request time-out in seconds. If no log lines are available over this time period, an empty collection is returned. |
Example responses
200 Response
{
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/sessions/92626ce2-db0f-4d11-b9cf-439a567dbcb7-ses0000/jobs/0/log?start=0&limit=100",
"uri": "/compute/sessions/92626ce2-db0f-4d11-b9cf-439a567dbcb7-ses0000/jobs/0/log?start=0&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.log.line"
},
{
"method": "GET",
"rel": "collection",
"href": "/compute/sessions/92626ce2-db0f-4d11-b9cf-439a567dbcb7-ses0000/jobs/0/log",
"uri": "/compute/sessions/92626ce2-db0f-4d11-b9cf-439a567dbcb7-ses0000/jobs/0/log",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.log.line"
},
{
"method": "GET",
"rel": "next",
"href": "/compute/sessions/92626ce2-db0f-4d11-b9cf-439a567dbcb7-ses0000/jobs/0/log?start=100&limit=100",
"uri": "/compute/sessions/92626ce2-db0f-4d11-b9cf-439a567dbcb7-ses0000/jobs/0/log?start=100&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.log.line"
},
{
"method": "GET",
"rel": "last",
"href": "/compute/sessions/92626ce2-db0f-4d11-b9cf-439a567dbcb7-ses0000/jobs/0/log?start=589&limit=100",
"uri": "/compute/sessions/92626ce2-db0f-4d11-b9cf-439a567dbcb7-ses0000/jobs/0/log?start=589&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.log.line"
}
],
"name": "Job Log",
"accept": "application/vnd.sas.compute.log.line",
"start": 0,
"count": 689,
"items": [
{
"line": " 1 %put %sysget(SASROOT);",
"type": "source"
},
{
"line": " /sasgen/dev/mva-vb005/SAS/laxdo",
"type": "normal"
},
{
"line": " 2 proc options option=JREOPTIONS value; run;",
"type": "source"
},
{
"line": " SAS (r) Proprietary Software Release V.03.00M0P05192016",
"type": "normal"
},
{
"line": " ",
"type": "normal"
},
{
"line": " Option Value Information For SAS Option JREOPTIONS",
"type": "normal"
},
{
"line": " Value: ( -Djava.class.path=/sasgen/dev/mva-vb005/SAS/laxdo/vjr/eclipse/plugins/sas.launcher.jar ",
"type": "normal"
},
{
"line": " -Dlog4j.configuration=file:/sasgen/dev/mva-vb005/SAS/laxdo/misc/tkjava/sas.log4j.properties ",
"type": "normal"
},
{
"line": " -Dsas.app.class.path=/sasgen/dev/mva-vb005/SAS/laxdo/vjr/eclipse/plugins/tkjava.jar ",
"type": "normal"
},
{
"line": " -Djava.security.auth.login.config=/sasgen/dev/mva-vb005/SAS/laxdo/misc/tkjava/sas.login.config ",
"type": "normal"
},
{
"line": " -Djava.security.policy=/sasgen/dev/mva-vb005/SAS/laxdo/misc/tkjava/sas.policy -Djava.system.class.loader=com.sas.app.AppClassLoader ",
"type": "normal"
},
{
"line": " -Dsas.ext.config=/sasgen/dev/mva-vb005/SAS/laxdo/misc/tkjava/sas.java.ext.config ",
"type": "normal"
},
{
"line": " -DPFS_TEMPLATE=/sasgen/dev/mva-vb005/SAS/laxdo/misc/tkjava/qrpfstpt.xml ",
"type": "normal"
},
{
"line": " -Dtkj.app.launch.config=/sasgen/dev/mva-vb005/SAS/laxdo/picklist -Xusealtsigs )",
"type": "normal"
},
{
"line": " Scope: SAS Session",
"type": "normal"
},
{
"line": " How option value set: Config File",
"type": "normal"
},
{
"line": " Config file name:",
"type": "normal"
},
{
"line": " /sasgen/dev/mva-vb005/SAS/laxdo/sasv9.cfg",
"type": "normal"
},
{
"line": " ",
"type": "normal"
},
{
"line": " NOTE: PROCEDURE OPTIONS used (Total process time):",
"type": "note"
},
{
"line": " real time 0.00 seconds",
"type": "note"
},
{
"line": " cpu time 0.00 seconds",
"type": "note"
},
{
"line": " ",
"type": "note"
},
{
"line": " 3 proc options option=SASUSER value; run;",
"type": "source"
},
{
"line": " SAS (r) Proprietary Software Release V.03.00M0P05192016",
"type": "normal"
},
{
"line": " ",
"type": "normal"
},
{
"line": " Option Value Information For SAS Option SASUSER",
"type": "normal"
},
{
"line": " Value: ~/sasuser.mva-vb005.lax",
"type": "normal"
},
{
"line": " Scope: SAS Session",
"type": "normal"
},
{
"line": " How option value set: Config File",
"type": "normal"
},
{
"line": " Config file name:",
"type": "normal"
},
{
"line": " /sasgen/dev/mva-vb005/SAS/laxdo/sasv9.cfg",
"type": "normal"
},
{
"line": " ",
"type": "normal"
},
{
"line": " NOTE: PROCEDURE OPTIONS used (Total process time):",
"type": "note"
},
{
"line": "12 The SAS System 15:13 Friday, May 20, 2016",
"type": "title"
},
{
"line": " ",
"type": "title"
},
{
"line": " real time 0.00 seconds",
"type": "note"
},
{
"line": " cpu time 0.00 seconds",
"type": "note"
},
{
"line": " ",
"type": "note"
},
{
"line": " 4 proc options; run;",
"type": "source"
},
{
"line": " SAS (r) Proprietary Software Release V.03.00M0P05192016",
"type": "normal"
},
{
"line": " ",
"type": "normal"
},
{
"line": " ",
"type": "normal"
},
{
"line": " Portable Options:",
"type": "normal"
},
{
"line": " ",
"type": "normal"
},
{
"line": " ANIMATION=STOP Specifies whether to start or stop animation.",
"type": "normal"
},
{
"line": " ANIMDURATION=MIN Specifies the number of seconds that each animation frame displays.",
"type": "normal"
},
{
"line": " ANIMLOOP=YES Specifies the number of iterations that animated images repeat.",
"type": "normal"
},
{
"line": " ANIMOVERLAY Specifies that animation frames are overlaid in order to view all frames.",
"type": "normal"
},
{
"line": " APPEND= Specifies an option=value pair to insert the value at the end of the existing option value.",
"type": "normal"
},
{
"line": " APPLETLOC=/sasgen/dev/mva-vb005/avdobj/jar/laxno",
"type": "normal"
},
{
"line": " Specifies the location of Java applets, which is typically a URL.",
"type": "normal"
},
{
"line": " ARMAGENT= Specifies an ARM agent (which is an executable module or keyword, such as LOG4SAS) that contains a specific ",
"type": "normal"
},
{
"line": " implementation of the ARM API.",
"type": "normal"
},
{
"line": " ARMLOC=ARMLOG.LOG Specifies the location of the ARM log.",
"type": "normal"
},
{
"line": " ARMSUBSYS=(ARM_NONE)",
"type": "normal"
},
{
"line": " Specifies the SAS ARM subsystems to enable or disable.",
"type": "normal"
},
{
"line": " AUTOCORRECT Automatically corrects misspelled procedure names and keywords, and global statement names.",
"type": "normal"
},
{
"line": " AUTOEXEC= Specifies the location of the SAS AUTOEXEC files.",
"type": "normal"
},
{
"line": " AUTOSAVELOC= Specifies the location of the Program Editor auto-saved file.",
"type": "normal"
},
{
"line": " NOAUTOSIGNON Disables a SAS/CONNECT client from automatically submitting the SIGNON command remotely with the RSUBMIT command.",
"type": "normal"
},
{
"line": " BINDING=DEFAULT Specifies the binding edge type of duplexed printed output.",
"type": "normal"
},
{
"line": " BOMFILE Writes the byte order mark (BOM) prefix when a Unicode-encoded file is written to an external file.",
"type": "normal"
},
{
"line": " BOTTOMMARGIN=0.000 IN",
"type": "normal"
},
{
"line": " Specifies the size of the margin at the bottom of a printed page.",
"type": "normal"
},
{
"line": " BUFNO=1 Specifies the number of buffers for processing SAS data sets.",
"type": "normal"
},
{
"line": " BUFSIZE=0 Specifies the size of a buffer page for output SAS data sets.",
"type": "normal"
},
{
"line": " BYERR SAS issues an error message and stops processing if the SORT procedure attempts to sort a _NULL_ data set.",
"type": "normal"
},
{
"line": " BYLINE Prints the BY line above each BY group.",
"type": "normal"
},
{
"line": " BYSORTED Requires observations in one or more data sets to be sorted in alphabetic or numeric order.",
"type": "normal"
},
{
"line": " NOCAPS Does not convert certain types of input, and all data lines, into uppercase characters.",
"type": "normal"
},
{
"line": " NOCARDIMAGE Does not process SAS source code and data lines as 80-byte records.",
"type": "normal"
},
{
"line": " CASAUTHINFO= Specifies an authinfo or netrc file that includes authentication information.",
"type": "normal"
},
{
"line": " CASHOST= The CAS server name associated with a CAS session.",
"type": "normal"
},
{
"line": " CASLIB= Specify the default CASLIB name.",
"type": "normal"
},
{
"line": " CASNAME=CASAUTO Identify the name to associate with a generated CAS session.",
"type": "normal"
},
{
"line": " CASNWORKERS=ALL Specify the number of workers to use with a CAS session.",
"type": "normal"
},
{
"line": " CASPORT=0 The port associated with a CAS session.",
"type": "normal"
},
{
"line": " CASSESSOPTS= Identify CAS server session options.",
"type": "normal"
},
{
"line": " CASTIMEOUT=60 The CAS session timeout in seconds.",
"type": "normal"
},
{
"line": " CASUSER= The userid associated with a CAS session.",
"type": "normal"
},
{
"line": " CATCACHE=0 Specifies the number of SAS catalogs to keep open in cache memory.",
"type": "normal"
},
{
"line": " CBUFNO=0 Specifies the number of extra page buffers to allocate for each open SAS catalog.",
"type": "normal"
},
{
"line": " CENTER Center SAS procedure output.",
"type": "normal"
},
{
"line": " CGOPTIMIZE=3 Specifies the level of optimization to perform during code compilation.",
"type": "normal"
},
{
"line": " NOCHARCODE Does not substitute specific keyboard combinations for special characters that are not on the keyboard.",
"type": "normal"
},
{
"line": " NOCHKPTCLEAN Does not erase files in the Work library after a batch program successfully executes in checkpoint mode or ",
"type": "normal"
},
{
"line": " restart mode.",
"type": "normal"
},
{
"line": " CLEANUP Performs automatic continuous cleanup of non-essential resources in out-of-resource conditions.",
"type": "normal"
},
{
"line": " NOCMDMAC Does not check window environment commands for command-style macros.",
"type": "normal"
},
{
"line": " CMPLIB= Specifies one or more SAS data sets that contain compiler subroutines to include during compilation.",
"type": "normal"
},
{
"line": " CMPMODEL=BOTH Specifies the output model type for the MODEL procedure.",
"type": "normal"
},
{
"line": " CMPOPT=(NOEXTRAMATH NOMISSCHECK NOPRECISE NOGUARDCHECK NOGENSYMNAMES NOFUNCDIFFERENCING SHORTCIRCUIT NOPROFILE)",
"type": "normal"
},
{
"line": " Specifies the type of code-generation optimizations to use in the SAS language compiler.",
"type": "normal"
},
{
"line": "13 The SAS System 15:13 Friday, May 20, 2016",
"type": "title"
},
{
"line": " ",
"type": "title"
},
{
"line": " NOCOLLATE Does not collate multiple copies of printed output.",
"type": "normal"
},
{
"line": " COLOPHON= Specifies the comment text that is included in graphic stream files.",
"type": "normal"
},
{
"line": " COLORPRINTING Prints in color if color printing is supported.",
"type": "normal"
},
{
"line": " COMAMID=TCP Specifies the communication access method for connecting client and server sessions across a network.",
"type": "normal"
}
],
"limit": 100,
"version": 2
}
{
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/sessions/92626ce2-db0f-4d11-b9cf-439a567dbcb7-ses0000/jobs/0/log?start=0&limit=100",
"uri": "/compute/sessions/92626ce2-db0f-4d11-b9cf-439a567dbcb7-ses0000/jobs/0/log?start=0&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.log.line"
},
{
"method": "GET",
"rel": "collection",
"href": "/compute/sessions/92626ce2-db0f-4d11-b9cf-439a567dbcb7-ses0000/jobs/0/log",
"uri": "/compute/sessions/92626ce2-db0f-4d11-b9cf-439a567dbcb7-ses0000/jobs/0/log",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.log.line"
},
{
"method": "GET",
"rel": "next",
"href": "/compute/sessions/92626ce2-db0f-4d11-b9cf-439a567dbcb7-ses0000/jobs/0/log?start=100&limit=100",
"uri": "/compute/sessions/92626ce2-db0f-4d11-b9cf-439a567dbcb7-ses0000/jobs/0/log?start=100&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.log.line"
},
{
"method": "GET",
"rel": "last",
"href": "/compute/sessions/92626ce2-db0f-4d11-b9cf-439a567dbcb7-ses0000/jobs/0/log?start=589&limit=100",
"uri": "/compute/sessions/92626ce2-db0f-4d11-b9cf-439a567dbcb7-ses0000/jobs/0/log?start=589&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.log.line"
}
],
"name": "Job Log",
"accept": "application/vnd.sas.compute.log.line",
"start": 0,
"count": 689,
"items": [
{
"line": " 1 %put %sysget(SASROOT);",
"type": "source"
},
{
"line": " /sasgen/dev/mva-vb005/SAS/laxdo",
"type": "normal"
},
{
"line": " 2 proc options option=JREOPTIONS value; run;",
"type": "source"
},
{
"line": " SAS (r) Proprietary Software Release V.03.00M0P05192016",
"type": "normal"
},
{
"line": " ",
"type": "normal"
},
{
"line": " Option Value Information For SAS Option JREOPTIONS",
"type": "normal"
},
{
"line": " Value: ( -Djava.class.path=/sasgen/dev/mva-vb005/SAS/laxdo/vjr/eclipse/plugins/sas.launcher.jar ",
"type": "normal"
},
{
"line": " -Dlog4j.configuration=file:/sasgen/dev/mva-vb005/SAS/laxdo/misc/tkjava/sas.log4j.properties ",
"type": "normal"
},
{
"line": " -Dsas.app.class.path=/sasgen/dev/mva-vb005/SAS/laxdo/vjr/eclipse/plugins/tkjava.jar ",
"type": "normal"
},
{
"line": " -Djava.security.auth.login.config=/sasgen/dev/mva-vb005/SAS/laxdo/misc/tkjava/sas.login.config ",
"type": "normal"
},
{
"line": " -Djava.security.policy=/sasgen/dev/mva-vb005/SAS/laxdo/misc/tkjava/sas.policy -Djava.system.class.loader=com.sas.app.AppClassLoader ",
"type": "normal"
},
{
"line": " -Dsas.ext.config=/sasgen/dev/mva-vb005/SAS/laxdo/misc/tkjava/sas.java.ext.config ",
"type": "normal"
},
{
"line": " -DPFS_TEMPLATE=/sasgen/dev/mva-vb005/SAS/laxdo/misc/tkjava/qrpfstpt.xml ",
"type": "normal"
},
{
"line": " -Dtkj.app.launch.config=/sasgen/dev/mva-vb005/SAS/laxdo/picklist -Xusealtsigs )",
"type": "normal"
},
{
"line": " Scope: SAS Session",
"type": "normal"
},
{
"line": " How option value set: Config File",
"type": "normal"
},
{
"line": " Config file name:",
"type": "normal"
},
{
"line": " /sasgen/dev/mva-vb005/SAS/laxdo/sasv9.cfg",
"type": "normal"
},
{
"line": " ",
"type": "normal"
},
{
"line": " NOTE: PROCEDURE OPTIONS used (Total process time):",
"type": "note"
},
{
"line": " real time 0.00 seconds",
"type": "note"
},
{
"line": " cpu time 0.00 seconds",
"type": "note"
},
{
"line": " ",
"type": "note"
},
{
"line": " 3 proc options option=SASUSER value; run;",
"type": "source"
},
{
"line": " SAS (r) Proprietary Software Release V.03.00M0P05192016",
"type": "normal"
},
{
"line": " ",
"type": "normal"
},
{
"line": " Option Value Information For SAS Option SASUSER",
"type": "normal"
},
{
"line": " Value: ~/sasuser.mva-vb005.lax",
"type": "normal"
},
{
"line": " Scope: SAS Session",
"type": "normal"
},
{
"line": " How option value set: Config File",
"type": "normal"
},
{
"line": " Config file name:",
"type": "normal"
},
{
"line": " /sasgen/dev/mva-vb005/SAS/laxdo/sasv9.cfg",
"type": "normal"
},
{
"line": " ",
"type": "normal"
},
{
"line": " NOTE: PROCEDURE OPTIONS used (Total process time):",
"type": "note"
},
{
"line": "12 The SAS System 15:13 Friday, May 20, 2016",
"type": "title"
},
{
"line": " ",
"type": "title"
},
{
"line": " real time 0.00 seconds",
"type": "note"
},
{
"line": " cpu time 0.00 seconds",
"type": "note"
},
{
"line": " ",
"type": "note"
},
{
"line": " 4 proc options; run;",
"type": "source"
},
{
"line": " SAS (r) Proprietary Software Release V.03.00M0P05192016",
"type": "normal"
},
{
"line": " ",
"type": "normal"
},
{
"line": " ",
"type": "normal"
},
{
"line": " Portable Options:",
"type": "normal"
},
{
"line": " ",
"type": "normal"
},
{
"line": " ANIMATION=STOP Specifies whether to start or stop animation.",
"type": "normal"
},
{
"line": " ANIMDURATION=MIN Specifies the number of seconds that each animation frame displays.",
"type": "normal"
},
{
"line": " ANIMLOOP=YES Specifies the number of iterations that animated images repeat.",
"type": "normal"
},
{
"line": " ANIMOVERLAY Specifies that animation frames are overlaid in order to view all frames.",
"type": "normal"
},
{
"line": " APPEND= Specifies an option=value pair to insert the value at the end of the existing option value.",
"type": "normal"
},
{
"line": " APPLETLOC=/sasgen/dev/mva-vb005/avdobj/jar/laxno",
"type": "normal"
},
{
"line": " Specifies the location of Java applets, which is typically a URL.",
"type": "normal"
},
{
"line": " ARMAGENT= Specifies an ARM agent (which is an executable module or keyword, such as LOG4SAS) that contains a specific ",
"type": "normal"
},
{
"line": " implementation of the ARM API.",
"type": "normal"
},
{
"line": " ARMLOC=ARMLOG.LOG Specifies the location of the ARM log.",
"type": "normal"
},
{
"line": " ARMSUBSYS=(ARM_NONE)",
"type": "normal"
},
{
"line": " Specifies the SAS ARM subsystems to enable or disable.",
"type": "normal"
},
{
"line": " AUTOCORRECT Automatically corrects misspelled procedure names and keywords, and global statement names.",
"type": "normal"
},
{
"line": " AUTOEXEC= Specifies the location of the SAS AUTOEXEC files.",
"type": "normal"
},
{
"line": " AUTOSAVELOC= Specifies the location of the Program Editor auto-saved file.",
"type": "normal"
},
{
"line": " NOAUTOSIGNON Disables a SAS/CONNECT client from automatically submitting the SIGNON command remotely with the RSUBMIT command.",
"type": "normal"
},
{
"line": " BINDING=DEFAULT Specifies the binding edge type of duplexed printed output.",
"type": "normal"
},
{
"line": " BOMFILE Writes the byte order mark (BOM) prefix when a Unicode-encoded file is written to an external file.",
"type": "normal"
},
{
"line": " BOTTOMMARGIN=0.000 IN",
"type": "normal"
},
{
"line": " Specifies the size of the margin at the bottom of a printed page.",
"type": "normal"
},
{
"line": " BUFNO=1 Specifies the number of buffers for processing SAS data sets.",
"type": "normal"
},
{
"line": " BUFSIZE=0 Specifies the size of a buffer page for output SAS data sets.",
"type": "normal"
},
{
"line": " BYERR SAS issues an error message and stops processing if the SORT procedure attempts to sort a _NULL_ data set.",
"type": "normal"
},
{
"line": " BYLINE Prints the BY line above each BY group.",
"type": "normal"
},
{
"line": " BYSORTED Requires observations in one or more data sets to be sorted in alphabetic or numeric order.",
"type": "normal"
},
{
"line": " NOCAPS Does not convert certain types of input, and all data lines, into uppercase characters.",
"type": "normal"
},
{
"line": " NOCARDIMAGE Does not process SAS source code and data lines as 80-byte records.",
"type": "normal"
},
{
"line": " CASAUTHINFO= Specifies an authinfo or netrc file that includes authentication information.",
"type": "normal"
},
{
"line": " CASHOST= The CAS server name associated with a CAS session.",
"type": "normal"
},
{
"line": " CASLIB= Specify the default CASLIB name.",
"type": "normal"
},
{
"line": " CASNAME=CASAUTO Identify the name to associate with a generated CAS session.",
"type": "normal"
},
{
"line": " CASNWORKERS=ALL Specify the number of workers to use with a CAS session.",
"type": "normal"
},
{
"line": " CASPORT=0 The port associated with a CAS session.",
"type": "normal"
},
{
"line": " CASSESSOPTS= Identify CAS server session options.",
"type": "normal"
},
{
"line": " CASTIMEOUT=60 The CAS session timeout in seconds.",
"type": "normal"
},
{
"line": " CASUSER= The userid associated with a CAS session.",
"type": "normal"
},
{
"line": " CATCACHE=0 Specifies the number of SAS catalogs to keep open in cache memory.",
"type": "normal"
},
{
"line": " CBUFNO=0 Specifies the number of extra page buffers to allocate for each open SAS catalog.",
"type": "normal"
},
{
"line": " CENTER Center SAS procedure output.",
"type": "normal"
},
{
"line": " CGOPTIMIZE=3 Specifies the level of optimization to perform during code compilation.",
"type": "normal"
},
{
"line": " NOCHARCODE Does not substitute specific keyboard combinations for special characters that are not on the keyboard.",
"type": "normal"
},
{
"line": " NOCHKPTCLEAN Does not erase files in the Work library after a batch program successfully executes in checkpoint mode or ",
"type": "normal"
},
{
"line": " restart mode.",
"type": "normal"
},
{
"line": " CLEANUP Performs automatic continuous cleanup of non-essential resources in out-of-resource conditions.",
"type": "normal"
},
{
"line": " NOCMDMAC Does not check window environment commands for command-style macros.",
"type": "normal"
},
{
"line": " CMPLIB= Specifies one or more SAS data sets that contain compiler subroutines to include during compilation.",
"type": "normal"
},
{
"line": " CMPMODEL=BOTH Specifies the output model type for the MODEL procedure.",
"type": "normal"
},
{
"line": " CMPOPT=(NOEXTRAMATH NOMISSCHECK NOPRECISE NOGUARDCHECK NOGENSYMNAMES NOFUNCDIFFERENCING SHORTCIRCUIT NOPROFILE)",
"type": "normal"
},
{
"line": " Specifies the type of code-generation optimizations to use in the SAS language compiler.",
"type": "normal"
},
{
"line": "13 The SAS System 15:13 Friday, May 20, 2016",
"type": "title"
},
{
"line": " ",
"type": "title"
},
{
"line": " NOCOLLATE Does not collate multiple copies of printed output.",
"type": "normal"
},
{
"line": " COLOPHON= Specifies the comment text that is included in graphic stream files.",
"type": "normal"
},
{
"line": " COLORPRINTING Prints in color if color printing is supported.",
"type": "normal"
},
{
"line": " COMAMID=TCP Specifies the communication access method for connecting client and server sessions across a network.",
"type": "normal"
}
],
"limit": 100,
"version": 2
}
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | jobLogCollection |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No resource exists at the requested path. | Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Check job log availability
Code samples
# You can also use wget
curl -X HEAD https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/log
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/log',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/log')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/log", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /sessions/{sessionId}/jobs/{jobId}/log
Determines whether there is currently a log for a job.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string | true | Specifies the ID of the session. |
jobId | path | string | true | Specifies the ID of the job. |
start | query | integer(int64) | false | Specifies the offset of the first item in the collection. The first line is at start=0. |
limit | query | integer(int32) | false | Specifies the number of items in this page. |
type | query | string | false | Restricts a log collection to those entries whose type matches the query. Specify multiple types by separating them with a ' |
timeout | query | integer | false | Specifies the request time-out in seconds. If no log lines are available in this time period, an empty collection is returned. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No resource exists at the requested path. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Upload job log output to the Files service
Code samples
# You can also use wget
curl -X POST https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/log \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.compute.output.stream.file.request+json' \
-H 'Accept: application/vnd.sas.file+json'
const inputBody = '{
"version": 1,
"attributes": {
"format": "prefixedText"
},
"x-widdershins-oldRef": "#/components/schemas/outputStreamFileRequest/example"
}';
const headers = {
'Content-Type':'application/vnd.sas.compute.output.stream.file.request+json',
'Accept':'application/vnd.sas.file+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/log',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.compute.output.stream.file.request+json',
'Accept': 'application/vnd.sas.file+json'
}
r = requests.post('https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/log', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.compute.output.stream.file.request+json"},
"Accept": []string{"application/vnd.sas.file+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/log", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /sessions/{sessionId}/jobs/{jobId}/log
Uploads job log output to the Files service and returns the representation of the file resource containing the output. The file is created in one of two formats, based on the value of the property "format" specified in the post body. If "collection" is specified as the value of "format", the output file is rendered as application/vnd.sas.collection+json. If the format is specified as "prefixedText", the output is text/plain in which each line of output is prefixed with the name of the line type followed by a colon. In either case, all available output is returned; neither pagination nor filtering is supported.
Body parameter
{
"version": 1,
"attributes": {
"format": "prefixedText"
},
"x-widdershins-oldRef": "#/components/schemas/outputStreamFileRequest/example"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string | true | Specifies the ID of the session. |
jobId | path | string | true | Specifies the ID of the job. |
body | body | outputStreamFileRequest | true | Specifies the request to stream output to the Files service. |
Example responses
201 Response
{
"summary": "File resource version 4",
"description": "Here is the response for file resource version 4",
"value": {
"creationTimeStamp": "2022-03-31T20:00:03.609Z",
"modifiedTimeStamp": "2022-03-31T20:00:03.826Z",
"createdBy": "sas.audit",
"modifiedBy": "sas.audit",
"id": "cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"parentUri": "/jobExecution/jobs/b9fe292d-2a4e-434c-8154-5f490b4b9257",
"properties": {
"LastState": "running",
"JobRequest": "",
"Job": "b9fe292d-2a4e-434c-8154-5f490b4b9257",
"Provider": "casl"
},
"contentDisposition": "text/plain",
"contentType": "text/plain",
"description": "Log File for Job b9fe292d-2a4e-434c-8154-5f490b4b9257",
"documentType": "log",
"encoding": "UTF-8",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"type": "application/vnd.sas.file"
},
{
"method": "GET",
"rel": "alternate",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"type": "application/vnd.sas.summary"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"type": "application/vnd.sas.file",
"responseType": "application/vnd.sas.file"
},
{
"method": "PUT",
"rel": "update",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"type": "application/vnd.sas.file",
"responseType": "application/vnd.sas.file"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7"
},
{
"method": "GET",
"rel": "content",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
"type": "text/plain"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
"type": "*/*",
"responseType": "application/vnd.sas.file"
},
{
"method": "POST",
"rel": "copyFile",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
"responseType": "application/vnd.sas.file"
},
{
"method": "POST",
"rel": "create",
"href": "/files/files",
"uri": "/files/files",
"type": "*/*",
"responseType": "application/vnd.sas.file"
}
],
"name": "2022-03-31T20:00:03Z-results.log",
"size": 742,
"searchable": false,
"fileStatus": "unlocked",
"fileVersion": 0,
"expirationTimeStamp": "2022-04-07T20:00:03.651Z",
"virusDetected": false,
"urlDetected": false,
"quarantine": false,
"version": 4
}
}
{
"summary": "File resource version 4",
"description": "Here is the response for file resource version 4",
"value": {
"creationTimeStamp": "2022-03-31T20:00:03.609Z",
"modifiedTimeStamp": "2022-03-31T20:00:03.826Z",
"createdBy": "sas.audit",
"modifiedBy": "sas.audit",
"id": "cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"parentUri": "/jobExecution/jobs/b9fe292d-2a4e-434c-8154-5f490b4b9257",
"properties": {
"LastState": "running",
"JobRequest": "",
"Job": "b9fe292d-2a4e-434c-8154-5f490b4b9257",
"Provider": "casl"
},
"contentDisposition": "text/plain",
"contentType": "text/plain",
"description": "Log File for Job b9fe292d-2a4e-434c-8154-5f490b4b9257",
"documentType": "log",
"encoding": "UTF-8",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"type": "application/vnd.sas.file"
},
{
"method": "GET",
"rel": "alternate",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"type": "application/vnd.sas.summary"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"type": "application/vnd.sas.file",
"responseType": "application/vnd.sas.file"
},
{
"method": "PUT",
"rel": "update",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"type": "application/vnd.sas.file",
"responseType": "application/vnd.sas.file"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7"
},
{
"method": "GET",
"rel": "content",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
"type": "text/plain"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
"type": "*/*",
"responseType": "application/vnd.sas.file"
},
{
"method": "POST",
"rel": "copyFile",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
"responseType": "application/vnd.sas.file"
},
{
"method": "POST",
"rel": "create",
"href": "/files/files",
"uri": "/files/files",
"type": "*/*",
"responseType": "application/vnd.sas.file"
}
],
"name": "2022-03-31T20:00:03Z-results.log",
"size": 742,
"searchable": false,
"fileStatus": "unlocked",
"fileVersion": 0,
"expirationTimeStamp": "2022-04-07T20:00:03.651Z",
"virusDetected": false,
"urlDetected": false,
"quarantine": false,
"version": 4
}
}
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
406 Response
{
"summary": "Not acceptable error response",
"description": "This is an example of an error response for a request without an acceptable response type.",
"value": {
"version": 2,
"httpStatusCode": 406,
"message": "Conflict",
"details": [
"The server could produce a response matching the list of acceptable values defined in the request."
]
}
}
{
"summary": "Not acceptable error response",
"description": "This is an example of an error response for a request without an acceptable response type.",
"value": {
"version": 2,
"httpStatusCode": 406,
"message": "Conflict",
"details": [
"The server could produce a response matching the list of acceptable values defined in the request."
]
}
}
415 Response
{
"summary": "Unsupported media type error response",
"description": "This is an example of an error response for a request with payload of an unsupported type.",
"value": {
"version": 2,
"httpStatusCode": 415,
"message": "Unsupported Media Type",
"details": [
"The server refused to accept the request because the payload format is in an unsupported format."
]
}
}
{
"summary": "Unsupported media type error response",
"description": "This is an example of an error response for a request with payload of an unsupported type.",
"value": {
"version": 2,
"httpStatusCode": 415,
"message": "Unsupported Media Type",
"details": [
"The server refused to accept the request because the payload format is in an unsupported format."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | A file containing the output was created in the Files service. | Inline |
400 | Bad Request | The request was invalid. This can occur because the request body does not satisfy the schema for application/vnd.sas.compute.output.stream.file.request. It can also occur if the client is building its request URI and there is no job log output. This problem can be avoided by using the links for the job resource; a link will not exist unless output is available. | Inline |
406 | Not Acceptable | The server is not capable of producing the media type specified in the Accept header. | Inline |
415 | Unsupported Media Type | The server does not support the media type specified in the Content-Type header. | Inline |
Response Schema
Status Code 201
File Resource
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
File Resource | any | false | none | An object representing a file |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» anonymous | object | false | none | This class is used to provide common attributes and behaviors around tracking who and when objects were created and modified to representation objects. |
»» createdBy | string | false | none | The username of whoever created the resource. |
»» modifiedBy | string | false | none | The username of whoever last modified the resource. |
»» creationTimeStamp | string(date-time) | false | none | The timestamp for when the resource was created. |
»» modifiedTimeStamp | string(date-time) | false | none | The timestamp for when the resource was last modified. |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» anonymous | object | false | none | none |
»» parentUri | string | false | none | URI of the object which is either associated or linked with file resource |
»» properties | object | false | none | Properties specific to this file. Each property uses a "key" : "value" format and a comma is used as the separator between properties. |
»»» additionalProperties | string | false | none | none |
»» contentDisposition | string | false | none | Value for Content Disposition header which will be set in response while downloading the file |
»» contentType | string | false | none | Type of the content |
»» description | string | false | none | Description of the document |
»» documentType | string | false | none | Type of the document |
»» encoding | string | false | none | Encoding of the document |
»» id | string | false | none | Id of the file resource |
»» links | [link] | false | none | Links that apply to this object. Includes "self", "content", "patch", "update" and "delete" |
»»» Link | link | false | none | A link to a related operation or resource. |
»»»» method | string | false | none | The HTTP method for the link. |
»»»» rel | string | true | none | The relationship of the link to the resource. |
»»»» uri | string | false | none | The relative URI for the link. |
»»»» href | string | false | none | The URL for the link. |
»»»» title | string | false | none | The title for the link. |
»»»» type | string | false | none | The media type or link type for the link. |
»»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
»» name | string | false | none | Name of the document |
»» size | integer | false | none | Byte size of the document content |
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 406
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 415
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Location | string | Specifies the URI of the created file resource. | |
201 | Etag | string | Specifies a tag that identifies the revision of this object. |
Retrieve a job log as text.
Code samples
# You can also use wget
curl -X GET https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/log#asText \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.error+json'
const headers = {
'Accept':'application/vnd.sas.error+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/log#asText',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.error+json'
}
r = requests.get('https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/log#asText', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.error+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/log#asText", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /sessions/{sessionId}/jobs/{jobId}/log#asText
Retrieves the entire log output associated with a job as text.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string | true | Specifies the ID of the session. |
jobId | path | string | true | Specifies the ID of the job. |
Example responses
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No resource exists at the requested path. | Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Check for job log as text
Code samples
# You can also use wget
curl -X HEAD https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/log#asText
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/log#asText',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/log#asText')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/log#asText", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /sessions/{sessionId}/jobs/{jobId}/log#asText
Determines whether there is currently a log for a job as text.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string | true | Specifies the ID of the session. |
jobId | path | string | true | Specifies the ID of the job. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No resource exists at the requested path. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Retrieve a session log
Code samples
# You can also use wget
curl -X GET https://example.com/compute/sessions/{sessionId}/log \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/log',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.get('https://example.com/compute/sessions/{sessionId}/log', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.collection+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/sessions/{sessionId}/log", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /sessions/{sessionId}/log
Retrieves the log output associated with a session. This operation returns a collection in which each entry is of the type application/vnd.sas.compute.log.line.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string | true | Specifies the ID of the session. |
start | query | integer(int64) | false | Specifies the offset of the first item in the collection. The first line is at start=0. |
limit | query | integer(int32) | false | Specifies the number of items in this page. |
type | query | string | false | Restricts the log collection to those entries whose type matches the query. Specify multiple types by separating them with a ' |
timeout | query | integer | false | Specifies the request time-out in seconds. |
Example responses
200 Response
{
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/log?start=0&limit=42",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/log?start=0&limit=42",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.log.line"
},
{
"method": "GET",
"rel": "collection",
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/log",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/log",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.log.line"
}
],
"name": "Session Log",
"accept": "application/vnd.sas.compute.log.line",
"start": 0,
"count": 42,
"items": [
{
"line": "11 The SAS System 15:26 Friday, May 20, 2016",
"type": "title"
},
{
"line": " ",
"type": "title"
},
{
"line": " NOTE: Copyright (c) 2016 by SAS Institute Inc., Cary, NC, USA. ",
"type": "note"
},
{
"line": " NOTE: SAS (r) Proprietary Software V.03.00 (TS03.00M0D05192016 MBCS3280) ",
"type": "note"
},
{
"line": " Licensed to SAS Institute Inc., Site 1.",
"type": "note"
},
{
"line": " NOTE: This session is executing on the Linux 2.6.32-573.el6.x86_64 (LIN X64) platform.",
"type": "note"
},
{
"line": " ",
"type": "normal"
},
{
"line": " ",
"type": "normal"
},
{
"line": " ",
"type": "normal"
},
{
"line": " NOTE: Updated analytical products:",
"type": "note"
},
{
"line": " ",
"type": "note"
},
{
"line": " SAS/STAT 14.1",
"type": "note"
},
{
"line": " SAS/ETS 14.1",
"type": "note"
},
{
"line": " SAS/OR 14.1",
"type": "note"
},
{
"line": " SAS/IML 14.1",
"type": "note"
},
{
"line": " SAS/QC 14.1",
"type": "note"
},
{
"line": " ",
"type": "note"
},
{
"line": " NOTE: Additional host information:",
"type": "note"
},
{
"line": " ",
"type": "note"
},
{
"line": " Linux LIN X64 2.6.32-573.el6.x86_64 #1 SMP Wed Jul 1 18:23:37 EDT 2015 x86_64 Red Hat Enterprise Linux Server release 6.7 ",
"type": "note"
},
{
"line": " (Santiago) ",
"type": "note"
},
{
"line": " ",
"type": "note"
},
{
"line": " NOTE: SAS initialization used:",
"type": "note"
},
{
"line": " real time 2.24 seconds",
"type": "note"
},
{
"line": " cpu time 0.19 seconds",
"type": "note"
},
{
"line": " ",
"type": "note"
},
{
"line": " 1 ods html style=barrettsblue;",
"type": "source"
},
{
"line": " NOTE: Writing HTML Body file: sashtml.htm",
"type": "note"
},
{
"line": " 2 data test;x=3;run;",
"type": "source"
},
{
"line": " NOTE: The data set WORK.TEST has 1 observations and 1 variables.",
"type": "note"
},
{
"line": " NOTE: DATA statement used (Total process time):",
"type": "note"
},
{
"line": " real time 0.78 seconds",
"type": "note"
},
{
"line": " cpu time 0.03 seconds",
"type": "note"
},
{
"line": " ",
"type": "note"
},
{
"line": " 2 ! proc print data=test;quit;",
"type": "source"
},
{
"line": " NOTE: There were 1 observations read from the data set WORK.TEST.",
"type": "note"
},
{
"line": " NOTE: The PROCEDURE PRINT printed page 1.",
"type": "note"
},
{
"line": " NOTE: PROCEDURE PRINT used (Total process time):",
"type": "note"
},
{
"line": " real time 0.18 seconds",
"type": "note"
},
{
"line": " cpu time 0.11 seconds",
"type": "note"
},
{
"line": " ",
"type": "note"
},
{
"line": " 3 ods html close;",
"type": "source"
}
],
"limit": 42,
"version": 2
}
{
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/log?start=0&limit=42",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/log?start=0&limit=42",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.log.line"
},
{
"method": "GET",
"rel": "collection",
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/log",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/log",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.log.line"
}
],
"name": "Session Log",
"accept": "application/vnd.sas.compute.log.line",
"start": 0,
"count": 42,
"items": [
{
"line": "11 The SAS System 15:26 Friday, May 20, 2016",
"type": "title"
},
{
"line": " ",
"type": "title"
},
{
"line": " NOTE: Copyright (c) 2016 by SAS Institute Inc., Cary, NC, USA. ",
"type": "note"
},
{
"line": " NOTE: SAS (r) Proprietary Software V.03.00 (TS03.00M0D05192016 MBCS3280) ",
"type": "note"
},
{
"line": " Licensed to SAS Institute Inc., Site 1.",
"type": "note"
},
{
"line": " NOTE: This session is executing on the Linux 2.6.32-573.el6.x86_64 (LIN X64) platform.",
"type": "note"
},
{
"line": " ",
"type": "normal"
},
{
"line": " ",
"type": "normal"
},
{
"line": " ",
"type": "normal"
},
{
"line": " NOTE: Updated analytical products:",
"type": "note"
},
{
"line": " ",
"type": "note"
},
{
"line": " SAS/STAT 14.1",
"type": "note"
},
{
"line": " SAS/ETS 14.1",
"type": "note"
},
{
"line": " SAS/OR 14.1",
"type": "note"
},
{
"line": " SAS/IML 14.1",
"type": "note"
},
{
"line": " SAS/QC 14.1",
"type": "note"
},
{
"line": " ",
"type": "note"
},
{
"line": " NOTE: Additional host information:",
"type": "note"
},
{
"line": " ",
"type": "note"
},
{
"line": " Linux LIN X64 2.6.32-573.el6.x86_64 #1 SMP Wed Jul 1 18:23:37 EDT 2015 x86_64 Red Hat Enterprise Linux Server release 6.7 ",
"type": "note"
},
{
"line": " (Santiago) ",
"type": "note"
},
{
"line": " ",
"type": "note"
},
{
"line": " NOTE: SAS initialization used:",
"type": "note"
},
{
"line": " real time 2.24 seconds",
"type": "note"
},
{
"line": " cpu time 0.19 seconds",
"type": "note"
},
{
"line": " ",
"type": "note"
},
{
"line": " 1 ods html style=barrettsblue;",
"type": "source"
},
{
"line": " NOTE: Writing HTML Body file: sashtml.htm",
"type": "note"
},
{
"line": " 2 data test;x=3;run;",
"type": "source"
},
{
"line": " NOTE: The data set WORK.TEST has 1 observations and 1 variables.",
"type": "note"
},
{
"line": " NOTE: DATA statement used (Total process time):",
"type": "note"
},
{
"line": " real time 0.78 seconds",
"type": "note"
},
{
"line": " cpu time 0.03 seconds",
"type": "note"
},
{
"line": " ",
"type": "note"
},
{
"line": " 2 ! proc print data=test;quit;",
"type": "source"
},
{
"line": " NOTE: There were 1 observations read from the data set WORK.TEST.",
"type": "note"
},
{
"line": " NOTE: The PROCEDURE PRINT printed page 1.",
"type": "note"
},
{
"line": " NOTE: PROCEDURE PRINT used (Total process time):",
"type": "note"
},
{
"line": " real time 0.18 seconds",
"type": "note"
},
{
"line": " cpu time 0.11 seconds",
"type": "note"
},
{
"line": " ",
"type": "note"
},
{
"line": " 3 ods html close;",
"type": "source"
}
],
"limit": 42,
"version": 2
}
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | sessionLogCollection |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No resource exists at the requested path. | Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Check for a session log
Code samples
# You can also use wget
curl -X HEAD https://example.com/compute/sessions/{sessionId}/log
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/compute/sessions/{sessionId}/log',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/compute/sessions/{sessionId}/log')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/compute/sessions/{sessionId}/log", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /sessions/{sessionId}/log
Determines whether the session has a log available.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string | true | Specifies the ID of the session. |
start | query | integer(int64) | false | Specifies the offset of the first item in the collection. The first line is at start=0. |
limit | query | integer(int32) | false | Specifies the number of items in this page. |
type | query | string | false | Restricts log collection to those entries whose type matches the query. Specify multiple types by separating them with a ' |
timeout | query | integer | false | Specifies the request time-out in seconds. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No resource exists at the requested path. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Upload session log output to the Files service
Code samples
# You can also use wget
curl -X POST https://example.com/compute/sessions/{sessionId}/log \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.compute.output.stream.file.request+json' \
-H 'Accept: application/vnd.sas.file+json'
const inputBody = '{
"version": 1,
"attributes": {
"format": "prefixedText"
},
"x-widdershins-oldRef": "#/components/schemas/outputStreamFileRequest/example"
}';
const headers = {
'Content-Type':'application/vnd.sas.compute.output.stream.file.request+json',
'Accept':'application/vnd.sas.file+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/log',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.compute.output.stream.file.request+json',
'Accept': 'application/vnd.sas.file+json'
}
r = requests.post('https://example.com/compute/sessions/{sessionId}/log', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.compute.output.stream.file.request+json"},
"Accept": []string{"application/vnd.sas.file+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/compute/sessions/{sessionId}/log", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /sessions/{sessionId}/log
Uploads session log output to the Files service and returns the representation of the file resource containing the output. The file is created in one of two formats, based on the value of the property "format" specified in the post body. If "collection" is specified as the value of "format", the output file is rendered as application/vnd.sas.collection+json. If the format is specified as "prefixedText", the output is text/plain in which each line of output is prefixed with the name of the line type followed by a colon. In either case, all available output is returned; neither pagination nor filtering is supported.
Body parameter
{
"version": 1,
"attributes": {
"format": "prefixedText"
},
"x-widdershins-oldRef": "#/components/schemas/outputStreamFileRequest/example"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string | true | Specifies the ID of the session. |
body | body | outputStreamFileRequest | true | Specifies the request to stream output to the Files service. |
Example responses
201 Response
{
"summary": "File resource version 4",
"description": "Here is the response for file resource version 4",
"value": {
"creationTimeStamp": "2022-03-31T20:00:03.609Z",
"modifiedTimeStamp": "2022-03-31T20:00:03.826Z",
"createdBy": "sas.audit",
"modifiedBy": "sas.audit",
"id": "cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"parentUri": "/jobExecution/jobs/b9fe292d-2a4e-434c-8154-5f490b4b9257",
"properties": {
"LastState": "running",
"JobRequest": "",
"Job": "b9fe292d-2a4e-434c-8154-5f490b4b9257",
"Provider": "casl"
},
"contentDisposition": "text/plain",
"contentType": "text/plain",
"description": "Log File for Job b9fe292d-2a4e-434c-8154-5f490b4b9257",
"documentType": "log",
"encoding": "UTF-8",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"type": "application/vnd.sas.file"
},
{
"method": "GET",
"rel": "alternate",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"type": "application/vnd.sas.summary"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"type": "application/vnd.sas.file",
"responseType": "application/vnd.sas.file"
},
{
"method": "PUT",
"rel": "update",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"type": "application/vnd.sas.file",
"responseType": "application/vnd.sas.file"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7"
},
{
"method": "GET",
"rel": "content",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
"type": "text/plain"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
"type": "*/*",
"responseType": "application/vnd.sas.file"
},
{
"method": "POST",
"rel": "copyFile",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
"responseType": "application/vnd.sas.file"
},
{
"method": "POST",
"rel": "create",
"href": "/files/files",
"uri": "/files/files",
"type": "*/*",
"responseType": "application/vnd.sas.file"
}
],
"name": "2022-03-31T20:00:03Z-results.log",
"size": 742,
"searchable": false,
"fileStatus": "unlocked",
"fileVersion": 0,
"expirationTimeStamp": "2022-04-07T20:00:03.651Z",
"virusDetected": false,
"urlDetected": false,
"quarantine": false,
"version": 4
}
}
{
"summary": "File resource version 4",
"description": "Here is the response for file resource version 4",
"value": {
"creationTimeStamp": "2022-03-31T20:00:03.609Z",
"modifiedTimeStamp": "2022-03-31T20:00:03.826Z",
"createdBy": "sas.audit",
"modifiedBy": "sas.audit",
"id": "cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"parentUri": "/jobExecution/jobs/b9fe292d-2a4e-434c-8154-5f490b4b9257",
"properties": {
"LastState": "running",
"JobRequest": "",
"Job": "b9fe292d-2a4e-434c-8154-5f490b4b9257",
"Provider": "casl"
},
"contentDisposition": "text/plain",
"contentType": "text/plain",
"description": "Log File for Job b9fe292d-2a4e-434c-8154-5f490b4b9257",
"documentType": "log",
"encoding": "UTF-8",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"type": "application/vnd.sas.file"
},
{
"method": "GET",
"rel": "alternate",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"type": "application/vnd.sas.summary"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"type": "application/vnd.sas.file",
"responseType": "application/vnd.sas.file"
},
{
"method": "PUT",
"rel": "update",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"type": "application/vnd.sas.file",
"responseType": "application/vnd.sas.file"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7"
},
{
"method": "GET",
"rel": "content",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
"type": "text/plain"
},
{
"method": "PUT",
"rel": "updateContent",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
"type": "*/*",
"responseType": "application/vnd.sas.file"
},
{
"method": "POST",
"rel": "copyFile",
"href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
"uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
"responseType": "application/vnd.sas.file"
},
{
"method": "POST",
"rel": "create",
"href": "/files/files",
"uri": "/files/files",
"type": "*/*",
"responseType": "application/vnd.sas.file"
}
],
"name": "2022-03-31T20:00:03Z-results.log",
"size": 742,
"searchable": false,
"fileStatus": "unlocked",
"fileVersion": 0,
"expirationTimeStamp": "2022-04-07T20:00:03.651Z",
"virusDetected": false,
"urlDetected": false,
"quarantine": false,
"version": 4
}
}
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
406 Response
{
"summary": "Not acceptable error response",
"description": "This is an example of an error response for a request without an acceptable response type.",
"value": {
"version": 2,
"httpStatusCode": 406,
"message": "Conflict",
"details": [
"The server could produce a response matching the list of acceptable values defined in the request."
]
}
}
{
"summary": "Not acceptable error response",
"description": "This is an example of an error response for a request without an acceptable response type.",
"value": {
"version": 2,
"httpStatusCode": 406,
"message": "Conflict",
"details": [
"The server could produce a response matching the list of acceptable values defined in the request."
]
}
}
415 Response
{
"summary": "Unsupported media type error response",
"description": "This is an example of an error response for a request with payload of an unsupported type.",
"value": {
"version": 2,
"httpStatusCode": 415,
"message": "Unsupported Media Type",
"details": [
"The server refused to accept the request because the payload format is in an unsupported format."
]
}
}
{
"summary": "Unsupported media type error response",
"description": "This is an example of an error response for a request with payload of an unsupported type.",
"value": {
"version": 2,
"httpStatusCode": 415,
"message": "Unsupported Media Type",
"details": [
"The server refused to accept the request because the payload format is in an unsupported format."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | A file containing the output was created in the Files service. | Inline |
400 | Bad Request | The request was invalid. This can occur because the request body does not satisfy the schema for application/vnd.sas.compute.output.stream.file.request. It can also occur if the client is building its request URI and there is no session log output. This problem can be avoided by using the links for the session resource; a link will not exist unless output is available. | Inline |
406 | Not Acceptable | The server is not capable of producing the media type specified in the Accept header. | Inline |
415 | Unsupported Media Type | The server does not support the media type specified in the Content-Type header. | Inline |
Response Schema
Status Code 201
File Resource
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
File Resource | any | false | none | An object representing a file |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» anonymous | object | false | none | This class is used to provide common attributes and behaviors around tracking who and when objects were created and modified to representation objects. |
»» createdBy | string | false | none | The username of whoever created the resource. |
»» modifiedBy | string | false | none | The username of whoever last modified the resource. |
»» creationTimeStamp | string(date-time) | false | none | The timestamp for when the resource was created. |
»» modifiedTimeStamp | string(date-time) | false | none | The timestamp for when the resource was last modified. |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» anonymous | object | false | none | none |
»» parentUri | string | false | none | URI of the object which is either associated or linked with file resource |
»» properties | object | false | none | Properties specific to this file. Each property uses a "key" : "value" format and a comma is used as the separator between properties. |
»»» additionalProperties | string | false | none | none |
»» contentDisposition | string | false | none | Value for Content Disposition header which will be set in response while downloading the file |
»» contentType | string | false | none | Type of the content |
»» description | string | false | none | Description of the document |
»» documentType | string | false | none | Type of the document |
»» encoding | string | false | none | Encoding of the document |
»» id | string | false | none | Id of the file resource |
»» links | [link] | false | none | Links that apply to this object. Includes "self", "content", "patch", "update" and "delete" |
»»» Link | link | false | none | A link to a related operation or resource. |
»»»» method | string | false | none | The HTTP method for the link. |
»»»» rel | string | true | none | The relationship of the link to the resource. |
»»»» uri | string | false | none | The relative URI for the link. |
»»»» href | string | false | none | The URL for the link. |
»»»» title | string | false | none | The title for the link. |
»»»» type | string | false | none | The media type or link type for the link. |
»»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
»» name | string | false | none | Name of the document |
»» size | integer | false | none | Byte size of the document content |
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 406
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 415
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Location | string | Specifies the URI of the created file resource. | |
201 | Etag | string | Specifies a tag that identifies the revision of this object. |
Retrieve a session log as text.
Code samples
# You can also use wget
curl -X GET https://example.com/compute/sessions/{sessionId}/log#asText \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.error+json'
const headers = {
'Accept':'application/vnd.sas.error+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/log#asText',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.error+json'
}
r = requests.get('https://example.com/compute/sessions/{sessionId}/log#asText', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.error+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/sessions/{sessionId}/log#asText", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /sessions/{sessionId}/log#asText
Retrieves the log output associated with a session as text.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string | true | Specifies the ID of the session. |
Example responses
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No resource exists at the requested path. | Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Check for session log as text.
Code samples
# You can also use wget
curl -X HEAD https://example.com/compute/sessions/{sessionId}/log#asText
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/compute/sessions/{sessionId}/log#asText',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/compute/sessions/{sessionId}/log#asText')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/compute/sessions/{sessionId}/log#asText", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /sessions/{sessionId}/log#asText
Determines whether the session has a log available as text.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string | true | Specifies the ID of the session. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No resource exists at the requested path. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Results
Contains the operations for retrieving results from a job.
Fetch the results of a job
Code samples
# You can also use wget
curl -X GET https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/results \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/results',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.get('https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/results', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.collection+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/results", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /sessions/{sessionId}/jobs/{jobId}/results
Retrieves the results of a job as a collection. The results might be ODS output or other output. Standard paging options are available.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
jobId | path | string | true | Specifies the ID of the job whose results you want to retrieve. |
start | query | integer(int64) | false | Specifies the offset of the first item in the collection. The first line is at start=0. |
limit | query | integer(int32) | false | Specifies the number of items requested. |
filter | query | string(filter-criteria) | false | Specifies the filter criteria for returned items. |
sortBy | query | string(sort-criteria) | false | Sorts returned items. |
Example responses
200 Response
{
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/jobs/0/results?start=0&limit=2",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/jobs/0/results?start=0&limit=2",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.result"
},
{
"method": "GET",
"rel": "collection",
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/jobs/0/results",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/jobs/0/results",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.result"
}
],
"name": "Results",
"accept": "application/vnd.sas.compute.result",
"start": 0,
"count": 2,
"items": [
{
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/results/d23e6437/sashtml.htm",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/results/d23e6437/sashtml.htm",
"type": "*/*"
}
],
"id": "sashtml.htm",
"name": "sashtml.htm",
"type": "ODS",
"version": 1
},
{
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/WORK/TEST",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/WORK/TEST",
"type": "application/vnd.sas.compute.data.table.summary"
}
],
"id": "TEST",
"name": "TEST",
"type": "TABLE",
"version": 1
}
],
"limit": 2,
"version": 2
}
{
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/jobs/0/results?start=0&limit=2",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/jobs/0/results?start=0&limit=2",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.result"
},
{
"method": "GET",
"rel": "collection",
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/jobs/0/results",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/jobs/0/results",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.result"
}
],
"name": "Results",
"accept": "application/vnd.sas.compute.result",
"start": 0,
"count": 2,
"items": [
{
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/results/d23e6437/sashtml.htm",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/results/d23e6437/sashtml.htm",
"type": "*/*"
}
],
"id": "sashtml.htm",
"name": "sashtml.htm",
"type": "ODS",
"version": 1
},
{
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/WORK/TEST",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/WORK/TEST",
"type": "application/vnd.sas.compute.data.table.summary"
}
],
"id": "TEST",
"name": "TEST",
"type": "TABLE",
"version": 1
}
],
"limit": 2,
"version": 2
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | resultCollection |
404 | Not Found | No resource exists at the requested path. | Inline |
Response Schema
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Check for job results
Code samples
# You can also use wget
curl -X HEAD https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/results
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/results',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/results')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/compute/sessions/{sessionId}/jobs/{jobId}/results", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /sessions/{sessionId}/jobs/{jobId}/results
Determines whether a job has any results.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
jobId | path | string | true | Specifies the ID of the job to fetch results from. |
start | query | integer(int64) | false | Specifies the offset of the first item in the collection. The first line is at start=0. |
limit | query | integer(int32) | false | Specifies the number of items to fetch. |
filter | query | string(filter-criteria) | false | Specifies the filter criteria for returned items. |
sortBy | query | string(sort-criteria) | false | Sorts returned items. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
404 | Not Found | No job results exist at the requested path. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Fetch results for a session
Code samples
# You can also use wget
curl -X GET https://example.com/compute/sessions/{sessionId}/results \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/results',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.get('https://example.com/compute/sessions/{sessionId}/results', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.collection+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/sessions/{sessionId}/results", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /sessions/{sessionId}/results
Retrieves the results of an entire session. This can be ODS output or other output.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
start | query | integer(int64) | false | Specifies the offset of the first item in the collection. The first line is at start=0. |
limit | query | integer(int32) | false | Specifies the number of items that were requested. |
Example responses
200 Response
{
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/jobs/0/results?start=0&limit=2",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/jobs/0/results?start=0&limit=2",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.result"
},
{
"method": "GET",
"rel": "collection",
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/jobs/0/results",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/jobs/0/results",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.result"
}
],
"name": "Results",
"accept": "application/vnd.sas.compute.result",
"start": 0,
"count": 2,
"items": [
{
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/results/d23e6437/sashtml.htm",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/results/d23e6437/sashtml.htm",
"type": "*/*"
}
],
"id": "sashtml.htm",
"name": "sashtml.htm",
"type": "ODS",
"version": 1
},
{
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/WORK/TEST",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/WORK/TEST",
"type": "application/vnd.sas.compute.data.table.summary"
}
],
"id": "TEST",
"name": "TEST",
"type": "TABLE",
"version": 1
}
],
"limit": 2,
"version": 2
}
{
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/jobs/0/results?start=0&limit=2",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/jobs/0/results?start=0&limit=2",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.result"
},
{
"method": "GET",
"rel": "collection",
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/jobs/0/results",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/jobs/0/results",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.result"
}
],
"name": "Results",
"accept": "application/vnd.sas.compute.result",
"start": 0,
"count": 2,
"items": [
{
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/results/d23e6437/sashtml.htm",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/results/d23e6437/sashtml.htm",
"type": "*/*"
}
],
"id": "sashtml.htm",
"name": "sashtml.htm",
"type": "ODS",
"version": 1
},
{
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/WORK/TEST",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/WORK/TEST",
"type": "application/vnd.sas.compute.data.table.summary"
}
],
"id": "TEST",
"name": "TEST",
"type": "TABLE",
"version": 1
}
],
"limit": 2,
"version": 2
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | resultCollection |
404 | Not Found | No resource exists at the requested path. | Inline |
Response Schema
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Check for session results
Code samples
# You can also use wget
curl -X HEAD https://example.com/compute/sessions/{sessionId}/results
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/compute/sessions/{sessionId}/results',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/compute/sessions/{sessionId}/results')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/compute/sessions/{sessionId}/results", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /sessions/{sessionId}/results
Determines whether the session has any results.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
start | query | integer(int64) | false | Specifies the offset of the first item in the collection. The first line is at start=0. |
limit | query | integer(int32) | false | Specifies the number of items that were requested. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
404 | Not Found | No resource exists at the requested path. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Data Access
Contains the operations to access information for librefs and SAS data sets.
Return libraries in a session
Code samples
# You can also use wget
curl -X GET https://example.com/compute/sessions/{sessionId}/data \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json' \
-H 'Accept-Item: application/vnd.sas.compute.library+json'
const headers = {
'Accept':'application/vnd.sas.collection+json',
'Accept-Item':'application/vnd.sas.compute.library+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/data',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json',
'Accept-Item': 'application/vnd.sas.compute.library+json'
}
r = requests.get('https://example.com/compute/sessions/{sessionId}/data', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.collection+json"},
"Accept-Item": []string{"application/vnd.sas.compute.library+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/sessions/{sessionId}/data", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /sessions/{sessionId}/data
Provides a listing that contains summaries of the libraries that are defined in the current session.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Item | header | string | false | Specifies the desired library representation. The Accept-Item options are:
|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
start | query | integer | false | Specifies the offset of the first library to return. |
limit | query | integer | false | Specifies the maximum number of libraries to return. |
noCache | query | boolean | false | Specifies whether to force the library collection to be refreshed before it is returned. |
Enumerated Values
Parameter | Value |
---|---|
Accept-Item | application/vnd.sas.compute.library+json |
Accept-Item | application/vnd.sas.compute.library.summary+json |
Example responses
200 Response
{
"accept": "application/vnd.sas.compute.library.summary",
"count": 5,
"items": [
{
"id": "SASHELP",
"links": [
{
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/SASHELP",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.library",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/SASHELP"
}
],
"name": "SASHELP"
},
{
"id": "MAPS",
"links": [
{
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/MAPS",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.library",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/MAPS"
}
],
"name": "MAPS"
},
{
"id": "MAPSGFK",
"links": [
{
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/MAPSGFK",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.library",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/MAPSGFK"
}
],
"name": "MAPSGFK"
},
{
"id": "SASUSER",
"links": [
{
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/SASUSER",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.library",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/SASUSER"
}
],
"name": "SASUSER"
},
{
"id": "WORK",
"links": [
{
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/WORK",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.library",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/WORK"
}
],
"name": "WORK"
}
],
"limit": 5,
"links": [
{
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data?start=0&limit=5",
"itemType": "application/vnd.sas.compute.library.summary",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data?start=0&limit=5"
},
{
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data",
"itemType": "application/vnd.sas.compute.library.summary",
"method": "GET",
"rel": "collection",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data"
},
{
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data",
"method": "POST",
"rel": "create",
"type": "application/vnd.sas.compute.library.summary",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data"
}
],
"name": "SAS Libraries",
"start": 0,
"version": 2
}
{
"accept": "application/vnd.sas.compute.library.summary",
"count": 5,
"items": [
{
"id": "SASHELP",
"links": [
{
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/SASHELP",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.library",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/SASHELP"
}
],
"name": "SASHELP"
},
{
"id": "MAPS",
"links": [
{
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/MAPS",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.library",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/MAPS"
}
],
"name": "MAPS"
},
{
"id": "MAPSGFK",
"links": [
{
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/MAPSGFK",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.library",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/MAPSGFK"
}
],
"name": "MAPSGFK"
},
{
"id": "SASUSER",
"links": [
{
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/SASUSER",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.library",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/SASUSER"
}
],
"name": "SASUSER"
},
{
"id": "WORK",
"links": [
{
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/WORK",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.library",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/WORK"
}
],
"name": "WORK"
}
],
"limit": 5,
"links": [
{
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data?start=0&limit=5",
"itemType": "application/vnd.sas.compute.library.summary",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data?start=0&limit=5"
},
{
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data",
"itemType": "application/vnd.sas.compute.library.summary",
"method": "GET",
"rel": "collection",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data"
},
{
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data",
"method": "POST",
"rel": "create",
"type": "application/vnd.sas.compute.library.summary",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data"
}
],
"name": "SAS Libraries",
"start": 0,
"version": 2
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | librarySummaryCollection |
404 | Not Found | No resource exists at the requested path. | Inline |
Response Schema
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Check access to data for a session
Code samples
# You can also use wget
curl -X HEAD https://example.com/compute/sessions/{sessionId}/data
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/compute/sessions/{sessionId}/data',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/compute/sessions/{sessionId}/data')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/compute/sessions/{sessionId}/data", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /sessions/{sessionId}/data
Determines whether a session has a data endpoint available.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
start | query | integer | false | Specifies the offset of the first library to return. |
limit | query | integer | false | Specifies the maximum number of libraries to return. |
noCache | query | boolean | false | Specifies whether to force the library collection to be refreshed before it is returned. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
404 | Not Found | No resource exists at the requested path. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Assign a libref
Code samples
# You can also use wget
curl -X POST https://example.com/compute/sessions/{sessionId}/data \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.compute.library.request+json' \
-H 'Accept: application/vnd.sas.error+json'
const inputBody = '{
"version": 1,
"name": "mylib",
"path": "/u/myuser/mylibrary",
"engine": "BASE",
"options": [
""
],
"x-widdershins-oldRef": "#/components/schemas/libraryRequest/example"
}';
const headers = {
'Content-Type':'application/vnd.sas.compute.library.request+json',
'Accept':'application/vnd.sas.error+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/data',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.compute.library.request+json',
'Accept': 'application/vnd.sas.error+json'
}
r = requests.post('https://example.com/compute/sessions/{sessionId}/data', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.compute.library.request+json"},
"Accept": []string{"application/vnd.sas.error+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/compute/sessions/{sessionId}/data", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /sessions/{sessionId}/data
Assigns a libref that is based on the request body for a session. The Location header contains the URI of the libref resource.
Body parameter
{
"version": 1,
"name": "mylib",
"path": "/u/myuser/mylibrary",
"engine": "BASE",
"options": [
""
],
"x-widdershins-oldRef": "#/components/schemas/libraryRequest/example"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
body | body | libraryRequest | true | Specifies a libref assignment request. |
Example responses
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | A libref was created. | None |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No resource exists at the requested path. | Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Location | string | Specifies the URI of the created libref resource. |
Get libref information
Code samples
# You can also use wget
curl -X GET https://example.com/compute/sessions/{sessionId}/data/{libref} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.compute.library+json'
const headers = {
'Accept':'application/vnd.sas.compute.library+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/data/{libref}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.compute.library+json'
}
r = requests.get('https://example.com/compute/sessions/{sessionId}/data/{libref}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.compute.library+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/sessions/{sessionId}/data/{libref}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /sessions/{sessionId}/data/{libref}
Retrieves information about a specified libref, including links to tables.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
libref | path | string(object-id) | true | Specifies the libref to query. |
Example responses
200 Response
{
"concatenationCount": 2,
"engineName": "V9",
"fileFormat": "7",
"flags": 1057,
"id": "SASHELP",
"libref": "SASHELP",
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/SASHELP",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.library",
"uri": "/compute/sessions/RKEY-ses0000/data/SASHELP"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/SASHELP",
"method": "GET",
"rel": "alternate",
"type": "application/vnd.sas.compute.library.summary",
"uri": "/compute/sessions/RKEY-ses0000/data/SASHELP"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/SASHELP",
"itemType": "application/vnd.sas.compute.data.table.summary",
"method": "GET",
"rel": "tables",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/SASHELP"
}
],
"name": "SASHELP",
"options": "",
"physicalName": "( '/sasgen/dev/mva-vb005/sasdvd/sio/laxnd/en/sashelp' '/sasgen/dev/mva-vb005/sasdvd/sio/laxnd/en/sashelp' )",
"version": 1
}
{
"concatenationCount": 2,
"engineName": "V9",
"fileFormat": "7",
"flags": 1057,
"id": "SASHELP",
"libref": "SASHELP",
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/SASHELP",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.library",
"uri": "/compute/sessions/RKEY-ses0000/data/SASHELP"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/SASHELP",
"method": "GET",
"rel": "alternate",
"type": "application/vnd.sas.compute.library.summary",
"uri": "/compute/sessions/RKEY-ses0000/data/SASHELP"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/SASHELP",
"itemType": "application/vnd.sas.compute.data.table.summary",
"method": "GET",
"rel": "tables",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/SASHELP"
}
],
"name": "SASHELP",
"options": "",
"physicalName": "( '/sasgen/dev/mva-vb005/sasdvd/sio/laxnd/en/sashelp' '/sasgen/dev/mva-vb005/sasdvd/sio/laxnd/en/sashelp' )",
"version": 1
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | library |
404 | Not Found | No resource exists at the requested path. | Inline |
Response Schema
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Verify that a libref exists
Code samples
# You can also use wget
curl -X HEAD https://example.com/compute/sessions/{sessionId}/data/{libref}
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/compute/sessions/{sessionId}/data/{libref}',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/compute/sessions/{sessionId}/data/{libref}')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/compute/sessions/{sessionId}/data/{libref}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /sessions/{sessionId}/data/{libref}
Determines whether the specified libref exists in a session.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
libref | path | string(object-id) | true | Specifies the libref to query. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
404 | Not Found | No resource exists at the requested path. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Deassign libref
Code samples
# You can also use wget
curl -X DELETE https://example.com/compute/sessions/{sessionId}/data/{libref} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.error+json'
const headers = {
'Accept':'application/vnd.sas.error+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/data/{libref}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.error+json'
}
r = requests.delete('https://example.com/compute/sessions/{sessionId}/data/{libref}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.error+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "https://example.com/compute/sessions/{sessionId}/data/{libref}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /sessions/{sessionId}/data/{libref}
Removes the libref from the session.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
libref | path | string(object-id) | true | Specifies the libref to deassign. |
Example responses
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | The libref was deassigned. | None |
404 | Not Found | No resource exists at the requested path. | Inline |
Response Schema
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Get libref summary
Code samples
# You can also use wget
curl -X GET https://example.com/compute/sessions/{sessionId}/data/{libref}#summary \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.compute.library.summary+json'
const headers = {
'Accept':'application/vnd.sas.compute.library.summary+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/data/{libref}#summary',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.compute.library.summary+json'
}
r = requests.get('https://example.com/compute/sessions/{sessionId}/data/{libref}#summary', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.compute.library.summary+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/sessions/{sessionId}/data/{libref}#summary", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /sessions/{sessionId}/data/{libref}#summary
Returns summary information about a specified libref.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
libref | path | string(object-id) | true | Specifies the libref to query. |
Example responses
200 Response
{
"id": "SASHELP",
"links": [
{
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/SASHELP",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.library",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/SASHELP"
}
],
"name": "SASHELP",
"version": 1
}
{
"id": "SASHELP",
"links": [
{
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/SASHELP",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.library",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/SASHELP"
}
],
"name": "SASHELP",
"version": 1
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | librarySummary |
404 | Not Found | No resource exists at the requested path. | Inline |
Response Schema
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Get data sets in a libref
Code samples
# You can also use wget
curl -X GET https://example.com/compute/sessions/{sessionId}/data/{libref}#tables \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: applicaton/vnd.sas.collection+json' \
-H 'Accept-Item: application/vnd.sas.compute.data.table+json'
const headers = {
'Accept':'applicaton/vnd.sas.collection+json',
'Accept-Item':'application/vnd.sas.compute.data.table+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/data/{libref}#tables',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'applicaton/vnd.sas.collection+json',
'Accept-Item': 'application/vnd.sas.compute.data.table+json'
}
r = requests.get('https://example.com/compute/sessions/{sessionId}/data/{libref}#tables', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"applicaton/vnd.sas.collection+json"},
"Accept-Item": []string{"application/vnd.sas.compute.data.table+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/sessions/{sessionId}/data/{libref}#tables", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /sessions/{sessionId}/data/{libref}#tables
Returns a collection of data sets that are associated with a specified libref. Set the Accept header on this method to application/vnd.sas.collection+json. The collection contains application/vnd.sas.compute.data.table.summary items. Standard paging options are provided.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Item | header | string | false | Specifies the desired data table representation. The Accept-Item options are:
|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
libref | path | string(object-id) | true | Specifies the libref to query. |
start | query | integer | false | Specifies the offset of the first table summary to return. |
limit | query | integer | false | Specifies the maximum number of table summaries to return. |
noCache | query | boolean | false | Specifies whether to force the table collection to be refreshed before it is returned. |
Enumerated Values
Parameter | Value |
---|---|
Accept-Item | application/vnd.sas.compute.data.table+json |
Example responses
200 Response
{
"accept": "application/vnd.sas.compute.data.table.summary",
"count": 428,
"items": [
{
"id": "AFGHANISTAN",
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPS/AFGHANISTAN",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPS/AFGHANISTAN"
}
],
"name": "AFGHANISTAN"
},
{
"id": "AFGHANISTAN_ATTR",
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPS/AFGHANISTAN_ATTR",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPS/AFGHANISTAN_ATTR"
}
],
"name": "AFGHANISTAN_ATTR"
},
{
"id": "AFRICA",
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPS/AFRICA",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPS/AFRICA"
}
],
"name": "AFRICA"
}
],
"limit": 3,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPS?start=0&limit=3",
"itemType": "application/vnd.sas.compute.data.table.summary",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPS?start=0&limit=3"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPS",
"itemType": "application/vnd.sas.compute.data.table.summary",
"method": "GET",
"rel": "collection",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPS"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPS?start=3&limit=3",
"itemType": "application/vnd.sas.compute.data.table.summary",
"method": "GET",
"rel": "next",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPS?start=3&limit=3"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPS?start=425&limit=3",
"itemType": "application/vnd.sas.compute.data.table.summary",
"method": "GET",
"rel": "last",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPS?start=425&limit=3"
}
],
"name": "Data Tables",
"start": 0,
"version": 2
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | tableSummaryCollection |
404 | Not Found | No resource exists at the requested path. | Inline |
Response Schema
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Get a data set
Code samples
# You can also use wget
curl -X GET https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.compute.data.table+json'
const headers = {
'Accept':'application/vnd.sas.compute.data.table+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.compute.data.table+json'
}
r = requests.get('https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.compute.data.table+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /sessions/{sessionId}/data/{libref}/{tableName}
Returns information about a data set.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
libref | path | string(object-id) | true | Specifies the libref for the request. |
tableName | path | string(object-id) | true | Specifies the table or data set to query. |
Example responses
200 Response
{
"bookmarkLength": 12,
"compressionRoutine": "NO",
"modifiedTimeStamp": "2018-05-04T18:02:27.780Z",
"creationTimeStamp": "2018-05-04T18:02:27.749Z",
"engine": "V9",
"id": "AFGHANISTAN",
"label": "AFGHANISTAN - Source: GfkGeoMarketing - 2012 ",
"libref": "MAPSGFK",
"encoding": "Default",
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN",
"method": "GET",
"rel": "alternate",
"type": "application/vnd.sas.compute.data.table.summary",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows",
"itemType": "application/vnd.sas.compute.data.table.row",
"method": "GET",
"rel": "rows",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows",
"method": "GET",
"rel": "rowsAsCSV",
"type": "text/csv",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rowSet",
"method": "GET",
"rel": "rowSet",
"type": "application/vnd.sas.compute.data.table.row.set",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rowSet"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns",
"itemType": "application/vnd.sas.compute.data.table.column",
"method": "GET",
"rel": "columns",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns"
}
],
"logicalRecordCount": 49858,
"name": "AFGHANISTAN",
"columnCount": 10,
"rowCount": 49858,
"physicalRecordCount": 49858,
"recordLength": 88,
"version": 1
}
{
"bookmarkLength": 12,
"compressionRoutine": "NO",
"modifiedTimeStamp": "2018-05-04T18:02:27.780Z",
"creationTimeStamp": "2018-05-04T18:02:27.749Z",
"engine": "V9",
"id": "AFGHANISTAN",
"label": "AFGHANISTAN - Source: GfkGeoMarketing - 2012 ",
"libref": "MAPSGFK",
"encoding": "Default",
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN",
"method": "GET",
"rel": "alternate",
"type": "application/vnd.sas.compute.data.table.summary",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows",
"itemType": "application/vnd.sas.compute.data.table.row",
"method": "GET",
"rel": "rows",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows",
"method": "GET",
"rel": "rowsAsCSV",
"type": "text/csv",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rowSet",
"method": "GET",
"rel": "rowSet",
"type": "application/vnd.sas.compute.data.table.row.set",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rowSet"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns",
"itemType": "application/vnd.sas.compute.data.table.column",
"method": "GET",
"rel": "columns",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns"
}
],
"logicalRecordCount": 49858,
"name": "AFGHANISTAN",
"columnCount": 10,
"rowCount": 49858,
"physicalRecordCount": 49858,
"recordLength": 88,
"version": 1
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | tableInfo |
404 | Not Found | No resource exists at the requested path. | Inline |
Response Schema
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Etag | string | Specifies a tag that identifies the revision of this object. |
Check for a data set in a libref
Code samples
# You can also use wget
curl -X HEAD https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /sessions/{sessionId}/data/{libref}/{tableName}
Determines whether the specified data set exists in a libref.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
libref | path | string(object-id) | true | Specifies the libref for the request. |
tableName | path | string(object-id) | true | Specifies the table or data set to query. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
404 | Not Found | No resource exists at the requested path. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Etag | string | Specifies a tag that identifies the revision of this object. |
Update table information
Code samples
# You can also use wget
curl -X PUT https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.compute.data.table+json' \
-H 'Accept: application/vnd.sas.compute.data.table+json' \
-H 'If-Match: string'
const inputBody = '{
"bookmarkLength": 12,
"compressionRoutine": "NO",
"modifiedTimeStamp": "2018-05-04T18:02:27.780Z",
"creationTimeStamp": "2018-05-04T18:02:27.749Z",
"engine": "V9",
"id": "AFGHANISTAN",
"label": "AFGHANISTAN - Source: GfkGeoMarketing - 2012 ",
"libref": "MAPSGFK",
"encoding": "Default",
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN",
"method": "GET",
"rel": "alternate",
"type": "application/vnd.sas.compute.data.table.summary",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows",
"itemType": "application/vnd.sas.compute.data.table.row",
"method": "GET",
"rel": "rows",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows",
"method": "GET",
"rel": "rowsAsCSV",
"type": "text/csv",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rowSet",
"method": "GET",
"rel": "rowSet",
"type": "application/vnd.sas.compute.data.table.row.set",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rowSet"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns",
"itemType": "application/vnd.sas.compute.data.table.column",
"method": "GET",
"rel": "columns",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns"
}
],
"logicalRecordCount": 49858,
"name": "AFGHANISTAN",
"columnCount": 10,
"rowCount": 49858,
"physicalRecordCount": 49858,
"recordLength": 88,
"version": 1
}';
const headers = {
'Content-Type':'application/vnd.sas.compute.data.table+json',
'Accept':'application/vnd.sas.compute.data.table+json',
'If-Match':'string'
};
fetch('https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.compute.data.table+json',
'Accept': 'application/vnd.sas.compute.data.table+json',
'If-Match': 'string'
}
r = requests.put('https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.compute.data.table+json"},
"Accept": []string{"application/vnd.sas.compute.data.table+json"},
"If-Match": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /sessions/{sessionId}/data/{libref}/{tableName}
Updates the name or label of the specified table.
Body parameter
{
"bookmarkLength": 12,
"compressionRoutine": "NO",
"modifiedTimeStamp": "2018-05-04T18:02:27.780Z",
"creationTimeStamp": "2018-05-04T18:02:27.749Z",
"engine": "V9",
"id": "AFGHANISTAN",
"label": "AFGHANISTAN - Source: GfkGeoMarketing - 2012 ",
"libref": "MAPSGFK",
"encoding": "Default",
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN",
"method": "GET",
"rel": "alternate",
"type": "application/vnd.sas.compute.data.table.summary",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows",
"itemType": "application/vnd.sas.compute.data.table.row",
"method": "GET",
"rel": "rows",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows",
"method": "GET",
"rel": "rowsAsCSV",
"type": "text/csv",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rowSet",
"method": "GET",
"rel": "rowSet",
"type": "application/vnd.sas.compute.data.table.row.set",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rowSet"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns",
"itemType": "application/vnd.sas.compute.data.table.column",
"method": "GET",
"rel": "columns",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns"
}
],
"logicalRecordCount": 49858,
"name": "AFGHANISTAN",
"columnCount": 10,
"rowCount": 49858,
"physicalRecordCount": 49858,
"recordLength": 88,
"version": 1
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
libref | path | string(object-id) | true | Specifies the libref for the request. |
tableName | path | string(object-id) | true | Specifies the table or data set to update. |
If-Match | header | string | true | Specifies the ETag of the table that you are updating. |
body | body | tableInfo | true | Specifies the information to update for the table. |
Example responses
200 Response
{
"bookmarkLength": 12,
"compressionRoutine": "NO",
"modifiedTimeStamp": "2018-05-04T18:02:27.780Z",
"creationTimeStamp": "2018-05-04T18:02:27.749Z",
"engine": "V9",
"id": "AFGHANISTAN",
"label": "AFGHANISTAN - Source: GfkGeoMarketing - 2012 ",
"libref": "MAPSGFK",
"encoding": "Default",
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN",
"method": "GET",
"rel": "alternate",
"type": "application/vnd.sas.compute.data.table.summary",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows",
"itemType": "application/vnd.sas.compute.data.table.row",
"method": "GET",
"rel": "rows",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows",
"method": "GET",
"rel": "rowsAsCSV",
"type": "text/csv",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rowSet",
"method": "GET",
"rel": "rowSet",
"type": "application/vnd.sas.compute.data.table.row.set",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rowSet"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns",
"itemType": "application/vnd.sas.compute.data.table.column",
"method": "GET",
"rel": "columns",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns"
}
],
"logicalRecordCount": 49858,
"name": "AFGHANISTAN",
"columnCount": 10,
"rowCount": 49858,
"physicalRecordCount": 49858,
"recordLength": 88,
"version": 1
}
{
"bookmarkLength": 12,
"compressionRoutine": "NO",
"modifiedTimeStamp": "2018-05-04T18:02:27.780Z",
"creationTimeStamp": "2018-05-04T18:02:27.749Z",
"engine": "V9",
"id": "AFGHANISTAN",
"label": "AFGHANISTAN - Source: GfkGeoMarketing - 2012 ",
"libref": "MAPSGFK",
"encoding": "Default",
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN",
"method": "GET",
"rel": "alternate",
"type": "application/vnd.sas.compute.data.table.summary",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows",
"itemType": "application/vnd.sas.compute.data.table.row",
"method": "GET",
"rel": "rows",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows",
"method": "GET",
"rel": "rowsAsCSV",
"type": "text/csv",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rowSet",
"method": "GET",
"rel": "rowSet",
"type": "application/vnd.sas.compute.data.table.row.set",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rowSet"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns",
"itemType": "application/vnd.sas.compute.data.table.column",
"method": "GET",
"rel": "columns",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns"
}
],
"logicalRecordCount": 49858,
"name": "AFGHANISTAN",
"columnCount": 10,
"rowCount": 49858,
"physicalRecordCount": 49858,
"recordLength": 88,
"version": 1
}
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
412 Response
{
"summary": "Precondition failed error response",
"description": "This is an example of an error response for a conditional request with an invalid precondition.",
"value": {
"version": 2,
"httpStatusCode": 412,
"message": "Precondition Failed",
"details": [
"A precondition for a conditional request has failed."
]
}
}
{
"summary": "Precondition failed error response",
"description": "This is an example of an error response for a conditional request with an invalid precondition.",
"value": {
"version": 2,
"httpStatusCode": 412,
"message": "Precondition Failed",
"details": [
"A precondition for a conditional request has failed."
]
}
}
428 Response
{
"summary": "Precondition required error response",
"description": "This is an example of an error response for a conditional request with a missing precondition.",
"value": {
"version": 2,
"httpStatusCode": 428,
"message": "Precondition Required",
"details": [
"The server refused to accept the request because a precondition is missing."
]
}
}
{
"summary": "Precondition required error response",
"description": "This is an example of an error response for a conditional request with a missing precondition.",
"value": {
"version": 2,
"httpStatusCode": 428,
"message": "Precondition Required",
"details": [
"The server refused to accept the request because a precondition is missing."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | tableInfo |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No resource exists at the requested path. | Inline |
412 | Precondition Failed | The If-Match request header did not match the resource's entity tag, or the If-Unmodified-Since request header did not match the resources last modified timestamp. |
Inline |
428 | Precondition Required | The request headers did not include an If-Match or If-Unmodified-Since precondition. |
Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 412
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 428
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Etag | string | Specifies a tag that identifies the revision of this object. |
Delete a table or view
Code samples
# You can also use wget
curl -X DELETE https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.error+json'
const headers = {
'Accept':'application/vnd.sas.error+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.error+json'
}
r = requests.delete('https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.error+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /sessions/{sessionId}/data/{libref}/{tableName}
Deletes a table or view. If you request to delete a table and you have proper permissions, then the data set is deleted. If you request to delete a view, then the view is destroyed.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
libref | path | string(object-id) | true | Specifies the libref for the request. |
tableName | path | string(object-id) | true | Specifies the table or data set to update. |
Example responses
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | The table or view was deleted. | None |
404 | Not Found | No resource exists at the requested path. | Inline |
Response Schema
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Get a summary of a data set
Code samples
# You can also use wget
curl -X GET https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}#summary \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.compute.data.table.summary+json'
const headers = {
'Accept':'application/vnd.sas.compute.data.table.summary+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}#summary',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.compute.data.table.summary+json'
}
r = requests.get('https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}#summary', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.compute.data.table.summary+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}#summary", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /sessions/{sessionId}/data/{libref}/{tableName}#summary
Returns summary information about a data set.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
libref | path | string(object-id) | true | Specifies the libref for the request. |
tableName | path | string(object-id) | true | Specifies the table or data set to query. |
Example responses
200 Response
{
"id": "AFGHANISTAN",
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN"
}
],
"name": "AFGHANISTAN",
"version": 1
}
{
"id": "AFGHANISTAN",
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN"
}
],
"name": "AFGHANISTAN",
"version": 1
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | tableSummary |
404 | Not Found | No resource exists at the requested path. | Inline |
Response Schema
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Get column information
Code samples
# You can also use wget
curl -X GET https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/columns \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/columns',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.get('https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/columns', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.collection+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/columns", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /sessions/{sessionId}/data/{libref}/{tableName}/columns
Returns the column information for a specified data set. By default, a collection is returned, and standard paging options are available.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
libref | path | string(object-id) | true | Specifies the libref for the request. |
tableName | path | string(object-id) | true | Specifies the table or data set to query. |
start | query | integer | false | Specifies the offset of the first column entry to return. |
limit | query | integer | false | Specifies the maximum number of columns to return. |
Example responses
200 Response
{
"accept": "application/vnd.sas.compute.data.table.column",
"count": 10,
"items": [
{
"id": "ID",
"index": 0,
"label": "Districts code",
"length": 15,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/ID",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/ID"
}
],
"name": "ID",
"type": "CHAR"
},
{
"id": "ID1",
"index": 1,
"label": "Provinces code",
"length": 15,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/ID1",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/ID1"
}
],
"name": "ID1",
"type": "CHAR"
},
{
"id": "SEGMENT",
"index": 2,
"label": "ID segment number",
"length": 5,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/SEGMENT",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/SEGMENT"
}
],
"name": "SEGMENT",
"type": "FLOAT"
},
{
"format": {
"decimals": 12,
"length": 16
},
"id": "X",
"index": 3,
"label": "Projected Longitude: Albers",
"length": 8,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/X",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/X"
}
],
"name": "X",
"type": "FLOAT"
},
{
"format": {
"decimals": 12,
"length": 16
},
"id": "Y",
"index": 4,
"label": "Projected Latitude: Albers",
"length": 8,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/Y",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/Y"
}
],
"name": "Y",
"type": "FLOAT"
},
{
"id": "LONG",
"index": 5,
"label": "Unprojected degrees longitude (East)",
"length": 8,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/LONG",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/LONG"
}
],
"name": "LONG",
"type": "FLOAT"
},
{
"id": "LAT",
"index": 6,
"label": "Unprojected degrees latitude",
"length": 8,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/LAT",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/LAT"
}
],
"name": "LAT",
"type": "FLOAT"
},
{
"id": "RESOLUTION",
"index": 7,
"label": "Map detail level based on output resolution",
"length": 5,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/RESOLUTION",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/RESOLUTION"
}
],
"name": "RESOLUTION",
"type": "FLOAT"
},
{
"id": "DENSITY",
"index": 8,
"label": "Reduce density values",
"length": 5,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/DENSITY",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/DENSITY"
}
],
"name": "DENSITY",
"type": "FLOAT"
},
{
"id": "LAKE",
"index": 9,
"label": "Lake Flag:1-water:2-citytype",
"length": 5,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/LAKE",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/LAKE"
}
],
"name": "LAKE",
"type": "FLOAT"
}
],
"limit": 10,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/?start=0&limit=10",
"itemType": "application/vnd.sas.compute.data.table.column",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/?start=0&limit=10"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/",
"itemType": "application/vnd.sas.compute.data.table.column",
"method": "GET",
"rel": "collection",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/"
}
],
"name": "Table Columns",
"start": 0,
"version": 2
}
{
"accept": "application/vnd.sas.compute.data.table.column",
"count": 10,
"items": [
{
"id": "ID",
"index": 0,
"label": "Districts code",
"length": 15,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/ID",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/ID"
}
],
"name": "ID",
"type": "CHAR"
},
{
"id": "ID1",
"index": 1,
"label": "Provinces code",
"length": 15,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/ID1",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/ID1"
}
],
"name": "ID1",
"type": "CHAR"
},
{
"id": "SEGMENT",
"index": 2,
"label": "ID segment number",
"length": 5,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/SEGMENT",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/SEGMENT"
}
],
"name": "SEGMENT",
"type": "FLOAT"
},
{
"format": {
"decimals": 12,
"length": 16
},
"id": "X",
"index": 3,
"label": "Projected Longitude: Albers",
"length": 8,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/X",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/X"
}
],
"name": "X",
"type": "FLOAT"
},
{
"format": {
"decimals": 12,
"length": 16
},
"id": "Y",
"index": 4,
"label": "Projected Latitude: Albers",
"length": 8,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/Y",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/Y"
}
],
"name": "Y",
"type": "FLOAT"
},
{
"id": "LONG",
"index": 5,
"label": "Unprojected degrees longitude (East)",
"length": 8,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/LONG",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/LONG"
}
],
"name": "LONG",
"type": "FLOAT"
},
{
"id": "LAT",
"index": 6,
"label": "Unprojected degrees latitude",
"length": 8,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/LAT",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/LAT"
}
],
"name": "LAT",
"type": "FLOAT"
},
{
"id": "RESOLUTION",
"index": 7,
"label": "Map detail level based on output resolution",
"length": 5,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/RESOLUTION",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/RESOLUTION"
}
],
"name": "RESOLUTION",
"type": "FLOAT"
},
{
"id": "DENSITY",
"index": 8,
"label": "Reduce density values",
"length": 5,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/DENSITY",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/DENSITY"
}
],
"name": "DENSITY",
"type": "FLOAT"
},
{
"id": "LAKE",
"index": 9,
"label": "Lake Flag:1-water:2-citytype",
"length": 5,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/LAKE",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/LAKE"
}
],
"name": "LAKE",
"type": "FLOAT"
}
],
"limit": 10,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/?start=0&limit=10",
"itemType": "application/vnd.sas.compute.data.table.column",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/?start=0&limit=10"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/",
"itemType": "application/vnd.sas.compute.data.table.column",
"method": "GET",
"rel": "collection",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/"
}
],
"name": "Table Columns",
"start": 0,
"version": 2
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | columnCollection |
404 | Not Found | No resource exists at the requested path. | Inline |
Response Schema
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Check for available columns in a table
Code samples
# You can also use wget
curl -X HEAD https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/columns
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/columns',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/columns')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/columns", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /sessions/{sessionId}/data/{libref}/{tableName}/columns
Determines whether the specified data set has access to columns.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
libref | path | string(object-id) | true | Specifies the libref for the request. |
tableName | path | string(object-id) | true | Specifies the table or data set to query. |
start | query | integer | false | Specifies the offset of the first column entry to return. |
limit | query | integer | false | Specifies the maximum number of columns to return. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
404 | Not Found | No session exists at the requested path. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Retrieve column information
Code samples
# You can also use wget
curl -X POST https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/columns \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.compute.data.table.columns.request+json' \
-H 'Accept: application/vnd.sas.collection+json'
const inputBody = '{
"includeColumns": [
"Name",
"Age",
"Sex"
],
"version": 1,
"x-widdershins-oldRef": "#/components/schemas/columnsRequest/example"
}';
const headers = {
'Content-Type':'application/vnd.sas.compute.data.table.columns.request+json',
'Accept':'application/vnd.sas.collection+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/columns',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.compute.data.table.columns.request+json',
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.post('https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/columns', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.compute.data.table.columns.request+json"},
"Accept": []string{"application/vnd.sas.collection+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/columns", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /sessions/{sessionId}/data/{libref}/{tableName}/columns
Returns the column information for a specified data set based on the submitted request body. By default, a collection is returned, and standard paging options are available.
Body parameter
{
"includeColumns": [
"Name",
"Age",
"Sex"
],
"version": 1,
"x-widdershins-oldRef": "#/components/schemas/columnsRequest/example"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
libref | path | string(object-id) | true | Specifies the libref for the request. |
tableName | path | string(object-id) | true | Specifies the table or data set to query. |
start | query | integer | false | Specifies the offset of the first column entry to return. |
limit | query | integer | false | Specifies the maximum number of columns to return. |
body | body | columnsRequest | false | Optional body that is used to refine a request. |
Example responses
200 Response
{
"accept": "application/vnd.sas.compute.data.table.column",
"count": 10,
"items": [
{
"id": "ID",
"index": 0,
"label": "Districts code",
"length": 15,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/ID",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/ID"
}
],
"name": "ID",
"type": "CHAR"
},
{
"id": "ID1",
"index": 1,
"label": "Provinces code",
"length": 15,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/ID1",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/ID1"
}
],
"name": "ID1",
"type": "CHAR"
},
{
"id": "SEGMENT",
"index": 2,
"label": "ID segment number",
"length": 5,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/SEGMENT",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/SEGMENT"
}
],
"name": "SEGMENT",
"type": "FLOAT"
},
{
"format": {
"decimals": 12,
"length": 16
},
"id": "X",
"index": 3,
"label": "Projected Longitude: Albers",
"length": 8,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/X",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/X"
}
],
"name": "X",
"type": "FLOAT"
},
{
"format": {
"decimals": 12,
"length": 16
},
"id": "Y",
"index": 4,
"label": "Projected Latitude: Albers",
"length": 8,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/Y",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/Y"
}
],
"name": "Y",
"type": "FLOAT"
},
{
"id": "LONG",
"index": 5,
"label": "Unprojected degrees longitude (East)",
"length": 8,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/LONG",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/LONG"
}
],
"name": "LONG",
"type": "FLOAT"
},
{
"id": "LAT",
"index": 6,
"label": "Unprojected degrees latitude",
"length": 8,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/LAT",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/LAT"
}
],
"name": "LAT",
"type": "FLOAT"
},
{
"id": "RESOLUTION",
"index": 7,
"label": "Map detail level based on output resolution",
"length": 5,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/RESOLUTION",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/RESOLUTION"
}
],
"name": "RESOLUTION",
"type": "FLOAT"
},
{
"id": "DENSITY",
"index": 8,
"label": "Reduce density values",
"length": 5,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/DENSITY",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/DENSITY"
}
],
"name": "DENSITY",
"type": "FLOAT"
},
{
"id": "LAKE",
"index": 9,
"label": "Lake Flag:1-water:2-citytype",
"length": 5,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/LAKE",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/LAKE"
}
],
"name": "LAKE",
"type": "FLOAT"
}
],
"limit": 10,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/?start=0&limit=10",
"itemType": "application/vnd.sas.compute.data.table.column",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/?start=0&limit=10"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/",
"itemType": "application/vnd.sas.compute.data.table.column",
"method": "GET",
"rel": "collection",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/"
}
],
"name": "Table Columns",
"start": 0,
"version": 2
}
{
"accept": "application/vnd.sas.compute.data.table.column",
"count": 10,
"items": [
{
"id": "ID",
"index": 0,
"label": "Districts code",
"length": 15,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/ID",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/ID"
}
],
"name": "ID",
"type": "CHAR"
},
{
"id": "ID1",
"index": 1,
"label": "Provinces code",
"length": 15,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/ID1",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/ID1"
}
],
"name": "ID1",
"type": "CHAR"
},
{
"id": "SEGMENT",
"index": 2,
"label": "ID segment number",
"length": 5,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/SEGMENT",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/SEGMENT"
}
],
"name": "SEGMENT",
"type": "FLOAT"
},
{
"format": {
"decimals": 12,
"length": 16
},
"id": "X",
"index": 3,
"label": "Projected Longitude: Albers",
"length": 8,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/X",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/X"
}
],
"name": "X",
"type": "FLOAT"
},
{
"format": {
"decimals": 12,
"length": 16
},
"id": "Y",
"index": 4,
"label": "Projected Latitude: Albers",
"length": 8,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/Y",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/Y"
}
],
"name": "Y",
"type": "FLOAT"
},
{
"id": "LONG",
"index": 5,
"label": "Unprojected degrees longitude (East)",
"length": 8,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/LONG",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/LONG"
}
],
"name": "LONG",
"type": "FLOAT"
},
{
"id": "LAT",
"index": 6,
"label": "Unprojected degrees latitude",
"length": 8,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/LAT",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/LAT"
}
],
"name": "LAT",
"type": "FLOAT"
},
{
"id": "RESOLUTION",
"index": 7,
"label": "Map detail level based on output resolution",
"length": 5,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/RESOLUTION",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/RESOLUTION"
}
],
"name": "RESOLUTION",
"type": "FLOAT"
},
{
"id": "DENSITY",
"index": 8,
"label": "Reduce density values",
"length": 5,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/DENSITY",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/DENSITY"
}
],
"name": "DENSITY",
"type": "FLOAT"
},
{
"id": "LAKE",
"index": 9,
"label": "Lake Flag:1-water:2-citytype",
"length": 5,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/LAKE",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/LAKE"
}
],
"name": "LAKE",
"type": "FLOAT"
}
],
"limit": 10,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/?start=0&limit=10",
"itemType": "application/vnd.sas.compute.data.table.column",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/?start=0&limit=10"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/",
"itemType": "application/vnd.sas.compute.data.table.column",
"method": "GET",
"rel": "collection",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/"
}
],
"name": "Table Columns",
"start": 0,
"version": 2
}
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | columnCollection |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No resource exists at the requested path. | Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Get a column
Code samples
# You can also use wget
curl -X GET https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/columns/{columnName} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.compute.data.table.column+json'
const headers = {
'Accept':'application/vnd.sas.compute.data.table.column+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/columns/{columnName}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.compute.data.table.column+json'
}
r = requests.get('https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/columns/{columnName}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.compute.data.table.column+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/columns/{columnName}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /sessions/{sessionId}/data/{libref}/{tableName}/columns/{columnName}
Gets a specific column from a data set.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
libref | path | string | true | Specifies the libref for the request. |
tableName | path | string | true | Specifies the table or data set to query. |
columnName | path | string | true | Specifies the name of the column to retrieve. |
Example responses
200 Response
{
"byteLength": 128,
"charLength": 32,
"id": "ID",
"index": 1,
"label": "Districts code",
"length": 128,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/ID",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/ID"
}
],
"name": "ID",
"type": "VARCHAR",
"version": 2
}
{
"byteLength": 128,
"charLength": 32,
"id": "ID",
"index": 1,
"label": "Districts code",
"length": 128,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/ID",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/ID"
}
],
"name": "ID",
"type": "VARCHAR",
"version": 2
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | column |
404 | Not Found | No resource exists at the requested path. | Inline |
Response Schema
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | Specifies a tag that identifies the revision of this object. |
Check for a column in a table
Code samples
# You can also use wget
curl -X HEAD https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/columns/{columnName}
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/columns/{columnName}',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/columns/{columnName}')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/columns/{columnName}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /sessions/{sessionId}/data/{libref}/{tableName}/columns/{columnName}
Determines whether a specified data set has access to a column.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
libref | path | string(object-id) | true | Specifies the libref for the request. |
tableName | path | string | true | Specifies the table or data set to query. |
columnName | path | string | true | Specifies the column name to check. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
404 | Not Found | No session exists at the requested path. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | Specifies a tag that identifies the revision of this object. |
Update column information
Code samples
# You can also use wget
curl -X PUT https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/columns/{columnName} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.compute.data.table.column+json' \
-H 'Accept: application/vnd.sas.compute.data.table.column+json' \
-H 'If-Match: string'
const inputBody = '{
"byteLength": 128,
"charLength": 32,
"id": "ID",
"index": 1,
"label": "Districts code",
"length": 128,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/ID",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/ID"
}
],
"name": "ID",
"type": "VARCHAR",
"version": 2
}';
const headers = {
'Content-Type':'application/vnd.sas.compute.data.table.column+json',
'Accept':'application/vnd.sas.compute.data.table.column+json',
'If-Match':'string'
};
fetch('https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/columns/{columnName}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.compute.data.table.column+json',
'Accept': 'application/vnd.sas.compute.data.table.column+json',
'If-Match': 'string'
}
r = requests.put('https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/columns/{columnName}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.compute.data.table.column+json"},
"Accept": []string{"application/vnd.sas.compute.data.table.column+json"},
"If-Match": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/columns/{columnName}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /sessions/{sessionId}/data/{libref}/{tableName}/columns/{columnName}
Updates the name, label, format, or informat information for a specified column.
Body parameter
{
"byteLength": 128,
"charLength": 32,
"id": "ID",
"index": 1,
"label": "Districts code",
"length": 128,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/ID",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/ID"
}
],
"name": "ID",
"type": "VARCHAR",
"version": 2
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
libref | path | string(object-id) | true | Specifies the libref for the request. |
tableName | path | string(object-id) | true | Specifies the table that contains the column to update. |
columnName | path | string | true | Specifies the column name to update. |
If-Match | header | string | true | Specifies the ETag of the column that you are updating. |
body | body | column | true | Specifies the information to update for the column. |
Example responses
200 Response
{
"byteLength": 128,
"charLength": 32,
"id": "ID",
"index": 1,
"label": "Districts code",
"length": 128,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/ID",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/ID"
}
],
"name": "ID",
"type": "VARCHAR",
"version": 2
}
{
"byteLength": 128,
"charLength": 32,
"id": "ID",
"index": 1,
"label": "Districts code",
"length": 128,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/ID",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/ID"
}
],
"name": "ID",
"type": "VARCHAR",
"version": 2
}
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
412 Response
{
"summary": "Precondition failed error response",
"description": "This is an example of an error response for a conditional request with an invalid precondition.",
"value": {
"version": 2,
"httpStatusCode": 412,
"message": "Precondition Failed",
"details": [
"A precondition for a conditional request has failed."
]
}
}
{
"summary": "Precondition failed error response",
"description": "This is an example of an error response for a conditional request with an invalid precondition.",
"value": {
"version": 2,
"httpStatusCode": 412,
"message": "Precondition Failed",
"details": [
"A precondition for a conditional request has failed."
]
}
}
428 Response
{
"summary": "Precondition required error response",
"description": "This is an example of an error response for a conditional request with a missing precondition.",
"value": {
"version": 2,
"httpStatusCode": 428,
"message": "Precondition Required",
"details": [
"The server refused to accept the request because a precondition is missing."
]
}
}
{
"summary": "Precondition required error response",
"description": "This is an example of an error response for a conditional request with a missing precondition.",
"value": {
"version": 2,
"httpStatusCode": 428,
"message": "Precondition Required",
"details": [
"The server refused to accept the request because a precondition is missing."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | column |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No resource exists at the requested path. | Inline |
412 | Precondition Failed | The If-Match request header did not match the resource's entity tag, or the If-Unmodified-Since request header did not match the resources last modified timestamp. |
Inline |
428 | Precondition Required | The request headers did not include an If-Match or If-Unmodified-Since precondition. |
Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 412
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 428
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Etag | string | Specifies a tag that identifies the revision of this object. |
Get row information
Code samples
# You can also use wget
curl -X GET https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/rows \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/rows',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.get('https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/rows', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.collection+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/rows", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /sessions/{sessionId}/data/{libref}/{tableName}/rows
Returns the rows for a specified data set. By default, a collection is returned, and standard paging options are available.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
libref | path | string(object-id) | true | Specifies the libref for the request. |
tableName | path | string(object-id) | true | Specifies the table or data set to query. |
start | query | integer | false | Specifies the offset of the first row to return. |
limit | query | integer | false | Specifies the maximum number of rows to return. |
format | query | boolean | false | Specifies whether to format the data in the cells. |
includeIndex | query | boolean | false | Specifies whether the first value in the cell is the index of the requested row. Support for this parameter was added in version 2. |
where | query | string | false | Specifies that a standard SAS WHERE clause was used to return the rows for this request. |
includeColumnNames | query | boolean | false | Specifies whether the first row that is returned consists of column names. |
formatMissingValues | query | boolean | false | If set to true, SAS missing values found in the data will be formatted based on the setting of the SAS Option MISSING. Otherwise, a NULL value will be returned. |
Example responses
200 Response
{
"accept": "application/vnd.sas.compute.data.table.row",
"count": 49858,
"items": [
{
"cells": [
"AF-0101 ",
"AF-01 ",
1,
" 0.020917256889",
" 0.011839722373",
69.136845,
34.603907,
1,
4,
0
]
},
{
"cells": [
"AF-0101 ",
"AF-01 ",
1,
" 0.021222359985",
" 0.011868170604",
69.158125,
34.605286,
0,
0,
0
]
},
{
"cells": [
"AF-0101 ",
"AF-01 ",
1,
" 0.021485525757",
" 0.011762109322",
69.176348,
34.598996,
1,
5,
0
]
}
],
"limit": 3,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows?start=0&limit=3",
"itemType": "application/vnd.sas.compute.data.table.row",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows?start=0&limit=3"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows",
"itemType": "application/vnd.sas.compute.data.table.row",
"method": "GET",
"rel": "collection",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows?start=3&limit=3",
"itemType": "application/vnd.sas.compute.data.table.row",
"method": "GET",
"rel": "next",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows?start=3&limit=3"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows?start=49855&limit=3",
"itemType": "application/vnd.sas.compute.data.table.row",
"method": "GET",
"rel": "last",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows?start=49855&limit=3"
}
],
"name": "Table Rows",
"start": 0,
"version": 2
}
{
"accept": "application/vnd.sas.compute.data.table.row",
"count": 49858,
"items": [
{
"cells": [
"AF-0101 ",
"AF-01 ",
1,
" 0.020917256889",
" 0.011839722373",
69.136845,
34.603907,
1,
4,
0
]
},
{
"cells": [
"AF-0101 ",
"AF-01 ",
1,
" 0.021222359985",
" 0.011868170604",
69.158125,
34.605286,
0,
0,
0
]
},
{
"cells": [
"AF-0101 ",
"AF-01 ",
1,
" 0.021485525757",
" 0.011762109322",
69.176348,
34.598996,
1,
5,
0
]
}
],
"limit": 3,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows?start=0&limit=3",
"itemType": "application/vnd.sas.compute.data.table.row",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows?start=0&limit=3"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows",
"itemType": "application/vnd.sas.compute.data.table.row",
"method": "GET",
"rel": "collection",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows?start=3&limit=3",
"itemType": "application/vnd.sas.compute.data.table.row",
"method": "GET",
"rel": "next",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows?start=3&limit=3"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows?start=49855&limit=3",
"itemType": "application/vnd.sas.compute.data.table.row",
"method": "GET",
"rel": "last",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows?start=49855&limit=3"
}
],
"name": "Table Rows",
"start": 0,
"version": 2
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | rowCollection |
404 | Not Found | No resource exists at the requested path. | Inline |
Response Schema
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Check row availability
Code samples
# You can also use wget
curl -X HEAD https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/rows
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/rows',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/rows')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/rows", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /sessions/{sessionId}/data/{libref}/{tableName}/rows
Determines whether a data set has access to a specific row.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
libref | path | string(object-id) | true | Specifies the libref for the request. |
tableName | path | string(object-id) | true | Specifies the table or data set to query. |
start | query | integer | false | Specifies the offset of the first row to return. |
limit | query | integer | false | Specifies the maximum number of rows to return. |
format | query | boolean | false | Specifies whether to format the data in the cells. |
includeIndex | query | boolean | false | Specifies whether the first value in the cell is the index of the requested row. Support for this parameter was added in version 2. |
where | query | string | false | Specifies that a standard SAS WHERE clause was used to return the rows for this request. |
includeColumnNames | query | boolean | false | Specifies whether the first row that is returned consists of column names. |
formatMissingValues | query | boolean | false | If set to true, SAS missing values found in the data will be formatted based on the setting of the SAS Option MISSING. Otherwise, a NULL value will be returned. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
404 | Not Found | No resource exists at the requested path. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Obtain rows from a data set
Code samples
# You can also use wget
curl -X POST https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/rows \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.compute.data.table.rows.request+json' \
-H 'Accept: application/vnd.sas.collection+json'
const inputBody = '{
"where": "name='Fred'",
"fileProtection": {
"read": "cmVhZFBX",
"alter": "YWx0ZXJQVw==",
"write": "d3JpdGVQVw=="
},
"fileProtectionEncoding": "base64",
"columnFormatting": [
[
{
"name": "Sex"
},
{
"format": "$GENDER6."
}
]
],
"x-widdershins-oldRef": "#/components/schemas/rowsRequest/example"
}';
const headers = {
'Content-Type':'application/vnd.sas.compute.data.table.rows.request+json',
'Accept':'application/vnd.sas.collection+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/rows',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.compute.data.table.rows.request+json',
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.post('https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/rows', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.compute.data.table.rows.request+json"},
"Accept": []string{"application/vnd.sas.collection+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/rows", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /sessions/{sessionId}/data/{libref}/{tableName}/rows
Returns the rows for a specified data set based on the submitted request body. By default, a collection is returned, and standard paging options are available.
Body parameter
{
"where": "name='Fred'",
"fileProtection": {
"read": "cmVhZFBX",
"alter": "YWx0ZXJQVw==",
"write": "d3JpdGVQVw=="
},
"fileProtectionEncoding": "base64",
"columnFormatting": [
[
{
"name": "Sex"
},
{
"format": "$GENDER6."
}
]
],
"x-widdershins-oldRef": "#/components/schemas/rowsRequest/example"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
libref | path | string(object-id) | true | Specifies the libref for the request. |
tableName | path | string(object-id) | true | Specifies the table or data set to query. |
start | query | integer | false | Specifies the offset of the first row to return. |
limit | query | integer | false | Specifies the maximum number of rows to return. |
format | query | boolean | false | Specifies whether to format the data in the cells. |
includeIndex | query | boolean | false | Specifies whether the first value in the cell is the index of a specific row. Support for this parameter was added in version 2. |
formatMissingValues | query | boolean | false | If set to true, SAS missing values found in the data will be formatted based on the setting of the SAS Option MISSING. Otherwise, a NULL value will be returned. |
body | body | rowsRequest | true | Specifies a row-generation request. |
Example responses
200 Response
{
"accept": "application/vnd.sas.compute.data.table.row",
"count": 49858,
"items": [
{
"cells": [
"AF-0101 ",
"AF-01 ",
1,
" 0.020917256889",
" 0.011839722373",
69.136845,
34.603907,
1,
4,
0
]
},
{
"cells": [
"AF-0101 ",
"AF-01 ",
1,
" 0.021222359985",
" 0.011868170604",
69.158125,
34.605286,
0,
0,
0
]
},
{
"cells": [
"AF-0101 ",
"AF-01 ",
1,
" 0.021485525757",
" 0.011762109322",
69.176348,
34.598996,
1,
5,
0
]
}
],
"limit": 3,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows?start=0&limit=3",
"itemType": "application/vnd.sas.compute.data.table.row",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows?start=0&limit=3"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows",
"itemType": "application/vnd.sas.compute.data.table.row",
"method": "GET",
"rel": "collection",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows?start=3&limit=3",
"itemType": "application/vnd.sas.compute.data.table.row",
"method": "GET",
"rel": "next",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows?start=3&limit=3"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows?start=49855&limit=3",
"itemType": "application/vnd.sas.compute.data.table.row",
"method": "GET",
"rel": "last",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows?start=49855&limit=3"
}
],
"name": "Table Rows",
"start": 0,
"version": 2
}
{
"accept": "application/vnd.sas.compute.data.table.row",
"count": 49858,
"items": [
{
"cells": [
"AF-0101 ",
"AF-01 ",
1,
" 0.020917256889",
" 0.011839722373",
69.136845,
34.603907,
1,
4,
0
]
},
{
"cells": [
"AF-0101 ",
"AF-01 ",
1,
" 0.021222359985",
" 0.011868170604",
69.158125,
34.605286,
0,
0,
0
]
},
{
"cells": [
"AF-0101 ",
"AF-01 ",
1,
" 0.021485525757",
" 0.011762109322",
69.176348,
34.598996,
1,
5,
0
]
}
],
"limit": 3,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows?start=0&limit=3",
"itemType": "application/vnd.sas.compute.data.table.row",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows?start=0&limit=3"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows",
"itemType": "application/vnd.sas.compute.data.table.row",
"method": "GET",
"rel": "collection",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows?start=3&limit=3",
"itemType": "application/vnd.sas.compute.data.table.row",
"method": "GET",
"rel": "next",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows?start=3&limit=3"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows?start=49855&limit=3",
"itemType": "application/vnd.sas.compute.data.table.row",
"method": "GET",
"rel": "last",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows?start=49855&limit=3"
}
],
"name": "Table Rows",
"start": 0,
"version": 2
}
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | rowCollection |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No resource exists at the requested path. | Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Get row information as comma-separated values
Code samples
# You can also use wget
curl -X GET https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/rows#CSV \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: text/csv'
const headers = {
'Accept':'text/csv'
};
fetch('https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/rows#CSV',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'text/csv'
}
r = requests.get('https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/rows#CSV', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"text/csv"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/rows#CSV", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /sessions/{sessionId}/data/{libref}/{tableName}/rows#CSV
Returns rows in CSV format for a specified data set.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
libref | path | string(object-id) | true | Specifies the libref for the request. |
tableName | path | string(object-id) | true | Specifies the table or data set to query. |
start | query | integer | false | Specifies the offset of the first row to return. |
limit | query | integer | false | (Optional) Specifies the maximum number of rows to return. If not set, all rows are returned. |
format | query | boolean | false | Specifies whether to format the data in the cells. |
includeIndex | query | boolean | false | Specifies whether the first value in the cell is the index of the requested row. Support for this parameter was added in version 2. |
where | query | string | false | Specifies that a standard SAS WHERE clause has been used to return the rows for this request. |
includeColumnNames | query | boolean | false | Specifies whether the first row that is returned consists of column names. |
columnSeparator | query | string | false | Specifies the character to use as the column separator. If no character is specified, a comma is used as the separator. |
rowSeparator | query | string | false | Specifies the characters to use as the row separator. If no characters are specified, a line feed character ( |
enableQuoting | query | boolean | false | Specifies whether values that contain special characters are quoted. |
enableEscaping | query | boolean | false | Specifies whether special characters in values are escaped if the value is not quoted. |
formatMissingValues | query | boolean | false | If set to true, SAS missing values found in the data will be formatted based on the setting of the SAS Option MISSING. Otherwise, a NULL value will be returned. |
Detailed descriptions
rowSeparator: Specifies the characters to use as the row separator. If no characters are specified, a line feed character ( ) is used.
Example responses
The request succeeded.
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
404 | Not Found | No resource exists at the requested path. | None |
Response Schema
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | text/csv |
Get headers for rows represented as comma-separated values
Code samples
# You can also use wget
curl -X HEAD https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/rows#CSV
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/rows#CSV',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/rows#CSV')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/rows#CSV", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /sessions/{sessionId}/data/{libref}/{tableName}/rows#CSV
Returns the headers for rows in CSV format for a specified data set.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
libref | path | string(object-id) | true | Specifies the libref for the request. |
tableName | path | string(object-id) | true | Specifies the table or data set to query. |
start | query | integer | false | Specifies the offset of the first row to return. |
limit | query | integer | false | (Optional) Specifies the maximum number of rows to return. If not set, all rows are returned. |
format | query | boolean | false | Specifies whether to format the data in the cells. |
includeIndex | query | boolean | false | Specifies whether the first value in the cell is the index of the requested row. Support for this parameter was added in version 2. |
where | query | string | false | Specifies that a standard SAS WHERE clause was used to return the rows for this request. |
includeColumnNames | query | boolean | false | Specifies whether the first row that is returned consists of column names. |
columnSeparator | query | string | false | Specifies the character to use as the column separator. If no character is specified, a comma is used as the separator. |
rowSeparator | query | string | false | Specifies the characters to use as the row separator. If no characters are specified, a line feed character ( |
enableQuoting | query | boolean | false | Specifies whether values that contain special characters are quoted. |
enableEscaping | query | boolean | false | Specifies whether special characters in values are escaped if the values are not quoted. |
formatMissingValues | query | boolean | false | If set to true, SAS missing values found in the data will be formatted based on the setting of the SAS Option MISSING. Otherwise, a NULL value will be returned. |
Detailed descriptions
rowSeparator: Specifies the characters to use as the row separator. If no characters are specified, a line feed character ( ) is used.
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
404 | Not Found | No resource exists at the requested path. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | text/csv |
Get a row set from a data set
Code samples
# You can also use wget
curl -X POST https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/rowSet \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.compute.data.table.row.set.request+json' \
-H 'Accept: application/vnd.sas.compute.data.table.row.set+json'
const inputBody = '{
"where": "name='Fred'",
"fileProtection": {
"read": "cmVhZFBX",
"alter": "YWx0ZXJQVw",
"write": "d3JpdGVQVw"
},
"fileProtectionEncoding": "base64",
"columnDetail": "names",
"includeColumns": [
"name",
"sex"
],
"columnNaturalOrder": false,
"sortBy": [
{
"key": "name",
"direction": "ascending"
}
],
"columnFormatting": [
[
{
"name": "sex"
},
{
"format": "$GENDER6."
}
]
],
"x-widdershins-oldRef": "#/components/schemas/rowSetRequest/example"
}';
const headers = {
'Content-Type':'application/vnd.sas.compute.data.table.row.set.request+json',
'Accept':'application/vnd.sas.compute.data.table.row.set+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/rowSet',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.compute.data.table.row.set.request+json',
'Accept': 'application/vnd.sas.compute.data.table.row.set+json'
}
r = requests.post('https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/rowSet', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.compute.data.table.row.set.request+json"},
"Accept": []string{"application/vnd.sas.compute.data.table.row.set+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/rowSet", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /sessions/{sessionId}/data/{libref}/{tableName}/rowSet
Returns a row set that is based on the specified request body.
Body parameter
{
"where": "name='Fred'",
"fileProtection": {
"read": "cmVhZFBX",
"alter": "YWx0ZXJQVw",
"write": "d3JpdGVQVw"
},
"fileProtectionEncoding": "base64",
"columnDetail": "names",
"includeColumns": [
"name",
"sex"
],
"columnNaturalOrder": false,
"sortBy": [
{
"key": "name",
"direction": "ascending"
}
],
"columnFormatting": [
[
{
"name": "sex"
},
{
"format": "$GENDER6."
}
]
],
"x-widdershins-oldRef": "#/components/schemas/rowSetRequest/example"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
libref | path | string(object-id) | true | Specifies the libref for the request. |
tableName | path | string(object-id) | true | Specifies the table or data set to query. |
format | query | boolean | false | Specifies whether to format the data in the cells. |
start | query | integer | false | Specifies the offset of the first row to return. |
limit | query | integer | false | Specifies the maximum number of rows to return. |
formatMissingValues | query | boolean | false | If set to true, SAS missing values found in the data will be formatted based on the setting of the SAS Option MISSING. Otherwise, a NULL value will be returned. |
body | body | rowSetRequest | true | Specifies a row set creation request. |
Example responses
200 Response
{
"columnDetail": "names",
"columns": [
"Make",
"Model",
"Type",
"Origin",
"DriveTrain",
"MSRP",
"Invoice",
"EngineSize",
"Cylinders",
"Horsepower",
"MPG_City",
"MPG_Highway",
"Weight",
"Wheelbase",
"Length"
],
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MYCA/MYCARS/rowSet",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.row.set",
"uri": "/compute/sessions/RKEY-ses0000/data/MYCA/MYCARS/rowSet"
}
],
"rows": [
[
"Toyota ",
" Corolla CE 4dr ",
"Sedan ",
"Asia ",
"Front",
" $14,085",
" $13,065",
1.8,
4,
130,
32,
40,
2502,
102,
178
],
[
"Toyota ",
" Corolla S 4dr ",
"Sedan ",
"Asia ",
"Front",
" $15,030",
" $13,650",
1.8,
4,
130,
32,
40,
2524,
102,
178
],
[
"Toyota ",
" Corolla LE 4dr ",
"Sedan ",
"Asia ",
"Front",
" $15,295",
" $13,889",
1.8,
4,
130,
32,
40,
2524,
102,
178
],
[
"Toyota ",
" Echo 2dr manual ",
"Sedan ",
"Asia ",
"Front",
" $10,760",
" $10,144",
1.5,
4,
108,
35,
43,
2035,
93,
163
],
[
"Toyota ",
" Echo 2dr auto ",
"Sedan ",
"Asia ",
"Front",
" $11,560",
" $10,896",
1.5,
4,
108,
33,
39,
2085,
93,
163
],
[
"Toyota ",
" Echo 4dr ",
"Sedan ",
"Asia ",
"Front",
" $11,290",
" $10,642",
1.5,
4,
108,
35,
43,
2055,
93,
163
],
[
"Toyota ",
" Camry LE 4dr ",
"Sedan ",
"Asia ",
"Front",
" $19,560",
" $17,558",
2.4,
4,
157,
24,
33,
3086,
107,
189
],
[
"Toyota ",
" Camry LE V6 4dr ",
"Sedan ",
"Asia ",
"Front",
" $22,775",
" $20,325",
3,
6,
210,
21,
29,
3296,
107,
189
],
[
"Toyota ",
" Camry Solara SE 2dr ",
"Sedan ",
"Asia ",
"Front",
" $19,635",
" $17,722",
2.4,
4,
157,
24,
33,
3175,
107,
193
],
[
"Toyota ",
" Camry Solara SE V6 2dr ",
"Sedan ",
"Asia ",
"Front",
" $21,965",
" $19,819",
3.3,
6,
225,
20,
29,
3417,
107,
193
],
[
"Toyota ",
" Avalon XL 4dr ",
"Sedan ",
"Asia ",
"Front",
" $26,560",
" $23,693",
3,
6,
210,
21,
29,
3417,
107,
192
],
[
"Toyota ",
" Camry XLE V6 4dr ",
"Sedan ",
"Asia ",
"Front",
" $25,920",
" $23,125",
3,
6,
210,
21,
29,
3362,
107,
189
],
[
"Toyota ",
" Camry Solara SLE V6 2dr ",
"Sedan ",
"Asia ",
"Front",
" $26,510",
" $23,908",
3.3,
6,
225,
20,
29,
3439,
107,
193
],
[
"Toyota ",
" Avalon XLS 4dr ",
"Sedan ",
"Asia ",
"Front",
" $30,920",
" $27,271",
3,
6,
210,
21,
29,
3439,
107,
192
],
[
"Toyota ",
" Sienna CE ",
"Sedan ",
"Asia ",
"Front",
" $23,495",
" $21,198",
3.3,
6,
230,
19,
27,
4120,
119,
200
],
[
"Toyota ",
" Sienna XLE Limited ",
"Sedan ",
"Asia ",
"Front",
" $28,800",
" $25,690",
3.3,
6,
230,
19,
27,
4165,
119,
200
]
],
"start": 1,
"version": 1
}
{
"columnDetail": "names",
"columns": [
"Make",
"Model",
"Type",
"Origin",
"DriveTrain",
"MSRP",
"Invoice",
"EngineSize",
"Cylinders",
"Horsepower",
"MPG_City",
"MPG_Highway",
"Weight",
"Wheelbase",
"Length"
],
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MYCA/MYCARS/rowSet",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.row.set",
"uri": "/compute/sessions/RKEY-ses0000/data/MYCA/MYCARS/rowSet"
}
],
"rows": [
[
"Toyota ",
" Corolla CE 4dr ",
"Sedan ",
"Asia ",
"Front",
" $14,085",
" $13,065",
1.8,
4,
130,
32,
40,
2502,
102,
178
],
[
"Toyota ",
" Corolla S 4dr ",
"Sedan ",
"Asia ",
"Front",
" $15,030",
" $13,650",
1.8,
4,
130,
32,
40,
2524,
102,
178
],
[
"Toyota ",
" Corolla LE 4dr ",
"Sedan ",
"Asia ",
"Front",
" $15,295",
" $13,889",
1.8,
4,
130,
32,
40,
2524,
102,
178
],
[
"Toyota ",
" Echo 2dr manual ",
"Sedan ",
"Asia ",
"Front",
" $10,760",
" $10,144",
1.5,
4,
108,
35,
43,
2035,
93,
163
],
[
"Toyota ",
" Echo 2dr auto ",
"Sedan ",
"Asia ",
"Front",
" $11,560",
" $10,896",
1.5,
4,
108,
33,
39,
2085,
93,
163
],
[
"Toyota ",
" Echo 4dr ",
"Sedan ",
"Asia ",
"Front",
" $11,290",
" $10,642",
1.5,
4,
108,
35,
43,
2055,
93,
163
],
[
"Toyota ",
" Camry LE 4dr ",
"Sedan ",
"Asia ",
"Front",
" $19,560",
" $17,558",
2.4,
4,
157,
24,
33,
3086,
107,
189
],
[
"Toyota ",
" Camry LE V6 4dr ",
"Sedan ",
"Asia ",
"Front",
" $22,775",
" $20,325",
3,
6,
210,
21,
29,
3296,
107,
189
],
[
"Toyota ",
" Camry Solara SE 2dr ",
"Sedan ",
"Asia ",
"Front",
" $19,635",
" $17,722",
2.4,
4,
157,
24,
33,
3175,
107,
193
],
[
"Toyota ",
" Camry Solara SE V6 2dr ",
"Sedan ",
"Asia ",
"Front",
" $21,965",
" $19,819",
3.3,
6,
225,
20,
29,
3417,
107,
193
],
[
"Toyota ",
" Avalon XL 4dr ",
"Sedan ",
"Asia ",
"Front",
" $26,560",
" $23,693",
3,
6,
210,
21,
29,
3417,
107,
192
],
[
"Toyota ",
" Camry XLE V6 4dr ",
"Sedan ",
"Asia ",
"Front",
" $25,920",
" $23,125",
3,
6,
210,
21,
29,
3362,
107,
189
],
[
"Toyota ",
" Camry Solara SLE V6 2dr ",
"Sedan ",
"Asia ",
"Front",
" $26,510",
" $23,908",
3.3,
6,
225,
20,
29,
3439,
107,
193
],
[
"Toyota ",
" Avalon XLS 4dr ",
"Sedan ",
"Asia ",
"Front",
" $30,920",
" $27,271",
3,
6,
210,
21,
29,
3439,
107,
192
],
[
"Toyota ",
" Sienna CE ",
"Sedan ",
"Asia ",
"Front",
" $23,495",
" $21,198",
3.3,
6,
230,
19,
27,
4120,
119,
200
],
[
"Toyota ",
" Sienna XLE Limited ",
"Sedan ",
"Asia ",
"Front",
" $28,800",
" $25,690",
3.3,
6,
230,
19,
27,
4165,
119,
200
]
],
"start": 1,
"version": 1
}
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | rowSet |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No resource exists at the requested path. | Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Check row set availability
Code samples
# You can also use wget
curl -X HEAD https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/rowSet
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/rowSet',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/rowSet')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/rowSet", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /sessions/{sessionId}/data/{libref}/{tableName}/rowSet
Determines whether a row set is available on for a data set.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session |
libref | path | string(object-id) | true | Specifies the libref for the request. |
tableName | path | string(object-id) | true | Specifies the table or data set to query. |
where | query | string | false | Specifies that a standard SAS WHERE clause was used to build the row set for this request. |
format | query | boolean | false | Specifies whether to format the data in the cells. |
columnDetail | query | string | false | Specifies the level of column information to return. |
includeColumns | query | string | false | Specifies a comma separated list of columns to include in the row set. If you do not specify a list, all columns are returned. The order of the column names in the list is the order in which the cells of the row set are in as well. |
columnNaturalOrder | query | boolean | false | When includeColumns is specified, a value of true for columnNaturalOrder specifies that the cells of the row set are returned in the order in which they occur in the data set instead of in the order that is specified by includeColumns. |
start | query | integer | false | Specifies the offset of the first row to return. The default value is "0". |
limit | query | integer | false | Specifies the maximum number of rows to return. The default value is "10". |
sortBy | query | string(sort-criteria) | false | Sets the sort order for the returned row set. |
formatMissingValues | query | boolean | false | If set to true, SAS missing values found in the data will be formatted based on the setting of the SAS Option MISSING. Otherwise, a NULL value will be returned. |
Enumerated Values
Parameter | Value |
---|---|
columnDetail | names |
columnDetail | detail |
columnDetail | summary |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
404 | Not Found | No resource exists at the requested path. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Get prompt content from a data set
Code samples
# You can also use wget
curl -X POST https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/promptContent \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.compute.data.table.prompt.content.request+json' \
-H 'Accept: application/vnd.sas.compute.data.table.prompt.content+json'
const inputBody = '{
"where": "name='Fred'",
"fileProtection": {
"read": "cmVhZFBX",
"alter": "YWx0ZXJQVw",
"write": "d3JpdGVQVw"
},
"fileProtectionEncoding": "base64",
"columnDetail": "names",
"includeColumns": [
"name",
"sex"
],
"columnNaturalOrder": true,
"sortBy": [
{
"key": "name",
"direction": "ascending"
}
],
"columnFormatting": [
[
{
"name": "sex"
},
{
"format": "$GENDER6."
}
]
],
"x-widdershins-oldRef": "#/components/schemas/promptContentRequest/example"
}';
const headers = {
'Content-Type':'application/vnd.sas.compute.data.table.prompt.content.request+json',
'Accept':'application/vnd.sas.compute.data.table.prompt.content+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/promptContent',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.compute.data.table.prompt.content.request+json',
'Accept': 'application/vnd.sas.compute.data.table.prompt.content+json'
}
r = requests.post('https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/promptContent', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.compute.data.table.prompt.content.request+json"},
"Accept": []string{"application/vnd.sas.compute.data.table.prompt.content+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/promptContent", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /sessions/{sessionId}/data/{libref}/{tableName}/promptContent
Returns content useful for populating prompts more effectively.
Body parameter
{
"where": "name='Fred'",
"fileProtection": {
"read": "cmVhZFBX",
"alter": "YWx0ZXJQVw",
"write": "d3JpdGVQVw"
},
"fileProtectionEncoding": "base64",
"columnDetail": "names",
"includeColumns": [
"name",
"sex"
],
"columnNaturalOrder": true,
"sortBy": [
{
"key": "name",
"direction": "ascending"
}
],
"columnFormatting": [
[
{
"name": "sex"
},
{
"format": "$GENDER6."
}
]
],
"x-widdershins-oldRef": "#/components/schemas/promptContentRequest/example"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
libref | path | string(object-id) | true | Specifies the libref for the request. |
tableName | path | string(object-id) | true | Specifies the table or data set to query. |
start | query | integer | false | Specifies the offset of the first row to return. |
limit | query | integer | false | Specifies the maximum number of rows to return. |
body | body | promptContentRequest | true | Specifies a prompt content creation request. |
Example responses
200 Response
{
"columnDetail": "names",
"columns": [
"Make",
"Model",
"Type",
"Origin",
"DriveTrain",
"MSRP",
"Invoice",
"EngineSize",
"Cylinders",
"Horsepower",
"MPG_City",
"MPG_Highway",
"Weight",
"Wheelbase",
"Length"
],
"links": [
{
"href": "/compute/sessions/{sessionId}/data/SASHELP/CARS/promptContent?_dpt={dptId}&viewId={viewId}",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.prompt.content",
"uri": "/compute/sessions/{sessionId}/data/SASHELP/CARS/promptContent?_dpt={dptId}&viewId={viewId}"
},
{
"href": "/compute/sessions/{sessionId}/data/%24VIEWS/{viewId}",
"method": "DELETE",
"rel": "deleteView",
"uri": "/compute/sessions/{sessionId}/data/%24VIEWS/{viewId}"
},
{
"href": "/compute/sessions/{sessionId}/data/SASHELP/CARS/promptContent?_dpt={dptId}&limit=10&start=10&viewId=TCBE3DBC1_A8DD_D448_777AA73AAF04",
"method": "GET",
"rel": "next",
"type": "application/vnd.sas.compute.data.table.prompt.content",
"uri": "/compute/sessions/{sessionId}/data/SASHELP/CARS/promptContent?_dpt={dptId}&limit=10&start=10&viewId=TCBE3DBC1_A8DD_D448_777AA73AAF04"
}
],
"rows": [
{
"formatted": [
"Volvo",
" C70 HPT convertible 2dr",
"Sedan",
"Europe",
"Front",
" $42,565",
" $40,083",
2.3,
5,
242,
20,
26,
3450,
105,
186
],
"raw": [
"Volvo",
" C70 HPT convertible 2dr",
"Sedan",
"Europe",
"Front",
42565,
40083,
2.3,
5,
242,
20,
26,
3450,
105,
186,
180
]
}
],
"version": 1
}
{
"columnDetail": "names",
"columns": [
"Make",
"Model",
"Type",
"Origin",
"DriveTrain",
"MSRP",
"Invoice",
"EngineSize",
"Cylinders",
"Horsepower",
"MPG_City",
"MPG_Highway",
"Weight",
"Wheelbase",
"Length"
],
"links": [
{
"href": "/compute/sessions/{sessionId}/data/SASHELP/CARS/promptContent?_dpt={dptId}&viewId={viewId}",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.prompt.content",
"uri": "/compute/sessions/{sessionId}/data/SASHELP/CARS/promptContent?_dpt={dptId}&viewId={viewId}"
},
{
"href": "/compute/sessions/{sessionId}/data/%24VIEWS/{viewId}",
"method": "DELETE",
"rel": "deleteView",
"uri": "/compute/sessions/{sessionId}/data/%24VIEWS/{viewId}"
},
{
"href": "/compute/sessions/{sessionId}/data/SASHELP/CARS/promptContent?_dpt={dptId}&limit=10&start=10&viewId=TCBE3DBC1_A8DD_D448_777AA73AAF04",
"method": "GET",
"rel": "next",
"type": "application/vnd.sas.compute.data.table.prompt.content",
"uri": "/compute/sessions/{sessionId}/data/SASHELP/CARS/promptContent?_dpt={dptId}&limit=10&start=10&viewId=TCBE3DBC1_A8DD_D448_777AA73AAF04"
}
],
"rows": [
{
"formatted": [
"Volvo",
" C70 HPT convertible 2dr",
"Sedan",
"Europe",
"Front",
" $42,565",
" $40,083",
2.3,
5,
242,
20,
26,
3450,
105,
186
],
"raw": [
"Volvo",
" C70 HPT convertible 2dr",
"Sedan",
"Europe",
"Front",
42565,
40083,
2.3,
5,
242,
20,
26,
3450,
105,
186,
180
]
}
],
"version": 1
}
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | promptContent |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No resource exists at the requested path. | Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Check prompt content availability
Code samples
# You can also use wget
curl -X HEAD https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/promptContent
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/promptContent',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/promptContent')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/promptContent", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /sessions/{sessionId}/data/{libref}/{tableName}/promptContent
Determines headers for prompt content for a given data set.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session |
libref | path | string(object-id) | true | Specifies the libref for the request. |
tableName | path | string(object-id) | true | Specifies the table or data set to query. |
where | query | string | false | Specifies that a standard SAS WHERE clause was used to build the content for this request. |
columnDetail | query | string | false | Specifies the level of column information to return. |
includeColumns | query | string | false | Specifies a comma separated list of columns to include in the returned content. If you do not specify a list, all columns are returned. The order of the column names in the list is the order in which the cells of the content are in as well. |
columnNaturalOrder | query | boolean | false | When includeColumns is specified, a value of true for columnNaturalOrder specifies that the cells of the returned content are returned in the order in which they occur in the data set instead of in the order that is specified by includeColumns. |
start | query | integer | false | Specifies the offset of the first row to return. The default value is "0". |
limit | query | integer | false | Specifies the maximum number of rows to return. The default value is "10". |
sortBy | query | string(sort-criteria) | false | Sets the sort order for the returned prompt content. |
Enumerated Values
Parameter | Value |
---|---|
columnDetail | names |
columnDetail | detail |
columnDetail | summary |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
404 | Not Found | No resource exists at the requested path. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Create a data set view
Code samples
# You can also use wget
curl -X POST https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/views \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.compute.data.table.view.request+json' \
-H 'Accept: application/vnd.sas.compute.data.table+json'
const inputBody = '{
"where": "name='Fred'",
"fileProtection": {
"read": "cmVhZFBX",
"alter": "YWx0ZXJQVw==",
"write": "d3JpdGVQVw=="
},
"fileProtectionEncoding": "base64",
"includeColumns": [
"name"
],
"columnNaturalOrder": true,
"sortBy": [
{
"key": "name",
"direction": "ascending"
}
],
"distinct": false,
"x-widdershins-oldRef": "#/components/schemas/viewRequest/example"
}';
const headers = {
'Content-Type':'application/vnd.sas.compute.data.table.view.request+json',
'Accept':'application/vnd.sas.compute.data.table+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/views',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.compute.data.table.view.request+json',
'Accept': 'application/vnd.sas.compute.data.table+json'
}
r = requests.post('https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/views', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.compute.data.table.view.request+json"},
"Accept": []string{"application/vnd.sas.compute.data.table+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/compute/sessions/{sessionId}/data/{libref}/{tableName}/views", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /sessions/{sessionId}/data/{libref}/{tableName}/views
Returns a view of the specified data set. The request body that you provide controls the view that is created. You can then access the returned view as a table.
Body parameter
{
"where": "name='Fred'",
"fileProtection": {
"read": "cmVhZFBX",
"alter": "YWx0ZXJQVw==",
"write": "d3JpdGVQVw=="
},
"fileProtectionEncoding": "base64",
"includeColumns": [
"name"
],
"columnNaturalOrder": true,
"sortBy": [
{
"key": "name",
"direction": "ascending"
}
],
"distinct": false,
"x-widdershins-oldRef": "#/components/schemas/viewRequest/example"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
libref | path | string(object-id) | true | Specifies the libref for the request. |
tableName | path | string(object-id) | true | Specifies the table or data set to query. |
body | body | viewRequest | true | Specifies a view creation request. |
Example responses
201 Response
{
"bookmarkLength": 12,
"compressionRoutine": "NO",
"modifiedTimeStamp": "2018-05-04T18:02:27.780Z",
"creationTimeStamp": "2018-05-04T18:02:27.749Z",
"engine": "V9",
"id": "AFGHANISTAN",
"label": "AFGHANISTAN - Source: GfkGeoMarketing - 2012 ",
"libref": "MAPSGFK",
"encoding": "Default",
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN",
"method": "GET",
"rel": "alternate",
"type": "application/vnd.sas.compute.data.table.summary",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows",
"itemType": "application/vnd.sas.compute.data.table.row",
"method": "GET",
"rel": "rows",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows",
"method": "GET",
"rel": "rowsAsCSV",
"type": "text/csv",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rowSet",
"method": "GET",
"rel": "rowSet",
"type": "application/vnd.sas.compute.data.table.row.set",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rowSet"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns",
"itemType": "application/vnd.sas.compute.data.table.column",
"method": "GET",
"rel": "columns",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns"
}
],
"logicalRecordCount": 49858,
"name": "AFGHANISTAN",
"columnCount": 10,
"rowCount": 49858,
"physicalRecordCount": 49858,
"recordLength": 88,
"version": 1
}
{
"bookmarkLength": 12,
"compressionRoutine": "NO",
"modifiedTimeStamp": "2018-05-04T18:02:27.780Z",
"creationTimeStamp": "2018-05-04T18:02:27.749Z",
"engine": "V9",
"id": "AFGHANISTAN",
"label": "AFGHANISTAN - Source: GfkGeoMarketing - 2012 ",
"libref": "MAPSGFK",
"encoding": "Default",
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN",
"method": "GET",
"rel": "alternate",
"type": "application/vnd.sas.compute.data.table.summary",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows",
"itemType": "application/vnd.sas.compute.data.table.row",
"method": "GET",
"rel": "rows",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows",
"method": "GET",
"rel": "rowsAsCSV",
"type": "text/csv",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rowSet",
"method": "GET",
"rel": "rowSet",
"type": "application/vnd.sas.compute.data.table.row.set",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rowSet"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns",
"itemType": "application/vnd.sas.compute.data.table.column",
"method": "GET",
"rel": "columns",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns"
}
],
"logicalRecordCount": 49858,
"name": "AFGHANISTAN",
"columnCount": 10,
"rowCount": 49858,
"physicalRecordCount": 49858,
"recordLength": 88,
"version": 1
}
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | A view was created. | tableInfo |
400 | Bad Request | The request was invalid. The view could not be created. | Inline |
404 | Not Found | No resource exists at the requested path. | Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Location | string | Specifies the URI of the created view. |
Files
Contains the operations to access information for files and filerefs.
List filerefs in a session
Code samples
# You can also use wget
curl -X GET https://example.com/compute/sessions/{sessionId}/filerefs \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json' \
-H 'Accept-Item: application/vnd.sas.compute.fileref+json'
const headers = {
'Accept':'application/vnd.sas.collection+json',
'Accept-Item':'application/vnd.sas.compute.fileref+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/filerefs',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json',
'Accept-Item': 'application/vnd.sas.compute.fileref+json'
}
r = requests.get('https://example.com/compute/sessions/{sessionId}/filerefs', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.collection+json"},
"Accept-Item": []string{"application/vnd.sas.compute.fileref+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/sessions/{sessionId}/filerefs", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /sessions/{sessionId}/filerefs
Returns a list of all the filerefs that are defined for a session.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Item | header | string | true | Specifies the desired fileref representation. The Accept-Item options are:
|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
filter | query | string(filter-criteria) | false | Specifies filter criteria for returned filerefs. |
start | query | integer | false | Specifies the offset of the first fileref to return. |
limit | query | integer | false | Specifies the maximum number of filerefs to return. |
Enumerated Values
Parameter | Value |
---|---|
Accept-Item | application/vnd.sas.compute.fileref+json |
Example responses
200 Response
{
"accept": "application/vnd.sas.compute.fileref.summary",
"count": 1,
"items": [
{
"id": "myref",
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/myref",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.fileref",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/myref"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/myref",
"method": "GET",
"rel": "alternate",
"type": "application/vnd.sas.compute.fileref.summary",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/myref"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/myref",
"method": "DELETE",
"rel": "deassign",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/myref"
}
],
"name": "myref"
}
],
"limit": 10,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/filerefs?start=0&limit=1",
"itemType": "application/vnd.sas.compute.fileref.summary",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/filerefs?start=0&limit=1"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs",
"itemType": "application/vnd.sas.compute.fileref.summary",
"method": "GET",
"rel": "collection",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/filerefs"
}
],
"name": "Current Filerefs",
"start": 0,
"version": 2
}
{
"accept": "application/vnd.sas.compute.fileref.summary",
"count": 1,
"items": [
{
"id": "myref",
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/myref",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.fileref",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/myref"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/myref",
"method": "GET",
"rel": "alternate",
"type": "application/vnd.sas.compute.fileref.summary",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/myref"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/myref",
"method": "DELETE",
"rel": "deassign",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/myref"
}
],
"name": "myref"
}
],
"limit": 10,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/filerefs?start=0&limit=1",
"itemType": "application/vnd.sas.compute.fileref.summary",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/filerefs?start=0&limit=1"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs",
"itemType": "application/vnd.sas.compute.fileref.summary",
"method": "GET",
"rel": "collection",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/filerefs"
}
],
"name": "Current Filerefs",
"start": 0,
"version": 2
}
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | filerefSummaryCollection |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No resource exists at the requested path. | Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Check endpoint availability
Code samples
# You can also use wget
curl -X HEAD https://example.com/compute/sessions/{sessionId}/filerefs
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/compute/sessions/{sessionId}/filerefs',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/compute/sessions/{sessionId}/filerefs')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/compute/sessions/{sessionId}/filerefs", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /sessions/{sessionId}/filerefs
Determines whether the file service is available for a session.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
filter | query | string(filter-criteria) | false | Specifies the filter criteria for returned filerefs. |
start | query | integer | false | Specifies the offset of the first fileref to return. The default value is "0". |
limit | query | integer | false | Specifies the maximum number of filerefs to return. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
404 | Not Found | No file services exist at the requested path. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Assign a fileref
Code samples
# You can also use wget
curl -X POST https://example.com/compute/sessions/{sessionId}/filerefs \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.compute.fileref.request+json' \
-H 'Accept: application/vnd.sas.compute.fileref+json'
const inputBody = '{
"version": 1,
"name": "myfref",
"path": "myfile.txt",
"accessMethod": "DISK",
"options": "encoding='utf8' recfm=D termstr=LF",
"x-widdershins-oldRef": "#/components/schemas/filerefRequest/example"
}';
const headers = {
'Content-Type':'application/vnd.sas.compute.fileref.request+json',
'Accept':'application/vnd.sas.compute.fileref+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/filerefs',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.compute.fileref.request+json',
'Accept': 'application/vnd.sas.compute.fileref+json'
}
r = requests.post('https://example.com/compute/sessions/{sessionId}/filerefs', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.compute.fileref.request+json"},
"Accept": []string{"application/vnd.sas.compute.fileref+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/compute/sessions/{sessionId}/filerefs", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /sessions/{sessionId}/filerefs
Creates or assigns a fileref for a session.
Body parameter
{
"version": 1,
"name": "myfref",
"path": "myfile.txt",
"accessMethod": "DISK",
"options": "encoding='utf8' recfm=D termstr=LF",
"x-widdershins-oldRef": "#/components/schemas/filerefRequest/example"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
parent | query | string | false | To create a fileref to a member of a directory fileref, specify the directory fileref as the parent. |
body | body | filerefRequest | true | Specifies a fileref creation request. |
Example responses
201 Response
{
"accessMethod": "DISK",
"modifiedTimeStamp": "2016-04-27T09:22:16.000Z",
"fileName": "myfile.txt",
"filePath": "/tmp/myfile.txt",
"fileSize": 44,
"id": "myref",
"isDirectory": false,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/myref",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.fileref",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/myref"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/myref",
"method": "GET",
"rel": "alternate",
"type": "application/vnd.sas.compute.fileref.summary",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/myref"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/myref",
"method": "DELETE",
"rel": "deassign",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/myref"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/myref/content",
"method": "GET",
"rel": "content",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/myref/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/myref/content",
"method": "PUT",
"rel": "upload",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/myref/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/myref/content",
"method": "DELETE",
"rel": "delete",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/myref/content"
}
],
"name": "myref",
"version": 2
}
{
"accessMethod": "DISK",
"modifiedTimeStamp": "2016-04-27T09:22:16.000Z",
"fileName": "myfile.txt",
"filePath": "/tmp/myfile.txt",
"fileSize": 44,
"id": "myref",
"isDirectory": false,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/myref",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.fileref",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/myref"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/myref",
"method": "GET",
"rel": "alternate",
"type": "application/vnd.sas.compute.fileref.summary",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/myref"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/myref",
"method": "DELETE",
"rel": "deassign",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/myref"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/myref/content",
"method": "GET",
"rel": "content",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/myref/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/myref/content",
"method": "PUT",
"rel": "upload",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/myref/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/myref/content",
"method": "DELETE",
"rel": "delete",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/myref/content"
}
],
"name": "myref",
"version": 2
}
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
415 Response
{
"summary": "Unsupported media type error response",
"description": "This is an example of an error response for a request with payload of an unsupported type.",
"value": {
"version": 2,
"httpStatusCode": 415,
"message": "Unsupported Media Type",
"details": [
"The server refused to accept the request because the payload format is in an unsupported format."
]
}
}
{
"summary": "Unsupported media type error response",
"description": "This is an example of an error response for a request with payload of an unsupported type.",
"value": {
"version": 2,
"httpStatusCode": 415,
"message": "Unsupported Media Type",
"details": [
"The server refused to accept the request because the payload format is in an unsupported format."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | A fileref was created. | fileref |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No session exists at the requested path. | Inline |
415 | Unsupported Media Type | The requested media type is not supported. | Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 415
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Location | string | Specifies the URI of the created fileref. |
Get fileref information
Code samples
# You can also use wget
curl -X GET https://example.com/compute/sessions/{sessionId}/filerefs/{fileref} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.compute.fileref+json'
const headers = {
'Accept':'application/vnd.sas.compute.fileref+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/filerefs/{fileref}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.compute.fileref+json'
}
r = requests.get('https://example.com/compute/sessions/{sessionId}/filerefs/{fileref}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.compute.fileref+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/sessions/{sessionId}/filerefs/{fileref}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /sessions/{sessionId}/filerefs/{fileref}
Get file information from a fileref in a session.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
fileref | path | string | true | Specifies the fileref name. The name must be eight or fewer characters. |
Example responses
200 Response
{
"accessMethod": "DISK",
"modifiedTimeStamp": "2016-04-27T09:22:16.000Z",
"fileName": "myfile.txt",
"filePath": "/tmp/myfile.txt",
"fileSize": 44,
"id": "myref",
"isDirectory": false,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/myref",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.fileref",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/myref"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/myref",
"method": "GET",
"rel": "alternate",
"type": "application/vnd.sas.compute.fileref.summary",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/myref"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/myref",
"method": "DELETE",
"rel": "deassign",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/myref"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/myref/content",
"method": "GET",
"rel": "content",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/myref/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/myref/content",
"method": "PUT",
"rel": "upload",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/myref/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/myref/content",
"method": "DELETE",
"rel": "delete",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/myref/content"
}
],
"name": "myref",
"version": 2
}
{
"accessMethod": "DISK",
"modifiedTimeStamp": "2016-04-27T09:22:16.000Z",
"fileName": "myfile.txt",
"filePath": "/tmp/myfile.txt",
"fileSize": 44,
"id": "myref",
"isDirectory": false,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/myref",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.fileref",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/myref"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/myref",
"method": "GET",
"rel": "alternate",
"type": "application/vnd.sas.compute.fileref.summary",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/myref"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/myref",
"method": "DELETE",
"rel": "deassign",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/myref"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/myref/content",
"method": "GET",
"rel": "content",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/myref/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/myref/content",
"method": "PUT",
"rel": "upload",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/myref/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/myref/content",
"method": "DELETE",
"rel": "delete",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/myref/content"
}
],
"name": "myref",
"version": 2
}
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | fileref |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No resource exists at the requested path. | Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | Specifies a tag that identifies the revision of this object. |
Check for a fileref
Code samples
# You can also use wget
curl -X HEAD https://example.com/compute/sessions/{sessionId}/filerefs/{fileref}
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/compute/sessions/{sessionId}/filerefs/{fileref}',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/compute/sessions/{sessionId}/filerefs/{fileref}')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/compute/sessions/{sessionId}/filerefs/{fileref}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /sessions/{sessionId}/filerefs/{fileref}
Determines whether the specified fileref exists in a session.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
fileref | path | string | true | Specifies the fileref name. The name must be eight or fewer characters. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
404 | Not Found | No resource exists at the requested path. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | Specifies a tag that identifies the revision of this object. |
Deassign a fileref
Code samples
# You can also use wget
curl -X DELETE https://example.com/compute/sessions/{sessionId}/filerefs/{fileref} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.error+json'
const headers = {
'Accept':'application/vnd.sas.error+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/filerefs/{fileref}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.error+json'
}
r = requests.delete('https://example.com/compute/sessions/{sessionId}/filerefs/{fileref}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.error+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "https://example.com/compute/sessions/{sessionId}/filerefs/{fileref}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /sessions/{sessionId}/filerefs/{fileref}
Deassigns the specified fileref in a session.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
fileref | path | string | true | Specifies the fileref name. The name must be eight or fewer characters. |
Example responses
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | The fileref was deassigned. | None |
404 | Not Found | No resource exists at the requested path. | Inline |
Response Schema
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Get fileref summary information
Code samples
# You can also use wget
curl -X GET https://example.com/compute/sessions/{sessionId}/filerefs/{fileref}#summary \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.compute.fileref.summary+json'
const headers = {
'Accept':'application/vnd.sas.compute.fileref.summary+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/filerefs/{fileref}#summary',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.compute.fileref.summary+json'
}
r = requests.get('https://example.com/compute/sessions/{sessionId}/filerefs/{fileref}#summary', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.compute.fileref.summary+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/sessions/{sessionId}/filerefs/{fileref}#summary", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /sessions/{sessionId}/filerefs/{fileref}#summary
Gets fileref summary information for a fileref in a session.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
fileref | path | string | true | Specifies the fileref name. The name must be eight or fewer characters. |
Example responses
200 Response
{
"accept": "application/vnd.sas.compute.fileref.summary",
"count": 1,
"items": [
{
"id": "myref",
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/myref",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.fileref",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/myref"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/myref",
"method": "GET",
"rel": "alternate",
"type": "application/vnd.sas.compute.fileref.summary",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/myref"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/myref",
"method": "DELETE",
"rel": "deassign",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/myref"
}
],
"name": "myref"
}
],
"limit": 10,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/filerefs?start=0&limit=1",
"itemType": "application/vnd.sas.compute.fileref.summary",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/filerefs?start=0&limit=1"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs",
"itemType": "application/vnd.sas.compute.fileref.summary",
"method": "GET",
"rel": "collection",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/filerefs"
}
],
"name": "Current Filerefs",
"start": 0,
"version": 2
}
{
"accept": "application/vnd.sas.compute.fileref.summary",
"count": 1,
"items": [
{
"id": "myref",
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/myref",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.fileref",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/myref"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/myref",
"method": "GET",
"rel": "alternate",
"type": "application/vnd.sas.compute.fileref.summary",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/myref"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/myref",
"method": "DELETE",
"rel": "deassign",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/myref"
}
],
"name": "myref"
}
],
"limit": 10,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/filerefs?start=0&limit=1",
"itemType": "application/vnd.sas.compute.fileref.summary",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/filerefs?start=0&limit=1"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs",
"itemType": "application/vnd.sas.compute.fileref.summary",
"method": "GET",
"rel": "collection",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/filerefs"
}
],
"name": "Current Filerefs",
"start": 0,
"version": 2
}
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | filerefSummary |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No resource exists at the requested path. | Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | Specifies a tag that identifies the revision of this object. |
Get a directory member
Code samples
# You can also use wget
curl -X GET https://example.com/compute/sessions/{sessionId}/filerefs/{fileref}#directory?member=string \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.compute.fileref.directory.member+json'
const headers = {
'Accept':'application/vnd.sas.compute.fileref.directory.member+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/filerefs/{fileref}#directory?member=string',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.compute.fileref.directory.member+json'
}
r = requests.get('https://example.com/compute/sessions/{sessionId}/filerefs/{fileref}#directory', params={
'member': 'string'
}, headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.compute.fileref.directory.member+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/sessions/{sessionId}/filerefs/{fileref}#directory", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /sessions/{sessionId}/filerefs/{fileref}#directory
Gets information about a member of a directory fileref.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
fileref | path | string | true | Specifies the fileref name. The name must be eight or fewer characters. |
member | query | string | true | Specifies the name of the member to return. |
Example responses
200 Response
{
"id": "myfile.txt",
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/mydir?member=myfile.txt",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.fileref.directory.member",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/mydir?member=myfile.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs?parent=mydir",
"method": "POST",
"rel": "assign",
"responseType": "application/vnd.sas.compute.fileref",
"type": "application/vnd.sas.compute.fileref.request",
"uri": "/compute/sessions/RKEY-ses0000/filerefs?parent=mydir"
}
],
"name": "myfile.txt",
"version": 1
}
{
"id": "myfile.txt",
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/mydir?member=myfile.txt",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.fileref.directory.member",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/mydir?member=myfile.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs?parent=mydir",
"method": "POST",
"rel": "assign",
"responseType": "application/vnd.sas.compute.fileref",
"type": "application/vnd.sas.compute.fileref.request",
"uri": "/compute/sessions/RKEY-ses0000/filerefs?parent=mydir"
}
],
"name": "myfile.txt",
"version": 1
}
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | dirMember |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No resource exists at the requested path. | Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Download a file
Code samples
# You can also use wget
curl -X GET https://example.com/compute/sessions/{sessionId}/filerefs/{fileref}/content \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.error+json'
const headers = {
'Accept':'application/vnd.sas.error+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/filerefs/{fileref}/content',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.error+json'
}
r = requests.get('https://example.com/compute/sessions/{sessionId}/filerefs/{fileref}/content', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.error+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/sessions/{sessionId}/filerefs/{fileref}/content", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /sessions/{sessionId}/filerefs/{fileref}/content
Gets contents of a file that you refer to by a fileref. If the server can determine the type of file that is returned, the Content-type header returns the appropriate media type information. Otherwise, application/octet-stream data is returned for the Content-type header.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
fileref | path | string | true | Specifies the fileref name. The name must be eight or fewer characters. |
Example responses
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No resource exists at the requested path. | Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | Specifies a tag that identifies the revision of this object. | |
200 | Content-Type | string | Specifies the type of content in the file. If the content type is unknown, then application/octet-stream information is returned. |
Check file availability
Code samples
# You can also use wget
curl -X HEAD https://example.com/compute/sessions/{sessionId}/filerefs/{fileref}/content
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/compute/sessions/{sessionId}/filerefs/{fileref}/content',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/compute/sessions/{sessionId}/filerefs/{fileref}/content')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/compute/sessions/{sessionId}/filerefs/{fileref}/content", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /sessions/{sessionId}/filerefs/{fileref}/content
Determines whether a file is available for download.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
fileref | path | string | true | Specifies the fileref name. The name must be eight or fewer characters. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No file exists at the requested path. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | Specifies a tag that identifies the revision of this object. | |
200 | Content-Type | string | Specifies the content type of the file. If the content type is unknown, then application/octet-stream data is returned. |
Upload a file
Code samples
# You can also use wget
curl -X PUT https://example.com/compute/sessions/{sessionId}/filerefs/{fileref}/content \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/octet-stream' \
-H 'Accept: application/vnd.sas.error+json' \
-H 'If-Match: string'
const inputBody = 'string';
const headers = {
'Content-Type':'application/octet-stream',
'Accept':'application/vnd.sas.error+json',
'If-Match':'string'
};
fetch('https://example.com/compute/sessions/{sessionId}/filerefs/{fileref}/content',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/octet-stream',
'Accept': 'application/vnd.sas.error+json',
'If-Match': 'string'
}
r = requests.put('https://example.com/compute/sessions/{sessionId}/filerefs/{fileref}/content', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/octet-stream"},
"Accept": []string{"application/vnd.sas.error+json"},
"If-Match": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://example.com/compute/sessions/{sessionId}/filerefs/{fileref}/content", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /sessions/{sessionId}/filerefs/{fileref}/content
Uploads a physical file that is associated with a fileref.
Body parameter
string
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
fileref | path | string | true | Specifies the fileref name. The name must be eight or fewer characters. |
If-Match | header | string | true | Specifies the ETag of the fileref that you are updating. |
body | body | string(binary) | true | Specifies the data to upload to the fileref. |
Example responses
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
412 Response
{
"summary": "Precondition failed error response",
"description": "This is an example of an error response for a conditional request with an invalid precondition.",
"value": {
"version": 2,
"httpStatusCode": 412,
"message": "Precondition Failed",
"details": [
"A precondition for a conditional request has failed."
]
}
}
{
"summary": "Precondition failed error response",
"description": "This is an example of an error response for a conditional request with an invalid precondition.",
"value": {
"version": 2,
"httpStatusCode": 412,
"message": "Precondition Failed",
"details": [
"A precondition for a conditional request has failed."
]
}
}
428 Response
{
"summary": "Precondition required error response",
"description": "This is an example of an error response for a conditional request with a missing precondition.",
"value": {
"version": 2,
"httpStatusCode": 428,
"message": "Precondition Required",
"details": [
"The server refused to accept the request because a precondition is missing."
]
}
}
{
"summary": "Precondition required error response",
"description": "This is an example of an error response for a conditional request with a missing precondition.",
"value": {
"version": 2,
"httpStatusCode": 428,
"message": "Precondition Required",
"details": [
"The server refused to accept the request because a precondition is missing."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | The file content was created. | None |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No resource exists at the requested path. | Inline |
412 | Precondition Failed | The If-Match request header did not match the resource's entity tag, or the If-Unmodified-Since request header did not match the resources last modified timestamp. |
Inline |
428 | Precondition Required | The request headers did not include an If-Match or If-Unmodified-Since precondition. |
Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 412
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 428
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Etag | string | Specifies a tag that identifies the revision of this object. |
Delete a file
Code samples
# You can also use wget
curl -X DELETE https://example.com/compute/sessions/{sessionId}/filerefs/{fileref}/content \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.error+json'
const headers = {
'Accept':'application/vnd.sas.error+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/filerefs/{fileref}/content',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.error+json'
}
r = requests.delete('https://example.com/compute/sessions/{sessionId}/filerefs/{fileref}/content', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.error+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "https://example.com/compute/sessions/{sessionId}/filerefs/{fileref}/content", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /sessions/{sessionId}/filerefs/{fileref}/content
Deletes the file that is referenced by the fileref.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
fileref | path | string | true | Specifies the fileref name. The name must be eight or fewer characters. |
Example responses
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | The file was deleted. | None |
404 | Not Found | No resource exists at the requested path. | Inline |
Response Schema
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Get directory contents
Code samples
# You can also use wget
curl -X GET https://example.com/compute/sessions/{sessionId}/filerefs/{fileref}/content#directory \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/filerefs/{fileref}/content#directory',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.get('https://example.com/compute/sessions/{sessionId}/filerefs/{fileref}/content#directory', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.collection+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/sessions/{sessionId}/filerefs/{fileref}/content#directory", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /sessions/{sessionId}/filerefs/{fileref}/content#directory
Returns a directory listing when a fileref refers to a directory. A collection of directory members is returned.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
fileref | path | string | true | Specifies the fileref name. The name must be eight or fewer characters. |
start | query | integer | false | Specifies the offset of the first directory member to return. The default value is "0". |
limit | query | integer | false | Specifies the maximum number of members to return. The default value is "10". |
Example responses
200 Response
{
"accept": "application/vnd.sas.compute.fileref.directory.member",
"count": 1,
"items": [
{
"id": "myfile.txt",
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/mydir?member=myfile.txt",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.fileref.directory.member",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/mydir?member=myfile.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs?parent=mydir",
"method": "POST",
"rel": "assign",
"responseType": "application/vnd.sas.compute.fileref",
"type": "application/vnd.sas.compute.fileref.request",
"uri": "/compute/sessions/RKEY-ses0000/filerefs?parent=mydir"
}
],
"name": "myfile.txt"
}
],
"limit": 1,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/mydir/content?start=0&limit=1",
"itemType": "application/vnd.sas.compute.fileref.directory.member",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/mydir/content?start=0&limit=1"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/mydir/content",
"itemType": "application/vnd.sas.compute.fileref.directory.member",
"method": "GET",
"rel": "collection",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/mydir/content"
}
],
"name": "Fileref Members",
"start": 0,
"version": 2
}
{
"accept": "application/vnd.sas.compute.fileref.directory.member",
"count": 1,
"items": [
{
"id": "myfile.txt",
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/mydir?member=myfile.txt",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.fileref.directory.member",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/mydir?member=myfile.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs?parent=mydir",
"method": "POST",
"rel": "assign",
"responseType": "application/vnd.sas.compute.fileref",
"type": "application/vnd.sas.compute.fileref.request",
"uri": "/compute/sessions/RKEY-ses0000/filerefs?parent=mydir"
}
],
"name": "myfile.txt"
}
],
"limit": 1,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/mydir/content?start=0&limit=1",
"itemType": "application/vnd.sas.compute.fileref.directory.member",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/mydir/content?start=0&limit=1"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/mydir/content",
"itemType": "application/vnd.sas.compute.fileref.directory.member",
"method": "GET",
"rel": "collection",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/mydir/content"
}
],
"name": "Fileref Members",
"start": 0,
"version": 2
}
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | directoryCollection |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No resource exists at the requested path. | Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Variables
Contains the operations to access information for variables in a given session.
Get session variables
Code samples
# You can also use wget
curl -X GET https://example.com/compute/sessions/{sessionId}/variables \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/variables',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.get('https://example.com/compute/sessions/{sessionId}/variables', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.collection+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/sessions/{sessionId}/variables", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
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.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
filter | query | string(filter-criteria) | false | Specifies filter criteria for returned context definitions. |
start | query | integer | false | Specifies the offset of the first variable to return. The default value is "0". |
limit | query | integer | false | Specifies the maximum number of variables to return in a page. The default value is "50". |
Example responses
200 Response
{
"accept": "application/vnd.sas.compute.session.variable",
"count": 2,
"items": [
{
"name": "SYS_COMPUTE_SESSION_ID",
"scope": "GLOBAL",
"value": "RKEY-ses0000",
"version": 1
},
{
"name": "AFDSID",
"scope": "AUTOMATIC",
"value": "0",
"version": 1
}
],
"limit": 50,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/variables?filter=or(eq(name,AFDSID),eq(name,SYS_COMPUTE_SESSION_ID))&limit=50&start=0",
"itemType": "application/vnd.sas.compute.session.variable",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/variables?filter=or(eq(name,AFDSID),eq(name,SYS_COMPUTE_SESSION_ID))&limit=50&start=0"
},
{
"href": "/compute/sessions/RKEY-ses0000/variables",
"itemType": "application/vnd.sas.compute.session.variable",
"method": "GET",
"rel": "collection",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/variables"
},
{
"href": "/compute/sessions/RKEY-ses0000",
"method": "GET",
"rel": "up",
"type": "application/vnd.sas.compute.session",
"uri": "/compute/sessions/RKEY-ses0000"
}
],
"name": "Session Variables",
"start": 0,
"version": 2
}
{
"accept": "application/vnd.sas.compute.session.variable",
"count": 2,
"items": [
{
"name": "SYS_COMPUTE_SESSION_ID",
"scope": "GLOBAL",
"value": "RKEY-ses0000",
"version": 1
},
{
"name": "AFDSID",
"scope": "AUTOMATIC",
"value": "0",
"version": 1
}
],
"limit": 50,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/variables?filter=or(eq(name,AFDSID),eq(name,SYS_COMPUTE_SESSION_ID))&limit=50&start=0",
"itemType": "application/vnd.sas.compute.session.variable",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/variables?filter=or(eq(name,AFDSID),eq(name,SYS_COMPUTE_SESSION_ID))&limit=50&start=0"
},
{
"href": "/compute/sessions/RKEY-ses0000/variables",
"itemType": "application/vnd.sas.compute.session.variable",
"method": "GET",
"rel": "collection",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/variables"
},
{
"href": "/compute/sessions/RKEY-ses0000",
"method": "GET",
"rel": "up",
"type": "application/vnd.sas.compute.session",
"uri": "/compute/sessions/RKEY-ses0000"
}
],
"name": "Session Variables",
"start": 0,
"version": 2
}
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | sessionVariableCollection |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No resource exists at the requested path. | Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Check variable availability for a session
Code samples
# You can also use wget
curl -X HEAD https://example.com/compute/sessions/{sessionId}/variables
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/compute/sessions/{sessionId}/variables',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/compute/sessions/{sessionId}/variables')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/compute/sessions/{sessionId}/variables", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /sessions/{sessionId}/variables
Determines whether it is possible to get variables for a session.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
filter | query | string(filter-criteria) | false | Specifies the filter criteria for returned context definitions. |
start | query | integer | false | Specifies the offset of the first variable to return. The default value is "0". |
limit | query | integer | false | Specifies the maximum number of variables to return in a page. The default value is "50". |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No resource exists at the requested path. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Get a variable from the session
Code samples
# You can also use wget
curl -X GET https://example.com/compute/sessions/{sessionId}/variables/{variableName} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.compute.session.variable'
const headers = {
'Accept':'application/vnd.sas.compute.session.variable'
};
fetch('https://example.com/compute/sessions/{sessionId}/variables/{variableName}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.compute.session.variable'
}
r = requests.get('https://example.com/compute/sessions/{sessionId}/variables/{variableName}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.compute.session.variable"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/sessions/{sessionId}/variables/{variableName}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /sessions/{sessionId}/variables/{variableName}
Returns the information about the requested variable in the session. By default, the session variable resource is returned. You can get the simple value of the variable by specifying an Accept header of text/plain.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
variableName | path | string | true | Specifies the name of the variable to retrieve. |
Example responses
200 Response
{
"name": "SYS_COMPUTE_SESSION_ID",
"scope": "GLOBAL",
"value": "RKEY-ses0000",
"version": 1
}
"RKEY-ses0000"
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | string |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | The variable does not exist at the requested path. | Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Determine whether a variable exists in a session
Code samples
# You can also use wget
curl -X HEAD https://example.com/compute/sessions/{sessionId}/variables/{variableName}
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/compute/sessions/{sessionId}/variables/{variableName}',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/compute/sessions/{sessionId}/variables/{variableName}')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/compute/sessions/{sessionId}/variables/{variableName}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /sessions/{sessionId}/variables/{variableName}
Determines whether the requested variable exists for a session and obtains the header information for the variable.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
variableName | path | string | true | Specifies the name of the variable to retrieve. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | The variable does not exist at the requested path. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Engines
Contains the operations to access information about data access engines from a session.
Get an engine list for a session
Code samples
# You can also use wget
curl -X GET https://example.com/compute/sessions/{sessionId}/engines \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/engines',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.get('https://example.com/compute/sessions/{sessionId}/engines', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.collection+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/sessions/{sessionId}/engines", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /sessions/{sessionId}/engines
Returns engine information for a session. An engine enables you to access data from different storage locations. Each engine might have different requirements for usage. This endpoint returns a collection of engine information that enables you to determine what engines can be used in a session. A collection of application/vnd.sas.data.engine items is returned. Standard pagination rules apply, and simple filtering is allowed.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
filter | query | string(filter-criteria) | false | Specifies filter criteria for returned context definitions. |
start | query | integer | false | Specifies the offset of the first engine to return. The default value is 0. |
limit | query | integer | false | Specifies the maximum number of engines to return on a page. The default value is 10. |
Example responses
200 Response
{
"accept": "application/vnd.sas.data.engine",
"count": 39,
"items": [
{
"hasDefinition": true,
"legalName": "SAS Base Engine",
"licensed": true,
"links": [
{
"href": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines/sase7",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.data.engine",
"uri": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines/sase7"
},
{
"href": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines",
"itemType": "application/vnd.sas.data.engine",
"method": "GET",
"rel": "up",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines"
},
{
"href": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines/sase7/definition",
"method": "GET",
"rel": "definition",
"type": "application/schema",
"uri": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines/sase7/definition"
}
],
"name": "sase7",
"nickname": "BASE",
"providerId": "compute",
"version": 1
}
],
"limit": 1,
"links": [
{
"href": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines?limit=1&start=0",
"itemType": "application/vnd.sas.data.engine",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines?limit=1&start=0"
},
{
"href": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines",
"itemType": "application/vnd.sas.data.engine",
"method": "GET",
"rel": "collection",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines"
},
{
"href": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines?limit=1&start=1",
"itemType": "application/vnd.sas.data.engine",
"method": "GET",
"rel": "next",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines?limit=1&start=1"
},
{
"href": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines?limit=1&start=38",
"itemType": "application/vnd.sas.data.engine",
"method": "GET",
"rel": "last",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines?limit=1&start=38"
}
],
"name": "Engine Collection",
"start": 0,
"version": 2
}
{
"accept": "application/vnd.sas.data.engine",
"count": 39,
"items": [
{
"hasDefinition": true,
"legalName": "SAS Base Engine",
"licensed": true,
"links": [
{
"href": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines/sase7",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.data.engine",
"uri": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines/sase7"
},
{
"href": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines",
"itemType": "application/vnd.sas.data.engine",
"method": "GET",
"rel": "up",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines"
},
{
"href": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines/sase7/definition",
"method": "GET",
"rel": "definition",
"type": "application/schema",
"uri": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines/sase7/definition"
}
],
"name": "sase7",
"nickname": "BASE",
"providerId": "compute",
"version": 1
}
],
"limit": 1,
"links": [
{
"href": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines?limit=1&start=0",
"itemType": "application/vnd.sas.data.engine",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines?limit=1&start=0"
},
{
"href": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines",
"itemType": "application/vnd.sas.data.engine",
"method": "GET",
"rel": "collection",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines"
},
{
"href": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines?limit=1&start=1",
"itemType": "application/vnd.sas.data.engine",
"method": "GET",
"rel": "next",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines?limit=1&start=1"
},
{
"href": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines?limit=1&start=38",
"itemType": "application/vnd.sas.data.engine",
"method": "GET",
"rel": "last",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines?limit=1&start=38"
}
],
"name": "Engine Collection",
"start": 0,
"version": 2
}
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | engineCollection |
400 | Bad Request | The request was invalid. | errorResponse |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Check engine list availability for a session
Code samples
# You can also use wget
curl -X HEAD https://example.com/compute/sessions/{sessionId}/engines
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/compute/sessions/{sessionId}/engines',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/compute/sessions/{sessionId}/engines')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/compute/sessions/{sessionId}/engines", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /sessions/{sessionId}/engines
Determines whether it is possible to get engine information for a session.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
filter | query | string(filter-criteria) | false | Specifies filter criteria for returned context definitions. |
start | query | integer | false | Specifies the offset of the first engine to return. The default value is "0". |
limit | query | integer | false | Specifies the maximum number of engines to return in a page. The default value is "10". |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
400 | Bad Request | The request was invalid. | errorResponse |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Get engine information for a session
Code samples
# You can also use wget
curl -X HEAD https://example.com/compute/sessions/{sessionId}/engines/{engineName}/definition
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/compute/sessions/{sessionId}/engines/{engineName}/definition',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/compute/sessions/{sessionId}/engines/{engineName}/definition')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/compute/sessions/{sessionId}/engines/{engineName}/definition", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /sessions/{sessionId}/engines/{engineName}/definition
Determines whether information for the specified engine is available.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
engineName | path | string | true | Specifies the name or nickname of the requested engine. |
start | query | integer | false | Specifies the offset of the first resource to return. The default value is "0". |
limit | query | integer | false | Specifies the maximum number of resources to return. The default value is "50". |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No engine exists at the requested path. | None |
501 | Not Implemented | The specified engine is not supported. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Get engine information
Code samples
# You can also use wget
curl -X HEAD https://example.com/compute/sessions/{sessionId}/engines/{engineName}
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/compute/sessions/{sessionId}/engines/{engineName}',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/compute/sessions/{sessionId}/engines/{engineName}')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/compute/sessions/{sessionId}/engines/{engineName}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /sessions/{sessionId}/engines/{engineName}
Determines whether information for a specific engine is available.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
engineName | path | string | true | Specifies the name or nickname of the engine. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No engine exists at the requested path. | None |
501 | Not Implemented | The specified engine is not supported. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Get options schema for an engine
Code samples
# You can also use wget
curl -X GET https://example.com/compute/sessions/{sessionId}/engines/{engineName}/definition \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.error+json'
const headers = {
'Accept':'application/vnd.sas.error+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/engines/{engineName}/definition',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.error+json'
}
r = requests.get('https://example.com/compute/sessions/{sessionId}/engines/{engineName}/definition', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.error+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/sessions/{sessionId}/engines/{engineName}/definition", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /sessions/{sessionId}/engines/{engineName}/definition
Returns the options schema for a specific engine.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
engineName | path | string | true | Specifies the name or nickname of the requested engine. |
start | query | integer | false | Specifies the offset of the first resource to return. The default value is "0". |
limit | query | integer | false | Specifies the maximum number of resources to return. The default value is "50". |
Example responses
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No engine exists at the requested path. | Inline |
501 | Not Implemented | The specified engine is not supported. | None |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
File System
Contains the operations to access information for the file system.
Get file or directory properties
Code samples
# You can also use wget
curl -X GET https://example.com/compute/sessions/{sessionId}/files/{fileOrDirectoryPath} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.compute.file.properties+json'
const headers = {
'Accept':'application/vnd.sas.compute.file.properties+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/files/{fileOrDirectoryPath}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.compute.file.properties+json'
}
r = requests.get('https://example.com/compute/sessions/{sessionId}/files/{fileOrDirectoryPath}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.compute.file.properties+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/sessions/{sessionId}/files/{fileOrDirectoryPath}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /sessions/{sessionId}/files/{fileOrDirectoryPath}
Gets file or directory properties at a specified path.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
fileOrDirectoryPath | path | string | true | Specifies the file or directory path. In the path value, replace each forward slash with ~fs~. |
expandPath | query | boolean | false | Specifies whether to return fully qualified paths in response links. |
Example responses
200 Response
{
"isDirectory": false,
"modifiedTimeStamp": "2018-11-07T08:32:45.000Z",
"name": "hello.txt",
"path": "test",
"readOnly": false,
"size": 6,
"version": 1,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content",
"method": "GET",
"rel": "getFile",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "DELETE",
"rel": "deleteFile",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content",
"method": "PUT",
"rel": "createFile",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "PUT",
"rel": "renameFile",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/{destinationFile}",
"method": "POST",
"rel": "copyFile",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.request",
"uri": "/compute/sessions/RKEY-ses0000/files/{destinationFile}"
}
]
}
{
"isDirectory": false,
"modifiedTimeStamp": "2018-11-07T08:32:45.000Z",
"name": "hello.txt",
"path": "test",
"readOnly": false,
"size": 6,
"version": 1,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content",
"method": "GET",
"rel": "getFile",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "DELETE",
"rel": "deleteFile",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content",
"method": "PUT",
"rel": "createFile",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "PUT",
"rel": "renameFile",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/{destinationFile}",
"method": "POST",
"rel": "copyFile",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.request",
"uri": "/compute/sessions/RKEY-ses0000/files/{destinationFile}"
}
]
}
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
415 Response
{
"summary": "Unsupported media type error response",
"description": "This is an example of an error response for a request with payload of an unsupported type.",
"value": {
"version": 2,
"httpStatusCode": 415,
"message": "Unsupported Media Type",
"details": [
"The server refused to accept the request because the payload format is in an unsupported format."
]
}
}
{
"summary": "Unsupported media type error response",
"description": "This is an example of an error response for a request with payload of an unsupported type.",
"value": {
"version": 2,
"httpStatusCode": 415,
"message": "Unsupported Media Type",
"details": [
"The server refused to accept the request because the payload format is in an unsupported format."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | fileProperties |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No resource exists at the requested path. | Inline |
415 | Unsupported Media Type | The requested media type is not supported. | Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 415
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | Specifies a tag that identifies the revision of this object. |
Check for file or directory properties
Code samples
# You can also use wget
curl -X HEAD https://example.com/compute/sessions/{sessionId}/files/{fileOrDirectoryPath}
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/compute/sessions/{sessionId}/files/{fileOrDirectoryPath}',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/compute/sessions/{sessionId}/files/{fileOrDirectoryPath}')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/compute/sessions/{sessionId}/files/{fileOrDirectoryPath}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /sessions/{sessionId}/files/{fileOrDirectoryPath}
Determines whether the specified file or directory exists.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
fileOrDirectoryPath | path | string | true | Specifies the file or directory path. In the path value, replace each forward slash with ~fs~. |
expandPath | query | boolean | false | Specifies whether to return fully qualified paths in response links. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
404 | Not Found | No resource exists at the requested path. | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | Specifies a tag that identifies the revision of this object. |
Rename a file or directory
Code samples
# You can also use wget
curl -X PUT https://example.com/compute/sessions/{sessionId}/files/{fileOrDirectoryPath} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.compute.file.properties+json' \
-H 'Accept: application/vnd.sas.compute.file.properties+json' \
-H 'If-Match: string'
const inputBody = '{
"isDirectory": false,
"modifiedTimeStamp": "2018-11-07T08:32:45.000Z",
"name": "hello.txt",
"path": "test",
"readOnly": false,
"size": 6,
"version": 1,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content",
"method": "GET",
"rel": "getFile",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "DELETE",
"rel": "deleteFile",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content",
"method": "PUT",
"rel": "createFile",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "PUT",
"rel": "renameFile",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/{destinationFile}",
"method": "POST",
"rel": "copyFile",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.request",
"uri": "/compute/sessions/RKEY-ses0000/files/{destinationFile}"
}
]
}';
const headers = {
'Content-Type':'application/vnd.sas.compute.file.properties+json',
'Accept':'application/vnd.sas.compute.file.properties+json',
'If-Match':'string'
};
fetch('https://example.com/compute/sessions/{sessionId}/files/{fileOrDirectoryPath}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.compute.file.properties+json',
'Accept': 'application/vnd.sas.compute.file.properties+json',
'If-Match': 'string'
}
r = requests.put('https://example.com/compute/sessions/{sessionId}/files/{fileOrDirectoryPath}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.compute.file.properties+json"},
"Accept": []string{"application/vnd.sas.compute.file.properties+json"},
"If-Match": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://example.com/compute/sessions/{sessionId}/files/{fileOrDirectoryPath}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /sessions/{sessionId}/files/{fileOrDirectoryPath}
Renames a file or directory at the specified location. Can also be used to move a file or directory to a location that you specify in the path
element of the application/vnd.sas.compute.file.properties body. If no path
is provided, the file is moved to the current working directory. The move
action causes the path for the new file or directory to change.
Body parameter
{
"isDirectory": false,
"modifiedTimeStamp": "2018-11-07T08:32:45.000Z",
"name": "hello.txt",
"path": "test",
"readOnly": false,
"size": 6,
"version": 1,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content",
"method": "GET",
"rel": "getFile",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "DELETE",
"rel": "deleteFile",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content",
"method": "PUT",
"rel": "createFile",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "PUT",
"rel": "renameFile",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/{destinationFile}",
"method": "POST",
"rel": "copyFile",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.request",
"uri": "/compute/sessions/RKEY-ses0000/files/{destinationFile}"
}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
fileOrDirectoryPath | path | string | true | Specifies the file or directory path. In the path value, replace each forward slash with ~fs~. |
overwrite | query | boolean | false | Specifies whether to force an overwrite of an existing file or directory if one of the same name exists at the destination path. If you specify true, the request replaces the existing file or directory. |
expandPath | query | boolean | false | Specifies whether to return fully qualified paths in response links. |
If-Match | header | string | true | Specifies the current ETag of the file or directory resource that you are renaming. |
body | body | fileProperties | true | Specifies the file or directory name and path elements. The name element is required and the path element is optional. If specified, the 'path' value can contain an absolute path or a path that is relative to the current working directory. Do not replace forward slash characters with ~fs~ for the path element. |
Example responses
200 Response
{
"isDirectory": false,
"modifiedTimeStamp": "2018-11-07T08:32:45.000Z",
"name": "hello.txt",
"path": "test",
"readOnly": false,
"size": 6,
"version": 1,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content",
"method": "GET",
"rel": "getFile",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "DELETE",
"rel": "deleteFile",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content",
"method": "PUT",
"rel": "createFile",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "PUT",
"rel": "renameFile",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/{destinationFile}",
"method": "POST",
"rel": "copyFile",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.request",
"uri": "/compute/sessions/RKEY-ses0000/files/{destinationFile}"
}
]
}
{
"isDirectory": false,
"modifiedTimeStamp": "2018-11-07T08:32:45.000Z",
"name": "hello.txt",
"path": "test",
"readOnly": false,
"size": 6,
"version": 1,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content",
"method": "GET",
"rel": "getFile",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "DELETE",
"rel": "deleteFile",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content",
"method": "PUT",
"rel": "createFile",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "PUT",
"rel": "renameFile",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/{destinationFile}",
"method": "POST",
"rel": "copyFile",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.request",
"uri": "/compute/sessions/RKEY-ses0000/files/{destinationFile}"
}
]
}
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
412 Response
{
"summary": "Precondition failed error response",
"description": "This is an example of an error response for a conditional request with an invalid precondition.",
"value": {
"version": 2,
"httpStatusCode": 412,
"message": "Precondition Failed",
"details": [
"A precondition for a conditional request has failed."
]
}
}
{
"summary": "Precondition failed error response",
"description": "This is an example of an error response for a conditional request with an invalid precondition.",
"value": {
"version": 2,
"httpStatusCode": 412,
"message": "Precondition Failed",
"details": [
"A precondition for a conditional request has failed."
]
}
}
428 Response
{
"summary": "Precondition required error response",
"description": "This is an example of an error response for a conditional request with a missing precondition.",
"value": {
"version": 2,
"httpStatusCode": 428,
"message": "Precondition Required",
"details": [
"The server refused to accept the request because a precondition is missing."
]
}
}
{
"summary": "Precondition required error response",
"description": "This is an example of an error response for a conditional request with a missing precondition.",
"value": {
"version": 2,
"httpStatusCode": 428,
"message": "Precondition Required",
"details": [
"The server refused to accept the request because a precondition is missing."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The file or directory was successfully renamed. | fileProperties |
400 | Bad Request | The request was invalid. The file or directory cannot be renamed. | Inline |
412 | Precondition Failed | The If-Match request header did not match the resource's entity tag. |
Inline |
428 | Precondition Required | The request headers did not include an If-Match precondition. |
Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 412
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 428
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | Specifies a tag that identifies the revision of this file or directory. | |
200 | Location | string | Specifies the URI of the renamed file or directory. |
Delete a file or directory
Code samples
# You can also use wget
curl -X DELETE https://example.com/compute/sessions/{sessionId}/files/{fileOrDirectoryPath} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.error+json' \
-H 'If-Match: string'
const headers = {
'Accept':'application/vnd.sas.error+json',
'If-Match':'string'
};
fetch('https://example.com/compute/sessions/{sessionId}/files/{fileOrDirectoryPath}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.error+json',
'If-Match': 'string'
}
r = requests.delete('https://example.com/compute/sessions/{sessionId}/files/{fileOrDirectoryPath}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.error+json"},
"If-Match": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "https://example.com/compute/sessions/{sessionId}/files/{fileOrDirectoryPath}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /sessions/{sessionId}/files/{fileOrDirectoryPath}
Deletes a file or directory.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
fileOrDirectoryPath | path | string | true | Specifies the file or directory path. In the path value, replace each forward slash with ~fs~. |
If-Match | header | string | true | Specifies the current ETag of the file or directory resource that you are deleting. |
Example responses
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | The file or directory was successfully deleted. | None |
400 | Bad Request | The request was invalid. The file or directory cannot be deleted. | Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Create an empty file or directory
Code samples
# You can also use wget
curl -X POST https://example.com/compute/sessions/{sessionId}/files/{fileOrDirectoryPath}#touchFileOrDirectory \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.compute.file.properties+json' \
-H 'Accept: application/vnd.sas.compute.file.properties+json'
const inputBody = '{
"isDirectory": false,
"modifiedTimeStamp": "2018-11-07T08:32:45.000Z",
"name": "hello.txt",
"path": "test",
"readOnly": false,
"size": 6,
"version": 1,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content",
"method": "GET",
"rel": "getFile",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "DELETE",
"rel": "deleteFile",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content",
"method": "PUT",
"rel": "createFile",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "PUT",
"rel": "renameFile",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/{destinationFile}",
"method": "POST",
"rel": "copyFile",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.request",
"uri": "/compute/sessions/RKEY-ses0000/files/{destinationFile}"
}
]
}';
const headers = {
'Content-Type':'application/vnd.sas.compute.file.properties+json',
'Accept':'application/vnd.sas.compute.file.properties+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/files/{fileOrDirectoryPath}#touchFileOrDirectory',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.compute.file.properties+json',
'Accept': 'application/vnd.sas.compute.file.properties+json'
}
r = requests.post('https://example.com/compute/sessions/{sessionId}/files/{fileOrDirectoryPath}#touchFileOrDirectory', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.compute.file.properties+json"},
"Accept": []string{"application/vnd.sas.compute.file.properties+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/compute/sessions/{sessionId}/files/{fileOrDirectoryPath}#touchFileOrDirectory", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /sessions/{sessionId}/files/{fileOrDirectoryPath}#touchFileOrDirectory
Creates an empty file or directory. In the request body, set the isDirectory
attribute to 'false' for files and to 'true' for a directory. The name
attribute specifies the name of the new file or directory. Provide the path of the new file or directory either in the URI or in the path
attribute in the request body. If you do not provide a path, then the new file or directory is created under the current working directory.
Body parameter
{
"isDirectory": false,
"modifiedTimeStamp": "2018-11-07T08:32:45.000Z",
"name": "hello.txt",
"path": "test",
"readOnly": false,
"size": 6,
"version": 1,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content",
"method": "GET",
"rel": "getFile",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "DELETE",
"rel": "deleteFile",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content",
"method": "PUT",
"rel": "createFile",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "PUT",
"rel": "renameFile",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/{destinationFile}",
"method": "POST",
"rel": "copyFile",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.request",
"uri": "/compute/sessions/RKEY-ses0000/files/{destinationFile}"
}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
fileOrDirectoryPath | path | string | true | Specifies the file or directory path. In the path value, replace each forward slash with ~fs~. |
expandPath | query | boolean | false | Specifies whether to return fully qualified paths in response links. |
body | body | fileProperties | true | Specifies the file or directory name and path elements. The name element is required and the path element is optional. |
Example responses
201 Response
{
"isDirectory": false,
"modifiedTimeStamp": "2018-11-07T08:32:45.000Z",
"name": "hello.txt",
"path": "test",
"readOnly": false,
"size": 6,
"version": 1,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content",
"method": "GET",
"rel": "getFile",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "DELETE",
"rel": "deleteFile",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content",
"method": "PUT",
"rel": "createFile",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "PUT",
"rel": "renameFile",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/{destinationFile}",
"method": "POST",
"rel": "copyFile",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.request",
"uri": "/compute/sessions/RKEY-ses0000/files/{destinationFile}"
}
]
}
{
"isDirectory": false,
"modifiedTimeStamp": "2018-11-07T08:32:45.000Z",
"name": "hello.txt",
"path": "test",
"readOnly": false,
"size": 6,
"version": 1,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content",
"method": "GET",
"rel": "getFile",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "DELETE",
"rel": "deleteFile",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content",
"method": "PUT",
"rel": "createFile",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "PUT",
"rel": "renameFile",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/{destinationFile}",
"method": "POST",
"rel": "copyFile",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.request",
"uri": "/compute/sessions/RKEY-ses0000/files/{destinationFile}"
}
]
}
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
415 Response
{
"summary": "Unsupported media type error response",
"description": "This is an example of an error response for a request with payload of an unsupported type.",
"value": {
"version": 2,
"httpStatusCode": 415,
"message": "Unsupported Media Type",
"details": [
"The server refused to accept the request because the payload format is in an unsupported format."
]
}
}
{
"summary": "Unsupported media type error response",
"description": "This is an example of an error response for a request with payload of an unsupported type.",
"value": {
"version": 2,
"httpStatusCode": 415,
"message": "Unsupported Media Type",
"details": [
"The server refused to accept the request because the payload format is in an unsupported format."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | An empty file or directory was created. | fileProperties |
400 | Bad Request | The request was invalid. The file or directory can not be created. | Inline |
415 | Unsupported Media Type | The requested media type is not supported. | Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 415
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | ETag | string | Specifies a tag that identifies the revision of this object. | |
201 | Location | string | Specifies the URI of the created file or directory. |
Copy a file or directory
Code samples
# You can also use wget
curl -X POST https://example.com/compute/sessions/{sessionId}/files/{destinationFileOrDirectoryPath}#copyFileOrDirectory \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.compute.file.request+json' \
-H 'Accept: application/vnd.sas.compute.file.properties+json'
const inputBody = '{
"name": "hello.txt",
"path": "test/myfiles",
"x-widdershins-oldRef": "#/components/schemas/fileRequest/example"
}';
const headers = {
'Content-Type':'application/vnd.sas.compute.file.request+json',
'Accept':'application/vnd.sas.compute.file.properties+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/files/{destinationFileOrDirectoryPath}#copyFileOrDirectory',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.compute.file.request+json',
'Accept': 'application/vnd.sas.compute.file.properties+json'
}
r = requests.post('https://example.com/compute/sessions/{sessionId}/files/{destinationFileOrDirectoryPath}#copyFileOrDirectory', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.compute.file.request+json"},
"Accept": []string{"application/vnd.sas.compute.file.properties+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://example.com/compute/sessions/{sessionId}/files/{destinationFileOrDirectoryPath}#copyFileOrDirectory", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /sessions/{sessionId}/files/{destinationFileOrDirectoryPath}#copyFileOrDirectory
Copies a file or directory. Provide the path of the destination file or directory in the URI. Provide the path of the source file or directory in the request body. If you do not provide a path in the request body, then the current working directory is assumed.
Body parameter
{
"name": "hello.txt",
"path": "test/myfiles",
"x-widdershins-oldRef": "#/components/schemas/fileRequest/example"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
destinationFileOrDirectoryPath | path | string | true | Specifies the destination file or directory path. In the path value, replace each forward slash with ~fs~. |
overwrite | query | boolean | false | Specifies whether to force an overwrite of an existing file or directory if one of the same name exists at the destination path. If you specify true, the request replaces the existing file or directory. |
expandPath | query | boolean | false | Specifies whether to return fully qualified paths in response links. |
body | body | fileRequest | true | Specifies the source file or directory name and path elements. The name element is required, and the path element is optional. |
Example responses
201 Response
{
"isDirectory": false,
"modifiedTimeStamp": "2018-11-07T08:32:45.000Z",
"name": "hello.txt",
"path": "test",
"readOnly": false,
"size": 6,
"version": 1,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content",
"method": "GET",
"rel": "getFile",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "DELETE",
"rel": "deleteFile",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content",
"method": "PUT",
"rel": "createFile",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "PUT",
"rel": "renameFile",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/{destinationFile}",
"method": "POST",
"rel": "copyFile",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.request",
"uri": "/compute/sessions/RKEY-ses0000/files/{destinationFile}"
}
]
}
{
"isDirectory": false,
"modifiedTimeStamp": "2018-11-07T08:32:45.000Z",
"name": "hello.txt",
"path": "test",
"readOnly": false,
"size": 6,
"version": 1,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content",
"method": "GET",
"rel": "getFile",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "DELETE",
"rel": "deleteFile",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content",
"method": "PUT",
"rel": "createFile",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "PUT",
"rel": "renameFile",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/{destinationFile}",
"method": "POST",
"rel": "copyFile",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.request",
"uri": "/compute/sessions/RKEY-ses0000/files/{destinationFile}"
}
]
}
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
409 Response
{
"summary": "Conflict error response",
"description": "This is an example of an error response for a resource update conflict.",
"value": {
"version": 2,
"httpStatusCode": 409,
"message": "Conflict",
"details": [
"The updated resource is not based on the most recently saved resource."
]
}
}
{
"summary": "Conflict error response",
"description": "This is an example of an error response for a resource update conflict.",
"value": {
"version": 2,
"httpStatusCode": 409,
"message": "Conflict",
"details": [
"The updated resource is not based on the most recently saved resource."
]
}
}
415 Response
{
"summary": "Unsupported media type error response",
"description": "This is an example of an error response for a request with payload of an unsupported type.",
"value": {
"version": 2,
"httpStatusCode": 415,
"message": "Unsupported Media Type",
"details": [
"The server refused to accept the request because the payload format is in an unsupported format."
]
}
}
{
"summary": "Unsupported media type error response",
"description": "This is an example of an error response for a request with payload of an unsupported type.",
"value": {
"version": 2,
"httpStatusCode": 415,
"message": "Unsupported Media Type",
"details": [
"The server refused to accept the request because the payload format is in an unsupported format."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | A file or directory was copied. | fileProperties |
400 | Bad Request | The path was invalid. The file or directory cannot be copied. | Inline |
404 | Not Found | No file or directory exists at the requested path. The file or directory cannot be copied. | Inline |
409 | Conflict | The request could not be completed. The destination file or directory already exists. | Inline |
415 | Unsupported Media Type | The requested version that was provided in the Accept Header is not supported. | Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 409
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 415
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | ETag | string | Specifies a tag that identifies the revision of this object. | |
201 | Location | string | Specifies the URI of the created file or directory. | |
409 | Location | string | Specifies the URI of the existing file or directory. |
Download file contents
Code samples
# You can also use wget
curl -X GET https://example.com/compute/sessions/{sessionId}/files/{filePath}/content \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.error+json'
const headers = {
'Accept':'application/vnd.sas.error+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/files/{filePath}/content',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.error+json'
}
r = requests.get('https://example.com/compute/sessions/{sessionId}/files/{filePath}/content', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.error+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/sessions/{sessionId}/files/{filePath}/content", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /sessions/{sessionId}/files/{filePath}/content
Gets contents of a file that is specified by the file path. If the server can determine the type of file that is returned, then the Content-type
header returns the appropriate media type information. Otherwise, application/octet-stream data is returned for the Content-type
header.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
filePath | path | string | true | Specifies the file path. In the file path, replace each forward slash with ~fs~. |
Example responses
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No resource exists at the requested path. | Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | Specifies a tag that identifies the revision of this object. | |
200 | Content-Type | string | Specifies the type of content in the file. If the content type is unknown, then application/octet-stream information is returned. |
Upload file content
Code samples
# You can also use wget
curl -X PUT https://example.com/compute/sessions/{sessionId}/files/{filePath}/content \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/octet-stream' \
-H 'Accept: application/vnd.sas.compute.file.properties+json' \
-H 'If-Match: string'
const inputBody = 'string';
const headers = {
'Content-Type':'application/octet-stream',
'Accept':'application/vnd.sas.compute.file.properties+json',
'If-Match':'string'
};
fetch('https://example.com/compute/sessions/{sessionId}/files/{filePath}/content',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/octet-stream',
'Accept': 'application/vnd.sas.compute.file.properties+json',
'If-Match': 'string'
}
r = requests.put('https://example.com/compute/sessions/{sessionId}/files/{filePath}/content', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/octet-stream"},
"Accept": []string{"application/vnd.sas.compute.file.properties+json"},
"If-Match": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://example.com/compute/sessions/{sessionId}/files/{filePath}/content", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /sessions/{sessionId}/files/{filePath}/content
Creates a file or replaces an existing file. An ETag is required when you replace an existing file.
Body parameter
string
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
filePath | path | string | true | Specifies the file path. In the file path, replace each forward slash with ~fs~. |
If-Match | header | string | false | Specifies the current ETag of the file resource that you are deleting. |
body | body | string(binary) | true | Specifies the content to upload to the file. |
Example responses
200 Response
{
"isDirectory": false,
"modifiedTimeStamp": "2018-11-07T08:32:45.000Z",
"name": "hello.txt",
"path": "test",
"readOnly": false,
"size": 6,
"version": 1,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content",
"method": "GET",
"rel": "getFile",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "DELETE",
"rel": "deleteFile",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content",
"method": "PUT",
"rel": "createFile",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "PUT",
"rel": "renameFile",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/{destinationFile}",
"method": "POST",
"rel": "copyFile",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.request",
"uri": "/compute/sessions/RKEY-ses0000/files/{destinationFile}"
}
]
}
{
"isDirectory": false,
"modifiedTimeStamp": "2018-11-07T08:32:45.000Z",
"name": "hello.txt",
"path": "test",
"readOnly": false,
"size": 6,
"version": 1,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content",
"method": "GET",
"rel": "getFile",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "DELETE",
"rel": "deleteFile",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content",
"method": "PUT",
"rel": "createFile",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "PUT",
"rel": "renameFile",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/{destinationFile}",
"method": "POST",
"rel": "copyFile",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.request",
"uri": "/compute/sessions/RKEY-ses0000/files/{destinationFile}"
}
]
}
201 Response
{
"isDirectory": false,
"modifiedTimeStamp": "2018-11-07T08:32:45.000Z",
"name": "hello.txt",
"path": "test",
"readOnly": false,
"size": 6,
"version": 1,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content",
"method": "GET",
"rel": "getFile",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "DELETE",
"rel": "deleteFile",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content",
"method": "PUT",
"rel": "createFile",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "PUT",
"rel": "renameFile",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/{destinationFile}",
"method": "POST",
"rel": "copyFile",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.request",
"uri": "/compute/sessions/RKEY-ses0000/files/{destinationFile}"
}
]
}
{
"isDirectory": false,
"modifiedTimeStamp": "2018-11-07T08:32:45.000Z",
"name": "hello.txt",
"path": "test",
"readOnly": false,
"size": 6,
"version": 1,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content",
"method": "GET",
"rel": "getFile",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "DELETE",
"rel": "deleteFile",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content",
"method": "PUT",
"rel": "createFile",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "PUT",
"rel": "renameFile",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/{destinationFile}",
"method": "POST",
"rel": "copyFile",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.request",
"uri": "/compute/sessions/RKEY-ses0000/files/{destinationFile}"
}
]
}
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
412 Response
{
"summary": "Precondition failed error response",
"description": "This is an example of an error response for a conditional request with an invalid precondition.",
"value": {
"version": 2,
"httpStatusCode": 412,
"message": "Precondition Failed",
"details": [
"A precondition for a conditional request has failed."
]
}
}
{
"summary": "Precondition failed error response",
"description": "This is an example of an error response for a conditional request with an invalid precondition.",
"value": {
"version": 2,
"httpStatusCode": 412,
"message": "Precondition Failed",
"details": [
"A precondition for a conditional request has failed."
]
}
}
415 Response
{
"summary": "Unsupported media type error response",
"description": "This is an example of an error response for a request with payload of an unsupported type.",
"value": {
"version": 2,
"httpStatusCode": 415,
"message": "Unsupported Media Type",
"details": [
"The server refused to accept the request because the payload format is in an unsupported format."
]
}
}
{
"summary": "Unsupported media type error response",
"description": "This is an example of an error response for a request with payload of an unsupported type.",
"value": {
"version": 2,
"httpStatusCode": 415,
"message": "Unsupported Media Type",
"details": [
"The server refused to accept the request because the payload format is in an unsupported format."
]
}
}
428 Response
{
"summary": "Precondition required error response",
"description": "This is an example of an error response for a conditional request with a missing precondition.",
"value": {
"version": 2,
"httpStatusCode": 428,
"message": "Precondition Required",
"details": [
"The server refused to accept the request because a precondition is missing."
]
}
}
{
"summary": "Precondition required error response",
"description": "This is an example of an error response for a conditional request with a missing precondition.",
"value": {
"version": 2,
"httpStatusCode": 428,
"message": "Precondition Required",
"details": [
"The server refused to accept the request because a precondition is missing."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. The file was replaced. | fileProperties |
201 | Created | The request succeeded. The file was created. | fileProperties |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No resource exists at the requested path. | Inline |
412 | Precondition Failed | The If-Match request header did not match the resource's entity tag. |
Inline |
415 | Unsupported Media Type | The requested Content-type header is not supported. |
Inline |
428 | Precondition Required | The request headers did not include an If-Match precondition. |
Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 412
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 415
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 428
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | Specifies a tag that identifies the revision of this file. | |
200 | Location | string | Specifies the URI of the created file. | |
201 | ETag | string | Specifies a tag that identifies the revision of this file. | |
201 | Location | string | Specifies the URI of the created file. |
Get directory members
Code samples
# You can also use wget
curl -X GET https://example.com/compute/sessions/{sessionId}/files/{directoryPath}/members \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/files/{directoryPath}/members',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.get('https://example.com/compute/sessions/{sessionId}/files/{directoryPath}/members', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.collection+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/sessions/{sessionId}/files/{directoryPath}/members", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /sessions/{sessionId}/files/{directoryPath}/members
Returns a collection of directory members from a specified directory path.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
directoryPath | path | string | true | Specifies the directory path. In the directory path, replace each forward slash with ~fs~. |
showAll | query | boolean | false | Specifies whether to return hidden members in the directory. |
expandPath | query | boolean | false | Specifies whether to return fully qualified paths in response links. |
start | query | integer | false | Specifies the offset of the first directory member to return. The default value is 0. |
limit | query | integer | false | Specifies the maximum number of members to return. The default value is 10. |
Example responses
200 Response
{
"accept": "application/vnd.sas.compute.file.properties",
"count": 2,
"items": [
{
"isDirectory": false,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~hello.txt",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~hello.txt",
"method": "GET",
"rel": "getFileProperties",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~hello.txt/content",
"method": "GET",
"rel": "getFile",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~hello.txt/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~hello.txt",
"method": "DELETE",
"rel": "deleteFile",
"uri": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~hello.txt/content",
"method": "PUT",
"rel": "createFile",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~hello.txt/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~hello.txt",
"method": "PUT",
"rel": "renameFile",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/{destinationFile}",
"method": "POST",
"rel": "copyFile",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.request",
"uri": "/compute/sessions/RKEY-ses0000/files/{destinationFile}"
}
],
"modifiedTimeStamp": "2019-01-02T12:01:57.000Z",
"name": "hello.txt",
"path": "/u/test/mydir",
"readOnly": true,
"size": 0,
"version": 1
},
{
"isDirectory": true,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~dir1",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~dir1"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~dir1",
"method": "GET",
"rel": "getDirectoryProperties",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~dir1"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~dir1",
"method": "DELETE",
"rel": "deleteDirectory",
"uri": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~dir1"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~dir1",
"method": "PUT",
"rel": "renameDirectory",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~dir1"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~dir1",
"method": "POST",
"rel": "makeDirectory",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~dir1"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~dir1",
"method": "POST",
"rel": "createFile",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~dir1"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/{destinationDirectory}",
"method": "POST",
"rel": "copyDirectory",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.request",
"uri": "/compute/sessions/RKEY-ses0000/files/{destinationDirectory}"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~dir1/members",
"itemType": "application/vnd.sas.compute.file.properties",
"method": "GET",
"rel": "getDirectoryMembers",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~dir1/members"
}
],
"modifiedTimeStamp": "2019-01-02T12:01:57.000Z",
"name": "dir1.txt",
"path": "/u/test/mydir",
"readOnly": false,
"size": 0,
"version": 1
}
],
"limit": 50,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/files?limit=50&start=0",
"itemType": "application/vnd.sas.compute.file.properties",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/files?limit=50&start=0"
},
{
"href": "/compute/sessions/RKEY-ses0000/files",
"itemType": "application/vnd.sas.compute.file.properties",
"method": "GET",
"rel": "collection",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/files"
}
],
"name": "Directory listing",
"start": 0,
"version": 2
}
{
"accept": "application/vnd.sas.compute.file.properties",
"count": 2,
"items": [
{
"isDirectory": false,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~hello.txt",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~hello.txt",
"method": "GET",
"rel": "getFileProperties",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~hello.txt/content",
"method": "GET",
"rel": "getFile",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~hello.txt/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~hello.txt",
"method": "DELETE",
"rel": "deleteFile",
"uri": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~hello.txt/content",
"method": "PUT",
"rel": "createFile",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~hello.txt/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~hello.txt",
"method": "PUT",
"rel": "renameFile",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/{destinationFile}",
"method": "POST",
"rel": "copyFile",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.request",
"uri": "/compute/sessions/RKEY-ses0000/files/{destinationFile}"
}
],
"modifiedTimeStamp": "2019-01-02T12:01:57.000Z",
"name": "hello.txt",
"path": "/u/test/mydir",
"readOnly": true,
"size": 0,
"version": 1
},
{
"isDirectory": true,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~dir1",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~dir1"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~dir1",
"method": "GET",
"rel": "getDirectoryProperties",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~dir1"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~dir1",
"method": "DELETE",
"rel": "deleteDirectory",
"uri": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~dir1"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~dir1",
"method": "PUT",
"rel": "renameDirectory",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~dir1"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~dir1",
"method": "POST",
"rel": "makeDirectory",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~dir1"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~dir1",
"method": "POST",
"rel": "createFile",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~dir1"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/{destinationDirectory}",
"method": "POST",
"rel": "copyDirectory",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.request",
"uri": "/compute/sessions/RKEY-ses0000/files/{destinationDirectory}"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~dir1/members",
"itemType": "application/vnd.sas.compute.file.properties",
"method": "GET",
"rel": "getDirectoryMembers",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~dir1/members"
}
],
"modifiedTimeStamp": "2019-01-02T12:01:57.000Z",
"name": "dir1.txt",
"path": "/u/test/mydir",
"readOnly": false,
"size": 0,
"version": 1
}
],
"limit": 50,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/files?limit=50&start=0",
"itemType": "application/vnd.sas.compute.file.properties",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/files?limit=50&start=0"
},
{
"href": "/compute/sessions/RKEY-ses0000/files",
"itemType": "application/vnd.sas.compute.file.properties",
"method": "GET",
"rel": "collection",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/files"
}
],
"name": "Directory listing",
"start": 0,
"version": 2
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | filePropertiesCollection |
404 | Not Found | No resource exists at the requested path. | Inline |
Response Schema
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Options
Contains the operations to access information for options in a session.
Get an option by name
Code samples
# You can also use wget
curl -X GET https://example.com/compute/sessions/{sessionId}/options/{optionName} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: text/plain'
const headers = {
'Accept':'text/plain'
};
fetch('https://example.com/compute/sessions/{sessionId}/options/{optionName}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'text/plain'
}
r = requests.get('https://example.com/compute/sessions/{sessionId}/options/{optionName}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"text/plain"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/sessions/{sessionId}/options/{optionName}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /sessions/{sessionId}/options/{optionName}
Returns the value of the option as a plain text value.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
optionName | path | string | true | Specifies the name of the requested option. |
Example responses
200 Response
2147483648
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | string |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No such option name exists at the requested path. | Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Verify that an option exists
Code samples
# You can also use wget
curl -X HEAD https://example.com/compute/sessions/{sessionId}/options/{optionName}#optionFull \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.error+json'
const headers = {
'Accept':'application/vnd.sas.error+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/options/{optionName}#optionFull',
{
method: 'HEAD',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.error+json'
}
r = requests.head('https://example.com/compute/sessions/{sessionId}/options/{optionName}#optionFull', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.error+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/compute/sessions/{sessionId}/options/{optionName}#optionFull", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /sessions/{sessionId}/options/{optionName}#optionFull
Returns headers for option retrieval.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
optionName | path | string | true | Specifies the name of the requested option. |
Example responses
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No such option name exists at the requested path. | Inline |
Response Schema
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Set or update option value
Code samples
# You can also use wget
curl -X PUT https://example.com/compute/sessions/{sessionId}/options/{optionName} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: text/plain' \
-H 'Accept: text/plain'
const inputBody = 'string';
const headers = {
'Content-Type':'text/plain',
'Accept':'text/plain'
};
fetch('https://example.com/compute/sessions/{sessionId}/options/{optionName}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'text/plain',
'Accept': 'text/plain'
}
r = requests.put('https://example.com/compute/sessions/{sessionId}/options/{optionName}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"text/plain"},
"Accept": []string{"text/plain"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://example.com/compute/sessions/{sessionId}/options/{optionName}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /sessions/{sessionId}/options/{optionName}
Enables you to set or update the value of the specified option.
Body parameter
string
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
optionName | path | string | true | Specifies the name of the requested option. |
body | body | string | true | Specifies the value for the requested option. |
Example responses
200 Response
2147483648
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | string |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No such option name exists at the requested path. | Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Get an option representation
Code samples
# You can also use wget
curl -X GET https://example.com/compute/sessions/{sessionId}/options/{optionName}#optionFull \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.compute.session.option+json'
const headers = {
'Accept':'application/vnd.sas.compute.session.option+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/options/{optionName}#optionFull',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.compute.session.option+json'
}
r = requests.get('https://example.com/compute/sessions/{sessionId}/options/{optionName}#optionFull', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.compute.session.option+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/sessions/{sessionId}/options/{optionName}#optionFull", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /sessions/{sessionId}/options/{optionName}#optionFull
Returns information about the specified option, including the value.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
optionName | path | string | true | Specifies the name of the requested option. |
Example responses
200 Response
{
"version": 1,
"name": "MEMSIZE",
"description": "Specifies the limit on the amount of virtual memory that can be used during a SAS session.",
"value": "2147483648"
}
{
"version": 1,
"name": "MEMSIZE",
"description": "Specifies the limit on the amount of virtual memory that can be used during a SAS session.",
"value": "2147483648"
}
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | sessionOption |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No such option name exists at the requested path. | Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Formats
Contains the operations to access format information that is available in a session.
List formats in a session
Code samples
# You can also use wget
curl -X GET https://example.com/compute/sessions/{sessionId}/formats \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json' \
-H 'Accept-Item: application/vnd.sas.format.summary+json'
const headers = {
'Accept':'application/vnd.sas.collection+json',
'Accept-Item':'application/vnd.sas.format.summary+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/formats',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json',
'Accept-Item': 'application/vnd.sas.format.summary+json'
}
r = requests.get('https://example.com/compute/sessions/{sessionId}/formats', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.collection+json"},
"Accept-Item": []string{"application/vnd.sas.format.summary+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/sessions/{sessionId}/formats", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /sessions/{sessionId}/formats
Returns a list of all the formats that are defined for a session.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Item | header | string | false | Specifies the desired format representation. The Accept-Item options are:
|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
filter | query | string(filter-criteria) | false | Specifies filter criteria for returned formats. |
start | query | integer | false | Specifies the offset of the first format to return. |
limit | query | integer | false | Specifies the maximum number of formats to return. |
Enumerated Values
Parameter | Value |
---|---|
Accept-Item | application/vnd.sas.format.summary+json |
Accept-Item | application/vnd.sas.format+json |
Example responses
200 Response
{
"accept": "application/vnd.sas.format.summary",
"items": [
{
"id": "$",
"links": [
{
"href": "/compute/sessions/{sessionId}/formats/%24",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.format",
"uri": "/compute/sessions/{sessionId}/formats/%24"
}
],
"name": "$",
"version": 1
}
],
"limit": 1,
"links": [
{
"href": "/compute/sessions/{sessionId}/formats?limit=1&start=0",
"itemType": "application/vnd.sas.format.summary",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/{sessionId}/formats?limit=1&start=0"
},
{
"href": "/compute/sessions/{sessionId}/formats",
"itemType": "application/vnd.sas.format.summary",
"method": "GET",
"rel": "collection",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/{sessionId}/formats"
},
{
"href": "/compute/sessions/{sessionId}/formats?limit=1&start=1",
"itemType": "application/vnd.sas.format.summary",
"method": "GET",
"rel": "next",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/{sessionId}/formats?limit=1&start=1"
}
],
"name": "Formats",
"start": 0,
"version": 2
}
{
"accept": "application/vnd.sas.format.summary",
"items": [
{
"id": "$",
"links": [
{
"href": "/compute/sessions/{sessionId}/formats/%24",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.format",
"uri": "/compute/sessions/{sessionId}/formats/%24"
}
],
"name": "$",
"version": 1
}
],
"limit": 1,
"links": [
{
"href": "/compute/sessions/{sessionId}/formats?limit=1&start=0",
"itemType": "application/vnd.sas.format.summary",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/{sessionId}/formats?limit=1&start=0"
},
{
"href": "/compute/sessions/{sessionId}/formats",
"itemType": "application/vnd.sas.format.summary",
"method": "GET",
"rel": "collection",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/{sessionId}/formats"
},
{
"href": "/compute/sessions/{sessionId}/formats?limit=1&start=1",
"itemType": "application/vnd.sas.format.summary",
"method": "GET",
"rel": "next",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/{sessionId}/formats?limit=1&start=1"
}
],
"name": "Formats",
"start": 0,
"version": 2
}
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | formatSummaryCollection |
400 | Bad Request | The request was invalid. | errorResponse |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Check endpoint availability
Code samples
# You can also use wget
curl -X HEAD https://example.com/compute/sessions/{sessionId}/formats
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/compute/sessions/{sessionId}/formats',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/compute/sessions/{sessionId}/formats')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/compute/sessions/{sessionId}/formats", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /sessions/{sessionId}/formats
Determines whether the formats endpoint is available for a session.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
filter | query | string(filter-criteria) | false | Specifies the filter criteria for returned formats. |
start | query | integer | false | Specifies the offset of the first format to return. The default value is 0. |
limit | query | integer | false | Specifies the maximum number of formats to return. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
400 | Bad Request | The request was invalid. | errorResponse |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Get format information
Code samples
# You can also use wget
curl -X GET https://example.com/compute/sessions/{sessionId}/formats/{formatName} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.format+json'
const headers = {
'Accept':'application/vnd.sas.format+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/formats/{formatName}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.format+json'
}
r = requests.get('https://example.com/compute/sessions/{sessionId}/formats/{formatName}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.format+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/sessions/{sessionId}/formats/{formatName}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /sessions/{sessionId}/formats/{formatName}
Gets format information from a session.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
formatName | path | string | true | Specifies the format name. |
Example responses
200 Response
{
"category": "char",
"defaultDecimals": 0,
"defaultModifier": 272,
"defaultWidth": 8,
"formatType": "format",
"id": "$VARYING",
"justification": "right",
"links": [
{
"href": "/compute/sessions/0001-ses0000/formats/%24VARYING",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.format",
"uri": "/compute/sessions/0001-ses0000/formats/%24VARYING"
}
],
"maximumDecimals": 0,
"maximumWidth": 32767,
"minimumDecimals": 0,
"minimumWidth": 1,
"name": "$VARYING",
"version": 1
}
{
"category": "char",
"defaultDecimals": 0,
"defaultModifier": 272,
"defaultWidth": 8,
"formatType": "format",
"id": "$VARYING",
"justification": "right",
"links": [
{
"href": "/compute/sessions/0001-ses0000/formats/%24VARYING",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.format",
"uri": "/compute/sessions/0001-ses0000/formats/%24VARYING"
}
],
"maximumDecimals": 0,
"maximumWidth": 32767,
"minimumDecimals": 0,
"minimumWidth": 1,
"name": "$VARYING",
"version": 1
}
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | format |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No resource exists at the requested path. | Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Check for a format
Code samples
# You can also use wget
curl -X HEAD https://example.com/compute/sessions/{sessionId}/formats/{formatName} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.error+json'
const headers = {
'Accept':'application/vnd.sas.error+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/formats/{formatName}',
{
method: 'HEAD',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.error+json'
}
r = requests.head('https://example.com/compute/sessions/{sessionId}/formats/{formatName}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.error+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/compute/sessions/{sessionId}/formats/{formatName}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /sessions/{sessionId}/formats/{formatName}
Determines whether the specified format exists in a session.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
formatName | path | string | true | Specifies the format name. |
Example responses
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
404 | Not Found | No resource exists at the requested path. | Inline |
Response Schema
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Informats
Contains the operations to access informat information that is available in a session.
List informats in a session
Code samples
# You can also use wget
curl -X GET https://example.com/compute/sessions/{sessionId}/informats \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json' \
-H 'Accept-Item: application/vnd.sas.format.summary+json'
const headers = {
'Accept':'application/vnd.sas.collection+json',
'Accept-Item':'application/vnd.sas.format.summary+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/informats',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json',
'Accept-Item': 'application/vnd.sas.format.summary+json'
}
r = requests.get('https://example.com/compute/sessions/{sessionId}/informats', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.collection+json"},
"Accept-Item": []string{"application/vnd.sas.format.summary+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/sessions/{sessionId}/informats", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /sessions/{sessionId}/informats
Returns a list of all the informats that are defined for a session.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Item | header | string | false | Specifies the desired format representation. The Accept-Item options are:
|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
filter | query | string(filter-criteria) | false | Specifies filter criteria for returned informats. |
start | query | integer | false | Specifies the offset of the first informat to return. |
limit | query | integer | false | Specifies the maximum number of informats to return. |
Enumerated Values
Parameter | Value |
---|---|
Accept-Item | application/vnd.sas.format.summary+json |
Accept-Item | application/vnd.sas.format+json |
Example responses
200 Response
{
"accept": "application/vnd.sas.format.summary",
"items": [
{
"id": "$",
"links": [
{
"href": "/compute/sessions/{sessionId}/formats/%24",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.format",
"uri": "/compute/sessions/{sessionId}/formats/%24"
}
],
"name": "$",
"version": 1
}
],
"limit": 1,
"links": [
{
"href": "/compute/sessions/{sessionId}/formats?limit=1&start=0",
"itemType": "application/vnd.sas.format.summary",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/{sessionId}/formats?limit=1&start=0"
},
{
"href": "/compute/sessions/{sessionId}/formats",
"itemType": "application/vnd.sas.format.summary",
"method": "GET",
"rel": "collection",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/{sessionId}/formats"
},
{
"href": "/compute/sessions/{sessionId}/formats?limit=1&start=1",
"itemType": "application/vnd.sas.format.summary",
"method": "GET",
"rel": "next",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/{sessionId}/formats?limit=1&start=1"
}
],
"name": "Formats",
"start": 0,
"version": 2
}
{
"accept": "application/vnd.sas.format.summary",
"items": [
{
"id": "$",
"links": [
{
"href": "/compute/sessions/{sessionId}/formats/%24",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.format",
"uri": "/compute/sessions/{sessionId}/formats/%24"
}
],
"name": "$",
"version": 1
}
],
"limit": 1,
"links": [
{
"href": "/compute/sessions/{sessionId}/formats?limit=1&start=0",
"itemType": "application/vnd.sas.format.summary",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/{sessionId}/formats?limit=1&start=0"
},
{
"href": "/compute/sessions/{sessionId}/formats",
"itemType": "application/vnd.sas.format.summary",
"method": "GET",
"rel": "collection",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/{sessionId}/formats"
},
{
"href": "/compute/sessions/{sessionId}/formats?limit=1&start=1",
"itemType": "application/vnd.sas.format.summary",
"method": "GET",
"rel": "next",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/{sessionId}/formats?limit=1&start=1"
}
],
"name": "Formats",
"start": 0,
"version": 2
}
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | formatSummaryCollection |
400 | Bad Request | The request was invalid. | errorResponse |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Check endpoint availability
Code samples
# You can also use wget
curl -X HEAD https://example.com/compute/sessions/{sessionId}/informats
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/compute/sessions/{sessionId}/informats',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/compute/sessions/{sessionId}/informats')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/compute/sessions/{sessionId}/informats", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /sessions/{sessionId}/informats
Determines whether the informats endpoint is available for a session.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
filter | query | string(filter-criteria) | false | Specifies the filter criteria for returned informats. |
start | query | integer | false | Specifies the offset of the first informat to return. The default value is 0. |
limit | query | integer | false | Specifies the maximum number of informats to return. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
400 | Bad Request | The request was invalid. | errorResponse |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Get informat information
Code samples
# You can also use wget
curl -X GET https://example.com/compute/sessions/{sessionId}/informats/{informatName} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.format+json'
const headers = {
'Accept':'application/vnd.sas.format+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/informats/{informatName}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.format+json'
}
r = requests.get('https://example.com/compute/sessions/{sessionId}/informats/{informatName}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.format+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/compute/sessions/{sessionId}/informats/{informatName}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /sessions/{sessionId}/informats/{informatName}
Gets informat information from a session.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
informatName | path | string | true | Specifies the informat name. |
Example responses
200 Response
{
"category": "char",
"defaultDecimals": 0,
"defaultModifier": 272,
"defaultWidth": 8,
"formatType": "format",
"id": "$VARYING",
"justification": "right",
"links": [
{
"href": "/compute/sessions/0001-ses0000/formats/%24VARYING",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.format",
"uri": "/compute/sessions/0001-ses0000/formats/%24VARYING"
}
],
"maximumDecimals": 0,
"maximumWidth": 32767,
"minimumDecimals": 0,
"minimumWidth": 1,
"name": "$VARYING",
"version": 1
}
{
"category": "char",
"defaultDecimals": 0,
"defaultModifier": 272,
"defaultWidth": 8,
"formatType": "format",
"id": "$VARYING",
"justification": "right",
"links": [
{
"href": "/compute/sessions/0001-ses0000/formats/%24VARYING",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.format",
"uri": "/compute/sessions/0001-ses0000/formats/%24VARYING"
}
],
"maximumDecimals": 0,
"maximumWidth": 32767,
"minimumDecimals": 0,
"minimumWidth": 1,
"name": "$VARYING",
"version": 1
}
400 Response
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
{
"summary": "Bad request error response",
"description": "This is an example of an error response for a bad request.",
"value": {
"version": 2,
"httpStatusCode": 400,
"message": "Bad Request",
"details": [
"The request was invalid."
]
}
}
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | format |
400 | Bad Request | The request was invalid. | errorResponse |
404 | Not Found | No resource exists at the requested path. | Inline |
Response Schema
Status Code 400
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Check for an informat
Code samples
# You can also use wget
curl -X HEAD https://example.com/compute/sessions/{sessionId}/informats/{informatName} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.error+json'
const headers = {
'Accept':'application/vnd.sas.error+json'
};
fetch('https://example.com/compute/sessions/{sessionId}/informats/{informatName}',
{
method: 'HEAD',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.error+json'
}
r = requests.head('https://example.com/compute/sessions/{sessionId}/informats/{informatName}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.error+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://example.com/compute/sessions/{sessionId}/informats/{informatName}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /sessions/{sessionId}/informats/{informatName}
Determines whether the specified informat exists in a session.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sessionId | path | string(object-id) | true | Specifies the ID of the session. |
informatName | path | string | true | Specifies the informat name. |
Example responses
404 Response
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
{
"summary": "Not found error response",
"description": "This is an example of an error response for a resource that is not found.",
"value": {
"version": 2,
"httpStatusCode": 404,
"message": "Not Found",
"details": [
"No resource exists at the requested path."
]
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | None |
404 | Not Found | No resource exists at the requested path. | Inline |
Response Schema
Status Code 404
Error
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | The message for the error. |
» id | string | false | none | The string ID for the error. |
» errorCode | integer | false | none | The numeric ID for the error. |
» httpStatusCode | integer | true | none | The HTTP status code for the error. |
» details | [string] | false | none | Messages that provide additional details about the cause of the error. |
» remediation | string | false | none | A message that describes how to resolve the error. |
» errors | [#/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1contexts/post/responses/400/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [link] | false | none | The links that apply to the error. |
»» Link | link | false | none | A link to a related operation or resource. |
»»» method | string | false | none | The HTTP method for the link. |
»»» rel | string | true | none | The relationship of the link to the resource. |
»»» uri | string | false | none | The relative URI for the link. |
»»» href | string | false | none | The URL for the link. |
»»» title | string | false | none | The title for the link. |
»»» type | string | false | none | The media type or link type for the link. |
»»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Schemas
resource
{
"name": "string",
"uri": "string",
"type": "string",
"output": false,
"scope": "SESSION",
"options": {},
"required": false,
"attributes": {}
}
External Resource
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | true | none | Specifies the name for the resource. This name can be used to reference this resource on the server. The value of the name is limited to 40 characters. The value must be unique within a context. |
uri | string | true | none | Specifies the URI path to the resource. The URI path contains information about how to access the resource under the services base URL. The value of the URI is limited to 500 characters. |
type | string | true | none | Specifies the type of resource that is referenced in this item. The value of the type is limited to 100 characters. |
output | boolean | false | none | Specifies whether the resource can be referenced in the output or results of a session or job. |
scope | string | false | none | Specifies the scope of the resource. If a resource is specified for a job and the resource has JOB scope, then the resource is deleted or deassigned at the end of the job. |
options | object | false | none | Specifies the options to add to the resource for the creation or assignment of an internal SAS component that is created based on type. |
required | boolean | false | none | Specifies whether a resource is required. If a required resource cannot be instantiated by the session or job, then that session or job is considered to have failed. |
attributes | object | false | none | Specifies the attributes for the resource. Support for resource attributes was added in version 3 for contexts, context requests, and job requests, and in version 2 for session requests. |
Enumerated Values
Property | Value |
---|---|
scope | SESSION |
scope | JOB |
contextLaunchContext
{
"command": "string",
"contextName": "string",
"contextId": "string"
}
Launch Context
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
command | string | false | none | Specifies the command that launches the server for this context. If this value is not set, the service uses the default command that is determined at runtime. |
contextName | string | false | none | Specifies the context name from the launcher context. If the launchType is service, then contextId or contextName is required. |
contextId | string | false | none | Specifies the context ID from the launcher context. If the launchType is service, then contextId or contextName is required. |
environment
{
"options": [
"string"
],
"autoExecLines": [
"string"
]
}
SAS Environment
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
options | [string] | false | none | Specifies the SAS options to apply to a context. |
autoExecLines | [string] | false | none | Specifies the SAS code to execute during session initialization. |
contextRequest
{
"name": "MyApp",
"version": 4,
"description": "My Application Context",
"attributes": {
"sessionInactiveTimeout": 60
},
"launchContext": {
"contextName": "compsrv"
},
"launchType": "service",
"authorizedUsers": [
"myUser"
],
"mediaTypeMap": {
"csv": "application/vnd.ms-excel"
},
"resources": [
{
"name": "file1",
"uri": "/files/files/ea0d3ee1-894f-4936-bc2b-f611a878a0dd",
"type": "application/vnd.sas.file",
"scope": "SESSION",
"options": {
"LRECL": 1024
}
}
],
"queueName": "MyAppQueue",
"x-widdershins-oldRef": "#/components/schemas/contextRequest/example"
}
Context Creation Request
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
version | integer(int32) | false | none | Specifies the version number of this representation schema. This is version 3. |
name | string | true | none | Specifies the context name. The value of the name is limited to 100 characters. The value must be unique. |
description | string | false | none | Specifies a localized description. The value of description is limited to 1000 characters. |
launchContext | contextLaunchContext | true | none | Provides information about the Launch context that is used by the Compute service. |
launchType | string | true | none | Specifies the type of launcher to use when launching SAS Compute Servers. The only value currently supported is service, which refers to the Launcher service. |
attributes | object | false | none | Specifies the attributes that control the behavior of sessions, based on this context. See the example for details. |
environment | environment | false | none | Provides the SAS options and initialization code that is used by the Compute service and its sessions. |
authorizedUsers | [string] | false | none | Specifies the list of users who are allowed to request sessions using the specified context. |
authorizedGroups | [string] | false | none | Specifies the list of groups whose memes are allowed to request sessions using the specified context. |
authorizeAllAuthenticatedUsers | boolean | false | none | Specifies whether all authenticated users are allowed to request sessions using the specified context. If true, then authorizedUsers and authorizedGroups are ignored. |
facilitateGuest | boolean | false | none | Specifies whether the guest user is allowed to request sessions using the specified context. |
mediaTypeMap | object | false | none | Specifies optional information that overrides mappings of file extensions to media types in sessions that are launched for this context. The session attempts to use file extensions to determine the media type of files that are returned. Standard IANA type mappings are used. To override the default behavior of the server, specify a mapping from a file extension to a media type name. That media type is then used for that file extension. |
» additionalProperties | string | false | none | none |
resources | [resource] | false | none | Specifies the resources that have been requested to be added to this context. |
queueName | string | false | none | Specifies the name of the workload queue where Compute servers configured from this context should run. If workload queues are not supported, this specification will be ignored. The value of the queue name is limited to 250 characters. |
context
{
"description": "My Application Context",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context"
},
{
"method": "GET",
"rel": "alternate",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context",
"responseType": "application/vnd.sas.compute.context"
},
{
"method": "PUT",
"rel": "updateWithRules",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context.request",
"responseType": "application/vnd.sas.compute.context"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12"
},
{
"method": "POST",
"rel": "createSession",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions",
"type": "application/vnd.sas.compute.session.request",
"responseType": "application/vnd.sas.compute.session"
},
{
"method": "GET",
"rel": "rules",
"href": "/authorization/rules?filter=eq(objectUri,'/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions')",
"uri": "/authorization/rules?filter=eq(objectUri,'/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions')",
"type": "application/vnd.sas.collection",
"responseType": "application/vnd.sas.authorization.rule"
}
],
"launchType": "service",
"launchContext": {
"contextName": "compsrv"
},
"attributes": {
"sessionInactiveTimeout": 60
},
"mediaTypeMap": {
"csv": "application/vnd.ms-excel"
},
"createdBy": "myUserID",
"modifiedBy": "myUserID",
"modifiedTimeStamp": "2018-05-04T18:02:27.780Z",
"creationTimeStamp": "2018-05-04T18:02:27.749Z",
"id": "309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"version": 4,
"name": "MyApp",
"queueName": "MyAppQueue",
"resources": [
{
"name": "file1",
"uri": "/files/files/ea0d3ee1-894f-4936-bc2b-f611a878a0dd",
"type": "application/vnd.sas.file",
"scope": "SESSION",
"options": {
"LRECL": 1024
}
}
]
}
Context
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
version | integer(int32) | false | none | Specifies the version number of this representation schema. This is version 4. |
id | string(object-id) | true | none | Specifies the Compute context definition ID. |
name | string | true | none | Specifies the localized context name. |
description | string | false | none | Specifies the localized description. |
launchContext | contextLaunchContext | true | none | Provides information about the Launch context that is used by the Compute service. |
launchType | string | true | none | Specifies the type of launcher to use when launching SAS Compute Servers. The only value currently supported is service, which refers to the Launcher service. |
attributes | object | false | none | Specifies the service-defined attributes that were set when this context was created. |
environment | environment | false | none | Provides the SAS options and initialization code that is used by the Compute service and its sessions. |
mediaTypeMap | object | false | none | Specifies optional information that overrides mappings of file extensions to media types in the sessions that was launched for this context. The session attempts to use file extensions to determine the media type of the files that are returned. Standard IANA type mappings are used. To override the default behavior of the server, specify a mapping from a file extension to a media type name. That media type is then used for that file extension. |
» additionalProperties | string | false | none | none |
createdBy | string | false | none | Specifies the user-ID that created the context definition. |
modifiedBy | string | false | none | Specifies the user ID that last updated the context definition. |
creationTimeStamp | string(date-time) | false | none | Specifies the timestamp when the context was created. |
modifiedTimeStamp | string(date-time) | false | none | Specifies the timestamp when the context was last updated. |
links | [object] | false | none | Specifies links that apply to the context. |
» Link | object | false | none | A link to a related operation or resource. |
»» method | string | false | none | The HTTP method for the link. |
»» rel | string | true | none | The relationship of the link to the resource. |
»» uri | string | false | none | The relative URI for the link. |
»» href | string | false | none | The URL for the link. |
»» title | string | false | none | The title for the link. |
»» type | string | false | none | The media type or link type for the link. |
»» itemType | string | false | none | If this is a link to a container, itemType is the media type or link type for the items in the container. |
»» responseType | string | false | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
»» responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
resources | [resource] | false | none | Specifies the resources that have been configured for this context. |
queueName | string | false | none | Specifies the name of the workload queue where Compute servers configured from this context should run. If workload queues are not supported, this specification will be ignored. The value of the queue name is limited to 250 characters. |
contextSummary
{
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context"
},
{
"method": "GET",
"rel": "alternate",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context.summary"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12"
},
{
"method": "POST",
"rel": "createSession",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions",
"type": "application/vnd.sas.compute.session.request",
"responseType": "application/vnd.sas.compute.session"
}
],
"id": "309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"version": 2,
"createdBy": "myUserID",
"name": "MyApp"
}
Context Summary
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
version | integer(int32) | false | none | Specifies the version number of this representation schema. This is version 2. |
id | string(object-id) | false | none | Specifies the definition ID of the Compute context summary. |
name | string | false | none | Specifies the localized context name. |
createdBy | string | false | none | Specifies the user-ID that created the context definition. |
links | [link] | false | none | Specifies the links that apply to the context. |
contextSummaryCollection
{
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/compute/contexts",
"uri": "/compute/contexts",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "self",
"href": "/compute/contexts?start=0&limit=10",
"uri": "/compute/contexts?start=0&limit=10",
"type": "application/vnd.sas.collection"
},
{
"method": "PUT",
"rel": "createContext",
"href": "/compute/contexts",
"uri": "/compute/contexts",
"type": "application/vnd.sas.compute.context",
"responseType": "application/vnd.sas.compute.context"
}
],
"name": "items",
"accept": "application/vnd.sas.compute.context",
"start": 0,
"count": 1,
"items": [
{
"description": "My Application Context",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context"
},
{
"method": "GET",
"rel": "alternate",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"type": "application/vnd.sas.compute.context.summary"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12"
},
{
"method": "POST",
"rel": "createSession",
"href": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions",
"uri": "/compute/contexts/309b3f0b-cda8-4c2b-9089-82a07a4fff12/sessions",
"type": "application/vnd.sas.compute.session.request",
"responseType": "application/vnd.sas.compute.session"
}
],
"id": "MyApp",
"version": 1,
"name": "MyApp"
}
],
"limit": 10,
"version": 2
}
Context Summary Collection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
Context Summary Collection | any | false | none | Provides a paginated collection of context summaries. |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2) |
» name | string | false | none | The name of the collection. |
» start | integer(int64) | false | none | The zero-based index of the first item in the collection. |
» limit | integer | false | none | The number of items that were requested for the collection. |
» count | integer(int64) | false | none | If populated indicates the number of items in the collection. |
» accept | string | false | none | A space-delimited list of media types from which an Accept header may be constructed. |
» links | [link] | false | none | The links that apply to the collection. |
» version | integer | false | none | The version number of the collection representation. This representation is version 2. |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» items | [contextSummary] | true | none | Specifies the array that contains context summaries. |
server
{
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf",
"uri": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf",
"type": "application/vnd.sas.compute.server"
},
{
"method": "GET",
"rel": "alternate",
"href": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf",
"uri": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf",
"type": "application/vnd.sas.compute.server.summary"
},
{
"method": "GET",
"rel": "collection",
"href": "/compute/servers",
"uri": "/compute/servers",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.server"
},
{
"method": "GET",
"rel": "state",
"href": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf/state",
"uri": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf/state",
"type": "text/plain"
},
{
"method": "GET",
"rel": "sessions",
"href": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf/sessions",
"uri": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf/sessions",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.session"
},
{
"method": "POST",
"rel": "createsession",
"href": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf/sessions",
"uri": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf/sessions",
"type": "application/vnd.sas.compute.session"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf",
"uri": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf"
}
],
"contextName": "MyApp",
"id": "fc40be99-470c-4142-83c5-2ca7068f28bf"
}
SAS Compute Server
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
version | integer(int32) | false | none | Specifies the version number of this representation schema. This is version 2. |
name | string | false | none | Specifies an optional name that is associated with this server. |
description | string | false | none | Specifies an optional description for this server. |
creationTimeStamp | string(date-time) | false | none | Specifies the timestamp when the server was created. |
createdBy | string | false | none | Specifies the user ID that created the server. |
id | string | false | none | Specifies the identifier for this server. |
state | string | false | none | Specifies the current state of this server. The current value is running. |
links | [link] | false | none | Specifies the links that apply to this server. |
serverSummary
{
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf",
"uri": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf",
"type": "application/vnd.sas.compute.server"
},
{
"method": "GET",
"rel": "alternate",
"href": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf",
"uri": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf",
"type": "application/vnd.sas.compute.server.summary"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf",
"uri": "/compute/servers/fc40be99-470c-4142-83c5-2ca7068f28bf"
}
],
"id": "fc40be99-470c-4142-83c5-2ca7068f28bf"
}
SAS Compute Server Summary
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
version | integer(int32) | false | none | Specifies the version number of this representation schema. This is version 1. |
id | string | false | none | Specifies the identifier of this server. |
links | [link] | false | none | Specifies the links that apply to this server. |
serverSummaryCollection
{
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/compute/servers",
"uri": "/compute/servers",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "self",
"href": "/compute/servers?start=0&limit=10",
"uri": "/compute/servers?start=0&limit=10",
"type": "application/vnd.sas.collection"
}
],
"name": "items",
"accept": "application/vnd.sas.compute.server.summary",
"items": [
{
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/servers/71fc2eae-272c-45b4-aaf7-76f6cf259400",
"uri": "/compute/servers/71fc2eae-272c-45b4-aaf7-76f6cf259400",
"type": "application/vnd.sas.compute.server"
},
{
"method": "GET",
"rel": "alternate",
"href": "/compute/servers/71fc2eae-272c-45b4-aaf7-76f6cf259400",
"uri": "/compute/servers/71fc2eae-272c-45b4-aaf7-76f6cf259400",
"type": "application/vnd.sas.compute.server.summary"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/compute/servers/71fc2eae-272c-45b4-aaf7-76f6cf259400",
"uri": "/compute/servers/71fc2eae-272c-45b4-aaf7-76f6cf259400"
}
],
"id": "71fc2eae-272c-45b4-aaf7-76f6cf259400"
}
],
"version": 2
}
SAS Compute Server Summary Collection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
SAS Compute Server Summary Collection | any | false | none | Provides a paginated collection of server summary objects. |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | contextSummaryCollection | false | none | This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2) |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» items | [serverSummary] | true | none | Specifies the array that contains resource information about the server summary. |
logStatistics
{
"lineCount": 0,
"modifiedTimeStamp": "2019-08-24T14:15:22Z"
}
Log Statistics
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
lineCount | integer | false | none | Specifies the number of lines in the specified log. |
modifiedTimeStamp | string(date-time) | false | none | Specifies the timestamp when the log information was last updated. |
listingStatistics
{
"lineCount": 0,
"modifiedTimeStamp": "2019-08-24T14:15:22Z"
}
Listing Statistics
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
lineCount | integer | false | none | Specifies the number of lines in the specified listing. |
modifiedTimeStamp | string(date-time) | false | none | Specifies the timestamp when the listing information was last updated. |
sessionStatistics
{
"systemCpuTime": 0,
"userCpuTime": 0,
"memorySize": 0
}
Session Statistics
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
systemCpuTime | number(double) | false | none | Specifies the elapsed CPU time that is related to the system for a session. |
userCpuTime | number(double) | false | none | Specifies the elapsed CPU time that is related to the user tasks for a session. |
memorySize | integer | false | none | Specifies the highest level of memory usage by the session. |
session
{
"listingStatistics": {
"lineCount": 5,
"modifiedTimeStamp": "2017-02-20T19:17:33.000Z"
},
"logStatistics": {
"lineCount": 45,
"modifiedTimeStamp": "2017-02-20T19:17:33.000Z"
},
"serviceAPIVersion": 4,
"sessionConditionCode": 0,
"stateElapsedTime": 21,
"attributes": {
"sessionInactiveTimeout": 60
},
"state": "idle",
"owner": "myUserID",
"environment": {
"options": [
"memsize=4g",
"fullstimer"
]
},
"creationTimeStamp": "2016-09-28T14:26:14.000Z",
"serverId": "c1a108bb-6019-4876-807f-eeac467b9c08",
"description": "This is my test session.",
"id": "c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"type": "application/vnd.sas.compute.session"
},
{
"method": "GET",
"rel": "alternate",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"type": "application/vnd.sas.compute.session.summary"
},
{
"method": "GET",
"rel": "state",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/state",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/state",
"type": "text/plain"
},
{
"method": "PUT",
"rel": "cancel",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/state?state=canceled",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/state?state=canceled"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000"
},
{
"method": "POST",
"rel": "execute",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/jobs",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/jobs",
"type": "application/vnd.sas.compute.job.request",
"responseType": "application/vnd.sas.compute.job"
},
{
"method": "GET",
"rel": "jobs",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/jobs",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/jobs",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.job"
},
{
"method": "GET",
"rel": "files",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/filerefs",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/filerefs",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.fileref.summary"
},
{
"method": "POST",
"rel": "assignFileref",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/filerefs",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/filerefs",
"type": "application/vnd.sas.compute.fileref.request",
"responseType": "application/vnd.sas.compute.fileref"
},
{
"method": "GET",
"rel": "librefs",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/data",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/data",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.library.summary"
},
{
"method": "GET",
"rel": "log",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/log",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/log",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.log.line"
},
{
"method": "GET",
"rel": "listing",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/listing",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/listing",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.log.line"
},
{
"method": "GET",
"rel": "results",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/results",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000/results",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.result"
}
],
"version": 2,
"name": "MySession"
}
Session
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
version | integer(int32) | false | none | Specifies the version number of this representation schema. This is version 2. |
name | string | false | none | Specifies an optional name that is associated with this session. |
description | string | false | none | Specifies an optional description for this session. |
attributes | object | false | none | Specifies attributes that were defined when the session was requested. |
creationTimeStamp | string(date-time) | false | none | Specifies the timestamp when the session was created. |
owner | string | false | none | Specifies the user Id of the owner of this session. |
id | string | false | none | Specifies the identifier for this session, as determined by the server. |
serverId | string | false | none | Specifies the identifier of the server that this session belongs to. |
state | string | false | none | Specifies the current state of this session. Here are the possible values: completed, failed, running, idle, pending, or stopped. |
sessionConditionCode | integer | false | none | Specifies the condition code for this session. This is set to the highest value of any jobConditionCode for jobs that executed in the session. |
logStatistics | logStatistics | false | none | Provides information about the log for a session or a job. |
listingStatistics | listingStatistics | false | none | Provides information about the output for a session or job. |
sessionStatistics | sessionStatistics | false | none | Provides performance data for a session. |
applicationName | string | false | none | Specifies the name of the application that requested this session. |
serviceAPIVersion | integer | false | none | The version of the service API that this session supports. |
links | [link] | false | none | Specifies links that apply to this session. |
sessionSummary
{
"id": "c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"type": "application/vnd.sas.compute.session"
},
{
"method": "GET",
"rel": "alternate",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"type": "application/vnd.sas.compute.session.summary"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000"
}
],
"version": 1,
"name": "MySession"
}
Session Summary
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
version | integer(int32) | false | none | Specifies the version number of this representation schema. This is version 2. |
name | string | false | none | Specifies an optional name that is associated with this session. |
id | string | false | none | Specifies an identifier for this session, as determined by the server. |
owner | string | false | none | Specifies the user ID of the owner of this session. |
links | [link] | false | none | Specifies links that apply to this session. |
sessionSummaryCollection
{
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/compute/sessions",
"uri": "/compute/sessions",
"type": "application/vnd.sas.collection"
},
{
"method": "GET",
"rel": "self",
"href": "/compute/sessions?start=0&limit=10",
"uri": "/compute/sessions?start=0&limit=10",
"type": "application/vnd.sas.collection"
}
],
"name": "items",
"accept": "application/vnd.sas.compute.session.summary",
"count": 1,
"items": [
{
"id": "c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"type": "application/vnd.sas.compute.session"
},
{
"method": "GET",
"rel": "alternate",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"type": "application/vnd.sas.compute.session.summary"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000",
"uri": "/compute/sessions/c1a108bb-6019-4876-807f-eeac467b9c08-ses0000"
}
],
"version": 1,
"name": "MySession"
}
],
"version": 2
}
Session Summary Collection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
Session Summary Collection | any | false | none | Provides a paginated collection of Compute session summaries. |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | contextSummaryCollection | false | none | This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2) |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» items | [sessionSummary] | true | none | Specifies an array that contains session summary resources. |
sessionRequest
{
"version": 1,
"name": "MySession",
"description": "This is my session for doing some simple work.",
"attributes": {
"sessionInactiveTimeout": 60
},
"environment": {
"options": [
"memsize=4g",
"fullstimer"
]
},
"resources": [
{
"name": "file1",
"uri": "/files/files/ea0d3ee1-894f-4936-bc2b-f611a878a0dd",
"type": "application/vnd.sas.file",
"scope": "SESSION",
"options": {
"LRECL": 1024
}
}
],
"x-widdershins-oldRef": "#/components/schemas/sessionRequest/example"
}
Session Request
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
version | integer(int32) | false | none | Specifies the version number of this representation schema. This is version 2. |
name | string | false | none | Specifies an optional name that is associated with this session. The value of name is limited to 100 characters. The name is used for informational purposes only. |
description | string | false | none | Specifies an optional description for this session. The value of description is limited to 1000 characters. |
attributes | object | false | none | Specifies service-specific attributes that control the behavior of this session. See the example for details. |
environment | environment | false | none | Provides the SAS options and initialization code that is used by the Compute service and its sessions. |
resources | [resource] | false | none | Specifies the resources that are requested for this session. |
jobRequest
{
"version": 2,
"name": "MyOptions",
"description": "Getting the options for my session.",
"code": [
"proc options;",
"run;"
],
"attributes": {
"resetLogLineNumbers": false
},
"x-widdershins-oldRef": "#/components/schemas/jobRequest/example"
}
Job Request
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
version | integer(int32) | false | none | Specifies the version number of this representation schema. This is version 3. |
name | string | false | none | Specifies an optional name that is associated with this job. |
description | string | false | none | Specifies an optional description for this job. |
environment | environment | false | none | Provides the SAS options and initialization code that is used by the Compute service and its sessions. |
variables | object | false | none | Specifies input variables for this request. |
» additionalProperties | string | false | none | none |
code | [string] | false | none | none |
codeUri | string | false | none | Specifies a URI path to a resource reference from the Files service. You must specify code or codeUri. |
resources | [resource] | false | none | Specifies the resources that are requested for this job. |
attributes | object | false | none | Specifies the attributes that modify the behavior of this job request. See example for details. Support for these attributes was added in version 2. |
jobStatistics
{
"systemCpuTime": 0,
"userCpuTime": 0
}
Job Statistics
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
systemCpuTime | number(double) | false | none | Specifies the elapsed CPU time that is related to the system. |
userCpuTime | number(double) | false | none | Specifies the elapsed CPU time that is related to user tasks. |
job
{
"listingStatistics": {
"lineCount": 5,
"modifiedTimeStamp": "2017-02-20T19:17:33.000Z"
},
"logStatistics": {
"lineCount": 45,
"modifiedTimeStamp": "2017-02-20T19:17:33.000Z"
},
"completedTimeStamp": "2016-05-20T16:16:10.000Z",
"creationTimeStamp": "2016-05-20T16:16:10.000Z",
"id": "0",
"jobConditionCode": 0,
"links": [
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.job",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/state",
"method": "GET",
"rel": "state",
"type": "text/plain",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/state"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/state?value=canceled",
"method": "PUT",
"rel": "cancel",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/state?value=canceled"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0",
"method": "DELETE",
"rel": "delete",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/log",
"itemType": "application/vnd.sas.compute.log.line",
"method": "GET",
"rel": "log",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/log"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/listing",
"itemType": "application/vnd.sas.compute.log.line",
"method": "GET",
"rel": "listing",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/listing"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/results",
"method": "GET",
"rel": "results",
"type": "application/vnd.sas.compute.result",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/results"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000",
"method": "GET",
"rel": "up",
"type": "application/vnd.sas.compute.session",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000"
}
],
"sessionId": "4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000",
"state": "completed",
"version": 1
}
Job
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
version | integer(int32) | false | none | Specifies the version number of this representation schema. This is version 1. |
id | string | false | none | Specifies the identifier that describes this job. |
name | string | false | none | Specifies an optional name that is associated with this job. |
description | string | false | none | Specifies an optional description for this job. |
creationTimeStamp | string(date-time) | false | none | Specifies the timestamp when the job was created. |
completedTimeStamp | string(date-time) | false | none | Specifies the timestamp when the job completed. |
sessionId | string | false | none | Specifies the session that this job was submitted in. |
state | string | false | none | Specifies the current state of this job. Here are the possible values: pending, running, canceled, warning, error, or completed. |
jobConditionCode | integer | false | none | Specifies the condition code for this job. This value is set when the job completes, and the value is set to the value of the SYSCC macro variable. |
logStatistics | logStatistics | false | none | Provides information about the log for a session or a job. |
listingStatistics | listingStatistics | false | none | Provides information about the output for a session or job. |
statistics | jobStatistics | false | none | Provides performance data for a job. |
links | [link] | false | none | Specifies the links that apply to this job. |
jobCollection
{
"accept": "application/vnd.sas.compute.job",
"count": 1,
"items": [
{
"completedTimeStamp": "2016-05-20T16:16:10.000Z",
"creationTimeStamp": "2016-05-20T16:16:10.000Z",
"id": "0",
"jobConditionCode": 0,
"links": [
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.job",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/state",
"method": "GET",
"rel": "state",
"type": "text/plain",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/state"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/state?value=canceled",
"method": "PUT",
"rel": "cancel",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/state?value=canceled"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0",
"method": "DELETE",
"rel": "delete",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/log",
"itemType": "application/vnd.sas.compute.log.line",
"method": "GET",
"rel": "log",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/log"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/listing",
"itemType": "application/vnd.sas.compute.log.line",
"method": "GET",
"rel": "listing",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/listing"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/results",
"method": "GET",
"rel": "results",
"type": "application/vnd.sas.compute.result",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs/0/results"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000",
"method": "GET",
"rel": "up",
"type": "application/vnd.sas.compute.session",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000"
}
],
"sessionId": "4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000",
"state": "completed"
}
],
"limit": 10,
"links": [
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs?start=0&limit=10",
"itemType": "application/vnd.sas.compute.job",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs?start=0&limit=10"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs",
"itemType": "application/vnd.sas.compute.job",
"method": "GET",
"rel": "collection",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs"
},
{
"href": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs",
"method": "POST",
"rel": "create",
"type": "application/vnd.sas.compute.job",
"uri": "/compute/sessions/4c6775e3-50f3-4c72-80a3-a7e1069876dc-ses0000/jobs"
}
],
"name": "Current Jobs",
"start": 0,
"version": 2
}
Job Collection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
Job Collection | any | false | none | Provides a paginated collection of jobs. |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | contextSummaryCollection | false | none | This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2) |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» items | [job] | true | none | Specifies an array that contains job resources. |
result
{
"id": "string",
"name": "string",
"type": "LIBRARY",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
]
}
Result
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | Specifies the identifier for this result item. |
name | string | false | none | Specifies the human readable name of the result item. |
type | string | false | none | Specifies the type of output that is generated for this result. |
links | [link] | false | none | Specifies links that apply to this result. |
Enumerated Values
Property | Value |
---|---|
type | LIBRARY |
type | TABLE |
type | FILE |
type | ODS |
resultCollection
{
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/jobs/0/results?start=0&limit=2",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/jobs/0/results?start=0&limit=2",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.result"
},
{
"method": "GET",
"rel": "collection",
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/jobs/0/results",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/jobs/0/results",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.result"
}
],
"name": "Results",
"accept": "application/vnd.sas.compute.result",
"start": 0,
"count": 2,
"items": [
{
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/results/d23e6437/sashtml.htm",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/results/d23e6437/sashtml.htm",
"type": "*/*"
}
],
"id": "sashtml.htm",
"name": "sashtml.htm",
"type": "ODS",
"version": 1
},
{
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/WORK/TEST",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/WORK/TEST",
"type": "application/vnd.sas.compute.data.table.summary"
}
],
"id": "TEST",
"name": "TEST",
"type": "TABLE",
"version": 1
}
],
"limit": 2,
"version": 2
}
Result Collection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
Result Collection | any | false | none | Provides a paginated collection of result objects. |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | contextSummaryCollection | false | none | This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2) |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» items | [result] | true | none | Specifies an array that contains results. |
logLine
{
"version": 0,
"type": "normal",
"line": "string"
}
Line
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
version | integer(int32) | false | none | Specifies the version number of this representation schema. This is version 1. |
type | string | true | none | Specifies the line entry classification. |
line | string | true | none | Specifies the line of text without the type (classification) prefix marker. |
Enumerated Values
Property | Value |
---|---|
type | normal |
type | hilighted |
type | source |
type | title |
type | byline |
type | footnote |
type | error |
type | warning |
type | note |
type | message |
sessionLogCollection
{
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/log?start=0&limit=42",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/log?start=0&limit=42",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.log.line"
},
{
"method": "GET",
"rel": "collection",
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/log",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/log",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.log.line"
}
],
"name": "Session Log",
"accept": "application/vnd.sas.compute.log.line",
"start": 0,
"count": 42,
"items": [
{
"line": "11 The SAS System 15:26 Friday, May 20, 2016",
"type": "title"
},
{
"line": " ",
"type": "title"
},
{
"line": " NOTE: Copyright (c) 2016 by SAS Institute Inc., Cary, NC, USA. ",
"type": "note"
},
{
"line": " NOTE: SAS (r) Proprietary Software V.03.00 (TS03.00M0D05192016 MBCS3280) ",
"type": "note"
},
{
"line": " Licensed to SAS Institute Inc., Site 1.",
"type": "note"
},
{
"line": " NOTE: This session is executing on the Linux 2.6.32-573.el6.x86_64 (LIN X64) platform.",
"type": "note"
},
{
"line": " ",
"type": "normal"
},
{
"line": " ",
"type": "normal"
},
{
"line": " ",
"type": "normal"
},
{
"line": " NOTE: Updated analytical products:",
"type": "note"
},
{
"line": " ",
"type": "note"
},
{
"line": " SAS/STAT 14.1",
"type": "note"
},
{
"line": " SAS/ETS 14.1",
"type": "note"
},
{
"line": " SAS/OR 14.1",
"type": "note"
},
{
"line": " SAS/IML 14.1",
"type": "note"
},
{
"line": " SAS/QC 14.1",
"type": "note"
},
{
"line": " ",
"type": "note"
},
{
"line": " NOTE: Additional host information:",
"type": "note"
},
{
"line": " ",
"type": "note"
},
{
"line": " Linux LIN X64 2.6.32-573.el6.x86_64 #1 SMP Wed Jul 1 18:23:37 EDT 2015 x86_64 Red Hat Enterprise Linux Server release 6.7 ",
"type": "note"
},
{
"line": " (Santiago) ",
"type": "note"
},
{
"line": " ",
"type": "note"
},
{
"line": " NOTE: SAS initialization used:",
"type": "note"
},
{
"line": " real time 2.24 seconds",
"type": "note"
},
{
"line": " cpu time 0.19 seconds",
"type": "note"
},
{
"line": " ",
"type": "note"
},
{
"line": " 1 ods html style=barrettsblue;",
"type": "source"
},
{
"line": " NOTE: Writing HTML Body file: sashtml.htm",
"type": "note"
},
{
"line": " 2 data test;x=3;run;",
"type": "source"
},
{
"line": " NOTE: The data set WORK.TEST has 1 observations and 1 variables.",
"type": "note"
},
{
"line": " NOTE: DATA statement used (Total process time):",
"type": "note"
},
{
"line": " real time 0.78 seconds",
"type": "note"
},
{
"line": " cpu time 0.03 seconds",
"type": "note"
},
{
"line": " ",
"type": "note"
},
{
"line": " 2 ! proc print data=test;quit;",
"type": "source"
},
{
"line": " NOTE: There were 1 observations read from the data set WORK.TEST.",
"type": "note"
},
{
"line": " NOTE: The PROCEDURE PRINT printed page 1.",
"type": "note"
},
{
"line": " NOTE: PROCEDURE PRINT used (Total process time):",
"type": "note"
},
{
"line": " real time 0.18 seconds",
"type": "note"
},
{
"line": " cpu time 0.11 seconds",
"type": "note"
},
{
"line": " ",
"type": "note"
},
{
"line": " 3 ods html close;",
"type": "source"
}
],
"limit": 42,
"version": 2
}
Session Log
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
Session Log | any | false | none | Provides a collection of line objects that comprise the log for a session. |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | contextSummaryCollection | false | none | This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2) |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» items | [logLine] | true | none | Specifies an array that contains log lines from the session. |
jobLogCollection
{
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/sessions/92626ce2-db0f-4d11-b9cf-439a567dbcb7-ses0000/jobs/0/log?start=0&limit=100",
"uri": "/compute/sessions/92626ce2-db0f-4d11-b9cf-439a567dbcb7-ses0000/jobs/0/log?start=0&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.log.line"
},
{
"method": "GET",
"rel": "collection",
"href": "/compute/sessions/92626ce2-db0f-4d11-b9cf-439a567dbcb7-ses0000/jobs/0/log",
"uri": "/compute/sessions/92626ce2-db0f-4d11-b9cf-439a567dbcb7-ses0000/jobs/0/log",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.log.line"
},
{
"method": "GET",
"rel": "next",
"href": "/compute/sessions/92626ce2-db0f-4d11-b9cf-439a567dbcb7-ses0000/jobs/0/log?start=100&limit=100",
"uri": "/compute/sessions/92626ce2-db0f-4d11-b9cf-439a567dbcb7-ses0000/jobs/0/log?start=100&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.log.line"
},
{
"method": "GET",
"rel": "last",
"href": "/compute/sessions/92626ce2-db0f-4d11-b9cf-439a567dbcb7-ses0000/jobs/0/log?start=589&limit=100",
"uri": "/compute/sessions/92626ce2-db0f-4d11-b9cf-439a567dbcb7-ses0000/jobs/0/log?start=589&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.log.line"
}
],
"name": "Job Log",
"accept": "application/vnd.sas.compute.log.line",
"start": 0,
"count": 689,
"items": [
{
"line": " 1 %put %sysget(SASROOT);",
"type": "source"
},
{
"line": " /sasgen/dev/mva-vb005/SAS/laxdo",
"type": "normal"
},
{
"line": " 2 proc options option=JREOPTIONS value; run;",
"type": "source"
},
{
"line": " SAS (r) Proprietary Software Release V.03.00M0P05192016",
"type": "normal"
},
{
"line": " ",
"type": "normal"
},
{
"line": " Option Value Information For SAS Option JREOPTIONS",
"type": "normal"
},
{
"line": " Value: ( -Djava.class.path=/sasgen/dev/mva-vb005/SAS/laxdo/vjr/eclipse/plugins/sas.launcher.jar ",
"type": "normal"
},
{
"line": " -Dlog4j.configuration=file:/sasgen/dev/mva-vb005/SAS/laxdo/misc/tkjava/sas.log4j.properties ",
"type": "normal"
},
{
"line": " -Dsas.app.class.path=/sasgen/dev/mva-vb005/SAS/laxdo/vjr/eclipse/plugins/tkjava.jar ",
"type": "normal"
},
{
"line": " -Djava.security.auth.login.config=/sasgen/dev/mva-vb005/SAS/laxdo/misc/tkjava/sas.login.config ",
"type": "normal"
},
{
"line": " -Djava.security.policy=/sasgen/dev/mva-vb005/SAS/laxdo/misc/tkjava/sas.policy -Djava.system.class.loader=com.sas.app.AppClassLoader ",
"type": "normal"
},
{
"line": " -Dsas.ext.config=/sasgen/dev/mva-vb005/SAS/laxdo/misc/tkjava/sas.java.ext.config ",
"type": "normal"
},
{
"line": " -DPFS_TEMPLATE=/sasgen/dev/mva-vb005/SAS/laxdo/misc/tkjava/qrpfstpt.xml ",
"type": "normal"
},
{
"line": " -Dtkj.app.launch.config=/sasgen/dev/mva-vb005/SAS/laxdo/picklist -Xusealtsigs )",
"type": "normal"
},
{
"line": " Scope: SAS Session",
"type": "normal"
},
{
"line": " How option value set: Config File",
"type": "normal"
},
{
"line": " Config file name:",
"type": "normal"
},
{
"line": " /sasgen/dev/mva-vb005/SAS/laxdo/sasv9.cfg",
"type": "normal"
},
{
"line": " ",
"type": "normal"
},
{
"line": " NOTE: PROCEDURE OPTIONS used (Total process time):",
"type": "note"
},
{
"line": " real time 0.00 seconds",
"type": "note"
},
{
"line": " cpu time 0.00 seconds",
"type": "note"
},
{
"line": " ",
"type": "note"
},
{
"line": " 3 proc options option=SASUSER value; run;",
"type": "source"
},
{
"line": " SAS (r) Proprietary Software Release V.03.00M0P05192016",
"type": "normal"
},
{
"line": " ",
"type": "normal"
},
{
"line": " Option Value Information For SAS Option SASUSER",
"type": "normal"
},
{
"line": " Value: ~/sasuser.mva-vb005.lax",
"type": "normal"
},
{
"line": " Scope: SAS Session",
"type": "normal"
},
{
"line": " How option value set: Config File",
"type": "normal"
},
{
"line": " Config file name:",
"type": "normal"
},
{
"line": " /sasgen/dev/mva-vb005/SAS/laxdo/sasv9.cfg",
"type": "normal"
},
{
"line": " ",
"type": "normal"
},
{
"line": " NOTE: PROCEDURE OPTIONS used (Total process time):",
"type": "note"
},
{
"line": "12 The SAS System 15:13 Friday, May 20, 2016",
"type": "title"
},
{
"line": " ",
"type": "title"
},
{
"line": " real time 0.00 seconds",
"type": "note"
},
{
"line": " cpu time 0.00 seconds",
"type": "note"
},
{
"line": " ",
"type": "note"
},
{
"line": " 4 proc options; run;",
"type": "source"
},
{
"line": " SAS (r) Proprietary Software Release V.03.00M0P05192016",
"type": "normal"
},
{
"line": " ",
"type": "normal"
},
{
"line": " ",
"type": "normal"
},
{
"line": " Portable Options:",
"type": "normal"
},
{
"line": " ",
"type": "normal"
},
{
"line": " ANIMATION=STOP Specifies whether to start or stop animation.",
"type": "normal"
},
{
"line": " ANIMDURATION=MIN Specifies the number of seconds that each animation frame displays.",
"type": "normal"
},
{
"line": " ANIMLOOP=YES Specifies the number of iterations that animated images repeat.",
"type": "normal"
},
{
"line": " ANIMOVERLAY Specifies that animation frames are overlaid in order to view all frames.",
"type": "normal"
},
{
"line": " APPEND= Specifies an option=value pair to insert the value at the end of the existing option value.",
"type": "normal"
},
{
"line": " APPLETLOC=/sasgen/dev/mva-vb005/avdobj/jar/laxno",
"type": "normal"
},
{
"line": " Specifies the location of Java applets, which is typically a URL.",
"type": "normal"
},
{
"line": " ARMAGENT= Specifies an ARM agent (which is an executable module or keyword, such as LOG4SAS) that contains a specific ",
"type": "normal"
},
{
"line": " implementation of the ARM API.",
"type": "normal"
},
{
"line": " ARMLOC=ARMLOG.LOG Specifies the location of the ARM log.",
"type": "normal"
},
{
"line": " ARMSUBSYS=(ARM_NONE)",
"type": "normal"
},
{
"line": " Specifies the SAS ARM subsystems to enable or disable.",
"type": "normal"
},
{
"line": " AUTOCORRECT Automatically corrects misspelled procedure names and keywords, and global statement names.",
"type": "normal"
},
{
"line": " AUTOEXEC= Specifies the location of the SAS AUTOEXEC files.",
"type": "normal"
},
{
"line": " AUTOSAVELOC= Specifies the location of the Program Editor auto-saved file.",
"type": "normal"
},
{
"line": " NOAUTOSIGNON Disables a SAS/CONNECT client from automatically submitting the SIGNON command remotely with the RSUBMIT command.",
"type": "normal"
},
{
"line": " BINDING=DEFAULT Specifies the binding edge type of duplexed printed output.",
"type": "normal"
},
{
"line": " BOMFILE Writes the byte order mark (BOM) prefix when a Unicode-encoded file is written to an external file.",
"type": "normal"
},
{
"line": " BOTTOMMARGIN=0.000 IN",
"type": "normal"
},
{
"line": " Specifies the size of the margin at the bottom of a printed page.",
"type": "normal"
},
{
"line": " BUFNO=1 Specifies the number of buffers for processing SAS data sets.",
"type": "normal"
},
{
"line": " BUFSIZE=0 Specifies the size of a buffer page for output SAS data sets.",
"type": "normal"
},
{
"line": " BYERR SAS issues an error message and stops processing if the SORT procedure attempts to sort a _NULL_ data set.",
"type": "normal"
},
{
"line": " BYLINE Prints the BY line above each BY group.",
"type": "normal"
},
{
"line": " BYSORTED Requires observations in one or more data sets to be sorted in alphabetic or numeric order.",
"type": "normal"
},
{
"line": " NOCAPS Does not convert certain types of input, and all data lines, into uppercase characters.",
"type": "normal"
},
{
"line": " NOCARDIMAGE Does not process SAS source code and data lines as 80-byte records.",
"type": "normal"
},
{
"line": " CASAUTHINFO= Specifies an authinfo or netrc file that includes authentication information.",
"type": "normal"
},
{
"line": " CASHOST= The CAS server name associated with a CAS session.",
"type": "normal"
},
{
"line": " CASLIB= Specify the default CASLIB name.",
"type": "normal"
},
{
"line": " CASNAME=CASAUTO Identify the name to associate with a generated CAS session.",
"type": "normal"
},
{
"line": " CASNWORKERS=ALL Specify the number of workers to use with a CAS session.",
"type": "normal"
},
{
"line": " CASPORT=0 The port associated with a CAS session.",
"type": "normal"
},
{
"line": " CASSESSOPTS= Identify CAS server session options.",
"type": "normal"
},
{
"line": " CASTIMEOUT=60 The CAS session timeout in seconds.",
"type": "normal"
},
{
"line": " CASUSER= The userid associated with a CAS session.",
"type": "normal"
},
{
"line": " CATCACHE=0 Specifies the number of SAS catalogs to keep open in cache memory.",
"type": "normal"
},
{
"line": " CBUFNO=0 Specifies the number of extra page buffers to allocate for each open SAS catalog.",
"type": "normal"
},
{
"line": " CENTER Center SAS procedure output.",
"type": "normal"
},
{
"line": " CGOPTIMIZE=3 Specifies the level of optimization to perform during code compilation.",
"type": "normal"
},
{
"line": " NOCHARCODE Does not substitute specific keyboard combinations for special characters that are not on the keyboard.",
"type": "normal"
},
{
"line": " NOCHKPTCLEAN Does not erase files in the Work library after a batch program successfully executes in checkpoint mode or ",
"type": "normal"
},
{
"line": " restart mode.",
"type": "normal"
},
{
"line": " CLEANUP Performs automatic continuous cleanup of non-essential resources in out-of-resource conditions.",
"type": "normal"
},
{
"line": " NOCMDMAC Does not check window environment commands for command-style macros.",
"type": "normal"
},
{
"line": " CMPLIB= Specifies one or more SAS data sets that contain compiler subroutines to include during compilation.",
"type": "normal"
},
{
"line": " CMPMODEL=BOTH Specifies the output model type for the MODEL procedure.",
"type": "normal"
},
{
"line": " CMPOPT=(NOEXTRAMATH NOMISSCHECK NOPRECISE NOGUARDCHECK NOGENSYMNAMES NOFUNCDIFFERENCING SHORTCIRCUIT NOPROFILE)",
"type": "normal"
},
{
"line": " Specifies the type of code-generation optimizations to use in the SAS language compiler.",
"type": "normal"
},
{
"line": "13 The SAS System 15:13 Friday, May 20, 2016",
"type": "title"
},
{
"line": " ",
"type": "title"
},
{
"line": " NOCOLLATE Does not collate multiple copies of printed output.",
"type": "normal"
},
{
"line": " COLOPHON= Specifies the comment text that is included in graphic stream files.",
"type": "normal"
},
{
"line": " COLORPRINTING Prints in color if color printing is supported.",
"type": "normal"
},
{
"line": " COMAMID=TCP Specifies the communication access method for connecting client and server sessions across a network.",
"type": "normal"
}
],
"limit": 100,
"version": 2
}
Job Log
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
Job Log | any | false | none | Provides a collection of line objects that comprise the log for a job. |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | contextSummaryCollection | false | none | This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2) |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» items | [logLine] | true | none | Specifies an array that contains log lines from a job. |
jobListingCollection
{
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/jobs/0/listing?start=0&limit=5",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/jobs/0/listing?start=0&limit=5",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.log.line"
},
{
"method": "GET",
"rel": "collection",
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/jobs/0/listing",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/jobs/0/listing",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.log.line"
}
],
"name": "Job List",
"accept": "application/vnd.sas.compute.log.line",
"start": 0,
"count": 5,
"items": [
{
"line": "1 The SAS System 15:26 Friday, May 20, 2016 1",
"type": "title"
},
{
"line": " ",
"type": "title"
},
{
"line": " Obs x",
"type": "hilighted"
},
{
"line": " ",
"type": "normal"
},
{
"line": " 1 3",
"type": "normal"
}
],
"limit": 5,
"version": 2
}
Job Listing
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
Job Listing | any | false | none | Provides a collection of line objects that comprise the output for a job. |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | contextSummaryCollection | false | none | This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2) |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» items | [logLine] | true | none | Specifies an array that contains listing lines from a job. |
sessionListingCollection
{
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/listing?start=0&limit=5",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/listing?start=0&limit=5",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.log.line"
},
{
"method": "GET",
"rel": "collection",
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/listing",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/listing",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.log.line"
}
],
"name": "Session List",
"accept": "application/vnd.sas.compute.log.line",
"start": 0,
"count": 5,
"items": [
{
"line": "1 The SAS System 15:26 Friday, May 20, 2016 1",
"type": "title"
},
{
"line": " ",
"type": "title"
},
{
"line": " Obs x",
"type": "hilighted"
},
{
"line": " ",
"type": "normal"
},
{
"line": " 1 3",
"type": "normal"
}
],
"limit": 5,
"version": 2
}
Session Listing
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
Session Listing | any | false | none | Provides a collection of line objects that comprise the output for a session. |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | contextSummaryCollection | false | none | This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2) |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» items | [logLine] | true | none | Specifies an array that contains listing lines from a session. |
outputStreamFileRequest
{
"version": 1,
"attributes": {
"format": "prefixedText"
},
"x-widdershins-oldRef": "#/components/schemas/outputStreamFileRequest/example"
}
Output Stream Request to Files Service
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
version | integer(int32) | false | none | Specifies the version number of this representation schema. This is version 1. |
attributes | object | false | none | Specifies the attributes that modify the behavior of this stream request. See example for details. |
concatenation
{
"engineName": "string",
"fileFormat": "string",
"physicalName": "string"
}
Library Concatenation
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
engineName | string | false | none | Specifies the name of the engine that is used for this member of the concatenation. |
fileFormat | string | false | none | Specifies the name of the file format that is used for this member of the concatenation. |
physicalName | string | false | none | Specifies the physical name that is used for this member of the concatenation. |
library
{
"concatenationCount": 2,
"engineName": "V9",
"fileFormat": "7",
"flags": 1057,
"id": "SASHELP",
"libref": "SASHELP",
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/SASHELP",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.library",
"uri": "/compute/sessions/RKEY-ses0000/data/SASHELP"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/SASHELP",
"method": "GET",
"rel": "alternate",
"type": "application/vnd.sas.compute.library.summary",
"uri": "/compute/sessions/RKEY-ses0000/data/SASHELP"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/SASHELP",
"itemType": "application/vnd.sas.compute.data.table.summary",
"method": "GET",
"rel": "tables",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/SASHELP"
}
],
"name": "SASHELP",
"options": "",
"physicalName": "( '/sasgen/dev/mva-vb005/sasdvd/sio/laxnd/en/sashelp' '/sasgen/dev/mva-vb005/sasdvd/sio/laxnd/en/sashelp' )",
"version": 1
}
Library
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
version | integer(int32) | false | none | Specifies the version number of this representation schema. This is version 2. |
id | string | false | none | Specifies the identifier for this library. This value is the same as the specified libref at assignment. |
concatenationCount | integer(int32) | false | none | Specifies the number of concatenated libraries, if any are concatenated. |
concatenations | [concatenation] | false | none | Specifies the information about the concatenated members, if any are concatenated. |
engineName | string | false | none | Specifies the name of the engine that is used with this library. |
fileFormat | string | false | none | Specifies the identifier of the format for this library. |
flags | integer(int32) | false | none | Specifies the flags that were used when the library was created. |
libref | string | false | none | Specifies the name of the referenced library. |
name | string | false | none | Specifies the name of the library resource. |
options | string | false | none | Specifies the options that were used to create this library. |
physicalName | string | false | none | Specifies the resolved location of this library. |
readOnly | boolean | false | none | Specifies whether the library is read only. |
sourceDefinition | string | false | none | Specifies the URI of the source definition used to create this library, if any. |
links | [link] | false | none | Specifies links that apply to this library. |
librarySummary
{
"id": "SASHELP",
"links": [
{
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/SASHELP",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.library",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/SASHELP"
}
],
"name": "SASHELP",
"version": 1
}
Library Summary
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
version | integer(int32) | false | none | The version number of this representation schema. This is version 2. |
id | string(object-id) | false | none | Specifies the identifier for this library summary object. This is currently the same as the libref given at assignment time. |
name | string | false | none | Specifies the name of this library summary. |
links | [link] | false | none | Specifies links that apply to this library summary. |
librarySummaryCollection
{
"accept": "application/vnd.sas.compute.library.summary",
"count": 5,
"items": [
{
"id": "SASHELP",
"links": [
{
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/SASHELP",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.library",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/SASHELP"
}
],
"name": "SASHELP"
},
{
"id": "MAPS",
"links": [
{
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/MAPS",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.library",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/MAPS"
}
],
"name": "MAPS"
},
{
"id": "MAPSGFK",
"links": [
{
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/MAPSGFK",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.library",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/MAPSGFK"
}
],
"name": "MAPSGFK"
},
{
"id": "SASUSER",
"links": [
{
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/SASUSER",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.library",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/SASUSER"
}
],
"name": "SASUSER"
},
{
"id": "WORK",
"links": [
{
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/WORK",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.library",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/WORK"
}
],
"name": "WORK"
}
],
"limit": 5,
"links": [
{
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data?start=0&limit=5",
"itemType": "application/vnd.sas.compute.library.summary",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data?start=0&limit=5"
},
{
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data",
"itemType": "application/vnd.sas.compute.library.summary",
"method": "GET",
"rel": "collection",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data"
},
{
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data",
"method": "POST",
"rel": "create",
"type": "application/vnd.sas.compute.library.summary",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data"
}
],
"name": "SAS Libraries",
"start": 0,
"version": 2
}
Library Summary Collection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
Library Summary Collection | any | false | none | Provides a collection of library summaries. |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | contextSummaryCollection | false | none | This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2) |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» items | [librarySummary] | true | none | Specifies an array that contains library summary resources. |
libraryRequest
{
"version": 1,
"name": "mylib",
"path": "/u/myuser/mylibrary",
"engine": "BASE",
"options": [
""
],
"x-widdershins-oldRef": "#/components/schemas/libraryRequest/example"
}
Library Assignment Request
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
version | integer(int32) | false | none | Specifies the version number of this representation schema. This is version 1. |
name | string | true | none | Specifies the name of the library to assign. |
engine | string | true | none | Specifies the engine to use with this library. |
path | string | true | none | Specifies the engine-specific path information for this library. |
options | [string] | false | none | Specifies options that the engine uses. |
tableInfo
{
"bookmarkLength": 12,
"compressionRoutine": "NO",
"modifiedTimeStamp": "2018-05-04T18:02:27.780Z",
"creationTimeStamp": "2018-05-04T18:02:27.749Z",
"engine": "V9",
"id": "AFGHANISTAN",
"label": "AFGHANISTAN - Source: GfkGeoMarketing - 2012 ",
"libref": "MAPSGFK",
"encoding": "Default",
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN",
"method": "GET",
"rel": "alternate",
"type": "application/vnd.sas.compute.data.table.summary",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows",
"itemType": "application/vnd.sas.compute.data.table.row",
"method": "GET",
"rel": "rows",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows",
"method": "GET",
"rel": "rowsAsCSV",
"type": "text/csv",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rowSet",
"method": "GET",
"rel": "rowSet",
"type": "application/vnd.sas.compute.data.table.row.set",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rowSet"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns",
"itemType": "application/vnd.sas.compute.data.table.column",
"method": "GET",
"rel": "columns",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns"
}
],
"logicalRecordCount": 49858,
"name": "AFGHANISTAN",
"columnCount": 10,
"rowCount": 49858,
"physicalRecordCount": 49858,
"recordLength": 88,
"version": 1
}
Table
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
version | integer(int32) | false | none | Specifies the version number of this representation schema. This is version 1. |
id | string(object-id) | false | none | Specifies the identifier for this data set. |
name | string | false | none | Specifies the name of this data set. |
type | string | false | none | Specifies the table type as DATA or VIEW. |
extendedType | string | false | none | Specifies that this is a special type of table. Most tables do not have an extended type, but the ones that do typically have special columns, rows, or both that are used by some SAS/STAT procedures. |
bookmarkLength | integer(int32) | false | none | Specifies the length of the bookmark in this data set. |
compressionRoutine | string | false | none | Specifies the compression routine for this data set. |
creationTimeStamp | string(date-time) | false | none | Specifies the creation timestamp for this data set. |
modifiedTimeStamp | string(date-time) | false | none | Specifies the modification timestamp for this data set. |
engine | string | false | none | Specifies the name of the engine that handles this data set. |
label | string | false | none | Specifies the label for this data set. This label describes the data set. |
libref | string | false | none | Specifies the name of the library that owns this data set. |
logicalRecordCount | integer(int32) | false | none | Specifies the logical record count for this data set. |
columnCount | integer(int32) | false | none | Specifies the number of columns that are defined in this data set. |
rowCount | integer(int32) | false | none | Specifies the number of rows that are defined in this data set. |
physicalRecordCount | integer(int32) | false | none | Specifies the physical record count for this data set. |
recordLength | integer(int32) | false | none | Specifies the length of a record in this data set. |
encoding | string | false | none | Specifies the character encoding that is used to store the table. |
links | [link] | false | none | Specifies links that apply to this data set. |
tableSummary
{
"id": "AFGHANISTAN",
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN"
}
],
"name": "AFGHANISTAN",
"version": 1
}
Table Summary
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
version | integer(int32) | false | none | Specifies the version number of this representation schema. This is version 1. |
id | string(object-id) | false | none | Specifies the identifier for this table object. |
name | string | false | none | Specifies the name of the table. |
links | [link] | false | none | Specifies links that apply to this table summary. |
tableSummaryCollection
{
"accept": "application/vnd.sas.compute.data.table.summary",
"count": 428,
"items": [
{
"id": "AFGHANISTAN",
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPS/AFGHANISTAN",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPS/AFGHANISTAN"
}
],
"name": "AFGHANISTAN"
},
{
"id": "AFGHANISTAN_ATTR",
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPS/AFGHANISTAN_ATTR",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPS/AFGHANISTAN_ATTR"
}
],
"name": "AFGHANISTAN_ATTR"
},
{
"id": "AFRICA",
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPS/AFRICA",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPS/AFRICA"
}
],
"name": "AFRICA"
}
],
"limit": 3,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPS?start=0&limit=3",
"itemType": "application/vnd.sas.compute.data.table.summary",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPS?start=0&limit=3"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPS",
"itemType": "application/vnd.sas.compute.data.table.summary",
"method": "GET",
"rel": "collection",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPS"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPS?start=3&limit=3",
"itemType": "application/vnd.sas.compute.data.table.summary",
"method": "GET",
"rel": "next",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPS?start=3&limit=3"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPS?start=425&limit=3",
"itemType": "application/vnd.sas.compute.data.table.summary",
"method": "GET",
"rel": "last",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPS?start=425&limit=3"
}
],
"name": "Data Tables",
"start": 0,
"version": 2
}
Table Summary Collection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
Table Summary Collection | any | false | none | Provides a paginated collection of SAS table or data set summaries. |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | contextSummaryCollection | false | none | This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2) |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» items | [tableSummary] | true | none | Specifies an array that contains table summary resources. |
column
{
"byteLength": 128,
"charLength": 32,
"id": "ID",
"index": 1,
"label": "Districts code",
"length": 128,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/ID",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/ID"
}
],
"name": "ID",
"type": "VARCHAR",
"version": 2
}
Table Column
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
version | integer(int32) | false | none | Specifies the version number of this representation schema. This is version 2. |
id | string(object-id) | false | none | Specifies the identifier for this column. |
name | string | false | none | Specifies the name for this column. |
index | integer(int32) | false | none | Specifies the numerical index for this column. This is a zero-based index. |
label | string | false | none | Specifies the label for this column. The label is optional. |
length | integer(int32) | false | none | Specifies the length of the data in this column. |
byteLength | integer(int32) | false | none | Specifies the byte length of the data in this column. This parameter is set to the same value as the Length field. Support for this parameter was added in version 2. |
charLength | integer(int32) | false | none | Specifies the character length of the data in this column. This is set to same value as length for CHAR data type, the specified length for bounded VARCHAR data type, and "-1" for all other data types. Support for this parameter was added in version 2. |
type | string | false | none | Specifies the data type of the column. |
format | columnSimpleFormat | false | none | Specifies the format to use for values in a column. |
informat | columnSimpleFormat | false | none | Specifies the format to use for values in a column. |
columnsRequest
{
"includeColumns": [
"Name",
"Age",
"Sex"
],
"version": 1,
"x-widdershins-oldRef": "#/components/schemas/columnsRequest/example"
}
Column Request
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
version | integer(int32) | false | none | Specifies the version number of this representation schema. This is version 2. |
id | string(object-id) | false | none | Specifies the identifier for a column. |
includeColumns | [string] | false | none | Specifies an array of strings that indicate the columns to include in a row set. If you do not specify a value, then all columns are returned. The order of the column names in the list indicates the order of the cells of the row set. |
fileProtection | fileProtection | false | none | Specifies information that you use to access data sets or tables that are protected. Provide password values in the format password-type=password. Possible values for password-type are "ALTER", "PW", "READ", or "WRITE". A password value must be a valid eight-character SAS name. |
fileProtectionEncoding | string | false | none | Specifies the encoding for the password values in the fileProtection structure. If the value is "base64", then the password values in the fileProtection structure should be encoded by converting the text to UTF-8 and base64-encoding the result. If no value is provided, then the password values of the fileProtection structure are expected to be clear text. |
columnCollection
{
"accept": "application/vnd.sas.compute.data.table.column",
"count": 10,
"items": [
{
"id": "ID",
"index": 0,
"label": "Districts code",
"length": 15,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/ID",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/ID"
}
],
"name": "ID",
"type": "CHAR"
},
{
"id": "ID1",
"index": 1,
"label": "Provinces code",
"length": 15,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/ID1",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/ID1"
}
],
"name": "ID1",
"type": "CHAR"
},
{
"id": "SEGMENT",
"index": 2,
"label": "ID segment number",
"length": 5,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/SEGMENT",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/SEGMENT"
}
],
"name": "SEGMENT",
"type": "FLOAT"
},
{
"format": {
"decimals": 12,
"length": 16
},
"id": "X",
"index": 3,
"label": "Projected Longitude: Albers",
"length": 8,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/X",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/X"
}
],
"name": "X",
"type": "FLOAT"
},
{
"format": {
"decimals": 12,
"length": 16
},
"id": "Y",
"index": 4,
"label": "Projected Latitude: Albers",
"length": 8,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/Y",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/Y"
}
],
"name": "Y",
"type": "FLOAT"
},
{
"id": "LONG",
"index": 5,
"label": "Unprojected degrees longitude (East)",
"length": 8,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/LONG",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/LONG"
}
],
"name": "LONG",
"type": "FLOAT"
},
{
"id": "LAT",
"index": 6,
"label": "Unprojected degrees latitude",
"length": 8,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/LAT",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/LAT"
}
],
"name": "LAT",
"type": "FLOAT"
},
{
"id": "RESOLUTION",
"index": 7,
"label": "Map detail level based on output resolution",
"length": 5,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/RESOLUTION",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/RESOLUTION"
}
],
"name": "RESOLUTION",
"type": "FLOAT"
},
{
"id": "DENSITY",
"index": 8,
"label": "Reduce density values",
"length": 5,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/DENSITY",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/DENSITY"
}
],
"name": "DENSITY",
"type": "FLOAT"
},
{
"id": "LAKE",
"index": 9,
"label": "Lake Flag:1-water:2-citytype",
"length": 5,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/LAKE",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/LAKE"
}
],
"name": "LAKE",
"type": "FLOAT"
}
],
"limit": 10,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/?start=0&limit=10",
"itemType": "application/vnd.sas.compute.data.table.column",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/?start=0&limit=10"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/",
"itemType": "application/vnd.sas.compute.data.table.column",
"method": "GET",
"rel": "collection",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/"
}
],
"name": "Table Columns",
"start": 0,
"version": 2
}
Table Column Collection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
Table Column Collection | any | false | none | Provides a paginated collection of table columns. |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | contextSummaryCollection | false | none | This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2) |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» items | [column] | true | none | Specifies an array that contains column resources. |
rowCollection
{
"accept": "application/vnd.sas.compute.data.table.row",
"count": 49858,
"items": [
{
"cells": [
"AF-0101 ",
"AF-01 ",
1,
" 0.020917256889",
" 0.011839722373",
69.136845,
34.603907,
1,
4,
0
]
},
{
"cells": [
"AF-0101 ",
"AF-01 ",
1,
" 0.021222359985",
" 0.011868170604",
69.158125,
34.605286,
0,
0,
0
]
},
{
"cells": [
"AF-0101 ",
"AF-01 ",
1,
" 0.021485525757",
" 0.011762109322",
69.176348,
34.598996,
1,
5,
0
]
}
],
"limit": 3,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows?start=0&limit=3",
"itemType": "application/vnd.sas.compute.data.table.row",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows?start=0&limit=3"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows",
"itemType": "application/vnd.sas.compute.data.table.row",
"method": "GET",
"rel": "collection",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows?start=3&limit=3",
"itemType": "application/vnd.sas.compute.data.table.row",
"method": "GET",
"rel": "next",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows?start=3&limit=3"
},
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows?start=49855&limit=3",
"itemType": "application/vnd.sas.compute.data.table.row",
"method": "GET",
"rel": "last",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/rows?start=49855&limit=3"
}
],
"name": "Table Rows",
"start": 0,
"version": 2
}
Row Collection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
Row Collection | any | false | none | Provides a paginated collection of table rows. |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | contextSummaryCollection | false | none | This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2) |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» items | [row] | true | none | Specifies an array that contains row resources. |
row
{
"cells": [
"AF-0101 ",
"AF-01 ",
1,
" 0.020917256889",
" 0.011839722373",
69.136845,
34.603907,
1,
4,
0
]
}
Row
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
cells | [any] | false | none | Specifies values for the data cells in this row. |
rowSet
{
"columnDetail": "names",
"columns": [
"Make",
"Model",
"Type",
"Origin",
"DriveTrain",
"MSRP",
"Invoice",
"EngineSize",
"Cylinders",
"Horsepower",
"MPG_City",
"MPG_Highway",
"Weight",
"Wheelbase",
"Length"
],
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MYCA/MYCARS/rowSet",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.row.set",
"uri": "/compute/sessions/RKEY-ses0000/data/MYCA/MYCARS/rowSet"
}
],
"rows": [
[
"Toyota ",
" Corolla CE 4dr ",
"Sedan ",
"Asia ",
"Front",
" $14,085",
" $13,065",
1.8,
4,
130,
32,
40,
2502,
102,
178
],
[
"Toyota ",
" Corolla S 4dr ",
"Sedan ",
"Asia ",
"Front",
" $15,030",
" $13,650",
1.8,
4,
130,
32,
40,
2524,
102,
178
],
[
"Toyota ",
" Corolla LE 4dr ",
"Sedan ",
"Asia ",
"Front",
" $15,295",
" $13,889",
1.8,
4,
130,
32,
40,
2524,
102,
178
],
[
"Toyota ",
" Echo 2dr manual ",
"Sedan ",
"Asia ",
"Front",
" $10,760",
" $10,144",
1.5,
4,
108,
35,
43,
2035,
93,
163
],
[
"Toyota ",
" Echo 2dr auto ",
"Sedan ",
"Asia ",
"Front",
" $11,560",
" $10,896",
1.5,
4,
108,
33,
39,
2085,
93,
163
],
[
"Toyota ",
" Echo 4dr ",
"Sedan ",
"Asia ",
"Front",
" $11,290",
" $10,642",
1.5,
4,
108,
35,
43,
2055,
93,
163
],
[
"Toyota ",
" Camry LE 4dr ",
"Sedan ",
"Asia ",
"Front",
" $19,560",
" $17,558",
2.4,
4,
157,
24,
33,
3086,
107,
189
],
[
"Toyota ",
" Camry LE V6 4dr ",
"Sedan ",
"Asia ",
"Front",
" $22,775",
" $20,325",
3,
6,
210,
21,
29,
3296,
107,
189
],
[
"Toyota ",
" Camry Solara SE 2dr ",
"Sedan ",
"Asia ",
"Front",
" $19,635",
" $17,722",
2.4,
4,
157,
24,
33,
3175,
107,
193
],
[
"Toyota ",
" Camry Solara SE V6 2dr ",
"Sedan ",
"Asia ",
"Front",
" $21,965",
" $19,819",
3.3,
6,
225,
20,
29,
3417,
107,
193
],
[
"Toyota ",
" Avalon XL 4dr ",
"Sedan ",
"Asia ",
"Front",
" $26,560",
" $23,693",
3,
6,
210,
21,
29,
3417,
107,
192
],
[
"Toyota ",
" Camry XLE V6 4dr ",
"Sedan ",
"Asia ",
"Front",
" $25,920",
" $23,125",
3,
6,
210,
21,
29,
3362,
107,
189
],
[
"Toyota ",
" Camry Solara SLE V6 2dr ",
"Sedan ",
"Asia ",
"Front",
" $26,510",
" $23,908",
3.3,
6,
225,
20,
29,
3439,
107,
193
],
[
"Toyota ",
" Avalon XLS 4dr ",
"Sedan ",
"Asia ",
"Front",
" $30,920",
" $27,271",
3,
6,
210,
21,
29,
3439,
107,
192
],
[
"Toyota ",
" Sienna CE ",
"Sedan ",
"Asia ",
"Front",
" $23,495",
" $21,198",
3.3,
6,
230,
19,
27,
4120,
119,
200
],
[
"Toyota ",
" Sienna XLE Limited ",
"Sedan ",
"Asia ",
"Front",
" $28,800",
" $25,690",
3.3,
6,
230,
19,
27,
4165,
119,
200
]
],
"start": 1,
"version": 1
}
Row Set
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
version | integer(int32) | false | none | Specifies the version number of this representation schema. This is version 1. |
columnDetail | string | false | none | Specifies the level of column information that is returned. Values are names (default), detail, or summary. |
columns | [string] | false | none | Specifies column information for the row set. |
rows | [array] | false | none | Specifies the values for the data cells in this row. |
start | integer(int64) | false | none | Specifies the start index of the returned rows. |
links | [link] | false | none | Specifies links that apply to this row set. |
filerefSummary
{
"id": "mydir",
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/mydir",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.fileref",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/mydir"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/mydir",
"method": "GET",
"rel": "alternate",
"type": "application/vnd.sas.compute.fileref.summary",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/mydir"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/mydir",
"method": "DELETE",
"rel": "deassign",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/mydir"
}
],
"name": "mydir",
"version": 1
}
Fileref Summary
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
version | integer(int32) | false | none | Specifies the version number of this representation schema. This is version 1. |
id | string(object-id) | false | none | Specifies the identifier for this fileref. |
name | string | false | none | Specifies the name of fileref resource. |
links | [link] | false | none | Specifies links that apply to this fileref. |
filerefSummaryCollection
{
"accept": "application/vnd.sas.compute.fileref.summary",
"count": 1,
"items": [
{
"id": "myref",
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/myref",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.fileref",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/myref"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/myref",
"method": "GET",
"rel": "alternate",
"type": "application/vnd.sas.compute.fileref.summary",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/myref"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/myref",
"method": "DELETE",
"rel": "deassign",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/myref"
}
],
"name": "myref"
}
],
"limit": 10,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/filerefs?start=0&limit=1",
"itemType": "application/vnd.sas.compute.fileref.summary",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/filerefs?start=0&limit=1"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs",
"itemType": "application/vnd.sas.compute.fileref.summary",
"method": "GET",
"rel": "collection",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/filerefs"
}
],
"name": "Current Filerefs",
"start": 0,
"version": 2
}
Fileref Summary Collection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
Fileref Summary Collection | any | false | none | Provides a collection of fileref summaries. |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | contextSummaryCollection | false | none | This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2) |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» items | [filerefSummary] | true | none | Array containing list of fileref summary resources. |
fileref
{
"accessMethod": "DISK",
"modifiedTimeStamp": "2016-04-27T09:22:16.000Z",
"fileName": "myfile.txt",
"filePath": "/tmp/myfile.txt",
"fileSize": 44,
"id": "myref",
"isDirectory": false,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/myref",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.fileref",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/myref"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/myref",
"method": "GET",
"rel": "alternate",
"type": "application/vnd.sas.compute.fileref.summary",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/myref"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/myref",
"method": "DELETE",
"rel": "deassign",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/myref"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/myref/content",
"method": "GET",
"rel": "content",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/myref/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/myref/content",
"method": "PUT",
"rel": "upload",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/myref/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/myref/content",
"method": "DELETE",
"rel": "delete",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/myref/content"
}
],
"name": "myref",
"version": 2
}
Fileref
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
version | integer(int32) | false | none | Specifies the version number of this representation schema. This is version 2. |
accessMethod | string | false | none | Specifies the access method that is used for this fileref. Common values are "DISK" and "TEMP", but other values be supported. |
isDirectory | boolean | false | none | Specifies whether the fileref references a directory on the system. |
links | [link] | false | none | Specifies links that apply to this fileref. |
name | string | false | none | Specifies the name of fileref resource. |
modifiedTimeStamp | string(date-time) | false | none | Specifies the modification timestamp for this fileref. |
fileName | string | false | none | Specifies the name of the file. |
fileSize | integer(int32) | false | none | Specifies the size of the file. |
id | string(object-id) | false | none | Specifies the identifier for this fileref. |
filePath | string | false | none | Specifies the resolved path of the file. Support for this value was added in version 2. |
filerefRequest
{
"version": 1,
"name": "myfref",
"path": "myfile.txt",
"accessMethod": "DISK",
"options": "encoding='utf8' recfm=D termstr=LF",
"x-widdershins-oldRef": "#/components/schemas/filerefRequest/example"
}
Fileref Creation Request
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
version | integer(int32) | false | none | Specifies the version number of this representation schema. This is version 1. |
name | string | true | none | Specifies the name of this fileref. |
path | string | true | none | Specifies the path to the file or directory that is referenced by this fileref. |
accessMethod | string | false | none | Specifies the access method that is used for this fileref. Common values are "DISK" and "TEMP", but other values can be supported. |
options | string | false | none | Specifies an options string for the creation of the fileref. |
directoryCollection
{
"accept": "application/vnd.sas.compute.fileref.directory.member",
"count": 1,
"items": [
{
"id": "myfile.txt",
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/mydir?member=myfile.txt",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.fileref.directory.member",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/mydir?member=myfile.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs?parent=mydir",
"method": "POST",
"rel": "assign",
"responseType": "application/vnd.sas.compute.fileref",
"type": "application/vnd.sas.compute.fileref.request",
"uri": "/compute/sessions/RKEY-ses0000/filerefs?parent=mydir"
}
],
"name": "myfile.txt"
}
],
"limit": 1,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/mydir/content?start=0&limit=1",
"itemType": "application/vnd.sas.compute.fileref.directory.member",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/mydir/content?start=0&limit=1"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/mydir/content",
"itemType": "application/vnd.sas.compute.fileref.directory.member",
"method": "GET",
"rel": "collection",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/mydir/content"
}
],
"name": "Fileref Members",
"start": 0,
"version": 2
}
Directory Collection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
Directory Collection | any | false | none | Provides a collection that contains the members of a directory-based fileref object. |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | contextSummaryCollection | false | none | This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2) |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» items | [dirMember] | true | none | Specifies an array that contains a listing of members of a directory fileref. |
dirMember
{
"id": "myfile.txt",
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/mydir?member=myfile.txt",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.fileref.directory.member",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/mydir?member=myfile.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs?parent=mydir",
"method": "POST",
"rel": "assign",
"responseType": "application/vnd.sas.compute.fileref",
"type": "application/vnd.sas.compute.fileref.request",
"uri": "/compute/sessions/RKEY-ses0000/filerefs?parent=mydir"
}
],
"name": "myfile.txt",
"version": 1
}
Directory Member
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string(object-id) | false | none | Specifies a Compute context definition id. |
links | [link] | false | none | Links that apply to this directory member |
variable
{
"name": "SYS_COMPUTE_SESSION_ID",
"scope": "GLOBAL",
"value": "RKEY-ses0000",
"version": 1
}
SAS Macro Variable
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
version | integer(int32) | false | none | Specifies the version number of this representation schema. This is version 1. |
scope | string | false | none | Specifies the scope of the variable as determined by SAS. |
name | string | false | none | Specifies the name of the variable. |
value | string | false | none | Specifies the value of the variable. |
sessionVariableCollection
{
"accept": "application/vnd.sas.compute.session.variable",
"count": 2,
"items": [
{
"name": "SYS_COMPUTE_SESSION_ID",
"scope": "GLOBAL",
"value": "RKEY-ses0000",
"version": 1
},
{
"name": "AFDSID",
"scope": "AUTOMATIC",
"value": "0",
"version": 1
}
],
"limit": 50,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/variables?filter=or(eq(name,AFDSID),eq(name,SYS_COMPUTE_SESSION_ID))&limit=50&start=0",
"itemType": "application/vnd.sas.compute.session.variable",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/variables?filter=or(eq(name,AFDSID),eq(name,SYS_COMPUTE_SESSION_ID))&limit=50&start=0"
},
{
"href": "/compute/sessions/RKEY-ses0000/variables",
"itemType": "application/vnd.sas.compute.session.variable",
"method": "GET",
"rel": "collection",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/variables"
},
{
"href": "/compute/sessions/RKEY-ses0000",
"method": "GET",
"rel": "up",
"type": "application/vnd.sas.compute.session",
"uri": "/compute/sessions/RKEY-ses0000"
}
],
"name": "Session Variables",
"start": 0,
"version": 2
}
SAS Macro Variable Collection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
SAS Macro Variable Collection | any | false | none | Provides a paginated collection of SAS macro variables. |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | contextSummaryCollection | false | none | This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2) |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» items | [variable] | true | none | Specifies an array that contains a listing of current session variables. |
engine
{
"hasDefinition": true,
"legalName": "SAS Base Engine",
"licensed": true,
"links": [
{
"href": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines/sase7",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.data.engine",
"uri": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines/sase7"
},
{
"href": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines",
"itemType": "application/vnd.sas.data.engine",
"method": "GET",
"rel": "up",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines"
},
{
"href": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines/sase7/definition",
"method": "GET",
"rel": "definition",
"type": "application/schema",
"uri": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines/sase7/definition"
}
],
"name": "sase7",
"nickname": "BASE",
"providerId": "compute",
"version": 1,
"x-widdershins-oldRef": "#/components/schemas/engine/example"
}
SAS Engine
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
version | integer(int32) | false | none | Specifies the version number of this representation schema. This is version 1. |
name | string | false | none | Specifies the unique name of this engine. |
label | string | false | none | Specifies the label for this engine. This value maps to the nickname for the engine in the Compute session. |
description | string | false | none | Specifies the engine description. In the Compute session, this is the short legal name of the engine. |
providerId | string | false | none | Specifies the providerId for this service. In a Compute session, this value is compute. |
dataSourceId | string | false | none | Specifies the identifier of the data source that provides the engine. In a Compute session, this is the context id. |
licensed | boolean | false | none | Specifies whether the engine is licensed. |
links | [link] | false | none | Specifies links that apply to this engine. |
engineCollection
{
"accept": "application/vnd.sas.data.engine",
"count": 39,
"items": [
{
"hasDefinition": true,
"legalName": "SAS Base Engine",
"licensed": true,
"links": [
{
"href": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines/sase7",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.data.engine",
"uri": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines/sase7"
},
{
"href": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines",
"itemType": "application/vnd.sas.data.engine",
"method": "GET",
"rel": "up",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines"
},
{
"href": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines/sase7/definition",
"method": "GET",
"rel": "definition",
"type": "application/schema",
"uri": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines/sase7/definition"
}
],
"name": "sase7",
"nickname": "BASE",
"providerId": "compute",
"version": 1
}
],
"limit": 1,
"links": [
{
"href": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines?limit=1&start=0",
"itemType": "application/vnd.sas.data.engine",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines?limit=1&start=0"
},
{
"href": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines",
"itemType": "application/vnd.sas.data.engine",
"method": "GET",
"rel": "collection",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines"
},
{
"href": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines?limit=1&start=1",
"itemType": "application/vnd.sas.data.engine",
"method": "GET",
"rel": "next",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines?limit=1&start=1"
},
{
"href": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines?limit=1&start=38",
"itemType": "application/vnd.sas.data.engine",
"method": "GET",
"rel": "last",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/24457a5d-68b6-432c-a463-c6dfb8bd0526-ses0000/engines?limit=1&start=38"
}
],
"name": "Engine Collection",
"start": 0,
"version": 2
}
SAS Engine Collection
Properties
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | contextSummaryCollection | false | none | This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2) |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» items | [engine] | true | none | Specifies an array that contains engine resources. |
sessionOption
{
"version": 1,
"name": "MEMSIZE",
"description": "Specifies the limit on the amount of virtual memory that can be used during a SAS session.",
"value": "2147483648"
}
SAS Option
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
version | integer(int32) | false | none | Specifies the version number of this representation schema. This is version 1. |
name | string | false | none | Specifies the name of the option. |
description | string | false | none | Specifies the description of the option as defined in the system. |
value | string | false | none | Specifies the current value of the option, if it is available. |
fileProtection
{
"read": "string",
"alter": "string",
"write": "string"
}
Table Protection Information
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
read | string | false | none | Specifies the password that grants Read access to the file that represents the data set. |
alter | string | false | none | Specifies the password that grants Alter access to the file that represents the data set. |
write | string | false | none | Specifies the password that grants Write access to the file that represents the data set. |
sortByRequest
{
"key": "string",
"direction": "ascending"
}
Table Sorting Request
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
key | string | false | none | Specifies the key to use in this sortBy request. |
direction | string | false | none | Specifies the sort order for this sortBy request. |
Enumerated Values
Property | Value |
---|---|
direction | ascending |
direction | descending |
rowSetRequest
{
"where": "name='Fred'",
"fileProtection": {
"read": "cmVhZFBX",
"alter": "YWx0ZXJQVw",
"write": "d3JpdGVQVw"
},
"fileProtectionEncoding": "base64",
"columnDetail": "names",
"includeColumns": [
"name",
"sex"
],
"columnNaturalOrder": false,
"sortBy": [
{
"key": "name",
"direction": "ascending"
}
],
"columnFormatting": [
[
{
"name": "sex"
},
{
"format": "$GENDER6."
}
]
],
"x-widdershins-oldRef": "#/components/schemas/rowSetRequest/example"
}
Row Set Request
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
version | integer(int32) | false | none | Specifies the version number of this representation schema. This is version 3. |
where | string | false | none | Specifies that a standard SAS WHERE clause was used to build the row set for this request. |
fileProtection | fileProtection | false | none | Specifies information that you use to access data sets or tables that are protected. Provide password values in the format password-type=password. Possible values for password-type are "ALTER", "PW", "READ", or "WRITE". A password value must be a valid eight-character SAS name. |
fileProtectionEncoding | string | false | none | Specifies the encoding for the password values in the fileProtection structure. If the value is "base64", then the password values in the fileProtection structure should be encoded by converting the text to UTF-8 and base64-encoding the result. If no value is provided, then the password values of the fileProtection structure are expected to be clear text. |
columnDetail | string | false | none | Specifies the level of column information to return. |
includeColumns | [string] | false | none | Specifies an array of strings that indicate the columns to include in a row set. If you do not specify a value, then all columns are returned. The order of the column names in the list indicates the order for the cells of the row set. |
columnNaturalOrder | boolean | false | none | When includeColumns is specified, a value of true for columnNaturalOrder specifies that the cells of the row set are returned in the order in which they occur in the data set instead of in the order that is specified by includeColumns. |
sortBy | [sortByRequest] | false | none | Specifies an array of objects that describe the sort definitions to use in this row set. |
columnFormatting | [columnFormatting] | false | none | [Specifies the format to apply to a column when retrieving data from a cell.] |
Enumerated Values
Property | Value |
---|---|
columnDetail | names |
columnDetail | detail |
columnDetail | summary |
rowsRequest
{
"where": "name='Fred'",
"fileProtection": {
"read": "cmVhZFBX",
"alter": "YWx0ZXJQVw==",
"write": "d3JpdGVQVw=="
},
"fileProtectionEncoding": "base64",
"columnFormatting": [
[
{
"name": "Sex"
},
{
"format": "$GENDER6."
}
]
],
"x-widdershins-oldRef": "#/components/schemas/rowsRequest/example"
}
Rows Request
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
version | integer(int32) | false | none | Specifies the version number of this representation schema. This is version 3. |
where | string | false | none | Specifies that a standard SAS WHERE clause was used to return the rows for this request. |
fileProtection | fileProtection | false | none | Specifies information that you use to access data sets or tables that are protected. Provide password values in the format password-type=password. Possible values for password-type are "ALTER", "PW", "READ", or "WRITE". A password value must be a valid eight-character SAS name. |
fileProtectionEncoding | string | false | none | Specifies the encoding for the password values in the fileProtection structure. If the value is "base64", then the password values in the fileProtection structure should be encoded by converting the text to UTF-8 and base64-encoding the result. If no value is provided, then the password values of the fileProtection structure are expected to be clear text. |
columnFormatting | [columnFormatting] | false | none | Specifies the formatting to be used for specified columns. |
viewRequest
{
"where": "name='Fred'",
"fileProtection": {
"read": "cmVhZFBX",
"alter": "YWx0ZXJQVw==",
"write": "d3JpdGVQVw=="
},
"fileProtectionEncoding": "base64",
"includeColumns": [
"name"
],
"columnNaturalOrder": true,
"sortBy": [
{
"key": "name",
"direction": "ascending"
}
],
"distinct": false,
"x-widdershins-oldRef": "#/components/schemas/viewRequest/example"
}
View Request
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
version | integer(int32) | false | none | Specifies the version number of this representation schema. This is version 2. |
where | string | false | none | Specifies that a standard SAS WHERE clause was used to select the data for this view. |
fileProtection | fileProtection | false | none | Specifies information that you use to access data sets or tables that are protected. Provide password values in the format password-type=password. Possible values for password-type are "ALTER", "PW", "READ", or "WRITE". A password value must be a valid eight-character SAS name. |
fileProtectionEncoding | string | false | none | Specifies the encoding for the password values in the fileProtection structure. If the value is "base64", then the password values in the fileProtection structure should be encoded by converting the text to UTF-8 and base64-encoding the result. If no value is provided, then the password values of the fileProtection structure are expected to be clear text. |
includeColumns | [string] | false | none | Specifies an array of strings that indicate the columns to include in the row set. If no value is specified, then all columns are returned. |
columnNaturalOrder | boolean | false | none | When includeColumns is specified, a value of true for columnNaturalOrder specifies that the cells of the row set are returned in the order in which they occur in the data set instead of in the order that is specified by includeColumns. |
sortBy | [sortByRequest] | false | none | Specifies an array of objects that describe the sort definitions to use for this row set. |
distinct | boolean | false | none | Specifies whether to select only distinct values for the view. |
fileProperties
{
"isDirectory": false,
"modifiedTimeStamp": "2018-11-07T08:32:45.000Z",
"name": "hello.txt",
"path": "test",
"readOnly": false,
"size": 6,
"version": 1,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content",
"method": "GET",
"rel": "getFile",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "DELETE",
"rel": "deleteFile",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content",
"method": "PUT",
"rel": "createFile",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "PUT",
"rel": "renameFile",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/{destinationFile}",
"method": "POST",
"rel": "copyFile",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.request",
"uri": "/compute/sessions/RKEY-ses0000/files/{destinationFile}"
}
]
}
File Properties
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
version | integer(int32) | false | none | Specifies the version number of this representation schema. This is version 1. |
isDirectory | boolean | false | none | Specifies whether the object references a directory on the system. |
readOnly | boolean | false | none | Specifies whether the file or directory is Read Only. |
links | [link] | false | none | Specifies links that apply to this file or directory object. |
name | string | false | none | Specifies the name of the file or directory. |
path | string | false | none | Specifies the path of the file or directory. |
size | integer(int64) | false | none | Specifies the size of the file or directory. |
modifiedTimeStamp | string(date-time) | false | none | Specifies the modification timestamp for this file or directory. |
creationTimeStamp | string(date-time) | false | none | Specifies the creation timestamp for this file or directory. This information is returned only if the file or directory is available. |
fileRequest
{
"name": "hello.txt",
"path": "test/myfiles",
"x-widdershins-oldRef": "#/components/schemas/fileRequest/example"
}
File Request Properties
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | false | none | Specifies the name of the file or directory. |
path | string | false | none | Specifies the path of the file or directory. |
filePropertiesCollection
{
"accept": "application/vnd.sas.compute.file.properties",
"count": 2,
"items": [
{
"isDirectory": false,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~hello.txt",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~hello.txt",
"method": "GET",
"rel": "getFileProperties",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~hello.txt/content",
"method": "GET",
"rel": "getFile",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~hello.txt/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~hello.txt",
"method": "DELETE",
"rel": "deleteFile",
"uri": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~hello.txt/content",
"method": "PUT",
"rel": "createFile",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~hello.txt/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~hello.txt",
"method": "PUT",
"rel": "renameFile",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/{destinationFile}",
"method": "POST",
"rel": "copyFile",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.request",
"uri": "/compute/sessions/RKEY-ses0000/files/{destinationFile}"
}
],
"modifiedTimeStamp": "2019-01-02T12:01:57.000Z",
"name": "hello.txt",
"path": "/u/test/mydir",
"readOnly": true,
"size": 0,
"version": 1
},
{
"isDirectory": true,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~dir1",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~dir1"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~dir1",
"method": "GET",
"rel": "getDirectoryProperties",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~dir1"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~dir1",
"method": "DELETE",
"rel": "deleteDirectory",
"uri": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~dir1"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~dir1",
"method": "PUT",
"rel": "renameDirectory",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~dir1"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~dir1",
"method": "POST",
"rel": "makeDirectory",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~dir1"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~dir1",
"method": "POST",
"rel": "createFile",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~dir1"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/{destinationDirectory}",
"method": "POST",
"rel": "copyDirectory",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.request",
"uri": "/compute/sessions/RKEY-ses0000/files/{destinationDirectory}"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~dir1/members",
"itemType": "application/vnd.sas.compute.file.properties",
"method": "GET",
"rel": "getDirectoryMembers",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/files/~fs~u~fs~test~fs~mydir~fs~dir1/members"
}
],
"modifiedTimeStamp": "2019-01-02T12:01:57.000Z",
"name": "dir1.txt",
"path": "/u/test/mydir",
"readOnly": false,
"size": 0,
"version": 1
}
],
"limit": 50,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/files?limit=50&start=0",
"itemType": "application/vnd.sas.compute.file.properties",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/files?limit=50&start=0"
},
{
"href": "/compute/sessions/RKEY-ses0000/files",
"itemType": "application/vnd.sas.compute.file.properties",
"method": "GET",
"rel": "collection",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/files"
}
],
"name": "Directory listing",
"start": 0,
"version": 2
}
File Properties Collection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
File Properties Collection | any | false | none | Provides a collection that contains the members of a directory. |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | contextSummaryCollection | false | none | This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2) |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» items | [fileProperties] | true | none | Specifies an array that contains a listing of members of a directory. |
formatSummary
{
"id": "$VARYING",
"links": [
{
"href": "/compute/sessions/0001-ses0000/formats/%24VARYING",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.format",
"uri": "/compute/sessions/0001-ses0000/formats/%24VARYING"
}
],
"name": "$VARYING",
"version": 1
}
SAS Format Summary
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
version | integer(int32) | false | none | Specifies the version number of this representation schema. This is version 1. |
id | string | false | none | Specifies the identifier of this format. |
name | string | false | none | Specifies the name of this format. |
links | [link] | false | none | Specifies the links that apply to this format. |
format
{
"category": "char",
"defaultDecimals": 0,
"defaultModifier": 272,
"defaultWidth": 8,
"formatType": "format",
"id": "$VARYING",
"justification": "right",
"links": [
{
"href": "/compute/sessions/0001-ses0000/formats/%24VARYING",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.format",
"uri": "/compute/sessions/0001-ses0000/formats/%24VARYING"
}
],
"maximumDecimals": 0,
"maximumWidth": 32767,
"minimumDecimals": 0,
"minimumWidth": 1,
"name": "$VARYING",
"version": 1
}
SAS Format
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
category | string | false | none | Specifies the category that this format falls into (for example, CHAR, DATE, BINARY, and so on). |
defaultDecimals | integer | false | none | Specifies the decimal precision that a format defaults to. |
defaultModifier | integer | false | none | Specifies the default modifier that is applied to a format. |
defaultWidth | integer | false | none | Specifies the default width of this format. |
formatType | string | false | none | Specifies the format type, which is either 'format' or 'informat'. |
justification | string | false | none | Specifies whether a format is left-justified or right-justified. |
maximumDecimals | integer | false | none | Specifies the maximum decimal precision that you can set for a format. |
maximumWidth | integer | false | none | Specifies the maximum width that you can set for a format. |
minimumDecimals | integer | false | none | Specifies the minimum decimal precision that you can set for a format. |
minimumWidth | integer | false | none | Specifies the minimum width that you can set for a format. |
version | integer(int32) | false | none | Specifies the version number of this representation schema. This is version 1. |
id | string | false | none | Specifies the identifier of a format. |
name | string | false | none | Specifies the name of a format. |
links | [link] | false | none | Specifies the links that apply to a format. |
formatSummaryCollection
{
"accept": "application/vnd.sas.format.summary",
"items": [
{
"id": "$",
"links": [
{
"href": "/compute/sessions/{sessionId}/formats/%24",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.format",
"uri": "/compute/sessions/{sessionId}/formats/%24"
}
],
"name": "$",
"version": 1
}
],
"limit": 1,
"links": [
{
"href": "/compute/sessions/{sessionId}/formats?limit=1&start=0",
"itemType": "application/vnd.sas.format.summary",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/{sessionId}/formats?limit=1&start=0"
},
{
"href": "/compute/sessions/{sessionId}/formats",
"itemType": "application/vnd.sas.format.summary",
"method": "GET",
"rel": "collection",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/{sessionId}/formats"
},
{
"href": "/compute/sessions/{sessionId}/formats?limit=1&start=1",
"itemType": "application/vnd.sas.format.summary",
"method": "GET",
"rel": "next",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/{sessionId}/formats?limit=1&start=1"
}
],
"name": "Formats",
"start": 0,
"version": 2
}
Format Summary Collection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
Format Summary Collection | any | false | none | Provides a collection of format summaries. |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | contextSummaryCollection | false | none | This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2) |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» items | [formatSummary] | true | none | Specifies an array that contains a list of format summary resources. |
columnFormatting
[
{
"name": "Sex"
},
{
"format": "$GENDER6."
}
]
User Specified Column Formatting
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | false | none | Specifies the name of a column. |
format | string | false | none | Specifies the format to use when retrieving data from a column. |
columnSimpleFormat
{
"decimals": 2,
"length": 10,
"name": "DOLLAR10.2"
}
Simple Column Formatting
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
decimals | integer | false | none | Specifies the number of digits to the right of the decimal point. |
length | integer | false | none | Specifies the length of a formatted value. |
name | string | false | none | Specifies the qualified name of the format or informat in the form of: <$>name |
promptContentRowData
{
"formatted": [
null
],
"raw": [
null
]
}
Prompt Content Data
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
formatted | [any] | false | none | Formatted cells of the given row |
raw | [any] | false | none | Raw, unformatted cells of the given row |
promptContent
{
"columnDetail": "names",
"columns": [
"Make",
"Model",
"Type",
"Origin",
"DriveTrain",
"MSRP",
"Invoice",
"EngineSize",
"Cylinders",
"Horsepower",
"MPG_City",
"MPG_Highway",
"Weight",
"Wheelbase",
"Length"
],
"links": [
{
"href": "/compute/sessions/{sessionId}/data/SASHELP/CARS/promptContent?_dpt={dptId}&viewId={viewId}",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.prompt.content",
"uri": "/compute/sessions/{sessionId}/data/SASHELP/CARS/promptContent?_dpt={dptId}&viewId={viewId}"
},
{
"href": "/compute/sessions/{sessionId}/data/%24VIEWS/{viewId}",
"method": "DELETE",
"rel": "deleteView",
"uri": "/compute/sessions/{sessionId}/data/%24VIEWS/{viewId}"
},
{
"href": "/compute/sessions/{sessionId}/data/SASHELP/CARS/promptContent?_dpt={dptId}&limit=10&start=10&viewId=TCBE3DBC1_A8DD_D448_777AA73AAF04",
"method": "GET",
"rel": "next",
"type": "application/vnd.sas.compute.data.table.prompt.content",
"uri": "/compute/sessions/{sessionId}/data/SASHELP/CARS/promptContent?_dpt={dptId}&limit=10&start=10&viewId=TCBE3DBC1_A8DD_D448_777AA73AAF04"
}
],
"rows": [
{
"formatted": [
"Volvo",
" C70 HPT convertible 2dr",
"Sedan",
"Europe",
"Front",
" $42,565",
" $40,083",
2.3,
5,
242,
20,
26,
3450,
105,
186
],
"raw": [
"Volvo",
" C70 HPT convertible 2dr",
"Sedan",
"Europe",
"Front",
42565,
40083,
2.3,
5,
242,
20,
26,
3450,
105,
186,
180
]
}
],
"version": 1
}
Prompt Content
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
version | integer(int32) | false | none | Specifies the version number of this representation schema. This is version 1. |
columnDetail | string | false | none | Specifies the level of column information that is returned. Values are names (default), detail, or summary. |
columns | [string] | false | none | Specifies column information for the prompt content. |
rows | [promptContentRowData] | false | none | Specifies the formatted and raw data for the cells in this row. |
start | integer(int64) | false | none | Specifies the start index of the returned rows. |
links | [link] | false | none | Specifies links that apply to this prompt content. |
promptContentRequest
{
"where": "name='Fred'",
"fileProtection": {
"read": "cmVhZFBX",
"alter": "YWx0ZXJQVw",
"write": "d3JpdGVQVw"
},
"fileProtectionEncoding": "base64",
"columnDetail": "names",
"includeColumns": [
"name",
"sex"
],
"columnNaturalOrder": true,
"sortBy": [
{
"key": "name",
"direction": "ascending"
}
],
"columnFormatting": [
[
{
"name": "sex"
},
{
"format": "$GENDER6."
}
]
],
"x-widdershins-oldRef": "#/components/schemas/promptContentRequest/example"
}
Prompt Content Request
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
version | integer(int32) | false | none | Specifies the version number of this representation schema. This is version 1. |
where | string | false | none | Specifies that a standard SAS WHERE clause was used to build the content for this request. |
fileProtection | fileProtection | false | none | Specifies information that you use to access data sets or tables that are protected. Provide password values in the format password-type=password. Possible values for password-type are "ALTER", "PW", "READ", or "WRITE". A password value must be a valid eight-character SAS name. |
fileProtectionEncoding | string | false | none | Specifies the encoding for the password values in the fileProtection structure. If the value is "base64", then the password values in the fileProtection structure should be encoded by converting the text to UTF-8 and base64-encoding the result. If no value is provided, then the password values of the fileProtection structure are expected to be clear text. |
columnDetail | string | false | none | Specifies the level of column information to return. |
includeColumns | [string] | false | none | Specifies an array of strings that indicate the columns to include in the returned content. If you do not specify a value, then all columns are returned. The order of the column names in the list indicates the order for the cells of the prompt content. |
columnNaturalOrder | boolean | false | none | When includeColumns is specified, a value of true for columnNaturalOrder specifies that the cells of the prompt content are returned in the order in which they occur in the data set instead of in the order that is specified by includeColumns. |
sortBy | [sortByRequest] | false | none | Specifies an array of objects that describe the sort definitions to use in the prompt content. |
columnFormatting | [columnFormatting] | false | none | [Specifies the format to apply to a column when retrieving data from a cell.] |
Enumerated Values
Property | Value |
---|---|
columnDetail | names |
columnDetail | detail |
columnDetail | summary |
Examples
Github Examples
Detailed examples on how to use this API can be found on Github.
Media Type Samples
application/vnd.sas.collection
A paginated, filterable, sortable collection of resource representations. In this API, collections are used for multiple
resources.
See application/vnd.sas.collection
.
application/vnd.sas.compute.context.request
The application/vnd.sas.compute.context.request media type describes the complete details of a request that is used to create a context for the Compute service. The schema is at contextRequest.
application/vnd.sas.compute.context.request+json
Here is an example of the JSON representation of this media type.
{
"name": "MyApp",
"version": 4,
"description": "My Application Context",
"launchContext": {
"contextName": "compsrv"
},
"launchType": "service",
"queueName": "MyAppQueue",
"resources" : [
{
"name" : "file1",
"uri" : "/files/files/fedcba98-7654-3210-fedc-ba9876543210",
"type" : "application/vnd.sas.file",
"options" : {
"LRECL" : 1024
}
},
{
"name" : "var1",
"uri" : "/preferences/preferences/user1/sas.property.one.name",
"type" : "application/vnd.sas.preference"
},
{
"name" : "mylib",
"uri" : "/dataSources/providers/Compute/sourceDefinitions/7987ffbc-d6d5-496e-932b-fe1307c13fc1",
"type" : "application/vnd.sas.data.source.definition"
}
]
}
application/vnd.sas.compute.context
The application/vnd.sas.compute.context media type describes the complete details of the Compute service context. The schema is at context.
application/vnd.sas.compute.context+json
Here is an example of the JSON representation of this media type.
{
"launchContext": {
"contextName": "compute.demo.launcher.context"
},
"launchType": "service",
"createdBy": "bob",
"creationTimeStamp": "2017-09-08T14:26:40.050Z",
"description": "This is a sample Compute service context that you can use to validate its deployment.",
"modifiedTimeStamp": "2017-09-08T14:26:40.151Z",
"modifiedBy": "bob",
"id": "ceaa3101-af1a-4606-9bc3-01fdc1ba605c",
"resources" : [
{
"name" : "file1",
"uri" : "/files/files/fedcba98-7654-3210-fedc-ba9876543210",
"type" : "application/vnd.sas.file",
"options" : {
"LRECL" : 1024
}
},
{
"name" : "var1",
"uri" : "/preferences/preferences/user1/sas.property.one.name",
"type" : "application/vnd.sas.preference"
},
{
"name" : "mylib",
"uri" : "/dataSources/providers/Compute/sourceDefinitions/7987ffbc-d6d5-496e-932b-fe1307c13fc1",
"type" : "application/vnd.sas.data.source.definition"
}
],
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/contexts/ceaa3101-af1a-4606-9bc3-01fdc1ba605c",
"uri": "/compute/contexts/ceaa3101-af1a-4606-9bc3-01fdc1ba605c",
"type": "application/vnd.sas.compute.context"
},
{
"method": "GET",
"rel": "alternate",
"href": "/compute/contexts/ceaa3101-af1a-4606-9bc3-01fdc1ba605c",
"uri": "/compute/contexts/ceaa3101-af1a-4606-9bc3-01fdc1ba605c",
"type": "application/vnd.sas.compute.context.summary"
},
{
"method": "PUT",
"rel": "update",
"href": "/compute/contexts/ceaa3101-af1a-4606-9bc3-01fdc1ba605c",
"uri": "/compute/contexts/ceaa3101-af1a-4606-9bc3-01fdc1ba605c",
"type": "application/vnd.sas.compute.context",
"responseType": "application/vnd.sas.compute.context"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/compute/contexts/ceaa3101-af1a-4606-9bc3-01fdc1ba605c",
"uri": "/compute/contexts/ceaa3101-af1a-4606-9bc3-01fdc1ba605c"
},
{
"method": "POST",
"rel": "createSession",
"href": "/compute/contexts/ceaa3101-af1a-4606-9bc3-01fdc1ba605c/sessions",
"uri": "/compute/contexts/ceaa3101-af1a-4606-9bc3-01fdc1ba605c/sessions",
"type": "application/vnd.sas.compute.session.request",
"responseType": "application/vnd.sas.compute.session"
},
{
"method": "GET",
"rel": "rules",
"href": "/authorization/rules?filter=eq(objectUri,'/compute/contexts/ceaa3101-af1a-4606-9bc3-01fdc1ba605c/sessions')",
"uri": "/authorization/rules?filter=eq(objectUri,'/compute/contexts/ceaa3101-af1a-4606-9bc3-01fdc1ba605c/sessions')",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.authorization.rule"
}
],
"version": 4,
"name": "compute.demo.context",
"queueName": "compute.demo.queue"
}
application/vnd.sas.compute.context.summary
The application/vnd.sas.compute.context.summary media type describes the summary of the Compute service context. The schema is at contextSummary. This media type is currently at version 2, and it is recommended that you use this version of this media type.
to access the context summary information.
application/vnd.sas.compute.context.summary+json
Here is an example of the JSON representation of this media type.
{
"id": "ceaa3101-af1a-4606-9bc3-01fdc1ba605c",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/contexts/ceaa3101-af1a-4606-9bc3-01fdc1ba605c",
"uri": "/compute/contexts/ceaa3101-af1a-4606-9bc3-01fdc1ba605c",
"type": "application/vnd.sas.compute.context"
},
{
"method": "GET",
"rel": "alternate",
"href": "/compute/contexts/ceaa3101-af1a-4606-9bc3-01fdc1ba605c",
"uri": "/compute/contexts/ceaa3101-af1a-4606-9bc3-01fdc1ba605c",
"type": "application/vnd.sas.compute.context.summary"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/compute/contexts/ceaa3101-af1a-4606-9bc3-01fdc1ba605c",
"uri": "/compute/contexts/ceaa3101-af1a-4606-9bc3-01fdc1ba605c"
},
{
"method": "POST",
"rel": "createSession",
"href": "/compute/contexts/ceaa3101-af1a-4606-9bc3-01fdc1ba605c/sessions",
"uri": "/compute/contexts/ceaa3101-af1a-4606-9bc3-01fdc1ba605c/sessions",
"type": "application/vnd.sas.compute.session.request",
"responseType": "application/vnd.sas.compute.session"
}
],
"name": "MyContext",
"createdBy": "sasadmin",
"version": 2
}
application/vnd.sas.compute.server
The application/vnd.sas.compute.server media type describes the complete details of a back-end Compute server process. The schema is at server.
application/vnd.sas.compute.server+json
Here is an example of the JSON representation of this media type.
{
"contextId": "28a5dab4-cc2f-4ce6-ba06-8085d6d3e1a6",
"contextName": "MyApp",
"id": "68fc3ff9-3dac-4401-9c4b-e4510b8d59e4",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/servers/68fc3ff9-3dac-4401-9c4b-e4510b8d59e4",
"uri": "/compute/servers/68fc3ff9-3dac-4401-9c4b-e4510b8d59e4",
"type": "application/vnd.sas.compute.server"
},
{
"method": "GET",
"rel": "alternate",
"href": "/compute/servers/68fc3ff9-3dac-4401-9c4b-e4510b8d59e4",
"uri": "/compute/servers/68fc3ff9-3dac-4401-9c4b-e4510b8d59e4",
"type": "application/vnd.sas.compute.server.summary"
},
{
"method": "GET",
"rel": "collection",
"href": "/compute/servers",
"uri": "/compute/servers",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.server"
},
{
"method": "GET",
"rel": "state",
"href": "/compute/servers/68fc3ff9-3dac-4401-9c4b-e4510b8d59e4/state",
"uri": "/compute/servers/68fc3ff9-3dac-4401-9c4b-e4510b8d59e4/state",
"type": "text/plain"
},
{
"method": "GET",
"rel": "sessions",
"href": "/compute/servers/68fc3ff9-3dac-4401-9c4b-e4510b8d59e4/sessions",
"uri": "/compute/servers/68fc3ff9-3dac-4401-9c4b-e4510b8d59e4/sessions",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.session"
},
{
"method": "GET",
"rel": "sessionSummaries",
"href": "/compute/servers/68fc3ff9-3dac-4401-9c4b-e4510b8d59e4/sessions",
"uri": "/compute/servers/68fc3ff9-3dac-4401-9c4b-e4510b8d59e4/sessions",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.session.summary"
},
{
"method": "POST",
"rel": "createSession",
"href": "/compute/servers/68fc3ff9-3dac-4401-9c4b-e4510b8d59e4/sessions",
"uri": "/compute/servers/68fc3ff9-3dac-4401-9c4b-e4510b8d59e4/sessions",
"type": "application/vnd.sas.compute.session"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/compute/servers/68fc3ff9-3dac-4401-9c4b-e4510b8d59e4",
"uri": "/compute/servers/68fc3ff9-3dac-4401-9c4b-e4510b8d59e4"
}
],
"createdBy": "bob",
"creationTimeStamp": "2017-09-08T14:26:40.050Z",
"version": 2
}
application/vnd.sas.compute.server.summary
The application/vnd.sas.compute.server.summary media type describes the summary of the back-end Compute server process. The schema is at serverSummary.
application/vnd.sas.compute.server.summary+json
Here is an example of the JSON representation of this media type.
{
"id": "ceaa3101-af1a-4606-9bc3-01fdc1ba605c",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/servers/ceaa3101-af1a-4606-9bc3-01fdc1ba605c",
"uri": "/compute/servers/ceaa3101-af1a-4606-9bc3-01fdc1ba605c",
"type": "application/vnd.sas.compute.server"
},
{
"method": "GET",
"rel": "alternate",
"href": "/compute/servers/ceaa3101-af1a-4606-9bc3-01fdc1ba605c",
"uri": "/compute/servers/ceaa3101-af1a-4606-9bc3-01fdc1ba605c",
"type": "application/vnd.sas.compute.server.summary"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/compute/server/ceaa3101-af1a-4606-9bc3-01fdc1ba605c",
"uri": "/compute/server/ceaa3101-af1a-4606-9bc3-01fdc1ba605c"
}
],
"name": "MyContext",
"version": 1
}
application/vnd.sas.compute.session.request
The application/vnd.sas.compute.session.request media type describes the complete details of a request that you use to create a Compute session. The schema is at sessionRequest.
application/vnd.sas.compute.session.request+json
Here is an example of the JSON representation of this media type.
{
"version" : 1,
"name" : "Optional name to associate with the session.",
"description" : "This is an optional string to describe my session.",
"attributes": {
"sessionInactiveTimeout": 600
},
"environment" : {
"options" : [
"memsize 8g",
"nofullstimer"
],
"autoExecLines" : [
"libname _all_ list;",
"%put _all_;"
]
},
"resources" : [
{
"name" : "file1",
"uri" : "/files/files/fedcba98-7654-3210-fedc-ba9876543210",
"type" : "application/vnd.sas.file",
"options" : {
"LRECL" : 1024
}
},
{
"name" : "var1",
"uri" : "/preferences/preferences/user1/sas.property.one.name",
"type" : "application/vnd.sas.preference"
},
{
"name" : "mylib",
"uri" : "/dataSources/providers/Compute/sourceDefinitions/7987ffbc-d6d5-496e-932b-fe1307c13fc1",
"type" : "application/vnd.sas.data.source.definition"
}
]
}
application/vnd.sas.compute.session
The application/vnd.sas.compute.session media type describes the complete details of a current Compute session. The schema is at session.
application/vnd.sas.compute.session+json
Here is an example of the JSON representation of this media type.
{
"owner": "myuserid",
"state": "idle",
"attributes": {
"homeDirectory": "/viya/run/9a143fca-3c12-4516-b3bd-1fe44303bc63"
},
"environment": {
"options": [
"-memsize 8g",
"-nofullstimer"
],
"autoExecLines": [
"libname _all_ list;",
"%put _all_;"
]
},
"serverId": "9a143fca-3c12-4516-b3bd-1fe44303bc63",
"creationTimeStamp": "2020-07-07T18:12:15.000Z",
"description": "This is an optional string to describe my session.",
"applicationName": "sas.ec",
"sessionConditionCode": 0,
"serviceAPIVersion": 4,
"logStatistics": {
"modifiedTimeStamp": "2020-07-07T18:13:03.000Z",
"lineCount": 224
},
"listingStatistics": {
"modifiedTimeStamp": "2020-07-07T18:12:15.000Z",
"lineCount": 0
},
"statistics": {
"systemCpuTime": 0.08,
"userCpuTime": 0.26,
"memorySize": 11108352
},
"stateElapsedTime": 23,
"id": "9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000",
"uri": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000",
"type": "application/vnd.sas.compute.session"
},
{
"method": "GET",
"rel": "alternate",
"href": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000",
"uri": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000",
"type": "application/vnd.sas.compute.session.summary"
},
{
"method": "GET",
"rel": "state",
"href": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/state",
"uri": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/state",
"type": "text/plain"
},
{
"method": "PUT",
"rel": "cancel",
"href": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/state?value=canceled",
"uri": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/state?value=canceled"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000",
"uri": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000"
},
{
"method": "POST",
"rel": "execute",
"href": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/jobs",
"uri": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/jobs",
"type": "application/vnd.sas.compute.job.request",
"responseType": "application/vnd.sas.compute.job"
},
{
"method": "GET",
"rel": "jobs",
"href": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/jobs",
"uri": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/jobs",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.job"
},
{
"method": "GET",
"rel": "files",
"href": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/filerefs",
"uri": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/filerefs",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.fileref.summary"
},
{
"method": "POST",
"rel": "assign",
"href": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/filerefs",
"uri": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/filerefs",
"type": "application/vnd.sas.compute.fileref.request",
"responseType": "application/vnd.sas.compute.fileref"
},
{
"method": "GET",
"rel": "librefs",
"href": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/data",
"uri": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/data",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.library.summary"
},
{
"method": "GET",
"rel": "log",
"href": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/log",
"uri": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/log",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.log.line"
},
{
"method": "GET",
"rel": "logAsText",
"href": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/log",
"uri": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/log",
"type": "text/plain"
},
{
"method": "GET",
"rel": "listing",
"href": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/listing",
"uri": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/listing",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.log.line"
},
{
"method": "GET",
"rel": "listingAsText",
"href": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/listing",
"uri": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/listing",
"type": "text/plain"
},
{
"method": "GET",
"rel": "results",
"href": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/results",
"uri": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/results",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.result"
},
{
"method": "GET",
"rel": "variables",
"href": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/variables",
"uri": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/variables",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.compute.session.variable"
},
{
"method": "GET",
"rel": "engines",
"href": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/engines",
"uri": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/engines",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.data.engine"
},
{
"method": "GET",
"rel": "getFiles",
"href": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/files",
"uri": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/files",
"type": "application/vnd.sas.compute.file.properties"
},
{
"method": "GET",
"rel": "getOption",
"href": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/options/{optionName}",
"uri": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/options/{optionName}",
"type": "text/plain"
},
{
"method": "PUT",
"rel": "updateOption",
"href": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/options/{optionName}",
"uri": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/options/{optionName}",
"type": "text/plain",
"responseType": "text/plain"
},
{
"method": "GET",
"rel": "formats",
"href": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/formats",
"uri": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/formats",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.format.summary"
},
{
"method": "GET",
"rel": "informats",
"href": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/informats",
"uri": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/informats",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.format.summary"
},
{
"href": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/log",
"method": "POST",
"rel": "logStream",
"responseType": "application/vnd.sas.file",
"type": "application/vnd.sas.compute.output.stream.file.request",
"uri": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/log"
},
{
"href": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/listing",
"method": "POST",
"rel": "listingStream",
"responseType": "application/vnd.sas.file",
"type": "application/vnd.sas.compute.output.stream.file.request",
"uri": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/listing"
}
],
"version": 2,
"name": "Optional name to associate with the session."
}
application/vnd.sas.compute.session.summary
The application/vnd.sas.compute.session.summary media type describes the summary of a current Compute session. The schema is at sessionSummary. This media type is currently at version 2, and it is recommended that you use this version of this media type.
to access the session summary information.
application/vnd.sas.compute.session.summary+json
Here is an example of the JSON representation of this media type.
{
"owner": "myuserid",
"id": "559579ea-e885-4da8-b678-61b468b72afe-ses0000",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/sessions/559579ea-e885-4da8-b678-61b468b72afe-ses0000",
"uri": "/compute/sessions/559579ea-e885-4da8-b678-61b468b72afe-ses0000",
"type": "application/vnd.sas.compute.session"
},
{
"method": "GET",
"rel": "alternate",
"href": "/compute/sessions/559579ea-e885-4da8-b678-61b468b72afe-ses0000",
"uri": "/compute/sessions/559579ea-e885-4da8-b678-61b468b72afe-ses0000",
"type": "application/vnd.sas.compute.session.summary"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/compute/sessions/559579ea-e885-4da8-b678-61b468b72afe-ses0000",
"uri": "/compute/sessions/559579ea-e885-4da8-b678-61b468b72afe-ses0000"
}
],
"version": 2,
"name": "compute server session"
}
application/vnd.sas.compute.job.request
The application/vnd.sas.compute.job.request media type describes the complete details of a request that is used to create a job in a Compute session. This media type is currently at version 2. The schema is at jobrequest.
application/vnd.sas.compute.job.request+json
Here is an example of the JSON representation of this media type.
{
"version": 2,
"name" : "Optional name to associate with job.",
"description" : "This is an optional string to describe my job.",
"environment": {
"options": [
"linesize=132"
],
"dataSources": [
"datasource1",
"datasource2"
]
},
"variables": {
"x" : 1,
"y" : "foo"
},
"code": [
"data _null_;",
"infile file1;",
"input;",
"put _infile_;",
"run;"
],
"resources" : [
{
"name" : "file1",
"uri" : "/files/files/fedcba98-7654-3210-fedc-ba9876543210",
"type" : "application/vnd.sas.file",
"scope" : "JOB",
"options" : {
"LRECL" : 1024
}
},
{
"name" : "var1",
"uri" : "/preferences/preferences/user1/sas.property.one.name",
"type" : "application/vnd.sas.preference",
"scope" : "SESSION"
}
]
}
or...
{
"version": 2,
"name" : "Optional name to associate with job.",
"description" : "This is an optional string to describe my job.",
"environment": {
"options": [
"linesize=132"
],
"dataSources": [
"datasource1",
"datasource2"
]
},
"variables": {
"x" : 1,
"y" : "foo"
},
"codeUri": "/files/files/12345678-90ab-cdef-1234-56789abcdef"
}
application/vnd.sas.compute.job
The application/vnd.sas.compute.job media type describes the complete details of a job that is running in a Compute session. The schema is at job.
application/vnd.sas.compute.job+json
Here is an example of the JSON representation of this media type.
{
"completedTimeStamp": "2020-07-07T18:19:10Z",
"creationTimeStamp": "2020-07-07T18:19:09Z",
"id": "E75F4021-0A4F-C141-A90E-4F56BBEBCACE",
"jobConditionCode": 0,
"links": [
{
"href": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/jobs/E75F4021-0A4F-C141-A90E-4F56BBEBCACE",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.job",
"uri": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/jobs/E75F4021-0A4F-C141-A90E-4F56BBEBCACE"
},
{
"href": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/jobs/E75F4021-0A4F-C141-A90E-4F56BBEBCACE/state",
"method": "GET",
"rel": "state",
"type": "text/plain",
"uri": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/jobs/E75F4021-0A4F-C141-A90E-4F56BBEBCACE/state"
},
{
"href": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/jobs/E75F4021-0A4F-C141-A90E-4F56BBEBCACE/state?value=canceled",
"method": "PUT",
"rel": "cancel",
"uri": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/jobs/E75F4021-0A4F-C141-A90E-4F56BBEBCACE/state?value=canceled"
},
{
"href": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/jobs/E75F4021-0A4F-C141-A90E-4F56BBEBCACE",
"method": "DELETE",
"rel": "delete",
"uri": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/jobs/E75F4021-0A4F-C141-A90E-4F56BBEBCACE"
},
{
"href": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/jobs/E75F4021-0A4F-C141-A90E-4F56BBEBCACE/log",
"itemType": "application/vnd.sas.compute.log.line",
"method": "GET",
"rel": "log",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/jobs/E75F4021-0A4F-C141-A90E-4F56BBEBCACE/log"
},
{
"href": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/jobs/E75F4021-0A4F-C141-A90E-4F56BBEBCACE/log",
"method": "GET",
"rel": "logAsText",
"type": "text/plain",
"uri": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/jobs/E75F4021-0A4F-C141-A90E-4F56BBEBCACE/log"
},
{
"href": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/jobs/E75F4021-0A4F-C141-A90E-4F56BBEBCACE/listing",
"itemType": "application/vnd.sas.compute.log.line",
"method": "GET",
"rel": "listing",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/jobs/E75F4021-0A4F-C141-A90E-4F56BBEBCACE/listing"
},
{
"href": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/jobs/E75F4021-0A4F-C141-A90E-4F56BBEBCACE/listing",
"method": "GET",
"rel": "listingAsText",
"type": "text/plain",
"uri": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/jobs/E75F4021-0A4F-C141-A90E-4F56BBEBCACE/listing"
},
{
"href": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/jobs/E75F4021-0A4F-C141-A90E-4F56BBEBCACE/results",
"itemType": "application/vnd.sas.compute.result",
"method": "GET",
"rel": "results",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/jobs/E75F4021-0A4F-C141-A90E-4F56BBEBCACE/results"
},
{
"href": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000",
"method": "GET",
"rel": "up",
"type": "application/vnd.sas.compute.session",
"uri": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000"
},
{
"href": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/jobs/E75F4021-0A4F-C141-A90E-4F56BBEBCACE/log",
"method": "POST",
"rel": "logStream",
"responseType": "application/vnd.sas.file",
"type": "application/vnd.sas.compute.output.stream.file.request",
"uri": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/jobs/E75F4021-0A4F-C141-A90E-4F56BBEBCACE/log"
},
{
"href": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/jobs/E75F4021-0A4F-C141-A90E-4F56BBEBCACE/listing",
"method": "POST",
"rel": "listingStream",
"responseType": "application/vnd.sas.file",
"type": "application/vnd.sas.compute.output.stream.file.request",
"uri": "/compute/sessions/9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000/jobs/E75F4021-0A4F-C141-A90E-4F56BBEBCACE/listing"
}
],
"listingStatistics": {
"lineCount": 0,
"modifiedTimeStamp": "2020-07-07T18:19:09Z"
},
"logStatistics": {
"lineCount": 81,
"modifiedTimeStamp": "2020-07-07T18:19:10Z"
},
"sessionId": "9a143fca-3c12-4516-b3bd-1fe44303bc63-ses0000",
"state": "completed",
"stateElapsedTime": 10,
"statistics": {
"systemCpuTime": 0,
"userCpuTime": 0.04
},
"version": 1
}
application/vnd.sas.compute.output.stream.file.request
The application/vnd.sas.compute.output.stream.file.request media type describes the complete details of a request that is used to request that log or listing output be streamed to an external microservice. This media type is currently at version 1. The schema is at outputStreamFileRequest.
application/vnd.sas.compute.output.stream.file.request+json
Here is an example of the JSON representation of this media type.
{
"version": 1,
"attributes":
{
"format": "prefixedText"
}
}
application/vnd.sas.compute.session.variable
The application/vnd.sas.compute.session.variable media type describes a SAS macro variable that is defined in a Compute session. The schema is at variable.
application/vnd.sas.compute.session.variable+json
Here is an example of the JSON representation of this media type.
{
"name": "SYS_COMPUTE_SESSION_ID",
"scope": "GLOBAL",
"value": "fddb1105-df5e-4b8a-9b00-ad65e887d225-ses0000",
"version": 1,
"links" : [
{
"href": "/compute/sessions/fddb1105-df5e-4b8a-9b00-ad65e887d225-ses0000/variables/SYS_COMPUTE_SESSION_ID",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.session.variable",
"uri": "/compute/sessions/fddb1105-df5e-4b8a-9b00-ad65e887d225-ses0000/variables/SYS_COMPUTE_SESSION_ID"
}
]
}
application/vnd.sas.compute.result
The application/vnd.sas.compute.result media type describes the results or output that were created in a specific job or that are available on a given Compute session. The schema is at result.
application/vnd.sas.compute.result+json
Here is an example of the JSON representation of this media type.
{
"links": [
{
"method": "GET",
"rel": "self",
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/results/d23e6437/sashtml.htm",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/results/d23e6437/sashtml.htm",
"type": "*/*"
}
],
"id": "sashtml.htm",
"name": "sashtml.htm",
"type": "ODS",
"version": 1
}
application/vnd.sas.compute.log.line
The application/vnd.sas.compute.log.line media type describes a specific line from a SAS log or listing. The log or listing information is available either for a job or for a Compute session. The schema is at logLine.
application/vnd.sas.compute.log.line+json
Here is an example of the JSON representation of this media type.
{
"version" : 1,
"line" : "NOTE: Copyright (c) 2016 by SAS Institute Inc., Cary, NC, USA. ",
"type" : "note"
}
application/vnd.sas.compute.library.request
The application/vnd.sas.compute.library.request media type describes a request that you can submit to a Compute session to create a new library in that Compute session. The schema is at libraryRequest.
application/vnd.sas.compute.library.request+json
Here is an example of the JSON representation of this media type.
{
"version": 1,
"name": "mylib",
"path": "/u/myUserID/mylibrary",
"engine": "BASE",
"options": [
""
]
}
application/vnd.sas.compute.library
The application/vnd.sas.compute.library media type describes the complete details of a library that is accessible to the specified Compute session. The schema is at library.
application/vnd.sas.compute.library+json
Here is an example of the JSON representation of this media type.
{
"concatenationCount": 2,
"concatenations": [
{
"engineName": "V9",
"fileFormat": "7",
"physicalName": "/sasgen/dev/mva-vbspre05/sasdvd/sio/laxnd/en/sashelp"
},
{
"engineName": "V9",
"fileFormat": "7",
"physicalName": "/sasgen/dev/mva-vbspre05/sasdvd/sio/laxnd/en/sashelp"
}
],
"engineName": "V9",
"fileFormat": "7",
"flags": 1057,
"id": "SASHELP",
"libref": "SASHELP",
"links": [
{
"href": "/compute/sessions/0f461334-8750-4ce8-aa8a-3e27cdcf6956-ses0000/data/SASHELP",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.library",
"uri": "/compute/sessions/0f461334-8750-4ce8-aa8a-3e27cdcf6956-ses0000/data/SASHELP"
},
{
"href": "/compute/sessions/0f461334-8750-4ce8-aa8a-3e27cdcf6956-ses0000/data/SASHELP",
"method": "GET",
"rel": "alternate",
"type": "application/vnd.sas.compute.library.summary",
"uri": "/compute/sessions/0f461334-8750-4ce8-aa8a-3e27cdcf6956-ses0000/data/SASHELP"
},
{
"href": "/compute/sessions/0f461334-8750-4ce8-aa8a-3e27cdcf6956-ses0000/data/SASHELP",
"method": "DELETE",
"rel": "delete",
"type": "application/vnd.sas.compute.library.summary",
"uri": "/compute/sessions/0f461334-8750-4ce8-aa8a-3e27cdcf6956-ses0000/data/SASHELP"
},
{
"href": "/compute/sessions/0f461334-8750-4ce8-aa8a-3e27cdcf6956-ses0000/data/SASHELP",
"itemType": "application/vnd.sas.compute.data.table.summary",
"method": "GET",
"rel": "tables",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/0f461334-8750-4ce8-aa8a-3e27cdcf6956-ses0000/data/SASHELP"
}
],
"name": "SASHELP",
"options": "",
"physicalName": "",
"readOnly": true,
"sourceDefinition": "/dataSources/providers/Compute/sourceDefinitions/fb06b061-d46c-421a-990e-8a885d693b9c",
"version": 2
}
application/vnd.sas.compute.library.summary
The application/vnd.sas.compute.library.summary media type describes the summary of a library that is accessible to the specified Compute session. The schema is at librarySummary.
application/vnd.sas.compute.library.summary+json
Here is an example of the JSON representation of this media type.
{
"id": "SASHELP",
"links": [
{
"href": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/SASHELP",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.library",
"uri": "/compute/sessions/912e75cb-3e8c-4466-a330-70742325cf71-ses0000/data/SASHELP"
}
],
"name": "SASHELP",
"version": 1
}
application/vnd.sas.compute.data.table
The application/vnd.sas.compute.data.table media type describes the complete details of a SAS data set that is accessible to the specified Compute session. The schema is at tableInfo.
application/vnd.sas.compute.data.table+json
Here is an example of the JSON representation of this media type.
{
"bookmarkLength":12,
"columnCount":4,
"compressionRoutine":"CHAR",
"creationTimeStamp":"2019-04-08T05:53:15Z",
"encoding":"us-ascii ASCII (ANSI)",
"engine":"V9",
"extendedType":"",
"id":"AACOMP",
"label":"",
"libref":"SASHELP",
"links":[
{
"href":"/compute/sessions/7df523d5-94c5-4584-a716-2a10e104cb14-ses0000/data/SASHELP/AACOMP",
"method":"GET",
"rel":"self",
"type":"application/vnd.sas.compute.data.table",
"uri":"/compute/sessions/7df523d5-94c5-4584-a716-2a10e104cb14-ses0000/data/SASHELP/AACOMP"
},
{
"href":"/compute/sessions/7df523d5-94c5-4584-a716-2a10e104cb14-ses0000/data/SASHELP/AACOMP",
"method":"GET",
"rel":"alternate",
"type":"application/vnd.sas.compute.data.table.summary",
"uri":"/compute/sessions/7df523d5-94c5-4584-a716-2a10e104cb14-ses0000/data/SASHELP/AACOMP"
},
{
"href":"/compute/sessions/7df523d5-94c5-4584-a716-2a10e104cb14-ses0000/data/SASHELP/AACOMP/rows",
"itemType":"application/vnd.sas.compute.data.table.row",
"method":"GET",
"rel":"rows",
"type":"application/vnd.sas.collection",
"uri":"/compute/sessions/7df523d5-94c5-4584-a716-2a10e104cb14-ses0000/data/SASHELP/AACOMP/rows"
},
{
"href":"/compute/sessions/7df523d5-94c5-4584-a716-2a10e104cb14-ses0000/data/SASHELP/AACOMP/rows",
"method":"GET",
"rel":"rowsAsCSV",
"type":"text/csv",
"uri":"/compute/sessions/7df523d5-94c5-4584-a716-2a10e104cb14-ses0000/data/SASHELP/AACOMP/rows"
},
{
"href":"/compute/sessions/7df523d5-94c5-4584-a716-2a10e104cb14-ses0000/data/SASHELP/AACOMP/rowSet",
"method":"GET",
"rel":"rowSet",
"type":"application/vnd.sas.compute.data.table.row.set",
"uri":"/compute/sessions/7df523d5-94c5-4584-a716-2a10e104cb14-ses0000/data/SASHELP/AACOMP/rowSet"
},
{
"href":"/compute/sessions/7df523d5-94c5-4584-a716-2a10e104cb14-ses0000/data/SASHELP/AACOMP/promptContent",
"method":"POST",
"rel":"promptContent",
"responseType":"application/vnd.sas.compute.data.table.prompt.content",
"type":"application/vnd.sas.compute.data.table.prompt.content.request",
"uri":"/compute/sessions/7df523d5-94c5-4584-a716-2a10e104cb14-ses0000/data/SASHELP/AACOMP/promptContent"
},
{
"href":"/compute/sessions/7df523d5-94c5-4584-a716-2a10e104cb14-ses0000/data/SASHELP/AACOMP/columns",
"itemType":"application/vnd.sas.compute.data.table.column",
"method":"GET",
"rel":"columns",
"type":"application/vnd.sas.collection",
"uri":"/compute/sessions/7df523d5-94c5-4584-a716-2a10e104cb14-ses0000/data/SASHELP/AACOMP/columns"
},
{
"href":"/compute/sessions/7df523d5-94c5-4584-a716-2a10e104cb14-ses0000/data/SASHELP/AACOMP/views",
"method":"POST",
"rel":"createView",
"responseType":"application/vnd.sas.compute.data.table",
"type":"application/vnd.sas.compute.data.table.view.request",
"uri":"/compute/sessions/7df523d5-94c5-4584-a716-2a10e104cb14-ses0000/data/SASHELP/AACOMP/views"
}
],
"logicalRecordCount":2020,
"modifiedTimeStamp":"2019-04-08T05:53:15Z",
"name":"AACOMP",
"physicalRecordCount":2020,
"recordLength":1269,
"rowCount":2020,
"type":"DATA",
"version":2
}
application/vnd.sas.compute.data.table.summary
The application/vnd.sas.data.table.summary media type describes the summary of a SAS data set that is accessible to the specified Compute session. The schema is at tableSummary.
application/vnd.sas.compute.data.table.summary+json
Here is an example of the JSON representation of this media type.
{
"id": "AFGHANISTAN",
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table",
"uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN"
}
],
"name": "AFGHANISTAN",
"version": 1
}
application/vnd.sas.compute.data.table.column
The application/vnd.sas.compute.data.table.column media type describes the complete details of a column of data that is available from a table or a SAS data set. The schema is at column.
application/vnd.sas.compute.data.table.column+json
This media type is currently at version 2. Here is an example of the JSON representation of this media type.
{
{
"byteLength": 128,
"charLength": 32,
"format": {
"decimals": 0,
"length": 128,
"name": "$CHAR128."
},
"id": "NAME",
"index": 6,
"label": "",
"length": 128,
"links": [
{
"href": "/compute/sessions/7df523d5-94c5-4584-a716-2a10e104cb14/data/sashelp/cars/columns/NAME",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.column",
"uri": "/compute/sessions/7df523d5-94c5-4584-a716-2a10e104cb14/data/sashelp/cars/columns/NAME"
},
{
"href": "/compute/sessions/7df523d5-94c5-4584-a716-2a10e104cb14/formats/%24CHAR",
"method": "GET",
"rel": "format",
"type": "application/vnd.sas.format",
"uri": "/compute/sessions/7df523d5-94c5-4584-a716-2a10e104cb14/formats/%24CHAR"
}
],
"name": "NAME",
"type": "VARCHAR",
"version": 2
}
application/vnd.sas.compute.data.table.row
The application/vnd.sas.compute.data.table.row media type contains the content of a row of data from a specified table or SAS data set. The schema is at row.
application/vnd.sas.compute.data.table.row+json
Here is an example of the JSON representation of this media type.
{
"cells": [
"AF-0101 ",
"AF-01 ",
1,
" 0.020917256889",
" 0.011839722373",
69.136845,
34.603907,
1,
4,
0
]
}
application/vnd.sas.compute.data.table.row.set
The application/vnd.sas.compute.data.table.row.set media type describes the table in a row set format. The schema is at rowset.
application/vnd.sas.compute.data.table.row.set+json
Here is an example of the JSON representation of this media type.
{
"columnDetail": "names",
"columns": [
"Make",
"Model",
"Type",
"Origin",
"DriveTrain",
"MSRP",
"Invoice",
"EngineSize",
"Cylinders",
"Horsepower",
"MPG_City",
"MPG_Highway",
"Weight",
"Wheelbase",
"Length"
],
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/data/MYCA/MYCARS/rowSet",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.row.set",
"uri": "/compute/sessions/RKEY-ses0000/data/MYCA/MYCARS/rowSet"
}
],
"rows": [
[
"Toyota ",
" Corolla CE 4dr ",
"Sedan ",
"Asia ",
"Front",
" $14,085",
" $13,065",
1.8,
4,
130,
32,
40,
2502,
102,
178
],
[
"Toyota ",
" Corolla S 4dr ",
"Sedan ",
"Asia ",
"Front",
" $15,030",
" $13,650",
1.8,
4,
130,
32,
40,
2524,
102,
178
],
[
"Toyota ",
" Corolla LE 4dr ",
"Sedan ",
"Asia ",
"Front",
" $15,295",
" $13,889",
1.8,
4,
130,
32,
40,
2524,
102,
178
],
[
"Toyota ",
" Echo 2dr manual ",
"Sedan ",
"Asia ",
"Front",
" $10,760",
" $10,144",
1.5,
4,
108,
35,
43,
2035,
93,
163
],
[
"Toyota ",
" Echo 2dr auto ",
"Sedan ",
"Asia ",
"Front",
" $11,560",
" $10,896",
1.5,
4,
108,
33,
39,
2085,
93,
163
],
[
"Toyota ",
" Echo 4dr ",
"Sedan ",
"Asia ",
"Front",
" $11,290",
" $10,642",
1.5,
4,
108,
35,
43,
2055,
93,
163
],
[
"Toyota ",
" Camry LE 4dr ",
"Sedan ",
"Asia ",
"Front",
" $19,560",
" $17,558",
2.4,
4,
157,
24,
33,
3086,
107,
189
],
[
"Toyota ",
" Camry LE V6 4dr ",
"Sedan ",
"Asia ",
"Front",
" $22,775",
" $20,325",
3,
6,
210,
21,
29,
3296,
107,
189
],
[
"Toyota ",
" Camry Solara SE 2dr ",
"Sedan ",
"Asia ",
"Front",
" $19,635",
" $17,722",
2.4,
4,
157,
24,
33,
3175,
107,
193
],
[
"Toyota ",
" Camry Solara SE V6 2dr ",
"Sedan ",
"Asia ",
"Front",
" $21,965",
" $19,819",
3.3,
6,
225,
20,
29,
3417,
107,
193
],
[
"Toyota ",
" Avalon XL 4dr ",
"Sedan ",
"Asia ",
"Front",
" $26,560",
" $23,693",
3,
6,
210,
21,
29,
3417,
107,
192
],
[
"Toyota ",
" Camry XLE V6 4dr ",
"Sedan ",
"Asia ",
"Front",
" $25,920",
" $23,125",
3,
6,
210,
21,
29,
3362,
107,
189
],
[
"Toyota ",
" Camry Solara SLE V6 2dr ",
"Sedan ",
"Asia ",
"Front",
" $26,510",
" $23,908",
3.3,
6,
225,
20,
29,
3439,
107,
193
],
[
"Toyota ",
" Avalon XLS 4dr ",
"Sedan ",
"Asia ",
"Front",
" $30,920",
" $27,271",
3,
6,
210,
21,
29,
3439,
107,
192
],
[
"Toyota ",
" Sienna CE ",
"Sedan ",
"Asia ",
"Front",
" $23,495",
" $21,198",
3.3,
6,
230,
19,
27,
4120,
119,
200
],
[
"Toyota ",
" Sienna XLE Limited ",
"Sedan ",
"Asia ",
"Front",
" $28,800",
" $25,690",
3.3,
6,
230,
19,
27,
4165,
119,
200
]
],
"start": 1,
"version": 1
}
application/vnd.sas.compute.data.table.prompt.content
The application/vnd.sas.compute.data.table.prompt.content media type describes the table for the purpose of building prompts. Both formatted and raw unformatted data are returned. A view on the table is created internally for obtaining the data. If the deleteView link is returned to the caller, the session expects the caller to delete the view when they have completed paging through the data. The schema is at promptContent.
application/vnd.sas.compute.data.table.prompt.content+json
Here is an example of the JSON representation of this media type.
{
"columnDetail": "names",
"columns": [
"Make",
"Model",
"Type",
"Origin",
"DriveTrain",
"MSRP",
"Invoice",
"EngineSize",
"Cylinders",
"Horsepower",
"MPG_City",
"MPG_Highway",
"Weight",
"Wheelbase",
"Length"
],
"limit": 10,
"links": [
{
"href": "/compute/sessions/{sessionId}/data/SASHELP/CARS/promptContent?_dpt={dptId}&viewId={viewId}",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.data.table.prompt.content",
"uri": "/compute/sessions/{sessionId}/data/SASHELP/CARS/promptContent?_dpt={dptId}&viewId={viewId}"
},
{
"href": "/compute/sessions/{sessionId}/data/%24VIEWS/{viewId}",
"method": "DELETE",
"rel": "deleteView",
"uri": "/compute/sessions/{sessionId}/data/%24VIEWS/{viewId}"
},
{
"href": "/compute/sessions/{sessionId}/data/SASHELP/CARS/promptContent?_dpt={dptId}&limit=10&start=10&viewId=TCBE3DBC1_A8DD_D448_777AA73AAF04",
"method": "GET",
"rel": "next",
"type": "application/vnd.sas.compute.data.table.prompt.content",
"uri": "/compute/sessions/{sessionId}/data/SASHELP/CARS/promptContent?_dpt={dptId}&limit=10&start=10&viewId=TCBE3DBC1_A8DD_D448_777AA73AAF04"
}
],
"rows": [
{
"formatted": [
"Volvo",
" C70 HPT convertible 2dr",
"Sedan",
"Europe",
"Front",
" $42,565",
" $40,083",
2.3,
5,
242,
20,
26,
3450,
105,
186
],
"raw": [
"Volvo",
" C70 HPT convertible 2dr",
"Sedan",
"Europe",
"Front",
42565,
40083,
2.3,
5,
242,
20,
26,
3450,
105,
186
]
},
{
"formatted": [
"Volvo",
" C70 LPT convertible 2dr",
"Sedan",
"Europe",
"Front",
" $40,565",
" $38,203",
2.4,
5,
197,
21,
28,
3450,
105,
186
],
"raw": [
"Volvo",
" C70 LPT convertible 2dr",
"Sedan",
"Europe",
"Front",
40565,
38203,
2.4,
5,
197,
21,
28,
3450,
105,
186
]
},
{
"formatted": [
"Volvo",
" S40 4dr",
"Sedan",
"Europe",
"Front",
" $25,135",
" $23,701",
1.9,
4,
170,
22,
29,
2767,
101,
178
],
"raw": [
"Volvo",
" S40 4dr",
"Sedan",
"Europe",
"Front",
25135,
23701,
1.9,
4,
170,
22,
29,
2767,
101,
178
]
},
{
"formatted": [
"Volvo",
" S60 2.5 4dr",
"Sedan",
"Europe",
"All",
" $31,745",
" $29,916",
2.5,
5,
208,
20,
27,
3903,
107,
180
],
"raw": [
"Volvo",
" S60 2.5 4dr",
"Sedan",
"Europe",
"All",
31745,
29916,
2.5,
5,
208,
20,
27,
3903,
107,
180
]
},
{
"formatted": [
"Volvo",
" S60 R 4dr",
"Sedan",
"Europe",
"All",
" $37,560",
" $35,382",
2.5,
5,
300,
18,
25,
3571,
107,
181
],
"raw": [
"Volvo",
" S60 R 4dr",
"Sedan",
"Europe",
"All",
37560,
35382,
2.5,
5,
300,
18,
25,
3571,
107,
181
]
},
{
"formatted": [
"Volvo",
" S60 T5 4dr",
"Sedan",
"Europe",
"Front",
" $34,845",
" $32,902",
2.3,
5,
247,
20,
28,
3766,
107,
180
],
"raw": [
"Volvo",
" S60 T5 4dr",
"Sedan",
"Europe",
"Front",
34845,
32902,
2.3,
5,
247,
20,
28,
3766,
107,
180
]
},
{
"formatted": [
"Volvo",
" S80 2.5T 4dr",
"Sedan",
"Europe",
"All",
" $37,885",
" $35,688",
2.5,
5,
194,
20,
27,
3691,
110,
190
],
"raw": [
"Volvo",
" S80 2.5T 4dr",
"Sedan",
"Europe",
"All",
37885,
35688,
2.5,
5,
194,
20,
27,
3691,
110,
190
]
},
{
"formatted": [
"Volvo",
" S80 2.9 4dr",
"Sedan",
"Europe",
"Front",
" $37,730",
" $35,542",
2.9,
6,
208,
20,
28,
3576,
110,
190
],
"raw": [
"Volvo",
" S80 2.9 4dr",
"Sedan",
"Europe",
"Front",
37730,
35542,
2.9,
6,
208,
20,
28,
3576,
110,
190
]
},
{
"formatted": [
"Volvo",
" S80 T6 4dr",
"Sedan",
"Europe",
"Front",
" $45,210",
" $42,573",
2.9,
6,
268,
19,
26,
3653,
110,
190
],
"raw": [
"Volvo",
" S80 T6 4dr",
"Sedan",
"Europe",
"Front",
45210,
42573,
2.9,
6,
268,
19,
26,
3653,
110,
190
]
},
{
"formatted": [
"Volvo",
" V40",
"Wagon",
"Europe",
"Front",
" $26,135",
" $24,641",
1.9,
4,
170,
22,
29,
2822,
101,
180
],
"raw": [
"Volvo",
" V40",
"Wagon",
"Europe",
"Front",
26135,
24641,
1.9,
4,
170,
22,
29,
2822,
101,
180
]
}
],
"version": 1
}
application/vnd.sas.compute.data.table.row.set.request
The application/vnd.sas.compute.data.table.row.set.request media type describes a request that you use to build a rowSet from a specified table. The schema is at rowsetRequest.
application/vnd.sas.compute.data.table.row.set.request+json
Here is an example of the JSON representation of this media type.
{
"columnDetail" : "summary",
"includeColumns" : [
"a",
" my special column",
"c"
],
"sortBy" : [
{
"key" : " my special column"
},
{
"key" : "a",
"direction" : "descending"
}
],
"where" : "a=1",
"columnFormatting": [
{
"name": "a",
"format" : "BEST12."
}
]
}
application/vnd.sas.compute.data.table.rows.request
The application/vnd.sas.compute.data.table.rows.request media type describes a request that you use to build a collection of rows from a specified table. The schema is at rowsRequest.
application/vnd.sas.compute.data.table.rows.request+json
Here is an example of the JSON representation of this media type.
{
"where" : "a=1",
"columnFormatting": [
{
"name": "a",
"format" : "BEST12."
}
]
}
application/vnd.sas.compute.data.table.columns.request
The application/vnd.sas.compute.data.table.columns.request media type describes a request that you use to build a collection of columns from a specified table. The schema is at columnsRequest.
application/vnd.sas.compute.data.table.columns.request+json
Here is an example of the JSON representation of this media type.
{
"includeColumns": [
"FirstName",
"LastName",
"Sex"
]
}
application/vnd.sas.compute.data.table.view.request
The application/vnd.sas.compute.data.table.view.request media type describes a request that you use to create a view that is based on a specified table. The schema is at viewRequest.
application/vnd.sas.compute.data.table.view.request+json
Here is an example of the JSON representation of this media type.
{
"includeColumns" : [
"a",
" my special column",
"c"
],
"sortBy" : [
{
"key" : " my special column"
},
{
"key" : "a",
"direction" : "descending"
}
],
"where" : "a=1",
"distinct" : true
}
application/vnd.sas.compute.data.table.prompt.content.request
The application/vnd.sas.compute.data.table.prompt.content.request media type describes a request that you use to get prompt content from a specified table. Prompt content contains both formatted and unformatted data from the table. The schema is at promptContentRequest.
application/vnd.sas.compute.data.table.prompt.content.request+json
Here is an example of the JSON representation of this media type.
{
"columnDetail" : "summary",
"includeColumns" : [
"a",
" my special column",
"c"
],
"sortBy" : [
{
"key" : " my special column"
},
{
"key" : "a",
"direction" : "descending"
}
],
"where" : "a=1",
"columnFormatting": [
{
"name": "a",
"format" : "BEST12."
}
]
}
application/vnd.sas.compute.fileref
The application/vnd.sas.compute.fileref media type describes the complete details of a SAS fileref that is available in the specified Compute session. This media type is currently at version 2. The schema is at fileref.
application/vnd.sas.compute.fileref+json
Here is an example of the JSON representation of this media type.
{
"accessMethod": "DISK",
"dateModified": "2016-04-27T09:22:16Z",
"fileName": "data",
"fileSize": 4096,
"filePath" : "/mypath/to/myfile/data",
"id": "mydir",
"isDirectory": true,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/mydir",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.fileref",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/mydir"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/mydir",
"method": "GET",
"rel": "alternate",
"type": "application/vnd.sas.compute.fileref.summary",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/mydir"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/mydir",
"method": "DELETE",
"rel": "deassign",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/mydir"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/mydir/content",
"itemType": "application/vnd.sas.compute.fileref.directory.member",
"method": "GET",
"rel": "list",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/mydir/content"
}
],
"name": "mydir",
"version": 2
}
application/vnd.sas.compute.fileref.summary
The application/vnd.sas.compute.fileref.summary media type describes the summary of a SAS fileref that is available in the specified Compute session. The schema is at filerefSummary.
application/vnd.sas.compute.fileref.summary+json
Here is an example of the JSON representation of this media type.
{
"id": "mydir",
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/mydir",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.fileref",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/mydir"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/mydir",
"method": "GET",
"rel": "alternate",
"type": "application/vnd.sas.compute.fileref.summary",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/mydir"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/mydir",
"method": "DELETE",
"rel": "deassign",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/mydir"
}
],
"name": "mydir",
"version": 1
}
application/vnd.sas.compute.fileref.request
The application/vnd.sas.compute.fileref.request media type describes the request that you use to create a new SAS fileref in the specified Compute session. The schema is at filerefRequest.
application/vnd.sas.compute.fileref.directory.member
The application/vnd.sas.compute.fileref.directory.member media type describes the details of a member of a SAS fileref that represents a directory in the specified Compute session. The schema is at dirMember.
application/vnd.sas.compute.fileref.directory.member+json
Here is an example of the JSON representation of this media type.
{
"id": "myfile.txt",
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/filerefs/mydir?member=myfile.txt",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.fileref.directory.member",
"uri": "/compute/sessions/RKEY-ses0000/filerefs/mydir?member=myfile.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/filerefs?parent=mydir",
"method": "POST",
"rel": "assign",
"responseType": "application/vnd.sas.compute.fileref",
"type": "application/vnd.sas.compute.fileref.request",
"uri": "/compute/sessions/RKEY-ses0000/filerefs?parent=mydir"
}
],
"name": "myfile.txt",
"version": 1
}
application/vnd.sas.compute.session.option+json
Here is an example of the JSON representation of this media type.
{
"version": 1,
"name" : "MEMSIZE",
"description" : "Specifies the limit on the amount of virtual memory that can be used during a SAS session.",
"value" : "2147483648"
}
application/vnd.sas.compute.file.request
The application/vnd.sas.compute.file.request media type describes the details of a file or directory that is accessible in the specified Compute session. The schema is at fileRequest.
application/vnd.sas.compute.file.request+json
Here is an example of the JSON representation of this media type.
It provides information about a text file "test/mydir/hello.txt".
{
"name" : "hello.txt",
"path" : "test/mydir"
}
application/vnd.sas.compute.file.properties
The application/vnd.sas.compute.file.properties media type describes the complete details of a file or directory that is accessible in the specified Compute session. The schema is at fileProperties.
application/vnd.sas.compute.file.properties+json
Here is an example of the JSON representation of this media type.
It provides information about a text file "test/hello.txt". In the links, the "type" value shows "text/plain", which matches the file extension.
{
"isDirectory": false,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "GET",
"rel": "getFileProperties",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content",
"method": "GET",
"rel": "getFile",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "DELETE",
"rel": "deleteFile",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content",
"method": "PUT",
"rel": "createFile",
"type": "text/plain",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt/content"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt",
"method": "PUT",
"rel": "renameFile",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~hello.txt"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/{destinationFile}",
"method": "POST",
"rel": "copyFile",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.request",
"uri": "/compute/sessions/RKEY-ses0000/files/{destinationFile}"
}
],
"modifiedTimeStamp": "2018-11-07T08:32:45Z",
"name": "hello.txt",
"path": "test/hello.txt",
"readOnly": false,
"size": 6,
"version": 1
}
Here is another example of the JSON representation of this media type.
It provides information about a directory "test/mydir".
{
"id": "mydir",
"isDirectory": true,
"links": [
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~mydir",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~mydir"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~mydir",
"method": "GET",
"rel": "getDirectoryProperties",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~mydir"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~mydir",
"method": "DELETE",
"rel": "deleteDirectory",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~mydir"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~mydir",
"method": "PUT",
"rel": "renameDirectory",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~mydir"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~mydir",
"method": "POST",
"rel": "makeDirectory",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~mydir"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~mydir",
"method": "POST",
"rel": "createFile",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.properties",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~mydir"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/{destinationDirectory}",
"method": "POST",
"rel": "copyDirectory",
"responseType": "application/vnd.sas.compute.file.properties",
"type": "application/vnd.sas.compute.file.request",
"uri": "/compute/sessions/RKEY-ses0000/files/{destinationDirectory}"
},
{
"href": "/compute/sessions/RKEY-ses0000/files/test~fs~mydir/members",
"itemType": "application/vnd.sas.compute.file.properties",
"method": "GET",
"rel": "getDirectoryMembers",
"type": "application/vnd.sas.collection",
"uri": "/compute/sessions/RKEY-ses0000/files/test~fs~mydir/members"
}
],
"modifiedTimeStamp": "2018-11-14T08:49:55Z",
"name": "mydir",
"path": "test/mydir",
"readOnly": false,
"size": 4096,
"version": 1
}
application/vnd.sas.format.summary
The application/vnd.sas.format.summary media type describes the summary of a SAS format or informat.
The schema is at formatSummary.
application/vnd.sas.format.summary+json
Here is an example of the JSON representation of this media type.
It provides a brief description of the SAS format $VARYING.
{
"id": "$VARYING",
"links": [
{
"href": "/compute/sessions/0001-ses0000/formats/%24VARYING",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.format",
"uri": "/compute/sessions/0001-ses0000/formats/%24VARYING"
}
],
"name": "$VARYING",
"version": 1
}
application/vnd.sas.format
The application/vnd.sas.format media type describes the details of a SAS format or informat.
The schema is at format.
application/vnd.sas.format+json
Here is an example of the JSON representation of this media type.
It provides a detailed description of the SAS format $VARYING.
{
"category": "char",
"defaultDecimals": 0,
"defaultModifier": 272,
"defaultWidth": 8,
"formatType": "format",
"id": "$VARYING",
"justification": "right",
"links": [
{
"href": "/compute/sessions/0001-ses0000/formats/%24VARYING",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.format",
"uri": "/compute/sessions/0001-ses0000/formats/%24VARYING"
}
],
"maximumDecimals": 0,
"maximumWidth": 32767,
"minimumDecimals": 0,
"minimumWidth": 1,
"name": "$VARYING",
"version": 1
}
Root
Path: /
The root of the API. This resource contains links to the top-level resources in the API.
The response uses the application/vnd.sas.api
media type.
Links
The GET /
response includes the following links.
Relation | Method | Description |
---|---|---|
contexts |
GET |
Returns the first page of contexts that are accessible by the user. |
URI: /compute/contexts |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.context |
||
contextSummaries |
GET |
Returns the first page of context summaries that are accessible by the user. |
URI: /compute/contexts |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.context.summary |
||
createContext |
POST |
Creates a new context definition. |
URI: /compute/contexts |
||
Body Type: application/vnd.sas.compute.context.request |
||
Response type: application/vnd.sas.compute.context |
||
servers |
GET |
Returns the first page of server resources that are accessible by the user. |
URI: /compute/servers |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.server |
||
serverSummaries |
GET |
Returns the first page of server resource summaries that are accessible by the user. |
URI: /compute/servers |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.server.summary |
||
sessions |
GET |
Returns the first page of active sessions accessible by the user. |
URI: /compute/sessions |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.session |
||
sessionSummaries |
GET |
Returns the first page of active session summaries accessible by the user. |
URI: /compute/sessions |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.session.summary |
Collection Resources
Path: /contexts
This API provides collections of contexts.
Members of the /contexts
collection are contexts, /contexts/{contextId}
.
Links
The contexts
collection representation is
application/vnd.sas.collection
.
The collection items are application/vnd.sas.compute.context.summary
resources by default. The collection also returns
application/vnd.sas.compute.context
items if directed by the Accept-Item
header.
Responses include the following links:
Relation | Method | Description |
---|---|---|
self |
GET |
Returns the current page from the collection. |
URI: /compute/contexts |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.context.summary |
||
collection |
GET |
Returns the first page of the collection, without sorting or filtering criteria. |
URI: /compute/contexts |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.context.summary |
||
createContext |
POST |
Creates a new context definition. |
URI: /compute/contexts |
||
Body Type: application/vnd.sas.compute.context.request |
||
Response type: application/vnd.sas.compute.context |
||
prev |
GET |
Returns the previous page of the collection. This link is omitted if the current view is on the first page. |
URI: /compute/contexts |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.context.summary |
||
first |
GET |
Returns the first page of the collection. This link is omitted if the current view is on the first page. |
URI: /compute/contexts |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.context.summary |
||
next |
GET |
Returns the next page of the collection. This link is omitted if the current view is on the last page of the collection. |
URI: /compute/contexts |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.context.summary |
||
last |
GET |
Returns the last page of the collection. This link is omitted if the current view is on the last page. |
URI: /compute/contexts |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.context.summary |
Sorting and Filtering
You can sort and filter these collections by using the ?sortBy=
and
?filter=
query parameters.
The default sort order for the /contexts
collection is by creationTimeStamp
.
Filtering and sorting might use the following members of the Context:
id
name
description
launchType
createdBy
modifiedBy
creationTimeStamp
modifiedTimeStamp
Path: /sessions
This API provides collections of sessions.
Members of the /sessions
collection are Compute sessions, /sessions/{sessionId}
.
Links
The sessions
collection representation is
application/vnd.sas.collection
.
The collection items are application/vnd.sas.compute.session.summary
resources by default. The collection also returns
application/vnd.sas.compute.session
items, if directed by the Accept-Item
header.
Responses include the following links:
Relation | Method | Description |
---|---|---|
self |
GET |
Returns the current page from the collection. |
URI: /compute/sessions |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.session.summary |
||
collection |
GET |
Returns the first page of the collection, without sorting or filtering criteria. |
URI: /compute/sessions |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.session.summary |
||
prev |
GET |
Returns the previous page of the collection. This link is omitted if the current view is on the first page. |
URI: /compute/sessions |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.session.summary |
||
first |
GET |
Returns the first page of the collection. This link is omitted if the current view is on the first page. |
URI: /compute/sessions |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.session.summary |
||
next |
GET |
Returns the next page of the collection. This link is omitted if the current view is on the last page of the collection. |
URI: /compute/sessions |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.session.summary |
||
last |
GET |
Returns the last page of the collection. This link is omitted if the current view is on the last page. |
URI: /compute/sessions |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.session.summary |
Sorting and Filtering
You can sort and filter these collections by using the ?sortBy=
and
?filter=
query parameters.
The default sort order for the /sessions
collection is by creationTimeStamp
.
Filtering and sorting can use the following members of the Session:
id
name
description
applicationName
creationTimeStamp
owner
serverId
sessionConditionCode
state
stateElapsedTime
Path: /servers
This API provides collections of servers.
Members of the /servers
collection are SAS Compute Servers, /servers/{serverId}
. Only administrators can query for the
list of servers.
Links
The servers
collection representation is
application/vnd.sas.collection
.
The collection items are application/vnd.sas.compute.server.summary
resources by default. The collection also returns
application/vnd.sas.compute.server
items, if directed by the Accept-Item
header.
Responses include the following links:
Relation | Method | Description |
---|---|---|
self |
GET |
Returns the current page from the collection. |
URI: /compute/servers |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.server.summary |
||
collection |
GET |
Returns the first page of the collection, without sorting or filtering criteria. |
URI: /compute/servers |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.server.summary |
||
prev |
GET |
Returns the previous page of the collection. This link is omitted if the current view is on the first page. |
URI: /compute/servers |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.server.summary |
||
first |
GET |
Returns the first page of the collection. This link is omitted if the current view is on the first page. |
URI: /compute/servers |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.server.summary |
||
next |
GET |
Returns the next page of the collection. This link is omitted if the current view is on the last page of the collection. |
URI: /compute/servers |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.server.summary |
||
last |
GET |
Returns the last page of the collection. This link is omitted if the current view is on the last page. |
URI: /compute/servers |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.server.summary |
Sorting and Filtering
You can sort and filter these collections by using the ?sortBy=
and
?filter=
query parameters.
The default sort order for the /servers
collection is by order of creation.
Filtering and sorting can use the following members of the Server:
id
contextName
contextId
createdBy
creationTimeStamp
Path: /servers/{serverId}/sessions
This API provides collections of sessions.
Members of the /servers/{serverId}/sessions
collection are Compute sessions, /servers/{serverId}/sessions/{sessionId}
.
This endpoint is available only to administrators.
Links
The serverSessions
collection representation is
application/vnd.sas.collection
.
The collection items are application/vnd.sas.compute.session.summary
resources by default. The collection also returns
application/vnd.sas.compute.session
items, if directed by the Accept-Item
header.
Responses include the following links:
Relation | Method | Description |
---|---|---|
self |
GET |
Returns the current page from the collection. |
URI: /compute/sessions |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.session.summary |
||
collection |
GET |
Returns the first page of the collection, without sorting or filtering criteria. |
URI: /compute/sessions |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.session.summary |
||
prev |
GET |
Returns the previous page of the collection. This link is omitted if the current view is on the first page. |
URI: /compute/sessions |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.session.summary |
||
first |
GET |
Returns the first page of the collection. This link is omitted if the current view is on the first page. |
URI: /compute/sessions |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.session.summary |
||
next |
GET |
Returns the next page of the collection. This link is omitted if the current view is on the last page of the collection. |
URI: /compute/sessions |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.session.summary |
||
last |
GET |
Returns the last page of the collection. This link is omitted if the current view is on the last page. |
URI: /compute/sessions |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.session.summary |
Sorting and Filtering
You can sort and filter these collections by using the ?sortBy=
and
?filter=
query parameters.
The default sort order for the /servers/{serverId}/sessions
collection is by creationTimeStamp
.
Filtering and sorting can use the following members of the Session:
id
name
description
applicationName
creationTimeStamp
owner
serverId
sessionConditionCode
state
stateElapsedTime
Path: /sessions/{sessionId}/jobs
This API provides collections of jobs in a specified Compute session.
Members of the /sessions/{sessionId}/jobs
collection are Compute jobs, /sessions/{sessionId}/jobs/{jobId}
.
Links
The jobs
collection representation is
application/vnd.sas.collection
.
The collection items are application/vnd.sas.compute.job
resources.
Responses include the following links:
Relation | Method | Description |
---|---|---|
self |
GET |
Returns the current page from the collection. |
URI: /compute/sessions/{sessionId}/jobs |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.job |
||
collection |
GET |
Returns the first page of the collection, without sorting or filtering criteria. |
URI: /compute/sessions/{sessionId}/jobs |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.job |
||
create |
POST |
Creates a new job in the given session. |
URI: /compute/sessions/{sessionId}/jobs |
||
Body type: application/vnd.sas.compute.job.request |
||
Response type: application/vnd.sas.compute.job |
||
up |
GET |
Returns a link to the containing session for this collection. |
URI: /compute/sessions/{sessionId} |
||
Response type: application/vnd.sas.compute.session |
||
prev |
GET |
Returns the previous page of the collection. This link is omitted if the current view is on the first page. |
URI: /compute/sessions/{sessionId}/jobs |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.job |
||
first |
GET |
Returns the first page of the collection. This link is omitted if the current view is on the first page. |
URI: /compute/sessions/{sessionId}/jobs |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.job |
||
next |
GET |
Returns the next page of the collection. This link is omitted if the current view is on the last page of the collection. |
URI: /compute/sessions/{sessionId}/jobs |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.job |
||
last |
GET |
Returns the last page of the collection. This link is omitted if the current view is on the last page. |
URI: /compute/sessions/{sessionId}/jobs |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.job |
Sorting and Filtering
You can sort and filter these collections by using the ?sortBy=
and
?filter=
query parameters.
The default sort order for the /sessions/{sessionId}/jobs
collection is by creationTimeStamp
.
Filtering and sorting can use the following members of the Job:
id
name
description
jobConditionCode
sessionId
state
stateElapsedTime
creationTimeStamp
completedTimeStamp
Path: /sessions/{sessionId}/listing
This API returns lines of output from the SAS listing for the entire session. By default it returns collections.
However, if the request includes an Accept header specifying text/plain, the entire session listing is returned as ordinary text encoded in UTF-8 with CRLF as the line delimiters. No query parameters are honored when requesting the output as plain text.
For a collection response, members of the /sessions/{sessionId}/listing
collection are listing lines, of the type
application/vnd.sas.compute.log.line
. The default limit of this collection is
100 lines.
Links
The sessionListing
collection representation is
application/vnd.sas.collection
.
The collection items are application/vnd.sas.compute.log.line
resources.
Responses include the following links:
Relation | Method | Description |
---|---|---|
self |
GET |
Returns the current page from the collection. |
URI: /compute/sessions/{sessionId}/listing |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.log.line |
||
collection |
GET |
Returns the first page of the collection, without sorting or filtering criteria. |
URI: /compute/sessions/{sessionId}/listing |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.log.line |
||
up |
GET |
Returns the session that owns this collection. |
URI: /compute/sessions/{sessionId} |
||
Response type: application/vnd.sas.compute.session |
||
prev |
GET |
Returns the previous page of the collection. This link is omitted if the current view is on the first page. |
URI: /compute/sessions/{sessionId}/listing |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.log.line |
||
first |
GET |
Returns the first page of the collection. This link is omitted if the current view is on the first page. |
URI: /compute/sessions/{sessionId}/listing |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.log.line |
||
next |
GET |
Returns the next page of the collection. This link is omitted if the current view is on the last page of the collection. |
URI: /compute/sessions/{sessionId}/listing |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.log.line |
||
last |
GET |
Returns the last page of the collection. This link is omitted if the current view is on the last page. |
URI: /compute/sessions/{sessionId}/listing |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.log.line |
Sorting and Filtering
These collections do not support sorting. Filtering is supported by using the
?filter=
query parameters.
Filtering can use the following member of the logLine:
- type
Path: /sessions/{sessionId}/jobs/{jobId}/listing
This API returns lines of output from the SAS listing for a specified job. By default it returns collections.
However, if the request includes an Accept header specifying text/plain, the entire job listing is returned as ordinary text encoded in UTF-8 with CRLF as the line delimiters. No query parameters are honored when requesting the output as plain text.
For a collection response, members of the /sessions/{sessionId}/jobs/{jobId}/listing
collection are listing lines, of the type
application/vnd.sas.compute.log.line
. The default limit of this collection is
100 lines.
Links
The jobListing
collection representation is
application/vnd.sas.collection
.
The collection items are application/vnd.sas.compute.log.line
resources.
Responses include the following links:
Relation | Method | Description |
---|---|---|
self |
GET |
Returns the current page from the collection. |
URI: /compute/sessions/{sessionId}/jobs/{jobId}/listing |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.log.line |
||
collection |
GET |
Returns the first page of the collection, without sorting or filtering criteria. |
URI: /compute/sessions/{sessionId}/jobs/{jobId}/listing |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.log.line |
||
up |
GET |
Returns the job that owns this collection. |
URI: /compute/sessions/{sessionId}/jobs/{jobId} |
||
Response type: application/vnd.sas.compute.job |
||
prev |
GET |
Returns the previous page of the collection. This link is omitted if the current view is on the first page. |
URI: /compute/sessions/{sessionId}/jobs/{jobId}/listing |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.log.line |
||
first |
GET |
Returns the first page of the collection. This link is omitted if the current view is on the first page. |
URI: /compute/sessions/{sessionId}/jobs/{jobId}/listing |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.log.line |
||
next |
GET |
Returns the next page of the collection. This link is omitted if the current view is on the last page of the collection. |
URI: /compute/sessions/{sessionId}/jobs/{jobId}/listing |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.log.line |
||
last |
GET |
Returns the last page of the collection. This link is omitted if the current view is on the last page. |
URI: /compute/sessions/{sessionId}/jobs/{jobId}/listing |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.log.line |
Sorting and Filtering
These collections do not support sorting. Filtering is supported by using the
?filter=
query parameters.
Filtering can use the following members of the logLine:
- type
Path: /sessions/{sessionId}/log
This API returns lines of output from the SAS log for the entire session. By default it returns collections.
However, if the request includes an Accept header specifying text/plain, the entire session log is returned as ordinary text encoded in UTF-8 with CRLF as the line delimiters. No query parameters are honored when requesting the output as plain text.
For a collection response, members of the /sessions/{sessionId}/log
collection are log lines, of the type
application/vnd.sas.compute.log.line
. The default limit of this collection is
100 lines.
Links
The sessionLog
collection representation is
application/vnd.sas.collection
.
The collection items are application/vnd.sas.compute.log.line
resources.
Responses include the following links:
Relation | Method | Description |
---|---|---|
self |
GET |
Returns the current page from the collection. |
URI: /compute/sessions/{sessionId}/log |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.log.line |
||
collection |
GET |
Returns the first page of the collection, without sorting or filtering criteria. |
URI: /compute/sessions/{sessionId}/log |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.log.line |
||
up |
GET |
Returns the owning session for this collection. |
URI: /compute/sessions/{sessionId} |
||
Response type: application/vnd.sas.compute.session |
||
prev |
GET |
Returns the previous page of the collection. This link is omitted if the current view is on the first page. |
URI: /compute/sessions/{sessionId}/log |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.log.line |
||
first |
GET |
Returns the first page of the collection. This link is omitted if the current view is on the first page. |
URI: /compute/sessions/{sessionId}/log |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.log.line |
||
next |
GET |
Returns the next page of the collection. This link is omitted if the current view is on the last page of the collection. |
URI: /compute/sessions/{sessionId}/log |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.log.line |
||
last |
GET |
Returns the last page of the collection. This link is omitted if the current view is on the last page of the collection. |
URI: /compute/sessions/{sessionId}/log |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.log.line |
Sorting and Filtering
These collections do not support sorting. Filtering is supported by using the
?filter=
query parameters.
Filtering can use the following members of the logLine:
- type
Path: /sessions/{sessionId}/jobs/{jobId}/log
This API returns lines of output from the SAS log for a specified job. By default it returns collections.
However, if the request includes an Accept header specifying text/plain, the entire job log is returned as ordinary text encoded in UTF-8 with CRLF as the line delimiters. No query parameters are honored when requesting the output as plain text.
For a collection response, members of the /sessions/{sessionId}/jobs/{jobId}/log
collection are log lines, of the type
application/vnd.sas.compute.log.line
. The default limit of this collection is
100 lines.
Links
The jobLog
collection representation is
application/vnd.sas.collection
.
The collection items are application/vnd.sas.compute.log.line
resources.
Responses include the following links:
Relation | Method | Description |
---|---|---|
self |
GET |
Returns the current page from the collection. |
URI: /compute/sessions/{sessionId}/jobs/{jobId}/log |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.log.line |
||
collection |
GET |
Returns the first page of the collection, without sorting or filtering criteria. |
URI: /compute/sessions/{sessionId}/jobs/{jobId}/log |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.log.line |
||
up |
GET |
Returns the collection of all jobs. |
URI: /compute/sessions/{sessionId}/jobs/{jobId} |
||
Response type: application/vnd.sas.compute.job |
||
prev |
GET |
Returns the previous page of the collection. This link is omitted if the current view is on the first page. |
URI: /compute/sessions/{sessionId}/jobs/{jobId}/log |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.log.line |
||
first |
GET |
Returns the first page of the collection. This link is omitted if the current view is on the first page. |
URI: /compute/sessions/{sessionId}/jobs/{jobId}/log |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.log.line |
||
next |
GET |
Returns the next page of the collection. This link is omitted if the current view is on the last page of the collection. |
URI: /compute/sessions/{sessionId}/jobs/{jobId}/log |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.log.line |
||
last |
GET |
Returns the last page of the collection. This link is omitted if the current view is on the last page. |
URI: /compute/sessions/{sessionId}/jobs/{jobId}/log |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.log.line |
Sorting and Filtering
These collections do not support sorting. Filtering is supported by using the
?filter=
query parameters.
Filtering can use the following members of the logLine:
- type
Path: /sessions/{sessionId}/results
This API provides collections of the results or output resources for
the entire session.
Members of the /sessions/{sessionId}/results
collection are result resources, of the type
application/vnd.sas.compute.result
.
Links
The sessionResults
collection representation is
application/vnd.sas.collection
.
The collection items are application/vnd.sas.compute.result
resources.
Responses include the following links:
Relation | Method | Description |
---|---|---|
self |
GET |
Returns the current page from the collection. |
URI: /compute/sessions/{sessionId}/results |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.result |
||
collection |
GET |
Returns the first page of the collection, without sorting or filtering criteria. |
URI: /compute/sessions/{sessionId}/results |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.result |
||
up |
GET |
Returns the collection of all session results. |
URI: /compute/sessions/{sessionId} |
||
Response type: application/vnd.sas.compute.session |
||
prev |
GET |
Returns the previous page of the collection. This link is omitted if the current view is on the first page. |
URI: /compute/sessions/{sessionId}/results |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.result |
||
first |
GET |
Returns the first page of the collection. This link is omitted if the current view is on the first page. |
URI: /compute/sessions/{sessionId}/results |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.result |
||
next |
GET |
Returns the next page of the collection. This link is omitted if the current view is on the last page of the collection. |
URI: /compute/sessions/{sessionId}/results |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.result |
||
last |
GET |
Returns the last page of the collection. This link is omitted if the current view is on the last page. |
URI: /compute/sessions/{sessionId}/results |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.result |
Sorting and Filtering
These collections can be sorted and filtered using the ?sortBy=
and
?filter=
query parameters.
The default sort order for the /sessions/{sessionId}/results
collection is by name
.
Filtering and sorting can use the following members of the Result:
id
name
type
Path: /sessions/{sessionId}/jobs/{jobId}/results
This API provides collections of the results or output resources for
the given job.
Members of the /sessions/{sessionId}/results
collection are result resources, of the type
application/vnd.sas.compute.result
.
Links
The jobResults
collection representation is
application/vnd.sas.collection
.
The collection items are application/vnd.sas.compute.result
resources.
Responses include the following links:
Relation | Method | Description |
---|---|---|
self |
GET |
Returns the current page from the collection. |
URI: /compute/sessions/{sessionId}/jobs/{jobId}/results |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.result |
||
collection |
GET |
Returns the first page of the collection, without sorting or filtering criteria. |
URI: /compute/sessions/{sessionId}/jobs/{jobId}/results |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.result |
||
up |
GET |
Returns the collection of all job results for this collection. |
URI: /compute/sessions/{sessionId}/jobs/{jobId} |
||
Response type: application/vnd.sas.compute.job |
||
prev |
GET |
Returns the previous page of the collection. This link is omitted if the current view is on the first page. |
URI: /compute/sessions/{sessionId}/jobs/{jobId}/results |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.result |
||
first |
GET |
Returns the first page of the collection. This link is omitted if the current view is on the first page. |
URI: /compute/sessions/{sessionId}/jobs/{jobId}/results |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.result |
||
next |
GET |
Returns the next page of the collection. This link is omitted if the current view is on the last page of the collection. |
URI: /compute/sessions/{sessionId}/jobs/{jobId}/results |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.result |
||
last |
GET |
Returns the last page of the collection. This link is omitted if the current view is on the last page. |
URI: /compute/sessions/{sessionId}/jobs/{jobId}/results |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.result |
Sorting and Filtering
These collections can be sorted and filtered using the ?sortBy=
and
?filter=
query parameters.
The default sort order for the /sessions/{sessionId}/jobs/{jobId}/results
collection is by name
.
Filtering and sorting can use the following members of the Result:
id
name
type
Path: /sessions/{sessionId}/filerefs
This API provides collections of SAS filerefs available in the given
session.
Members of the /sessions/{sessionId}/filerefs
collection are filerefs, /sessions/{sessionId}/filerefs/{filerefName}
Links
The filerefs
collection representation is
application/vnd.sas.collection
.
The collection items are application/vnd.sas.compute.fileref.summary
resources by default. The collection also returns
application/vnd.sas.compute.fileref
items if directed by the Accept-Item
header.
Responses include the following links:
Relation | Method | Description |
---|---|---|
self |
GET |
Returns the current page from the collection. |
URI: /compute/sessions/{sessionId}/fileref |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.fileref.summary |
||
collection |
GET |
Returns the first page of the collection, without sorting or filtering criteria. |
URI: /compute/sessions/{sessionId}/fileref |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.fileref.summary |
||
create |
POST |
Creates a new fileref in the given session. |
URI: /compute/sessions/{sessionId}/fileref |
||
Body type: application/vnd.sas.compute.fileref.request |
||
Item type: application/vnd.sas.compute.fileref.summary |
||
up |
GET |
Returns the collection of all filerefs for a session. |
URI: /compute/sessions/{sessionId} |
||
Response type: application/vnd.sas.compute.session |
||
prev |
GET |
Returns the previous page of the collection. This link is omitted if the current view is on the first page. |
URI: /compute/sessions/{sessionId}/fileref |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.fileref.summary |
||
first |
GET |
Returns the first page of the collection. This link is omitted if the current view is on the first page. |
URI: /compute/sessions/{sessionId}/fileref |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.fileref.summary |
||
next |
GET |
Returns the next page of the collection. This link is omitted if the current view is on the last page of the collection. |
URI: /compute/sessions/{sessionId}/fileref |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.fileref.summary |
||
last |
GET |
Returns the last page of the collection. This link is omitted if the current view is on the last page. |
URI: /compute/sessions/{sessionId}/fileref |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.fileref.summary |
Sorting and Filtering
These collections can be sorted and filtered using the ?sortBy=
and
?filter=
query parameters.
The default sort order for the /sessions/{sessionId}/fileref
collection is by order of creation.
Filtering and sorting can use the following members of the Fileref:
id
name
accessMethod
fileName
filePath
fileSize
isAggregation
isDirectory
Path: /sessions/{sessionId}/filerefs/{filerefName}/content
This API provides collections of members of a SAS fileref that is a
directory. This endpoint returns a collection only in the case where the isDirectory
member of the given fileref is true.
Links
The directoryMembers
collection representation is
application/vnd.sas.collection
.
The collection items are application/vnd.sas.compute.fileref.directory.member
resources.
Responses include the following links:
Relation | Method | Description |
---|---|---|
self |
GET |
Returns the current page from the collection. |
URI: /compute/sessions/{sessionId}/filerefs/{filerefName}/content |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.fileref.directory.member |
||
collection |
GET |
Returns the first page of the collection, without sorting or filtering criteria. |
URI: /compute/sessions/{sessionId}/filerefs/{filerefName}/content |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.fileref.directory.member |
||
up |
GET |
Returns the collection of all filerefs for a directory. |
URI: /compute/sessions/{sessionId}/filerefs/{filerefName} |
||
Response type: application/vnd.sas.compute.fileref |
||
prev |
GET |
Returns the previous page of the collection. This link is omitted if the current view is on the first page. |
URI: /compute/sessions/{sessionId}/filerefs/{filerefName}/content |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.fileref.directory.member |
||
first |
GET |
Returns the first page of the collection. This link is omitted if the current view is on the first page. |
URI: /compute/sessions/{sessionId}/filerefs/{filerefName}/content |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.fileref.directory.member |
||
next |
GET |
Returns the next page of the collection. This link is omitted if the current view is on the last page of the collection. |
URI: /compute/sessions/{sessionId}/filerefs/{filerefName}/content |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.fileref.directory.member |
||
last |
GET |
Returns the last page of the collection. This link is omitted if the current view is on the last page. |
URI: /compute/sessions/{sessionId}/filerefs/{filerefName}/content |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.fileref.directory.member |
Sorting and Filtering
These collections can be sorted and filtered using the ?sortBy=
and
?filter=
query parameters.
Filtering and sorting can use the following members of the dirMember:
id
name
isDirectory
Path: /sessions/{sessionId}/data
This API provides collections of SAS libraries available in a given
session.
Members of the /sessions/{sessionId}/data
collection are SAS libraries /sessions/{sessionId}/data/{libref}
.
Links
The libraries
collection representation is
application/vnd.sas.collection
.
The collection items are application/vnd.sas.compute.library.summary
resources by default. The collection also returns
application/vnd.sas.compute.library
items if directed by the Accept-Item
header.
Responses include the following links:
Relation | Method | Description |
---|---|---|
self |
GET |
Returns the current page from the collection. |
URI: /compute/sessions/{sessionId}/data |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.library.summary |
||
collection |
GET |
Returns the first page of the collection, without sorting or filtering criteria. |
URI: /compute/sessions/{sessionId}/data |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.library.summary |
||
create |
POST |
Creates a new library in the given session. |
URI: /compute/sessions/{sessionId}/data |
||
Body type: application/vnd.sas.compute.library.request |
||
Response type: application/vnd.sas.compute.library |
||
up |
GET |
Returns the collection of all libraries for a session. |
URI: /compute/sessions/{sessionId} |
||
Response type: application/vnd.sas.compute.session |
||
prev |
GET |
Returns the previous page of the collection. This link is omitted if the current view is on the first page. |
URI: /compute/sessions/{sessionId}/data |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.library.summary |
||
first |
GET |
Returns the first page of the collection. This link is omitted if the current view is on the first page. |
URI: /compute/sessions/{sessionId}/data |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.library.summary |
||
next |
GET |
Returns the next page of the collection. This link is omitted if the current view is on the last page of the collection. |
URI: /compute/sessions/{sessionId}/data |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.library.summary |
||
last |
GET |
Returns the last page of the collection. This link is omitted if the current view is on the last page. |
URI: /compute/sessions/{sessionId}/data |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.library.summary |
Sorting and Filtering
These collections can be sorted and filtered using the ?sortBy=
and
?filter=
query parameters.
Filtering and sorting can use the following members of the Library:
id
name
concatenationCount
engineName
fileFormat
flags
libref
Path: /sessions/{sessionId}/data/{libref}
This API provides collections of SAS libraries available in a given
session.
Members of the /sessions/{sessionId}/data/{libref}
collection are SAS data sets
/sessions/{sessionId}/data/{libref}/{tableName}
.
Links
The tables
collection representation is
application/vnd.sas.collection
.
The collection items are application/vnd.sas.compute.data.table.summary
resources.
Responses include the following links:
Relation | Method | Description |
---|---|---|
self |
GET |
Returns the current page from the collection. |
URI: /compute/sessions/{sessionId}/data/{libref} |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.data.table.summary |
||
collection |
GET |
Returns the first page of the collection, without sorting or filtering criteria. |
URI: /compute/sessions/{sessionId}/data/{libref} |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.data.table.summary |
||
up |
GET |
Returns the collection of all libraries for a session. |
URI: /compute/sessions/{sessionId}/data |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.library.summary |
||
prev |
GET |
Returns the previous page of the collection. This link is omitted if the current view is on the first page. |
URI: /compute/sessions/{sessionId}/data/{libref} |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.data.table.summary |
||
first |
GET |
Returns the first page of the collection. This link is omitted if the current view is on the first page. |
URI: /compute/sessions/{sessionId}/data/{libref} |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.data.table.summary |
||
next |
GET |
Returns the next page of the collection. This link is omitted if the current view is on the last page of the collection. |
URI: /compute/sessions/{sessionId}/data/{libref} |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.data.table.summary |
||
last |
GET |
Returns the last page of the collection. This link is omitted if the current view is on the last page. |
URI: /compute/sessions/{sessionId}/data/{libref} |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.data.table.summary |
Sorting and Filtering
These collections can be sorted and filtered using the ?sortBy=
and
?filter=
query parameters.
Filtering and sorting can use the following members of the tableSummary:
id
name
Path: /sessions/{sessionId}/data/{libref}/{tableName}/rows
This API provides collections of rows of data in a given SAS data set.
Members of the /sessions/{sessionId}/data/{libref}/{tableName}/rows
collection are rows.
This API does not enforce a limit on the size of the collection returned.
Links
The rows
collection representation is
application/vnd.sas.collection
.
The collection items are application/vnd.sas.compute.data.table.row
resources.
Responses include the following links:
Relation | Method | Description |
---|---|---|
self |
GET |
Returns the current page from the collection. |
URI: /compute/sessions/{sessionId}/data/{libref}/{table}/rows |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.data.table.row |
||
collection |
GET |
Returns the first page of the collection, without sorting or filtering criteria. |
URI: /compute/sessions/{sessionId}/data/{libref}/{table}/rows |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.data.table.row |
||
up |
GET |
Returns the collection of all rows for a table. |
URI: /compute/sessions/{sessionId}/data/{libref}/{table} |
||
Response type: application/vnd.sas.compute.data.table |
||
prev |
GET |
Returns the previous page of the collection. This link is omitted if the current view is on the first page. |
URI: /compute/sessions/{sessionId}/data/{libref}/{table}/rows |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.data.table.row |
||
first |
GET |
Returns the first page of the collection. This link is omitted if the current view is on the first page. |
URI: /compute/sessions/{sessionId}/data/{libref}/{table}/rows |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.data.table.row |
||
next |
GET |
Returns the next page of the collection. This link is omitted if the current view is on the last page of the collection. |
URI: /compute/sessions/{sessionId}/data/{libref}/{table}/rows |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.data.table.row |
||
last |
GET |
Returns the last page of the collection. This link is omitted if the current view is on the last page. |
URI: /compute/sessions/{sessionId}/data/{libref}/{table}/rows |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.data.table.row |
Sorting and Filtering
Filtering and sorting are not used on this collection.
Path: /sessions/{sessionId}/data/{libref}/{tableName}/columns
This API provides collections of columns of data in a given SAS data set.
Members of the /sessions/{sessionId}/data/{libref}/{tableName}/rows
collection are columns.
This API does not enforce a limit on the size of the collection returned.
Links
The columns
collection representation is
application/vnd.sas.collection
.
The collection items are application/vnd.sas.compute.data.table.column
resources.
Responses include the following links:
Relation | Method | Description |
---|---|---|
self |
GET |
Returns the current page from the collection. |
URI: /compute/sessions/{sessionId}/data/{libref}/{table}/columns |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.data.table.column |
||
collection |
GET |
Returns the first page of the collection, without sorting or filtering criteria. |
URI: /compute/sessions/{sessionId}/data/{libref}/{table}/columns |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.data.table.column |
||
up |
GET |
Returns the collection of columns for a table. |
URI: /compute/sessions/{sessionId}/data/{libref}/{table} |
||
Response type: application/vnd.sas.compute.data.table |
||
prev |
GET |
Returns the previous page of the collection. This link is omitted if the current view is on the first page. |
URI: /compute/sessions/{sessionId}/data/{libref}/{table}/columns |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.data.table.column |
||
first |
GET |
Returns the first page of the collection. This link is omitted if the current view is on the first page. |
URI: /compute/sessions/{sessionId}/data/{libref}/{table}/columns |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.data.table.column |
||
next |
GET |
Returns the next page of the collection. This link is omitted if the current view is on the last page of the collection. |
URI: /compute/sessions/{sessionId}/data/{libref}/{table}/columns |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.data.table.column |
||
last |
GET |
Returns the last page of the collection. This link is omitted if the current view is on the last page. |
URI: /compute/sessions/{sessionId}/data/{libref}/{table}/columns |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.data.table.column |
Sorting and Filtering
These collections can be sorted and filtered using the ?sortBy=
and
?filter=
query parameters.
The default sort order for the /sessions/{sessionId}/data/{libref}/{table}/columns
collection is by index
.
Filtering and sorting can use the following members of the column:
id
index
label
length
name
type
Path: /sessions/{sessionId}/variables
This API provides collections of SAS macro variables that are set
in the given session.
Members of the /sessions/{sessionId}/variables
collection are variable definitions.
Links
The variables
collection representation is
application/vnd.sas.collection
.
The collection items are application/vnd.sas.compute.session.variable
resources.
Responses include the following links:
Relation | Method | Description |
---|---|---|
self |
GET |
Returns the current page from the collection. |
URI: /compute/sessions/{sessionId}/variables |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.session.variable |
||
collection |
GET |
Returns the first page of the collection, without sorting or filtering criteria. |
URI: /compute/sessions/{sessionId}/variables |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.session.variable |
||
up |
GET |
Returns the collection of all macro variables for a session. |
URI: /compute/sessions/{sessionId} |
||
Response type: application/vnd.sas.compute.session |
||
prev |
GET |
Returns the previous page of the collection. This link is omitted if the current view is on the first page. |
URI: /compute/sessions/{sessionId}/variables |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.session.variable |
||
first |
GET |
Returns the first page of the collection. This link is omitted if the current view is on the first page. |
URI: /compute/sessions/{sessionId}/variables |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.session.variable |
||
next |
GET |
Returns the next page of the collection. This link is omitted if the current view is on the last page of the collection. |
URI: /compute/sessions/{sessionId}/variables |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.session.variable |
||
last |
GET |
Returns the last page of the collection. This link is omitted if the current view is on the last page. |
URI: /compute/sessions/{sessionId}/variables |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.session.variable |
Sorting and Filtering
These collections can be sorted and filtered using the ?sortBy=
and
?filter=
query parameters.
The default sort order for the /sessions/{sessionId}/variables
collection is by scope
.
Filtering and sorting can use the following members of the variable:
name
scope
value
Path: /sessions/{sessionId}/engines
This API provides collections of SAS LIBNAME engines that are available
in the given session.
Members of the /sessions/{sessionId}/engines
collection are SAS LIBNAME engine definitions.
Links
The engines
collection representation is
application/vnd.sas.collection
.
The collection items are [application/vnd.sas.data.engine
] resources.
Responses include the following links:
Relation | Method | Description |
---|---|---|
self |
GET |
Returns the current page from the collection. |
URI: /compute/sessions/{sessionId}/engines |
||
Response type: application/vnd.sas.collection |
||
Item type: [application/vnd.sas.data.engine ] |
||
collection |
GET |
Returns the first page of the collection, without sorting or filtering criteria. |
URI: /compute/sessions/{sessionId}/engines |
||
Response type: application/vnd.sas.collection |
||
Item type: [application/vnd.sas.data.engine ] |
||
prev |
GET |
Returns the previous page of the collection. This link is omitted if the current view is on the first page. |
URI: /compute/sessions/{sessionId}/engines |
||
Response type: application/vnd.sas.collection |
||
Item type: [application/vnd.sas.data.engine ] |
||
first |
GET |
Returns the first page of the collection. This link is omitted if the current view is on the first page. |
URI: /compute/sessions/{sessionId}/engines |
||
Response type: application/vnd.sas.collection |
||
Item type: [application/vnd.sas.data.engine ] |
||
next |
GET |
Returns the next page of the collection. This link is omitted if the current view is on the last page of the collection. |
URI: /compute/sessions/{sessionId}/engines |
||
Response type: application/vnd.sas.collection |
||
Item type: [application/vnd.sas.data.engine ] |
||
last |
GET |
Returns the last page of the collection. This link is omitted if the current view is on the last page. |
URI: /compute/sessions/{sessionId}/engines |
||
Response type: application/vnd.sas.collection |
||
Item type: [application/vnd.sas.data.engine ] |
Sorting and Filtering
These collections can be sorted and filtered using the ?sortBy=
and
?filter=
query parameters.
Filtering and sorting can use the following members of the engine:
hasDefinition
legalName
licensed
name
nickname
providerId
Path: /sessions/{sessionId}/files/{directoryPath}/members
This API provides collections of members of a directory.
Links
The filePropertiesCollection
representation is
application/vnd.sas.collection
.
The collection items are application/vnd.sas.compute.file.properties
resources.
Responses include the following links:
Relation | Method | Description |
---|---|---|
self |
GET |
Returns the current page from the collection. |
URI: /compute/sessions/{sessionId}/files/{directoryPath}/members |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.file.properties |
||
collection |
GET |
Returns the collection of all members in a directory, without sorting or filtering criteria. |
URI: /compute/sessions/{sessionId}/files/{directoryPath}/members |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.file.properties |
||
prev |
GET |
Returns the previous page of the collection. This link is omitted if the current view is on the first page. |
URI: /compute/sessions/{sessionId}/files/{directoryPath}/members |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.file.properties |
||
first |
GET |
Returns the first page of the collection. This link is omitted if the current view is on the first page. |
URI: /compute/sessions/{sessionId}/files/{directoryPath}/members |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.file.properties |
||
next |
GET |
Returns the next page of the collection. This link is omitted if the current view is on the last page of the collection. |
URI: /compute/sessions/{sessionId}/files/{directoryPath}/members |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.file.properties |
||
last |
GET |
Returns the last page of the collection. This link is omitted if the current view is on the last page. |
URI: /compute/sessions/{sessionId}/files/{directoryPath}/members |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.file.properties |
Sorting and Filtering
These collections can be sorted and filtered using the ?sortBy=
and
?filter=
query parameters.
Filtering and sorting can use the following members of the fileProperties:
name
isDirectory
Single Item Resources
Path: /contexts/{contextId}
A specific context.
Links
Relation | Method | Description |
---|---|---|
self |
GET |
Returns this context. |
URI: /compute/contexts/{contextId} |
||
Response type: application/vnd.sas.compute.context |
||
alternate |
GET |
Returns the summary for this context. |
URI: /compute/contexts/{contextId} |
||
Response type: application/vnd.sas.compute.context.summary |
||
update |
PUT |
Updates the context. This link is for administrator use only. |
URI: /compute/contexts/{contextId} |
||
Item type: application/vnd.sas.compute.context |
||
Response type: application/vnd.sas.compute.context |
||
updateWithRules |
PUT |
Updates the context and authorization rules for the context. This link is for administrator use only. |
URI: /compute/contexts/{contextId} |
||
Item type: application/vnd.sas.compute.context.request |
||
Response type: application/vnd.sas.compute.context |
||
delete |
DELETE |
Deletes the given context. For administrative use only. |
URI: /compute/contexts/{contextId} |
||
createSession |
POST |
Creates a session based on this context. Available to users who have permission to use the context. |
URI: /compute/contexts/{contextId}/sessions |
||
Item type: application/vnd.sas.compute.session.request |
||
Response type: application/vnd.sas.compute.session |
||
rules |
GET |
Returns a collection of the security rules governing who can use this context. For administrative use only. |
URI: /authorizations/rules?filter=eq(objectUri,'/compute/contexts/{contextId}/sessions') |
||
Response type: application/vnd.sas.collection |
||
Item type: [application/vnd.sas.authorization.rule ] |
Path: /servers/{serverId}
A representation of a specific SAS Compute Server that is running in the environment. This information is generally only available to an administrator.
Links
Relation | Method | Description |
---|---|---|
self |
GET |
Returns this server. |
URI: /compute/servers/{serverId} |
||
Response type: application/vnd.sas.compute.server |
||
alternate |
GET |
Returns the summary for this server. |
URI: /compute/server/{serverId} |
||
Response type: application/vnd.sas.compute.server.summary |
||
collection |
GET |
Returns the collection of servers that this server resource belongs to. |
URI: /compute/servers |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.server |
||
state |
GET |
Returns the current state of the server. |
URI: /compute/servers/{serverId} |
||
Item type: [text/plain ] |
||
sessions |
GET |
Returns the collection of sessions that are associated with this server resource. |
URI: /compute/servers/{serverId}/sessions |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.session |
||
sessionSummaries |
GET |
Returns the collection of session summaries that are associated with this server resource. |
URI: /compute/servers/{serverId}/sessions |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.session.summary |
||
createSession |
POST |
Creates a session in this server. |
URI: /compute/servers/{serverId}/sessions |
||
Item type: application/vnd.sas.compute.session.request |
||
Response type: application/vnd.sas.compute.session |
||
delete |
DELETE |
Ends the server and destroys the resource. |
URI: /compute/servers/{serverId} |
Path: /sessions/{sessionId}
A specific session that has been created in the environment. The session information is available to the owner of the session and any administrator.
Links
Relation | Method | Description |
---|---|---|
self |
GET |
Returns a session. |
URI: /compute/sessions/{sessionId} |
||
Response type: application/vnd.sas.compute.session |
||
alternate |
GET |
Returns the summary for a session. |
URI: /compute/sessions/{sessionId} |
||
Response type: application/vnd.sas.compute.session.summary |
||
state |
GET |
Gets the current state of a session. |
URI: /compute/sessions/{sessionId}/state |
||
Response type: [text/plain ] |
||
cancel |
PUT |
Cancels all work that is executing in a session. |
URI: /compute/sessions/{sessionId}/state?value=canceled |
||
delete |
DELETE |
Ends the given session and destroys the resources that are associated with the session. |
URI: /compute/sessions/{sessionId} |
||
execute |
POST |
Submits a job to a session for execution. |
URI: /compute/sessions/{sessionId}/jobs |
||
Item type: application/vnd.sas.compute.job.request |
||
Response type: application/vnd.sas.compute.job |
||
jobs |
GET |
Returns a collection of the current jobs that are defined in a session. |
URI: /compute/sessions/{sessionId}/jobs |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.job |
||
files |
GET |
Returns a collection of SAS filerefs that are available in a session. |
URI: /compute/sessions/{sessionId}/filerefs |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.fileref.summary |
||
assign |
POST |
Submits a request to create a new SAS fileref in a session. |
URI: /compute/sessions/{sessionId}/filerefs |
||
Item type: application/vnd.sas.compute.fileref.request |
||
Response type: application/vnd.sas.compute.fileref |
||
librefs |
GET |
Returns a collection of SAS libraries that are available in a session. |
URI: /compute/sessions/{sessionId}/data |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.library.summary |
||
log |
GET |
Returns the SAS log that is available for a session. |
URI: /compute/sessions/{sessionId}/log |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.log.line |
||
logAsText |
GET |
Returns the SAS log that is available for a session as plain text. |
URI: /compute/sessions/{sessionId}/log |
||
Response type: [text/plain ] |
||
logStream |
POST |
Uploads session log output to the Files service and returns the representation of the file resource containing the output. Present only if the session has log output. |
URI: /compute/sessions/{sessionId}/log |
||
Body Type: [application/vnd.sas.compute.output.stream.file.request ] |
||
Response type: [application/vnd.sas.file ] |
||
listing |
GET |
Returns the SAS listing that is available for a session. |
URI: /compute/sessions/{sessionId}/listing |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.log.line |
||
listingAsText |
GET |
Returns the SAS listing that is available for a session as plain text. |
URI: /compute/sessions/{sessionId}/listing |
||
Response type: [text/plain ] |
||
listingStream |
POST |
Uploads session listing output to the Files service and returns the representation of the file resource containing the output. Present only if the session has listing output. |
URI: /compute/sessions/{sessionId}/listing |
||
Body Type: [application/vnd.sas.compute.output.stream.file.request ] |
||
Response type: [application/vnd.sas.file ] |
||
results |
GET |
Returns any results that were created for a session. |
URI: /compute/sessions/{sessionId}/results |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.result |
||
variables |
GET |
Returns a collection of the macro variables that are available in a session. |
URI: /compute/sessions/{sessionId}/variables |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.session.variable |
||
engines |
GET |
Returns a collection of the available library engines in a session. |
URI: /compute/sessions/{sessionId}/engines |
||
Response type: application/vnd.sas.collection |
||
Item type: [application/vnd.sas.data.engine ] |
||
getOption |
GET |
Returns the value of an option from a session. Substitute the option name in place of {optionName}. |
URI: /compute/sessions/{sessionId}/options/{optionName} |
||
Response type: [text/plain ] |
||
updateOption |
PUT |
Updates the value of an option in a session. Substitute the option name in place of {optionName}. |
URI: /compute/sessions/{sessionId}/options/{optionName} |
||
Body Type: [text/plain ] |
||
Response type: [text/plain ] |
||
formats |
GET |
Returns a collection of the formats that are available in a session. |
URI: /compute/sessions/{sessionId}/formats |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.format.summary |
||
informats |
GET |
Returns a collection of the informats that are available in a session. |
URI: /compute/sessions/{sessionId}/informats |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.format.summary |
Path: /sessions/{sessionId}/jobs/{jobId}
A job that has been created in a given session. Jobs are executed asynchronously. The resource can be queried for status, log, and results.
Links
Relation | Method | Description |
---|---|---|
self |
GET |
Returns this job. |
URI: /compute/sessions/{sessionId}/jobs/{jobId} |
||
Response type: application/vnd.sas.compute.job |
||
state |
GET |
Gets the current state of a job. |
URI: /compute/sessions/{sessionId}/jobs/{jobId}/state |
||
Response type: [text/plain ] |
||
cancel |
PUT |
Cancels the execution of a job. |
URI: /compute/sessions/{sessionId}/jobs/{jobId}/state?value=canceled |
||
delete |
DELETE |
Destroys all resources that are associated with the given job. |
URI: /compute/sessions/{sessionId}/jobs/{jobId} |
||
log |
GET |
Returns the SAS log for a job. |
URI: /compute/sessions/{sessionId}/jobs/{jobId}/log |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.log.line |
||
logAsText |
GET |
Returns the SAS log that is available for a job as plain text. |
URI: /compute/sessions/{sessionId}/jobs/{jobId}/log |
||
Response type: [text/plain ] |
||
logStream |
POST |
Uploads job log output to the Files service and returns the representation of the file resource containing the output. Present only if the job has log output. |
URI: /compute/sessions/{sessionId}/jobs/{jobId}/log |
||
Body Type: [application/vnd.sas.compute.output.stream.file.request ] |
||
Response type: [application/vnd.sas.file ] |
||
listing |
GET |
Returns the SAS listing for a job. |
URI: /compute/sessions/{sessionId}/jobs/{jobId}/listing |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.log.line |
||
listingAsText |
GET |
Returns the SAS listing for a job as text. |
URI: /compute/sessions/{sessionId}/jobs/{jobId}/listing |
||
Response type: [text/plain ] |
||
listingStream |
POST |
Uploads job listing output to the Files service and returns the representation of the file resource containing the output. Present only if the job has listing output. |
URI: /compute/sessions/{sessionId}/jobs/{jobId}/listing |
||
Body Type: [application/vnd.sas.compute.output.stream.file.request ] |
||
Response type: [application/vnd.sas.file ] |
||
results |
GET |
Returns any results that were created for a job. |
URI: /compute/sessions/{sessionId}/jobs/{jobId}/results |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.result |
||
up |
GET |
Returns the collection of all jobs. |
URI: /compute/sessions/{sessionId} |
||
Response type: application/vnd.sas.compute.session |
Path: /sessions/{sessionId}/data/{libref}
A SAS libref or data library from the specified session.
Links
Relation | Method | Description |
---|---|---|
self |
GET |
Returns a library. |
URI: /compute/sessions/{sessionId}/data/{libref} |
||
Response type: application/vnd.sas.compute.library |
||
alternate |
GET |
Returns the summary for a library. |
URI: /compute/sessions/{sessionId}/data/{libref} |
||
Response type: application/vnd.sas.compute.library.summary |
||
tables |
GET |
Returns a collection that contains summaries of each table in a library. |
URI: /compute/sessions/{sessionId}/data/{libref} |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.data.table.summary |
||
delete |
DELETE |
Deassigns the library that is referenced by a libref. |
URI: /compute/sessions/{sessionId}/data/{libref} |
Path: /sessions/{sessionId}/data/{libref}/{tableName}
A SAS data set or table that in a specified library in a session.
Links
Relation | Method | Description |
---|---|---|
self |
GET |
Returns the table or data set. |
URI: /compute/sessions/{sessionId}/data/{libref}/{tableName} |
||
Response type: application/vnd.sas.compute.data.table |
||
alternate |
GET |
Returns the summary for a data set. |
URI: /compute/sessions/{sessionId}/data/{libref}/{tableName} |
||
Response type: application/vnd.sas.compute.data.table.summary |
||
rows |
GET |
Returns a collection that contains the rows of data for a table. |
URI: /compute/sessions/{sessionId}/data/{libref}/{tableName}/rows |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.data.table.row |
||
rowsAsCSV |
GET |
Returns the table rows as a CSV stream. |
URI: /compute/sessions/{sessionId}/data/{libref}/{tableName}/rows |
||
Response type: text/csv |
||
rowSet |
GET |
Returns a row set object that is based on specified query parameters. |
URI: /compute/sessions/{sessionId}/data/{libref}/{tableName}/rowSet |
||
Response type: application/vnd.sas.compute.data.table.row.set |
||
promptContent |
POST |
Returns prompt content based on the given table and the specified request. |
URI: /compute/sessions/{sessionId}/data/{libref}/{tableName}/promptContent |
||
Response type: application/vnd.sas.compute.data.table.prompt.content |
||
columns |
GET |
Returns a collection that contains the column information for a table. |
URI: /compute/sessions/{sessionId}/data/{libref}/{tableName}/columns |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.data.table.column |
||
createView |
POST |
Returns links to a view that is based on a table and the specified request. |
URI: /compute/sessions/{sessionId}/data/{libref}/{tableName}/views |
||
Response type: application/vnd.sas.compute.data.table |
||
Body type: application/vnd.sas.compute.data.table.view.request |
||
delete |
DELETE |
If provided, this link deletes the table or view. |
URI: /compute/sessions/{sessionId}/data/{libref}/{tableName} |
||
updateTable |
PUT |
Updates the table name or label. |
URI: /compute/sessions/{sessionId}/data/{libref}/{tableName} |
||
Response type: application/vnd.sas.compute.data.table |
||
Body type: application/vnd.sas.compute.data.table |
Path: /sessions/{sessionId}/data/{libref}/{tableName}/columns/{columnName}
A column from a specified table.
Links
Relation | Method | Description |
---|---|---|
self |
GET |
Returns the current column. |
URI: /compute/sessions/{sessionId}/data/{libref}/{tableName}/columns/{columnName} |
||
Response type: application/vnd.sas.compute.data.table.column |
||
updateColumn |
PUT |
Updates the column's name, label, format, or informat. |
URI: /compute/sessions/{sessionId}/data/{libref}/{tableName}/columns/{columnName} |
||
Response type: application/vnd.sas.compute.data.table.column |
||
Body type: application/vnd.sas.compute.data.table.column |
Path: /sessions/{sessionId}/filerefs/{fileref}/{filerefName}
A SAS fileref from the specified session.
Links
Relation | Method | Description |
---|---|---|
self |
GET |
Returns the current fileref. |
URI: /compute/sessions/{sessionId}/filerefs/{fileref} |
||
Response type: application/vnd.sas.compute.fileref |
||
alternate |
GET |
Returns the summary of a fileref. |
URI: /compute/sessions/{sessionId}/filerefs/{fileref} |
||
Response type: application/vnd.sas.compute.fileref.summary |
||
deassign |
DELETE |
Unassigns a fileref. This removes the fileref from a session. |
URI: /compute/sessions/{sessionId}/filerefs/{fileref} |
||
content |
GET |
For file-based filerefs, downloads the contents of the file that is specified by the given fileref. |
URI: /compute/sessions/{sessionId}/filerefs/{fileref}/content |
||
Response type: [*/* ] |
||
upload |
PUT |
For file-based filerefs, enables you to write content to the file that is specified by the given fileref. |
URI: /compute/sessions/{sessionId}/filerefs/{fileref}/content |
||
Item type: [*/* ] |
||
delete |
DELETE |
For file-based filerefs, deletes the file that is specified by the given fileref. |
URI: /compute/sessions/{sessionId}/filerefs/{fileref}/content |
||
list |
GET |
For directory-based filerefs, returns a listing of the files in the directory as a collection. |
URI: /compute/sessions/{sessionId}/filerefs/{fileref}/content |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.fileref.directory.member |
Path: /sessions/{sessionId}/files/{filePath}
A file resource in the specified session. The media type is at application/vnd.sas.compute.file.properties
Links
Relation | Method | Description |
---|---|---|
self |
GET |
Returns information about this file path. |
URI: /compute/sessions/{sessionId}/files/{filePath} |
||
Response type: application/vnd.sas.compute.file.properties |
||
getFile |
GET |
Downloads the content of the file given this file path. |
URI: /compute/sessions/{sessionId}/files/{filepath}/content |
||
Response type: [*/* ] |
||
deleteFile |
DELETE |
Deletes a file that is specified by this file path. |
URI: /compute/sessions/{sessionId}/files/{filepath} |
||
createFile |
PUT |
Given content, creates or replaces a file on this file path. |
URI: /compute/sessions/{sessionId}/filerefs/{filepath}/content |
||
Item type: [*/* ] |
||
renameFile |
PUT |
Renames a file that is specified by this file path. |
URI: /compute/sessions/{sessionId}/filerefs/{filepath}/content |
||
Response type: application/vnd.sas.compute.file.properties |
||
Body type: application/vnd.sas.compute.file.properties |
Path: /sessions/{sessionId}/files/{directoryPath}
A directory resource in the specified session. The media type is at application/vnd.sas.compute.file.properties
Links
Relation | Method | Description |
---|---|---|
self |
GET |
Returns information about the directory path for the specified URI. |
URI: /compute/sessions/{sessionId}/files/{directoryPath} |
||
Response type: application/vnd.sas.compute.file.properties |
||
getDirectoryMembers |
GET |
Returns a listing of the members in the directory as a collection. |
URI: /compute/sessions/{sessionId}/files/{directoryPath}/members |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.compute.file.properties |
||
deleteDirectory |
DELETE |
Deletes a directory that is specified by this directory path. |
URI: /compute/sessions/{sessionId}/files/{directoryPath} |
||
makeDirectory |
POST |
Creates a directory that is specified by this directory path. |
URI: /compute/sessions/{sessionId}/files/{directoryPath} |
||
Response type: application/vnd.sas.compute.file.properties |
||
Body type: application/vnd.sas.compute.file.properties |
||
createFile |
POST |
Creates an empty file at the path that is specified by this directory path. |
URI: /compute/sessions/{sessionId}/files/{directoryPath} |
||
Response type: application/vnd.sas.compute.file.properties |
||
Body type: application/vnd.sas.compute.file.properties |
||
renameDirectory |
PUT |
Renames a directory that is specified by this directory path. |
URI: /compute/sessions/{sessionId}/files/{directoryPath} |
||
Response type: application/vnd.sas.compute.file.properties |
||
Body type: application/vnd.sas.compute.file.properties |
||
copyDirectory |
POST |
Copies a directory whose source path is specified in the request body to the destination specified by this directory path. |
URI: /compute/sessions/{sessionId}/files/{destinationDirectory} |
||
Response type: application/vnd.sas.compute.file.properties |
||
Body type: application/vnd.sas.compute.file.properties |
Path: /sessions/{sessionId}/formats
This API provides collections of the SAS formats that are
available in a given session.
Members of the /sessions/{sessionId}/formats
collection are SAS formats /sessions/{sessionId}/formats/{format}
.
Links
The formats
collection representation is
application/vnd.sas.collection
.
The collection items are application/vnd.sas.format.summary
resources by default. The collection also returns
application/vnd.sas.format
items if directed by the Accept-Item
header.
Responses include the following links:
Relation | Method | Description |
---|---|---|
self |
GET |
Returns the current page from the collection. |
URI: /compute/sessions/{sessionId}/formats |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.formats.summary |
||
collection |
GET |
Returns the first page of the collection, without sorting or filtering criteria. |
URI: /compute/sessions/{sessionId}/formats |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.format.summary |
||
prev |
GET |
Returns the previous page of the collection. This link is omitted if the current view is on the first page. |
URI: /compute/sessions/{sessionId}/formats |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.format.summary |
||
first |
GET |
Returns the first page of the collection. This link is omitted if the current view is on the first page. |
URI: /compute/sessions/{sessionId}/formats |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.format.summary |
||
next |
GET |
Returns the next page of the collection. This link is omitted if the current view is on the last page of the collection. |
URI: /compute/sessions/{sessionId}/formats |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.format.summary |
Path: /sessions/{sessionId}/informats
This API provides collections of SAS informats that are available in a given
session.
Members of the /sessions/{sessionId}/informats
collection are SAS informats /sessions/{sessionId}/informats/{informat}
.
Links
The informats
collection representation is
application/vnd.sas.collection
.
The collection items are application/vnd.sas.format.summary
resources by default. The collection also returns
application/vnd.sas.format
items if directed by the Accept-Item
header.
Responses include the following links:
Relation | Method | Description |
---|---|---|
self |
GET |
Returns the current page from the collection. |
URI: /compute/sessions/{sessionId}/informats |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.format.summary |
||
collection |
GET |
Returns the first page of the collection, without sorting or filtering criteria. |
URI: /compute/sessions/{sessionId}/informats |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.format.summary |
||
prev |
GET |
Returns the previous page of the collection. This link is omitted if the current view is on the first page. |
URI: /compute/sessions/{sessionId}/informats |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.format.summary |
||
first |
GET |
Returns the first page of the collection. This link is omitted if the current view is on the first page. |
URI: /compute/sessions/{sessionId}/informats |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.format.summary |
||
next |
GET |
Returns the next page of the collection. This link is omitted if the current view is on the last page of the collection. |
URI: /compute/sessions/{sessionId}/informats |
||
Response type: application/vnd.sas.collection |
||
Item type: application/vnd.sas.format.summary |
Path: /sessions/{sessionId}/formats/{format}
A SAS format from the specified session.
Links
Relation | Method | Description |
---|---|---|
self |
GET |
Returns the requested SAS format. |
URI: /compute/sessions/{sessionId}/formats/{format} |
||
Response type: application/vnd.sas.format |
||
alternate |
GET |
Returns the summary for a format. |
URI: /compute/sessions/{sessionId}/formats/{format} |
||
Response type: application/vnd.sas.format.summary |
Path: /sessions/{sessionId}/informats/{informat}
A SAS informat from the specified session.
Links
Relation | Method | Description |
---|---|---|
self |
GET |
Returns the requested SAS informat. |
URI: /compute/sessions/{sessionId}/informats/{informat} |
||
Response type: application/vnd.sas.format |
||
alternate |
GET |
Returns the summary for an informat. |
URI: /compute/sessions/{sessionId}/informats/{informat} |
||
Response type: application/vnd.sas.format.summary |