CAS REST

Loading...
Provides REST access to CAS and the CAS grid. Endpoints are grouped into three categories.

Actions

Action information and execution.

Cas

CAS information.
get
Get grid information
Internal-Use OnlyGet information about the CAS servers.
/cas
delete
Shut down the CAS servers
Internal-Use OnlyShut down the CAS servers.
/cas
get
Configuration settings for the server
Internal-Use OnlyConfiguration settings for the server.
/cas/configuration
get
Server type
Internal-Use OnlyServer type.
/cas/type
get
CAS server state
Internal-Use OnlyGet the state of the CAS server.
/cas/state
get
List connected nodes
Internal-Use OnlyGet a list of connected node names for the CAS grid.
/cas/nodeNames
get
Connected node count
Internal-Use OnlyGet a count of connected nodes.
/cas/nodeCount
get
Node List
Internal-Use OnlyList of CAS nodes.
/cas/nodes
put
Add nodes
Internal-Use OnlyAdd one or more nodes to the grid.
/cas/nodes
delete
Remove nodes
Internal-Use OnlyRemove one or more nodes from the grid. Parameters should be in the request body in JSON format. Directly calls the removeNode CAS action to remove the node from the grid.
/cas/nodes
get
Get node information
Internal-Use OnlyGet information about the specified node.
/cas/nodes/{nodeName}
get
Get node metrics
Internal-Use OnlyGet metrics for the specified node.
/cas/nodes/{nodeName}/metrics
get
Get process identfiers for session processes
Internal-Use OnlyReturns a list of process identifiers for all session processes running on a node.
/cas/nodes/{nodeName}/sessionProcesses
get
Get process identifiers for a user's session processes
Internal-Use OnlyReturns a list of process identifiers for all session processes for the specified user.
/cas/nodes/{nodeName}/sessionProcessesForUser
get
List of CAS nodes with CPU load
Internal-Use OnlyList of nodes running CAS servers, including cpuLoad of the system running the CAS server. Retrieving the load information requires extra communication with the grid nodes. /cas/nodes is provided for cases where performance is of the essence and CPU load information is not needed.
/cas/nodes/metrics
get
Node status and CPU time for all nodes
Internal-Use OnlyReturns node status and CPU time for all nodes.
/cas/nodes/processCPUTimes
get
Node status and memory utilization for all nodes
Internal-Use OnlyReturns node status and memory utilization for all nodes.
/cas/nodes/memoryMetrics
get
Node information and main process metrics for all nodes
Internal-Use OnlyReturns node information and main process metrics for all nodes.
/cas/nodes/processMetrics
get
CPU times for all nodes
Internal-Use OnlyReturns CPU times with node type for all nodes.
/cas/nodes/cpuTime
get
CAS process information
Internal-Use OnlyInformation about the CAS process.
/cas/process
get
CAS port information
Internal-Use OnlyListening ports.
/cas/ports
get
Get global caslibs
Internal-Use OnlyGet a list of global caslibs from the controller. Returns a CTB containing global caslib information.
/cas/caslibs
put
Add a global caslib
Internal-Use OnlyAdd a global caslib to the controller using the table.addCaslib action. Parameters must be submitted as JSON in the request body using the parameters for the addCaslib CAS action. Parameter processing is handled by the action, so errors may be returned as action results (and HTTP 200 result code) rather than vnd.sas.cas.direct.error.response.
/cas/caslibs
delete
Remove a global caslib
Internal-Use OnlyRemoves a global caslib from the controller. Use this endpoint when the name of the caslib is not URL safe.
/cas/caslibs
get
Get global caslib information
Internal-Use OnlyGet information about the specified global caslib.
/cas/caslibs/{caslibName}
delete
Drop a global caslib
Internal-Use OnlyDrops the specified global caslib.
/cas/caslibs/{caslibName}
get
List administrators
Internal-Use OnlyList the CAS server's administrators, both server administrators and data administrators.
/cas/administrators
put
Create administrator
Internal-Use OnlyCreate an administrator. Use for administrators with names that do not conform to URL format.
/cas/administrators
post
Change administrator
Internal-Use OnlyChange information about an administrator.
/cas/administrators
delete
Remove administrator
Internal-Use OnlyRemove the specified administrator.
/cas/administrators
get
Get administrator information
Internal-Use OnlyGet information about the specified administrator.
/cas/administrators/{adminName}
post
Change administrator information
Internal-Use OnlyChange information about the administrator.
/cas/administrators/{adminName}
delete
Remove administrator
Internal-Use OnlyRemove the specified administrator.
/cas/administrators/{adminName}
get
Get server notifications
Internal-Use OnlyGet a list of server notifications, starting from an optional specific start time, through the current time. Returns the last time checked, which can be used on subsequent calls as the new starting time.
/cas/messages
get
Get a list of loggers
Internal-Use OnlyGet a list of loggers.
/cas/loggers
get
Get logger information
Internal-Use OnlyGet information about the specified logger.
/cas/loggers/{loggerName}
post
Add a new logger to the logging system
Internal-Use OnlyAdds a new logger to the logging system using the specified level and appender. Can only be performed by a CAS Administrator. The appender associated with the logger must have already been created.
/cas/loggers/{loggerName}
put
Change logging level
Internal-Use OnlyChange the logging level of the specified logger. Can only be performed by a CAS Administrator.
/cas/loggers/{loggerName}
get
Get a list of appenders
Internal-Use OnlyGet a list of appenders.
/cas/appenders
get
Get appender information
Internal-Use OnlyGet information about a particular appender.
/cas/appenders/{appenderName}
put
Add a new appender
Internal-Use OnlyAdd a new appender to the system, either a console appender or a file appender. Some parameters are specific to the file appender and, although marked as required, are not required for the console appender.
/cas/appenders/{appenderName}
get
Get a list of active sessions
Internal-Use OnlyGet a list of active sessions. Does not return information that requires connecting to the sessions for retrieval.
/cas/sessionList
get
Gewt system CPU load average
Internal-Use OnlyGet the 1 minute CPU load average for the system.
/cas/metrics
get
Server uptime in seconds
Internal-Use OnlyNumber of seconds the CAS server process has been running.
/cas/uptimeSeconds

Sessions

Session information and management.
get
CAS sessions information
Internal-Use OnlyActive CAS sessions.
/cas/sessions
post
Create a new session
Internal-Use OnlyCreate a new session. User identity provided by HTTP authentication.
/cas/sessions
post
Terminate all user sessions
Internal-Use OnlyTerminates all user sessions by performing kill -9 on the session processes.
/cas/sessions/terminate
get
Get session information
Internal-Use OnlyGet information about the specified session.
/cas/sessions/{sessionId}
delete
Destroy a session
Internal-Use OnlyDestroy a session. The method used to end the session is determined by the value of the "command" option. For "endSession", the session is ended using the endSession action, and no output is returned upon success. For "cancel", the session is eonded using the cancelSession action (run in a transient session), and an empty JSON object is returned upon success. For "terminate", the session's processes are terminated on all of the CAS nodes and an empty JSON object is returned upon success.
/cas/sessions/{sessionId}
put
Upload a table
Internal-Use OnlyUse with the table.upload action to upload tables. Action parameters are specified in the JSON-Parameters HTTP header in JSON format. Data for the table is sent as the HTTP request data, and should match the format specified in the fileType parameter of the action.
/cas/sessions/{sessionId}/actions/{actionName}
post
Run action
Internal-Use OnlyRun the specified action. Action parameters can be specified either as URL query parameters or as POST data (either in form data or JSON format). For example, the echo action:
/cas/sessions/{sessionId}/actions/{actionName}
get
Report if session is idle
Internal-Use OnlyReports if the session is idle, meaning it is not currently running an action.
/cas/sessions/{sessionId}/isIdle
get
Get session nodes
Internal-Use OnlyGet a list of nodes being used by the session.
/cas/sessions/{sessionId}/nodes
get
Get session nodes with performance metrics
Internal-Use OnlyGet a list of nodes being used by the session.
/cas/sessions/{sessionId}/nodes/metrics
get
Get session idle time
Internal-Use OnlyGet the number of hours/minutes/seconds since the last time an action was executed by the session.
/cas/sessions/{sessionId}/idleTime
get
Get number of seconds a session has been idle
Internal-Use OnlyGet the number of seconds since the last time an action was executed by the session.
/cas/sessions/{sessionId}/idleSeconds
post
Terminate a session
Internal-Use OnlyEnds the specified session by performing a kill -9 on all of the session's processes.
/cas/sessions/{sessionId}/terminate
post
End the session
Internal-Use OnlyEnds the specified session using a cancelSession action.
/cas/sessions/{sessionId}/cancel
get
Get session owner
Internal-Use OnlyReturns the name of the user that owns the session.
/cas/sessions/{sessionId}/user

System

System information.
get
Get system information
Internal-Use OnlyGet information about node's hardware.
/system
get
List running processes
Internal-Use OnlyGet a list of running processes on the node.
/system/processes
get
Get process information
Internal-Use OnlyGet information about the specified process.
/system/processes/{processId}
delete
Terminate a process
Internal-Use OnlyTerminates the specified process using the SIGKILL signal. User must be a CAS administrator or "own" the process by virtue of having created the session that uses the process.
/system/processes/{processId}
get
Get command line
Internal-Use OnlyGet command line for the specified process.
/system/processes/{processId}/commandLine
get
Get process CPU times
Internal-Use OnlyGet CPU times for the specified process.
/system/processes/{processId}/cpuTime
get
Get process environment variables
Internal-Use OnlyReturns the environment variables for the specified process, if permitted by the operating system.
/system/processes/{processId}/environment
get
List process threads
Internal-Use OnlyGet list of threads for the specified process.
/system/processes/{processId}/threads
get
Get thread information
Internal-Use OnlyGet information about the specified thread.
/system/processes/{processId}/threads/{threadId}
get
Get thread stack trace
Internal-Use OnlyGet a stack trace the specified thread.
/system/processes/{processId}/threads/{threadId}/stack
get
Get system metrics
Internal-Use OnlyReturns a collection of system metrics, similar to the information gathered and displayed by the top utility for UNIX/Linux.
/system/top
get
Get system metrics for user
Internal-Use OnlyReturns a collection of system metrics, similar to the information gathered and displayed by the top utility for UNIX/Linux, for the specified user. If the user is not an administrator, then the processes returned include processes created for the specified user, e.g. processes for sessions owned by the user.
/system/top/{user}

Grid

Grid information.
get
Get system information for grid nodes
Internal-Use OnlyInformation about the hardware running the CAS grid.
/grid
get
Get grid node information
Internal-Use OnlyInformation about a specific node on the grid.
/grid/{name}
get
Get grid node processes
Internal-Use OnlyRunning processes on a specific node on the grid.
/grid/{name}/processes
get
Get process information from a node
Internal-Use OnlyGet information about the specified process on the specified node.
/grid/{name}/processes/{processId}
delete
Terminate a process on a grid node
Internal-Use OnlyTerminates the specified process on the specified host using the SIGKILL signal. User must be a CAS administrator or "own" the process by virtue of having created the session that uses the process.
/grid/{name}/processes/{processId}
get
Get the command line for a process on a grid node
Internal-Use OnlyGet command line for the specified process on the specified node.
/grid/{name}/processes/{processId}/commandLine
get
Get CPU times for a process on a grid node
Internal-Use OnlyGet CPU times for the specified process on the specified node.
/grid/{name}/processes/{processId}/cpuTime
get
Get the environment variables for a process on a grid node
Internal-Use OnlyReturns the environment variables for the specified process on the specified node.
/grid/{name}/processes/{processId}/environment
get
Get a thread list for a process on a grid node
Internal-Use OnlyGet list of threads for the specified process on the specified node.
/grid/{name}/processes/{processId}/threads
get
Get thread information on a grid node
Internal-Use OnlyGet information about the specified thread.
/grid/{name}/processes/{processId}/threads/{threadId}
get
Get a stack trace on a grid node
Internal-Use OnlyGet a stack trace the specified thread.
/grid/{name}/processes/{processId}/threads/{threadId}/stack
get
Get system metrics on a grid node
Internal-Use OnlyReturns a collection of system metrics for the specified host, similar to the information gathered and displayed by the top utility for UNIX/Linux.
/grid/{name}/top
get
Get system metrics for a user on a grid node
Internal-Use OnlyReturns a collection of system metrics, similar to the information gathered and displayed by the top utility for UNIX/Linux, for the specified user. If the user is not an administrator, then the processes returned include processes created for the specified user, e.g. processes for sessions owned by the user.
/grid/{name}/top/{user}

Deprecated

Being removed in a future release.