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.

    The tables represented in the examples do not represent exclusively a CAS tables or CAS source file/table. Tables in this context are a combined representation of a CAS table name and the source with which it is associated (whether the CAS table has been loaded or not).

    Note that some resource links might refer to other paths (such as /casProxy, /dataSources, /dataTables). These links are operational only if the corresponding service has been deployed at the referenced location.

    Terminology

    CAS server

    the controller process providing access to Cloud Analytic Services functionality. A CAS server houses sessions and libraries.

    CAS policy

    settings for managing resource utilization in a CAS server.

    CAS node

    the controller or worker process providing Cloud Analytic Services functionality.

    CAS session

    a user-specific set of processes running in the context of a CAS server, in which the user performs work.

    Caslib

    a logical construct within CAS that provides an organizational unit for loaded (in-memory) CAS tables, as well as access to data source content that can be made available in CAS.

    CAS source

    a file or table accessible via a caslib's data source.

    CAS table

    rectangular data that has been made available in a caslib.

    CAS column

    a column of rectangular data in a CAS table.

    format library

    a collection of formats that the server uses when an analysis is performed according to formatted values. CAS formats must reside in a format library in CAS. A CAS format library is named and can be temporary for the duration of the session, global for the duration of the server, or persisted in a table or a disk file (item store).

    provider

    a service that has registered itself as a provider of data. The casManagement API participates as a CAS-specific provider for the dataSources and dataTables APIs.

    Error Codes

    HTTP Status Code Error Code Description
    304 12212 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 the CAS Management service is running or not. This is identical to a GET request but returns only the HTTP headers with no document body.

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

    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 can be less if the collection has been exhausted. Defaults to 10.
    filter query string(filter-criteria) false Filter criteria for returned items. The valid filter fields are the first-level fields in each item. The supported functions are and, or, not, eq, lt, le, gt, ge, contains, startsWith, endsWith and isNull. Some sample queries:
    • 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 data connectors for a CAS server

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/casManagement/servers/{serverName}/dataConnectors \
      -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}/dataConnectors',
      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}/dataConnectors', 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}/dataConnectors", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /servers/{serverName}/dataConnectors

    Returns a collection of data connectors for the respective CAS server. Standard paging, filtering, and sorting options are provided. The members of this collection use the application/vnd.sas.data.engine media type representation.

    Parameters
    Parameter In Type Required Description
    serverName path string true The CAS server name for which to obtain data connectors.
    start query integer false The starting index of the first data connector in a page. Defaults to 0.
    limit query integer false Maximum number of data connectors to return in this page of results. The actual number of returned data connectors might be less if the collection has been exhausted. Defaults to 10.
    filter query string(filter-criteria) false Filter criteria for returned data connectors.
    The valid filter fields are the top-level fields returned for items in the collection. For example, name, nickname, legalName, and so on. The supported functions are and, or, not, eq, lt, le, gt, ge, contains, startsWith, endsWith and isNull. Sample queries include the following:
    • Search by nickname starting with: filter=startsWith(nickname, 'TERA')
    • Search by name: filter=eq(name, 'impala')
    • Search for multiple items: filter=in(name, 'hdfs', 'dnfs')
    • Search by name ending with: filter=endsWith(name, 'fs')
    sortBy query string(sort-criteria) false Sort returned items. The sort criteria supports the top-level fields returned for items in the collection such as name, nickname, and legalName. Sample sorts include the following:
    • Sort ascending by name: sortBy=name:ascending
    • Sort descending by nickname: sortBy=nickname:descending

    The default sort is by name in ascending order.
    sessionId query string false Session ID to use when connecting to retrieve the list of data connectors. If not specified, a temporary session will be used.
    Detailed descriptions

    limit: Maximum number of data connectors to return in this page of results. The actual number of returned data connectors might be less if the collection has been exhausted. Defaults to 10.

    Example responses

    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/dataConnectors?sessionId&start=0&limit=100",
          "uri": "/casManagement/servers/cas-shared-default/dataConnectors?sessionId&start=0&limit=100",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.data.engine"
        },
        {
          "method": "GET",
          "rel": "collection",
          "href": "/casManagement/servers/cas-shared-default/dataConnectors",
          "uri": "/casManagement/servers/cas-shared-default/dataConnectors",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.data.engine"
        }
      ],
      "name": "dataConnectors",
      "accept": "application/vnd.sas.data.engine",
      "count": 15,
      "items": [
        {
          "name": "db2",
          "nickname": "DB2",
          "legalName": "SAS Data Connector to DB2",
          "providerId": "cas",
          "dataSourceId": "cas-shared-default",
          "licensed": true,
          "hasDefinition": true,
          "links": [
            {
              "method": "GET",
              "rel": "up",
              "href": "/casManagement/servers/cas-shared-default/dataConnectors",
              "uri": "/casManagement/servers/cas-shared-default/dataConnectors",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.data.engine"
            },
            {
              "method": "GET",
              "rel": "self",
              "href": "/casManagement/servers/cas-shared-default/dataConnectors/db2",
              "uri": "/casManagement/servers/cas-shared-default/dataConnectors/db2",
              "type": "application/vnd.sas.data.engine"
            },
            {
              "method": "GET",
              "rel": "definition",
              "href": "/casManagement/servers/cas-shared-default/dataConnectors/db2/definition",
              "uri": "/casManagement/servers/cas-shared-default/dataConnectors/db2/definition",
              "type": "application/json"
            }
          ],
          "version": 1
        },
        {
          "name": "default",
          "nickname": "DEFAULT",
          "providerId": "cas",
          "dataSourceId": "cas-shared-default",
          "licensed": true,
          "hasDefinition": true,
          "links": [
            {
              "method": "GET",
              "rel": "up",
              "href": "/casManagement/servers/cas-shared-default/dataConnectors",
              "uri": "/casManagement/servers/cas-shared-default/dataConnectors",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.data.engine"
            },
            {
              "method": "GET",
              "rel": "self",
              "href": "/casManagement/servers/cas-shared-default/dataConnectors/default",
              "uri": "/casManagement/servers/cas-shared-default/dataConnectors/default",
              "type": "application/vnd.sas.data.engine"
            },
            {
              "method": "GET",
              "rel": "definition",
              "href": "/casManagement/servers/cas-shared-default/dataConnectors/default/definition",
              "uri": "/casManagement/servers/cas-shared-default/dataConnectors/default/definition",
              "type": "application/json"
            }
          ],
          "version": 1
        },
        {
          "name": "dnfs",
          "nickname": "DNFS",
          "providerId": "cas",
          "dataSourceId": "cas-shared-default",
          "licensed": true,
          "hasDefinition": true,
          "links": [
            {
              "method": "GET",
              "rel": "up",
              "href": "/casManagement/servers/cas-shared-default/dataConnectors",
              "uri": "/casManagement/servers/cas-shared-default/dataConnectors",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.data.engine"
            },
            {
              "method": "GET",
              "rel": "self",
              "href": "/casManagement/servers/cas-shared-default/dataConnectors/dnfs",
              "uri": "/casManagement/servers/cas-shared-default/dataConnectors/dnfs",
              "type": "application/vnd.sas.data.engine"
            },
            {
              "method": "GET",
              "rel": "definition",
              "href": "/casManagement/servers/cas-shared-default/dataConnectors/dnfs/definition",
              "uri": "/casManagement/servers/cas-shared-default/dataConnectors/dnfs/definition",
              "type": "application/json"
            }
          ],
          "version": 1
        },
        {
          "name": "esp",
          "nickname": "ESP",
          "providerId": "cas",
          "dataSourceId": "cas-shared-default",
          "licensed": true,
          "hasDefinition": true,
          "links": [
            {
              "method": "GET",
              "rel": "up",
              "href": "/casManagement/servers/cas-shared-default/dataConnectors",
              "uri": "/casManagement/servers/cas-shared-default/dataConnectors",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.data.engine"
            },
            {
              "method": "GET",
              "rel": "self",
              "href": "/casManagement/servers/cas-shared-default/dataConnectors/esp",
              "uri": "/casManagement/servers/cas-shared-default/dataConnectors/esp",
              "type": "application/vnd.sas.data.engine"
            },
            {
              "method": "GET",
              "rel": "definition",
              "href": "/casManagement/servers/cas-shared-default/dataConnectors/esp/definition",
              "uri": "/casManagement/servers/cas-shared-default/dataConnectors/esp/definition",
              "type": "application/json"
            }
          ],
          "version": 1
        },
        {
          "name": "hadoop",
          "nickname": "HADOOP",
          "providerId": "cas",
          "dataSourceId": "cas-shared-default",
          "licensed": true,
          "hasDefinition": true,
          "links": [
            {
              "method": "GET",
              "rel": "up",
              "href": "/casManagement/servers/cas-shared-default/dataConnectors",
              "uri": "/casManagement/servers/cas-shared-default/dataConnectors",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.data.engine"
            },
            {
              "method": "GET",
              "rel": "self",
              "href": "/casManagement/servers/cas-shared-default/dataConnectors/hadoop",
              "uri": "/casManagement/servers/cas-shared-default/dataConnectors/hadoop",
              "type": "application/vnd.sas.data.engine"
            },
            {
              "method": "GET",
              "rel": "definition",
              "href": "/casManagement/servers/cas-shared-default/dataConnectors/hadoop/definition",
              "uri": "/casManagement/servers/cas-shared-default/dataConnectors/hadoop/definition",
              "type": "application/json"
            }
          ],
          "version": 1
        },
        {
          "name": "hdfs",
          "nickname": "HDFS",
          "providerId": "cas",
          "dataSourceId": "cas-shared-default",
          "licensed": true,
          "hasDefinition": true,
          "links": [
            {
              "method": "GET",
              "rel": "up",
              "href": "/casManagement/servers/cas-shared-default/dataConnectors",
              "uri": "/casManagement/servers/cas-shared-default/dataConnectors",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.data.engine"
            },
            {
              "method": "GET",
              "rel": "self",
              "href": "/casManagement/servers/cas-shared-default/dataConnectors/hdfs",
              "uri": "/casManagement/servers/cas-shared-default/dataConnectors/hdfs",
              "type": "application/vnd.sas.data.engine"
            },
            {
              "method": "GET",
              "rel": "definition",
              "href": "/casManagement/servers/cas-shared-default/dataConnectors/hdfs/definition",
              "uri": "/casManagement/servers/cas-shared-default/dataConnectors/hdfs/definition",
              "type": "application/json"
            }
          ],
          "version": 1
        },
        {
          "name": "impala",
          "nickname": "IMPALA",
          "legalName": "SAS Data Connect to Impala",
          "providerId": "cas",
          "dataSourceId": "cas-shared-default",
          "licensed": true,
          "hasDefinition": true,
          "links": [
            {
              "method": "GET",
              "rel": "up",
              "href": "/casManagement/servers/cas-shared-default/dataConnectors",
              "uri": "/casManagement/servers/cas-shared-default/dataConnectors",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.data.engine"
            },
            {
              "method": "GET",
              "rel": "self",
              "href": "/casManagement/servers/cas-shared-default/dataConnectors/impala",
              "uri": "/casManagement/servers/cas-shared-default/dataConnectors/impala",
              "type": "application/vnd.sas.data.engine"
            },
            {
              "method": "GET",
              "rel": "definition",
              "href": "/casManagement/servers/cas-shared-default/dataConnectors/impala/definition",
              "uri": "/casManagement/servers/cas-shared-default/dataConnectors/impala/definition",
              "type": "application/json"
            }
          ],
          "version": 1
        },
        {
          "name": "lasr",
          "nickname": "LASR",
          "providerId": "cas",
          "dataSourceId": "cas-shared-default",
          "licensed": true,
          "hasDefinition": true,
          "links": [
            {
              "method": "GET",
              "rel": "up",
              "href": "/casManagement/servers/cas-shared-default/dataConnectors",
              "uri": "/casManagement/servers/cas-shared-default/dataConnectors",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.data.engine"
            },
            {
              "method": "GET",
              "rel": "self",
              "href": "/casManagement/servers/cas-shared-default/dataConnectors/lasr",
              "uri": "/casManagement/servers/cas-shared-default/dataConnectors/lasr",
              "type": "application/vnd.sas.data.engine"
            },
            {
              "method": "GET",
              "rel": "definition",
              "href": "/casManagement/servers/cas-shared-default/dataConnectors/lasr/definition",
              "uri": "/casManagement/servers/cas-shared-default/dataConnectors/lasr/definition",
              "type": "application/json"
            }
          ],
          "version": 1
        },
        {
          "name": "odbc",
          "nickname": "ODBC",
          "legalName": "SAS Data Connect to ODBC",
          "providerId": "cas",
          "dataSourceId": "cas-shared-default",
          "licensed": true,
          "hasDefinition": true,
          "links": [
            {
              "method": "GET",
              "rel": "up",
              "href": "/casManagement/servers/cas-shared-default/dataConnectors",
              "uri": "/casManagement/servers/cas-shared-default/dataConnectors",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.data.engine"
            },
            {
              "method": "GET",
              "rel": "self",
              "href": "/casManagement/servers/cas-shared-default/dataConnectors/odbc",
              "uri": "/casManagement/servers/cas-shared-default/dataConnectors/odbc",
              "type": "application/vnd.sas.data.engine"
            },
            {
              "method": "GET",
              "rel": "definition",
              "href": "/casManagement/servers/cas-shared-default/dataConnectors/odbc/definition",
              "uri": "/casManagement/servers/cas-shared-default/dataConnectors/odbc/definition",
              "type": "application/json"
            }
          ],
          "version": 1
        },
        {
          "name": "oracle",
          "nickname": "ORACLE",
          "legalName": "Data Connector to Oracle",
          "providerId": "cas",
          "dataSourceId": "cas-shared-default",
          "licensed": true,
          "hasDefinition": true,
          "links": [
            {
              "method": "GET",
              "rel": "up",
              "href": "/casManagement/servers/cas-shared-default/dataConnectors",
              "uri": "/casManagement/servers/cas-shared-default/dataConnectors",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.data.engine"
            },
            {
              "method": "GET",
              "rel": "self",
              "href": "/casManagement/servers/cas-shared-default/dataConnectors/oracle",
              "uri": "/casManagement/servers/cas-shared-default/dataConnectors/oracle",
              "type": "application/vnd.sas.data.engine"
            },
            {
              "method": "GET",
              "rel": "definition",
              "href": "/casManagement/servers/cas-shared-default/dataConnectors/oracle/definition",
              "uri": "/casManagement/servers/cas-shared-default/dataConnectors/oracle/definition",
              "type": "application/json"
            }
          ],
          "version": 1
        },
        {
          "name": "path",
          "nickname": "PATH",
          "providerId": "cas",
          "dataSourceId": "cas-shared-default",
          "licensed": true,
          "hasDefinition": true,
          "links": [
            {
              "method": "GET",
              "rel": "up",
              "href": "/casManagement/servers/cas-shared-default/dataConnectors",
              "uri": "/casManagement/servers/cas-shared-default/dataConnectors",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.data.engine"
            },
            {
              "method": "GET",
              "rel": "self",
              "href": "/casManagement/servers/cas-shared-default/dataConnectors/path",
              "uri": "/casManagement/servers/cas-shared-default/dataConnectors/path",
              "type": "application/vnd.sas.data.engine"
            },
            {
              "method": "GET",
              "rel": "definition",
              "href": "/casManagement/servers/cas-shared-default/dataConnectors/path/definition",
              "uri": "/casManagement/servers/cas-shared-default/dataConnectors/path/definition",
              "type": "application/json"
            }
          ],
          "version": 1
        },
        {
          "name": "postgres",
          "nickname": "POSTGRES",
          "legalName": "Data Connector to PostgreSQL",
          "providerId": "cas",
          "dataSourceId": "cas-shared-default",
          "licensed": true,
          "hasDefinition": true,
          "links": [
            {
              "method": "GET",
              "rel": "up",
              "href": "/casManagement/servers/cas-shared-default/dataConnectors",
              "uri": "/casManagement/servers/cas-shared-default/dataConnectors",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.data.engine"
            },
            {
              "method": "GET",
              "rel": "self",
              "href": "/casManagement/servers/cas-shared-default/dataConnectors/postgres",
              "uri": "/casManagement/servers/cas-shared-default/dataConnectors/postgres",
              "type": "application/vnd.sas.data.engine"
            },
            {
              "method": "GET",
              "rel": "definition",
              "href": "/casManagement/servers/cas-shared-default/dataConnectors/postgres/definition",
              "uri": "/casManagement/servers/cas-shared-default/dataConnectors/postgres/definition",
              "type": "application/json"
            }
          ],
          "version": 1
        },
        {
          "name": "redshift",
          "nickname": "REDSHIFT",
          "legalName": "Data Connector to Amazon Redshift",
          "providerId": "cas",
          "dataSourceId": "cas-shared-default",
          "licensed": true,
          "hasDefinition": true,
          "links": [
            {
              "method": "GET",
              "rel": "up",
              "href": "/casManagement/servers/cas-shared-default/dataConnectors",
              "uri": "/casManagement/servers/cas-shared-default/dataConnectors",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.data.engine"
            },
            {
              "method": "GET",
              "rel": "self",
              "href": "/casManagement/servers/cas-shared-default/dataConnectors/redshift",
              "uri": "/casManagement/servers/cas-shared-default/dataConnectors/redshift",
              "type": "application/vnd.sas.data.engine"
            },
            {
              "method": "GET",
              "rel": "definition",
              "href": "/casManagement/servers/cas-shared-default/dataConnectors/redshift/definition",
              "uri": "/casManagement/servers/cas-shared-default/dataConnectors/redshift/definition",
              "type": "application/json"
            }
          ],
          "version": 1
        },
        {
          "name": "s3",
          "nickname": "S3",
          "providerId": "cas",
          "dataSourceId": "cas-shared-default",
          "licensed": true,
          "hasDefinition": true,
          "links": [
            {
              "method": "GET",
              "rel": "up",
              "href": "/casManagement/servers/cas-shared-default/dataConnectors",
              "uri": "/casManagement/servers/cas-shared-default/dataConnectors",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.data.engine"
            },
            {
              "method": "GET",
              "rel": "self",
              "href": "/casManagement/servers/cas-shared-default/dataConnectors/s3",
              "uri": "/casManagement/servers/cas-shared-default/dataConnectors/s3",
              "type": "application/vnd.sas.data.engine"
            },
            {
              "method": "GET",
              "rel": "definition",
              "href": "/casManagement/servers/cas-shared-default/dataConnectors/s3/definition",
              "uri": "/casManagement/servers/cas-shared-default/dataConnectors/s3/definition",
              "type": "application/json"
            }
          ],
          "version": 1
        },
        {
          "name": "teradata",
          "nickname": "TERADATA",
          "legalName": "SAS Data Connect to Teradata",
          "providerId": "cas",
          "dataSourceId": "cas-shared-default",
          "licensed": true,
          "hasDefinition": true,
          "links": [
            {
              "method": "GET",
              "rel": "up",
              "href": "/casManagement/servers/cas-shared-default/dataConnectors",
              "uri": "/casManagement/servers/cas-shared-default/dataConnectors",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.data.engine"
            },
            {
              "method": "GET",
              "rel": "self",
              "href": "/casManagement/servers/cas-shared-default/dataConnectors/teradata",
              "uri": "/casManagement/servers/cas-shared-default/dataConnectors/teradata",
              "type": "application/vnd.sas.data.engine"
            },
            {
              "method": "GET",
              "rel": "definition",
              "href": "/casManagement/servers/cas-shared-default/dataConnectors/teradata/definition",
              "uri": "/casManagement/servers/cas-shared-default/dataConnectors/teradata/definition",
              "type": "application/json"
            }
          ],
          "version": 1
        }
      ],
      "limit": 100,
      "version": 2
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. engineCollection
    400 Bad Request The request was invalid. An invalid filter or combination of request parameters was provided. error2
    404 Not Found No data connector exists at the requested path. error2

    Get a single data connector

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/casManagement/servers/{serverName}/dataConnectors/{dataConnectorName} \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.data.engine+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.data.engine+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/dataConnectors/{dataConnectorName}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.data.engine+json'
    }
    
    r = requests.get('https://www.example.com/casManagement/servers/{serverName}/dataConnectors/{dataConnectorName}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.data.engine+json"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://www.example.com/casManagement/servers/{serverName}/dataConnectors/{dataConnectorName}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /servers/{serverName}/dataConnectors/{dataConnectorName}

    Returns information about a single data connector based on its unique name.

    Parameters
    Parameter In Type Required Description
    serverName path string true The CAS server name for which to get the data connector.
    dataConnectorName path string true The unique name of this data connector within this CAS server.
    sessionId query string false Session ID to use when connecting to retrieve the data connector. If not specified, a temporary session is used.

    Example responses

    200

    {
      "name": "db2",
      "nickname": "DB2",
      "legalName": "SAS Data Connector to DB2",
      "providerId": "cas",
      "dataSourceId": "cas-shared-default",
      "licensed": true,
      "hasDefinition": true,
      "links": [
        {
          "method": "GET",
          "rel": "up",
          "href": "/casManagement/servers/cas-shared-default/dataConnectors",
          "uri": "/casManagement/servers/cas-shared-default/dataConnectors",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.data.engine"
        },
        {
          "method": "GET",
          "rel": "self",
          "href": "/casManagement/servers/cas-shared-default/dataConnectors/db2",
          "uri": "/casManagement/servers/cas-shared-default/dataConnectors/db2",
          "type": "application/vnd.sas.data.engine"
        },
        {
          "method": "GET",
          "rel": "definition",
          "href": "/casManagement/servers/cas-shared-default/dataConnectors/db2/definition",
          "uri": "/casManagement/servers/cas-shared-default/dataConnectors/db2/definition",
          "type": "application/json"
        }
      ],
      "version": 1
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. engine
    404 Not Found No CAS server or data connector exists at the requested path. error2

    Check data connector availability

    Code samples

    # You can also use wget
    curl -X HEAD https://www.example.com/casManagement/servers/{serverName}/dataConnectors/{dataConnectorName} \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.data.engine+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.data.engine+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/dataConnectors/{dataConnectorName}',
      method: 'head',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.data.engine+json'
    }
    
    r = requests.head('https://www.example.com/casManagement/servers/{serverName}/dataConnectors/{dataConnectorName}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.data.engine+json"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("HEAD", "https://www.example.com/casManagement/servers/{serverName}/dataConnectors/{dataConnectorName}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    HEAD /servers/{serverName}/dataConnectors/{dataConnectorName}

    Returns the headers that the corresponding GET returns. Clients use this to determine whether the data connector exists.

    Parameters
    Parameter In Type Required Description
    serverName path string true The CAS server name for which to get the data connector.
    dataConnectorName path string true The unique name of this data connector within this CAS server.
    sessionId query string false Session ID to use when connecting to retrieve the data connector. If not specified, a temporary session is used.

    Example responses

    200

    "Empty Response"
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. emptyResponse
    404 Not Found No CAS server of data connector exists at the requested path. None

    Get data connector definition

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/casManagement/servers/{serverName}/dataConnectors/{dataConnectorName}/definition \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/schema+json'
    
    
    var headers = {
      'Accept':'application/schema+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/dataConnectors/{dataConnectorName}/definition',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/schema+json'
    }
    
    r = requests.get('https://www.example.com/casManagement/servers/{serverName}/dataConnectors/{dataConnectorName}/definition', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/schema+json"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://www.example.com/casManagement/servers/{serverName}/dataConnectors/{dataConnectorName}/definition", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /servers/{serverName}/dataConnectors/{dataConnectorName}/definition

    Returns the definition of the data connector as application or schema+json. This definition includes all available data connector options.

    Parameters
    Parameter In Type Required Description
    serverName path string true The CAS server name for which to get the data connector.
    dataConnectorName path string true The unique name of this data connector within this CAS server.
    sessionId query string false Session ID to use when connecting to retrieve the data connector. If not specified, a temporary session is used.

    Example responses

    200

    {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "title": "DNFS",
      "description": "dnfs",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "engineName"
      ],
      "properties": {
        "engineName": {
          "title": "DNFS",
          "type": "string",
          "default": "DNFS",
          "enum": [
            "DNFS"
          ]
        },
        "general": {
          "title": "General options",
          "description": "General options for this Caslib.",
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "path": {
              "type": "string",
              "title": "Path",
              "description": "specifies data source-specific information.  For PATH, DNFS and HDFS, this is a file system path.",
              "default": "",
              "properties": {
                "isUserName": {
                  "enum": [
                    false
                  ]
                },
                "isPassword": {
                  "enum": [
                    false
                  ]
                },
                "isPath": {
                  "enum": [
                    false
                  ]
                },
                "isHideValue": {
                  "enum": [
                    false
                  ]
                },
                "isRequired": {
                  "enum": [
                    false
                  ]
                },
                "isCommon": {
                  "enum": [
                    true
                  ]
                },
                "toolTip": {
                  "enum": [
                    "Specifies data source-specific information.  For PATH, DNFS and HDFS, this is a file system path."
                  ]
                }
              }
            },
            "hidden": {
              "type": "boolean",
              "title": "Hidden",
              "description": "when set to True, the Caslib is added as a hidden Caslib.",
              "default": false,
              "properties": {
                "isHideValue": {
                  "enum": [
                    false
                  ]
                },
                "isRequired": {
                  "enum": [
                    false
                  ]
                },
                "isCommon": {
                  "enum": [
                    true
                  ]
                },
                "toolTip": {
                  "enum": [
                    "When set to True, the Caslib is added as a hidden Caslib."
                  ]
                }
              }
            },
            "transient": {
              "type": "boolean",
              "title": "Transient",
              "description": "when set to True, the Caslib is added as a transient Caslib.",
              "default": false,
              "properties": {
                "isHideValue": {
                  "enum": [
                    false
                  ]
                },
                "isRequired": {
                  "enum": [
                    false
                  ]
                },
                "isCommon": {
                  "enum": [
                    true
                  ]
                },
                "toolTip": {
                  "enum": [
                    "When set to True, the Caslib is added as a transient Caslib."
                  ]
                }
              }
            },
            "session": {
              "type": "boolean",
              "title": "Session scope",
              "description": "when set to True, the Caslib is scoped to the current session only. Tables that you load in this session cannot be accessed from other sessions. If you specify False, then the Caslib is visible to other sessions, subject to access controls.",
              "default": true,
              "properties": {
                "isHideValue": {
                  "enum": [
                    false
                  ]
                },
                "isRequired": {
                  "enum": [
                    false
                  ]
                },
                "isCommon": {
                  "enum": [
                    true
                  ]
                },
                "toolTip": {
                  "enum": [
                    "When set to True, the Caslib is scoped to the current session only. Tables that you load in this session cannot be accessed from other sessions. If you specify False, then the Caslib is visible to other sessions, subject to access controls."
                  ]
                }
              }
            },
            "name": {
              "type": "string",
              "title": "Caslib",
              "description": "specifies the name of the Caslib to add.",
              "properties": {
                "isUserName": {
                  "enum": [
                    false
                  ]
                },
                "isPassword": {
                  "enum": [
                    false
                  ]
                },
                "isPath": {
                  "enum": [
                    false
                  ]
                },
                "isHideValue": {
                  "enum": [
                    false
                  ]
                },
                "isRequired": {
                  "enum": [
                    true
                  ]
                },
                "isCommon": {
                  "enum": [
                    true
                  ]
                },
                "toolTip": {
                  "enum": [
                    "Specifies the name of the Caslib to add."
                  ]
                }
              }
            },
            "description": {
              "type": "string",
              "title": "Description",
              "description": "specifies a description of the Caslib.",
              "default": "",
              "properties": {
                "isUserName": {
                  "enum": [
                    false
                  ]
                },
                "isPassword": {
                  "enum": [
                    false
                  ]
                },
                "isPath": {
                  "enum": [
                    false
                  ]
                },
                "isHideValue": {
                  "enum": [
                    false
                  ]
                },
                "isRequired": {
                  "enum": [
                    false
                  ]
                },
                "isCommon": {
                  "enum": [
                    true
                  ]
                },
                "toolTip": {
                  "enum": [
                    "Specifies a description of the Caslib."
                  ]
                }
              }
            },
            "createDirectory": {
              "type": "boolean",
              "title": "Create directory",
              "description": "when set to True, the server attempts to create the directory for the Caslib.",
              "default": false,
              "properties": {
                "isHideValue": {
                  "enum": [
                    false
                  ]
                },
                "isRequired": {
                  "enum": [
                    false
                  ]
                },
                "isCommon": {
                  "enum": [
                    true
                  ]
                },
                "toolTip": {
                  "enum": [
                    "When set to True, the server attempts to create the directory for the Caslib."
                  ]
                }
              }
            },
            "permission": {
              "type": "string",
              "title": "Permission",
              "description": "specifies the host access controls on the Caslib when directory creation is requested.",
              "enum": [
                "GroupRead",
                "GroupWrite",
                "GroupWritePublicRead",
                "Private",
                "PublicRead",
                "PublicWrite"
              ],
              "properties": {
                "isUserName": {
                  "enum": [
                    false
                  ]
                },
                "isPassword": {
                  "enum": [
                    false
                  ]
                },
                "isPath": {
                  "enum": [
                    false
                  ]
                },
                "isHideValue": {
                  "enum": [
                    false
                  ]
                },
                "isRequired": {
                  "enum": [
                    false
                  ]
                },
                "isCommon": {
                  "enum": [
                    true
                  ]
                },
                "toolTip": {
                  "enum": [
                    "Specifies the host access controls on the Caslib when directory creation is requested."
                  ]
                }
              }
            },
            "subDirectories": {
              "type": "boolean",
              "title": "Subdirectories",
              "description": "when set to True, tables and files in subdirectories of the path specified in the Caslib definition are accessible from the Caslib.",
              "default": false,
              "properties": {
                "isHideValue": {
                  "enum": [
                    false
                  ]
                },
                "isRequired": {
                  "enum": [
                    false
                  ]
                },
                "isCommon": {
                  "enum": [
                    true
                  ]
                },
                "toolTip": {
                  "enum": [
                    "When set to True, tables and files in subdirectories of the path specified in the Caslib definition are accessible from the Caslib."
                  ]
                }
              }
            },
            "activeOnAdd": {
              "type": "boolean",
              "title": "Active on add",
              "description": "when set to True, the new Caslib becomes the active Caslib.",
              "default": true,
              "properties": {
                "isHideValue": {
                  "enum": [
                    false
                  ]
                },
                "isRequired": {
                  "enum": [
                    false
                  ]
                },
                "isCommon": {
                  "enum": [
                    true
                  ]
                },
                "toolTip": {
                  "enum": [
                    "When set to True, the new Caslib becomes the active Caslib."
                  ]
                }
              }
            }
          }
        },
        "datasource": {
          "title": "Data source options",
          "description": "Data source options for this Caslib.",
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "srcType": {
              "type": "string",
              "title": "srcType",
              "description": "",
              "enum": [
                "dnfs"
              ],
              "properties": {
                "isUserName": {
                  "enum": [
                    false
                  ]
                },
                "isPassword": {
                  "enum": [
                    false
                  ]
                },
                "isPath": {
                  "enum": [
                    false
                  ]
                },
                "isHideValue": {
                  "enum": [
                    false
                  ]
                },
                "isRequired": {
                  "enum": [
                    true
                  ]
                },
                "isCommon": {
                  "enum": [
                    false
                  ]
                },
                "toolTip": {
                  "enum": [
                    ""
                  ]
                }
              }
            },
            "encryptionPassword": {
              "type": "string",
              "title": "Data encryption password",
              "description": "specifies a password for encrypting or decrypting stored data.",
              "properties": {
                "isUserName": {
                  "enum": [
                    false
                  ]
                },
                "isPassword": {
                  "enum": [
                    true
                  ]
                },
                "isPath": {
                  "enum": [
                    false
                  ]
                },
                "isHideValue": {
                  "enum": [
                    true
                  ]
                },
                "isRequired": {
                  "enum": [
                    false
                  ]
                },
                "isCommon": {
                  "enum": [
                    false
                  ]
                },
                "toolTip": {
                  "enum": [
                    "Specifies a password for encrypting or decrypting stored data."
                  ]
                }
              }
            },
            "encryptionDomain": {
              "type": "string",
              "title": "Encryption domain",
              "description": "specifies the name for a collection of data that is stored with a common encryption password.",
              "properties": {
                "isUserName": {
                  "enum": [
                    false
                  ]
                },
                "isPassword": {
                  "enum": [
                    false
                  ]
                },
                "isPath": {
                  "enum": [
                    false
                  ]
                },
                "isHideValue": {
                  "enum": [
                    false
                  ]
                },
                "isRequired": {
                  "enum": [
                    false
                  ]
                },
                "isCommon": {
                  "enum": [
                    false
                  ]
                },
                "toolTip": {
                  "enum": [
                    "Specifies the name for a collection of data that is stored with a common encryption password."
                  ]
                }
              }
            }
          }
        }
      }
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. engineDefinition
    404 Not Found No CAS server or data connector exists at the requested path. error2

    Check data source definition availability

    Code samples

    # You can also use wget
    curl -X HEAD https://www.example.com/casManagement/servers/{serverName}/dataConnectors/{dataConnectorName}/definition \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/schema+json'
    
    
    var headers = {
      'Accept':'application/schema+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/dataConnectors/{dataConnectorName}/definition',
      method: 'head',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/schema+json'
    }
    
    r = requests.head('https://www.example.com/casManagement/servers/{serverName}/dataConnectors/{dataConnectorName}/definition', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/schema+json"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("HEAD", "https://www.example.com/casManagement/servers/{serverName}/dataConnectors/{dataConnectorName}/definition", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    HEAD /servers/{serverName}/dataConnectors/{dataConnectorName}/definition

    Returns the headers that the corresponding GET returns. Clients might use this to determine whether the data source definition exists.

    Parameters
    Parameter In Type Required Description
    serverName path string true The CAS server name for which to get the data connector.
    dataConnectorName path string true The unique name of this data connector within this CAS server.
    sessionId query string false Session ID to use when connecting to retrieve the data connector. If not specified, a temporary session is used.

    Example responses

    200

    "Empty Response"
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. emptyResponse
    404 Not Found No CAS server or data source definition exists at the requested path. None

    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 can be less if the collection has been exhausted. Defaults to 10.
    filter query string(filter-criteria) false Filter criteria for returned items. The valid filter fields are the first-level fields in each item. The supported functions are and, or, not, eq, lt, le, gt, ge, contains, startsWith, endsWith and isNull. Some sample queries:
    • 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 can be terminated are consistent with the permissions of the user. Normally, only sessions owned by the authenticated user can be ended. If a user has administrative privileges, and has elevated their session to use those privileges (see CAS Access Management microservice), all sessions on the server can be ended.

    Parameters
    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.
    force query string false Forces the termination of a running CAS action for this session. By default, a session does not terminate until all actions have completed.

    Example responses

    400

    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 on the attributes of a given data source, the information is returned as application/vnd.sas.cas.caslib+json, containing key/value pairs as returned from CAS. For specifics on a given Caslib data source type and its attributes, see the CAS libraries documentation. Schema of items returned in the response collection is included below, and are of type application/vnd.sas.cas.caslib+json.

    Parameters
    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 can be less if the collection has been exhausted. Defaults to 10.
    filter query string(filter-criteria) false Filter criteria for returned items. The valid filter fields are the first-level fields in each item. The supported functions are and, or, not, eq, lt, le, gt, ge, contains, startsWith, endsWith and isNull. Some sample queries:
    • 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)",
      "metadataId": "26ea7916-86af-4547-9180-9876512345cc",
      "description": "Personal File System caslib",
      "path": "/u/userId/",
      "scope": "global",
      "type": "PATH",
      "hidden": false,
      "transient": false,
      "version": 1,
      "attributes": {
        "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)",
      "metadataId": "26ea7916-86af-4547-9180-9876512345cc",
      "description": "Personal File System caslib",
      "path": "/u/userId/",
      "scope": "global",
      "type": "PATH",
      "hidden": false,
      "transient": false,
      "version": 1,
      "attributes": {
        "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 returned only 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)",
      "metadataId": "26ea7916-86af-4547-9180-9876512345cc",
      "description": "Personal File System caslib",
      "path": "/u/userId/",
      "scope": "global",
      "type": "PATH",
      "hidden": false,
      "transient": false,
      "version": 1,
      "attributes": {
        "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 returned only 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)",
      "metadataId": "26ea7916-86af-4547-9180-9876512345cc",
      "description": "Personal File System caslib",
      "path": "/u/userId/",
      "scope": "global",
      "type": "PATH",
      "hidden": false,
      "transient": false,
      "version": 1,
      "attributes": {
        "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 the following: * description * path

    Body parameter

    {
      "name": "CASUSER(userId)",
      "metadataId": "26ea7916-86af-4547-9180-9876512345cc",
      "description": "Personal File System caslib",
      "path": "/u/userId/",
      "scope": "global",
      "type": "PATH",
      "hidden": false,
      "transient": false,
      "version": 1,
      "attributes": {
        "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 can be less if the collection has been exhausted. Defaults to 10.
    filter query string(filter-criteria) false Filter criteria for returned items. The valid filter fields are the first-level fields in each item. The supported functions are and, or, not, eq, lt, le, gt, ge, contains, startsWith, endsWith and isNull. A sample query to return only the worker node: filter=eq(role,controller)
    sortBy query string(sort-criteria) false Sort returned items. The sort criteria supports the first-level fields in each item. An example sort: sortBy=ipAddress:descending. The default sort is by name in ascending order.

    Example responses

    200

    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 can 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 refer to both loaded CAS tables as well as unloaded source tables. - For path-based caslibs, the source table shown will be the first matching .sashdat, .sas7bdat, 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 tables that match a particular state. Valid values include loaded (loaded tables) and unloaded (unloaded tables).
    scope query string false Omitting this value includes tables of all scopes. Specifying a value here filters the results to tables that match a particular scope. Valid values include session and global.
    sourcesOnly query boolean false Determines whether source tables should be displayed. Defaults to false.
    excludeItemLinks query boolean false Determines whether item links are excluded from results. Defaults to false.
    start query integer false The starting index of the first item in a page. Defaults to 0.
    limit query integer false Maximum number of items to return in this page of results. The actual number of returned items can be less if the collection has been exhausted. Defaults to 10.
    filter query string(filter-criteria) false Filter criteria for returned items. The valid filter fields are the first-level fields in each item. The supported functions are and, or, not, eq, lt, le, gt, ge, contains, startsWith, endsWith and isNull. Some sample queries:
    • 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 valid only 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 valid only for CSV files. Defaults to true.
    » delimiter body string false Delimiter character. Parameter valid only for CSV files. Defaults to ','.
    » varchars body boolean false Use variable character lengths. Parameter valid only for CSV files. Defaults to true.
    » scanRows body integer(int64) false Number of rows to scan when determining column types. Parameter valid only 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 valid only 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 valid only for CSV files. Defaults to false.
    » containsHeaderRow body boolean false If true, first row is used for column names. Parameter valid only 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 valid only 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 data set. Parameter valid only for sas7bdat files.
    » decryptionKey body string false Key used to decrypt the data file. Parameter valid only 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 valid only 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 valid only 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 valid only 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 can 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 can 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 can be less if the collection has been exhausted. Defaults to 10.
    filter query string(filter-criteria) false Filter criteria for returned items. The valid filter fields are the first-level fields in each item. The supported functions are and, or, not, eq, lt, le, gt, ge, contains, startsWith, endsWith and isNull. Some sample queries:
    • 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 can be less if the collection has been exhausted. Defaults to 10.
    Responses
    Status Meaning Description Schema
    200 OK The requested column's distinct values were returned. None
    404 Not Found The requested CAS server or Caslib does not exist. None
    409 Conflict The request could not be completed due to a conflict with the current state of the resource. Details are included in the response body. None

    Get the frequency for a column

    Code samples

    # You can also use wget
    curl -X GET https://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 can contain global and session tables. Session caslibs can only contain session tables.
    sessionId query string false The optional ID of the session containing the Caslib. If unspecified, only tables in global caslibs will be accessible.
    sortBy query string false The optional order by which to sort the results. If omitted, sorting is not performed. An ascending sort is more performant than a descending sort. Valid sort column names include:  Frequency  and  FmtVar . Valid sort order values include: ascending and descending. When sorting by  Frequency , the  FmtVar  is automatically used as the secondary ascending sort. Sample sortBy values:
    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 are 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 can contain global and session tables. Session caslibs can only contain session tables.
    sessionId query string false The optional ID of the session containing the Caslib. If unspecified, only tables in global caslibs will be accessible.
    sortBy query string false The optional order by which to sort the results. If omitted, sorting is not performed. An ascending sort is more performant than a descending sort. Valid sort column names include:  Frequency   and  FmtVar . Valid sort order values include: ascending and descending. When sorting by  Frequency , the  FmtVar  is automatically used as the secondary ascending sort. Sample sortBy values:
    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 can be less if the collection has been exhausted. Defaults to 10.
    dataTableProviderId path string true See Data Tables API documentation for details about dataTableProviderId. A sample value is cas~fs~serverName~fs~caslibName.
    Accept-Item header string false The desired representation. The Accept-Item options are:
    • 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 tables only in a global scope Defaults to all.
    sources query boolean false Determines whether source tables are included in the results. Defaults to true. Note that a value of false does not imply that loaded tables should be included, only that source tables should be excluded.
    Enumerated Values
    Parameter Value
    Accept-Item application/vnd.sas.data.table.summary+json
    Accept-Item application/vnd.sas.data.table+json

    Example responses

    400

    {
      "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 about dataTableProviderId. A sample value is cas~fs~serverName~fs~caslibName.
    tableName path string true The name of the table.
    loaded query boolean false Determines whether a loaded table is included in the results. Defaults to true. Note that a value of false does not imply that a source table should be included, only that a loaded table should be excluded.
    scope query string false When a loaded table is included, determines which loaded table is returned. Valid values include:
    • all - Includes tables in both session scope and global scope
    • global - Includes tables only in a global scope
    Defaults to all.
    sources query boolean false Determines whether 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 is used.
    start query integer false The starting index of the first item in a page. Defaults to 0.
    limit query integer false Maximum number of items to return in this page of results. The actual number of returned items can be less if the collection has been exhausted. Defaults to 10.
    filter query string(filter-criteria) false Filter criteria for returned items. The valid filter fields are the first-level fields in each item. The supported functions are and, or, not, eq, lt, le, gt, ge, contains, startsWith, endsWith and isNull. A sample query to return only the worker node: filter=eq(role,controller)
    sortBy query string(sort-criteria) false Sort returned items. An example sort: sortBy=level:descending. The default sort is by name in ascending order.

    Example responses

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