NAV Navbar
Home icon
SAS Viya REST APIs
shell javascript python
  • 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.

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

    Base URLs:

    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()
    
    

    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 CAS Management service

    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()
    
    

    HEAD /

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

    Responses

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

    Get a list of CAS servers

    Code samples

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

    GET /servers

    Returns a collection of CAS servers. Supports SAS standard paging query parameters, sorting, and filtering. Schema of items returned in the response collection is included below, and are of type application/vnd.sas.cas.server+json.

    Parameters

    Parameter In Type Required Description
    start query integer false The starting index of the first item in a page. Defaults to 0.
    limit query integer false Maximum number of items to return in this page of results. The actual number of returned items may be less if the collection has been exhausted. Defaults to 10.
    filter query string(filter-criteria) false Filter criteria for returned items. The valid filter fields are the first-level fields in each item. The supported functions are and, or, not, eq, lt, le, gt, ge, contains, startsWith, endsWith and isNull. Some sample queries:
    • Search by name starting with: filter=startsWith(name, 'cas')
    • Search by name: filter=eq(name, 'cas-shared-default')
    • Search for multiple items: filter=in(name, 'cas-shared-default', 'cas-host-default')
    sortBy query string(sort-criteria) false Sort returned items. The sort criteria supports the first-level fields in each item. Some sample sorts:
    • Sort by ascending name: sortBy=name:ascending
    • Sort by descending name: sortBy=name:descending
    The default sort is by name in ascending order.
    excludeItemLinks query boolean false Determines whether item links are excluded from results. Defaults to false.

    Example responses

    200

    {
      "links": [
        {
          "method": "GET",
          "rel": "up",
          "href": "/casManagement/",
          "uri": "/casManagement/",
          "type": "application/vnd.sas.api"
        },
        {
          "method": "GET",
          "rel": "self",
          "href": "/casManagement/servers?excludeItemLinks=false&start=0&limit=10",
          "uri": "/casManagement/servers?excludeItemLinks=false&start=0&limit=10",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.cas.server"
        },
        {
          "method": "GET",
          "rel": "collection",
          "href": "/casManagement/servers",
          "uri": "/casManagement/servers",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.cas.server"
        }
      ],
      "name": "servers",
      "accept": "application/vnd.sas.cas.server",
      "start": 0,
      "count": 1,
      "items": [
        {
          "version": 1,
          "name": "cas-shared-default",
          "description": "controller",
          "host": "myhost.example.com",
          "port": 5570,
          "restPort": 8777,
          "restProtocol": "http",
          "links": [
            {
              "method": "GET",
              "rel": "up",
              "href": "/casManagement/servers",
              "uri": "casManagement/servers",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.cas.server"
            },
            {
              "method": "GET",
              "rel": "self",
              "href": "/casManagement/servers/cas-shared-default",
              "uri": "/casManagement/servers/cas-shared-default",
              "type": "application/vnd.sas.cas.server"
            },
            {
              "method": "GET",
              "rel": "connection",
              "href": "/casManagement/servers/cas-shared-default/connection",
              "uri": "/casManagement/servers/cas-shared-default/connection",
              "type": "application/vnd.sas.cas.server.connection"
            },
            {
              "method": "GET",
              "rel": "state",
              "href": "/casManagement/servers/cas-shared-default/state",
              "uri": "/casManagement/servers/cas-shared-default/state",
              "type": "text/plain"
            },
            {
              "method": "PUT",
              "rel": "updateState",
              "href": "/casManagement/servers/cas-shared-default/state",
              "uri": "/casManagement/servers/cas-shared-default/state",
              "type": "text/plain"
            },
            {
              "method": "GET",
              "rel": "nodes",
              "href": "/casManagement/servers/cas-shared-default/nodes",
              "uri": "/casManagement/servers/cas-shared-default/nodes",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.cas.server.node"
            },
            {
              "method": "GET",
              "rel": "metrics",
              "href": "/casManagement/servers/cas-shared-default/metrics",
              "uri": "/casManagement/servers/cas-shared-default/metrics",
              "type": "application/vnd.sas.cas.server.metrics"
            },
            {
              "method": "GET",
              "rel": "sessions",
              "href": "/casManagement/servers/cas-shared-default/sessions",
              "uri": "/casManagement/servers/cas-shared-default/sessions",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.cas.session.summary"
            },
            {
              "method": "POST",
              "rel": "createSession",
              "href": "/casManagement/servers/cas-shared-default/sessions",
              "uri": "/casManagement/servers/cas-shared-default/sessions",
              "type": "application/vnd.sas.cas.session",
              "responseType": "application/vnd.sas.cas.session"
            },
            {
              "method": "GET",
              "rel": "caslibs",
              "href": "/casManagement/servers/cas-shared-default/caslibs",
              "uri": "/casManagement/servers/cas-shared-default/caslibs",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.cas.caslib"
            },
            {
              "method": "GET",
              "rel": "casProxy",
              "href": "/casProxy/servers/cas-shared-default/cas",
              "uri": "/casProxy/servers/cas-shared-default/cas",
              "type": "application/json"
            },
            {
              "method": "GET",
              "rel": "dataSource",
              "href": "/dataSources/providers/cas/sources/cas-shared-default",
              "uri": "/dataSources/providers/cas/sources/cas-shared-default",
              "type": "application/vnd.sas.data.source"
            }
          ],
          "tags": [
            "appServerEnabled=True",
            "rootLibPath=/opt/sas/viya/config/data/cas/default"
          ]
        }
      ],
      "limit": 10,
      "version": 2
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The request succeeded. The collection of CAS servers was returned. casServerCollection
    400 Bad Request The request was invalid. error2
    404 Not Found The requested CAS server does not exist. None

    Get a CAS server

    Code samples

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

    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 the 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()
    
    

    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()
    
    

    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()
    
    

    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()
    
    

    PUT /servers/{serverName}/state

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

    Parameters

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

    Example responses

    400

    {
      "message": "string",
      "id": "string",
      "errorCode": 0,
      "httpStatusCode": 0,
      "details": [
        "string"
      ],
      "remediation": "string",
      "errors": [
        null
      ],
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "version": 0
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The shutdown was successful. None
    400 Bad Request The request was invalid. error2
    404 Not Found The requested CAS server does not exist. None
    409 Conflict The request could not be completed due to a conflict with the current state of the resource. Details are included in the response body. None

    Get a list of sessions

    Code samples

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

    GET /servers/{serverName}/sessions

    Returns a collection of sessions available on the CAS server. Supports SAS standard paging query parameters. Supports SAS standard paging query parameters, sorting, and filtering. Schema of items returned in the response collection is included below, and are of type application/vnd.sas.cas.session.summary+json. Returned sessions are consistent with the permissions of the user. Normally, only sessions owned by the authenticated user are returned. If a user has administrative privileges, and has elevated their session to use those privileges (see CAS Access Management microservice), all sessions on the server will be visible.

    Parameters

    Parameter In Type Required Description
    serverName path string true Server name for which sessions are being requested.
    start query integer false The starting index of the first item in a page. Defaults to 0.
    limit query integer false Maximum number of items to return in this page of results. The actual number of returned items may be less if the collection has been exhausted. Defaults to 10.
    filter query string(filter-criteria) false Filter criteria for returned items. The valid filter fields are the first-level fields in each item. The supported functions are and, or, not, eq, lt, le, gt, ge, contains, startsWith, endsWith and isNull. Some sample queries:
    • Search by name starting with: filter=startsWith(name, 'CAS')
    • Search by name: filter=eq(name, 'CASUSER')
    • Search for multiple items: filter=in(name, 'CASUSER', 'Public')
    sortBy query string(sort-criteria) false Sort returned items. The sort criteria supports the first-level fields in each item. Some sample sorts:
    • Sort by ascending name: sortBy=name:ascending
    • Sort by descending name: sortBy=name:descending
    The default sort is by name in ascending order.
    excludeItemLinks query boolean false Determines whether item links are excluded from results. Defaults to false.
    sessionId query string false Session ID to use when connecting to retrieve the list of sessions. If not specified, a temporary session will be used.

    Example responses

    200

    {
      "links": [
        {
          "method": "GET",
          "rel": "up",
          "href": "/casManagement/servers/cas-shared-default/",
          "uri": "/casManagement/servers/cas-shared-default/",
          "type": "application/vnd.sas.cas.server"
        },
        {
          "method": "GET",
          "rel": "self",
          "href": "/casManagement/servers/cas-shared-default/sessions?excludeItemLinks=false&start=0&limit=10",
          "uri": "/casManagement/servers/cas-shared-default/sessions?excludeItemLinks=false&start=0&limit=10",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.cas.session.summary"
        },
        {
          "method": "GET",
          "rel": "collection",
          "href": "/casManagement/servers/cas-shared-default/sessions",
          "uri": "/casManagement/servers/cas-shared-default/sessions",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.cas.session.summary"
        }
      ],
      "name": "sessions",
      "accept": "application/vnd.sas.cas.session.summary",
      "start": 0,
      "count": 1,
      "items": [
        {
          "version": 2,
          "id": "3ecd299f-042a-c849-b354-d2961eca5a03",
          "name": "SAS Environment Manager:Tue Sep 19 18:41:55 2017",
          "state": "Connected",
          "authenticationType": "OAuth",
          "owner": "userId",
          "links": [
            {
              "method": "GET",
              "rel": "up",
              "href": "/casManagement/servers/cas-shared-default/sessions",
              "uri": "/casManagement/servers/cas-shared-default/sessions",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.cas.session.summary"
            },
            {
              "method": "GET",
              "rel": "self",
              "href": "/casManagement/servers/cas-shared-default/sessions/3ecd299f-042a-c849-b354-d2961eca5a03",
              "uri": "/casManagement/servers/cas-shared-default/sessions/3ecd299f-042a-c849-b354-d2961eca5a03",
              "type": "application/vnd.sas.cas.session.summary"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/casManagement/servers/cas-shared-default/sessions/3ecd299f-042a-c849-b354-d2961eca5a03",
              "uri": "/casManagement/servers/cas-shared-default/sessions/3ecd299f-042a-c849-b354-d2961eca5a03"
            }
          ]
        }
      ],
      "limit": 10,
      "version": 2
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The list of sessions for the requested CAS server was returned. casSessionCollection
    400 Bad Request The request was invalid. error2
    404 Not Found The requested CAS server does not exist. None
    409 Conflict The request could not be completed due to a conflict with the current state of the resource. Details are included in the response body. None

    Create a session

    Code samples

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

    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()
    
    

    DELETE /servers/{serverName}/sessions/{sessionId}

    Terminates a session. Sessions that may be terminated are consistent with the permissions of the user. Normally, only sessions owned by the authenticated user may be ended. If a user has administrative privileges, and has elevated their session to use those privileges (see CAS Access Management microservice), all sessions on the server may be ended.

    Parameters

    Parameter In Type Required Description
    serverName path string true Server name containing the session.
    sessionId path string true Session ID on which to perform the operation.
    superUserSessionId query string false Session ID being used to delete the specified sessionId with. Has to be a superuser.

    Example responses

    400

    Responses

    Status Meaning Description Schema
    204 No Content The session was terminated. None
    400 Bad Request The request was invalid. error2
    404 Not Found The requested session in the requested server name does not exist. None
    409 Conflict The request could not be completed due to a conflict with the current state of the resource. Details are included in the response body. None

    Get a session

    Code samples

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

    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()
    
    

    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()
    
    

    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()
    
    

    GET /servers/{serverName}/caslibs

    Returns a collection of caslibs available on the CAS server. Supports SAS standard paging query parameters, sorting, and filtering. This is a generic call for obtaining caslib information. Since caslib data source content varies widely depending upon the attributes of a given data source, the information is returned as application/vnd.sas.cas.caslib+json, containing key/value pairs as returned from CAS. For specifics on a given caslib data source type and its attributes, see the CAS libraries documentation. Schema of items returned in the response collection is included below, and are of type application/vnd.sas.cas.caslib+json.

    Parameters

    Parameter In Type Required Description
    serverName path string true Server name for which caslibs are being requested.
    sessionId query string false Session ID (used when session-specific caslibs are also desired in results).
    includeHidden query boolean false Determines whether caslibs marked as hidden should be included in the results. Defaults to false.
    start query integer false The starting index of the first item in a page. Defaults to 0.
    limit query integer false Maximum number of items to return in this page of results. The actual number of returned items may be less if the collection has been exhausted. Defaults to 10.
    filter query string(filter-criteria) false Filter criteria for returned items. The valid filter fields are the first-level fields in each item. The supported functions are and, or, not, eq, lt, le, gt, ge, contains, startsWith, endsWith and isNull. Some sample queries:
    • Search by name starting with: filter=startsWith(name, 'CAS')
    • Search by name: filter=eq(name, 'CASUSER')
    • Search for multiple items: filter=in(name, 'CASUSER', 'Public')
    sortBy query string(sort-criteria) false Sort returned items. The sort criteria supports the first-level fields in each item. Some sample sorts:
    • Sort by ascending name: sortBy=name:ascending
    • Sort by descending name: sortBy=name:descending
    The default sort is by name in ascending order.
    excludeItemLinks query boolean false Determines whether item links are excluded from results. Defaults to false.

    Example responses

    200

    {
      "links": [
        {
          "method": "GET",
          "rel": "up",
          "href": "/casManagement/servers/cas-shared-default/",
          "uri": "/casManagement/servers/cas-shared-default/",
          "type": "application/vnd.sas.cas.server"
        },
        {
          "method": "GET",
          "rel": "self",
          "href": "/casManagement/servers/cas-shared-default/caslibs?excludeItemLinks=false&start=0&limit=10",
          "uri": "/casManagement/servers/cas-shared-default/caslibs?excludeItemLinks=false&start=0&limit=10",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.cas.caslib"
        },
        {
          "method": "GET",
          "rel": "collection",
          "href": "/casManagement/servers/cas-shared-default/caslibs",
          "uri": "/casManagement/servers/cas-shared-default/caslibs",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.cas.caslib"
        },
        {
          "method": "POST",
          "rel": "create",
          "href": "/casManagement/servers/cas-shared-default/caslibs",
          "uri": "/casManagement/servers/cas-shared-default/caslibs",
          "type": "application/vnd.sas.cas.caslib"
        }
      ],
      "name": "caslibs",
      "accept": "application/vnd.sas.cas.caslib",
      "start": 0,
      "count": 3,
      "items": [
        {
          "version": 1,
          "name": "CASUSER(userId)",
          "type": "PATH",
          "description": "Personal File System Caslib",
          "scope": "global",
          "path": "/opt/sas/viya/config/data/cas/default/casuserlibraries/userId/",
          "hidden": false,
          "attributes": {
            "active": true,
            "personal": true,
            "subDirs": true
          },
          "links": [
            {
              "method": "GET",
              "rel": "up",
              "href": "/casManagement/servers/cas-shared-default/caslibs",
              "uri": "/casManagement/servers/cas-shared-default/caslibs",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.cas.caslib"
            },
            {
              "method": "GET",
              "rel": "self",
              "href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER(userId)",
              "uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER(userId)",
              "type": "application/vnd.sas.cas.caslib"
            },
            {
              "method": "PATCH",
              "rel": "patch",
              "href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER(userId)",
              "uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER(userId)",
              "type": "application/vnd.sas.cas.caslib",
              "responseType": "application/vnd.sas.cas.caslib"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER(userId)",
              "uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER(userId)"
            },
            {
              "method": "GET",
              "rel": "tables",
              "href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER(userId)/tables",
              "uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER(userId)/tables",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.cas.table"
            },
            {
              "method": "GET",
              "rel": "sources",
              "href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER(userId)/sources",
              "uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER(userId)/sources",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.cas.source.table"
            },
            {
              "method": "GET",
              "rel": "dataSource",
              "href": "/dataSources/providers/cas/sources/cas-shared-default~fs~CASUSER(userId)",
              "uri": "/dataSources/providers/cas/sources/cas-shared-default~fs~CASUSER(userId)",
              "type": "application/vnd.sas.data.source"
            }
          ],
          "transient": true
        },
        {
          "version": 1,
          "name": "Public",
          "type": "PATH",
          "description": "Shared and writeable caslib, accessible to all users.",
          "scope": "global",
          "path": "/opt/sas/viya/config/data/cas/default/public/",
          "hidden": false,
          "attributes": {
            "active": false,
            "personal": false,
            "subDirs": true
          },
          "links": [
            {
              "method": "GET",
              "rel": "up",
              "href": "/casManagement/servers/cas-shared-default/caslibs",
              "uri": "/casManagement/servers/cas-shared-default/caslibs",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.cas.caslib"
            },
            {
              "method": "GET",
              "rel": "self",
              "href": "/casManagement/servers/cas-shared-default/caslibs/Public",
              "uri": "/casManagement/servers/cas-shared-default/caslibs/Public",
              "type": "application/vnd.sas.cas.caslib"
            },
            {
              "method": "PATCH",
              "rel": "patch",
              "href": "/casManagement/servers/cas-shared-default/caslibs/Public",
              "uri": "/casManagement/servers/cas-shared-default/caslibs/Public",
              "type": "application/vnd.sas.cas.caslib",
              "responseType": "application/vnd.sas.cas.caslib"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/casManagement/servers/cas-shared-default/caslibs/Public",
              "uri": "/casManagement/servers/cas-shared-default/caslibs/Public"
            },
            {
              "method": "GET",
              "rel": "tables",
              "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables",
              "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.cas.table"
            },
            {
              "method": "GET",
              "rel": "sources",
              "href": "/casManagement/servers/cas-shared-default/caslibs/Public/sources",
              "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/sources",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.cas.source.table"
            },
            {
              "method": "GET",
              "rel": "dataSource",
              "href": "/dataSources/providers/cas/sources/cas-shared-default~fs~Public",
              "uri": "/dataSources/providers/cas/sources/cas-shared-default~fs~Public",
              "type": "application/vnd.sas.data.source"
            }
          ],
          "transient": false
        },
        {
          "version": 1,
          "name": "Samples",
          "type": "PATH",
          "description": "Stores sample data (supplied by SAS).",
          "scope": "global",
          "path": "/opt/sas/viya/config/data/cas/default/samples/",
          "hidden": false,
          "attributes": {
            "active": false,
            "personal": false,
            "subDirs": false
          },
          "links": [
            {
              "method": "GET",
              "rel": "up",
              "href": "/casManagement/servers/cas-shared-default/caslibs",
              "uri": "/casManagement/servers/cas-shared-default/caslibs",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.cas.caslib"
            },
            {
              "method": "GET",
              "rel": "self",
              "href": "/casManagement/servers/cas-shared-default/caslibs/Samples",
              "uri": "/casManagement/servers/cas-shared-default/caslibs/Samples",
              "type": "application/vnd.sas.cas.caslib"
            },
            {
              "method": "PATCH",
              "rel": "patch",
              "href": "/casManagement/servers/cas-shared-default/caslibs/Samples",
              "uri": "/casManagement/servers/cas-shared-default/caslibs/Samples",
              "type": "application/vnd.sas.cas.caslib",
              "responseType": "application/vnd.sas.cas.caslib"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/casManagement/servers/cas-shared-default/caslibs/Samples",
              "uri": "/casManagement/servers/cas-shared-default/caslibs/Samples"
            },
            {
              "method": "GET",
              "rel": "tables",
              "href": "/casManagement/servers/cas-shared-default/caslibs/Samples/tables",
              "uri": "/casManagement/servers/cas-shared-default/caslibs/Samples/tables",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.cas.table"
            },
            {
              "method": "GET",
              "rel": "sources",
              "href": "/casManagement/servers/cas-shared-default/caslibs/Samples/sources",
              "uri": "/casManagement/servers/cas-shared-default/caslibs/Samples/sources",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.cas.source.table"
            },
            {
              "method": "GET",
              "rel": "dataSource",
              "href": "/dataSources/providers/cas/sources/cas-shared-default~fs~Samples",
              "uri": "/dataSources/providers/cas/sources/cas-shared-default~fs~Samples",
              "type": "application/vnd.sas.data.source"
            }
          ],
          "transient": false
        }
      ],
      "limit": 10,
      "version": 2
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The request was successful. caslibCollection
    400 Bad Request The request was invalid. error2
    404 Not Found The requested CAS server or caslib does not exist. None
    409 Conflict The request could not be completed due to a conflict with the current state of the resource. Details are included in the response body. None

    Create a caslib

    Code samples

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

    POST /servers/{serverName}/caslibs

    Defines a new caslib.

    Body parameter

    {
      "name": "CASUSER(userId)",
      "description": "Personal File System caslib",
      "path": "/u/userId/",
      "scope": "global",
      "type": "PATH",
      "hidden": false,
      "transient": false,
      "version": 1,
      "attributes": {
        "active": false,
        "personal": true,
        "subDirs": true
      },
      "links": [
        {
          "href": "/casManagement/servers/casServer/caslibs",
          "itemType": "application/vnd.sas.cas.caslib",
          "method": "GET",
          "rel": "up",
          "type": "application/vnd.sas.collection",
          "uri": "/casManagement/servers/casServer/caslibs"
        },
        {
          "href": "/casManagement/servers/casServer/caslibs/CASUSER(userId)",
          "method": "GET",
          "rel": "self",
          "type": "application/vnd.sas.cas.caslib",
          "uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)"
        },
        {
          "href": "casManagement/servers/casServer/caslibs/CASUSER(userId)",
          "method": "PATCH",
          "rel": "patch",
          "responseType": "application/vnd.sas.cas.caslib",
          "type": "application/vnd.sas.cas.caslib",
          "uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)"
        },
        {
          "href": "/casManagement/servers/casServer/caslibs/CASUSER(userId)",
          "method": "DELETE",
          "rel": "delete",
          "uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)"
        },
        {
          "href": "/casManagement/servers/casServer/caslibs/CASUSER(userId)/tables",
          "method": "GET",
          "rel": "tables",
          "type": "application/vnd.sas.collection",
          "uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)/tables"
        },
        {
          "href": "/dataSources/providers/cas/sources/cas-shared-default~fs~CASUSER(userId)",
          "method": "GET",
          "rel": "dataSource",
          "uri": "/dataSources/providers/cas/sources/cas-shared-default~fs~CASUSER(userId)",
          "type": "application/vnd.sas.data.source"
        }
      ]
    }
    

    Parameters

    Parameter In Type Required Description
    serverName path string true Server name for which caslibs should be defined.
    sessionId query string false Session ID (useful when session-specific caslib is desired).
    createDirectory query boolean false When creating a path-based caslib, this parameter indicates whether the leaf-node of the path referenced by the caslib. Should be created if it does not already exist. Applicable when creating a path-based caslib. Defaults to false.
    body body caslib false

    Example responses

    201

    {
      "name": "CASUSER(userId)",
      "description": "Personal File System caslib",
      "path": "/u/userId/",
      "scope": "global",
      "type": "PATH",
      "hidden": false,
      "transient": false,
      "version": 1,
      "attributes": {
        "active": false,
        "personal": true,
        "subDirs": true
      },
      "links": [
        {
          "href": "/casManagement/servers/casServer/caslibs",
          "itemType": "application/vnd.sas.cas.caslib",
          "method": "GET",
          "rel": "up",
          "type": "application/vnd.sas.collection",
          "uri": "/casManagement/servers/casServer/caslibs"
        },
        {
          "href": "/casManagement/servers/casServer/caslibs/CASUSER(userId)",
          "method": "GET",
          "rel": "self",
          "type": "application/vnd.sas.cas.caslib",
          "uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)"
        },
        {
          "href": "casManagement/servers/casServer/caslibs/CASUSER(userId)",
          "method": "PATCH",
          "rel": "patch",
          "responseType": "application/vnd.sas.cas.caslib",
          "type": "application/vnd.sas.cas.caslib",
          "uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)"
        },
        {
          "href": "/casManagement/servers/casServer/caslibs/CASUSER(userId)",
          "method": "DELETE",
          "rel": "delete",
          "uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)"
        },
        {
          "href": "/casManagement/servers/casServer/caslibs/CASUSER(userId)/tables",
          "method": "GET",
          "rel": "tables",
          "type": "application/vnd.sas.collection",
          "uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)/tables"
        },
        {
          "href": "/dataSources/providers/cas/sources/cas-shared-default~fs~CASUSER(userId)",
          "method": "GET",
          "rel": "dataSource",
          "uri": "/dataSources/providers/cas/sources/cas-shared-default~fs~CASUSER(userId)",
          "type": "application/vnd.sas.data.source"
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    201 Created The caslib was defined successfully. Information about the defined caslib is returned. Note that links are only returned for GET calls, and are not included in the POST response (though listed here so endpoints in this documentation can share the same schema definition). caslib
    400 Bad Request The request was invalid. error2
    404 Not Found The requested CAS server does not exist. None
    409 Conflict The request could not be completed due to a conflict with the current state of the resource. Details are included in the response body. None
    Response Headers
    Status Header Type Format Description
    201 Location string The location of the newly created resource.

    Create a caslib with advanced options

    Code samples

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

    POST /servers/{serverName}/caslibs#advanced

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

    Body parameter

    {
      "createDirectory": true,
      "permission": "GROUPWRITE",
      "caslib": {
        "version": 1,
        "name": "mylib",
        "type": "PATH",
        "description": "My CAS library with create directory and group write.",
        "scope": "global",
        "path": "/tmp/mylib",
        "attributes": {
          "subDirs": false
        }
      }
    }
    

    Parameters

    Parameter In Type Required Description
    serverName path string true Server name for which caslibs should be defined.
    sessionId query string false Session ID (useful when session-specific caslib is desired).
    body body caslibCreateRequest false

    Example responses

    201

    {
      "name": "CASUSER(userId)",
      "description": "Personal File System caslib",
      "path": "/u/userId/",
      "scope": "global",
      "type": "PATH",
      "hidden": false,
      "transient": false,
      "version": 1,
      "attributes": {
        "active": false,
        "personal": true,
        "subDirs": true
      },
      "links": [
        {
          "href": "/casManagement/servers/casServer/caslibs",
          "itemType": "application/vnd.sas.cas.caslib",
          "method": "GET",
          "rel": "up",
          "type": "application/vnd.sas.collection",
          "uri": "/casManagement/servers/casServer/caslibs"
        },
        {
          "href": "/casManagement/servers/casServer/caslibs/CASUSER(userId)",
          "method": "GET",
          "rel": "self",
          "type": "application/vnd.sas.cas.caslib",
          "uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)"
        },
        {
          "href": "casManagement/servers/casServer/caslibs/CASUSER(userId)",
          "method": "PATCH",
          "rel": "patch",
          "responseType": "application/vnd.sas.cas.caslib",
          "type": "application/vnd.sas.cas.caslib",
          "uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)"
        },
        {
          "href": "/casManagement/servers/casServer/caslibs/CASUSER(userId)",
          "method": "DELETE",
          "rel": "delete",
          "uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)"
        },
        {
          "href": "/casManagement/servers/casServer/caslibs/CASUSER(userId)/tables",
          "method": "GET",
          "rel": "tables",
          "type": "application/vnd.sas.collection",
          "uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)/tables"
        },
        {
          "href": "/dataSources/providers/cas/sources/cas-shared-default~fs~CASUSER(userId)",
          "method": "GET",
          "rel": "dataSource",
          "uri": "/dataSources/providers/cas/sources/cas-shared-default~fs~CASUSER(userId)",
          "type": "application/vnd.sas.data.source"
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    201 Created The caslib was defined successfully. Information about the defined caslib is returned. Note that links are only returned for GET calls, and are not included in the POST response (though listed here so endpoints in this documentation can share the same schema definition). caslib
    400 Bad Request The request was invalid. error2
    404 Not Found The requested CAS server does not exist. None
    409 Conflict The request could not be completed due to a conflict with the current state of the resource. Details are included in the response body. None

    Remove a caslib definition

    Code samples

    # You can also use wget
    curl -X DELETE https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}
    
    
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}',
      method: 'delete',
    
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    
    r = requests.delete('https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}', params={
    
    )
    
    print r.json()
    
    

    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()
    
    

    GET /servers/{serverName}/caslibs/{caslibName}

    Retrieves a single caslib.

    Parameters

    Parameter In Type Required Description
    serverName path string true Server name containing the caslibs being requested.
    caslibName path string true The caslib name being requested.
    sessionId query string false Session ID (used when a session-specific caslib is being requested).

    Example responses

    200

    {
      "name": "CASUSER(userId)",
      "description": "Personal File System caslib",
      "path": "/u/userId/",
      "scope": "global",
      "type": "PATH",
      "hidden": false,
      "transient": false,
      "version": 1,
      "attributes": {
        "active": false,
        "personal": true,
        "subDirs": true
      },
      "links": [
        {
          "href": "/casManagement/servers/casServer/caslibs",
          "itemType": "application/vnd.sas.cas.caslib",
          "method": "GET",
          "rel": "up",
          "type": "application/vnd.sas.collection",
          "uri": "/casManagement/servers/casServer/caslibs"
        },
        {
          "href": "/casManagement/servers/casServer/caslibs/CASUSER(userId)",
          "method": "GET",
          "rel": "self",
          "type": "application/vnd.sas.cas.caslib",
          "uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)"
        },
        {
          "href": "casManagement/servers/casServer/caslibs/CASUSER(userId)",
          "method": "PATCH",
          "rel": "patch",
          "responseType": "application/vnd.sas.cas.caslib",
          "type": "application/vnd.sas.cas.caslib",
          "uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)"
        },
        {
          "href": "/casManagement/servers/casServer/caslibs/CASUSER(userId)",
          "method": "DELETE",
          "rel": "delete",
          "uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)"
        },
        {
          "href": "/casManagement/servers/casServer/caslibs/CASUSER(userId)/tables",
          "method": "GET",
          "rel": "tables",
          "type": "application/vnd.sas.collection",
          "uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)/tables"
        },
        {
          "href": "/dataSources/providers/cas/sources/cas-shared-default~fs~CASUSER(userId)",
          "method": "GET",
          "rel": "dataSource",
          "uri": "/dataSources/providers/cas/sources/cas-shared-default~fs~CASUSER(userId)",
          "type": "application/vnd.sas.data.source"
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The request succeeded. Information about the requested caslib was returned. caslib
    400 Bad Request The request was invalid. error2
    404 Not Found The requested CAS server or caslib does not exist. None
    409 Conflict The request could not be completed due to a conflict with the current state of the resource. Details are included in the response body. None

    Edit a global caslib

    Code samples

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

    PATCH /servers/{serverName}/caslibs/{caslibName}

    Edits properties of an existing global caslib. Session caslib properties cannot be edited. Editable properties include only the following: * description * path

    Body parameter

    {
      "name": "CASUSER(userId)",
      "description": "Personal File System caslib",
      "path": "/u/userId/",
      "scope": "global",
      "type": "PATH",
      "hidden": false,
      "transient": false,
      "version": 1,
      "attributes": {
        "active": false,
        "personal": true,
        "subDirs": true
      },
      "links": [
        {
          "href": "/casManagement/servers/casServer/caslibs",
          "itemType": "application/vnd.sas.cas.caslib",
          "method": "GET",
          "rel": "up",
          "type": "application/vnd.sas.collection",
          "uri": "/casManagement/servers/casServer/caslibs"
        },
        {
          "href": "/casManagement/servers/casServer/caslibs/CASUSER(userId)",
          "method": "GET",
          "rel": "self",
          "type": "application/vnd.sas.cas.caslib",
          "uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)"
        },
        {
          "href": "casManagement/servers/casServer/caslibs/CASUSER(userId)",
          "method": "PATCH",
          "rel": "patch",
          "responseType": "application/vnd.sas.cas.caslib",
          "type": "application/vnd.sas.cas.caslib",
          "uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)"
        },
        {
          "href": "/casManagement/servers/casServer/caslibs/CASUSER(userId)",
          "method": "DELETE",
          "rel": "delete",
          "uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)"
        },
        {
          "href": "/casManagement/servers/casServer/caslibs/CASUSER(userId)/tables",
          "method": "GET",
          "rel": "tables",
          "type": "application/vnd.sas.collection",
          "uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)/tables"
        },
        {
          "href": "/dataSources/providers/cas/sources/cas-shared-default~fs~CASUSER(userId)",
          "method": "GET",
          "rel": "dataSource",
          "uri": "/dataSources/providers/cas/sources/cas-shared-default~fs~CASUSER(userId)",
          "type": "application/vnd.sas.data.source"
        }
      ]
    }
    

    Parameters

    Parameter In Type Required Description
    serverName path string true Server name containing the global caslib to be edited.
    caslibName path string true The name of the global caslib to be edited.
    sessionId query string false Session ID. Note that editing session-based caslibs is not supported. Passing sessionId is provided to avoid creating a new CAS session, improving performance of the call.
    createDirectory query string false Indicates whether the leaf subdirectory of the path specified should be created when changing the path. If set to true, the directory will be created if it does not exist. Defaults to false.
    body body caslib false

    Example responses

    400

    {
      "message": "string",
      "id": "string",
      "errorCode": 0,
      "httpStatusCode": 0,
      "details": [
        "string"
      ],
      "remediation": "string",
      "errors": [
        null
      ],
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "version": 0
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The caslib was edited successfully. None
    400 Bad Request The request was invalid. error2
    404 Not Found The requested CAS server or caslib does not exist. None
    409 Conflict The request could not be completed due to a conflict with the current state of the resource. Details are included in the response body. None

    Get a list of nodes

    Code samples

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

    GET /servers/{serverName}/nodes

    Returns a collection of nodes on the CAS server. Supports SAS standard paging query parameters. Supports SAS standard paging query parameters, sorting, and filtering. Schema of items returned in the response collection is included below, and are of type application/vnd.sas.cas.server.node+json.

    Parameters

    Parameter In Type Required Description
    serverName path string true Server name for which nodes are being requested.
    sessionId query string false Session ID to use when connecting to retrieve the list of nodes. If not specified, a temporary session will be used.
    start query integer false The starting index of the first item in a page. Defaults to 0.
    limit query integer false Maximum number of items to return in this page of results. The actual number of returned items may be less if the collection has been exhausted. Defaults to 10.
    filter query string(filter-criteria) false Filter criteria for returned items. The valid filter fields are the first-level fields in each item. The supported functions are and, or, not, eq, lt, le, gt, ge, contains, startsWith, endsWith and isNull. A sample query to return only worker node: filter=eq(role,controller)
    sortBy query string(sort-criteria) false Sort returned items. The sort criteria supports the first-level fields in each item. An example sort: sortBy=ipAddress:descending. The default sort is by name in ascending order.

    Example responses

    200

    null
    

    Responses

    Status Meaning Description Schema
    200 OK The list of nodes for the requested CAS server was returned. casServerNodeCollection
    400 Bad Request The request was invalid. error2
    404 Not Found The requested CAS server does not exist. None
    409 Conflict The request could not be completed due to a conflict with the current state of the resource. Details are included in the response body. None

    Add a node

    Code samples

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

    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()
    
    

    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()
    
    

    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()
    
    

    GET /servers/{serverName}/caslibs/{caslibName}/sources

    Returns a collection of source files or tables accessible through the data source defined for the caslib. For path-based caslibs, this list will include files in the file system. For non-path-based caslibs, such as database data sources, this list will include database tables. The list is returned without regard to the loaded or unloaded state of the source file or table. Sorting and filtering are not supported. SAS standard paging query parameters are supported. Schema of items returned in the response collection is included below, and are of type application/vnd.sas.cas.source.table+json.

    Parameters

    Parameter In Type Required Description
    serverName path string true Server name for which source tables are being requested.
    caslibName path string true The caslib name for which source tables are being requested.
    sessionId query string false Session ID (used when session-specific tables are also desired in results).
    excludeItemLinks query boolean false Determines whether item links are excluded from results. Defaults to false.
    start query integer false The starting index of the first item in a page. Defaults to 0.
    limit query integer false Maximum number of items to return in this page of results. The actual number of returned items may be less if the collection has been exhausted. Defaults to 10.

    Example responses

    200

    {
      "links": [
        {
          "method": "GET",
          "rel": "up",
          "href": "/casManagement/servers/cas-shared-default/caslibs/Public/",
          "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/",
          "type": "application/vnd.sas.cas.caslib"
        },
        {
          "method": "GET",
          "rel": "self",
          "href": "/casManagement/servers/cas-shared-default/caslibs/Public/sources?excludeItemLinks=false&start=0&limit=2",
          "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/sources?excludeItemLinks=false&start=0&limit=2",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.cas.source.table"
        },
        {
          "method": "GET",
          "rel": "collection",
          "href": "/casManagement/servers/cas-shared-default/caslibs/Public/sources",
          "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/sources",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.cas.source.table"
        },
        {
          "method": "GET",
          "rel": "next",
          "href": "/casManagement/servers/cas-shared-default/caslibs/Public/sources?excludeItemLinks=false&start=2&limit=2",
          "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/sources?excludeItemLinks=false&start=2&limit=2",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "GET",
          "rel": "last",
          "href": "/casManagement/servers/cas-shared-default/caslibs/Public/sources?excludeItemLinks=false&start=16&limit=2",
          "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/sources?excludeItemLinks=false&start=16&limit=2",
          "type": "application/vnd.sas.collection"
        }
      ],
      "name": "sources",
      "accept": "application/vnd.sas.cas.source.table",
      "count": 18,
      "items": [
        {
          "name": "MAILORDER.sashdat",
          "attributes": {
            "owner": "userId",
            "size": 244,
            "encryption": "NONE",
            "permission": "-rwxr-xr-x",
            "time": "15Sep2017:20:29:10",
            "group": "mygroup"
          },
          "links": [
            {
              "method": "GET",
              "rel": "up",
              "href": "/casManagement/servers/cas-shared-default/caslibs/Public/sources",
              "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/sources",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.cas.source.table"
            },
            {
              "method": "GET",
              "rel": "self",
              "href": "/casManagement/servers/cas-shared-default/caslibs/Public/sources/MAILORDER.sashdat",
              "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/sources/MAILORDER.sashdat",
              "type": "application/vnd.sas.cas.source.table"
            }
          ]
        },
        {
          "name": "mysasdata.sas7bdat",
          "attributes": {
            "owner": "userId",
            "size": 128,
            "permission": "-rw-r--r--",
            "time": "15Sep2017:20:29:05",
            "group": "mygroup"
          },
          "links": [
            {
              "method": "GET",
              "rel": "up",
              "href": "/casManagement/servers/cas-shared-default/caslibs/Public/sources",
              "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/sources",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.cas.source.table"
            },
            {
              "method": "GET",
              "rel": "self",
              "href": "/casManagement/servers/cas-shared-default/caslibs/Public/sources/mysasdata.sas7bdat",
              "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/sources/mysasdata.sas7bdat",
              "type": "application/vnd.sas.cas.source.table"
            }
          ]
        }
      ],
      "limit": 2,
      "version": 2
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The request succeeded. The list of source files or tables for the requested CAS server, CAS library, and optional session was returned. casSourceTableCollection
    400 Bad Request The request was invalid. error2
    404 Not Found The requested CAS server or caslib does not exist. None
    409 Conflict The request could not be completed due to a conflict with the current state of the resource. Details are included in the response body. None

    Get a source file or table

    Code samples

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

    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()
    
    

    GET /servers/{serverName}/caslibs/{caslibName}/tables

    Returns a collection of tables accessible by the CAS server in the caslib. Tables in this context refers to both loaded CAS tables as well as unloaded source tables. - For path-based caslibs, the source table shown will be the first matching .sashdat, .sas7bdat, or .csv file found, in that order, independent of case. - For non-path-based caslibs (such as DBMS libraries), the source table used will be the first matching source table name found, independent of case. Supports SAS standard paging query parameters. Supports SAS standard paging query parameters, sorting, and filtering. Schema of items returned in the response collection is included below, and are of type application/vnd.sas.cas.table+json.

    Parameters

    Parameter In Type Required Description
    serverName path string true Server name for which tables are being requested.
    caslibName path string true The caslib name for which tables are being requested.
    sessionId query string false Session ID (used when session-specific tables are also desired in results).
    state query string false Omitting this value includes both loaded and unloaded (source) tables in the result. Specifying a value here filters the results to only tables which match a particular state. Valid values include loaded (only loaded tables), unloaded (only unloaded tables).
    scope query string false Omitting this value includes tables of all scopes. Specifying a value here filters the results to only tables which match a particular scope. Valid values include session and global.
    sourcesOnly query boolean false Determines whether only source tables should be displayed. Defaults to false.
    excludeItemLinks query boolean false Determines whether item links are excluded from results. Defaults to false.
    start query integer false The starting index of the first item in a page. Defaults to 0.
    limit query integer false Maximum number of items to return in this page of results. The actual number of returned items may be less if the collection has been exhausted. Defaults to 10.
    filter query string(filter-criteria) false Filter criteria for returned items. The valid filter fields are the first-level fields in each item. The supported functions are and, or, not, eq, lt, le, gt, ge, contains, startsWith, endsWith and isNull. Some sample queries:
    • Search by name: starting with filter=startsWith(name, 'CAS')
    • Search by name: filter=eq(name, 'CASUSER')
    • Search for multiple items: filter=in(name, 'CASUSER', 'Public')
    sortBy query string(sort-criteria) false Sort returned items. The sort criteria supports the first-level fields in each item. Some sample sorts:
    • Sort by ascending name: sortBy=name:ascending
    • Sort by descending name: sortBy=name:descending
    The default sort is by name in ascending order.

    Example responses

    200

    {
      "links": [
        {
          "method": "GET",
          "rel": "up",
          "href": "/casManagement/servers/cas-shared-default/caslibs/Public/",
          "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/",
          "type": "application/vnd.sas.cas.caslib"
        },
        {
          "method": "GET",
          "rel": "self",
          "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables?scope=all&caslibName=Public&excludeItemLinks=false&sourcesOnly=false&state=all&start=0&limit=2",
          "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables?scope=all&caslibName=Public&excludeItemLinks=false&sourcesOnly=false&state=all&start=0&limit=2",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.cas.table"
        },
        {
          "method": "GET",
          "rel": "collection",
          "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables",
          "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.cas.table"
        },
        {
          "method": "GET",
          "rel": "next",
          "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables?scope=all&caslibName=Public&excludeItemLinks=false&sourcesOnly=false&state=all&start=2&limit=2",
          "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables?scope=all&caslibName=Public&excludeItemLinks=false&sourcesOnly=false&state=all&start=2&limit=2",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "GET",
          "rel": "last",
          "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables?scope=all&caslibName=Public&excludeItemLinks=false&sourcesOnly=false&state=all&start=8&limit=2",
          "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables?scope=all&caslibName=Public&excludeItemLinks=false&sourcesOnly=false&state=all&start=8&limit=2",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "POST",
          "rel": "upload",
          "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables",
          "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables",
          "responseType": "application/vnd.sas.cas.table"
        }
      ],
      "name": "tables",
      "accept": "application/vnd.sas.cas.table",
      "count": 9,
      "items": [
        {
          "version": 1,
          "name": "CONTACTS",
          "tableReference": {
            "tableUri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~Public/tables/CONTACTS",
            "sessionId": "08863edb-02e0-7945-88e7-9f55ebc7a310",
            "sourceCaslibName": "Public",
            "sourceTableName": "Contacts.sashdat"
          },
          "scope": "global",
          "state": "loaded",
          "repeated": false,
          "created": "2017-09-15T20:38:06.549Z",
          "lastModified": "2017-09-15T20:38:06.551Z",
          "lastAccessed": "2017-09-15T20:38:06.550Z",
          "createdBy": "userId",
          "rowCount": 3276,
          "columnCount": 12,
          "characterSet": "UTF8",
          "encoding": "utf-8",
          "serverName": "cas-shared-default",
          "caslibName": "Public",
          "attributes": {
            "owner": "userid",
            "size": 796288,
            "encryption": "NONE",
            "time": "15Sep2017:20:29:02",
            "group": "mygroup"
          },
          "links": [
            {
              "method": "GET",
              "rel": "up",
              "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables",
              "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.cas.table"
            },
            {
              "method": "GET",
              "rel": "self",
              "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS",
              "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS",
              "type": "application/vnd.sas.cas.table"
            },
            {
              "method": "POST",
              "rel": "save",
              "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS",
              "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS",
              "type": "application/vnd.sas.cas.table.save.request",
              "responseType": "application/vnd.sas.cas.table"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS",
              "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS"
            },
            {
              "method": "GET",
              "rel": "summaryStatistics",
              "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/summaryStatistics",
              "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/summaryStatistics",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.cas.column.summary.statistics"
            },
            {
              "method": "GET",
              "rel": "distinctCount",
              "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/distinctCount",
              "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/distinctCount",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.cas.column.summary.statistics"
            },
            {
              "method": "PUT",
              "rel": "updateScope",
              "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/scope",
              "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/scope",
              "responseType": "application/json;text/plain"
            },
            {
              "method": "PUT",
              "rel": "updateState",
              "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/state",
              "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/state",
              "responseType": "application/json;text/plain"
            },
            {
              "method": "GET",
              "rel": "columns",
              "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns",
              "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.cas.column"
            },
            {
              "method": "GET",
              "rel": "dataTable",
              "href": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~Public/tables/CONTACTS",
              "uri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~Public/tables/CONTACTS",
              "type": "application/vnd.sas.data.table"
            }
          ]
        },
        {
          "version": 1,
          "name": "MYDATA",
          "tableReference": {
            "tableUri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~Public/tables/MYDATA",
            "sessionId": "08863edb-02e0-7945-88e7-9f55ebc7a310",
            "sourceCaslibName": "Public",
            "sourceTableName": "mydata.sashdat"
          },
          "scope": "global",
          "state": "loaded",
          "repeated": false,
          "created": "2017-09-15T20:35:02.376Z",
          "lastModified": "2017-09-15T20:35:02.377Z",
          "lastAccessed": "2017-09-15T20:35:02.377Z",
          "createdBy": "userId",
          "rowCount": 160,
          "columnCount": 9,
          "characterSet": "UTF8",
          "encoding": "utf-8",
          "serverName": "cas-shared-default",
          "caslibName": "Public",
          "attributes": {
            "owner": "userid",
            "size": 36928,
            "encryption": "NONE",
            "time": "15Sep2017:20:29:08",
            "group": "mygroup"
          },
          "links": [
            {
              "method": "GET",
              "rel": "up",
              "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables",
              "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.cas.table"
            },
            {
              "method": "GET",
              "rel": "self",
              "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA",
              "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA",
              "type": "application/vnd.sas.cas.table"
            },
            {
              "method": "POST",
              "rel": "save",
              "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA",
              "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA",
              "type": "application/vnd.sas.cas.table.save.request",
              "responseType": "application/vnd.sas.cas.table"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA",
              "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA"
            },
            {
              "method": "GET",
              "rel": "summaryStatistics",
              "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA/summaryStatistics",
              "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA/summaryStatistics",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.cas.column.summary.statistics"
            },
            {
              "method": "GET",
              "rel": "distinctCount",
              "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA/distinctCount",
              "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA/distinctCount",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.cas.column.summary.statistics"
            },
            {
              "method": "PUT",
              "rel": "updateScope",
              "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA/scope",
              "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA/scope",
              "responseType": "application/json;text/plain"
            },
            {
              "method": "PUT",
              "rel": "updateState",
              "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA/state",
              "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA/state",
              "responseType": "application/json;text/plain"
            },
            {
              "method": "GET",
              "rel": "columns",
              "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA/columns",
              "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/MYDATA/columns",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.cas.column"
            },
            {
              "method": "GET",
              "rel": "dataTable",
              "href": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~Public/tables/MYDATA",
              "uri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~Public/tables/MYDATA",
              "type": "application/vnd.sas.data.table"
            }
          ]
        }
      ],
      "version": 2
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The request succeeded. The list of tables for the requested CAS server, CAS library, and optional session was returned. tableCollection
    400 Bad Request The request was invalid. error2
    404 Not Found The requested CAS server or caslib does not exist. None
    409 Conflict The request could not be completed due to a conflict with the current state of the resource. Details are included in the response body. None

    Upload a data file to the collection of tables

    Code samples

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

    POST /servers/{serverName}/caslibs/{caslibName}/tables

    Uploads a data file to the table collections using a multipart form-data post. Supported data files are csv, xls, xlsx/xlsm, sas7bdat and sashdat.

    Body parameter

    sessionId: string
    tableName: string
    format: string
    label: string
    scope: string
    replace: true
    encoding: string
    allowTruncation: true
    delimiter: string
    varchars: true
    scanRows: 0
    threadCount: 0
    stripBlanks: true
    containsHeaderRow: true
    sheetName: string
    password: string
    decryptionKey: string
    stringLengthMultiplier: 0
    varcharConversionThreshold: 0
    file: string
    
    

    Parameters

    Parameter In Type Required Description
    serverName path string true Server name for which tables are being requested.
    caslibName path string true The caslib name for which tables are being requested.
    body body object false
    » sessionId body string false Session ID (used when session specific tables are also desired in results).
    » tableName body string true The name of the table to be created.
    » format body string true Format of the data file. The supported formats are \csv\, \xls\, \xlsx\, \sas7bdat\ and \sashdat.
    » label body string false Label placed on the new table.
    » scope body string false The scope to which to load the table. Valid values include global and session. Defaults to global.
    » replace body boolean false If true, any pre-existing table with the same name will be replaced. Defaults to false.
    » encoding body string false Encoding of the file contents. Parameter only valid for CSV files. Defaults to utf-8.
    » allowTruncation body boolean false Allow truncation of character data that is too long for a given field. Parameter only valid for CSV files. Defaults to true.
    » delimiter body string false Delimiter character. Parameter only valid for CSV files. Defaults to ','.
    » varchars body boolean false Use variable character lengths. Parameter only valid for CSV files. Defaults to true.
    » scanRows body integer(int64) false Number of rows to scan when determining column types. Parameter only valid for CSV files. Default is 20. Set to zero to scan all rows in the file.
    » threadCount body integer(int64) false Number of threads to use on each CAS node to process the CSV data. Parameter only valid for CSV files. Default is one thread per licensed CPU. Set to 0 to use the default.
    » stripBlanks body boolean false If true, remove leading and trailing blanks from character variables. Parameter only valid for CSV files. Defaults to false.
    » containsHeaderRow body boolean false If true, first row is used for column names. Parameter only valid for csv, xls and xlsx files. Defaults to false.
    » sheetName body string false Specifies the name of worksheet to import from a Microsoft Excel file. Parameter only valid for xls and xlsx files. If no sheet name is specified, the first sheet is used.
    » password body string false Password used to read a protected SAS dataset. Parameter only valid for sas7bdat files.
    » decryptionKey body string false Key used to decrypt the data file. Parameter only valid for sas7bdat and sashdat files.
    » stringLengthMultiplier body integer(double) false Specifies to increase the width of fixed-byte-width character columns. The number of bytes needed for multi-byte characters depends on the particular characters in the string. Parameter only valid for sas7bdat files.
    » varcharConversionThreshold body integer(double) false Specifies a multiplier value to expand fixed-width character variables that might require transcoding. The lengths are increased to avoid character data truncation. The lengths are increased by multiplying the length by the specified value. The server default is 1. Parameter only valid for sas7bdat files.
    » file body string(binary) true Data file in one of the supported formats. This MUST be the last parameter.

    Example responses

    201

    {
      "version": 3,
      "name": "CUSTOMERS",
      "tableReference": {
        "tableUri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~CASUSER/tables/CUSTOMERS",
        "sessionId": "ad0b5228-cc89-874c-8893-c1c420f6e0cb",
        "sourceCaslibName": "CASUSER",
        "sourceTableName": "CUSTOMERS.sashdat"
      },
      "serverName": "cas-shared-default",
      "caslibName": "CASUSER",
      "scope": "global",
      "state": "loaded",
      "repeated": false,
      "created": "2017-04-11T17:17:15.373Z",
      "lastModified": "2017-04-11T18:50:42.106Z",
      "createdBy": "userid",
      "lastModifiedBy": "userid",
      "lastAccessed": "2017-04-11T19:12:13.102Z",
      "sourceLastModified": "2017-03-12T03:43:22.101Z",
      "label": "My table label",
      "rowCount": 160,
      "columnCount": 9,
      "characterSet": "UTF8",
      "encoding": "utf-8",
      "attributes": {
        "owner": "someuser",
        "size": 115704,
        "encryption": "NONE",
        "time": "18Nov2016:15:27:28",
        "group": "users"
      },
      "links": [
        {
          "method": "GET",
          "rel": "up",
          "href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables",
          "uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.cas.table"
        },
        {
          "method": "GET",
          "rel": "self",
          "href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS",
          "uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS",
          "type": "application/vnd.sas.cas.table"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS",
          "uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS"
        },
        {
          "method": "PUT",
          "rel": "updateState",
          "href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/state",
          "uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/state"
        },
        {
          "method": "PUT",
          "rel": "updateScope",
          "href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/scope",
          "uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/scope",
          "responseType": "application/json;text/plain"
        },
        {
          "method": "GET",
          "rel": "summaryStatistics",
          "href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/summaryStatistics",
          "uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/summaryStatistics",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.cas.column"
        },
        {
          "method": "GET",
          "rel": "distinctCount",
          "href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/distinctCount",
          "uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/distinctCount",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.cas.column"
        },
        {
          "method": "GET",
          "rel": "columns",
          "href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/columns",
          "uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/columns",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.cas.column"
        },
        {
          "method": "GET",
          "rel": "dataTable",
          "href": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~CASUSER/tables/CUSTOMERS",
          "uri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~CASUSER/tables/CUSTOMERS",
          "type": "application/vnd.sas.data.table"
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    201 Created The list of newly uploaded tables was returned. tableDetails
    400 Bad Request The request was invalid. error2
    404 Not Found The requested CAS server or caslib does not exist. None
    409 Conflict The request could not be completed due to a conflict with the current state of the resource. Details are included in the response body. None

    Delete a table from source

    Code samples

    # You can also use wget
    curl -X DELETE https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}?sourceTableName=string&quiet=true&removeAcs=true
    
    
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}',
      method: 'delete',
      data: '?sourceTableName=string&quiet=true&removeAcs=true',
    
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    
    r = requests.delete('https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}', params={
      'sourceTableName': 'string',  'quiet': 'true',  'removeAcs': 'true'
    )
    
    print r.json()
    
    

    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()
    
    

    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()
    
    

    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()
    
    

    PUT /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/scope

    Changes the scope of a loaded CAS table from session to global scope (promote). Operation only valid on a session table. Promote target is the same caslib which contains the session table.

    Parameters

    Parameter In Type Required Description
    serverName path string true Server name for which the table is being accessed.
    caslibName path string true The name of the caslib containing the table.
    tableName path string true Table name requested.
    sessionId query string true The session ID.
    value query string true The scope to which to change the table. Valid values include global.

    Example responses

    400

    {
      "message": "string",
      "id": "string",
      "errorCode": 0,
      "httpStatusCode": 0,
      "details": [
        "string"
      ],
      "remediation": "string",
      "errors": [
        null
      ],
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "version": 0
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The requested action was successful. New scope is returned. Valid values include session or global. None
    400 Bad Request The request was invalid. error2
    404 Not Found The requested CAS server or caslib does not exist. None
    409 Conflict The request could not be completed due to a conflict with the current state of the resource. Details are included in the response body. None

    Load or unload a table

    Code samples

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

    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()
    
    

    GET /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/summaryStatistics

    Returns the summary for the numeric column values in the loaded CAS table Returns a collection of summaries for the numeric columns in a loaded CAS table. Supports SAS standard paging query parameters. Supports SAS standard paging query parameters, sorting, and filtering. Schema of items returned in the response collection is included below, and are of type application/vnd.sas.cas.column.summary.statistics+json.

    Parameters

    Parameter In Type Required Description
    tableName path string true The name of table for which column info is requested.
    serverName path string true The name of the server containing the caslib.
    caslibName path string true The name of the caslib containing the table.
    sessionId query string false The optional ID of the session containing the caslib. If unspecified, only tables in global caslibs will be accessible.
    start query integer false The starting index of the first item in a page. Defaults to 0.
    limit query integer false Maximum number of items to return in this page of results. The actual number of returned items may be less if the collection has been exhausted. Defaults to 10.

    Example responses

    200

    {
      "CSS": 0,
      "USS": 0,
      "coefficientOfVariation": 0,
      "columnName": "string",
      "max": 0,
      "mean": 0,
      "min": 0,
      "numMissingValues": 0,
      "probT": 0,
      "stdDev": 0,
      "stdErr": 0,
      "sum": 0,
      "tValue": 0,
      "variance": 0,
      "version": 0
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The requested table's summary information for all numeric columns was returned. casColumnSummaryStatistics
    404 Not Found The requested CAS server or caslib does not exist. None
    409 Conflict The request could not be completed due to a conflict with the current state of the resource. Details are included in the response body. None

    Get the distinct count for all columns

    Code samples

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

    GET /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/distinctCounts

    Returns a collection of distinct count information for the columns in a loaded CAS table. Supports SAS standard paging query parameters. Supports SAS standard paging query parameters, sorting, and filtering. Schema of items returned in the response collection is included below, and are of type application/vnd.sas.cas.column.distinct.count+json.

    Parameters

    Parameter In Type Required Description
    tableName path string true The name of table for which distinct count info is requested.
    serverName path string true The name of the server containing the caslib.
    caslibName path string true The name of the caslib containing the table.
    sessionId query string false The optional ID of the session containing the caslib. If unspecified, only tables in global caslibs will be accessible.
    start query integer false The starting index of the first item in a page. Defaults to 0.
    limit query integer false Maximum number of items to return in this page of results. The actual number of returned items may be less if the collection has been exhausted. Defaults to 10.

    Example responses

    200

    {
      "version": 1,
      "columnName": "2016/17",
      "distinctCount": 30,
      "missingCount": 0,
      "truncated": false,
      "links": [
        {
          "method": "GET",
          "rel": "up",
          "href": "/casManagement/servers/cas-shared-default/caslibs/testlib/tables/NBA_2016_TEAMSALARIES/columns/2016/17",
          "uri": "/casManagement/servers/cas-shared-default/caslibs/testlib/tables/NBA_2016_TEAMSALARIES/columns/2016/17",
          "type": "application/vnd.sas.cas.column"
        },
        {
          "method": "GET",
          "rel": "self",
          "href": "/casManagement/servers/cas-shared-default/caslibs/testlib/tables/NBA_2016_TEAMSALARIES/columns/2016/17/distinctCount",
          "uri": "/casManagement/servers/cas-shared-default/caslibs/testlib/tables/NBA_2016_TEAMSALARIES/columns/2016/17/distinctCount",
          "type": "application/vnd.sas.cas.column.distinct.count"
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The requested table's distinct and missing count information for all columns was returned. casColumnDistinctCount
    404 Not Found The requested CAS server or caslib does not exist. None
    409 Conflict The request could not be completed due to a conflict with the current state of the resource. Details are included in the response body. None

    Get a list of columns in a table

    Code samples

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

    GET /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns

    Returns a collection of column info available for a table. Supports SAS standard paging query parameters. Supports SAS standard paging query parameters, sorting, and filtering. Schema of items returned in the response collection is included below, and are of type application/vnd.sas.cas.column+json.

    Parameters

    Parameter In Type Required Description
    tableName path string true The name of table for which column info is requested.
    serverName path string true The name of the server containing the caslib.
    caslibName path string true The name of the caslib containing the table.
    sessionId query string false The optional ID of the session containing the caslib. If unspecified, only tables in global caslibs will be accessible.
    start query integer false The starting index of the first item in a page. Defaults to 0.
    limit query integer false Maximum number of items to return in this page of results. The actual number of returned items may be less if the collection has been exhausted. Defaults to 10.
    filter query string(filter-criteria) false Filter criteria for returned items. The valid filter fields are the first-level fields in each item. The supported functions are and, or, not, eq, lt, le, gt, ge, contains, startsWith, endsWith and isNull. Some sample queries:
    • Search by name starting with: filter=startsWith(name, 'CAS')
    • Search by name: filter=eq(name, 'CASUSER')
    • Search for multiple items: filter=in(name, 'CASUSER', 'Public')
    sortBy query string(sort-criteria) false Sort returned items. The sort criteria supports the first-level fields in each item. Some sample sorts:
    • Sort by ascending name: sortBy=name:ascending
    • Sort by descending name: sortBy=name:descending
    Sorting is not performed if this query parameter is omitted.
    excludeItemLinks query boolean false Determines whether item links are excluded from results. Defaults to true.

    Example responses

    200

    {
      "links": [
        {
          "method": "GET",
          "rel": "up",
          "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/",
          "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/",
          "type": "application/vnd.sas.cas.table"
        },
        {
          "method": "GET",
          "rel": "self",
          "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns?excludeItemLinks=true&sessionId&start=0&limit=10",
          "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns?excludeItemLinks=true&sessionId&start=0&limit=10",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.cas.column"
        },
        {
          "method": "GET",
          "rel": "collection",
          "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns",
          "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.cas.column"
        },
        {
          "method": "GET",
          "rel": "next",
          "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns?excludeItemLinks=true&sessionId&start=10&limit=10",
          "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns?excludeItemLinks=true&sessionId&start=10&limit=10",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "GET",
          "rel": "last",
          "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns?excludeItemLinks=true&sessionId&start=10&limit=10",
          "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns?excludeItemLinks=true&sessionId&start=10&limit=10",
          "type": "application/vnd.sas.collection"
        }
      ],
      "name": "columns",
      "accept": "application/vnd.sas.cas.column",
      "count": 12,
      "items": [
        {
          "version": 1,
          "name": "ID",
          "type": "double",
          "rawLength": 8,
          "formattedLength": 12,
          "numberFormatLength": 0,
          "numberFormatDecimals": 0,
          "indexed": true
        },
        {
          "version": 1,
          "name": "COMPANY",
          "type": "char",
          "rawLength": 34,
          "formattedLength": 34,
          "numberFormatLength": 0,
          "numberFormatDecimals": 0,
          "indexed": false
        },
        {
          "version": 1,
          "name": "CONTACT",
          "type": "char",
          "rawLength": 20,
          "formattedLength": 20,
          "numberFormatLength": 0,
          "numberFormatDecimals": 0,
          "indexed": false
        },
        {
          "version": 1,
          "name": "ADDRESS",
          "type": "char",
          "rawLength": 30,
          "formattedLength": 30,
          "numberFormatLength": 0,
          "numberFormatDecimals": 0,
          "indexed": false
        },
        {
          "version": 1,
          "name": "CITY",
          "type": "char",
          "rawLength": 28,
          "formattedLength": 28,
          "numberFormatLength": 0,
          "numberFormatDecimals": 0,
          "indexed": false
        },
        {
          "version": 1,
          "name": "STATE",
          "type": "char",
          "rawLength": 14,
          "formattedLength": 14,
          "numberFormatLength": 0,
          "numberFormatDecimals": 0,
          "indexed": false
        },
        {
          "version": 1,
          "name": "PHONE",
          "type": "char",
          "rawLength": 12,
          "formattedLength": 12,
          "numberFormatLength": 0,
          "numberFormatDecimals": 0,
          "indexed": false
        },
        {
          "version": 1,
          "name": "OS",
          "type": "char",
          "rawLength": 16,
          "formattedLength": 16,
          "numberFormatLength": 0,
          "numberFormatDecimals": 0,
          "indexed": false
        },
        {
          "version": 1,
          "name": "DATABASE",
          "type": "char",
          "rawLength": 24,
          "formattedLength": 24,
          "numberFormatLength": 0,
          "numberFormatDecimals": 0,
          "indexed": false
        },
        {
          "version": 1,
          "name": "DATE",
          "type": "char",
          "rawLength": 15,
          "formattedLength": 15,
          "numberFormatLength": 0,
          "numberFormatDecimals": 0,
          "indexed": false
        }
      ],
      "version": 2
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The requested table's column information was returned. casColumnCollection
    400 Bad Request The request was invalid. error2
    404 Not Found The requested CAS server or caslib does not exist. None
    409 Conflict The request could not be completed due to a conflict with the current state of the resource. Details are included in the response body. None

    Get column information

    Code samples

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

    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()
    
    

    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()
    
    

    GET /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/distinctValues

    Returns a collection of distinct values for a single column in a single loaded CAS table. Supports SAS standard paging query parameters. Supports SAS standard paging query parameters, sorting, and filtering. Returned values in the collection are all of the type of the column.

    Parameters

    Parameter In Type Required Description
    tableName path string true The name of table for which column info is requested.
    columnName path string true The name of column for which distinct values info is requested.
    serverName path string true The name of the server containing the caslib.
    caslibName path string true The name of the caslib containing the table.
    sessionId query string false The optional ID of the session containing the caslib. If unspecified, only tables in global caslibs will be accessible.
    start query integer false The starting index of the first item in a page. Defaults to 0.
    limit query integer false Maximum number of items to return in this page of results. The actual number of returned items may be less if the collection has been exhausted. Defaults to 10.

    Responses

    Status Meaning Description Schema
    200 OK The requested column's distinct values were returned. None
    404 Not Found The requested CAS server or caslib does not exist. None
    409 Conflict The request could not be completed due to a conflict with the current state of the resource. Details are included in the response body. None

    Get the frequency for a column

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/frequency \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.cas.column.frequency+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.cas.column.frequency+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/frequency',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.cas.column.frequency+json'
    }
    
    r = requests.get('https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/frequency', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    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()
    
    

    POST /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/frequency

    Creates a CAS table containing the frequency for a single column in the loaded CAS table. The result is output to the new CAS table requested by the passed query parameters.

    Parameters

    Parameter In Type Required Description
    tableName path string true The name of the input table for which column frequency is requested.
    columnName path string true The name of column for which frequency info is requested.
    serverName path string true The name of the server containing the input caslib.
    caslibName path string true The name of the caslib containing the input table.
    outputCaslibName query string true The name of the caslib for the output CAS table.
    outputTableName query string true The name of output CAS table. The following columns of interest will be present in the output table:
    Column NameContent
     Frequency  The frequency of the value
     FmtVar  The formatted value
     CharVar  For a character column, the unformatted value
     NumVar  For a numeric column, the unformatted value
    outputTableScope query string false The scope of the output table. Valid values in include session and global. Defaults to global. Global caslibs may contain global and session tables. Session caslibs may only contain session tables.
    sessionId query string false The optional ID of the session containing the caslib. If unspecified, only tables in global caslibs will be accessible.
    sortBy query string false The optional order by which to sort the results. If omitted, sorting is not performed. An ascending sort is more performant than a descending sort. Valid sort column names include:  Frequency  and  FmtVar . Valid sort order values include: ascending and descending. When sorting by  Frequency , the  FmtVar  is automatically used as the secondary ascending sort. Sample sortBy values:
    Value of sortByResult
     Frequency :ascendingsort by ascending  Frequency , ascending  FmtVar 
     Frequency :descendingsort by descending  Frequency , ascending  FmtVar 
     FmtVar :ascendingsort by ascending  FmtVar 
     FmtVar :descendingsort by descending  FmtVar 

    Example responses

    201

    {
      "version": 3,
      "name": "CUSTOMERS",
      "tableReference": {
        "tableUri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~CASUSER/tables/CUSTOMERS",
        "sessionId": "ad0b5228-cc89-874c-8893-c1c420f6e0cb",
        "sourceCaslibName": "CASUSER",
        "sourceTableName": "CUSTOMERS.sashdat"
      },
      "serverName": "cas-shared-default",
      "caslibName": "CASUSER",
      "scope": "global",
      "state": "loaded",
      "repeated": false,
      "created": "2017-04-11T17:17:15.373Z",
      "lastModified": "2017-04-11T18:50:42.106Z",
      "createdBy": "userid",
      "lastModifiedBy": "userid",
      "lastAccessed": "2017-04-11T19:12:13.102Z",
      "sourceLastModified": "2017-03-12T03:43:22.101Z",
      "label": "My table label",
      "rowCount": 160,
      "columnCount": 9,
      "characterSet": "UTF8",
      "encoding": "utf-8",
      "attributes": {
        "owner": "someuser",
        "size": 115704,
        "encryption": "NONE",
        "time": "18Nov2016:15:27:28",
        "group": "users"
      },
      "links": [
        {
          "method": "GET",
          "rel": "up",
          "href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables",
          "uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.cas.table"
        },
        {
          "method": "GET",
          "rel": "self",
          "href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS",
          "uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS",
          "type": "application/vnd.sas.cas.table"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS",
          "uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS"
        },
        {
          "method": "PUT",
          "rel": "updateState",
          "href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/state",
          "uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/state"
        },
        {
          "method": "PUT",
          "rel": "updateScope",
          "href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/scope",
          "uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/scope",
          "responseType": "application/json;text/plain"
        },
        {
          "method": "GET",
          "rel": "summaryStatistics",
          "href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/summaryStatistics",
          "uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/summaryStatistics",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.cas.column"
        },
        {
          "method": "GET",
          "rel": "distinctCount",
          "href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/distinctCount",
          "uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/distinctCount",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.cas.column"
        },
        {
          "method": "GET",
          "rel": "columns",
          "href": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/columns",
          "uri": "/casManagement/servers/cas-shared-default/caslibs/CASUSER/tables/CUSTOMERS/columns",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.cas.column"
        },
        {
          "method": "GET",
          "rel": "dataTable",
          "href": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~CASUSER/tables/CUSTOMERS",
          "uri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~CASUSER/tables/CUSTOMERS",
          "type": "application/vnd.sas.data.table"
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    201 Created The table details for the output table was returned. tableDetails
    404 Not Found The requested CAS server or caslib does not exist. None
    409 Conflict The request could not be completed due to a conflict with the current state of the resource. Details are included in the response body. None

    Get the summary for a column

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/summaryStatistics \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.cas.column.summary.statistics+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.cas.column.summary.statistics+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/summaryStatistics',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.cas.column.summary.statistics+json'
    }
    
    r = requests.get('https://www.example.com/casManagement/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/summaryStatistics', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    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()
    
    

    POST /jobs/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/frequency

    Creates a job which gets the frequency for a single column in the loaded CAS table. The result is output to the new CAS table requested by the passed query parameters.

    Parameters

    Parameter In Type Required Description
    tableName path string true The name of the input table for which column frequency is requested.
    columnName path string true The name of column for which frequency info is requested.
    serverName path string true The name of the server containing the input caslib.
    caslibName path string true The name of the caslib containing the input table.
    outputCaslibName query string true The name of the caslib for the output CAS table.
    outputTableName query string true The name of output CAS table. The following columns of interest will be present in the output table:
    Column NameContent
     Frequency The frequency of the value
     FmtVar The formatted value
     CharVar For a character column, the unformatted value
     NumVar For a numeric column, the unformatted value
    outputTableScope query string false The scope of the output table. Valid values in include session and global. Defaults to global. Global caslibs may contain global and session tables. Session caslibs may only contain session tables.
    sessionId query string false The optional ID of the session containing the caslib. If unspecified, only tables in global caslibs will be accessible.
    sortBy query string false The optional order by which to sort the results. If omitted, sorting is not performed. An ascending sort is more performant than a descending sort. Valid sort column names include:  Frequency   and  FmtVar . Valid sort order values include: ascending and descending. When sorting by  Frequency , the  FmtVar  is automatically used as the secondary ascending sort. Sample sortBy values:
    Value of sortByResult
     Frequency :ascendingsort by ascending  Frequency , ascending  FmtVar 
     Frequency :descendingsort by descending  Frequency , ascending  FmtVar 
     FmtVar :ascendingsort by ascending  FmtVar 
     FmtVar :descendingsort by descending  FmtVar 

    Example responses

    201

    {
      "version": 0,
      "id": "string",
      "state": "string",
      "results": {},
      "error": {
        "message": "string",
        "id": "string",
        "errorCode": 0,
        "httpStatusCode": 0,
        "details": [
          "string"
        ],
        "remediation": "string",
        "errors": [
          null
        ],
        "links": [
          {
            "method": "string",
            "rel": "string",
            "uri": "string",
            "href": "string",
            "title": "string",
            "type": "string",
            "itemType": "string",
            "responseType": "string",
            "responseItemType": "string"
          }
        ],
        "version": 0
      },
      "jobRequest": {
        "version": 0,
        "id": "string",
        "name": "string",
        "description": "string",
        "creationTimeStamp": "string",
        "modifiedTimeStamp": "string",
        "createdBy": "string",
        "modifiedBy": "string",
        "jobDefinitionUri": "string",
        "jobDefinition": {},
        "expiresAfter": "string",
        "arguments": {},
        "properties": {
          "property1": "string",
          "property2": "string"
        },
        "links": [
          {
            "method": "string",
            "rel": "string",
            "uri": "string",
            "href": "string",
            "title": "string",
            "type": "string",
            "itemType": "string",
            "responseType": "string",
            "responseItemType": "string"
          }
        ]
      },
      "heartbeatInterval": 0,
      "heartbeatTimeStamp": "string",
      "creationTimeStamp": "string",
      "modifiedTimeStamp": "string",
      "endTimeStamp": "string",
      "expirationTimeStamp": "string",
      "createdBy": "string",
      "modifiedBy": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    201 Created The asynchronous job for obtaining column frequency was submitted. Inline
    404 Not Found The requested CAS server or caslib does not exist. None
    409 Conflict The request could not be completed due to a conflict with the current state of the resource. Details are included in the response body. None

    Get a collection of tables

    Code samples

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

    GET /dataSources/{dataTableProviderId}/tables

    Returns a collection of tables as application/vnd.sas.data.table or application/vnd.sas.data.table.summary. Supports both loaded and unloaded tables.

    Parameters

    Parameter In Type Required Description
    start query integer false The starting index of the first item in a page. Defaults to 0.
    limit query integer false Maximum number of items to return in this page of results. The actual number of returned items may be less if the collection has been exhausted. Defaults to 10.
    dataTableProviderId path string true See Data Tables API documentation for details on dataTableProviderId. A sample value is cas~fs~serverName~fs~caslibName.
    Accept-Item header string false The desired representation. The Accept-Item options are:
    • application/vnd.sas.data.table+json
    • application/vnd.sas.data.table.summary+json
    • blank
    If the Accept-Item header is not provided, then the application/vnd.sas.data.source+json representation will be returned.
    loaded query boolean false Determines whether loaded tables are included in the results. Defaults to true. Note that a value of false does not imply that source tables should be included, only that loaded tables should be excluded.
    scope query string false When loaded tables are included, determines which loaded tables are returned. Valid values include: - all Includes tables in both session scope and global scope - global Includes only tables in global scope Defaults to all.
    sources query boolean false Determines whether source tables are included in the results. Defaults to true. Note that a value of false does not imply that loaded tables should be included, only that source tables should be excluded.

    Enumerated Values

    Parameter Value
    Accept-Item application/vnd.sas.data.table.summary+json
    Accept-Item application/vnd.sas.data.table+json

    Example responses

    400

    {
      "message": "string",
      "id": "string",
      "errorCode": 0,
      "httpStatusCode": 0,
      "details": [
        "string"
      ],
      "remediation": "string",
      "errors": [
        null
      ],
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "version": 0
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The request succeeded. The list of tables was returned. None
    400 Bad Request The request was invalid. error2
    404 Not Found The requested CAS server or caslib does not exist. None
    409 Conflict The request could not be completed due to a conflict with the current state of the resource. Details are included in the response body. None

    Get a table

    Code samples

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

    GET /dataTables/dataSources/{dataTableProviderId}/tables/{tableName}

    Returns a specific table. Supports both loaded and unloaded tables.

    Parameters

    Parameter In Type Required Description
    dataTableProviderId path string true See Data Tables API documentation for details on dataTableProviderId. A sample value is cas~fs~serverName~fs~caslibName.
    tableName path string true The name of the table.
    loaded query boolean false Determines whether a loaded table is included in the results. Defaults to true. Note that a value of false does not imply that a source table should be included, only that a loaded table should be excluded.
    scope query string false When a loaded table is included, determines which loaded table is returned. Valid values include:
    • all - Includes tables in both session scope and global scope
    • global - Includes only tables in global scope
    Defaults to all.
    sources query boolean false Determines whether a source table is included in the results. Defaults to true. Note that a value of false does not imply that a loaded table should be included, only that a source table should be excluded.
    detailGroups query array[string] false A comma-separated list of detail groups to return in the representation. Some detail groups require more time to retrieve. This parameter allows opting-in to the following detail groups in cases where they are not already included:
    • all - Include all detail groups
    • unloaded Columns - Include column counts for unloaded tables. This information is retrieved if available from the source.
    • unloadedRows - Include row counts for unloaded tables. This information is retrieved if available from the source. Row counts from HDFS are not provided.

    Enumerated Values

    Parameter Value
    detailGroups all
    detailGroups unloadedColumns
    detailGroups unloadedRows

    Example responses

    400

    {
      "message": "string",
      "id": "string",
      "errorCode": 0,
      "httpStatusCode": 0,
      "details": [
        "string"
      ],
      "remediation": "string",
      "errors": [
        null
      ],
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "version": 0
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The request succeeded. The list of tables was returned. None
    400 Bad Request The request was invalid. error2
    404 Not Found The requested CAS server or caslib does not exist. None
    409 Conflict The request could not be completed due to a conflict with the current state of the resource. Details are included in the response body. None

    Get a list of loggers

    Code samples

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

    GET /servers/{serverName}/loggers

    Returns a collection of loggers on the CAS server. Supports SAS standard paging query parameters. Supports SAS standard paging query parameters, sorting, and filtering. Schema of items returned in the response collection is included below, and are of type application/vnd.sas.cas.server.logger.summary+json.

    Parameters

    Parameter In Type Required Description
    serverName path string true Server name for which nodes are being requested.
    sessionId query string false Session ID to use when connecting to retrieve the list of nodes. If not specified, a temporary session will be used.
    start query integer false The starting index of the first item in a page. Defaults to 0.
    limit query integer false Maximum number of items to return in this page of results. The actual number of returned items may be less if the collection has been exhausted. Defaults to 10.
    filter query string(filter-criteria) false Filter criteria for returned items. The valid filter fields are the first-level fields in each item. The supported functions are and, or, not, eq, lt, le, gt, ge, contains, startsWith, endsWith and isNull. A sample query to return only worker node: filter=eq(role,controller)
    sortBy query string(sort-criteria) false Sort returned items. An example sort: sortBy=level:descending. The default sort is by name in ascending order.

    Example responses

    200

    {
      "links": [
        {
          "method": "GET",
          "rel": "up",
          "href": "/casManagement/servers/cas-shared-default/",
          "uri": "/casManagement/servers/cas-shared-default/",
          "type": "application/vnd.sas.cas.server"
        },
        {
          "method": "GET",
          "rel": "self",
          "href": "/casManagement/servers/cas-shared-default/loggers?locale=en_US&start=0&limit=50",
          "uri": "/casManagement/servers/cas-shared-default/loggers?locale=en_US&start=0&limit=50",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.cas.server.logger.summary"
        },
        {
          "method": "GET",
          "rel": "collection",
          "href": "/casManagement/servers/cas-shared-default/loggers",
          "uri": "/casManagement/servers/cas-shared-default/loggers",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.cas.server.logger.summary"
        }
      ],
      "name": "loggers",
      "accept": "application/vnd.sas.cas.server.logger.summary",
      "start": 0,
      "count": 22,
      "items": [
        {
          "version": 1,
          "name": "Admin",
          "level": "info"
        },
        {
          "version": 1,
          "name": "App",
          "level": "info"
        },
        {
          "version": 1,
          "name": "App.cas.actions",
          "level": "info"
        },
        {
          "version": 1,
          "name": "App.cas.table.eventing",
          "level": "trace"
        },
        {
          "version": 1,
          "name": "App.tk.eam.ssl.Buffer",
          "level": "fatal"
        },
        {
          "version": 1,
          "name": "App.tk.eam.ssl.openssl102.Locks",
          "level": "fatal"
        },
        {
          "version": 1,
          "name": "App.tk.eam.ssl.openssl102.Mem",
          "level": "fatal"
        },
        {
          "version": 1,
          "name": "App.tk.hps.TraceNodes",
          "level": "trace"
        },
        {
          "version": 1,
          "name": "App.tk.http.server.access",
          "level": "error"
        },
        {
          "version": 1,
          "name": "App.tk.HTTPC.debug",
          "level": "fatal"
        },
        {
          "version": 1,
          "name": "App.tk.HTTPC.wire",
          "level": "fatal"
        },
        {
          "version": 1,
          "name": "Audit",
          "level": "info"
        },
        {
          "version": 1,
          "name": "Audit.Authentication.cas.function",
          "level": "info"
        },
        {
          "version": 1,
          "name": "Audit.Authorization.cas.ACChange",
          "level": "info"
        },
        {
          "version": 1,
          "name": "Audit.Authorization.cas.function",
          "level": "info"
        },
        {
          "version": 1,
          "name": "Audit.Authorization.cas.IsAuth",
          "level": "info"
        },
        {
          "version": 1,
          "name": "Audit.Authorization.cas.persist",
          "level": "info"
        },
        {
          "version": 1,
          "name": "Audit.Authorization.cas.sync",
          "level": "info"
        },
        {
          "version": 1,
          "name": "Audit.Authorization.cas.xml",
          "level": "info"
        },
        {
          "version": 1,
          "name": "Logging",
          "level": "error"
        },
        {
          "version": 1,
          "name": "Perf.cas.actions",
          "level": "info"
        },
        {
          "version": 1,
          "name": "root",
          "level": "error"
        }
      ],
      "limit": 50,
      "version": 2
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The list of loggers for the requested CAS server was returned. casLoggerCollection
    400 Bad Request An error occurred. error2
    404 Not Found The requested CAS server does not exist. None
    409 Conflict The request could not be completed due to a conflict with the current state of the resource. Details are included in the response body. None

    Add a logger

    Code samples

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

    POST /servers/{serverName}/loggers

    Adds a logger to a CAS server and returns the logger information.

    Body parameter

    {
      "version": 1,
      "name": "App",
      "level": "info",
      "links": [
        {
          "method": "GET",
          "rel": "up",
          "href": "/casManagement/servers/cas-shared-default/loggers",
          "uri": "/casManagement/servers/cas-shared-default/loggers",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.cas.server.logger.summary"
        },
        {
          "method": "GET",
          "rel": "self",
          "href": "/casManagement/servers/cas-shared-default/loggers/App",
          "uri": "/casManagement/servers/cas-shared-default/loggers/App",
          "type": "application/vnd.sas.cas.server.logger"
        }
      ]
    }
    

    Parameters

    Parameter In Type Required Description
    serverName path string true Server name in which the logger is to be created.
    body body casServerLogger true

    Example responses

    201

    {
      "version": 1,
      "name": "App",
      "level": "info",
      "links": [
        {
          "method": "GET",
          "rel": "up",
          "href": "/casManagement/servers/cas-shared-default/loggers",
          "uri": "/casManagement/servers/cas-shared-default/loggers",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.cas.server.logger.summary"
        },
        {
          "method": "GET",
          "rel": "self",
          "href": "/casManagement/servers/cas-shared-default/loggers/App",
          "uri": "/casManagement/servers/cas-shared-default/loggers/App",
          "type": "application/vnd.sas.cas.server.logger"
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    201 Created Information about the created logger was returned. casServerLogger
    400 Bad Request An error occurred. error2
    404 Not Found The requested CAS server does not exist. None
    409 Conflict The request could not be completed due to a conflict with the current state of the resource. Details are included in the response body. None
    Response Headers
    Status Header Type Format Description
    201 Location string The location of the newly created resource.

    Get a logger

    Code samples

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

    GET /servers/{serverName}/loggers/{loggerName}

    Retrieves a single logger for a CAS server.

    Parameters

    Parameter In Type Required Description
    serverName path string true Server name for which the logger information is being requested. The media type passed to the request determines if either detailed or summary information is returned. In this version of the API, the content of both are the same. Passing an accept header of application/json is equivalent to requesting detailed information.
    sessionId query string false Session ID to use when connecting to retrieve the logger. If not specified, a temporary session will be used.

    Example responses

    200

    {
      "version": 1,
      "name": "App",
      "level": "info",
      "links": [
        {
          "method": "GET",
          "rel": "up",
          "href": "/casManagement/servers/cas-shared-default/loggers",
          "uri": "/casManagement/servers/cas-shared-default/loggers",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.cas.server.logger.summary"
        },
        {
          "method": "GET",
          "rel": "self",
          "href": "/casManagement/servers/cas-shared-default/loggers/App",
          "uri": "/casManagement/servers/cas-shared-default/loggers/App",
          "type": "application/vnd.sas.cas.server.logger.summary"
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The requested information about the logger was returned. casServerLoggerSummary
    400 Bad Request The request was invalid. error2
    404 Not Found The requested session in the requested server name does not exist, or the logger requested does not exist. None
    409 Conflict The request could not be completed due to a conflict with the current state of the resource. Details are included in the response body. None

    Update a logger

    Code samples

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

    PUT /servers/{serverName}/loggers/{loggerName}

    Updates a logger for a CAS server.

    Body parameter

    {
      "version": 1,
      "name": "App",
      "level": "info",
      "links": [
        {
          "method": "GET",
          "rel": "up",
          "href": "/casManagement/servers/cas-shared-default/loggers",
          "uri": "/casManagement/servers/cas-shared-default/loggers",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.cas.server.logger.summary"
        },
        {
          "method": "GET",
          "rel": "self",
          "href": "/casManagement/servers/cas-shared-default/loggers/App",
          "uri": "/casManagement/servers/cas-shared-default/loggers/App",
          "type": "application/vnd.sas.cas.server.logger"
        }
      ]
    }
    

    Parameters

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

    Example responses

    200

    {
      "version": 1,
      "name": "App",
      "level": "info",
      "links": [
        {
          "method": "GET",
          "rel": "up",
          "href": "/casManagement/servers/cas-shared-default/loggers",
          "uri": "/casManagement/servers/cas-shared-default/loggers",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.cas.server.logger.summary"
        },
        {
          "method": "GET",
          "rel": "self",
          "href": "/casManagement/servers/cas-shared-default/loggers/App",
          "uri": "/casManagement/servers/cas-shared-default/loggers/App",
          "type": "application/vnd.sas.cas.server.logger"
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Updated information for the specified logger was returned. casServerLogger
    304 Not Modified The logger was not modified. None
    400 Bad Request An error occurred. error2
    404 Not Found The requested session in the requested server name does not exist, or the logger requested does not exist. None
    409 Conflict The request could not be completed due to a conflict with the current state of the resource. Details are included in the response body. None

    Remove a logger

    Code samples

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

    DELETE /servers/{serverName}/loggers/{loggerName}

    Removes a logger from a CAS server.

    Parameters

    Parameter In Type Required Description
    serverName path string true Server name containing the logger.
    loggerName path string true Logger to delete.

    Example responses

    400

    Responses

    Status Meaning Description Schema
    204 No Content The logger was removed. None
    400 Bad Request An error occurred. error2
    404 Not Found The requested session in the requested server name does not exist, or the logger does not exist. None
    409 Conflict The request could not be completed due to a conflict with the current state of the resource. Details are included in the response body. None

    Get a list of policies

    Code samples

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

    GET /servers/{serverName}/policies

    Returns a collection of policies on the CAS server. Supports SAS standard paging query parameters, sorting, and filtering. Schema of items returned in the response collection is included below, and are of type application/vnd.sas.cas.server.policy.summary+json.

    Parameters

    Parameter In Type Required Description
    serverName path string true Server name for which policies are being requested.
    start query integer false The starting index of the first item in a page. Defaults to 0.
    limit query integer false Maximum number of items to return in this page of results. The actual number of returned items may be less if the collection has been exhausted. Defaults to 10.
    filter query string(filter-criteria) false Filter criteria for returned items. The valid filter fields are the first-level fields in each item. The supported functions are and, or, not, eq, lt, le, gt, ge, contains, startsWith, endsWith and isNull. A sample query to return only policies with the word 'priority' in the name: filter=contains(name,'priority')
    sortBy query string(sort-criteria) false Sort returned items. An example sort: sortBy=type:descending. The default sort is by name in ascending order.

    Example responses

    200

    {
      "links": [
        {
          "method": "GET",
          "rel": "up",
          "href": "/casManagement/servers/cas-shared-default/",
          "uri": "/casManagement/servers/cas-shared-default/",
          "type": "application/vnd.sas.cas.server"
        },
        {
          "method": "GET",
          "rel": "self",
          "href": "/casManagement/servers/cas-shared-default/policies?locale=en_US&start=0&limit=10",
          "uri": "/casManagement/servers/cas-shared-default/policies?locale=en_US&start=0&limit=10",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.cas.server.policy.summary"
        },
        {
          "method": "GET",
          "rel": "collection",
          "href": "/casManagement/servers/cas-shared-default/policies",
          "uri": "/casManagement/servers/cas-shared-default/policies",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.cas.server.policy.summary"
        }
      ],
      "name": "policies",
      "accept": "application/vnd.sas.cas.server.policy.summary",
      "start": 0,
      "count": 4,
      "items": [
        {
          "version": 1,
          "name": "cas-shared-default-priority-1",
          "type": "priorityLevels",
          "attributes": {
            "localTables": "12000000000",
            "cpu": "45",
            "globalCasuser": "33000000000",
            "globalCasuserHdfs": "15000000000"
          }
        },
        {
          "version": 1,
          "name": "cas-shared-default-priority-2",
          "type": "priorityLevels",
          "attributes": {
            "localTables": "50000000000",
            "cpu": "20",
            "globalCasuser": "50000000000",
            "globalCasuserHdfs": "50000000000"
          }
        },
        {
          "version": 1,
          "name": "cas-shared-default-priority-3",
          "type": "priorityLevels",
          "attributes": {
            "cpu": "30",
            "localTables": "10000000000",
            "globalCasuser": "10000000000",
            "globalCasuserHdfs": "10000000000"
          }
        },
        {
          "version": 1,
          "name": "globalCaslibs",
          "type": "globalCaslibs",
          "attributes": {
            "_ALL_": "400000000000",
            "HPS": "100000000000",
            "Public": "200000000000"
          }
        }
      ],
      "limit": 10,
      "version": 2
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The list of policies for the requested CAS server was returned. casPolicyCollection
    400 Bad Request An error occurred. error2
    404 Not Found The requested CAS server or policy does not exist. None
    409 Conflict The request could not be completed due to a conflict with the current state of the resource. Details are included in the response body. None

    Add a policy

    Code samples

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

    POST /servers/{serverName}/policies

    Adds a policy to a CAS server and returns the created policy information.

    Body parameter

    {
      "version": 1,
      "name": "cas-shared-default-priority-3",
      "type": "priorityLevels",
      "attributes": {
        "cpu": "30",
        "localTables": "10000000000",
        "globalCasuser": "10000000000",
        "globalCasuserHdfs": "10000000000"
      },
      "links": [
        {
          "method": "GET",
          "rel": "up",
          "href": "/casManagement/servers/cas-shared-default/policies",
          "uri": "/casManagement/servers/cas-shared-default/policies",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.cas.server.policy.summary"
        },
        {
          "method": "GET",
          "rel": "self",
          "href": "/casManagement/servers/cas-shared-default/policies/cas-shared-default-priority-3",
          "uri": "/casManagement/servers/cas-shared-default/policies/cas-shared-default-priority-3",
          "type": "application/vnd.sas.cas.server.policy"
        }
      ]
    }
    

    Parameters

    Parameter In Type Required Description
    serverName path string true Server name in which the policy is to be created.
    body body casServerPolicy true

    Example responses

    201

    {
      "version": 1,
      "name": "cas-shared-default-priority-3",
      "type": "priorityLevels",
      "attributes": {
        "cpu": "30",
        "localTables": "10000000000",
        "globalCasuser": "10000000000",
        "globalCasuserHdfs": "10000000000"
      },
      "links": [
        {
          "method": "GET",
          "rel": "up",
          "href": "/casManagement/servers/cas-shared-default/policies",
          "uri": "/casManagement/servers/cas-shared-default/policies",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.cas.server.policy.summary"
        },
        {
          "method": "GET",
          "rel": "self",
          "href": "/casManagement/servers/cas-shared-default/policies/cas-shared-default-priority-3",
          "uri": "/casManagement/servers/cas-shared-default/policies/cas-shared-default-priority-3",
          "type": "application/vnd.sas.cas.server.policy"
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    201 Created Information about the created policy was returned. casServerPolicy
    400 Bad Request An error occurred. error2
    404 Not Found The requested CAS server does not exist. None
    409 Conflict The request could not be completed due to a conflict with the current state of the resource. Details are included in the response body. None
    Response Headers
    Status Header Type Format Description
    201 Location string The location of the newly created resource.

    Get a policy

    Code samples

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

    GET /servers/{serverName}/policies/{policyName}

    Retrieves a single policy for a CAS server.

    Parameters

    Parameter In Type Required Description
    serverName path string true Server name for which the policy information is being requested. The media type passed to the request determines whether detailed or summary information is returned. In this version of the API, the content of both are the same. Passing an accept header of application/json is equivalent to requesting detailed information.

    Example responses

    200

    {
      "version": 1,
      "name": "cas-shared-default-priority-3",
      "type": "priorityLevels",
      "attributes": {
        "cpu": "30",
        "localTables": "10000000000",
        "globalCasuser": "10000000000",
        "globalCasuserHdfs": "10000000000"
      },
      "links": [
        {
          "method": "GET",
          "rel": "up",
          "href": "/casManagement/servers/cas-shared-default/policies",
          "uri": "/casManagement/servers/cas-shared-default/policies",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.cas.server.policy.summary"
        },
        {
          "method": "GET",
          "rel": "self",
          "href": "/casManagement/servers/cas-shared-default/policies/cas-shared-default-priority-3",
          "uri": "/casManagement/servers/cas-shared-default/policies/cas-shared-default-priority-3",
          "type": "application/vnd.sas.cas.server.policy.summary"
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The requested information about the policy was returned. casServerPolicySummary
    400 Bad Request An error occurred. error2
    404 Not Found The requested server name does not exist, or the policy requested does not exist. None
    409 Conflict The request could not be completed due to a conflict with the current state of the resource. Details are included in the response body. None

    Update a policy

    Code samples

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

    PUT /servers/{serverName}/policies/{policyName}

    Updates a policy for a CAS server.

    Body parameter

    {
      "version": 1,
      "name": "cas-shared-default-priority-3",
      "type": "priorityLevels",
      "attributes": {
        "cpu": "30",
        "localTables": "10000000000",
        "globalCasuser": "10000000000",
        "globalCasuserHdfs": "10000000000"
      },
      "links": [
        {
          "method": "GET",
          "rel": "up",
          "href": "/casManagement/servers/cas-shared-default/policies",
          "uri": "/casManagement/servers/cas-shared-default/policies",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.cas.server.policy.summary"
        },
        {
          "method": "GET",
          "rel": "self",
          "href": "/casManagement/servers/cas-shared-default/policies/cas-shared-default-priority-3",
          "uri": "/casManagement/servers/cas-shared-default/policies/cas-shared-default-priority-3",
          "type": "application/vnd.sas.cas.server.policy"
        }
      ]
    }
    

    Parameters

    Parameter In Type Required Description
    serverName path string true Server name for which the policy information is being updated.
    body body casServerPolicy true Fields to update in the existing policy.

    Example responses

    200

    {
      "version": 1,
      "name": "cas-shared-default-priority-3",
      "type": "priorityLevels",
      "attributes": {
        "cpu": "30",
        "localTables": "10000000000",
        "globalCasuser": "10000000000",
        "globalCasuserHdfs": "10000000000"
      },
      "links": [
        {
          "method": "GET",
          "rel": "up",
          "href": "/casManagement/servers/cas-shared-default/policies",
          "uri": "/casManagement/servers/cas-shared-default/policies",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.cas.server.policy.summary"
        },
        {
          "method": "GET",
          "rel": "self",
          "href": "/casManagement/servers/cas-shared-default/policies/cas-shared-default-priority-3",
          "uri": "/casManagement/servers/cas-shared-default/policies/cas-shared-default-priority-3",
          "type": "application/vnd.sas.cas.server.policy"
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Updated information for the specified policy was returned. casServerPolicy
    304 Not Modified The policy was not modified. None
    400 Bad Request An error occurred. error2
    404 Not Found Either the server name does not exist, or the policy for which an update is requested does not exist. None
    409 Conflict The request could not be completed due to a conflict with the current state of the resource. Details are included in the response body. None

    Remove a policy

    Code samples

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

    DELETE /servers/{serverName}/policies/{policyName}

    Removes a policy from a CAS server.

    Parameters

    Parameter In Type Required Description
    serverName path string true Server name containing the policy.
    policyName path string true Policy to delete.

    Example responses

    400

    Responses

    Status Meaning Description Schema
    204 No Content The policy was removed. None
    400 Bad Request An error occurred. error2
    404 Not Found The server name does not exist, or the policy does not exist. None
    409 Conflict The request could not be completed due to a conflict with the current state of the resource. Details are included in the response body. None

    Get the shared API settings

    Code samples

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

    GET /commons/settings

    Returns the possible settings that this API shares.

    Example responses

    200

    {
      "version": 1,
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/casManagement/commons/settings",
          "uri": "/casManagement/commons/settings"
        }
      ],
      "attributes": {
        "application.casServer": "cas-shared-default",
        "application.caslib": "AppData",
        "default.casServer": "cas-shared-default",
        "default.caslib": "Public",
        "system.casServer": "cas-shared-default",
        "system.caslib": "SystemData",
        "reference.caslib": "ReferenceData",
        "tempTablesCopiesCount": 0,
        "fileUploadEnabled": true,
        "maxFileUploadSize": 4096
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The request succeeded. settings

    Schemas

    casColumnCollection

    Properties

    Session Collection

    allOf

    Name Type Required Description
    anonymous object false This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2)
    » name string false The name of the collection.
    » start integer(int64) false The zero-based index of the first item in the collection.
    » limit integer false The number of items that were requested for the collection.
    » count integer(int64) false The number of items in the collection.
    » accept string false A space-delimited list of media types from which an Accept header may be constructed.
    » links [casServerNode/properties/links/items] false The links that apply to the collection.
    » version integer false The version number of the collection representation. This representation is version 2.

    and

    Name Type Required Description
    anonymous object false

    and

    Name Type Required Description
    anonymous object false
    » items [casColumn] false An array containing CAS column resources.

    casColumn

    Properties

    CAS Column

    Name Type Required Description
    index integer false The sequential index number of the column in the table.
    format string false The format of the column.
    formattedLength integer true The formatted length of the column.
    label string false The label of the column.
    name integer true The name of the column.
    numberFormatDecimals integer false The value of the numberFormatDecimals setting on the column.
    numberFormatLength integer false The value of the numberFormatLength setting on the column.
    rawLength integer true The raw length of the column.
    type string true The type of the column.
    version integer false Version of this object.
    indexed boolean false This value is true if the column is indexed.

    casColumnDistinctCount

    Properties

    CAS Column Distinct Count

    Name Type Required Description
    columnName string true Name of the column.
    distinctCount integer true Number of distinct values.
    missingCount integer true Number of missing values.
    truncated boolean true True if the counts were truncated. False otherwise.
    version integer false The version of this object.

    casColumnFrequency

    Properties

    CAS Column Frequency

    Name Type Required Description
    columnName string true Name of the column.
    columnType integer true The column type.
    frequency [casColumnFrequencyValue] true List of column frequency values.
    version integer false The version of this object.

    casColumnFrequencyValue

    Properties

    CAS Column Frequency Value

    Name Type Required Description
    formattedValue string true The formatted value.
    frequency integer(double) true The frequency.
    value object true The value.
    version integer false The version of this object.

    casColumnSummaryStatistics

    Properties

    CAS Column Summary Statistics

    Name Type Required Description
    CSS integer(double) true The sum of squares corrected for the mean statistic.
    USS integer(double) true The uncorrected sum of squares statistic.
    coefficientOfVariation integer(double) true The coefficient of variation statistic.
    columnName string true The summary name.
    max integer(double) true The max statistic.
    mean integer(double) true The mean statistic.
    min integer(double) true The min statistic.
    numMissingValues integer(double) true The number of missing values statistic.
    probT integer true The probT statistic.
    stdDev integer(double) true The standard deviation statistic.
    stdErr integer(double) true The standard error statistic.
    sum integer(double) true The sum statistic.
    tValue integer(double) true The tValue statistic.
    variance integer(double) true The variance statistic.
    version integer false The version of this object.

    casLoadRequest

    Properties

    CAS Load Request

    Name Type Required Description
    copies integer false Number of copies to create in memory. Defaults to 1.
    label string false Label to use on the output table.
    outputCaslibName string true Name of the output caslib to which the source table or external file will be loaded. If not specified, defaults to the caslib name containing the table to be loaded.
    outputTableName string true Name of the output CAS table. If not specified, defaults to the same name as the table being loaded.
    parameters object false A name/value pair map of additional parameters to pass when performing the load. These parameters generally are passed directly to the caslib source as part of the load operation and are specific to the source type. Exceptions include the following parameters, which are passed directly to the load operation: * importOptions * groupBy * orderBy * vars See the CAS action documentation for loadTable for details on the valid parameter values.
    replace boolean false If true, any pre-existing table with the same name will be replaced. Defaults to false. Note that already-loaded global tables cannot be replaced.
    replaceMode string false When replace is true, the replace mode to use when the table is already at loaded state. Valid values include: * always - always replace * newer - replace only if the source table is newer than the last time the table was loaded If omitted, defaults to always.
    scope string false Scope to which to load the table. Valid values include \session\ and \global. Defaults to \global.

    casSaveRequest

    Properties

    CAS Save Request

    Name Type Required Description
    caslibName string false Name of the output caslib to which the source table or external file will be written. If not specified, defaults to the caslib name containing the table to be saved.
    format string false Format of the output file. Valid values include sashdat, csv. Defaults to sashdat.
    replace boolean false If true, any pre-existing table with the same name will be replaced. Defaults to false.
    compress boolean false If true and saving to a sashdat, the saved table will be compressed. Defaults to false.
    tableName string false Name of the output table or external file. If specified, this name will always be used. The filename extension will always honor the format requested (or default to sashdat). If this parameter is not specified, the name defaults to the same name as the source of the table being saved, provided it differs in case only from the name of the table being saved. If no source table name is available, then the name will be the same as the table. The following table shows sample scenarios and the value chosen by default for the tableName when this parameter is omitted.
    tablestatesourceformatdefault tableName
    MOREDATAloadedsashdatMOREDATA.sashdat
    MYDATAloadedMyData.sashdatMyData.sashdat
    MYDATAloadedMyData.sashdatcsvMyData.csv
    DATA2unloadeddata2.csvdata2.sashdat
    DATA3unloadeddata3.csvcsvdata3.csv
    DATA4loadedOtherData.csvDATA4.sashdat
    DATA5unloadedOtherData.csvcsvDATA5.csv
    sourceTableName any false Normally, the source table name for an unloaded table will be determined automatically and this option need not be specified. If specified, this specific source table name will be used as the source data to read for the save table operation.
    parameters object false A name/value pair map of additional parameters to pass when performing the save in the event that the table being saved is not already in memory as a CAS table and needs to be accessed from the source. These parameters generally are passed directly to the caslib source when accessing the data and are specific to the source type. Exceptions include the following parameters, which are passed directly to the save operation: * importOptions * groupBy * orderBy * vars See the CAS action documentation for saveTable for details on the valid parameter values.

    casServerCollection

    Properties

    CAS Server Collection

    allOf

    Name Type Required Description
    anonymous casColumnCollection/allOf/0 false This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2)

    and

    Name Type Required Description
    anonymous object false

    and

    Name Type Required Description
    anonymous object false
    » items [casServer] false An array containing casServer resources.

    casServer

    Properties

    CAS Server

    Name Type Required Description
    description string true Description of the server.
    host string true Host name or IP address of the server.
    links [casServerNode/properties/links/items] false The navigable links relative to this media type.
    name string true The unique server name.
    port integer true Port on which the server is running.
    restPort integer true Port on which the REST server is running.
    restProtocol string true The protocol the REST server is using. Values include http or https.
    version integer true The version of the schema.
    tags stringArray false An array of tag values set on the server.

    casServerConnection

    Properties

    CAS Server Connection

    Name Type Required Description
    host string true Host name or IP address of the server.
    links [casServerNode/properties/links/items] false The navigable links relative to this media type.
    port integer true Port on which the server is running.
    serverName string true The unique server name.
    sessionId string false Session ID associated with the connection.
    version integer false The version of the schema.

    casServerMetrics

    Properties

    CAS Server Metrics

    Name Type Required Description
    cpuSystemTime number(double) true System CPU time.
    cpuUserTime number(double) true User CPU time.
    elapsedTime number(double) true Elapsed time.
    host string true Host name or IP address of the server.
    links [casServerNode/properties/links/items] false The navigable links relative to this media type.
    memory integer(int64) true Total memory.
    memoryOs integer(int64) true OS memory.
    memoryQuota integer(int64) true Memory quota.
    memorySystem integer(int64) true System memory.
    port integer true The port on which the server is running.
    serverName string true The unique server name.
    systemCores integer true Number of system cores.
    systemNodes integer true Number of system nodes.
    systemTotalMemory integer(int64) true Total system memory.
    userId string true Owner of the server process.
    version integer false The version of the schema.

    casSessionCollection

    Properties

    Session Collection

    Name Type Required Description
    Session Collection any false The list of sessions for the requested CAS server.

    allOf

    Name Type Required Description
    anonymous casColumnCollection/allOf/0 false This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2)

    and

    Name Type Required Description
    anonymous object false

    and

    Name Type Required Description
    anonymous object false
    » items [casSession] false An array containing CAS session resources.

    casSession

    Properties

    Session

    Name Type Required Description
    authenticationType string true The type of authentication used by the session. Valid values include OAuth, Windows, SSPI, External, PAM, Kerberos.
    id string true ID of the session.
    locale string false The locale of the session. If creating a new session, defaults to the locale of the Accept-Language header passed to the request. Sample values include en-us (US English), zh-cn (Chinese Simplified), ko-kr (Korean).
    name string false Name of the session. If not specified, defaults to casManagement.
    nodeCount integer false Number of nodes the session will use in the grid.
    owner string true Owner of the session.
    state string true Connected state of the session. Valid values include Inactive, Connected, Disconnected, Exception, Terminate, Removed.
    timeOut integer false Number of seconds after the last connection to the session is closed before session is terminated.

    casSessionSummary

    Properties

    Session Summary

    Name Type Required Description
    authenticationType string true The type of authentication used by the session. Valid values include OAuth, Windows, SSPI, External, PAM, Kerberos.
    id string true ID of the session.
    links [casServerNode/properties/links/items] false The navigable links relative to this media type.
    name string false Name of the session.
    owner string true Owner of the session.
    state string true Connected state of the session. Valid values include Inactive, Connected, Disconnected, Exception, Terminate, Removed.
    transactionState string false State of transaction on the session. Valid values include started and none.

    casSourceTableCollection

    Properties

    Source Table or File Collection

    allOf

    Name Type Required Description
    anonymous casColumnCollection/allOf/0 false This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2)

    and

    Name Type Required Description
    anonymous object false

    and

    Name Type Required Description
    anonymous object false

    and

    Name Type Required Description
    anonymous object false
    » items [casSourceTable] false An array containing CAS source table or file resources.

    casSourceTable

    Properties

    CAS Source Table or File

    Name Type Required Description
    attributes object false List of key/object pairs for the attributes of the source table. For example, a path-based CAS library may include attributes for file system attributes, like owner, group, time, permission, or size as reported by the underlying filesystem. A database CAS library may include attributes like catalog or schema.
    name string true Name of the table.
    lastModified string false Date/time the source file or table was last modified (when available).

    casTableReference

    Properties

    Table Reference

    Name Type Required Description
    sessionId string false Session ID of the table. For tables in session scope, the session ID is required to access it.
    sourceCaslibName string false Optional name of the source caslib corresponding to the table.
    sourceTableName string false Optional name of the source table file corresponding to the table.
    tableUri string true Reference to the table.

    caslibCollection

    Properties

    Caslib Collection

    allOf

    Name Type Required Description
    anonymous casColumnCollection/allOf/0 false This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2)

    and

    Name Type Required Description
    anonymous object false

    and

    Name Type Required Description
    anonymous object false
    » items [caslib] false An array containing caslib resources.

    caslib

    Properties

    Caslib

    Name Type Required Description
    attributes [keyValueModel] false Contains an array of key/object pairs related to caslib type-specific settings. Supports simple object types (string, boolean, integer, long) as well as nested arrays. See reference documentation for specific caslib types to determine proper key/object pairs for defining a specific caslib.
    description string false Description of the caslib.
    name string true Name of the caslib.
    path string false The path of the caslib.
    scope string false The scope of the caslib. Valid values include session or global.
    hidden boolean false The hidden value of the caslib. True if this is a hidden caslib. False otherwise.
    transient boolean false The transient value of the caslib. True if this is a transient caslib. False otherwise.
    type string true Type of the caslib. Valid values include any caslib type supported by the CAS server. A partial list of sample values include path, hdfs, dnfs, lasr, teradata, greenplum, oracle
    version integer false The version of this object.

    caslibCreateRequest

    Properties

    Caslib Create Request

    Name Type Required Description
    caslib caslib true The representation of a caslib. Note that links are only returned for GET calls.
    createDirectory boolean false Indicates whether the directory in the filesystem should be created when defining the caslib.
    permission string false If the directory is being created, determines the permission to set on the filesystem directory. Valid values include GROUPREAD, GROUPWRITE, GROUPWRITEPUBLICREAD, PRIVATE, PUBLICREAD, and PUBLICWRITE.
    version integer false The version of this object.

    keyValueModel

    Properties

    Key/Value Array

    Name Type Required Description
    key string true The key name.
    value object false The value of the key.

    attributesMap

    Properties

    Attributes Nap

    Name Type Required Description
    application applicationCaslib false The CAS server and caslib containing application data, such as map data.
    default defaultCaslib false The default CAS server and caslib for users.
    reference referenceCaslib false The CAS server and caslib containing reference data.
    system systemCaslib false The CAS server and caslib used by the system for data produced during normal operation, such as audit records and monitoring data
    tempTablesCopiesCount integer false The number of extra copies of temporary tables.
    fileUploadEnabled boolean false The setting used to enable/disable local file uploads.
    maxFileUploadSize integer false The maximum file size in megabytes allowed for local file uploads. A value of -1 indicates no size limit.

    applicationCaslib

    Properties

    Application Caslib

    Name Type Required Description
    casServer string false The name of the CAS server.
    caslib string false The name of the CAS library.

    defaultCaslib

    Properties

    Default Caslib

    Name Type Required Description
    casServer string false The name of the CAS server.
    caslib string false The name of the CAS library.

    referenceCaslib

    Properties

    Reference Caslib

    Name Type Required Description
    casServer string false The name of the CAS server.
    caslib string false The name of the CAS library.

    systemCaslib

    Properties

    System Caslib

    Name Type Required Description
    casServer string false The name of the CAS server.
    caslib string false The name of the CAS library.

    settings

    Properties

    CAS Management Service Settings

    Name Type Required Description
    version integer true Version information for this attribute list.
    links [casServerNode/properties/links/items] true The navigable links relative to this media type.
    attributes attributesMap true The settings for this service.

    stringArray

    Properties

    String Array

    Name Type Required Description
    value string true An individual string value.

    tableCollection

    Properties

    Tables Collection

    allOf

    Name Type Required Description
    anonymous casColumnCollection/allOf/0 false This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2)

    and

    Name Type Required Description
    anonymous object false

    and

    Name Type Required Description
    anonymous object false

    and

    Name Type Required Description
    anonymous object false
    » items [tableDetails] false An array containing table resources.

    tableDetails

    Properties

    Table Details

    Name Type Required Description
    attributes object false List of key/object pairs for additional attributes of the source table. For example, a path-based CAS library may include attributes for file system attributes, like owner, group, time, permission, or size as reported by the underlying filesystem.
    characterSet string true Character set of the table.
    columnCount integer(int64) true Number of columns in the table.
    created string true Date created represented as a string.
    createdBy string true User who created the table in memory. This is the last user who changed the state of the table to 'loaded'.
    encoding string true Encoding of the table.
    lastModified string true Date last modified represented as a string.
    lastModifiedBy string false User who last modified the loaded table in memory. This value is only returned if the in-memory table has been modified. Otherwise, the table has not been modified since loaded by the 'createdBy' user.
    lastAccessed string false For loaded tables only, the date last accessed represented as a string.
    sourceLastModified string false Date the source file or table was last modified (when available).
    label string false Label of the table, if available.
    name string true Name of the table.
    repeated boolean false True if the table is repeated.
    rowCount integer(int64) false Number of rows in the table. Depending upon the cost of obtaining this value, it may be omitted in some cases.
    scope string true For a table with state of loaded, the scope of the loaded table. Valid values are session or global.
    state string true Indicates whether a table is loaded into CAS. Valid values are loaded or unloaded.
    tableReference casTableReference false Table reference information.

    casServerNodeCollection

    Properties

    Node Collection

    allOf

    Name Type Required Description
    anonymous casColumnCollection/allOf/0 false This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2)

    and

    Name Type Required Description
    anonymous object false

    and

    Name Type Required Description
    anonymous object false

    and

    Name Type Required Description
    anonymous object false
    » items [casServerNode] false An array containing node resources.

    casServerNode

    Properties

    CAS Server Node

    Name Type Required Description
    name string true The fully qualified domain name of the server node.
    role string true The role of the node either 'controller' or 'worker'.
    ipAddress string true The IP address of the node.
    connected boolean true True if connected to CAS.
    links [any] true The navigable links relative to this media type.
    » Link object false A link to a related operation or resource.
    »» method string false The HTTP method for the link.
    »» rel string true The relationship of the link to the resource.
    »» uri string false The relative URI for the link.
    »» href string false The URL for the link.
    »» title string false The title for the link.
    »» type string false The media type or link type for the link.
    »» itemType string false If this is a link to a container, itemType is the media type or link type for the items in the container.
    »» responseType string false The media type or link type of the response body for a PUT, POST, or PATCH operation.
    »» responseItemType string false The media type or link type of the items in the response body for a PUT, POST, or PATCH operation.
    » version integer true Version of the schema. This is version 2.

    casServerNodeCreateResponse

    Properties

    CAS Server Node Create Response

    Name Type Required Description
    name string true The fully qualified domain name of the server node.
    role string true The role of the node either 'controller' or 'worker'.
    ipAddress string true The IP address of the node.
    connected boolean true True if connected to CAS.
    links [casServerNode/properties/links/items] true The navigable links relative to this media type.
    version integer true Version of the schema. This is version 2.

    casServerNodeCreateRequest

    Properties

    CAS Server Node Create Request

    Name Type Required Description
    name string true The fully qualified domain name of the server node.

    casLoggerCollection

    Properties

    Logger Collection

    allOf

    Name Type Required Description
    anonymous casColumnCollection/allOf/0 false This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2)

    and

    Name Type Required Description
    anonymous object false

    and

    Name Type Required Description
    anonymous object false

    and

    Name Type Required Description
    anonymous object false
    » items [casServerLoggerSummary] false An array containing logger resources.

    casServerLoggerSummary

    Properties

    CAS Server Logger Summary

    Name Type Required Description
    name string true The name of the logger.
    level string true The level of the logger. Valid level values include info, warn, error, fatal, debug, and trace.
    links [casServerNode/properties/links/items] false The navigable links relative to this media type.
    version integer true Version of the schema. This is version 1.

    casServerLogger

    Properties

    CAS Server Logger

    Name Type Required Description
    name string true The name of the logger.
    level string true The level of the logger. Valid level values include info, warn, error, fatal, debug, and trace.
    applyToController boolean false This property is used only when modifying logger settings. It is not returned when reading settings. If true, the change will apply both at the controller level and session level. If true, applyToNewSessions option is treated as true.
    applyToNewSessions boolean false This property is used only when modifying logger settings. It is not returned when reading settings. If true, the change will not only apply to the current session, but will apply to newly created sessions on the CAS server. If false, the change will only apply to the current session, and will not apply to future sessions. Defaults to false if unspecified. If applyToController is set to true, then the change will always apply to new sessions, and applyToNewSessions property is ignored.
    links [casServerNode/properties/links/items] false The navigable links relative to this media type.
    version integer true Version of the schema. This is version 1.

    casPolicyCollection

    Properties

    Policy Collection

    allOf

    Name Type Required Description
    anonymous casColumnCollection/allOf/0 false This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2)

    and

    Name Type Required Description
    anonymous object false

    and

    Name Type Required Description
    anonymous object false

    and

    Name Type Required Description
    anonymous object false
    » items [casServerPolicySummary] false An array containing policy resources.

    casServerPolicySummary

    Properties

    CAS Server Policy Summary

    Name Type Required Description
    name string true The name of the policy.
    type string true The type of the policy. Valid type values include globalCaslibs, priorityLevels, and priorityAssignments.
    attributes [keyValueModel] true List of key/value pairs for the attributes of the policy. See the CAS documentation for details on valid keys and values for each policy type.
    links [casServerNode/properties/links/items] false The navigable links relative to this media type.
    version integer true Version of the schema. This is version 1.

    casServerPolicy

    Properties

    CAS Server Policy

    Name Type Required Description
    name string true The name of the policy.
    type string true The type of the policy. Valid type values include globalCaslibs, priorityLevels, and priorityAssignments.
    attributes [keyValueModel] false List of key/value pairs for the attributes of the policy. See the CAS documentation for details on valid keys and values for each policy type.
    links [casServerNode/properties/links/items] false The navigable links relative to this media type.
    version integer true Version of the schema. This is version 1.

    error2

    Properties

    Error

    Name Type Required Description
    message string false The message for the error.
    id string false The string ID for the error.
    errorCode integer false The numeric ID for the error.
    httpStatusCode integer true The HTTP status code for the error.
    details [string] false Messages that provide additional details about the cause of the error.
    remediation string false A message that describes how to resolve the error.
    errors [error2] false Any additional errors that occurred.
    links [casServerNode/properties/links/items] false The links that apply to the error.
    version integer true The version number of the error representation. This representation is version 2.

    Usage Notes

    Overview

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

    HEAD Support

    Note that HEAD is supported for every GET request documented in the API. Simply change the HTTP verb from GET to HEAD, leaving other parameters the same.

    Provider Implementation

    The CAS Management API implements endpoints necessary to be classified as both a data sources provider and data tables provider for the Data Sources and Data Tables APIs. The Data Sources and Data Tables APIs enable you to reference data sources and data tables independent of the underlying provider.

    Endpoints for the Data Sources and Data Tables APIs that contain the Provider tag support additional provider-specific endpoint parameters. See the documentation for those APIs for information about the provider endpoints.

    This documentation details endpoints specific to the CAS Management API, as well as endpoints that extend the Data Sources and Data Tables APIs. As a result, the API can be exercised in the following ways:

    Note

    When accessed via the provider endpoints, the term source is used to refer to a location containing tables and, for this provider, CAS tables. A source in this context could be either a CAS server or a CAS library.

    Within a CAS library, however, there is also the concept of a data source. In this context, a source refers to the source table or tables accessible by a given CAS library. Endpoints within this documentation with a Sources tag refer to the caslib sources, not provider sources. This is an important distinction to understand when using the CAS Management API, as the CAS Management API sits between the data management standards and CAS, which both use the term source.

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

    Terminology

    CAS server

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

    CAS policy

    settings for managing resource utilization in a CAS server.

    CAS node

    the controller or worker process providing Cloud Analytic Services functionality.

    CAS session

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

    Caslib

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

    CAS source

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

    CAS table

    rectangular data that has been made available in a caslib.

    CAS column

    a column of rectangular data in a CAS table.

    format library

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

    provider

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

    Resources

    Entity Relationship Diagram

    Entity Relationship Diagram

    Root

    Path: '/'

    The root of the API. This resource contains links to the top-level resources in the API. The response uses the 'application/vnd.sas.api' media type.

    The 'GET /' response include the following links.

    Relation Method Description
    collection GET Returns the a collection of the top-level resources in the API.
    Response type:application/vnd.sas.collection
    Response item type: 'application/vnd.sas.cas.server'

    CAS Servers

    Path: '/servers'

    This endpoint provides a collection of CAS server resources.

    The response includes the following links:

    Relation Method Description
    collection GET Returns a collection of CAS server resources.
    Request type: application/vnd.sas.cas.format.source
    Response type: application/vnd.sas.cas.format.library

    Media Types

    application/vnd.sas.api

    Contains top-level links for this API. See application/vnd.sas.api.

    application/vnd.sas.collection

    A paginated, filterable, sortable collection of resource representations. See application/vnd.sas.collection.

    In this API, this media type represents the collection of one of the resources provided by the API, as indicated in the following table:

    Collection Item type
    servers application/vnd.sas.cas.server
    policies application/vnd.sas.cas.server.policy
    nodes application/vnd.sas.cas.server.node
    sessions application/vnd.sas.cas.session.summary
    caslibs application/vnd.sas.cas.caslib
    tables application/vnd.sas.cas.table
    sources application/vnd.sas.cas.source.table
    columns application/vnd.sas.cas.column

    application/vnd.sas.error

    Contains information about an error that occurred in the request. See application/vnd.sas.error

    application/vnd.sas.cas.server

    Detail information about a CAS server.

    This media type is described by casServer.

    This media type includes the following links:

    Relation Method URI Description
    up GET /servers Returns the collection of CAS server definitions.
    self GET /servers/{serverName} Returns the definition of the CAS server.
    connection GET /servers/{serverName}/connection Returns connection information for server.
    state GET /servers/{serverName}/state Returns state information for server. Returns 'running' or 'stopped'.
    metrics GET /servers/{serverName}/metrics Returns metrics for server.
    sessions GET /servers/{serverName}/sessions Returns the sessions collection.
    createSession POST /servers/{serverName}/sessions Creates a new session on the server.
    caslibs GET /servers/{serverName}/caslibs Returns the caslibs collection.
    dataSource GET /dataSources/providers/cas/sources/{serverName} Returns the dataSources service representation of this CAS server.
    application/vnd.sas.cas.server+json

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

    { "version": 1, "name": "cas-shared-default", "description": "controller", "host": "myhost.example.com", "port": 5570, "restPort": 8777, "restProtocol": "http", "links": [ { "method": "GET", "rel": "up", "href": "/casManagement/servers", "uri": "/casManagement/servers", "type": "application/vnd.sas.collection", "itemType": "application/vnd.sas.cas.server" }, { "method": "GET", "rel": "self", "href": "/casManagement/servers/cas-shared-default", "uri": "/casManagement/servers/cas-shared-default", "type": "application/vnd.sas.cas.server" }, { "method": "GET", "rel": "connection", "href": "/casManagement/servers/cas-shared-default/connection", "uri": "/casManagement/servers/cas-shared-default/connection", "type": "application/vnd.sas.cas.server.connection" }, { "method": "GET", "rel": "state", "href": "/casManagement/servers/cas-shared-default/state", "uri": "/casManagement/servers/cas-shared-default/state", "type": "text/plain" }, { "method": "PUT", "rel": "updateState", "href": "/casManagement/servers/cas-shared-default/state", "uri": "/casManagement/servers/cas-shared-default/state", "type": "text/plain" }, { "method": "GET", "rel": "nodes", "href": "/casManagement/servers/cas-shared-default/nodes", "uri": "/casManagement/servers/cas-shared-default/nodes", "type": "application/vnd.sas.collection", "itemType": "application/vnd.sas.cas.server.node" }, { "method": "GET", "rel": "metrics", "href": "/casManagement/servers/cas-shared-default/metrics", "uri": "/casManagement/servers/cas-shared-default/metrics", "type": "application/vnd.sas.cas.server.metrics" }, { "method": "GET", "rel": "sessions", "href": "/casManagement/servers/cas-shared-default/sessions", "uri": "/casManagement/servers/cas-shared-default/sessions", "type": "application/vnd.sas.collection", "itemType": "application/vnd.sas.cas.session.summary" }, { "method": "POST", "rel": "createSession", "href": "/casManagement/servers/cas-shared-default/sessions", "uri": "/casManagement/servers/cas-shared-default/sessions", "type": "application/vnd.sas.cas.session", "responseType": "application/vnd.sas.cas.session" }, { "method": "GET", "rel": "caslibs", "href": "/casManagement/servers/cas-shared-default/caslibs", "uri": "/casManagement/servers/cas-shared-default/caslibs", "type": "application/vnd.sas.collection", "itemType": "application/vnd.sas.cas.caslib" }, { "method": "GET", "rel": "casProxy", "href": "/casProxy/servers/cas-shared-default/cas", "uri": "/casProxy/servers/cas-shared-default/cas", "type": "application/json" }, { "method": "GET", "rel": "dataSource", "href": "/dataSources/providers/cas/sources/cas-shared-default", "uri": "/dataSources/providers/cas/sources/cas-shared-default", "type": "application/vnd.sas.data.source" } ], "tags": [ "appServerEnabled=True", "rootLibPath=/opt/sas/viya/config/data/cas/default" ] }

    application/vnd.sas.cas.server.connection

    CAS server connection information.

    This media type is described by casServerConnection.

    This media type includes the following links:

    Relation Method URI Description
    self GET /servers/{serverName}/connection Returns connection information for the CAS server.
    up GET /servers/{serverName} Returns the definition of the CAS server.
    application/vnd.sas.cas.server.connection+json

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

    { "version": 1, "serverName": "cas-shared-default", "sessionId": "1234-5432-1234-5423", "host": "myhost.example.com", "port": 5570, "links": [ { "method": "GET", "rel": "self", "href": "/casManagement/servers/cas-shared-default/connection", "uri": "/casManagement/servers/cas-shared-default/connection", "type": "application/vnd.sas.cas.server.connection" }, { "method": "GET", "rel": "up", "href": "/casManagement/servers/cas-shared-default", "uri": "/casManagement/servers/cas-shared-default", "type": "application/vnd.sas.cas.server" } ] }

    application/vnd.sas.cas.server.metrics

    Metrics about a running CAS server.

    This media type is described by casServerMetrics.

    This media type includes the following links:

    Relation Method URI Description
    self GET /servers/{serverName}/metrics Returns metrics for the CAS server.
    up GET /servers/{serverName} Returns the definition of the CAS server.
    application/vnd.sas.cas.server.metrics+json

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

    { "version": 1, "serverName": "cas-shared-default", "host": "myhost.example.com", "port": 5570, "cpuUserTime": 0.002, "elapsedTime": 0.003381, "systemCores": 16, "systemTotalMemory": 64380059648, "memoryOs": 9752576, "systemNodes": 1, "memoryQuota": 9752576, "memory": 355424, "links": [ { "method": "GET", "rel": "self", "href": "/casManagement/servers/cas-shared-default/metrics", "uri": "/casManagement/servers/cas-shared-default/metrics", "type": "application/vnd.sas.cas.server.metrics" }, { "method": "GET", "rel": "up", "href": "/casManagement/servers/cas-shared-default", "uri": "/casManagement/servers/cas-shared-default", "type": "application/vnd.sas.cas.server" } ] }

    application/vnd.sas.cas.server.policy.summary

    Detail information about a CAS server resource management policy.

    This media type is described by casServerPolicy.

    This media type includes the following links:

    Relation Method URI Description
    up GET /servers/{serverName}/policies Returns the collection of CAS server policies.
    self GET /servers/{serverName}/policies/{policyName} Returns policy information for the CAS server.
    application/vnd.sas.cas.server.policy+json

    Here are examples of the JSON representation of this media type.

    Priority Level Policy Example

    { "version": 1, "name": "cas-shared-default-priority-1", "type": "priorityLevels", "attributes": { "cpu": "30", "localTables": "10000000000", "globalCasuser": "10000000000", "globalCasuserHdfs": "10000000000" }, "links": [ { "method": "GET", "rel": "up", "href": "/casManagement/servers/cas-shared-default/policies", "uri": "/casManagement/servers/cas-shared-default/policies", "type": "application/vnd.sas.collection", "itemType": "application/vnd.sas.cas.server.policy.summary" }, { "method": "GET", "rel": "self", "href": "/casManagement/servers/cas-shared-default/policies/cas-shared-default-priority-3", "uri": "/casManagement/servers/cas-shared-default/policies/cas-shared-default-priority-3", "type": "application/vnd.sas.cas.server.policy" } ] }

    Global Caslibs Policy Example

    { "version": 1, "name": "cas-shared-default-priority-1", "type": "priorityLevels", "attributes": { "cpu": "30", "localTables": "10000000000", "globalCasuser": "10000000000", "globalCasuserHdfs": "10000000000" }, "links": [ { "method": "GET", "rel": "up", "href": "/casManagement/servers/cas-shared-default/policies", "uri": "/casManagement/servers/cas-shared-default/policies", "type": "application/vnd.sas.collection", "itemType": "application/vnd.sas.cas.server.policy.summary" }, { "method": "GET", "rel": "self", "href": "/casManagement/servers/cas-shared-default/policies/cas-shared-default-priority-3", "uri": "/casManagement/servers/cas-shared-default/policies/cas-shared-default-priority-3", "type": "application/vnd.sas.cas.server.policy" } ] }

    Priority Assignments Policy Example

    { "version": 1, "name": "cas-shared-default-priority-1", "type": "priorityLevels", "attributes": { "cpu": "30", "localTables": "10000000000", "globalCasuser": "10000000000", "globalCasuserHdfs": "10000000000" }, "links": [ { "method": "GET", "rel": "up", "href": "/casManagement/servers/cas-shared-default/policies", "uri": "/casManagement/servers/cas-shared-default/policies", "type": "application/vnd.sas.collection", "itemType": "application/vnd.sas.cas.server.policy.summary" }, { "method": "GET", "rel": "self", "href": "/casManagement/servers/cas-shared-default/policies/cas-shared-default-priority-3", "uri": "/casManagement/servers/cas-shared-default/policies/cas-shared-default-priority-3", "type": "application/vnd.sas.cas.server.policy" } ] }

    application/vnd.sas.cas.session.summary

    Summary information about a CAS session.

    This media type is described by casSessionSummary.

    This media type includes the following links:

    Relation Method URI Description
    self GET /servers/{serverName}/sessions/{sessionId} Returns information about the specified session.
    up GET /servers/{serverName}/sessions Returns information about all sessions.
    delete DELETE /servers/{serverName}/sessions/{sessionId} Ends the session.
    application/vnd.sas.cas.session+json

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

    { "version": 2, "id": "b3a9d3f9-1095-d848-85d4-02b19fc4e5cf", "name": "casManagement:Sat Sep 23 00:30:07 2017", "state": "Connected", "transactionState": "none", "authenticationType": "OAuth", "owner": "userId", "links": [ { "method": "GET", "rel": "up", "href": "/casManagement/servers/cas-shared-default/sessions", "uri": "/casManagement/servers/cas-shared-default/sessions", "type": "application/vnd.sas.collection", "itemType": "application/vnd.sas.cas.session.summary" }, { "method": "GET", "rel": "self", "href": "/casManagement/servers/cas-shared-default/sessions/b3a9d3f9-1095-d848-85d4-02b19fc4e5cf", "uri": "/casManagement/servers/cas-shared-default/sessions/b3a9d3f9-1095-d848-85d4-02b19fc4e5cf", "type": "application/vnd.sas.cas.session.summary" }, { "method": "DELETE", "rel": "delete", "href": "/casManagement/servers/cas-shared-default/sessions/b3a9d3f9-1095-d848-85d4-02b19fc4e5cf", "uri": "/casManagement/servers/cas-shared-default/sessions/b3a9d3f9-1095-d848-85d4-02b19fc4e5cf" }, { "method": "POST", "rel": "startPermissionsTransaction", "href": "/casManagement/servers/cas-shared-default/sessions/b3a9d3f9-1095-d848-85d4-02b19fc4e5cf?action=start", "uri": "/casManagement/servers/cas-shared-default/sessions/b3a9d3f9-1095-d848-85d4-02b19fc4e5cf?action=start", "itemType": "text/plain" } ] }

    application/vnd.sas.cas.server.node

    Summary information about a CAS server node..

    This media type is described by casServerNode.

    This media type includes the following links:

    Relation Method URI Description
    self GET /casManagement/servers/cas-shared-default/nodes/mynode.example.com Returns information about the specified node.
    up GET /casManagement/servers/cas-shared-default/nodes Returns information about all nodes for the CAS server.
    delete GET /casManagement/servers/cas-shared-default/nodes/mynode.example.com Removes the specified node.

    application/vnd.sas.cas.caslib

    Detailed information about a caslib.

    This media type is described by caslib.

    This media type includes the following links:

    Relation Method URI Description
    up GET /servers/{serverName}/caslibs Returns information about all caslibs.
    self GET /servers/{serverName}/caslibs/{caslibName} Returns information about the specified caslib.
    patch PATCH /servers/{serverName}/caslibs/{caslibName} Modifies a caslib definition. Only certain common caslib settings can be modified by this call.
    delete DELETE /servers/{serverName}/caslibs/{caslibName} Deletes the caslib definition.
    tables GET /servers/{serverName}/caslibs/{caslibName}/tables Returns the tables collection for this caslib.
    sources GET /servers/{serverName}/caslibs/{caslibName}/sources Returns the sources collection for this caslib.
    dataSource GET /dataSources/providers/cas/sources/{serverName}~fs~{caslibName} Returns the dataSources service link for this caslib.
    application/vnd.sas.cas.caslib+json

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

    { "version": 1, "name": "Public", "type": "PATH", "description": "Shared and writeable caslib, accessible to all users.", "scope": "global", "path": "/opt/sas/viya/config/data/cas/default/public/", "hidden": false, "attributes": { "active": false, "personal": false, "subDirs": true }, "links": [ { "method": "GET", "rel": "up", "href": "/casManagement/servers/cas-shared-default/caslibs", "uri": "/casManagement/servers/cas-shared-default/caslibs", "type": "application/vnd.sas.collection", "itemType": "application/vnd.sas.cas.caslib" }, { "method": "GET", "rel": "self", "href": "/casManagement/servers/cas-shared-default/caslibs/Public", "uri": "/casManagement/servers/cas-shared-default/caslibs/Public", "type": "application/vnd.sas.cas.caslib" }, { "method": "PATCH", "rel": "patch", "href": "/casManagement/servers/cas-shared-default/caslibs/Public", "uri": "/casManagement/servers/cas-shared-default/caslibs/Public", "type": "application/vnd.sas.cas.caslib", "responseType": "application/vnd.sas.cas.caslib" }, { "method": "DELETE", "rel": "delete", "href": "/casManagement/servers/cas-shared-default/caslibs/Public", "uri": "/casManagement/servers/cas-shared-default/caslibs/Public" }, { "method": "GET", "rel": "tables", "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables", "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables", "type": "application/vnd.sas.collection", "itemType": "application/vnd.sas.cas.table" }, { "method": "GET", "rel": "sources", "href": "/casManagement/servers/cas-shared-default/caslibs/Public/sources", "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/sources", "type": "application/vnd.sas.collection", "itemType": "application/vnd.sas.cas.source.table" }, { "method": "GET", "rel": "dataSource", "href": "/dataSources/providers/cas/sources/cas-shared-default~fs~Public", "uri": "/dataSources/providers/cas/sources/cas-shared-default~fs~Public", "type": "application/vnd.sas.data.source" } ], "transient": false }

    application/vnd.sas.cas.table

    Represents details of a table. A table in this context refers to a combined representation of both the CAS table as well the source table with which it is associated.

    This media type is described by tableDetails.

    This media type includes the following links:

    Relation Method URI Description
    self GET /servers/{serverName}/caslibs/{caslibName}/tables/{tableName} Returns information about the specified table.
    up GET /servers/{serverName}/caslibs/{caslibName}/tables Returns information about all tables in the specified caslib.
    delete DELETE /servers/{serverName}/caslibs/{caslibName}/tables/{tableName} Deletes (permanently remove) the table from the source of the caslib. This is not the same as an unload. See the stateChange link relation for load/unload functionality.
    save POST /servers/{serverName}/caslibs/{caslibName}/tables/{tableName} Saves the table to a source table/file in the source location of the caslib.
    summaryStatistics GET /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/summaryStatistics Retrieves the summary statistics for all columns in this table.
    distinctCount GET /casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/distinctCount Retrieves distinct count of columns in this table.
    updateState PUT /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/state Changes the loaded/unloaded state of the table.
    updateScope PUT /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/scope Changes the global scope of the table. Used to promote a session table to global scope.
    columns GET /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns Returns information about all columns in the specified table.
    dataTable GET /dataTables/dataSources/cas~fs~cas-shared-default~fs~Public/tables/CONTACTS Returns the dataTables service representation of this table.
    application/vnd.sas.cas.table+json

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

    { "version": 1, "name": "CONTACTS", "tableReference": { "tableUri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~Public/tables/CONTACTS", "sessionId": "b3a9d3f9-1095-d848-85d4-02b19fc4e5cf", "sourceTableName": "Contacts.sashdat" }, "scope": "global", "state": "loaded", "repeated": false, "created": "2017-09-21T18:52:43.580Z", "lastModified": "2017-09-21T18:52:43.585Z", "lastAccessed": "2017-09-21T18:52:43.585Z", "createdBy": "userId", "rowCount": 3276, "columnCount": 12, "characterSet": "UTF8", "encoding": "utf-8", "serverName": "cas-shared-default", "caslibName": "Public", "attributes": { "owner": "cas", "size": 796288, "encryption": "NONE", "time": "21Sep2017:18:48:39", "group": "sas" }, "links": [ { "method": "GET", "rel": "up", "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables", "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables", "type": "application/vnd.sas.collection", "itemType": "application/vnd.sas.cas.table" }, { "method": "GET", "rel": "self", "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS", "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS", "type": "application/vnd.sas.cas.table" }, { "method": "POST", "rel": "save", "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS", "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS", "type": "application/vnd.sas.cas.table.save.request", "responseType": "application/vnd.sas.cas.table" }, { "method": "DELETE", "rel": "delete", "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS", "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS" }, { "method": "GET", "rel": "summaryStatistics", "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/summaryStatistics", "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/summaryStatistics", "type": "application/vnd.sas.collection", "itemType": "application/vnd.sas.cas.column.summary.statistics" }, { "method": "GET", "rel": "distinctCount", "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/distinctCount", "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/distinctCount", "type": "application/vnd.sas.collection", "itemType": "application/vnd.sas.cas.column.summary.statistics" }, { "method": "PUT", "rel": "updateScope", "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/scope", "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/scope", "responseType": "application/json;text/plain" }, { "method": "PUT", "rel": "updateState", "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/state", "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/state", "responseType": "application/json;text/plain" }, { "method": "GET", "rel": "columns", "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns", "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns", "type": "application/vnd.sas.collection", "itemType": "application/vnd.sas.cas.column" }, { "method": "GET", "rel": "dataTable", "href": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~Public/tables/CONTACTS", "uri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~Public/tables/CONTACTS", "type": "application/vnd.sas.data.table" } ] }

    application/vnd.sas.cas.column

    Detail information about a CAS table column.

    This media type is described by casColumn.

    This media type includes the following links:

    Relation Method URI Description
    self GET /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName} Returns information about the specified column.
    up GET /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns Returns information about all columns in the specified table.
    distinctCount GET /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/distinctCount Returns distinct count for the specified columnName.
    distinctValues GET /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/distinctValues Returns distinct values for the specified columnName.
    frequency GET /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/frequency Returns frequency information for the specified columnName.
    summaryStatistics GET /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/summaryStatistics Returns summary statistics for the specified columnName.
    application/vnd.sas.cas.column+json

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

    { "version": 1, "name": "COMPANY", "type": "char", "rawLength": 34, "formattedLength": 34, "numberFormatLength": 0, "numberFormatDecimals": 0, "links": [ { "method": "GET", "rel": "up", "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns", "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns", "type": "application/vnd.sas.collection", "itemType": "application/vnd.sas.cas.column" }, { "method": "GET", "rel": "self", "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/COMPANY", "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/COMPANY", "type": "application/vnd.sas.cas.column" }, { "method": "GET", "rel": "distinctCount", "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/COMPANY/distinctCount", "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/COMPANY/distinctCount", "type": "application/vnd.sas.cas.column.frequency" }, { "method": "GET", "rel": "distinctValues", "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/COMPANY/distinctValues", "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/COMPANY/distinctValues", "type": "application/vnd.sas.collection", "itemType": "text/plain" }, { "method": "GET", "rel": "frequency", "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/COMPANY/frequency", "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/COMPANY/frequency", "type": "application/vnd.sas.cas.column.frequency" }, { "method": "GET", "rel": "summaryStatistics", "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/COMPANY/summaryStatistics", "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/COMPANY/summaryStatistics", "type": "application/vnd.sas.cas.column.summary.statistics" } ] }

    application/vnd.sas.cas.column.distinct.count

    The count of distinct values in a column.

    This media type is described by casColumnDistinctCount.

    This media type includes the following links:

    Relation Method URI Description
    self GET /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/distinctCount Returns distinct count, missing count, and truncated count for the distinct values of the specified column.
    up GET /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName} Returns information about the specified column.
    application/vnd.sas.cas.column.distinct.count+json

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

    { "version": 1, "columnName": "COMPANY", "distinctCount": 1406, "missingCount": 0, "truncated": false, "links": [ { "method": "GET", "rel": "up", "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/COMPANY", "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/COMPANY", "type": "application/vnd.sas.cas.column" }, { "method": "GET", "rel": "self", "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/COMPANY/distinctCount", "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/COMPANY/distinctCount", "type": "application/vnd.sas.cas.column.distinct.count" } ] }

    application/vnd.sas.cas.column.frequency

    Frequency results on a CAS column.

    This media type is described by casColumnFrequency.

    This media type includes the following links:

    Relation Method URI Description
    self GET /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/frequency Returns frequency information for the specified column.
    up GET /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName} Returns information about the specified column.
    application/vnd.sas.cas.column.frequency+json

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

    { "version": 1, "columnName": "STATE", "columnType": 3, "frequencyValues": [ { "value": "CA", "frequency": 1701, "formattedValue": "CA" }, { "value": "OH", "frequency": 708, "formattedValue": "OH" }, { "value": "CO", "frequency": 354, "formattedValue": "CO" }, { "value": "NV", "frequency": 142, "formattedValue": "NV" }, { "value": "HI", "frequency": 123, "formattedValue": "HI" }, { "value": "CA.", "frequency": 60, "formattedValue": "CA." }, { "value": "", "frequency": 37, "formattedValue": "" }, { "value": "NM", "frequency": 18, "formattedValue": "NM" }, { "value": "AB", "frequency": 12, "formattedValue": "AB" }, { "value": "AL", "frequency": 11, "formattedValue": "AL" }, { "value": "BC", "frequency": 6, "formattedValue": "BC" }, { "value": "CT", "frequency": 6, "formattedValue": "CT" }, { "value": "Mich", "frequency": 6, "formattedValue": "Mich" }, { "value": "Ohio", "frequency": 6, "formattedValue": "Ohio" }, { "value": "MI", "frequency": 5, "formattedValue": "MI" }, { "value": "NC", "frequency": 5, "formattedValue": "NC" }, { "value": " CA", "frequency": 4, "formattedValue": " CA" }, { "value": "IL", "frequency": 4, "formattedValue": "IL" }, { "value": "N.C.", "frequency": 4, "formattedValue": "N.C." }, { "value": "Alabama", "frequency": 3, "formattedValue": "Alabama" }, { "value": "California", "frequency": 3, "formattedValue": "California" }, { "value": "FL", "frequency": 3, "formattedValue": "FL" }, { "value": "NJ", "frequency": 3, "formattedValue": "NJ" }, { "value": "NY", "frequency": 3, "formattedValue": "NY" }, { "value": "UT", "frequency": 3, "formattedValue": "UT" }, { "value": "Alberta", "frequency": 2, "formattedValue": "Alberta" }, { "value": "Ca.", "frequency": 2, "formattedValue": "Ca." }, { "value": "Co.", "frequency": 2, "formattedValue": "Co." }, { "value": "Michigan", "frequency": 2, "formattedValue": "Michigan" }, { "value": "NE", "frequency": 2, "formattedValue": "NE" }, { "value": "WA", "frequency": 2, "formattedValue": "WA" }, { "value": "al", "frequency": 1, "formattedValue": "al" }, { "value": "alabama", "frequency": 1, "formattedValue": "alabama" }, { "value": "ALABAMA", "frequency": 1, "formattedValue": "ALABAMA" }, { "value": "Calif", "frequency": 1, "formattedValue": "Calif" }, { "value": "HA", "frequency": 1, "formattedValue": "HA" }, { "value": "Hawaai", "frequency": 1, "formattedValue": "Hawaai" }, { "value": "Hawaii", "frequency": 1, "formattedValue": "Hawaii" }, { "value": "Helena", "frequency": 1, "formattedValue": "Helena" }, { "value": "illinois", "frequency": 1, "formattedValue": "illinois" }, { "value": "Illinois", "frequency": 1, "formattedValue": "Illinois" }, { "value": "Jacksonville", "frequency": 1, "formattedValue": "Jacksonville" }, { "value": "MA", "frequency": 1, "formattedValue": "MA" }, { "value": "Martinstown", "frequency": 1, "formattedValue": "Martinstown" }, { "value": "MG", "frequency": 1, "formattedValue": "MG" }, { "value": "Mich.", "frequency": 1, "formattedValue": "Mich." }, { "value": "Missouri", "frequency": 1, "formattedValue": "Missouri" }, { "value": "Mizzou", "frequency": 1, "formattedValue": "Mizzou" }, { "value": "MN", "frequency": 1, "formattedValue": "MN" }, { "value": "MO", "frequency": 1, "formattedValue": "MO" } ], "links": [ { "method": "GET", "rel": "up", "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/STATE", "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/STATE", "type": "application/vnd.sas.cas.column" }, { "method": "GET", "rel": "self", "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/STATE/frequency", "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/STATE/frequency", "type": "application/vnd.sas.cas.column.frequency" } ] }

    application/vnd.sas.cas.column.summary.statistics

    Returns summary statistics for a numeric column.

    This media type is described by casColumnSummaryStatistics.

    This media type includes the following links:

    Relation Method URI Description
    self GET /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName}/summaryStatistics Returns summary information about the specified column.
    up GET /servers/{serverName}/caslibs/{caslibName}/tables/{tableName}/columns/{columnName} Returns information about the specified column.
    application/vnd.sas.cas.column.summary.statistics+json

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

    { "version": 1, "columnName": "VALUE", "min": 1, "max": 11267, "mean": 1644.1684981684982, "sum": 5386296, "stdDev": 974.6179404092851, "stdErr": 17.027953475469996, "coefficientOfVariation": 59.27725421664197, "numMissingValues": 0, "n": 3276, "variance": 949880.1297676369, "tValue": 96.55702316411907, "probT": 0, "links": [ { "method": "GET", "rel": "up", "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/ID", "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/ID", "type": "application/vnd.sas.cas.column" }, { "method": "GET", "rel": "self", "href": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/ID/summaryStatistics", "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/tables/CONTACTS/columns/ID/summaryStatistics", "type": "application/vnd.sas.cas.column.summary.statistics" } ], "uss": 11966835630, "css": 3110857424.989011 }

    application/vnd.sas.cas.source.table

    Detail information about the source file or table in the specified caslib. Source 'table' in this context refers to either a file or table, depending upon the type of the caslib is associated. For example, path-based caslibs will return file information, while non-path-based caslibs will return table information.

    This media type is described by casSourceTable.

    This media type includes the following links:

    Relation Method URI Description
    self GET /servers/{serverName}/caslibs/{caslibName}/sources/{sourceName} Returns information about the specified source file/table.
    up GET /servers/{serverName}/caslibs/{caslibName}/sources Returns information about all source files/tables in the specified caslib.
    application/vnd.sas.cas.source.table+json

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

    { "name": "Contacts.sashdat", "attributes": { "owner": "userId", "size": 777, "encryption": "NONE", "permission": "-rwxr-xr-x", "time": "21Sep2017:18:48:39", "group": "mygroup" }, "links": [ { "method": "GET", "rel": "up", "href": "/casManagement/servers/cas-shared-default/caslibs/Public/sources", "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/sources", "type": "application/vnd.sas.collection", "itemType": "application/vnd.sas.cas.source.table" }, { "method": "GET", "rel": "self", "href": "/casManagement/servers/cas-shared-default/caslibs/Public/sources/Contacts.sashdat", "uri": "/casManagement/servers/cas-shared-default/caslibs/Public/sources/Contacts.sashdat", "type": "application/vnd.sas.cas.source.table" } ] }

    application/vnd.sas.cas.caslib.create.request

    Parameters for defining a caslib.

    This media type is described by caslibCreateRequest.

    This media type is used in the body of the request, so it does not have associated links.

    application/vnd.sas.cas.caslib.create.request+json

    { "createDirectory": true, "permission": "GroupWrite", "caslib": { "version": 1, "name": "MyCaslib", "type": "PATH", "description": "My data", "scope": "global", "path": "/some/path/on/disk", } }

    application/vnd.sas.cas.table.load.request

    Parameters for loading a source into memory as a CAS table.

    This media type is described by casLoadRequest.

    This media type is used in the body of the request, so it does not have associated links.

    application/vnd.sas.cas.table.load.request+json

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

    { "outputCaslibName":"MyOutCaslib", "outputTableName":"MyOutTable", "label":"My table label", "replace": false, "scope":"global", "copies": 1 }

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

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

    { "outputCaslibName":"MyOutCaslib", "outputTableName":"MyOutTable", "label": "My Table Label", "replace": false, "scope": "global", "parameters": { "importOptions": { "allowTruncation": true, "delimiter": ",", "encoding": "utf-8", "fileType": "csv", "getNames": true, "guessRows": 50.0, "nThreads": 0.0, "stripBlanks": false, "varChars": false } }, "where": "NAME ? \"Mr.\"" }

    application/vnd.sas.cas.table.save.request

    Parameters for saving a loaded CAS table (or unloaded source file/table) as a source file/table.

    This media type is described by casSaveRequest.

    This media type is used in the body of the request, so it does not have associated links.

    application/vnd.sas.cas.table.save.request+json

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

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

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

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

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

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

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

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

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

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

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

    application/vnd.sas.cas.table.reference

    Represents a dataTables service link and source information about a tableDetails object.

    This media type is described by casTableReference.

    This media type represents an embedded model, so it does not have link relationships.

    application/vnd.sas.cas.table.reference+json

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

    { "tableUri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~Public/tables/CONTACTS", "sessionId": "b3a9d3f9-1095-d848-85d4-02b19fc4e5cf", "sourceTableName": "Contacts.sashdat" }

    Error Codes

    HTTP Status Code Error Code Description
    304 12212 A bad option was specified for the load.
    304 12213 The load operation failed.
    400 12209 A bad value was specified for the state parameter.
    400 12210 A bad value was specified for the scope parameter.
    400 12211 A bad value was specified for the format parameter.
    400 12222 A bad value was specified for the limit parameter.
    400 12224 An error occurred during the file upload operation.
    400 12227 An invalid parameter was specified.
    400 12228 An error was received from the job execution service.
    401 12201 User does not have authorization to perform the operation.
    403 12219 Permission was denied while performing the operation.
    403 12225 File upload capability is disabled.
    404 12204 The caslib could not be found.
    404 12205 The CAS server could not be found.
    404 12206 The table is not loaded.
    404 12207 The CAS session could not be found.
    404 12216 The file or path could not be found.
    409 12202 The global table already exists.
    409 12203 The save operation failed.
    409 12215 The caslib exists.
    409 12217 Mismatch between table source name and CAS table name.
    409 12218 The source file exists.
    409 12223 No route to the host.
    409 12226 The uploaded filename already exists.
    409 12299 An error was received from the CAS server.
    413 12220 The file size limit was exceeded.
    415 12214 The specified media type is not supported.
    500 12200 An unknown error occurred.
    503 12208 The CAS server refused the connection.
    504 12221 The socket timed out before a response was received.

    Job Definitions

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

    The Job Definitions API enables users to manage job definitions.

    Base URLs:

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/jobDefinitions/ \
      -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/jobDefinitions/',
      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/jobDefinitions/', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    GET /

    The API root. Returns a list of links to the top-level resources that are surfaced through the API.

    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 The request succeeded. Inline

    Check service availability

    Code samples

    # You can also use wget
    curl -X HEAD https://www.example.com/jobDefinitions/
    
    
    
    $.ajax({
      url: 'https://www.example.com/jobDefinitions/',
      method: 'head',
    
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    
    r = requests.head('https://www.example.com/jobDefinitions/', params={
    
    )
    
    print r.json()
    
    

    HEAD /

    Returns header information and checks the status of the Job Definitions service.

    Responses

    Status Meaning Description Schema
    200 OK The request succeeded. The service is available. None

    Create a job definition

    Code samples

    # You can also use wget
    curl -X POST https://www.example.com/jobDefinitions/definitions \
      -H 'Content-Type: application/vnd.sas.job.definition+json' \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.job.definition+json' \
      -H 'accept: string'
    
    
    var headers = {
      'Content-Type':'application/vnd.sas.job.definition+json',
      'Accept':'application/vnd.sas.job.definition+json',
      'accept':'string'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/jobDefinitions/definitions',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.job.definition+json',
      'Accept': 'application/vnd.sas.job.definition+json',
      'accept': 'string'
    }
    
    r = requests.post('https://www.example.com/jobDefinitions/definitions', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    POST /definitions

    Creates a job definition.

    Body parameter

    {
      "version": 0,
      "id": "string",
      "name": "string",
      "description": "string",
      "type": "string",
      "code": "string",
      "parameters": [
        {
          "version": 0,
          "name": "string",
          "type": "string",
          "label": "string",
          "required": true,
          "defaultValue": "string"
        }
      ],
      "properties": [
        {
          "name": "string",
          "value": "string"
        }
      ],
      "createdBy": "string",
      "modifiedBy": "string",
      "creationTimeStamp": "string",
      "modifiedTimeStamp": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    

    Parameters

    Parameter In Type Required Description
    parentFolderUri query string false The URI of the parent folder to contain the job definition.
    accept header string false Accept header value for the versioned media type corresponding to the version to be returned.
    body body jobDefinition false The job definition to create.

    Example responses

    201

    {
      "version": 0,
      "id": "string",
      "name": "string",
      "description": "string",
      "type": "string",
      "code": "string",
      "parameters": [
        {
          "version": 0,
          "name": "string",
          "type": "string",
          "label": "string",
          "required": true,
          "defaultValue": "string"
        }
      ],
      "properties": [
        {
          "name": "string",
          "value": "string"
        }
      ],
      "createdBy": "string",
      "modifiedBy": "string",
      "creationTimeStamp": "string",
      "modifiedTimeStamp": "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 job definition was created. jobDefinition
    400 Bad Request The request was invalid. errorResponse
    415 Unsupported Media Type The requested media type is not supported. None
    Response Headers
    Status Header Type Format Description
    201 Last-Modified string The ISO8601 date string that represents the timestamp of the last update to this object.
    201 Etag string A tag that identifies the revision of this object.
    201 Location string The location of the resource.

    Get a collection of job definitions

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/jobDefinitions/definitions \
      -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/jobDefinitions/definitions',
      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/jobDefinitions/definitions', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    GET /definitions

    Returns a list of job definitions.

    Parameters

    Parameter In Type Required Description
    start query integer false The index of the first job definition to return. The default value is 0.
    limit query integer false The maximum number of job definitions to return. The default value is 10.
    filter query string false Filters the results of the query.

    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. None
    400 Bad Request The request was invalid. An invalid filter or combination of request parameters was provided. error2

    Get headers for a job definition

    Code samples

    # You can also use wget
    curl -X HEAD https://www.example.com/jobDefinitions/definitions/{definitionId}
    
    
    
    $.ajax({
      url: 'https://www.example.com/jobDefinitions/definitions/{definitionId}',
      method: 'head',
    
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    
    r = requests.head('https://www.example.com/jobDefinitions/definitions/{definitionId}', params={
    
    )
    
    print r.json()
    
    

    HEAD /definitions/{definitionId}

    Retrieves headers for a job definition. Can also be used to check if a job definition exists.

    Parameters

    Parameter In Type Required Description
    definitionId path string true The ID of the job definition.

    Responses

    Status Meaning Description Schema
    200 OK The request succeeded. The job definition exists. None
    404 Not Found No job definition exists at the requested path. None
    Response Headers
    Status Header Type Format Description
    200 Last-Modified string The ISO8601 date string that represents the timestamp of the most recent update to this object.
    200 Etag string A tag that identifies the revision of this object.

    Get the job definition summary

    Code samples

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

    GET /definitions/{definitionId}#resourceSummary

    Returns the summary representation of the job definition that is specified by the provided job definition ID.

    Parameters

    Parameter In Type Required Description
    definitionId path string true The ID of the job definition.

    Example responses

    200

    {
      "id": "string",
      "name": "string",
      "type": "string",
      "description": "string",
      "createdBy": "string",
      "creationTimeStamp": "2019-02-20T19:58:01Z",
      "modifiedBy": "string",
      "modifiedTimeStamp": "2019-02-20T19:58:01Z",
      "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. summary
    404 Not Found No resource exists at the requested path. error2
    Response Headers
    Status Header Type Format Description
    200 Last-Modified string The ISO8601 date string that represents the timestamp of the most recent update to this object.
    200 Etag string A tag that identifies the revision of this object.

    Get a job definition

    Code samples

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

    GET /definitions/{definitionId}

    Returns the job definition that is specified by the provided job definition ID.

    Parameters

    Parameter In Type Required Description
    definitionId path string true The ID of the job definition.

    Example responses

    200

    {
      "version": 0,
      "id": "string",
      "name": "string",
      "description": "string",
      "type": "string",
      "code": "string",
      "parameters": [
        {
          "version": 0,
          "name": "string",
          "type": "string",
          "label": "string",
          "required": true,
          "defaultValue": "string"
        }
      ],
      "properties": [
        {
          "name": "string",
          "value": "string"
        }
      ],
      "createdBy": "string",
      "modifiedBy": "string",
      "creationTimeStamp": "string",
      "modifiedTimeStamp": "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
    200 OK The request succeeded. jobDefinition
    404 Not Found No resource exists at the requested path. None
    Response Headers
    Status Header Type Format Description
    200 Last-Modified string The ISO8601 date string that represents the timestamp of the most recent update to this object.
    200 Etag string A tag that identifies the revision of this object.

    Update a job definition

    Code samples

    # You can also use wget
    curl -X PUT https://www.example.com/jobDefinitions/definitions/{definitionId} \
      -H 'Content-Type: application/vnd.sas.job.definition+json' \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.job.definition+json' \
      -H 'If-Match: string'
    
    
    var headers = {
      'Content-Type':'application/vnd.sas.job.definition+json',
      'Accept':'application/vnd.sas.job.definition+json',
      'If-Match':'string'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/jobDefinitions/definitions/{definitionId}',
      method: 'put',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.job.definition+json',
      'Accept': 'application/vnd.sas.job.definition+json',
      'If-Match': 'string'
    }
    
    r = requests.put('https://www.example.com/jobDefinitions/definitions/{definitionId}', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    PUT /definitions/{definitionId}

    Updates the job definition specified by the provided job definition ID. The ETag provided by the If-Match header is verified before the update occurs.

    Body parameter

    {
      "version": 0,
      "id": "string",
      "name": "string",
      "description": "string",
      "type": "string",
      "code": "string",
      "parameters": [
        {
          "version": 0,
          "name": "string",
          "type": "string",
          "label": "string",
          "required": true,
          "defaultValue": "string"
        }
      ],
      "properties": [
        {
          "name": "string",
          "value": "string"
        }
      ],
      "createdBy": "string",
      "modifiedBy": "string",
      "creationTimeStamp": "string",
      "modifiedTimeStamp": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    

    Parameters

    Parameter In Type Required Description
    definitionId path string true ID of the job definition to update.
    If-Match header string false The Etag that was returned from a GET, POST, or PUT of this Job Definition.
    body body jobDefinition true description

    Example responses

    200

    {
      "version": 0,
      "id": "string",
      "name": "string",
      "description": "string",
      "type": "string",
      "code": "string",
      "parameters": [
        {
          "version": 0,
          "name": "string",
          "type": "string",
          "label": "string",
          "required": true,
          "defaultValue": "string"
        }
      ],
      "properties": [
        {
          "name": "string",
          "value": "string"
        }
      ],
      "createdBy": "string",
      "modifiedBy": "string",
      "creationTimeStamp": "string",
      "modifiedTimeStamp": "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
    200 OK The request succeeded. jobDefinition
    400 Bad Request The request was invalid. errorResponse
    412 Precondition Failed The Etag provided does not match the current version of the object. error2
    415 Unsupported Media Type The requested media type is not supported. None
    428 Precondition Required The Etag was not provided when updating an existing type. error2
    Response Headers
    Status Header Type Format Description
    200 Last-Modified string The ISO8601 date string that represents the timestamp of the most recent update to this object.
    200 Etag string A tag that identifies the revision of this object.

    Delete a job definition

    Code samples

    # You can also use wget
    curl -X DELETE https://www.example.com/jobDefinitions/definitions/{definitionId}
    
    
    
    $.ajax({
      url: 'https://www.example.com/jobDefinitions/definitions/{definitionId}',
      method: 'delete',
    
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    
    r = requests.delete('https://www.example.com/jobDefinitions/definitions/{definitionId}', params={
    
    )
    
    print r.json()
    
    

    DELETE /definitions/{definitionId}

    Deletes the job definition specified by the provided job definition ID.

    Parameters

    Parameter In Type Required Description
    definitionId path string true The ID of the job definition.

    Responses

    Status Meaning Description Schema
    204 No Content The job definition was deleted. None
    404 Not Found No resource exists at the requested path. None

    Get a transfer object from the job definition

    Code samples

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

    GET /definitions/{definitionId}#transfer

    Gets the transfer object specified from the job definition specified by the provided job definition ID.

    Parameters

    Parameter In Type Required Description
    definitionId path string true The ID of the job definition.

    Example responses

    200

    {
      "id": "string",
      "version": 0,
      "summary": {
        "id": "string",
        "name": "string",
        "type": "string",
        "description": "string",
        "createdBy": "string",
        "creationTimeStamp": "2019-02-20T19:58:01Z",
        "modifiedBy": "string",
        "modifiedTimeStamp": "2019-02-20T19:58:01Z",
        "links": [
          {
            "method": "string",
            "rel": "string",
            "uri": "string",
            "href": "string",
            "title": "string",
            "type": "string",
            "itemType": "string",
            "responseType": "string",
            "responseItemType": "string"
          }
        ],
        "version": 0
      },
      "content": "string",
      "fileServiceContent": "string",
      "connections": [
        {
          "id": "string",
          "name": "string",
          "uri": "string",
          "contentType": "string",
          "type": "string",
          "hints": [
            "string"
          ]
        }
      ],
      "substitutions": {
        "property1": "string",
        "property2": "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
    200 OK The request succeeded. transferObject
    404 Not Found The object does not exist. None
    Response Headers
    Status Header Type Format Description
    200 Last-Modified string The ISO8601 date string that represents the timestamp of the most update to this object.
    200 Etag string A tag that identifies this revision of this object.

    Update a job definition from the transfer object

    Code samples

    # You can also use wget
    curl -X PUT https://www.example.com/jobDefinitions/definitions/{definitionId}#transfer \
      -H 'Content-Type: application/vnd.sas.transfer.object+json' \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.summary+json'
    
    
    var headers = {
      'Content-Type':'application/vnd.sas.transfer.object+json',
      'Accept':'application/vnd.sas.summary+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/jobDefinitions/definitions/{definitionId}#transfer',
      method: 'put',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.transfer.object+json',
      'Accept': 'application/vnd.sas.summary+json'
    }
    
    r = requests.put('https://www.example.com/jobDefinitions/definitions/{definitionId}#transfer', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    PUT /definitions/{definitionId}#transfer

    Update the job definition specified by the provided job definition ID with the transfer object.

    Body parameter

    {
      "id": "string",
      "version": 0,
      "summary": {
        "id": "string",
        "name": "string",
        "type": "string",
        "description": "string",
        "createdBy": "string",
        "creationTimeStamp": "2019-02-20T19:58:01Z",
        "modifiedBy": "string",
        "modifiedTimeStamp": "2019-02-20T19:58:01Z",
        "links": [
          {
            "method": "string",
            "rel": "string",
            "uri": "string",
            "href": "string",
            "title": "string",
            "type": "string",
            "itemType": "string",
            "responseType": "string",
            "responseItemType": "string"
          }
        ],
        "version": 0
      },
      "content": "string",
      "fileServiceContent": "string",
      "connections": [
        {
          "id": "string",
          "name": "string",
          "uri": "string",
          "contentType": "string",
          "type": "string",
          "hints": [
            "string"
          ]
        }
      ],
      "substitutions": {
        "property1": "string",
        "property2": "string"
      },
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    

    Parameters

    Parameter In Type Required Description
    definitionId path string true ID of job definition to update
    body body transferObject true description

    Example responses

    200

    {
      "id": "string",
      "name": "string",
      "type": "string",
      "description": "string",
      "createdBy": "string",
      "creationTimeStamp": "2019-02-20T19:58:01Z",
      "modifiedBy": "string",
      "modifiedTimeStamp": "2019-02-20T19:58:01Z",
      "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 job definition was updated. summary
    201 Created The job definition was created. summary
    400 Bad Request The request was invalid. errorResponse
    415 Unsupported Media Type The requested media type is not supported. None

    Schemas

    transferObject

    Properties

    Transfer Object

    Name Type Required Description
    id string(object-id) false The unique identifier of the object.
    version integer false This media type's schema version number. This representation is version 1.
    summary object false The summarized representation of a resource. Often used in collection responses when more specific details aren't needed.
    » id string true The unique identifier for the resource.
    » name string false The name of the resource.
    » type string false The type of the resource.
    » description string false The description of the resource.
    » createdBy string false The user who created the resource.
    » creationTimeStamp string(date-time) false The timestamp in YYYY-MM-DDThh:mm:ss.sssZ format when the resource was created.
    » modifiedBy string false The user who most recently modified the resource.
    » modifiedTimeStamp string(date-time) false The timestamp in YYYY-MM-DDThh:mm:ss.sssZ format when the resource was last modified.
    » links [transferObject/properties/links/items] true The links that apply to the resource.
    » version integer true The version number of the resource. This representation is version 1.
    content string false The encoded data of the job definition.
    fileServiceContent string false Job definitions do not have file service content.
    connections [transferObjectConnector] false A list of associations or references to other external objects to be re-created on import.
    substitutions object false A map with keys of parameter and value. Used to replace the value of the parameter with the value of the value.
    » additionalProperties string false
    links [any] false Paging links that apply to this object.
    » Link object false A link to a related operation or resource.
    »» method string false The HTTP method for the link.
    »» rel string true The relationship of the link to the resource.
    »» uri string false The relative URI for the link.
    »» href string false The URL for the link.
    »» title string false The title for the link.
    »» type string false The media type or link type for the link.
    »» itemType string false If this is a link to a container, itemType is the media type or link type for the items in the container.
    »» responseType string false The media type or link type of the response body for a PUT, POST, or PATCH operation.
    »» responseItemType string false The media type or link type of the items in the response body for a PUT, POST, or PATCH operation.

    transferObjectConnector

    Properties

    Transfer Object Connector

    Name Type Required Description
    id string(object-id) false The unique identifier of the object.
    name string false The name of the related object.
    uri string false The URI of the related object.
    contentType string false The media type of the related object.
    type string false The type of connection. This can be any value, but should be used to determine the actions required to reconstitute the relationship.
    hints [string] false Contains hints that can be used to help find the object to connect to in the target system.

    jobDefinition

    Properties

    Job Definition

    Name Type Required Description
    version integer false The version of the resource. This version is 2.
    id string false The unique ID of the resource that is generated by the API.
    name string false The name of the job. The maximum length is 100.
    description string false A description of the job. The maximum length is 1000.
    type string false The type of job. This property determines the execution provider that executes this job. The maximum length is 20.
    code string true Execution provider specific code to be executed.
    parameters [any] false An array of input parameters to be collected when executing this job definition.
    » Job Definition Parameter object false The job definition parameter.
    »» version integer false The version of the resource. This version is 1.
    »» name string true The name of the parameter. The maximum length is 100.
    »» type string false The type of the parameter (TABLE, NUMERIC, DATE, CHARACTER). The maximum length is 20.
    »» label string false The display value for the name of this parameter. The maximum length is 250.
    »» required boolean false Specifies if the parameter is required for execution.
    »» defaultValue string false The default value for this parameter, if one is not specified at execution time.
    » properties [any] false An array of name/value pairs needed to execute a job definition. The maximum length of a name is 100.
    »» Property object false A pair consisting of a string name and a string value. This is an element of application/vnd.sas.properties
    »»» name string true The property name.
    »»» value string true The property value.
    »» createdBy string false The user that created this job.
    »» modifiedBy string false The user that modified this job.
    »» creationTimeStamp string false The formatted timestamp when the job was created, in the following format: yyyy-mm-ddThh:mm:ssZ.
    »» modifiedTimeStamp string false The formatted timestamp when the job was modified, in the following format: yyyy-mm-ddThh:mm:ssZ.
    »» links [transferObject/properties/links/items] false An array of link objects

    error2

    Properties

    Error

    Name Type Required Description
    message string false The message for the error.
    id string false The string ID for the error.
    errorCode integer false The numeric ID for the error.
    httpStatusCode integer true The HTTP status code for the error.
    details [string] false Messages that provide additional details about the cause of the error.
    remediation string false A message that describes how to resolve the error.
    errors [error2] false Any additional errors that occurred.
    links [transferObject/properties/links/items] false The links that apply to the error.
    version integer true The version number of the error representation. This representation is version 2.

    Usage Notes

    Overview

    The Job Definitions API manages jobs using the Create, Read, Update, and Delete operations. A Job Definition is a batch execution that contains a list of input parameters, a job type, and a "code" attribute. A job definition can run in multiple execution environments, based on the type of the job. Possible types might include "cas", "compute", or "rest". The "code" for a job definition depends on the job definition type. For example, for a job of type "compute", the code is SAS code; and for a job of type "rest", the code is an UnRAVL script.

    Terminology

    job definition

    a batch execution that contains a list of input parameters, a job type, and a "code" attribute. A job definition can run in multiple execution environments, based on the type of the job.

    Resources

    Root

    Path: /

    The root of the API. This resource contains links to the top-level resources in the API. The response uses the application/vnd.sas.api media type.

    The GET / response includes the following links.

    Relation Method Description
    job-definitions GET Returns the collection of job definitions.
    URI: /jobDefinitions/definitions
    Response type: application/vnd.sas.collection
    Item type: application/vnd.sas.job.definition

    Collection Resources

    Path: /definitions

    This API provides collections of job definitions. Members of the /definitions collection are job definitions, /definitions/{id}.

    The definitions collection representation is application/vnd.sas.collection. The collection items are application/vnd.sas.job.definition resources.

    The collection response include the following links:

    Relation Method Description
    self GET Returns the current page from the collection.
    collection GET Returns the first page of the collection, without sorting or filtering criteria.
    prev GET Returns the previous page of the collection. This link is omitted if the current view is on the first page.
    next GET Returns the next page of the collection. This link is omitted if the current view is on the last page of the collection.
    first GET Returns the first page of the collection. This link is omitted if the current view is on the first page.
    last GET Returns the final page of the collection. This link is omitted if the current view is on the last page.
    createJobDefinition POST Creates a new job definition.
    URI: /jobDefinitions/definitions
    Response type: application/vnd.sas.job.definition
    Sorting and Filtering

    These collections can be sorted and filtered using the ?sortBy= and ?filter= query parameters.

    Filtering and sorting can use the following members of jobdefinition:

    Single Item Resources

    Path: /definitions/{id}

    A job definition.

    Relation Method Description
    self GET Returns a job definition.
    URI: /jobDefinitions/definitions/{id}
    Type: application/vnd.sas.job.definition
    alternate GET Returns the summary job definition.
    URI: /jobDefinitions/definitions/{id}
    Type: application/vnd.sas.summary
    update PUT Updates a job definition.
    URI: /jobDefinitions/definitions/{id}
    Type: application/vnd.sas.job.definition
    Response type: application/vnd.sas.job.definition
    delete DELETE Deletes a job definition.
    URI: /jobDefinitions/definitions/{id}

    Media Types

    application/vnd.sas.job.definition

    This media type represents a job definition. You can access the schema at the following location: job definition

    application/vnd.sas.job.definition

    The following example contains the JSON representation of this media type: { "creationTimeStamp": "2018-02-13T20:53:57.875Z", "modifiedTimeStamp": "2018-02-13T20:53:57.876Z", "createdBy": "bob", "modifiedBy": "bob", "version": 1, "id": "0c331513-02fd-47dc-8843-7c2c271cd666", "name": "Simple proc print", "type": "Compute", "parameters": [ { "version": 1, "name": "_contextName", "defaultValue": "SAS Job Execution compute context", "type": "CHARACTER", "label": "Context Name", "required": false } ], "code": "ods html style=HTMLBlue;\nproc print data=sashelp.class; run; quit;\nods html close;", "links": [ { "method": "GET", "rel": "self", "href": "/jobDefinitions/definitions/0c331513-02fd-47dc-8843-7c2c271cd666", "uri": "/jobDefinitions/definitions/0c331513-02fd-47dc-8843-7c2c271cd666", "type": "application/vnd.sas.job.definition" }, { "method": "PUT", "rel": "update", "href": "/jobDefinitions/definitions/0c331513-02fd-47dc-8843-7c2c271cd666", "uri": "/jobDefinitions/definitions/0c331513-02fd-47dc-8843-7c2c271cd666", "type": "application/vnd.sas.job.definition", "responseType": "application/vnd.sas.job.definition" }, { "method": "DELETE", "rel": "delete", "href": "/jobDefinitions/definitions/0c331513-02fd-47dc-8843-7c2c271cd666", "uri": "/jobDefinitions/definitions/0c331513-02fd-47dc-8843-7c2c271cd666" } ], "properties": [] }

    Job Execution

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

    This API is used to execute jobs.

    Base URLs:

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/jobExecution/ \
      -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/jobExecution/',
      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/jobExecution/', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    GET /

    Returns a collection of links to the top-level collections surfaced through this API.

    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 The request succeeded. Inline

    Check API availability

    Code samples

    # You can also use wget
    curl -X HEAD https://www.example.com/jobExecution/
    
    
    
    $.ajax({
      url: 'https://www.example.com/jobExecution/',
      method: 'head',
    
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    
    r = requests.head('https://www.example.com/jobExecution/', params={
    
    )
    
    print r.json()
    
    

    HEAD /

    Returns the header information that the corresponding GET returns. Clients can use this to determine whether the API is running.

    Responses

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

    Submit a job request

    Code samples

    # You can also use wget
    curl -X POST https://www.example.com/jobExecution/jobs \
      -H 'Content-Type: application/vnd.sas.job.execution.job.request+json' \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.job.execution.job+json'
    
    
    var headers = {
      'Content-Type':'application/vnd.sas.job.execution.job.request+json',
      'Accept':'application/vnd.sas.job.execution.job+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/jobExecution/jobs',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.job.execution.job.request+json',
      'Accept': 'application/vnd.sas.job.execution.job+json'
    }
    
    r = requests.post('https://www.example.com/jobExecution/jobs', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    POST /jobs

    Submits a job request.

    Body parameter

    {
      "version": 0,
      "id": "string",
      "name": "string",
      "description": "string",
      "creationTimeStamp": "string",
      "modifiedTimeStamp": "string",
      "createdBy": "string",
      "modifiedBy": "string",
      "jobDefinitionUri": "string",
      "jobDefinition": {
        "version": 0,
        "id": "string",
        "name": "string",
        "description": "string",
        "type": "string",
        "code": "string",
        "parameters": [
          {
            "version": 0,
            "name": "string",
            "type": "string",
            "label": "string",
            "required": true,
            "defaultValue": "string"
          }
        ],
        "properties": [
          {
            "name": "string",
            "value": "string"
          }
        ],
        "createdBy": "string",
        "modifiedBy": "string",
        "creationTimeStamp": "string",
        "modifiedTimeStamp": "string",
        "links": [
          {
            "method": "string",
            "rel": "string",
            "uri": "string",
            "href": "string",
            "title": "string",
            "type": "string",
            "itemType": "string",
            "responseType": "string",
            "responseItemType": "string"
          }
        ]
      },
      "expiresAfter": "string",
      "arguments": {},
      "properties": {
        "property1": "string",
        "property2": "string"
      },
      "createdByApplication": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type"