Compute

Loading...
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.

Contexts

Contains the operations to create SAS Compute Server definitions.
head
Check endpoint availability
Internal-Use OnlyDetermines whether an endpoint is currently available.
/contexts
get
Get context definitions
Internal-Use OnlyReturns 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.
/contexts
post
Create a context definition
Internal-Use OnlyCreates 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.
/contexts
delete
Delete a context definition
Internal-Use OnlyDeletes the context definition that has the specified contextId.
/contexts/{contextId}
get
Get a context definition
Internal-Use OnlyReturns the context definition that has the specified contextId.
/contexts/{contextId}
head
Verify that a context exists
Internal-Use OnlyDetermines whether the specified context exists.
/contexts/{contextId}
put
Update a context definition
Internal-Use OnlyUpdates 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.
/contexts/{contextId}
post
Request new session
Internal-Use OnlyCreates 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.
/contexts/{contextId}/sessions

Servers

Contains the operations for SAS Compute Server instances.
get
Get active servers
Internal-Use OnlyReturns 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.
/servers
head
Check endpoint availability
Internal-Use OnlyDetermine whether the servers endpoint is currently available.
/servers
delete
Stop the server
Internal-Use OnlyStops the specified server instance. The user must have administration permissions on the server to perform this request.
/servers/{serverId}
get
Get links for the active server
Internal-Use OnlyReturns links and information for the active server instance. The serverId is a unique identifier for an active SAS Compute Server instance.
/servers/{serverId}
head
Verify that a server exists
Internal-Use OnlyDetermines whether the specified server exists.
/servers/{serverId}
get
Get server status
Internal-Use OnlyGets the current status of a server. The value that is returned is either running or stopped.
/servers/{serverId}/state
head
Check server status endpoint
Internal-Use OnlyDetermines whether the status endpoint for a server is available.
/servers/{serverId}/state
get
Get active sessions for server
Internal-Use OnlyGets a paginated list of sessions that are owned by the requested service instance. Standard paging, filtering, and sorting options are provided.
/servers/{serverId}/sessions
head
Check sessions endpoint for a server
Internal-Use OnlyDetermines whether the session endpoint for a server is available.
/servers/{serverId}/sessions

Sessions

Contains the operations for sessions that run on a server and handle SAS requests.

Jobs

Contains the operations for submitting session jobs.
post
Execute SAS code in a session
Internal-Use OnlyExecutes 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.
/sessions/{sessionId}/jobs
get
Get the current jobs for a session
Internal-Use OnlyReturns a collection of all the current jobs for a session. Standard paging, filtering, and sorting options are provided.
/sessions/{sessionId}/jobs
head
Check endpoint availability
Internal-Use OnlyDetermines whether the jobs endpoint is available for a session.
/sessions/{sessionId}/jobs
delete
Delete a job
Internal-Use OnlyDeletes 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.
/sessions/{sessionId}/jobs/{jobId}
get
Get information about a job
Internal-Use OnlyReturns 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.
/sessions/{sessionId}/jobs/{jobId}
head
Verify that a job exists
Internal-Use OnlyDetermines whether the specified job exists.
/sessions/{sessionId}/jobs/{jobId}
get
Get current state of a job
Internal-Use OnlyReturns the current state of the specified job.
/sessions/{sessionId}/jobs/{jobId}/state
head
Check endpoint availability
Internal-Use OnlyDetermines whether the state can be determined for a job.
/sessions/{sessionId}/jobs/{jobId}/state
put
Set current state of a job
Internal-Use OnlySets the current state of the specified job. For example, you can use this method to set the state to canceled.
/sessions/{sessionId}/jobs/{jobId}/state

Listings

Contains the operations for retrieving SAS output information from a job.
get
Retrieve listing information for a session
Internal-Use OnlyRetrieves 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.
/sessions/{sessionId}/listing
head
Check for a session listing
Internal-Use OnlyDetermines whether a session listing is available.
/sessions/{sessionId}/listing
post
Upload session listing output to the Files service
Internal-Use OnlyUploads 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.
/sessions/{sessionId}/listing
get
Retrieve listing information for a session as text
Internal-Use OnlyRetrieves the listing output associated with a session as text.
/sessions/{sessionId}/listing
head
Check for session listing as text
Internal-Use OnlyDetermines whether a session listing is available as text.
/sessions/{sessionId}/listing
get
Retrieve listing information for a job
Internal-Use OnlyRetrieves 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.
/sessions/{sessionId}/jobs/{jobId}/listing
head
Check for a job listing
Internal-Use OnlyDetermines whether a job listing exists.
/sessions/{sessionId}/jobs/{jobId}/listing
post
Upload job listing output to the Files service
Internal-Use OnlyUploads 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.
/sessions/{sessionId}/jobs/{jobId}/listing
get
Retrieve listing information for a job as text
Internal-Use OnlyRetrieves the listing output associated with a job as text.
/sessions/{sessionId}/jobs/{jobId}/listing
head
Check for job listing as text
Internal-Use OnlyDetermines whether a job listing exists as text.
/sessions/{sessionId}/jobs/{jobId}/listing

Logs

Contains the operations for retrieving log information from a job.
get
Retrieve a job log
Internal-Use OnlyRetrieves 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.
/sessions/{sessionId}/jobs/{jobId}/log
head
Check job log availability
Internal-Use OnlyDetermines whether there is currently a log for a job.
/sessions/{sessionId}/jobs/{jobId}/log
post
Upload job log output to the Files service
Internal-Use OnlyUploads 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.
/sessions/{sessionId}/jobs/{jobId}/log
get
Retrieve a job log as text
Internal-Use OnlyRetrieves the entire log output associated with a job as text.
/sessions/{sessionId}/jobs/{jobId}/log
head
Check for job log as text
Internal-Use OnlyDetermines whether there is currently a log for a job as text.
/sessions/{sessionId}/jobs/{jobId}/log
get
Retrieve a session log
Internal-Use OnlyRetrieves 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.
/sessions/{sessionId}/log
head
Check for a session log
Internal-Use OnlyDetermines whether the session has a log available.
/sessions/{sessionId}/log
post
Upload session log output to the Files service
Internal-Use OnlyUploads 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.
/sessions/{sessionId}/log
get
Retrieve a session log as text
Internal-Use OnlyRetrieves the log output associated with a session as text.
/sessions/{sessionId}/log
head
Check for session log as text
Internal-Use OnlyDetermines whether the session has a log available as text.
/sessions/{sessionId}/log

Data Access

Contains the operations to access information for librefs and SAS data sets.
get
Return libraries in a session
Internal-Use OnlyProvides a listing that contains summaries of the libraries that are defined in the current session.
/sessions/{sessionId}/data
head
Check access to data for a session
Internal-Use OnlyDetermines whether a session has a data endpoint available.
/sessions/{sessionId}/data
post
Assign a libref
Internal-Use OnlyAssigns a libref that is based on the request body for a session. The Location header contains the URI of the libref resource.
/sessions/{sessionId}/data
get
Get libref information
Internal-Use OnlyRetrieves information about a specified libref, including links to tables.
/sessions/{sessionId}/data/{libref}
head
Verify that a libref exists
Internal-Use OnlyDetermines whether the specified libref exists in a session.
/sessions/{sessionId}/data/{libref}
delete
Deassign libref
Internal-Use OnlyRemoves the libref from the session.
/sessions/{sessionId}/data/{libref}
get
Get libref summary
Internal-Use OnlyReturns summary information about a specified libref.
/sessions/{sessionId}/data/{libref}
get
Get data sets in a libref
Internal-Use OnlyReturns 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.
/sessions/{sessionId}/data/{libref}
get
Get a data set
Internal-Use OnlyReturns information about a data set.
/sessions/{sessionId}/data/{libref}/{tableName}
head
Check for a data set in a libref
Internal-Use OnlyDetermines whether the specified data set exists in a libref.
/sessions/{sessionId}/data/{libref}/{tableName}
put
Update table information
Internal-Use OnlyUpdates the name or label of the specified table.
/sessions/{sessionId}/data/{libref}/{tableName}
delete
Delete a table or view
Internal-Use OnlyDeletes 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.
/sessions/{sessionId}/data/{libref}/{tableName}
get
Get a summary of a data set
Internal-Use OnlyReturns summary information about a data set.
/sessions/{sessionId}/data/{libref}/{tableName}
get
Get column information
Internal-Use OnlyReturns the column information for a specified data set. By default, a collection is returned, and standard paging options are available.
/sessions/{sessionId}/data/{libref}/{tableName}/columns
head
Check for available columns in a table
Internal-Use OnlyDetermines whether the specified data set has access to columns.
/sessions/{sessionId}/data/{libref}/{tableName}/columns
post
Retrieve column information
Internal-Use OnlyReturns 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.
/sessions/{sessionId}/data/{libref}/{tableName}/columns
get
Get a column
Internal-Use OnlyGets a specific column from a data set.
/sessions/{sessionId}/data/{libref}/{tableName}/columns/{columnName}
head
Check for a column in a table
Internal-Use OnlyDetermines whether a specified data set has access to a column.
/sessions/{sessionId}/data/{libref}/{tableName}/columns/{columnName}
put
Update column information
Internal-Use OnlyUpdates the name, label, format, or informat information for a specified column.
/sessions/{sessionId}/data/{libref}/{tableName}/columns/{columnName}
get
Get row information
Internal-Use OnlyReturns the rows for a specified data set. By default, a collection is returned, and standard paging options are available.
/sessions/{sessionId}/data/{libref}/{tableName}/rows
head
Check row availability
Internal-Use OnlyDetermines whether a data set has access to a specific row.
/sessions/{sessionId}/data/{libref}/{tableName}/rows
post
Obtain rows from a data set
Internal-Use OnlyReturns 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.
/sessions/{sessionId}/data/{libref}/{tableName}/rows
get
Get row information as comma-separated values
Internal-Use OnlyReturns rows in CSV format for a specified data set.
/sessions/{sessionId}/data/{libref}/{tableName}/rows
head
Get headers for rows represented as comma-separated values
Internal-Use OnlyReturns the headers for rows in CSV format for a specified data set.
/sessions/{sessionId}/data/{libref}/{tableName}/rows
get
Get a row set from a data set
Internal-Use OnlyReturns a row set that is based on the specified table and an optional WHERE clause.
/sessions/{sessionId}/data/{libref}/{tableName}/rowSet
head
Check row set availability
Internal-Use OnlyDetermines whether a row set is available on for a data set.
/sessions/{sessionId}/data/{libref}/{tableName}/rowSet
post
Get a row set from a data set
Internal-Use OnlyReturns a row set that is based on the specified request body.
/sessions/{sessionId}/data/{libref}/{tableName}/rowSet
get
Get prompt content from a data set
Internal-Use OnlyReturns content useful for populating prompts more effectively.
/sessions/{sessionId}/data/{libref}/{tableName}/promptContent
head
Check prompt content availability
Internal-Use OnlyDetermines headers for prompt content for a given data set.
/sessions/{sessionId}/data/{libref}/{tableName}/promptContent
post
Get prompt content from a data set
Internal-Use OnlyReturns content useful for populating prompts more effectively.
/sessions/{sessionId}/data/{libref}/{tableName}/promptContent
post
Create a data set view
Internal-Use OnlyReturns 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.
/sessions/{sessionId}/data/{libref}/{tableName}/views

Files

Contains the operations to access information for files and filerefs.
get
List filerefs in a session
Internal-Use OnlyReturns a list of all the filerefs that are defined for a session.
/sessions/{sessionId}/filerefs
head
Check endpoint availability
Internal-Use OnlyDetermines whether the file service is available for a session.
/sessions/{sessionId}/filerefs
post
Assign a fileref
Internal-Use OnlyCreates or assigns a fileref for a session.
/sessions/{sessionId}/filerefs
get
Get fileref information
Internal-Use OnlyGet file information from a fileref in a session.
/sessions/{sessionId}/filerefs/{fileref}
head
Check for a fileref
Internal-Use OnlyDetermines whether the specified fileref exists in a session.
/sessions/{sessionId}/filerefs/{fileref}
delete
Deassign a fileref
Internal-Use OnlyDeassigns the specified fileref in a session.
/sessions/{sessionId}/filerefs/{fileref}
get
Get fileref summary information
Internal-Use OnlyGets fileref summary information for a fileref in a session.
/sessions/{sessionId}/filerefs/{fileref}
get
Get a directory member
Internal-Use OnlyGets information about a member of a directory fileref.
/sessions/{sessionId}/filerefs/{fileref}
get
Download a file
Internal-Use OnlyGets 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.
/sessions/{sessionId}/filerefs/{fileref}/content
head
Check file availability
Internal-Use OnlyDetermines whether a file is available for download.
/sessions/{sessionId}/filerefs/{fileref}/content
put
Upload a file
Internal-Use OnlyUploads a physical file that is associated with a fileref.
/sessions/{sessionId}/filerefs/{fileref}/content
delete
Delete a file
Internal-Use OnlyDeletes the file that is referenced by the fileref.
/sessions/{sessionId}/filerefs/{fileref}/content
get
Get directory contents
Internal-Use OnlyReturns a directory listing when a fileref refers to a directory. A collection of directory members is returned.
/sessions/{sessionId}/filerefs/{fileref}/content

Variables

Contains the operations to access information for variables in a given session.

Engines

Contains the operations to access information about data access engines from a session.

File System

Contains the operations to access information for the file system.
get
Get file or directory properties
Internal-Use OnlyGets file or directory properties at a specified path.
/sessions/{sessionId}/files/{fileOrDirectoryPath}
head
Check for file or directory properties
Internal-Use OnlyDetermines whether the specified file or directory exists.
/sessions/{sessionId}/files/{fileOrDirectoryPath}
put
Rename a file or directory
Internal-Use OnlyRenames 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.
/sessions/{sessionId}/files/{fileOrDirectoryPath}
delete
Delete a file or directory
Internal-Use OnlyDeletes a file or directory.
/sessions/{sessionId}/files/{fileOrDirectoryPath}
post
Create an empty file or directory
Internal-Use OnlyCreates 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.
/sessions/{sessionId}/files/{fileOrDirectoryPath}
post
Copy a file or directory
Internal-Use OnlyCopies 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.
/sessions/{sessionId}/files/{destinationFileOrDirectoryPath}
get
Download file contents
Internal-Use OnlyGets 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.
/sessions/{sessionId}/files/{filePath}/content
put
Upload file content
Internal-Use OnlyCreates a file or replaces an existing file. An ETag is required when you replace an existing file.
/sessions/{sessionId}/files/{filePath}/content
get
Get directory members
Internal-Use OnlyReturns a collection of directory members from a specified directory path.
/sessions/{sessionId}/files/{directoryPath}/members