Skip to content

Latest commit

 

History

History
1217 lines (968 loc) · 39 KB

casManagement.md

File metadata and controls

1217 lines (968 loc) · 39 KB

CAS Management API

The CAS Management API provides the ability to manage and perform actions on common resources related to Cloud Analytic Services (CAS). This API can be used to manage servers, nodes, sessions, libraries, and tables in CAS, as well as source tables available to load to CAS.

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.

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.

API Request Examples Grouped by Object Type

Servers
Sessions
Nodes
Caslibs
Tables
Sources
Columns
Policies
Data Connectors

Here is an example of using a GET request to retrieve servers.

GET /casManagement/servers HTTP/1.1
Host: apihost.example.com
Accept: application/vnd.sas.collection+json
Authorization: Bearer YOURTOKEN

Here is an example of using a GET request to retrieve a single server.

GET /casManagement/servers/cas-shared-default HTTP/1.1
Host: apihost.example.com
Accept: application/vnd.sas.cas.server+json
Authorization: Bearer YOURTOKEN

Here is an example of using a GET request to determine whether a CAS server is running.

GET /casManagement/servers/cas-shared-default/state HTTP/1.1
Host: apihost.example.com
Accept: text/plain
Authorization: Bearer YOURTOKEN

Here is an example of using a GET request to retrieve metrics from a CAS server.

GET /casManagement/servers/cas-shared-default/metrics HTTP/1.1
Host: apihost.example.com
Accept: application/vnd.sas.cas.server.metrics+json
Authorization: Bearer YOURTOKEN

Here is an example of using a GET request to retrieve sessions.

GET /casManagement/servers/cas-shared-default/sessions HTTP/1.1
Host: apihost.example.com
Accept: application/vnd.sas.collection+json
Authorization: Bearer YOURTOKEN

Here is an example of using a GET request to retrieve a single session.

GET /casManagement/servers/cas-shared-default/sessions/b3a9d3f9-1095-d848-85d4-02b19fc4e5cf HTTP/1.1
Host: apihost.example.com
Accept: application/vnd.sas.cas.session.summary+json
Authorization: Bearer YOURTOKEN

Here is an example of using a POST request to create a new session.

POST /casManagement/servers/cas-shared-default/sessions HTTP/1.1
Host: apihost.example.com
Accept: application/vnd.sas.cas.session+json
Authorization: Bearer YOURTOKEN
Content-Type: application/vnd.sas.cas.session+json

Here is an example of using a POST request to create a new session with options.

POST /casManagement/servers/cas-shared-default/sessions?sessionId=9ed3a21a-736a-864f-a0e7-8070a959947f HTTP/1.1
Host: apihost.example.com
Accept: application/vnd.sas.cas.session+json
Authorization: Bearer YOURTOKEN
Content-Type: application/vnd.sas.cas.session+json
{
    "name": "My session name",
    "timeOut": 3600
}

Here is an example of using a POST request to create a new session in a Korean locale.

POST /casManagement/servers/cas-shared-default/sessions?sessionId=9ed3a21a-736a-864f-a0e7-8070a959947f HTTP/1.1
Host: apihost.example.com
Accept: application/vnd.sas.cas.session+json
Authorization: Bearer YOURTOKEN
Content-Type: application/vnd.sas.cas.session+json
Accept-Language: ko-kr

Here is an example of using a GET request to determine whether a session is running.

GET /casManagement/servers/cas-shared-default/sessions/b3a9d3f9-1095-d848-85d4-02b19fc4e5cf/state HTTP/1.1
Host: apihost.example.com
Accept: text/plain
Authorization: Bearer YOURTOKEN

Here is an example of deleting a session.

DELETE /casManagement/servers/cas-shared-default/sessions/b3a9d3f9-1095-d848-85d4-02b19fc4e5cf HTTP/1.1
Host: apihost.example.com
Authorization: Bearer YOURTOKEN

Here is an example of using a GET request to retrieve a list of nodes.

GET /casManagement/servers/cas-shared-default/nodes HTTP/1.1
Host: apihost.example.com
Accept: application/vnd.sas.collection+json
Authorization: Bearer YOURTOKEN

Here is an example of using a GET request to retrieve a single node.

GET /casManagement/servers/cas-shared-default/nodes/somenodehost.example.com HTTP/1.1
Host: apihost.example.com
Accept: application/vnd.sas.cas.server.node+json
Authorization: Bearer YOURTOKEN

Here is an example of using a POST request to add a node.

POST /casManagement/servers/cas-shared-default/nodes?superUserSessionId=b3a9d3f9-1095-d848-85d4-02b19fc4e5cf HTTP/1.1
Host: apihost.example.com
Accept: application/vnd.sas.cas.server.node+json
Authorization: Bearer YOURTOKEN
Content-Type: application/vnd.sas.cas.server.node+json
{
   "name": "newnode.example.com"
}

Here is an example of deleting a node.

DELETE /casManagement/servers/cas-shared-default/nodes/nodetodelete.example.com?superUserSessionId=b3a9d3f9-1095-d848-85d4-02b19fc4e5cf HTTP/1.1
Host: apihost.example.com
Accept: application/json
Authorization: Bearer YOURTOKEN

Here is an example of using a GET request to retrieve Caslibs.

GET /casManagement/servers/cas-shared-default/caslibs HTTP/1.1
Host: apihost.example.com
Accept: application/vnd.sas.collection+json
Authorization: Bearer YOURTOKEN

Here is an example of using a GET request to retrieve a single Caslib.

GET /casManagement/servers/cas-shared-default/caslibs/Public?sessionId=b3a9d3f9-1095-d848-85d4-02b19fc4e5cf HTTP/1.1
Host: apihost.example.com
Accept: application/vnd.sas.cas.caslib+json
Authorization: Bearer YOURTOKEN

Here is an example of editing a global Caslib description or path.

PATCH /casManagement/servers/cas-shared-default/caslibs/TmpLib?sessionId=b3a9d3f9-1095-d848-85d4-02b19fc4e5cf HTTP/1.1
Host: apihost.example.com
Content-Type: application/vnd.sas.cas.caslib+json
Authorization: Bearer YOURTOKEN
{
    "version": 1,
    "description": "ANOTHER DESCRIPTION",
    "path": "/ANOTHERPATH2",
    "attributes":
    {
        "subDirs":true
    }
}

Here is an example of using a POST request to create a path-based Caslib.

POST /casManagement/servers/cas-shared-default/caslibs?sessionId=b3a9d3f9-1095-d848-85d4-02b19fc4e5cf&createDirectory=false HTTP/1.1
Host: apihost.example.com
Content-Type: application/vnd.sas.cas.caslib+json
Accept: application/vnd.sas.cas.caslib+json
Authorization: Bearer YOURTOKEN
{
  "version": 1,
  "name": "MyCaslib",
  "type": "PATH",
  "description": "My data",
  "path": "/some/path/on/disk",
  "scope": "global",
  "transient": false,
}

Here is an example of using a POST request to create a DFNS Caslib.

POST /casManagement/servers/cas-shared-default/caslibs?sessionId=b3a9d3f9-1095-d848-85d4-02b19fc4e5cf HTTP/1.1
Host: apihost.example.com
Content-Type: application/vnd.sas.cas.caslib+json
Accept: application/vnd.sas.cas.caslib+json
Authorization: Bearer YOURTOKEN
{
  "version": 1,
  "name": "DnfsLib",
  "description": "DNFS caslib",
  "type": "dnfs",
  "path": "/mapr4/my.example.com/user/USERID/",
  "scope": "session",
  "attributes": {
    "subDirs": true,
    "encryptionDomain": "My Encrypt Domain"
  }
}

Here is an example of using a POST request to create an HDFS Caslib.

POST /casManagement/servers/cas-shared-default/caslibs?sessionId=b3a9d3f9-1095-d848-85d4-02b19fc4e5cf HTTP/1.1
Host: apihost.example.com
Content-Type: application/vnd.sas.cas.caslib+json
Accept: application/vnd.sas.cas.caslib+json
Authorization: Bearer YOURTOKEN
{
  "version": 1,
  "name": "HdfsLib",
  "description": "HDFS caslib",
  "type": "hdfs",
  "path": "/vapublic",
  "scope": "global",
  "attributes": {
    "encryptionDomain": "My Encrypt Domain"
  }
}

Here is an example of using a POST request to create a Teradata Caslib.

POST /casManagement/servers/cas-shared-default/caslibs?sessionId=b3a9d3f9-1095-d848-85d4-02b19fc4e5cf HTTP/1.1
Host: apihost.example.com
Content-Type: application/vnd.sas.cas.caslib+json
Accept: application/vnd.sas.cas.caslib+json
Authorization: Bearer YOURTOKEN
{
  "version": 1,
  "name": "TeraLib",
  "description": "Teradata caslib",
  "type": "teradata",
  "scope": "session",
  "path": "",
  "attributes": {
       "username": "USER",
       "password": "PASS",
       "server": "SERVER"
  }
}

Here is an example of using a POST request to create an Oracle Caslib.

POST /casManagement/servers/cas-shared-default/caslibs?sessionId=b3a9d3f9-1095-d848-85d4-02b19fc4e5cf HTTP/1.1
Host: apihost.example.com
Content-Type: application/vnd.sas.cas.caslib+json
Accept: application/vnd.sas.cas.caslib+json
Authorization: Bearer YOURTOKEN
{
  "version": 1,
  "name": "OracleLib",
  "description": "Oracle caslib",
  "type": "oracle",
  "path": "//oraclehost.example.com:1521/EXADAT",
  "scope": "session",
  "attributes": {
       "username": "USER",
       "password": "PASS",
       "schema": "SCHEMA"
  }
}

Here is an example of using a POST request to create a Greenplum Caslib.

POST /casManagement/servers/cas-shared-default/caslibs?sessixonId=b3a9d3f9-1095-d848-85d4-02b19fc4e5cf HTTP/1.1
Host: apihost.example.com
Content-Type: application/vnd.sas.cas.caslib+json
Accept: application/vnd.sas.cas.caslib+json
Authorization: Bearer YOURTOKEN
{
  "version": 1,
  "name": "GreenplumLib",
  "description": "Greenplum caslib",
  "type": "greenplum",
  "scope": "session",
  "attributes": {
       "username": "USER",
       "password": "PASS",
       "server": "SERVER",
       "database": "DATABASE",
       "schema": "MODEL"
  }
}

Here is an example of using a POST request to create a PostgresSQL Caslib.

POST /casManagement/servers/cas-shared-default/caslibs?sessionId=b3a9d3f9-1095-d848-85d4-02b19fc4e5cf HTTP/1.1
Host: apihost.example.com
Content-Type: application/vnd.sas.cas.caslib+json
Accept: application/vnd.sas.cas.caslib+json
Authorization: Bearer YOURTOKEN
{
  "version": 1,
  "name": "PostgresLib",
  "description": "PostgreSQL caslib",
  "type": "postgres",
  "path": "/some/path",
  "scope": "session",
  "attributes": {
       "username": "USER",
       "password": "PASS",
       "server": "SERVER",
       "database": "DATABASE",
       "schema": "SCHEMA"
  }
}

Here is an example of using a POST request to create a LASR Caslib.

POST /casManagement/servers/cas-shared-default/caslibs?sessionId=b3a9d3f9-1095-d848-85d4-02b19fc4e5cf HTTP/1.1
Host: apihost.example.com
Content-Type: application/vnd.sas.cas.caslib+json
Accept: application/vnd.sas.cas.caslib+json
Authorization: Bearer YOURTOKEN
{
  "version": 1,
  "name": "LASRLib",
  "description": "LASR caslib",
  "type": "lasr",
  "path": "/some/path",
  "scope": "session",
  "attributes": {
       "username": "USER",
       "password": "PASS",
       "server": "SERVER",
       "port": 10050,
       "signer": "http://SIGNERHOST:PORT/SASLASRAuthorization",
       "metalib": "VAPUBLIC"
  }
}

Here is an example of using a POST request to create an Amazon S3 Caslib.

POST /casManagement/servers/cas-shared-default/caslibs?sessionId=b3a9d3f9-1095-d848-85d4-02b19fc4e5cf HTTP/1.1
Host: apihost.example.com
Content-Type: application/vnd.sas.cas.caslib+json
Accept: application/vnd.sas.cas.caslib+json
Authorization: Bearer YOURTOKEN
{
  "version": 1,
  "name": "S3Lib",
  "description": "S3 caslib",
  "type": "s3",
  "path": "/some/path",
  "scope": "session",
  "attributes": {
       "accessKeyId":"ACCESSKEYID",
       "secretAccessKey":"SECRETACCESSKEY",
       "bucket":"bucket.name",
       "region":"US_East",
       "objectPath":"",
       "useSSL":"true"
  }
}

Here is an example of using a POST request to create a YouTub Caslib.

POST /casManagement/servers/cas-shared-default/caslibs?sesxsionId=b3a9d3f9-1095-d848-85d4-02b19fc4e5cf HTTP/1.1
Host: apihost.example.com
Content-Type: application/vnd.sas.cas.caslib+json
Accept: application/vnd.sas.cas.caslib+json
Authorization: Bearer YOURTOKEN
{
  "version": 1,
  "name": "youtube",
  "description": "YouTube caslib",
  "path":"youtube",
  "type": "youtube",
  "scope": "global"
}

Here is an example of using a POST request to create a Google Analytics Caslib.

POST /casManagement/servers/cas-shared-default/caslibs?sesxsionId=b3a9d3f9-1095-d848-85d4-02b19fc4e5cf HTTP/1.1
Host: apihost.example.com
Content-Type: application/vnd.sas.cas.caslib+json
Accept: application/vnd.sas.cas.caslib+json
Authorization: Bearer YOURTOKEN
{
  "version": 1,
  "name": "GoogleAnalyticsCaslib",
  "description": "Google analytics data",
  "path":"ga",
  "type": "ga",
  "scope": "global"
}

Here is an example of using a POST request to create a Caslib definition.

DELETE /casManagement/servers/cas-shared-default/caslibs/ora2?sessionId=b3a9d3f9-1095-d848-85d4-02b19fc4e5cf HTTP/1.1
Host: apihost.example.com
Authorization: Bearer YOURTOKEN

Here is an example of using a GET request to list up to 50 tables in a Caslib.

GET /casManagement/servers/cas-shared-default/caslibs/Public/tables?sessixonId=b3a9d3f9-1095-d848-85d4-02b19fc4e5cf&limit=50 HTTP/1.1
Host: apihost.example.com
Accept: application/vnd.sas.collection+json
Authorization: Bearer YOURTOKEN

Here is an example of using a GET request to list only loaded tables in a Caslib.

GET /casManagement/servers/cas-shared-default/caslibs/Public/tables?sessixonId=b3a9d3f9-1095-d848-85d4-02b19fc4e5cf&state=loaded HTTP/1.1
Host: apihost.example.com
Accept: application/vnd.sas.collection+json
Authorization: Bearer YOURTOKEN

Here is an example of using a GET request to list a single table.

GET /casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS?sessionId=b3a9d3f9-1095-d848-85d4-02b19fc4e5cf HTTP/1.1
Host: apihost.example.com
Content-Type: application/json
Accept: application/vnd.sas.cas.table+json
Authorization: Bearer YOURTOKEN

Here is an example of using a GET request to list a single table with all detail groups included.

*This call might be less performant, but gathers more detail.

GET /casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS?sessionId=b3a9d3f9-1095-d848-85d4-02b19fc4e5cf&detailGroups=all HTTP/1.1
Host: apihost.example.com
Content-Type: application/json
Accept: application/vnd.sas.cas.table+json
Authorization: Bearer YOURTOKEN

Here is an example of using a PUT request to load a table.

This example is commonly referred to as a just-in-time or 'JIT' load because the call is often made to ensure that a table is either already loaded or to carry out a load of the table.

CAS Management automatically selects the source table or file to load using the following default source table matching algorithm:

  • In the case of a source table, the first source table name, which differs
  • In the case of a source file, the same case-insensitive match is made using the base name of the table (without the file extension).
  • In the case of a source file, if multiple base names match with different extensions, the match is selected using the following order of precedence: sashdat, sas7bdat, csv
PUT /casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/state?sessixonId=b3a9d3f9-1095-d848-85d4-02b19fc4e5cf&value=loaded&scope=global&createRelationships=true HTTP/1.1
Host: apihost.example.com
Accept: application/json;text/plain
Authorization: Bearer YOURTOKEN

Here is an example of using a PUT request to load a table from a specific source file.

PUT /casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/state?sessionId=b3a9d3f9-1095-d848-85d4-02b19fc4e5cf&value=loaded&scope=global HTTP/1.1
Host: apihost.example.com
Accept: application/json;text/plain
Authorization: Bearer YOURTOKEN

Here is an example of using a PUT request to load a table to a different output.

PUT /casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/state?sessionxId=b3a9d3f9-1095-d848-85d4-02b19fc4e5cf&value=loaded HTTP/1.1
Host: apihost.example.com
Accept: application/json;text/plain
Authorization: Bearer YOURTOKEN
Content-Type: application/vnd.sas.cas.table.load.request+json
{

 "outputCaslibName":"CASTestTmp",
 "outputTableName":"MyOutTable",
 "label":"My table label",
 "replace": false,
 "scope":"global",
 "copies": 1

}

Here is an example of using a PUT request to load a CSV file with non-default options.

PUT /casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/state?sessionxId=b3a9d3f9-1095-d848-85d4-02b19fc4e5cf&value=loaded HTTP/1.1
Host: apihost.example.com
Accept: application/json;text/plain
Authorization: Bearer YOURTOKEN
Content-Type: application/vnd.sas.cas.table.load.request+json
{
"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.\""
}

Here is an example of using a PUT request to load a subset of a table.

PUT /casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/state?sessionxId=b3a9d3f9-1095-d848-85d4-02b19fc4e5cf&value=loaded HTTP/1.1
Host: apihost.example.com
Accept: application/json;text/plain
Authorization: Bearer YOURTOKEN
Content-Type: application/vnd.sas.cas.table.load.request+json
{
"label": "My Table Label",
"replace": false,
"scope": "global",
"where": "NAME ? \"Mr.\""
}

Here is an example of using a PUT request to unload a table.

PUT /casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/state?sessionId=b3a9d3f9-1095-d848-85d4-02b19fc4e5cf&value=unloaded HTTP/1.1
Host: apihost.example.com
Accept: application/json;text/plain
Authorization: Bearer YOURTOKEN

Here is an example of using a PUT request to promote a session table to a global scope.

PUT /casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/scope?sessionId=b3a9d3f9-1095-d848-85d4-02b19fc4e5cf&value=global HTTP/1.1
Host: apihost.example.com
Accept: text/plain
Authorization: Bearer YOURTOKEN

Here is an example of using a POST request to save a table and replace the original.

POST /casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS?sessionId=b3a9d3f9-1095-d848-85d4-02b19fc4e5cf HTTP/1.1
Host: apihost.example.com
Content-Type: application/vnd.sas.cas.table.save.request+json
Accept: application/vnd.sas.cas.table+json
Authorization: Bearer YOURTOKEN
{
  "replace": true
}

Here is an example of using a POST request to save a table in the same format with a different name.

POST /casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS?sessionId=b3a9d3f9-1095-d848-85d4-02b19fc4e5cf HTTP/1.1
Host: apihost.example.com
Content-Type: application/vnd.sas.cas.table.save.request+json
Accept: application/vnd.sas.cas.table+json
Authorization: Bearer YOURTOKEN
{
  "caslibName":"Public",
  "tableName" :"SAVED_AS_CONTACTS",
  "replace": true
}

Here is an example of using a POST request to save a table in SASHDAT format.

POST /casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS?sessionId=b3a9d3f9-1095-d848-85d4-02b19fc4e5cf HTTP/1.1
Host: apihost.example.com
Content-Type: application/vnd.sas.cas.table.save.request+json
Accept: application/vnd.sas.cas.table+json
Authorization: Bearer YOURTOKEN
{
  "format": "sashdat",
  "replace": true
}

Here is an example of using a POST request to save a table in CSV format.

POST /casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS?sessionId=b3a9d3f9-1095-d848-85d4-02b19fc4e5cf HTTP/1.1
Host: apihost.example.com
Content-Type: application/vnd.sas.cas.table.save.request+json
Accept: application/vnd.sas.cas.table+json
Authorization: Bearer YOURTOKEN
{
  "format": "csv",
  "replace": true
}

Here is an example of using a POST request to save a table in CSV format with a different name.

POST /casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS?sessionId=b3a9d3f9-1095-d848-85d4-02b19fc4e5cf HTTP/1.1
Host: apihost.example.com
Content-Type: application/vnd.sas.cas.table.save.request+json
Accept: application/vnd.sas.cas.table+json
Authorization: Bearer YOURTOKEN
{
  "caslibName":"Public",
  "tableName" :"SAVED_AS_CONTACTS",
  "format": "csv",
  "replace": true
}

Here is an example of using a POST request to save a table to a different Caslib with a different name.

POST /casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS?sessionId=b3a9d3f9-1095-d848-85d4-02b19fc4e5cf HTTP/1.1
Host: apihost.example.com
Content-Type: application/vnd.sas.cas.table.save.request+json
Accept: application/vnd.sas.cas.table+json
Authorization: Bearer YOURTOKEN
{
  "caslibName":"TmpLib",
  "tableName" :"SAVED_CONTACTS",
  "format": "sashdat",
  "replace": true
}

Here is an example of deleting a table.

DELETE /casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS?sessionId=b3a9d3f9-1095-d848-85d4-02b19fc4e5cf&quiet=false&removeAcs=false HTTP/1.1
Host: apihost.example.com
Authorization: Bearer YOURTOKEN

Here is an example of using a GET request to list sources.

GET /casManagement/servers/cas-shared-default/caslibs/Public/sources?sessionId=b3a9d3f9-1095-d848-85d4-02b19fc4e5cf HTTP/1.1
Host: apihost.example.com
Accept: application/vnd.sas.collection+json
Authorization: Bearer YOURTOKEN

Here is an example of using a GET request to list a single source.

GET /casManagement/servers/cas-shared-default/caslibs/Public/sources?sessionId=b3a9d3f9-1095-d848-85d4-02b19fc4e5cf HTTP/1.1
Host: apihost.example.com
Accept: application/vnd.sas.collection+json
Authorization: Bearer YOURTOKEN

Here is an example of deleting a source.

DELETE /casManagement/servers/cas-shared-default/caslibs/Public/sources/Contacts.sashdat?sessionId=b3a9d3f9-1095-d848-85d4-02b19fc4e5cf HTTP/1.1
Host: apihost.example.com
Accept: application/vnd.sas.cas.source.table+json
Authorization: Bearer YOURTOKEN

Here is an example of using a GET request to list columns.

GET /casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns?sessionId=b3a9d3f9-1095-d848-85d4-02b19fc4e5cf HTTP/1.1
Host: apihost.example.com
Accept: application/vnd.sas.collection+json
Authorization: Bearer YOURTOKEN

Here is an example of using a GET request to list a single column.

GET /casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/COMPANY?sessionId=b3a9d3f9-1095-d848-85d4-02b19fc4e5cf HTTP/1.1
Host: apihost.example.com
Accept: application/vnd.sas.cas.column+json
Authorization: Bearer YOURTOKEN

Here is an example of using a GET request to retrieve distinct counts for a table.

GET /casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/distinctCount?sessionId=b3a9d3f9-1095-d848-85d4-02b19fc4e5cf HTTP/1.1
Host: apihost.example.com
Accept: application/vnd.sas.collection+json
Authorization: Bearer YOURTOKEN

Here is an example of using a GET request to retrieve summary statistics for a table.

GET /casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/summaryStatistics?sessionId=b3a9d3f9-1095-d848-85d4-02b19fc4e5cf HTTP/1.1
Host: apihost.example.com
Accept: application/vnd.sas.collection+json
Authorization: Bearer YOURTOKEN

Here is an example of using a GET request to retrieve the distinct count for a column.

GET /casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/COMPANY/distinctCount?sessionId=b3a9d3f9-1095-d848-85d4-02b19fc4e5cf HTTP/1.1
Host: apihost.example.com
Accept: application/vnd.sas.cas.column.distinct.count+json
Authorization: Bearer YOURTOKEN

Here is an example of using a GET request to retrieve the distance values for a column.

GET /casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/COMPANY/distinctValues?sessionId=b3a9d3f9-1095-d848-85d4-02b19fc4e5cf HTTP/1.1
Host: apihost.example.com
Accept: application/vnd.sas.collection+json
Authorization: Bearer YOURTOKEN

Here is an example of using a GET request to retrieve the summary statistics for a column.

GET /casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/ID/summaryStatistics?sessionId=b3a9d3f9-1095-d848-85d4-02b19fc4e5cf HTTP/1.1
Host: apihost.example.com
Accept: application/vnd.sas.cas.column.summary.statistics+json
Authorization: Bearer YOURTOKEN

Here is an example of using a GET request to retrieve the frequency for a column.

GET /casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/STATE/frequency?sessionId=b3a9d3f9-1095-d848-85d4-02b19fc4e5cf HTTP/1.1
Host: apihost.example.com
Accept: application/vnd.sas.cas.column.frequency+json
Authorization: Bearer YOURTOKEN

Here is an example of using a GET request to retrieve policies.

GET /casManagement/servers/cas-shared-default/policies
Host: apihost.example.com
Accept: application/vnd.sas.collection+json
Authorization: Bearer YOURTOKEN

Here is an example of using a GET request to retrieve the policy for a priority level.

GET /casManagement/servers/cas-shared-default/policies/cas-shared-default-priority-1
Host: apihost.example.com
Accept: application/vnd.sas.cas.server.policy.summary+json
Authorization: Bearer YOURTOKEN

Here is an example of creating the policy for a priority level.

POST /casManagement/servers/cas-shared-default/policies HTTP/1.1
Host: apihost.example.com
Accept: application/vnd.sas.cas.server.policy+json
Authorization: Bearer YOURTOKEN
Content-Type: application/vnd.sas.cas.server.policy+json
Body:
{
          "version": 1,
          "name": "cas-shared-default-priority-1",
          "type": "priorityLevels",
          "attributes": {
                   "cpu": 50,
                   "localTables": "500 GB",
                   "globalCasuser": "500 GB",
                   "globalCasuserHdfs": "500 GB"
          }
}

Here is an example of using a GET request to retrieve the policy for global Caslibs.

GET /casManagement/servers/cas-shared-default/policies/globalCaslibs
Host: apihost.example.com
Accept: application/vnd.sas.cas.server.policy+json
Authorization: Bearer YOURTOKEN

Here is an example of creating the policy for global Caslibs.

POST /casManagement/servers/cas-shared-default/policies
Host: apihost.example.com
Accept: application/vnd.sas.cas.server.policy+json
Authorization: Bearer YOURTOKEN
Content-Type: application/vnd.sas.cas.server.policy+json
{
          "version": 1,
          "name": "globalCaslibs",
          "type": "globalCaslibs",
          "attributes": {
                   "_ALL_": "400 GB",
                   "Public": "200 GB",
                   "HPS": "100 GB"
          }
}

Here is an example of using a GET request to retrieve the policy for priority assignments.

GET /casManagement/servers/cas-shared-default/policies/priorityAssignments HTTP/1.1
Host: apihost.example.com
Accept: application/vnd.sas.cas.server.policy+json
Authorization: Bearer YOURTOKEN

Here is an example of creating the policy for priority assignments.

POST /casManagement/servers/cas-shared-default/policies HTTP/1.1
Host: apihost.example.com
Accept: application/vnd.sas.cas.server.policy+json
Authorization: Bearer YOURTOKEN
Content-Type: application/vnd.sas.cas.server.policy+json
{
          "version": 1,
          "name": "PriorityAssignments",
          "type": "PriorityAssignments",
          "attributes": {
                   "userId": 1
          }
}

Here is an example of deleting a policy.

DELETE /casManagement/servers/cas-shared-default/policies/cas-shared-default-priority-1 HTTP/1.1
Host: apihost.example.com
Authorization: Bearer YOURTOKEN

Here is an example of using a GET request to retrieve data connectors.

GET /casManagement/servers/cas-shared-default/dataConnectors
Host: apihost.example.com
Accept: application/vnd.sas.collection+json
Authorization: Bearer YOURTOKEN

Here is an example of using a GET request to retrieve a single data connector.

GET /casManagement/servers/cas-jeff-default/dataConnectors/esp
Host: apihost.example.com
Accept: application/vnd.sas.data.engine+json
Authorization: Bearer YOURTOKEN

Here is an example of using a GET request to retrieve the definition of a single data connector.

GET /casManagement/servers/cas-jeff-default/dataConnectors/esp/definition
Host: apihost.example.com
Accept: application/json
Authorization: Bearer YOURTOKEN

version 3, last updated 22 NOV, 2019