NAV Navbar
Home icon
SAS Viya REST APIs
shell javascript python go
  • Compute
  • Compute

    CAS Management

    Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

    Base URLs:

    The CAS Management API provides the ability to manage and perform actions on common resources as they relate to Cloud Analytic Services (CAS).

    Usage Notes

    Overview

    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:

    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.

    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 life of the session, global for the life 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.

    Resources

    Entity Relationship Diagram

    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.

    The 'GET /' response include the following links.

    Relation Method Description
    collection GET Returns the a 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.

    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

    Media Types

    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.

    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.

    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.

    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.

    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 are examples of the JSON representation of this media type.

    Priority Level Policy Example

    { "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" } ] }

    Global Caslibs Policy Example

    { "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" } ] }

    Priority Assignments Policy Example

    { "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.

    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.

    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.

    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 settings 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 as well the source table with which it is associated.

    This media type is described by tableDetails.

    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/unload functionality.
    save POST /servers/{serverName}/caslibs/{caslibName}/tables/{tableName} Saves the table to a source table/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/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", "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.

    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.

    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.

    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.

    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 upon the type of the caslib is associated. For example, path-based caslibs will return file information, while non-path-based caslibs will return table information.

    This media type is described by casSourceTable.

    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/table.
    up GET /servers/{serverName}/caslibs/{caslibName}/sources Returns information about all source files/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 defining a caslib.

    This media type is described by caslibCreateRequest.

    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

    { "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.

    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 }

    application/vnd.sas.cas.table.load.request+json (with import options and filter)

    Here is an example of the JSON representation of this media type.

    { "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/table) as a source file/table.

    This media type is described by casSaveRequest.

    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 }

    application/vnd.sas.cas.table.save.request+json (as csv)

    Here is an example of the JSON representation of this media type.

    { "format": "csv", "replace": true }

    application/vnd.sas.cas.table.save.request+json (as sashdat)

    Here is an example of the JSON representation of this media type.

    { "format": "sashdat", "replace": true }

    application/vnd.sas.cas.table.save.request+json (save as different name)

    Here is an example of the JSON representation of this media type.

    { "caslibName":"{{caslibName}}", "tableName" :"SAVED_AS_{{tableName}}", "replace": true }

    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.

    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" }

    Error Codes

    HTTP Status Code Error Code Description
    304 12212 A bad option was specified for the load.
    304 12213 The load operation failed.
    400 12209 A bad value was specified for the state parameter.
    400 12210 A bad value was specified for the scope parameter.
    400 12211 A bad value was specified for the format parameter.
    400 12222 A bad 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

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/casManagement/ \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.api+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.api+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.api+json'
    }
    
    r = requests.get('https://www.example.com/casManagement/', params={
    
    }, 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://www.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

    {
      "version": 1,
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    
    Status Meaning Description Schema
    200 OK Version information about the API, as well as top level API entry points. Inline

    Check availability of API

    Code samples

    # You can also use wget
    curl -X HEAD https://www.example.com/casManagement/
    
    
    
    $.ajax({
      url: 'https://www.example.com/casManagement/',
      method: 'head',
    
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    
    r = requests.head('https://www.example.com/casManagement/', params={
    
    )
    
    print r.json()
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("HEAD", "https://www.example.com/casManagement/", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    HEAD /

    Returns whether or not the CAS Management service is running. This is identical to a GET request but will return only the HTTP headers with no document body.

    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. Service is running and available. None

    Get a list of CAS servers

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/casManagement/servers \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.collection+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.collection+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.collection+json'
    }
    
    r = requests.get('https://www.example.com/casManagement/servers', params={
    
    }, 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://www.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
    Parameter 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 may 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:
    • Search by name starting with: filter=startsWith(name, 'cas')
    • Search by name: filter=eq(name, 'cas-shared-default')
    • Search for multiple items: filter=in(name, 'cas-shared-default', 'cas-host-default')
    sortBy query string(sort-criteria) false Sort returned items. The sort criteria supports the first-level fields in each item. Some sample sorts:
    • Sort by ascending name: sortBy=name:ascending
    • Sort by descending name: sortBy=name:descending
    The default sort is by name in ascending order.
    excludeItemLinks query boolean false Determines whether item links are excluded from results. Defaults to false.

    Example responses

    200

    {
      "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": [
            "appServerEnabled=True",
            "rootLibPath=/opt/sas/viya/config/data/cas/default"
          ]
        }
      ],
      "limit": 10,
      "version": 2
    }
    
    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. error2
    404 Not Found The requested CAS server does not exist. None

    Get a CAS server

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/casManagement/servers/{serverName} \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.cas.server+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.cas.server+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.cas.server+json'
    }
    
    r = requests.get('https://www.example.com/casManagement/servers/{serverName}', params={
    
    }, 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://www.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
    Parameter In Type Required Description
    serverName path string true The name of the server.

    Example responses

    200

    {
      "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": null
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. The CAS server definition was returned casServer
    400 Bad Request The request was invalid. error2
    404 Not Found The requested CAS server does not exist. None

    Get connection information for CAS server

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/casManagement/servers/{serverName}/connection \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.cas.server.connection+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.cas.server.connection+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/connection',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.cas.server.connection+json'
    }
    
    r = requests.get('https://www.example.com/casManagement/servers/{serverName}/connection', params={
    
    }, 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://www.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
    Parameter In Type Required Description
    serverName path string true The name of the server.

    Example responses

    200

    {
      "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
    }
    
    Responses
    Status Meaning Description Schema
    200 OK Connection information for the requested CAS server was returned. casServerConnection
    400 Bad Request The request was invalid. error2
    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

    Get metrics for the CAS server

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/casManagement/servers/{serverName}/metrics \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.cas.server.metrics+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.cas.server.metrics+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/metrics',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.cas.server.metrics+json'
    }
    
    r = requests.get('https://www.example.com/casManagement/servers/{serverName}/metrics', params={
    
    }, 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://www.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
    Parameter In Type Required Description
    serverName path string true The name of the server.

    Example responses

    200

    {
      "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,
      "memoryOs": 185253888,
      "memoryQuota": 185253888,
      "port": 15943,
      "serverName": "casServer",
      "systemCores": 1344,
      "systemNodes": 28,
      "systemTotalMemory": 7581465980928,
      "version": 1
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The requested server's metrics were returned. casServerMetrics
    400 Bad Request The request was invalid. error2
    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

    Get the state of a CAS server

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/casManagement/servers/{serverName}/state \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: text/plain'
    
    
    var headers = {
      'Accept':'text/plain'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/state',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'text/plain'
    }
    
    r = requests.get('https://www.example.com/casManagement/servers/{serverName}/state', params={
    
    }, 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://www.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
    Parameter In Type Required Description
    serverName path string true The name of the server.

    Example responses

    400

    {
      "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. None
    400 Bad Request The request was invalid. error2
    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

    Change the state of a CAS server

    Code samples

    # You can also use wget
    curl -X PUT https://www.example.com/casManagement/servers/{serverName}/state?value=string \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: text/plain'
    
    
    var headers = {
      'Accept':'text/plain'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/state',
      method: 'put',
      data: '?value=string',
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'text/plain'
    }
    
    r = requests.put('https://www.example.com/casManagement/servers/{serverName}/state', params={
      'value': '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("PUT", "https://www.example.com/casManagement/servers/{serverName}/state", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    PUT /servers/{serverName}/state

    Stops the CAS server if the value 'stopped' is passed in. Returns text/plain 'stopped', or application/json error. Call with an Accept header of application/json;text/plain to properly receive both response types.

    Parameters
    Parameter In Type Required Description
    serverName path string true The name of the server.
    sessionId query string false The optional ID of the CAS session.
    value query string true The value of 'stopped' is currently supported.

    Example responses

    400

    {
      "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 shutdown was successful. None
    400 Bad Request The request was invalid. error2
    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

    Get a list of sessions

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/casManagement/servers/{serverName}/sessions \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.collection+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.collection+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/sessions',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.collection+json'
    }
    
    r = requests.get('https://www.example.com/casManagement/servers/{serverName}/sessions', params={
    
    }, 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://www.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
    Parameter 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 may 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:
    • Search by name starting with: filter=startsWith(name, 'CAS')
    • Search by name: filter=eq(name, 'CASUSER')
    • Search for multiple items: filter=in(name, 'CASUSER', 'Public')
    sortBy query string(sort-criteria) false Sort returned items. The sort criteria supports the first-level fields in each item. Some sample sorts:
    • Sort by ascending name: sortBy=name:ascending
    • Sort by descending name: sortBy=name:descending
    The default sort is by name in ascending order.
    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

    200

    {
      "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
    }
    
    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. error2
    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

    Create a session

    Code samples

    # You can also use wget
    curl -X POST https://www.example.com/casManagement/servers/{serverName}/sessions \
      -H 'Content-Type: application/vnd.sas.cas.session+json' \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.cas.session+json'
    
    
    var headers = {
      'Content-Type':'application/vnd.sas.cas.session+json',
      'Accept':'application/vnd.sas.cas.session+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/sessions',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.cas.session+json',
      'Accept': 'application/vnd.sas.cas.session+json'
    }
    
    r = requests.post('https://www.example.com/casManagement/servers/{serverName}/sessions', params={
    
    }, 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://www.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
    Parameter In Type Required Description
    serverName path string true Server name in which the session is to be created.
    body body casSession false

    Example responses

    201

    {
      "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. error2
    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

    End a session

    Code samples

    # You can also use wget
    curl -X DELETE https://www.example.com/casManagement/servers/{serverName}/sessions/{sessionId} \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: */*'
    
    
    var headers = {
      'Accept':'*/*'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/sessions/{sessionId}',
      method: 'delete',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': '*/*'
    }
    
    r = requests.delete('https://www.example.com/casManagement/servers/{serverName}/sessions/{sessionId}', params={
    
    }, 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://www.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 may be terminated are consistent with the permissions of the user. Normally, only sessions owned by the authenticated user may 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 may be ended.

    Parameters
    Parameter 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.

    Example responses

    400

    Responses
    Status Meaning Description Schema
    204 No Content The session was terminated. None
    400 Bad Request The request was invalid. error2
    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

    Get a session

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/casManagement/servers/{serverName}/sessions/{sessionId} \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.cas.session.summary+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.cas.session.summary+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/sessions/{sessionId}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.cas.session.summary+json'
    }
    
    r = requests.get('https://www.example.com/casManagement/servers/{serverName}/sessions/{sessionId}', params={
    
    }, 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://www.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
    Parameter 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

    200

    {
      "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
    }
    
    Responses
    Status Meaning Description Schema
    200 OK Information about the requested session was returned. casSessionSummary
    400 Bad Request The request was invalid. error2
    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

    Set the transaction state of a CAS session

    Code samples

    # You can also use wget
    curl -X POST https://www.example.com/casManagement/servers/{serverName}/sessions/{sessionId}?action=string \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: text/plain'
    
    
    var headers = {
      'Accept':'text/plain'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/sessions/{sessionId}',
      method: 'post',
      data: '?action=string',
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'text/plain'
    }
    
    r = requests.post('https://www.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://www.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
    Parameter 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

    {
      "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. error2
    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

    Get the state of a CAS session

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/casManagement/servers/{serverName}/sessions/{sessionId}/state \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: text/plain'
    
    
    var headers = {
      'Accept':'text/plain'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/sessions/{sessionId}/state',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'text/plain'
    }
    
    r = requests.get('https://www.example.com/casManagement/servers/{serverName}/sessions/{sessionId}/state', params={
    
    }, 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://www.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
    Parameter 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

    {
      "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. error2
    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

    Get a list of caslibs

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/casManagement/servers/{serverName}/caslibs \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.collection+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.collection+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/caslibs',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.collection+json'
    }
    
    r = requests.get('https://www.example.com/casManagement/servers/{serverName}/caslibs', params={
    
    }, 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://www.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 upon 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
    Parameter 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 may 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:
    • Search by name starting with: filter=startsWith(name, 'CAS')
    • Search by name: filter=eq(name, 'CASUSER')
    • Search for multiple items: filter=in(name, 'CASUSER', 'Public')
    sortBy query string(sort-criteria) false Sort returned items. The sort criteria supports the first-level fields in each item. Some sample sorts:
    • Sort by ascending name: sortBy=name:ascending
    • Sort by descending name: sortBy=name:descending
    The default sort is by name in ascending order.
    excludeItemLinks query boolean false Determines whether item links are excluded from results. Defaults to false.

    Example responses

    200

    {
      "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": {
            "active": true,
            "personal": true,
            "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/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": {
            "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
        },
        {
          "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": {
            "active": false,
            "personal": false,
            "subDirs": false
          },
          "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
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request was successful. caslibCollection
    400 Bad Request The request was invalid. error2
    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

    Create a caslib

    Code samples

    # You can also use wget
    curl -X POST https://www.example.com/casManagement/servers/{serverName}/caslibs \
      -H 'Content-Type: application/vnd.sas.cas.caslib+json' \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.cas.caslib+json'
    
    
    var headers = {
      'Content-Type':'application/vnd.sas.cas.caslib+json',
      'Accept':'application/vnd.sas.cas.caslib+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/caslibs',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.cas.caslib+json',
      'Accept': 'application/vnd.sas.cas.caslib+json'
    }
    
    r = requests.post('https://www.example.com/casManagement/servers/{serverName}/caslibs', params={
    
    }, 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://www.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

    {
      "name": "CASUSER(userId)",
      "description": "Personal File System caslib",
      "path": "/u/userId/",
      "scope": "global",
      "type": "PATH",
      "hidden": false,
      "transient": false,
      "version": 1,
      "attributes": {
        "active": false,
        "personal": true,
        "subDirs": true
      },
      "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"
        }
      ]
    }
    
    Parameters
    Parameter 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

    Example responses

    201

    {
      "name": "CASUSER(userId)",
      "description": "Personal File System caslib",
      "path": "/u/userId/",
      "scope": "global",
      "type": "PATH",
      "hidden": false,
      "transient": false,
      "version": 1,
      "attributes": {
        "active": false,
        "personal": true,
        "subDirs": true
      },
      "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"
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    201 Created The caslib was defined successfully. Information about the defined caslib is returned. Note that links are only returned for GET calls, and are not included in the POST response (though listed here so endpoints in this documentation can share the same schema definition). caslib
    400 Bad Request The request was invalid. error2
    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 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://www.example.com/casManagement/servers/{serverName}/caslibs#advanced \
      -H 'Content-Type: application/vnd.sas.cas.caslib.create.request+json' \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.cas.caslib+json'
    
    
    var headers = {
      'Content-Type':'application/vnd.sas.cas.caslib.create.request+json',
      'Accept':'application/vnd.sas.cas.caslib+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/caslibs#advanced',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.cas.caslib.create.request+json',
      'Accept': 'application/vnd.sas.cas.caslib+json'
    }
    
    r = requests.post('https://www.example.com/casManagement/servers/{serverName}/caslibs#advanced', params={
    
    }, 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://www.example.com/casManagement/servers/{serverName}/caslibs#advanced", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /servers/{serverName}/caslibs#advanced

    Defines a new caslib using more advanced options. Note: If present, remove '#advanced' from the URL before submitting.

    Body parameter

    {
      "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": {
          "subDirs": false
        }
      }
    }
    
    Parameters
    Parameter 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

    Example responses

    201

    {
      "name": "CASUSER(userId)",
      "description": "Personal File System caslib",
      "path": "/u/userId/",
      "scope": "global",
      "type": "PATH",
      "hidden": false,
      "transient": false,
      "version": 1,
      "attributes": {
        "active": false,
        "personal": true,
        "subDirs": true
      },
      "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"
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    201 Created The caslib was defined successfully. Information about the defined caslib is returned. Note that links are only returned for GET calls, and are not included in the POST response (though listed here so endpoints in this documentation can share the same schema definition). caslib
    400 Bad Request The request was invalid. error2
    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

    Remove a caslib definition

    Code samples

    # You can also use wget
    curl -X DELETE https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}
    
    
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}',
      method: 'delete',
    
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    
    r = requests.delete('https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}', params={
    
    )
    
    print r.json()
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("DELETE", "https://www.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
    Parameter 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.
    Responses
    Status Meaning Description Schema
    204 No Content The caslib definition was removed. 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://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName} \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.cas.caslib+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.cas.caslib+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.cas.caslib+json'
    }
    
    r = requests.get('https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}', params={
    
    }, 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://www.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
    Parameter 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

    200

    {
      "name": "CASUSER(userId)",
      "description": "Personal File System caslib",
      "path": "/u/userId/",
      "scope": "global",
      "type": "PATH",
      "hidden": false,
      "transient": false,
      "version": 1,
      "attributes": {
        "active": false,
        "personal": true,
        "subDirs": true
      },
      "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"
        }
      ]
    }
    
    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. error2
    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

    Edit a global caslib

    Code samples

    # You can also use wget
    curl -X PATCH https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName} \
      -H 'Content-Type: application/vnd.sas.cas.caslib+json' \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.cas.caslib+json'
    
    
    var headers = {
      'Content-Type':'application/vnd.sas.cas.caslib+json',
      'Accept':'application/vnd.sas.cas.caslib+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}',
      method: 'patch',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.cas.caslib+json',
      'Accept': 'application/vnd.sas.cas.caslib+json'
    }
    
    r = requests.patch('https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}', params={
    
    }, 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://www.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 only the following: * description * path

    Body parameter

    {
      "name": "CASUSER(userId)",
      "description": "Personal File System caslib",
      "path": "/u/userId/",
      "scope": "global",
      "type": "PATH",
      "hidden": false,
      "transient": false,
      "version": 1,
      "attributes": {
        "active": false,
        "personal": true,
        "subDirs": true
      },
      "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"
        }
      ]
    }
    
    Parameters
    Parameter 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

    Example responses

    400

    {
      "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. error2
    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 list of nodes

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/casManagement/servers/{serverName}/nodes \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.collection+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.collection+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/nodes',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.collection+json'
    }
    
    r = requests.get('https://www.example.com/casManagement/servers/{serverName}/nodes', params={
    
    }, 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://www.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
    Parameter 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 may 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 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

    null
    
    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. error2
    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

    Add a node

    Code samples

    # You can also use wget
    curl -X POST https://www.example.com/casManagement/servers/{serverName}/nodes \
      -H 'Content-Type: application/vnd.sas.cas.server.node+json' \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.cas.server.node+json'
    
    
    var headers = {
      'Content-Type':'application/vnd.sas.cas.server.node+json',
      'Accept':'application/vnd.sas.cas.server.node+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/nodes',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.cas.server.node+json',
      'Accept': 'application/vnd.sas.cas.server.node+json'
    }
    
    r = requests.post('https://www.example.com/casManagement/servers/{serverName}/nodes', params={
    
    }, 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://www.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

    {
      "name": "worker1.grid.example.com"
    }
    
    Parameters
    Parameter 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

    Example responses

    201

    {
      "name": "worker1.grid.example.com",
      "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"
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    201 Created Information about the created node was returned. casServerNode
    400 Bad Request The request was invalid. error2
    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

    Remove a node

    Code samples

    # You can also use wget
    curl -X DELETE https://www.example.com/casManagement/servers/{serverName}/nodes/{nodeId} \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: */*'
    
    
    var headers = {
      'Accept':'*/*'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/nodes/{nodeId}',
      method: 'delete',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': '*/*'
    }
    
    r = requests.delete('https://www.example.com/casManagement/servers/{serverName}/nodes/{nodeId}', params={
    
    }, 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://www.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
    Parameter 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

    Responses
    Status Meaning Description Schema
    204 No Content The node was removed. None
    400 Bad Request The request was invalid. error2
    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

    Get a node

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/casManagement/servers/{serverName}/nodes/{nodeId} \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.cas.server.node+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.cas.server.node+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/nodes/{nodeId}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.cas.server.node+json'
    }
    
    r = requests.get('https://www.example.com/casManagement/servers/{serverName}/nodes/{nodeId}', params={
    
    }, 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://www.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
    Parameter In Type Required Description
    serverName path string true Server name containing the session being requested.
    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

    200

    {
      "name": "worker1.grid.example.com",
      "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"
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK Information about the requested node was returned. casServerNode
    400 Bad Request The request was invalid. error2
    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

    Get a list of source files or tables

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/sources \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.collection+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.collection+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/sources',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.collection+json'
    }
    
    r = requests.get('https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/sources', params={
    
    }, 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://www.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
    Parameter 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 may be less if the collection has been exhausted. Defaults to 10.

    Example responses

    200

    {
      "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
    }
    
    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. error2
    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 source file or table

    Code samples

    # You can also use wget
    curl -X GET https://www.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'
    
    
    var headers = {
      'Accept':'application/vnd.sas.cas.source.table+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/sources/{sourceName}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.cas.source.table+json'
    }
    
    r = requests.get('https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/sources/{sourceName}', params={
    
    }, 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://www.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
    Parameter 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

    200

    {
      "attributes": {
        "owner": "userId",
        "permission": "-rwxr-xr-x",
        "size": 18461,
        "time": "24Oct2015:01:44:28"
      },
      "name": "counties.sashdat"
    }
    
    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. error2
    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 list of tables

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.collection+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.collection+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.collection+json'
    }
    
    r = requests.get('https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables', params={
    
    }, 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://www.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 refers 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, 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
    Parameter 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 only tables which match a particular state. Valid values include loaded (only loaded tables), unloaded (only unloaded tables).
    scope query string false Omitting this value includes tables of all scopes. Specifying a value here filters the results to only tables which match a particular scope. Valid values include session and global.
    sourcesOnly query boolean false Determines whether only 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 may 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:
    • Search by name: starting with filter=startsWith(name, 'CAS')
    • Search by name: filter=eq(name, 'CASUSER')
    • Search for multiple items: filter=in(name, 'CASUSER', 'Public')
    sortBy query string(sort-criteria) false Sort returned items. The sort criteria supports the first-level fields in each item. Some sample sorts:
    • Sort by ascending name: sortBy=name:ascending
    • Sort by descending name: sortBy=name:descending
    The default sort is by name in ascending order.

    Example responses

    200

    {
      "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",
          "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",
          "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
    }
    
    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. error2
    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

    Upload a data file to the collection of tables

    Code samples

    # You can also use wget
    curl -X POST https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables \
      -H 'Content-Type: multipart/form-data' \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.collection+json'
    
    
    var headers = {
      'Content-Type':'multipart/form-data',
      'Accept':'application/vnd.sas.collection+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Content-Type': 'multipart/form-data',
      'Accept': 'application/vnd.sas.collection+json'
    }
    
    r = requests.post('https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables', params={
    
    }, 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://www.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
    format: string
    label: string
    scope: string
    replace: true
    encoding: string
    allowTruncation: true
    delimiter: string
    varchars: true
    scanRows: 0
    threadCount: 0
    stripBlanks: true
    containsHeaderRow: true
    sheetName: string
    password: string
    decryptionKey: string
    stringLengthMultiplier: 0
    varcharConversionThreshold: 0
    file: string
    
    
    Parameters
    Parameter 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
    » 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.
    » 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. Parameter only valid for CSV files. Defaults to utf-8.
    » allowTruncation body boolean false Allow truncation of character data that is too long for a given field. Parameter only valid for CSV files. Defaults to true.
    » delimiter body string false Delimiter character. Parameter only valid for CSV files. Defaults to ','.
    » varchars body boolean false Use variable character lengths. Parameter only valid for CSV files. Defaults to true.
    » scanRows body integer(int64) false Number of rows to scan when determining column types. Parameter only valid for CSV files. 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. Parameter only valid for CSV files. 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. Parameter only valid for CSV files. Defaults to false.
    » containsHeaderRow body boolean false If true, first row is used for column names. Parameter only valid for csv, xls and xlsx files. Defaults to false.
    » sheetName body string false Specifies the name of worksheet to import from a Microsoft Excel file. Parameter only valid for xls and xlsx files. If no sheet name is specified, the first sheet is used.
    » password body string false Password used to read a protected SAS dataset. Parameter only valid for sas7bdat files.
    » decryptionKey body string false Key used to decrypt the data file. Parameter only valid for sas7bdat and sashdat files.
    » 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. Parameter only valid for sas7bdat files.
    » varcharConversionThreshold body integer(double) false Specifies a multiplier value to expand fixed-width character variables that might require transcoding. The lengths are increased to avoid character data truncation. The lengths are increased by multiplying the length by the specified value. The server default is 1. Parameter only valid for sas7bdat files.
    » file body string(binary) true Data file in one of the supported formats. This MUST be the last parameter.

    Example responses

    201

    {
      "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",
      "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 list of newly uploaded tables was returned. tableDetails
    400 Bad Request The request was invalid. error2
    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

    Delete a table from source

    Code samples

    # You can also use wget
    curl -X DELETE https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}?sourceTableName=string&quiet=true&removeAcs=true
    
    
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}',
      method: 'delete',
      data: '?sourceTableName=string&quiet=true&removeAcs=true',
    
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    
    r = requests.delete('https://www.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://www.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
    Parameter 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://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName} \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.cas.table+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.cas.table+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.cas.table+json'
    }
    
    r = requests.get('https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}', params={
    
    }, 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://www.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
    Parameter 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:
    • all - Include all detail groups
    • unloaded Columns - Include column counts for unloaded tables. This information is retrieved if available from the source.
    • unloadedRows - Include row counts for unloaded tables. This information is retrieved if available from the source. Row counts from HDFS are not provided.
    Enumerated Values
    Parameter Value
    detailGroups all
    detailGroups unloadedColumns
    detailGroups unloadedRows

    Example responses

    200

    {
      "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",
      "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
    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. error2
    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

    Save a table

    Code samples

    # You can also use wget
    curl -X POST https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName} \
      -H 'Content-Type: application/vnd.sas.cas.table.save.request+json' \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.cas.table+json'
    
    
    var headers = {
      'Content-Type':'application/vnd.sas.cas.table.save.request+json',
      'Accept':'application/vnd.sas.cas.table+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.cas.table.save.request+json',
      'Accept': 'application/vnd.sas.cas.table+json'
    }
    
    r = requests.post('https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}', params={
    
    }, 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://www.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

    {
      "version": 2,
      "caslibName": "myOutCaslib",
      "tableName": "myOptionalNewOutputTableName",
      "format": "sashdat",
      "compress": true,
      "replace": true,
      "parameters": {
        "param1": "value1",
        "param2": "value2"
      }
    }
    
    Parameters
    Parameter 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

    Example responses

    400

    {
      "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. error2
    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

    Change the scope of a loaded CAS table

    Code samples

    # You can also use wget
    curl -X PUT https://www.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'
    
    
    var headers = {
      'Accept':'application/json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/scope',
      method: 'put',
      data: '?sessionId=string&value=string',
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/json'
    }
    
    r = requests.put('https://www.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://www.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 only valid on a session table. Promote target is the same caslib which contains the session table.

    Parameters
    Parameter 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

    {
      "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. error2
    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

    Load or unload a table

    Code samples

    # You can also use wget
    curl -X PUT https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/state?value=string \
      -H 'Content-Type: application/vnd.sas.cas.table.load.request+json' \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/json'
    
    
    var headers = {
      'Content-Type':'application/vnd.sas.cas.table.load.request+json',
      'Accept':'application/json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/state',
      method: 'put',
      data: '?value=string',
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.cas.table.load.request+json',
      'Accept': 'application/json'
    }
    
    r = requests.put('https://www.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://www.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

    {
      "version": 3,
      "copies": 1,
      "label": "My table label",
      "outputCaslibName": "MyOutCaslib",
      "outputTableName": "MyOutTable",
      "parameters": {
        "loadParam1": "value1",
        "loadParam2": "value2"
      },
      "replace": false,
      "replaceMode": "always",
      "scope": "global"
    }
    
    Parameters
    Parameter 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.
    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:
    • For path-based caslibs, the source file used will be the first matching .sashdat, .sas7bdat, 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.
    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

    {
      "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. error2
    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 all numeric columns

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/summaryStatistics \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.collection+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.collection+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/summaryStatistics',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.collection+json'
    }
    
    r = requests.get('https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/summaryStatistics', params={
    
    }, 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://www.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
    Parameter 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 may be less if the collection has been exhausted. Defaults to 10.

    Example responses

    200

    {
      "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://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/distinctCounts \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.collection+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.collection+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/distinctCounts',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.collection+json'
    }
    
    r = requests.get('https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/distinctCounts', params={
    
    }, 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://www.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
    Parameter 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 may be less if the collection has been exhausted. Defaults to 10.

    Example responses

    200

    {
      "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

    Get a list of columns in a table

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.collection+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.collection+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.collection+json'
    }
    
    r = requests.get('https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns', params={
    
    }, 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://www.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
    Parameter 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 may 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:
    • Search by name starting with: filter=startsWith(name, 'CAS')
    • Search by name: filter=eq(name, 'CASUSER')
    • Search for multiple items: filter=in(name, 'CASUSER', 'Public')
    sortBy query string(sort-criteria) false Sort returned items. The sort criteria supports the first-level fields in each item. Some sample sorts:
    • Sort by ascending name: sortBy=name:ascending
    • Sort by descending name: sortBy=name:descending
    Sorting is not performed if this query parameter is omitted.
    excludeItemLinks query boolean false Determines whether item links are excluded from results. Defaults to true.

    Example responses

    200

    {
      "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
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The requested table's column information was returned. casColumnCollection
    400 Bad Request The request was invalid. error2
    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 column information

    Code samples

    # You can also use wget
    curl -X GET https://www.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'
    
    
    var headers = {
      'Accept':'application/vnd.sas.cas.column+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.cas.column+json'
    }
    
    r = requests.get('https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}', params={
    
    }, 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://www.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
    Parameter 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

    {
      "index": 0,
      "format": "string",
      "formattedLength": 0,
      "label": "string",
      "name": 0,
      "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. error2
    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://www.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'
    
    
    var headers = {
      'Accept':'application/vnd.sas.cas.column.distinct.count+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/distinctCount',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.cas.column.distinct.count+json'
    }
    
    r = requests.get('https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/distinctCount', params={
    
    }, 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://www.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
    Parameter 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

    200

    {
      "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://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/distinctValues
    
    
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/distinctValues',
      method: 'get',
    
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    
    r = requests.get('https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/distinctValues', params={
    
    )
    
    print r.json()
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://www.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
    Parameter 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 may 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://www.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'
    
    
    var headers = {
      'Accept':'application/vnd.sas.cas.column.frequency+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/frequency',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.cas.column.frequency+json'
    }
    
    r = requests.get('https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/frequency', params={
    
    }, 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://www.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
    Parameter 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

    {
      "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://www.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'
    
    
    var headers = {
      'Accept':'application/vnd.sas.cas.table+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/frequency',
      method: 'post',
      data: '?outputCaslibName=string&outputTableName=string',
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.cas.table+json'
    }
    
    r = requests.post('https://www.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://www.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
    Parameter 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:
    Column NameContent
     Frequency  The frequency of the value
     FmtVar  The formatted value
     CharVar  For a character column, the unformatted value
     NumVar  For a numeric column, the unformatted value
    outputTableScope query string false The scope of the output table. Valid values in include session and global. Defaults to global. Global caslibs may contain global and session tables. Session caslibs may 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:
    Value of sortByResult
     Frequency :ascendingsort by ascending  Frequency , ascending  FmtVar 
     Frequency :descendingsort by descending  Frequency , ascending  FmtVar 
     FmtVar :ascendingsort by ascending  FmtVar 
     FmtVar :descendingsort by descending  FmtVar 

    Example responses

    201

    {
      "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",
      "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://www.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'
    
    
    var headers = {
      'Accept':'application/vnd.sas.cas.column.summary.statistics+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/summaryStatistics',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.cas.column.summary.statistics+json'
    }
    
    r = requests.get('https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/summaryStatistics', params={
    
    }, 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://www.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
    Parameter 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

    {
      "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. error2
    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

    Create a frequency table for a column

    Code samples

    # You can also use wget
    curl -X POST https://www.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'
    
    
    var headers = {
      'Accept':'application/vnd.sas.job.execution.job+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/jobs/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/frequency',
      method: 'post',
      data: '?outputCaslibName=string&outputTableName=string',
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.job.execution.job+json'
    }
    
    r = requests.post('https://www.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://www.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
    Parameter 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:
    Column NameContent
     Frequency The frequency of the value
     FmtVar The formatted value
     CharVar For a character column, the unformatted value
     NumVar For a numeric column, the unformatted value
    outputTableScope query string false The scope of the output table. Valid values in include session and global. Defaults to global. Global caslibs may contain global and session tables. Session caslibs may 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:
    Value of sortByResult
     Frequency :ascendingsort by ascending  Frequency , ascending  FmtVar 
     Frequency :descendingsort by descending  Frequency , ascending  FmtVar 
     FmtVar :ascendingsort by ascending  FmtVar 
     FmtVar :descendingsort by descending  FmtVar 

    Example responses

    201

    {
      "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

    Get a collection of tables

    Code samples

    # You can also use wget
    curl -X GET https://www.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'
    
    
    var headers = {
      'Accept':'application/vnd.sas.collection+json',
      'Accept-Item':'application/vnd.sas.data.table.summary+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/dataSources/{dataTableProviderId}/tables',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.collection+json',
      'Accept-Item': 'application/vnd.sas.data.table.summary+json'
    }
    
    r = requests.get('https://www.example.com/casManagement/dataSources/{dataTableProviderId}/tables', params={
    
    }, 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://www.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
    Parameter 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 may be less if the collection has been exhausted. Defaults to 10.
    dataTableProviderId path string true See Data Tables API documentation for details on dataTableProviderId. A sample value is cas~fs~serverName~fs~caslibName.
    Accept-Item header string false The desired representation. The Accept-Item options are:
    • application/vnd.sas.data.table+json
    • application/vnd.sas.data.table.summary+json
    • blank
    If the Accept-Item header is not provided, then the application/vnd.sas.data.source+json representation will be returned.
    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 only tables in 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

    {
      "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. error2
    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://www.example.com/casManagement/dataTables/dataSources/{dataTableProviderId}/tables/{tableName} \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.data.table+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.data.table+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/dataTables/dataSources/{dataTableProviderId}/tables/{tableName}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.data.table+json'
    }
    
    r = requests.get('https://www.example.com/casManagement/dataTables/dataSources/{dataTableProviderId}/tables/{tableName}', params={
    
    }, 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://www.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
    Parameter In Type Required Description
    dataTableProviderId path string true See Data Tables API documentation for details on 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:
    • all - Includes tables in both session scope and global scope
    • global - Includes only tables in global scope
    Defaults to all.
    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:
    • all - Include all detail groups
    • unloaded Columns - Include column counts for unloaded tables. This information is retrieved if available from the source.
    • unloadedRows - Include row counts for unloaded tables. This information is retrieved if available from the source. Row counts from HDFS are not provided.
    Enumerated Values
    Parameter Value
    detailGroups all
    detailGroups unloadedColumns
    detailGroups unloadedRows

    Example responses

    400

    {
      "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. error2
    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 list of loggers

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/casManagement/servers/{serverName}/loggers \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.collection+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.collection+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/loggers',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.collection+json'
    }
    
    r = requests.get('https://www.example.com/casManagement/servers/{serverName}/loggers', params={
    
    }, 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://www.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
    Parameter 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 may 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 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

    200

    {
      "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
    }
    
    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. error2
    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

    Add a logger

    Code samples

    # You can also use wget
    curl -X POST https://www.example.com/casManagement/servers/{serverName}/loggers \
      -H 'Content-Type: application/vnd.sas.cas.server.logger+json' \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.cas.server.logger+json'
    
    
    var headers = {
      'Content-Type':'application/vnd.sas.cas.server.logger+json',
      'Accept':'application/vnd.sas.cas.server.logger+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/loggers',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.cas.server.logger+json',
      'Accept': 'application/vnd.sas.cas.server.logger+json'
    }
    
    r = requests.post('https://www.example.com/casManagement/servers/{serverName}/loggers', params={
    
    }, 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://www.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

    {
      "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
    Parameter In Type Required Description
    serverName path string true Server name in which the logger is to be created.
    body body casServerLogger true

    Example responses

    201

    {
      "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"
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    201 Created Information about the created logger was returned. casServerLogger
    400 Bad Request An error occurred. error2
    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 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://www.example.com/casManagement/servers/{serverName}/loggers/{loggerName} \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.cas.server.logger.summary+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.cas.server.logger.summary+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/loggers/{loggerName}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.cas.server.logger.summary+json'
    }
    
    r = requests.get('https://www.example.com/casManagement/servers/{serverName}/loggers/{loggerName}', params={
    
    }, 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://www.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
    Parameter 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.
    sessionId query string false Session ID to use when connecting to retrieve the logger. If not specified, a temporary session will be used.

    Example responses

    200

    {
      "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"
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The requested information about the logger was returned. casServerLoggerSummary
    400 Bad Request The request was invalid. error2
    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

    Update a logger

    Code samples

    # You can also use wget
    curl -X PUT https://www.example.com/casManagement/servers/{serverName}/loggers/{loggerName} \
      -H 'Content-Type: application/vnd.sas.cas.server.logger+json' \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.cas.server.logger+json'
    
    
    var headers = {
      'Content-Type':'application/vnd.sas.cas.server.logger+json',
      'Accept':'application/vnd.sas.cas.server.logger+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/loggers/{loggerName}',
      method: 'put',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.cas.server.logger+json',
      'Accept': 'application/vnd.sas.cas.server.logger+json'
    }
    
    r = requests.put('https://www.example.com/casManagement/servers/{serverName}/loggers/{loggerName}', params={
    
    }, 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://www.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

    {
      "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
    Parameter In Type Required Description
    serverName path string true Server name for which the logger information is being updated.
    sessionId query string false Session ID to use when connecting to update the logger. If not specified, a temporary session will be used.
    body body casServerLogger true Session ID to use when connecting to update the logger. If not specified, a temporary session will be used.

    Example responses

    200

    {
      "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"
        }
      ]
    }
    
    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. error2
    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

    Remove a logger

    Code samples

    # You can also use wget
    curl -X DELETE https://www.example.com/casManagement/servers/{serverName}/loggers/{loggerName} \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: */*'
    
    
    var headers = {
      'Accept':'*/*'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/loggers/{loggerName}',
      method: 'delete',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': '*/*'
    }
    
    r = requests.delete('https://www.example.com/casManagement/servers/{serverName}/loggers/{loggerName}', params={
    
    }, 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://www.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
    Parameter In Type Required Description
    serverName path string true Server name containing the logger.
    loggerName path string true Logger to delete.

    Example responses

    400

    Responses
    Status Meaning Description Schema
    204 No Content The logger was removed. None
    400 Bad Request An error occurred. error2
    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

    Get a list of policies

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/casManagement/servers/{serverName}/policies \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.collection+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.collection+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/policies',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.collection+json'
    }
    
    r = requests.get('https://www.example.com/casManagement/servers/{serverName}/policies', params={
    
    }, 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://www.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
    Parameter 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 may 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 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

    200

    {
      "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": {
            "localTables": "12000000000",
            "cpu": "45",
            "globalCasuser": "33000000000",
            "globalCasuserHdfs": "15000000000"
          }
        },
        {
          "version": 1,
          "name": "cas-shared-default-priority-2",
          "type": "priorityLevels",
          "attributes": {
            "localTables": "50000000000",
            "cpu": "20",
            "globalCasuser": "50000000000",
            "globalCasuserHdfs": "50000000000"
          }
        },
        {
          "version": 1,
          "name": "cas-shared-default-priority-3",
          "type": "priorityLevels",
          "attributes": {
            "cpu": "30",
            "localTables": "10000000000",
            "globalCasuser": "10000000000",
            "globalCasuserHdfs": "10000000000"
          }
        },
        {
          "version": 1,
          "name": "globalCaslibs",
          "type": "globalCaslibs",
          "attributes": {
            "_ALL_": "400000000000",
            "HPS": "100000000000",
            "Public": "200000000000"
          }
        }
      ],
      "limit": 10,
      "version": 2
    }
    
    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. error2
    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

    Add a policy

    Code samples

    # You can also use wget
    curl -X POST https://www.example.com/casManagement/servers/{serverName}/policies \
      -H 'Content-Type: application/vnd.sas.cas.server.policy+json' \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.cas.server.policy+json'
    
    
    var headers = {
      'Content-Type':'application/vnd.sas.cas.server.policy+json',
      'Accept':'application/vnd.sas.cas.server.policy+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/policies',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.cas.server.policy+json',
      'Accept': 'application/vnd.sas.cas.server.policy+json'
    }
    
    r = requests.post('https://www.example.com/casManagement/servers/{serverName}/policies', params={
    
    }, 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://www.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

    {
      "version": 1,
      "name": "cas-shared-default-priority-3",
      "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"
        }
      ]
    }
    
    Parameters
    Parameter In Type Required Description
    serverName path string true Server name in which the policy is to be created.
    body body casServerPolicy true

    Example responses

    201

    {
      "version": 1,
      "name": "cas-shared-default-priority-3",
      "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"
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    201 Created Information about the created policy was returned. casServerPolicy
    400 Bad Request An error occurred. error2
    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 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://www.example.com/casManagement/servers/{serverName}/policies/{policyName} \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.cas.server.policy.summary+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.cas.server.policy.summary+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/policies/{policyName}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.cas.server.policy.summary+json'
    }
    
    r = requests.get('https://www.example.com/casManagement/servers/{serverName}/policies/{policyName}', params={
    
    }, 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://www.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
    Parameter 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.

    Example responses

    200

    {
      "version": 1,
      "name": "cas-shared-default-priority-3",
      "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.summary"
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The requested information about the policy was returned. casServerPolicySummary
    400 Bad Request An error occurred. error2
    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

    Update a policy

    Code samples

    # You can also use wget
    curl -X PUT https://www.example.com/casManagement/servers/{serverName}/policies/{policyName} \
      -H 'Content-Type: application/vnd.sas.cas.server.policy+json' \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.cas.server.policy+json'
    
    
    var headers = {
      'Content-Type':'application/vnd.sas.cas.server.policy+json',
      'Accept':'application/vnd.sas.cas.server.policy+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/policies/{policyName}',
      method: 'put',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.cas.server.policy+json',
      'Accept': 'application/vnd.sas.cas.server.policy+json'
    }
    
    r = requests.put('https://www.example.com/casManagement/servers/{serverName}/policies/{policyName}', params={
    
    }, 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://www.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

    {
      "version": 1,
      "name": "cas-shared-default-priority-3",
      "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"
        }
      ]
    }
    
    Parameters
    Parameter In Type Required Description
    serverName path string true Server name for which the policy information is being updated.
    body body casServerPolicy true Fields to update in the existing policy.

    Example responses

    200

    {
      "version": 1,
      "name": "cas-shared-default-priority-3",
      "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"
        }
      ]
    }
    
    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. error2
    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

    Remove a policy

    Code samples

    # You can also use wget
    curl -X DELETE https://www.example.com/casManagement/servers/{serverName}/policies/{policyName} \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: */*'
    
    
    var headers = {
      'Accept':'*/*'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/policies/{policyName}',
      method: 'delete',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': '*/*'
    }
    
    r = requests.delete('https://www.example.com/casManagement/servers/{serverName}/policies/{policyName}', params={
    
    }, 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://www.example.com/casManagement/servers/{serverName}/policies/{policyName}", data)
        req.Header = headers
    
        client :=