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

    Model Management

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

    Base URLs:

    The Model Management API provides basic resources for monitoring performance, comparing models, and running workflow processes.

    Usage Notes

    Overview

    The Model Management API consists of functions that integrate with the Model Repository API.

    Here are the functions that this API provides:

    Terminology

    performance task definition

    is a definition that includes performance data that is used to monitor the performance of models over a period of time in order to determine when to retrain a model. The performance task definition can be run multiple times and generates a new performance job each time it is run.

    performance job

    job execution results that includes the code, log, and job status (state).

    workflow process

    a business process that is managed by the Workflow service.

    workflow association

    an association of a solution object (such as a model project) to a workflow process.

    workflow task

    a step or action in a workflow process that associates executable logic with an event such as a status change or timer event.

    workflow prompt

    a description of data that must be provided by a user for a workflow task before that task can be completed.

    Error Codes

    HTTP Status Code Error Code Description
    400 21300 You must specify a model ID.
    400 21301 The model does not meet the requirements for performance monitoring.
    400 21302 One or more required parameters are missing for the performance monitor task definition.
    400 21303 The value of the model's target level must be either "binary" or "interval".
    400 21304 The model must be associated with a project.
    400 21305 The value for the model's score code type is not valid for performance monitoring.
    400 74051 The workflow process could not be retrieved.
    400 74080 The workflow process could not be started.
    409 74050 An active association already exists between a model and a workflow process.

    Operations

    Get a list of jobs for a performance task

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/modelManagement/performanceTasks/{taskId}/performanceJobs \
      -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/modelManagement/performanceTasks/{taskId}/performanceJobs',
      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/modelManagement/performanceTasks/{taskId}/performanceJobs', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.collection+json"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://www.example.com/modelManagement/performanceTasks/{taskId}/performanceJobs", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /performanceTasks/{taskId}/performanceJobs

    Returns a list of the jobs and the performance results that are associated with a specified task ID.

    Parameters
    Parameter In Type Required Description
    taskId path string true The identifier of the task.
    start query integer(int64) false The index of the first performance task to return.
    limit query integer(int32) false The maximum number of performance tasks to return.
    filter query string(string) false The criteria for filtering the performance jobs. See Filtering in REST APIs.
    sortBy query string(sort-criteria) false The criteria for sorting the performance jobs. See Sorting in REST APIs.

    Example responses

    200

    {
      "name": "string",
      "start": 0,
      "limit": 0,
      "count": 0,
      "accept": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "version": 0,
      "items": [
        {
          "code": "string",
          "createdBy": "string",
          "creationTimeStamp": "2019-11-22T18:48:45Z",
          "modifiedBy": "string",
          "modifiedTimeStamp": "2019-11-22T18:48:45Z",
          "state": "string",
          "jobReqId": "string"
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. performanceJobCollection
    404 Not Found No performance task exists at the requested path. error2

    Get performance job results

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/modelManagement/performanceTasks/{taskId}/performanceJobs/{jobId} \
      -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/modelManagement/performanceTasks/{taskId}/performanceJobs/{jobId}',
      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/modelManagement/performanceTasks/{taskId}/performanceJobs/{jobId}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.collection+json"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://www.example.com/modelManagement/performanceTasks/{taskId}/performanceJobs/{jobId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /performanceTasks/{taskId}/performanceJobs/{jobId}

    Returns the performance results that are associated with the specified task ID and job ID.

    Parameters
    Parameter In Type Required Description
    taskId path string true The identifier of the task.
    jobId path string true The identifier of the performance job.

    Example responses

    200

    {
      "name": "string",
      "start": 0,
      "limit": 0,
      "count": 0,
      "accept": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "version": 0,
      "items": [
        {
          "code": "string",
          "createdBy": "string",
          "creationTimeStamp": "2019-11-22T18:48:45Z",
          "modifiedBy": "string",
          "modifiedTimeStamp": "2019-11-22T18:48:45Z",
          "state": "string",
          "jobReqId": "string"
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. performanceJobCollection
    404 Not Found No performance task or job exists at the requested path. error2

    Delete a performance job

    Code samples

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

    DELETE /performanceTasks/{taskId}/performanceJobs/{jobId}

    Deletes the specified performance job.

    Parameters
    Parameter In Type Required Description
    taskId path string true The identifier of the task.
    jobId path string true The identifier of the performance job.

    Example responses

    204

    Responses
    Status Meaning Description Schema
    204 No Content The performance job was deleted. performanceJobCollection
    404 Not Found No performance task exists at the requested path. error2

    Get the state of a performance job

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/modelManagement/performanceTasks/{taskId}/performanceJobs/{jobId}/state \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: text/plain'
    
    
    var headers = {
      'Accept':'text/plain'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/modelManagement/performanceTasks/{taskId}/performanceJobs/{jobId}/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/modelManagement/performanceTasks/{taskId}/performanceJobs/{jobId}/state', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"text/plain"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://www.example.com/modelManagement/performanceTasks/{taskId}/performanceJobs/{jobId}/state", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /performanceTasks/{taskId}/performanceJobs/{jobId}/state

    Returns the state of the specified performance job.

    Parameters
    Parameter In Type Required Description
    taskId path string true The identifier of the task.
    jobId path string true The identifier of the performance job.

    Example responses

    200

    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. performanceJob
    404 Not Found No performance job exists at the requested path. error2

    Get the performance job code

    Code samples

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

    GET /performanceTasks/{taskId}/performanceJobs/{jobId}/code

    Returns the performance job execution code for a performance task.

    Parameters
    Parameter In Type Required Description
    taskId path string true The identifier of the task.
    jobId path string true The identifier of the performance job.

    Example responses

    200

    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. performanceJob
    404 Not Found No performance job exists at the requested path. error2

    Get a performance job log

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/modelManagement/performanceTasks/{taskId}/performanceJobs/{jobId}/log \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: text/plain'
    
    
    var headers = {
      'Accept':'text/plain'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/modelManagement/performanceTasks/{taskId}/performanceJobs/{jobId}/log',
      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/modelManagement/performanceTasks/{taskId}/performanceJobs/{jobId}/log', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"text/plain"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://www.example.com/modelManagement/performanceTasks/{taskId}/performanceJobs/{jobId}/log", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /performanceTasks/{taskId}/performanceJobs/{jobId}/log

    Returns the execution log for a performance job.

    Parameters
    Parameter In Type Required Description
    taskId path string true The identifier of the task.
    jobId path string true The identifier of the performance job.

    Example responses

    200

    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. performanceJob
    404 Not Found No performance job exists at the requested path. error2

    Get the performance report data

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/modelManagement/performanceTasks/{taskId}/performanceReportData \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.collection+json' \
      -H 'Accept-Item: application/vnd.sas.models.performance.task.report.data.lift+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.collection+json',
      'Accept-Item':'application/vnd.sas.models.performance.task.report.data.lift+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/modelManagement/performanceTasks/{taskId}/performanceReportData',
      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.models.performance.task.report.data.lift+json'
    }
    
    r = requests.get('https://www.example.com/modelManagement/performanceTasks/{taskId}/performanceReportData', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.collection+json"},
            "Accept-Item": []string{"application/vnd.sas.models.performance.task.report.data.lift+json"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://www.example.com/modelManagement/performanceTasks/{taskId}/performanceReportData", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /performanceTasks/{taskId}/performanceReportData

    Retrieves the performance monitoring report data associated with the specified task ID.

    Parameters
    Parameter In Type Required Description
    taskId path string true The identifier of the performance task.
    Accept-Item header string true The desired performance report data representation.
    The Accept-Item options are:
    • application/vnd.sas.models.performance.task.report.data.lift+json
    • application/vnd.sas.models.performance.task.report.data.variable.summary+json
    • application/vnd.sas.models.performance.task.report.data.variable.deviation+json
    • application/vnd.sas.models.performance.task.report.data.roc+json
    • application/vnd.sas.models.performance.task.report.data.ks.cumulative+json
    • application/vnd.sas.models.performance.task.report.data.ks.statistic+json
    • application/vnd.sas.models.performance.task.report.data.mse+json
    If this header is not specified a 400 bad request HTTP Status code is returned.
    Enumerated Values
    Parameter Value
    Accept-Item application/vnd.sas.models.performance.task.report.data.lift+json
    Accept-Item application/vnd.sas.models.performance.task.report.data.variable.summary+json
    Accept-Item application/vnd.sas.models.performance.task.report.data.variable.deviation+json
    Accept-Item application/vnd.sas.models.performance.task.report.data.roc+json
    Accept-Item application/vnd.sas.models.performance.task.report.data.ks.cumulative+json
    Accept-Item application/vnd.sas.models.performance.task.report.data.ks.statistic+json
    Accept-Item application/vnd.sas.models.performance.task.report.data.mse+json

    Example responses

    200

    {
      "name": "string",
      "start": 0,
      "limit": 0,
      "count": 0,
      "accept": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "version": 0,
      "items": [
        null
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. workflowTask
    404 Not Found No performance task exists at the requested path. error2

    Get a list of performance tasks

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/modelManagement/performanceTasks \
      -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/modelManagement/performanceTasks',
      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/modelManagement/performanceTasks', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.collection+json"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://www.example.com/modelManagement/performanceTasks", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /performanceTasks

    Returns a list of performance tasks.

    Parameters
    Parameter In Type Required Description
    projectId query string false The server-generated identifier for the project.
    start query integer(int64) false The index of the first performance task to return.
    limit query integer(int32) false The maximum number of performance tasks to return.
    filter query string(string) false The criteria for filtering the performance task definitions. See Filtering in REST APIs.
    sortBy query string(sort-criteria) false The criteria for sorting the performance task definitions. See Sorting in REST APIs.

    Example responses

    200

    {
      "name": "string",
      "start": 0,
      "limit": 0,
      "count": 0,
      "accept": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "version": 0,
      "items": [
        {
          "assessAlert": "string",
          "assessWarn": "string",
          "characteristicAlert": "string",
          "characteristicWarn": "string",
          "createdBy": "string",
          "creationTimeStamp": "2019-11-22T18:48:45Z",
          "dataLibrary": "string",
          "dataPrefix": "string",
          "id": "string",
          "inputVariables": [
            "string"
          ],
          "maxBins": 0,
          "modelId": [
            "string"
          ],
          "modifiedBy": "string",
          "modifiedTimeStamp": "2019-11-22T18:48:45Z",
          "outputVariables": [
            "string"
          ],
          "performanceResultSaved": true,
          "resultLibrary": "string",
          "scoreExecutionRequired": true,
          "stabilityAlert": "string",
          "stabilityWarn": "string",
          "includeAllData": true,
          "loadPerformanceResult": true,
          "championMonitored": true,
          "challengerMonitored": true,
          "traceOn": true,
          "version": 0
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. performanceTaskCollection

    Create a performance task definition

    Code samples

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

    POST /performanceTasks

    Creates a performance task definition.

    Body parameter

    {
      "assessAlert": "string",
      "assessWarn": "string",
      "characteristicAlert": "string",
      "characteristicWarn": "string",
      "createdBy": "string",
      "creationTimeStamp": "2019-11-22T18:48:45Z",
      "dataLibrary": "string",
      "dataPrefix": "string",
      "id": "string",
      "inputVariables": [
        "string"
      ],
      "maxBins": 0,
      "modelId": [
        "string"
      ],
      "modifiedBy": "string",
      "modifiedTimeStamp": "2019-11-22T18:48:45Z",
      "outputVariables": [
        "string"
      ],
      "performanceResultSaved": true,
      "resultLibrary": "string",
      "scoreExecutionRequired": true,
      "stabilityAlert": "string",
      "stabilityWarn": "string",
      "includeAllData": true,
      "loadPerformanceResult": true,
      "championMonitored": true,
      "challengerMonitored": true,
      "traceOn": true,
      "version": 0
    }
    
    Parameters
    Parameter In Type Required Description
    body body performanceTask true The definition of the performance task.

    Example responses

    201

    {
      "assessAlert": "string",
      "assessWarn": "string",
      "characteristicAlert": "string",
      "characteristicWarn": "string",
      "createdBy": "string",
      "creationTimeStamp": "2019-11-22T18:48:45Z",
      "dataLibrary": "string",
      "dataPrefix": "string",
      "id": "string",
      "inputVariables": [
        "string"
      ],
      "maxBins": 0,
      "modelId": [
        "string"
      ],
      "modifiedBy": "string",
      "modifiedTimeStamp": "2019-11-22T18:48:45Z",
      "outputVariables": [
        "string"
      ],
      "performanceResultSaved": true,
      "resultLibrary": "string",
      "scoreExecutionRequired": true,
      "stabilityAlert": "string",
      "stabilityWarn": "string",
      "includeAllData": true,
      "loadPerformanceResult": true,
      "championMonitored": true,
      "challengerMonitored": true,
      "traceOn": true,
      "version": 0
    }
    
    Responses
    Status Meaning Description Schema
    201 Created The performance task definition was created. performanceTask
    400 Bad Request The request was invalid. error2
    Response Headers
    Status Header Type Format Description
    201 ETag string A tag that identifies the revision of this performance task definition.
    201 Location string uri The URL of the performance task definition.

    Create performance job history

    Code samples

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

    POST /performanceTasks/@defaultTask/performanceJobs

    Creates the performance job history.

    Body parameter

    {
      "code": "string",
      "createdBy": "string",
      "creationTimeStamp": "2019-11-22T18:48:45Z",
      "modifiedBy": "string",
      "modifiedTimeStamp": "2019-11-22T18:48:45Z",
      "state": "string",
      "jobReqId": "string"
    }
    
    Parameters
    Parameter In Type Required Description
    body body performanceJob true The definition of the performance job.

    Example responses

    201

    {
      "code": "string",
      "createdBy": "string",
      "creationTimeStamp": "2019-11-22T18:48:45Z",
      "modifiedBy": "string",
      "modifiedTimeStamp": "2019-11-22T18:48:45Z",
      "state": "string",
      "jobReqId": "string"
    }
    
    Responses
    Status Meaning Description Schema
    201 Created The performance job was created. performanceJob
    400 Bad Request The request was invalid. error2
    Response Headers
    Status Header Type Format Description
    201 Location string uri The URL of the performance job.

    Get a performance task definition

    Code samples

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

    GET /performanceTasks/{taskId}

    Returns the performance task definition.

    Parameters
    Parameter In Type Required Description
    taskId path string true Identifier of the task.
    start query integer(int64) false The index of the first performance task to return.
    limit query integer(int32) false The maximum number of performance tasks to return.

    Example responses

    200

    {
      "code": "string",
      "createdBy": "string",
      "creationTimeStamp": "2019-11-22T18:48:45Z",
      "modifiedBy": "string",
      "modifiedTimeStamp": "2019-11-22T18:48:45Z",
      "state": "string",
      "jobReqId": "string"
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. performanceJob
    404 Not Found No performance task definition exists at the requested path. error2
    Response Headers
    Status Header Type Format Description
    200 ETag string A tag that identifies the revision of this object.

    Execute a performance task

    Code samples

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

    POST /performanceTasks/{taskId}

    Executes a performance task job.

    Parameters
    Parameter In Type Required Description
    taskId path string true Identifier of the task.

    Example responses

    201

    {
      "code": "string",
      "createdBy": "string",
      "creationTimeStamp": "2019-11-22T18:48:45Z",
      "modifiedBy": "string",
      "modifiedTimeStamp": "2019-11-22T18:48:45Z",
      "state": "string",
      "jobReqId": "string"
    }
    
    Responses
    Status Meaning Description Schema
    201 Created The performance task was executed. performanceJob
    400 Bad Request The request was invalid. error2
    Response Headers
    Status Header Type Format Description
    201 ETag string A tag that identifies the revision of this object.
    201 Location string uri The URL of the performance task.

    Update a performance task definition

    Code samples

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

    PUT /performanceTasks/{taskId}

    Updates the performance task definition associated with the specified task ID.

    Body parameter

    {
      "assessAlert": "string",
      "assessWarn": "string",
      "characteristicAlert": "string",
      "characteristicWarn": "string",
      "createdBy": "string",
      "creationTimeStamp": "2019-11-22T18:48:45Z",
      "dataLibrary": "string",
      "dataPrefix": "string",
      "id": "string",
      "inputVariables": [
        "string"
      ],
      "maxBins": 0,
      "modelId": [
        "string"
      ],
      "modifiedBy": "string",
      "modifiedTimeStamp": "2019-11-22T18:48:45Z",
      "outputVariables": [
        "string"
      ],
      "performanceResultSaved": true,
      "resultLibrary": "string",
      "scoreExecutionRequired": true,
      "stabilityAlert": "string",
      "stabilityWarn": "string",
      "includeAllData": true,
      "loadPerformanceResult": true,
      "championMonitored": true,
      "challengerMonitored": true,
      "traceOn": true,
      "version": 0
    }
    
    Parameters
    Parameter In Type Required Description
    If-Match header string true If-Match
    taskId path string true The identifier of the task.
    body body performanceTask true The task contents for updating the task.

    Example responses

    200

    {
      "assessAlert": "string",
      "assessWarn": "string",
      "characteristicAlert": "string",
      "characteristicWarn": "string",
      "createdBy": "string",
      "creationTimeStamp": "2019-11-22T18:48:45Z",
      "dataLibrary": "string",
      "dataPrefix": "string",
      "id": "string",
      "inputVariables": [
        "string"
      ],
      "maxBins": 0,
      "modelId": [
        "string"
      ],
      "modifiedBy": "string",
      "modifiedTimeStamp": "2019-11-22T18:48:45Z",
      "outputVariables": [
        "string"
      ],
      "performanceResultSaved": true,
      "resultLibrary": "string",
      "scoreExecutionRequired": true,
      "stabilityAlert": "string",
      "stabilityWarn": "string",
      "includeAllData": true,
      "loadPerformanceResult": true,
      "championMonitored": true,
      "challengerMonitored": true,
      "traceOn": true,
      "version": 0
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. performanceTask
    400 Bad Request The request was invalid. error2
    412 Precondition Failed The If-Match request header did not match the resource's entity tag (ETag). error2
    428 Precondition Required The request headers did not include a If-Match or If-Unmodified-Since precondition. error2
    Response Headers
    Status Header Type Format Description
    200 ETag string A tag that identifies the revision of this object.

    Delete a performance task definition

    Code samples

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

    DELETE /performanceTasks/{taskId}

    Deletes a performance task definition.

    Parameters
    Parameter In Type Required Description
    taskId path string true The identifier of the task.
    deleteTask query boolean false Indicates whether to delete the task.
    deleteTable query boolean false Indicates whether to delete the table.
    Responses
    Status Meaning Description Schema
    204 No Content The performance task was deleted. None
    404 Not Found No performance task exists at the requested path. None

    Get all workflow object associations

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/modelManagement/workflowAssociations \
      -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/modelManagement/workflowAssociations',
      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/modelManagement/workflowAssociations', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.collection+json"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://www.example.com/modelManagement/workflowAssociations", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /workflowAssociations

    Returns a list of all workflow process associations to a model object.

    Parameters
    Parameter In Type Required Description
    start query integer(int64) false The index of the first workflow process association to return.
    limit query integer(int32) false The maximum number of workflow process associations to return.
    filter query string(string) false The criteria for filtering the workflow process associations. See Filtering in REST APIs.
    sortBy query string(sort-criteria) false The criteria for sorting the workflow process associations. See Sorting in REST APIs.

    Example responses

    200

    {
      "id": "string",
      "processId": "string",
      "processName": "string",
      "parentProcessId": "string",
      "objectType": "string",
      "solutionObjectId": "string",
      "solutionObjectName": "string",
      "solutionObjectUri": "string",
      "solutionObjectMediaType": "string",
      "version": 0,
      "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. workflowAssociation
    400 Bad Request The request was invalid. error2

    Create a workflow association

    Code samples

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

    POST /workflowAssociations

    Creates an association between a workflow process and a Model Repository object. This association is readable by SAS Model Manager so that it can understand when a model object, such as a project, is being used in a workflow process. SAS Model Manager can change its behavior for an object when that object is being used by a workflow process.

    Example responses

    201

    {
      "id": "string",
      "processId": "string",
      "processName": "string",
      "parentProcessId": "string",
      "objectType": "string",
      "solutionObjectId": "string",
      "solutionObjectName": "string",
      "solutionObjectUri": "string",
      "solutionObjectMediaType": "string",
      "version": 0,
      "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 A new association between a workflow process and a model object was created. workflowAssociation
    400 Bad Request The request was invalid. error2
    409 Conflict The requested workflow association conflicts with an existing resource. error2
    Response Headers
    Status Header Type Format Description
    201 Location string uri The URL of the workflow association.

    Get a workflow object association

    Code samples

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

    GET /workflowAssociations/{associationId}

    Returns a specific association for a workflow process to model object.

    Parameters
    Parameter In Type Required Description
    associationId path string true The ID of the workflow object association.

    Example responses

    200

    {
      "id": "string",
      "processId": "string",
      "processName": "string",
      "parentProcessId": "string",
      "objectType": "string",
      "solutionObjectId": "string",
      "solutionObjectName": "string",
      "solutionObjectUri": "string",
      "solutionObjectMediaType": "string",
      "version": 0,
      "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. workflowAssociation
    400 Bad Request The request was invalid. error2
    404 Not Found No association ID exists at the requested path. error2

    Get all workflow processes

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/modelManagement/workflowProcesses \
      -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/modelManagement/workflowProcesses',
      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/modelManagement/workflowProcesses', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.collection+json"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://www.example.com/modelManagement/workflowProcesses", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /workflowProcesses

    Returns all workflow processes that are associated with SAS Model Manager. The workflow processes are managed using the Workflow service. The processes in this list are defined in the Workflow service with the client registration ID for SAS Model Manager.

    Parameters
    Parameter In Type Required Description
    start query integer(int64) false The index of the first workflow process to return.
    limit query integer(int32) false The maximum number of workflow processes to return.
    filter query string(string) false The criteria for filtering the workflow processes. See Filtering in REST APIs.
    sortBy query string(sort-criteria) false The criteria for sorting the workflow processes. See Sorting in REST APIs.

    Example responses

    200

    {
      "id": "string",
      "parentId": "string",
      "name": "string",
      "createdTimeStamp": "2019-11-22T18:48:45Z",
      "createdBy": "string",
      "state": "string",
      "description": "string",
      "version": 0,
      "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. workflowProcess
    400 Bad Request The request was invalid. error2

    Get a workflow process

    Code samples

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

    GET /workflowProcesses/{processId}

    Returns a specific workflow process that has been associated with SAS Model Manager. The workflow is managed and authorized in the Workflow service. The process is available only if it has a client registration ID for SAS Model Manager.

    Parameters
    Parameter In Type Required Description
    processId path string true The ID of the workflow process.

    Example responses

    200

    {
      "id": "string",
      "parentId": "string",
      "name": "string",
      "createdTimeStamp": "2019-11-22T18:48:45Z",
      "createdBy": "string",
      "state": "string",
      "description": "string",
      "version": 0,
      "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. workflowProcess
    400 Bad Request The request was invalid. error2
    404 Not Found The process ID was not found. error2

    Get active workflow tasks

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/modelManagement/workflowTasks \
      -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/modelManagement/workflowTasks',
      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/modelManagement/workflowTasks', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.collection+json"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://www.example.com/modelManagement/workflowTasks", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /workflowTasks

    Returns active workflow tasks that are associated with SAS Model Manager. These are tasks where the authenticated user is either the owner or a potential owner. The tasks are managed using the Workflow service.

    Parameters
    Parameter In Type Required Description
    start query integer(int64) false The index of the first workflow tasks to return.
    limit query integer(int32) false The maximum number of workflow tasks to return.

    Example responses

    200

    {
      "id": "string",
      "processId": "string",
      "processTaskId": "string",
      "name": "string",
      "definitionName": "string",
      "actualOwner": "string",
      "state": "string",
      "stateTimeStamp": "2019-11-22T18:48:45Z",
      "taskDueTimeStamp": "2019-11-22T18:48:45Z",
      "creationTimeStamp": "2019-11-22T18:48:45Z",
      "createdBy": "string",
      "associations": [
        {
          "id": "string",
          "processId": "string",
          "processName": "string",
          "parentProcessId": "string",
          "objectType": "string",
          "solutionObjectId": "string",
          "solutionObjectName": "string",
          "solutionObjectUri": "string",
          "solutionObjectMediaType": "string",
          "version": 0,
          "links": [
            {
              "method": "string",
              "rel": "string",
              "uri": "string",
              "href": "string",
              "title": "string",
              "type": "string",
              "itemType": "string",
              "responseType": "string",
              "responseItemType": "string"
            }
          ]
        }
      ],
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "resourceCollection": [
        {
          "name": "string",
          "start": 0,
          "limit": 0,
          "count": 0,
          "accept": "string",
          "links": [
            {
              "method": "string",
              "rel": "string",
              "uri": "string",
              "href": "string",
              "title": "string",
              "type": "string",
              "itemType": "string",
              "responseType": "string",
              "responseItemType": "string"
            }
          ],
          "version": 0,
          "items": [
            null
          ]
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. workflowTask
    400 Bad Request The request was invalid. error2

    Get a workflow task

    Code samples

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

    GET /workflowTasks/{taskId}

    Returns an active task for a workflow process that is associated with a project in SAS Model Manager. The tasks that are returned have the authorized user as the owner or a potential owner.

    Parameters
    Parameter In Type Required Description
    taskId path string true The ID of a task from the tasks collection.

    Example responses

    200

    {
      "id": "string",
      "processId": "string",
      "processTaskId": "string",
      "name": "string",
      "definitionName": "string",
      "actualOwner": "string",
      "state": "string",
      "stateTimeStamp": "2019-11-22T18:48:45Z",
      "taskDueTimeStamp": "2019-11-22T18:48:45Z",
      "creationTimeStamp": "2019-11-22T18:48:45Z",
      "createdBy": "string",
      "associations": [
        {
          "id": "string",
          "processId": "string",
          "processName": "string",
          "parentProcessId": "string",
          "objectType": "string",
          "solutionObjectId": "string",
          "solutionObjectName": "string",
          "solutionObjectUri": "string",
          "solutionObjectMediaType": "string",
          "version": 0,
          "links": [
            {
              "method": "string",
              "rel": "string",
              "uri": "string",
              "href": "string",
              "title": "string",
              "type": "string",
              "itemType": "string",
              "responseType": "string",
              "responseItemType": "string"
            }
          ]
        }
      ],
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "resourceCollection": [
        {
          "name": "string",
          "start": 0,
          "limit": 0,
          "count": 0,
          "accept": "string",
          "links": [
            {
              "method": "string",
              "rel": "string",
              "uri": "string",
              "href": "string",
              "title": "string",
              "type": "string",
              "itemType": "string",
              "responseType": "string",
              "responseItemType": "string"
            }
          ],
          "version": 0,
          "items": [
            null
          ]
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. workflowTask
    400 Bad Request The request was invalid. error2
    404 Not Found No task with the specified ID exists at the requested path. None

    Get a list of workflow task prompts

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/modelManagement/workflowTasks/{taskId}/prompts \
      -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/modelManagement/workflowTasks/{taskId}/prompts',
      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/modelManagement/workflowTasks/{taskId}/prompts', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.collection+json"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://www.example.com/modelManagement/workflowTasks/{taskId}/prompts", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /workflowTasks/{taskId}/prompts

    Returns a list of all prompts that are associated with a workflow user task. The prompts are part of the workflow definition.

    Parameters
    Parameter In Type Required Description
    taskId path string true The ID of a task from the tasks collection.

    Example responses

    200

    {
      "id": "string",
      "name": "string",
      "variableType": "string",
      "variableName": "string",
      "values": [
        {
          "id": "string",
          "name": "string",
          "value": "string"
        }
      ],
      "required": "string",
      "defaultValueId": "string",
      "actualValue": "string",
      "version": 0,
      "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. taskPrompt
    400 Bad Request The request was invalid. error2
    404 Not Found No task with the specified ID exists at the requested path. None

    Get a workflow task prompt

    Code samples

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

    GET /workflowTasks/{taskId}/prompts/{promptId}

    Returns a specific prompt associated with a workflow user task. The prompts are part of the workflow definition.

    Parameters
    Parameter In Type Required Description
    taskId path string true The ID of a task from the tasks collection.
    promptId path string true The ID of a prompt from the prompts collection.

    Example responses

    200

    {
      "id": "string",
      "name": "string",
      "variableType": "string",
      "variableName": "string",
      "values": [
        {
          "id": "string",
          "name": "string",
          "value": "string"
        }
      ],
      "required": "string",
      "defaultValueId": "string",
      "actualValue": "string",
      "version": 0,
      "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. taskPrompt
    400 Bad Request The request was invalid. error2
    404 Not Found No task or prompt with the specified ID exists at the requested path. None

    Generate mapped model score code

    Code samples

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

    POST /models/{modelId}/mappedCode

    Generates mapped score code for a model that is wrapped for use with the Score Execution service. The model is managed in the common model repository by the Model Repository API. For more information, see the Model Repository API.

    Parameters
    Parameter In Type Required Description
    modelId path string true The ID of a model in the common model repository.

    Example responses

    201

    {
      "code": "/* DS2 code of an object, which generates an XYZ output table */",
      "codeType": "text/vnd.sas.source.ds2",
      "outputTableName": "XYZ",
      "outputLibraryName": "HPS"
    }
    
    Responses
    Status Meaning Description Schema
    201 Created The request succeeded. Inline
    400 Bad Request The request was invalid. error2
    404 Not Found No model exists at the requested path. None

    Create a model comparison report

    Code samples

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

    POST /reports

    Creates a model comparison report.

    Body parameter

    {
      "name": "string",
      "description": "string",
      "modelUris": [
        "string"
      ]
    }
    
    Parameters
    Parameter In Type Required Description
    body body reportRequest true The definition of the report request.

    Example responses

    201

    {
      "parentId": "string",
      "modelIds": [
        "string"
      ],
      "comparedModels": [
        {
          "createdBy": "string",
          "modifiedBy": "string",
          "creationTimeStamp": "2019-11-22T18:48:45Z",
          "modifiedTimeStamp": "2019-11-22T18:48:45Z",
          "id": "string",
          "name": "string",
          "description": "string",
          "function": "string",
          "algorithm": "string",
          "tool": "string",
          "modeler": "string",
          "scoreCodeType": "string",
          "trainTable": "string",
          "classificationEventProbabilityVariableName": "string",
          "classificationTargetEventValue": "string",
          "champion": true,
          "role": "string",
          "location": "string",
          "targetVariable": "string",
          "projectId": "string",
          "projectName": "string",
          "projectVersionId": "string",
          "projectVersionName": "string",
          "folderId": "string",
          "repositoryId": "string",
          "championStartTime": "string",
          "championEndTime": "string",
          "suggestedChampion": true,
          "retrainable": true,
          "immutable": true,
          "modelVersionName": "string",
          "properties": [
            {
              "name": "string",
              "value": "string",
              "type": "string"
            }
          ],
          "inputVariables": [
            {
              "createdBy": "string",
              "modifiedBy": "string",
              "creationTimeStamp": "2019-11-22T18:48:45Z",
              "modifiedTimeStamp": "2019-11-22T18:48:45Z",
              "name": "string",
              "description": "string",
              "role": "string",
              "type": "string",
              "level": "string",
              "length": 0,
              "version": 2
            }
          ],
          "outputVariables": [
            {
              "createdBy": "string",
              "modifiedBy": "string",
              "creationTimeStamp": "2019-11-22T18:48:45Z",
              "modifiedTimeStamp": "2019-11-22T18:48:45Z",
              "name": "string",
              "description": "string",
              "role": "string",
              "type": "string",
              "level": "string",
              "length": 0,
              "version": 2
            }
          ],
          "version": 2
        }
      ],
      "allInputVariables": [
        {
          "createdBy": "string",
          "modifiedBy": "string",
          "creationTimeStamp": "2019-11-22T18:48:45Z",
          "modifiedTimeStamp": "2019-11-22T18:48:45Z",
          "name": "string",
          "description": "string",
          "role": "string",
          "type": "string",
          "level": "string",
          "length": 0,
          "version": 2
        }
      ],
      "allOutputVariables": [
        {
          "createdBy": "string",
          "modifiedBy": "string",
          "creationTimeStamp": "2019-11-22T18:48:45Z",
          "modifiedTimeStamp": "2019-11-22T18:48:45Z",
          "name": "string",
          "description": "string",
          "role": "string",
          "type": "string",
          "level": "string",
          "length": 0,
          "version": 2
        }
      ],
      "allProperties": [
        {
          "name": "string",
          "value": "string",
          "type": "string"
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    201 Created A model comparison report was created. reportResponse
    400 Bad Request The request was invalid. error2

    Publish models

    Code samples

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

    POST /publish

    Publish a model to a CAS, Hadoop, Teradata, or SAS Micro Analytic Service publishing destination.

    Body parameter

    {
      "contents": {},
      "createdBy": "string",
      "creationTimeStamp": "2019-11-22T18:48:45Z",
      "databaseServer": {
        "authenticationDomain": "string",
        "casServerName": "string",
        "configDir": "string",
        "createdBy": "string",
        "creationTimeStamp": "2019-11-22T18:48:45Z",
        "credentialUri": "string",
        "databaseCasLibrary": "string",
        "databaseSchema": "string",
        "databaseType": "string",
        "description": "string",
        "hdfsDir": "string",
        "host": "string",
        "id": "string",
        "library": "string",
        "links": [
          {
            "method": "string",
            "rel": "string",
            "uri": "string",
            "href": "string",
            "title": "string",
            "type": "string",
            "itemType": "string",
            "responseType": "string",
            "responseItemType": "string"
          }
        ],
        "modifiedBy": "string",
        "modifiedTimeStamp": "2019-11-22T18:48:45Z",
        "name": "string",
        "password": "string",
        "port": 0,
        "restPort": 0,
        "table": "string",
        "type": "string",
        "user": "string",
        "version": 0
      },
      "description": "string",
      "destinationName": "string",
      "modelContents": [
        {
          "astoreUri": "string",
          "code": "string",
          "codeDescription": "string",
          "codeScope": "string",
          "codeType": "string",
          "codeUri": "string",
          "createdBy": "string",
          "creationTimeStamp": "2019-11-22T18:48:45Z",
          "format": "string",
          "formatUri": "string",
          "modelId": "string",
          "modelName": "string",
          "modelVersionId": "string",
          "modifiedBy": "string",
          "modifiedTimeStamp": "2019-11-22T18:48:45Z",
          "principalId": "string",
          "projectId": "string",
          "publishLevel": "string",
          "publishNotes": "string",
          "sourceUri": "string",
          "variableXml": "string"
        }
      ],
      "modifiedBy": "string",
      "modifiedTimeStamp": "2019-11-22T18:48:45Z",
      "name": "string",
      "notes": "string",
      "properties": {
        "property1": "string",
        "property2": "string"
      },
      "targetServer": {
        "authenticationDomain": "string",
        "casServerName": "string",
        "configDir": "string",
        "createdBy": "string",
        "creationTimeStamp": "2019-11-22T18:48:45Z",
        "credentialUri": "string",
        "databaseCasLibrary": "string",
        "databaseSchema": "string",
        "databaseType": "string",
        "description": "string",
        "hdfsDir": "string",
        "host": "string",
        "id": "string",
        "library": "string",
        "links": [
          {
            "method": "string",
            "rel": "string",
            "uri": "string",
            "href": "string",
            "title": "string",
            "type": "string",
            "itemType": "string",
            "responseType": "string",
            "responseItemType": "string"
          }
        ],
        "modifiedBy": "string",
        "modifiedTimeStamp": "2019-11-22T18:48:45Z",
        "name": "string",
        "password": "string",
        "port": 0,
        "restPort": 0,
        "table": "string",
        "type": "string",
        "user": "string",
        "version": 0
      },
      "targetServerLibraryUri": "string",
      "targetServerName": "string",
      "targetServerPassword": "string",
      "targetServerUri": "string",
      "type": "string",
      "verified": true,
      "version": 0
    }
    
    Parameters
    Parameter In Type Required Description
    force query boolean false force
    body body publishRequest true The representation of a publish request.

    Example responses

    201

    {
      "accept": "string",
      "count": 0,
      "items": [
        {}
      ],
      "limit": 0,
      "name": "string",
      "start": 0
    }
    
    Responses
    Status Meaning Description Schema
    201 Created The models were published successfully. resourceCollection
    400 Bad Request The request was invalid. Errors might of been caused by the model that was published, a snapshot that could not be created, the destination was not specified, or there are no models provided by the "modelContents". error2
    404 Not Found No model score code exists at the requested path. error2

    Code samples

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

    GET /

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

    Status Meaning Description Schema
    200 OK The request succeeded. None

    Check API availability

    Code samples

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

    HEAD /

    Returns the headers for the API. Also used to determine whether the service provided by the API is available.

    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. None

    Schemas

    performanceJob

    Properties

    Performance Job

    Name Type Required Description
    code string false The performance job SAS code.
    createdBy string false The user who created the job.
    creationTimeStamp string(date-time) false The timestamp for when the job was created, in the format of YYYY-MM-DDThh:mm:ss.sssZ.
    modifiedBy string false The user who most recently modified the job.
    modifiedTimeStamp string(date-time) false The timestamp for when the job was last modified, in the format of YYYY-MM-DDThh:mm:ss.sssZ.
    state string false The performance job state (running
    jobReqId string false The identifier for a job request.

    performanceTask

    Properties

    Performance Task

    Name Type Required Description
    assessAlert string false The assessment measurements alert condition.
    assessWarn string false The assessment measurements warning condition.
    characteristicAlert string false The characteristic measurements alert condition.
    characteristicWarn string false The characteristic measurements warning condition.
    createdBy string false The user who created the task.
    creationTimeStamp string(date-time) false The timestamp for when the task was created, in the format of YYYY-MM-DDThh:mm:ss.sssZ.
    dataLibrary string false The performance table library URI.
    dataPrefix string false The performance data table prefix.
    id string false The identifier for a performance task.
    inputVariables [string] false
    maxBins integer(int32) false The maximum bins number.
    modelId [string] false
    modifiedBy string false The user who most recently modified the task.
    modifiedTimeStamp string(date-time) false The timestamp for when the job was last modified, in the format of YYYY-MM-DDThh:mm:ss.sssZ.
    outputVariables [string] false
    performanceResultSaved boolean false Indicates whether the performance results are saved.
    resultLibrary string false The performance output table library URI.
    scoreExecutionRequired boolean false Indicates whether the scoring task execution is required.
    stabilityAlert string false The stability measurements alert condition.
    stabilityWarn string false The stability measurements warning condition.
    includeAllData boolean false Indicates whether to run a performance job against all the data tables in a library.
    loadPerformanceResult boolean false Indicates to load performance result data.
    championMonitored boolean false Indicates to monitor the project champion model.
    challengerMonitored boolean false Indicates to monitor challenger models.
    traceOn boolean false Indicates whether to turn on tracing.
    version integer false The version number of application/vnd.sas.models.performance.task+json.

    performanceTaskCollection

    Properties

    Performance Task Collection

    Name Type Required Description
    Performance Task Collection any false The performance task representations.

    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 [link] 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
    » items [performanceTask] true An array consisting of performance task resources.

    performanceJobCollection

    Properties

    Performance Job Collection

    Name Type Required Description
    Performance Job Collection any false The performance job representations.

    allOf

    Name Type Required Description
    anonymous performanceTaskCollection 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
    » items [performanceJob] true An array consisting of performance task resources.

    publishRequest

    Properties

    Publish Request

    Name Type Required Description
    contents object false contents
    createdBy string false The user who published the models.
    creationTimeStamp string(date-time) false The timestamp for when the models were published, in the format of 'YYYY-MM-DDThh:mm:ss.sssZ'.
    databaseServer targetServer false Information about the target server.
    description string false The description for the destination.
    destinationName string false The name of the destination.
    modelContents [publishContent] false The models to be published.
    modifiedBy string false The user who most recently modified the publish request definition.
    modifiedTimeStamp string(date-time) false The timestamp for when the publish request definition was last modified, in the format of 'YYYY-MM-DDThh:mm:ss.sssZ'.
    name string false Published name
    notes string false Notes
    properties object false Properties
    » additionalProperties string false
    targetServer targetServer false Information about the target server.
    targetServerLibraryUri string false The URI for the target server library.
    targetServerName string false The name of the target server.
    targetServerPassword string false The password for the target server.
    targetServerUri string false The URI for the target server.
    type string false The destination type.
    verified boolean false Indicates whether the target service has been verified.
    version integer(int32) false This media type's schema version number.

    targetServer

    Properties

    Target Server

    Name Type Required Description
    authenticationDomain string false The authentication domain that is used to retrieve the Teradata database or Hadoop credentials.
    casServerName string false The name of the CAS server.
    configDir string false The Hadoop configuration and JAR file directories. Separate the two directory pathnames with a colon (:). These names must match the names that you specified when creating the Hadoop global caslib.
    createdBy string false The user who created the target server.
    creationTimeStamp string(date-time) false The timestamp for when the server was created, in the format of 'YYYY-MM-DDThh:mm:ss.sssZ'.
    credentialUri string false The URI credentials.
    databaseCasLibrary string false The caslib that contains the external database options.
    databaseSchema string false The connection option that names the Teradata database to use to qualify the Teradata tables.
    databaseType string false The name of the database type (cas, hadoop, microAnalyticService, or teradata) for the target server.
    description string false The description of the target server.
    hdfsDir string false The root HDFS folder where the model directory is to be created.
    host string false The host name for the server
    id string false The identifier for the target server.
    library string false The name of the CAS library.
    links [any] false The links that apply to the target server.
    » 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.
    » modifiedBy string false The user who most recently modified the server.
    » modifiedTimeStamp string(date-time) false The timestamp for when the server was last modified, in the format of 'YYYY-MM-DDThh:mm:ss.sssZ'.
    » name string false The name of the server.
    » password string false The password for the user ID that is entered.
    » port integer(int32) false The port number for the database.
    » restPort integer(int32) false The port number for REST
    » table string false The name of the CAS or Teradata model table.
    » type string false The target server type.
    » user string false The user ID that has permission to access database content.
    » version integer(int32) false This media type's schema version number.

    publishContent

    Properties

    Published Model Content

    Name Type Required Description
    astoreUri string false The URI point to the analytic store in the CAS library.
    code string false The model score code.
    codeDescription string false The description of the code.
    codeScope string false The scope of the code.
    codeType string false The code type can be "datastep" or "ds2".
    codeUri string false codeUri
    createdBy string false The user who created the published content.
    creationTimeStamp string(date-time) false The timestamp for when the publish content was created, in the format of 'YYYY-MM-DDThh:mm:ss.sssZ'..
    format string false The format used to determine how the values of a variable should be written or displayed.
    formatUri string false formatUri
    modelId string false The model ID can be used by the client to find their published model.
    modelName string false The name of the model.
    modelVersionId string false The model version ID.
    modifiedBy string false The user who most recently modified the publish content.
    modifiedTimeStamp string(date-time) false The timestamp for when the publish content was last modified, in the format of 'YYYY-MM-DDThh:mm:ss.sssZ'.
    principalId string false The principal ID.
    projectId string false The project ID.
    publishLevel string false The publish level.
    publishNotes string false The publishing notes.
    sourceUri string false The source URI represents where the model is located.
    variableXml string false The variables in XML format.

    workflowAssociation

    Properties

    Workflow Association

    Name Type Required Description
    id string false The unique identifier for the association.
    processId string false The identifier of the workflow process.
    processName string false The name of workflow process.
    parentProcessId string false The identifier of the main workflow process. It is populated if the associated process is a sub-process.
    objectType string false The type of solution object associated with the workflow process. This type is specified by the solution.
    solutionObjectId string false The identifier of the solution object.
    solutionObjectName string false The name of the solution object.
    solutionObjectUri string false The URI of the solution object.
    solutionObjectMediaType string false The media type of the solution object.
    version integer(int32) false The version number for this media type's schema.
    links [link] false The links that apply to the workflow association.

    workflowProcess

    Properties

    Workflow Process

    Name Type Required Description
    id string false The unique identifier of the workflow process.
    parentId string false The identifier of the main workflow process. That is populated if this process is a sub-process.
    name string false The name of the workflow process.
    createdTimeStamp string(date-time) false The timestamp for when this definition revision was created, in the format of 'YYYY-MM-DDThh:mm:ss.sssZ'.
    createdBy string false The user ID that created this workflow.
    state string false The current processing state(In Progress
    description string false The description of the process.
    version integer(int32) false The version number for this media type's schema.
    links [link] false The links that apply to the workflow process.

    workflowTask

    Properties

    Workflow Task

    Name Type Required Description
    id string false The unique identifier of the workflow task.
    processId string false The identifier of the associated workflow process.
    processTaskId string false The identifier of the task in the Workflow service.
    name string false The name of the task.
    definitionName string false The name of the definition that defines the process.
    actualOwner string false The user ID of the owner of the task.
    state string false The state (Started
    stateTimeStamp string(date-time) false The timestamp of the last state change for the task.
    taskDueTimeStamp string(date-time) false The timestamp of when the task is due to be completed.
    creationTimeStamp string(date-time) false The timestamp of when this definition revision was created.
    createdBy string false The user ID that created this workflow.
    associations [workflowAssociation] false Collection of projects that are associated with this task.
    links [link] false The links that apply to the workflow task.
    resourceCollection [allOf] false The array of resource representations.
    » Collection object false A collection of zero or more resource representations. Collections are often paginated and the items array contains one page of representations.

    allOf

    Name Type Required Description
    »» anonymous performanceTaskCollection 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
    »»» items [any] false Array consisting API resource representations, normally a page worth.

    taskPrompt

    Properties

    Workflow Task Prompt

    Name Type Required Description
    id string false The unique identifier of the prompt.
    name string false The name of the prompt.
    variableType string false The type of the variable associated with the prompt.
    variableName string false The name of the variable associated with the prompt.
    values [promptValue] false An optional collection of values that can be set on the associated variable.
    required string false A flag that determines whether a value must be provided for this prompt. Valid values [true, false].
    defaultValueId string false The identifier of the prompt value, which defines the default value.
    actualValue any false The actual value that has been specified for this prompt.

    oneOf

    Name Type Required Description
    » anonymous string false

    xor

    Name Type Required Description
    » anonymous boolean false

    xor

    Name Type Required Description
    » anonymous number false

    continued

    Name Type Required Description
    version integer(int32) false This media type's schema version number.
    links [link] false The links that apply to the workflow process.

    promptValue

    Properties

    Workflow Task Prompt Value

    Name Type Required Description
    id string false The identifier of the prompt value.
    name string false The name of the prompt value.
    value string false The value that has been specified for this prompt.

    reportRequest

    Properties

    Report Request

    Name Type Required Description
    name string false The name of the report.
    description string false The description of the report.
    modelUris [string] false Collection of model URIs, which are used to perform a model comparison.

    reportResponse

    Properties

    Report Response

    Name Type Required Description
    parentId string false The unique identifier of the parent project.
    modelIds [string] false The collection of model IDs.
    comparedModels [any] false The collection of models being compared.
    » Model object false
    »» createdBy string false The user that created the model.
    »» modifiedBy string false The user that last modified the model.
    »» creationTimeStamp string(date-time) false The timestamp for when the model was created, in the format of YYYY-MM-DDThh:mm:ss.sssZ.
    »» modifiedTimeStamp string(date-time) false The timestamp for when the model was last modified, in the format of YYYY-MM-DDThh:mm:ss.sssZ.
    »» id string false The unique identifier for the model.
    »» name string false The name of the model.
    »» description string false The description of the model.
    »» function string false The function of the model. Valid values: analytical, classification, cluster, forecasting, prediction, Text analytics, transformation
    »» algorithm string false The name of model algorithm.
    »» tool string false The name of the model tool.
    »» modeler string false This is the user that created or built the model.
    »» scoreCodeType string false The score code type for the model.
    »» trainTable string false The train data table.
    »» classificationEventProbabilityVariableName string false The name of the event probability variable.
    »» classificationTargetEventValue string false The target event value.
    »» champion boolean false Indicates whether the project has champion model or not.
    »» role string false The role of the model. Valid values: plain, champion, challenger
    »» location string false The location of this model.
    »» targetVariable string false The name of the target variable.
    »» projectId string false The unique identifier for the project that contains the model.
    »» projectName string false The name of the project that contains the model.
    »» projectVersionId string false The unique identifier for the project version that contains the model.
    »» projectVersionName string false The display name of the project version that contains the model
    »» folderId string false The unique identifier for the folder that contains the model
    »» repositoryId string false The unique identifier for the repository that contains the model.
    »» championStartTime string false The time at which the model was set as the project champion model.
    »» championEndTime string false The time at which the model was unset (cleared) as the project champion model.
    »» suggestedChampion boolean false Indicates the model that was suggested as the champion model at import time.
    »» retrainable boolean false Indicates whether the model can be retrained or not.
    »» immutable boolean false Indicates whether the model can be changed or not.
    »» modelVersionName string false The display name for a model version.
    »» properties [any] false
    »»» Model Property object false
    »»»» name string false The name of the property.
    »»»» value string false The value for the property.
    »»»» type string false The data type for the property. Valid values: string, decimal, integer, date, datetime
    »»» inputVariables [any] false
    »»»» Variable object false
    »»»»» createdBy string false The user that created the variable.
    »»»»» modifiedBy string false The user that last modified the variable.
    »»»»» creationTimeStamp string(date-time) false The timestamp for when the variable was created, in the format of YYYY-MM-DDThh:mm:ss.sssZ.
    »»»»» modifiedTimeStamp string(date-time) false The timestamp for when the variable was last modified, in the format of YYYY-MM-DDThh:mm:ss.sssZ.
    »»»»» name string false The name of the variable.
    »»»»» description string false The description of this variable.
    »»»»» role string false The role of the variable. Valid values are: input, output, target
    »»»»» type string false The type of variable. Valid values are: string, decimal, integer, boolean, date, datetime
    »»»»» level string false The measurement level of the variable. Valid values are: binary, interval, nominal, ordinal
    »»»»» length integer false The length of the variable.
    »»»»» version integer false The variable representation version. The version is 2.
    »»»» outputVariables [variable] false
    »»»» version integer false The model representation version. The version is 2.
    »»» allInputVariables [any] false The collection of input variables.
    »»»» Variable object false
    »»»»» createdBy string false The user that created the variable.
    »»»»» modifiedBy string false The user that last modified the variable.
    »»»»» creationTimeStamp string(date-time) false The timestamp for when the variable was created, in the format of YYYY-MM-DDThh:mm:ss.sssZ.
    »»»»» modifiedTimeStamp string(date-time) false The timestamp for when the variable was last modified, in the format of YYYY-MM-DDThh:mm:ss.sssZ.
    »»»»» name string false The name of the variable.
    »»»»» description string false The description of this variable.
    »»»»» role string false The role of the variable. Valid values are: input, output, target
    »»»»» type string false The type of variable. Valid values are: string, decimal, integer, boolean, date, datetime
    »»»»» level string false The measurement level of the variable. Valid values are: binary, interval, nominal, ordinal
    »»»»» length integer false The length of the variable.
    »»»»» version integer false The variable representation version. The version is 2.
    »»»» allOutputVariables [variable] false The collection of output variables.
    »»»» allProperties [any] false The collection of model properties.
    »»»»» Model Property object false
    »»»»»» name string false The name of the property.
    »»»»»» value string false The value for the property.
    »»»»»» type string false The data type for the property. Valid values: string, decimal, integer, date, datetime

    resourceCollection

    Properties

    Resource Collection

    Name Type Required Description
    accept string false media type
    count integer(int64) false The total number of items.
    items [object] false
    limit integer(int32) false The maximum number of items to return in this request.
    name string false item name
    start integer(int64) false The 0-based start index of a paginated request. Default is 0.

    performanceReportDataLift

    Properties

    Performance Report Data for Lift

    Name Type Required Description
    percent number(double) false The percentage of lift.
    cumulativeLift number(double) false The cumulative percentage of lift.
    timeKey integer(int32) false Time sequence key

    performanceReportDataVariableSummary

    Properties

    Performance Report Data for Variable Summary

    Name Type Required Description
    name string false The name of the variable.
    timeKey integer(int32) false The time sequence key.
    percent number(double) false The deviation percentage.
    binId integer(int32) false The bin identifier.

    performanceReportDataVariableDeviation

    Properties

    Performance Report Data for Variable Deviation

    Name Type Required Description
    name string false The variable name.
    timeKey integer(int32) false The time sequence key.
    timeLabel string false The time label.
    index number(double) false The deviation index.

    performanceReportDataKSStatistic

    Properties

    Performance Report Data for the KS Statistic

    Name Type Required Description
    statistic number(double) false Kolmogorov-Smirnov statistics
    timeKey integer(int32) false The time sequence key.
    timeLabel string false The time label.

    performanceReportDataKSCumulative

    Properties

    Performance Report Data for KS Cumulative

    Name Type Required Description
    timeKey integer(int32) false The time sequence key.
    timeLabel string false Time label
    cutoff integer(int32) false The Kolmogorov-Smirnov cut-off value.
    eventPercent number(double) false The percent of cumulative event.
    nonEventPercent number(double) false The percent of cumulative non-event.

    performanceReportDataROC

    Properties

    Performance Report Data for ROC

    Name Type Required Description
    timeKey integer(int32) false The time sequence key.
    sensitivity number(double) false The sensitivity statistics.
    oneMinusSpecificity number(double) false The one minus specificity.

    performanceReportDataMSE

    Properties

    Performance Report Data for MSE

    Name Type Required Description
    timeKey integer(int32) false The time sequence key.
    mse number(double) false The mean squared error.
    timeLabel string false The time label.

    performanceReportDataGini

    Properties

    Performance Report Data for Gini

    Name Type Required Description
    timeKey integer(int32) false The time sequence key
    index number(double) false The Gini index.
    timeLabel string false The time label.

    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 [link] false The links that apply to the error.
    version integer true The version number of the error representation. This representation is version 2.

    Examples

    Github Examples

    Detailed examples on how to use this API can be found on Github.

    Media Type Samples

    application/vnd.sas.models.performance.task

    The application/vnd.sas.models.performance.task media type describes a performance monitor task definition.

    application/vnd.sas.models.performance.task+json

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

    { "creationTimeStamp": "2017-08-08T20:42:28.112Z", "modifiedTimeStamp": "2017-08-08T20:42:28.113Z", "createdBy": "bob", "modifiedBy": "bob", "links": [ { "method": "GET", "rel": "self", "href": "/modelManagement/performanceTasks/69ab3d14-0fc9-4873-9db7-bd89d8f74b58", "uri": "/modelManagement/performanceTasks/69ab3d14-0fc9-4873-9db7-bd89d8f74b58" } ], "version": 2, "id": "69ab3d14-0fc9-4873-9db7-bd89d8f74b58", "modelIds":["ae57f85c-8450-4361-8b36-a135bc7ed11d"], "outputVariables": [ "EM_EVENTPROBABILITY" ], "inputVariables": [ "REASON", "VALUE", "YOJ" ], "scoreExecutionRequired": false, "performanceResultSaved": false, "traceOn": false, "maxBins": 10, "resultLibrary": "ModelPerformanceData", "dataLibrary": "Public", "casServerId":"cas-shared-default", "dataPrefix": "hmeq_scored_" }

    application/vnd.sas.models.performance.job

    The application/vnd.sas.models.performance.job media type describes a performance monitor job.

    application/vnd.sas.models.performance.job+json

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

    { "creationTimeStamp": "2017-10-28T20:32:38.110Z", "modifiedTimeStamp": "2017-10-28T20:32:38.116Z", "createdBy": "bob", "modifiedBy": "bob", "links": [ { "method": "GET", "rel": "self", "href": "/modelManagement/performanceTasks/c38c2ea9-a49b-412a-8c27-d87038723c5e/performanceJobs/5908b2b0-d6d4-4d84-9762-2e91d5e54117", "uri": "/modelManagement/performanceTasks/c38c2ea9-a49b-412a-8c27-d87038723c5e/performanceJobs/5908b2b0-d6d4-4d84-9762-2e91d5e54117" } ], "version": 2, "id": "e1636c4f-37dc-4b1c-9774-3e7b1b24cd14", "taskId":"6f8e3b8c-be53-4a14-88a3-8e36335f7f1a", "task":"user score single", "code": "options cashost='greenrpm-6.edm.sashq-r.openstack.sas.com' casport=5570;\ncas mmcas;\ncaslib all assign;\n%let _M.....", "state": "running", "prefix":"", "model":"reg1", "dataLibrary":"Public", "resultLibrary":"ModelPerformanceData", "modelId":"ae57f85c-8450-4361-8b36-a135bc7ed11d", "startTime":"2018-05-04T15:12:16.347Z", "stopTime":"2018-05-04T15:12:50.542Z", "dataTable":"HMEQ-SCORE_1_Q1", "projectVersion":"Version 1", "projectId":"ce3a3bdd-bdb0-4477-8a38-17c866eb414e", "jobReqId":"5908b2b0-d6d4-4d84-9762-2e91d5e53453" }

    application/vnd.sas.workflow.object.task

    The workflow object task media type describes a task that the authorized user can work on. The schema is at application/vnd.sas.workflow.object.task.

    application/vnd.sas.workflow.object.task+json

    { "creationTimeStamp": "2017-10-11T18:05:50.000Z", "createdBy": "bob", "id": "8ae8973b5eff22b9015f0c9d34300027", "processId": "WF221d19c8-484e-45f9-95a5-2a25a0be30d9", "processTaskId": "WF444c6b58-268f-4fee-af9a-2d841247e47c", "definitionTaskId": "WF94999806-B56B-469C-8C7B-E9E63E452B8A", "name": "User Task", "definitionName": "Model Processing Flow", "state": "Started", "stateTimeStamp": "2017-10-11T18:05:49.997Z", "associations": [ { "solutionObjectType": "MM_Project", "solutionObjectName": "Project 2", "solutionObjectId": "891c2dc3-0e4a-4dca-9248-b8b8d3d8422a", "solutionObjectUri": "/modelRepository/projects/891c2dc3-0e4a-4dca-9248-b8b8d3d8422a" } ], "links": [ { "method": "GET", "rel": "self", "href": "/modelManagement/workflowTasks/8ae8973b5eff22b9015f0c9d34300027", "uri": "/modelManagement/workflowTasks/8ae8973b5eff22b9015f0c9d34300027" }, { "method": "GET", "rel": "alternate", "href": "/workflow/processes/WF221d19c8-484e-45f9-95a5-2a25a0be30d9/tasks/WF444c6b58-268f-4fee-af9a-2d841247e47c", "uri": "/workflow/processes/WF221d19c8-484e-45f9-95a5-2a25a0be30d9/tasks/WF444c6b58-268f-4fee-af9a-2d841247e47c" } ] }

    application/vnd.sas.workflow.object.prompt

    The workflow object prompt media type describes a prompt that is associated with a workflow task. The schema is at application/vnd.sas.workflow.object.prompt.

    application/vnd.sas.workflow.object.prompt+json

    { "id": "WFAD7ACD60-8B6B-4B58-A558-9A91B067442A", "name": "What is your name?", "variableType": "string", "variableName": "userName", "required": "false", "version": 0, "actualValue": "false", "links": [{ "method": "GET", "rel": "self", "href": "/modelManagement/workflowTasks/WF9b2fe3df-6ff4-4f84-b98f-f4e26ee8349f/prompts/WFAD7ACD60-8B6B-4B58-A558-9A91B067442A", "uri": "/modelManagement/workflowTasks/WF9b2fe3df-6ff4-4f84-b98f-f4e26ee8349f/prompts/WFAD7ACD60-8B6B-4B58-A558-9A91B067442A", "type": "application/vnd.sas.workflow.object.prompt" }, { "method": "GET", "rel": "up", "href": "/modelManagement/workflowTasks/WF9b2fe3df-6ff4-4f84-b98f-f4e26ee8349f/prompts", "uri": "/modelManagement/workflowTasks/WF9b2fe3df-6ff4-4f84-b98f-f4e26ee8349f/prompts", "type": "application/vnd.sas.collection" }, { "method": "GET", "rel": "task", "href": "/modelManagement/workflowTasks/WF9b2fe3df-6ff4-4f84-b98f-f4e26ee8349f", "uri": "/modelManagement/workflowTasks/WF9b2fe3df-6ff4-4f84-b98f-f4e26ee8349f", "type": "application/vnd.sas.workflow.object.task" }] }

    application/vnd.sas.workflow.object.association

    The workflow object association media type describes an association between a workflow process and a solution object, such as model project. The schema is at application/vnd.sas.workflow.object.association.

    application/vnd.sas.workflow.object.association+json

    Here is an example of the JSON representation for this media type:

    { "creationTimeStamp": "2017-10-18T22:33:29.112Z", "createdBy": "bob", "id": "8ae8973b5eff22b9015eff3d21510019", "processId": "WFfcd3e296-2faa-463f-8ed0-dfd012574671", "processName": "Workflow_1", "objectType": "MM_Project", "solutionObjectName": "Project 2_GJC", "solutionObjectId": "32754f10-6a12-4a35-b8b7-03835424e257", "solutionObjectUri": "/modelRepository/projects/32754f10-6a12-4a35-b8b7-03835424e257", "links": [ { "method": "GET", "rel": "self", "href": "/modelManagement/workflowAssociations/8ae8973b5eff22b9015eff3d21510019", "uri": "/modelManagement/workflowAssociations/8ae8973b5eff22b9015eff3d21510019" }, { "method": "GET", "rel": "process", "href": "/modelManagement/workflowProcesses/WFfcd3e296-2faa-463f-8ed0-dfd012574671", "uri": "/modelManagement/workflowProcesses/WFfcd3e296-2faa-463f-8ed0-dfd012574671" }, { "method": "GET", "rel": "projects", "href": "/modelRepository/projects/32754f10-6a12-4a35-b8b7-03835424e257", "uri": "/modelRepository/projects/32754f10-6a12-4a35-b8b7-03835424e257" }
    ] }

    application/vnd.sas.workflow.object.process

    Provides information about a workflow process, managed by the Workflow service, that is associated with SAS Model Manager. The schema is at application/vnd.sas.workflow.object.process.

    application/vnd.sas.workflow.object.process+json

    Here is an example of the JSON representation of this media-type:

    { "id": "WF634702f1-8970-4131-aa9b-c9a64e3f6e54", "name": "Workflow_1", "createdTimeStamp": "2017-10-09T03:00:01.664Z", "createdBy": "bob", "state": "In Progress", "description": "", "links": [ { "method": "GET", "rel": "self", "href": "/modelManagement/workflowProcesses/WF634702f1-8970-4131-aa9b-c9a64e3f6e54", "uri": "/modelManagement/workflowProcesses/WF634702f1-8970-4131-aa9b-c9a64e3f6e54" }, { "method": "GET", "rel": "alternate", "href": "/workflow/processes/WF634702f1-8970-4131-aa9b-c9a64e3f6e54", "uri": "/workflow/processes/WF634702f1-8970-4131-aa9b-c9a64e3f6e54" } ] }

    application/vnd.sas.score.mapped.code

    This type is used to generate code that is mapped to specific data, based on the request.

    The codeType returned within the mappedCode depends on the score code type that is specified for the model in the Model Repository API.

    See application/vnd.sas.score.mapped.code

    application/vnd.sas.models.publishing.model

    Contains details about publishing a model to a destination server.

    The schema is at publishModel.

    application/vnd.sas.models.publishing.model+json

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

    { "creationTimeStamp":"2017-08-18T18:34:50.173Z", "modifiedTimeStamp":"2017-08-18T18:34:50.173Z", "createdBy":"userId", "modifiedBy":"userId", "version":1, "id":"04d65048-78a9-441c-98df-d4aa7b014687", "publishName":"reg1", "publishType":"casModel", "verified":false, "destinationName": "casDestination", "codeType":"dataStep", "analyticStoreUri":[ "/dataTables/dataSources/cas~fs~cas-shared-default~fs~Public/tables/HMEQ" ], "sourceUri":"/modelRepository/models/dscodeModelId/code", "note":"testing publish a model", "properties":{ "property2":"anyValue", "property1":"anyValue" }, "links":[ { "method":"GET", "rel":"self", "href":"/modelPublisher/models/04d65048-78a9-441c-98df-d4aa7b014687", "uri":"/modelPublisher/models/04d65048-78a9-441c-98df-d4aa7b014687", "type":"application/vnd.sas.models.publishing.model" } ] }

    application/vnd.sas.models.publishing.request

    Describes publishing a model to a predefined destination.

    The schema is at publishRequest.

    application/vnd.sas.models.publishing.request+json

    Here is an example of the JSON representation of this media type, which publishes models to CAS at the model level:

    { "name" : "Published model DS2EP", "notes" : "Publish models", "modelContents" : [{ "modelName" : "DS2EP", "sourceUri" : "/modelRepository/models/5aff81e6-9d07-41cc-a112-efe65a1fa737", "publishLevel" : "model" } ], "destinationName" : "CAS_PUBLIC" }

    application/vnd.sas.models.report.comparison.request

    The model comparison request object media type that is used to generate models comparison report. The schema is at application/vnd.sas.models.report.comparison.request.

    application/vnd.sas.models.report.comparison.request+json

    Here is an example of the JSON representation for this media type:

    { "name":"compareModels", "description":"", "modelUris":[ "/modelRepository/models/1997700c-f3f0-493b-9a7d-67a6fca07f56", "/modelRepository/models/65f01d3e-aa1f-45cd-8327-0391aa7e3702" ] }

    application/vnd.sas.models.performance.task.report.data.lift+json

    The lift media type represents a data point in the performance report. The schema is at application/vnd.sas.models.performance.task.report.data.lift.

    application/vnd.sas.models.performance.task.report.data.variable.summary+json

    The variable summary media type represents a data point in the performance report. The schema is at application/vnd.sas.models.performance.task.report.data.variable.summary.

    application/vnd.sas.models.performance.task.report.data.variable.deviation+json

    The variable deviation media type represents a data point in the performance report. The schema is at application/vnd.sas.models.performance.task.report.data.variable.deviation.

    application/vnd.sas.models.performance.task.report.data.roc+json

    The ROC media type represents a data point in the performance report. The schema is at application/vnd.sas.models.performance.task.report.data.roc.

    application/vnd.sas.models.performance.task.report.data.ks.cumulative+json

    The KS cumulative media type represents a data point in the performance report. The schema is at application/vnd.sas.models.performance.task.report.data.ks.cumulative.

    application/vnd.sas.models.performance.task.report.data.ks.statistic+json

    The KS statistic media type represents a data point in the performance report. The schema is at application/vnd.sas.models.performance.task.report.data.ks.statistic.

    application/vnd.sas.models.performance.task.report.data.mse+json

    The MSE statistic media type represents a data point in the performance report. The schema is at application/vnd.sas.models.performance.task.report.data.mse.

    application/vnd.sas.models.performance.task.report.data.gini+json

    The Gini statistic media type represents a data point in the performance report. The schema is at application/vnd.sas.models.performance.task.report.data.gini.

    Resource Reference

    Collection Resources
    Path: /performanceTasks

    This API provides collections of performance task definitions. Members of the /performanceJob collection are folders, /performanceJob/{id}.

    Path: /peformanceTasks/{taskId}/performanceJobs

    This API provides collections of performance jobs. Members of the /peformanceTasks/{taskId}/performanceJobs collection are performance jobs, /peformanceTasks/{taskId}/performanceJobs/{jobId}.

    Single Item Resources
    Path: /performanceTasks/{taskId}

    A specific performance task definition.

    Path: /performanceTasks/{taskId}/performanceJobs/{jobId}

    A specific performance job.

    Path: /performanceTasks/{taskId}/@defaultTask/performanceJobs

    This API provides a single performance job response object performanceJob.

    The performanceJob representation is application/vnd.sas.models.performance.job+json.

    The response includes the following links:

    Relation Method Description
    create POST Creates a new performance job.
    Request type: application/vnd.sas.models.performance.job+json.
    Response type: application/vnd.sas.models.performance.job+json.
    Workflow Associations
    Path: /workflowAssociations

    This API provides collections of workflow object associations.

    The association collection representation is application/vnd.sas.collection. The collection items are application/vnd.sas.workflow.object.association.

    The response includes the following links:

    Relation Method Description
    create POST Creates a new workflow association.
    Request type: application/vnd.sas.workflow.object.association.
    Response type: application/vnd.sas.workflow.object.association.
    self GET Returns the current page from the collection.
    Response type: application/vnd.sas.collection.
    prev GET Returns the previous page of resources from the collection. This link is omitted if the current view is on the first page.
    Response type: application/vnd.sas.collection.
    next GET Returns the next page of resources from the collection. This link is omitted if the current view is on the last page of the collection.
    Response type: application/vnd.sas.collection.
    first GET Returns the first page of resources from the collection. This link is omitted if the current view is on the first page.
    Response type: application/vnd.sas.collection.
    last GET Returns the last page of resources from the collection. This link is omitted if the current view is on the last page.
    Response type: application/vnd.sas.collection.
    Sorting and Filtering

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

    Filtering and sorting uses the members of the workflowAssociation:

    Workflow Association
    Path: /workflowAssociations/{associationId}

    This API provides a single workflow object association.

    The workflowAssociation representation is application/vnd.sas.workflow.object.association.

    The response includes the following links:

    Relation Method Description
    self GET Returns the association by ID.
    Response type: application/vnd.sas.workflow.object.association.
    process GET Returns the workflow process that is referenced by the association.
    Response type: application/vnd.sas.workflow.process.
    object GET Returns the object that is referenced by the association.
    Response type is based on the media type of the associated object. From the user interface, it is a model project, but it can be any object in the system.
    delete DELETE Deletes the association by ID.
    Workflow Processes
    /workflowProcesses

    This API provides collections of workflow object processes that have a Client Reference ID of SAS Model Manager.

    The processes collection representation is application/vnd.sas.collection. The collection items are application/vnd.sas.workflow.object.process.

    The response includes the following links:

    Relation Method Description
    self GET Returns the current page from the collection.
    Response type: application/vnd.sas.collection.
    prev GET Returns the previous page of resources from the collection. This link is omitted if the current view is on the first page.
    Response type: application/vnd.sas.collection.
    next GET Returns the next page of resources from the collection. This link is omitted if the current view is on the last page of the collection.
    Response type: application/vnd.sas.collection.
    first GET Returns the first page of resources from the collection. This link is omitted if the current view is on the first page.
    Response type: application/vnd.sas.collection.
    last GET Returns the last page of resources from the collection. This link is omitted if the current view is on the last page.
    Response type: application/vnd.sas.collection.
    Sorting and Filtering

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

    Filtering and sorting use the members of the workflowProcess:

    Workflow Process
    Path: /workflowProcesses/{processId}

    This API provides a single workflow object process.

    The workflowProcess representation is application/vnd.sas.workflow.object.process.

    The response includes the following links:

    Relation Method Description
    self GET Returns the process by ID.
    Response type: application/vnd.sas.workflow.object.process.
    alternate GET Returns the workflow process that is referenced by an association.
    Response type: application/vnd.sas.workflow.process.
    Workflow Tasks
    /workflowTasks

    This API provides collections of workflow object tasks that have a client reference ID of SAS Model Manager, and where the current user is an owner or potential owner.

    The workflowTask representation is application/vnd.sas.workflow.object.task.

    The response includes the following links:

    Relation Method Description
    self GET Returns the association by ID.
    Response type: application/vnd.sas.workflow.object.task.
    prev GET Returns the previous page of resources from the collection. This link is omitted if the current view is on the first page.
    Response type: application/vnd.sas.collection.
    next GET Returns the next page of resources from the collection. This link is omitted if the current view is on the last page of the collection.
    Response type: application/vnd.sas.collection.
    first GET Returns the first page of resources from the collection. This link is omitted if the current view is on the first page.
    Response type: application/vnd.sas.collection.
    last GET Returns the last page of resources from the collection. This link is omitted if the current view is on the last page.
    Response type: application/vnd.sas.collection.
    Workflow Task
    /workflowTasks/{taskId}

    This API provides a single workflow object task.

    The response includes the following links:

    Relation Method Description
    self GET Returns the task by ID.
    Response type: application/vnd.sas.workflow.object.task.
    alternate GET Returns the workflow task that is referenced by an association.
    Response type: [`application/
    Task Prompts
    /workflowTasks/{taskId}/prompts

    This API provides collections of prompts for the specified workflow task. Prompts are references to data that a user needs to provide before completing a task.

    The prompts collection representation is application/vnd.sas.collection. The collection items are application/vnd.sas.workflow.object.prompt.

    The response includes the following links:

    Relation Method Description
    self GET Returns the current page from the collection.
    Response type: application/vnd.sas.collection.
    prev GET Returns the previous page of resources from the collection. This link is omitted if the current view is on the first page.
    Response type: application/vnd.sas.collection.
    next GET Returns the next page of resources from the collection. This link is omitted if the current view is on the last page of the collection.
    Response type: application/vnd.sas.collection.
    first GET Returns the first page of resources from the collection. This link is omitted if the current view is on the first page.
    Response type: application/vnd.sas.collection.
    last GET Returns the last page of resources from the collection. This link is omitted if the current view is on the last page.
    Response type: application/vnd.sas.collection.
    Task Prompt
    /workflowTasks/{taskId}/prompts/{promptId}

    This API provides a single prompt.

    The response includes the following links:

    Relation Method Description
    self GET Returns the task by ID.
    Response type: application/vnd.sas.workflow.object.prompt.
    task GET Returns the workflow task that is associated with a prompt.
    Response type: application/vnd.sas.workflow.object.task.
    up GET Returns the collection of prompts for a workflow task.
    Response type: application/vnd.sas.collection.
    Mapped Code

    Path: /models/{modelId}/mappedCode

    Responds with a fully executable program based on application/vnd.sas.score.code.generation.request, which is provided within the request.

    The mappedCode response representation is application/vnd.sas.score.mapped.code, which contains the generated code.

    Model Report
    Path: /reports

    This API provides a single report response object comparisonModel.

    The comparisonModel representation is application/vnd.sas.models.report.comparison.model.

    The response includes the following links:

    Relation Method Description
    create POST Creates a new model comparison report.
    Request type: application/vnd.sas.models.report.comparison.request.
    Response type: application/vnd.sas.models.report.comparison.model.
    Publish Models
    Path: /publish

    This API provides collections of published models.

    Default page size is 20.

    The publish collection representation is application/vnd.sas.collection. The collection items are application/vnd.sas.models.publishing.model resources. (These types apply to the response for the self, prev, next, first, and last links below.)

    The response includes the following links:

    Relation Method Description
    self GET Returns the current page from the collection.
    Response type: application/vnd.sas.collection.
    prev GET Returns the previous page of resources from the collection. This link is omitted if the current view is on the first page.
    Response type: application/vnd.sas.collection.
    next GET Returns the next page of resources from the collection. This link is omitted if the current view is on the last page of the collection.
    Response type: application/vnd.sas.collection.
    first GET Returns the first page of resources from the collection. This link is omitted if the current view is on the first page.
    Response type: application/vnd.sas.collection.
    last GET Returns the last page of resources from the collection. This link is omitted if the current view is on the last page.
    Response type: application/vnd.sas.collection.
    publishedModels POST Publishes a model to a destination server.
    Request type: application/vnd.sas.models.publishing.model.
    Response type: application/vnd.sas.models.publishing.model.

    Model Repository

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

    Base URLs:

    The Model Repository API provides support for registering, organizing, and managing models within a common model repository.

    Usage Notes

    Overview

    The Model Repository API provides access to a common model repository and provides support for registering, organizing, and managing models.

    Here are the functions that this API provides:

    Models that are located within projects can also be monitored for performance and scored.

    The operations of the Model Repository API can be called by other APIs. Here are some examples:

    For more information, see the SAS Model Manager software product support page.

    Terminology

    champion model

    a model that is the best predictive model chosen from a pool of candidate models within a model project. A project can have only one champion model. This is the model that is selected to solve the problem in the production scoring environment.

    challenger model

    a model that is compared and assessed against the project's champion model. This provides model comparison for the purpose of selecting a better champion model in the production scoring environment. A model project can contain zero or more challenger models.

    model

    a formula or algorithm that computes outputs from inputs. An example is a predictive model that derives information about the conditional distribution of the target variables, given the input variables.

    model content

    a set of model files and metadata. The Model Repository service requires analytical models to have a score.sas source file. It can be considered as a main program in other programming languages. The score.sas code can reference other content files, either by using a SAS LIBNAME engine or filename engine.

    model input

    a set of input variables that are required by a model and are used to predict the value of one or more target variables.

    model output

    a set of output variables that are produced by a model in a data mining process. A variable that is computed from the input variables as a prediction of the value of a target variable.

    model project

    a project that contains a collection of models and is meant to solve a specific business problem. It defines available input (project input variables) that can be used to solve the business problem by providing specific output (project output variables). A model building tool, such as Model Studio can be used to create models that can solve the problem defined in the project.

    model version

    a version or snapshot of a model's contents taken at a specific point in time that includes a list of model files and metadata information. Only the latest model version is editable.

    project input

    a set of input variables that a model project provides for a modeler to use when building a model.

    project output

    a set of output variables that a model project requires a model to produce.

    project version

    a versioned container of models. A version is a sequential number that increments by plus one each time you add a new version. A project can contain multiple editable versions. A project version is used to differentiate collections of models that are meant to solve the project's problem over time-boundaries.

    repository folder

    a hierarchical container within the common model repository. It provides a way to store and organize model information, and can contain projects, models, and subfolders.

    variable

    a column in either a SAS data set or a database table.

    Error Codes

    HTTP Status Code Error Code Description
    400 21200 A table with the specified name was not found.
    409 21201 The project name or model name is already in use in the selected folder. Enter a unique name.
    400 21202 You must delete all of the projects and models within a repository before you can delete it.
    400 21203 You must specify a name.
    400 21204 The name is too long.
    409 21205 The name already exists at the same level.
    400 21206 The specified ID is not valid.
    400 21207 The model is already set as the project champion model.
    400 21208 The project output variables must be a subset of the champion model output variables.
    400 21209 You cannot set the champion model as a challenger model.
    400 21210 A model has not been set as the project champion.
    400 21211 The file is not associated with the project.
    400 21212 The value for enum is invalid.
    400 21213 No project versions exist for the project.
    400 21214 You specified values for both the projectId and the folderId parameters. You can specify only one.
    400 21215 You must specify all of the required parameters.
    400 21216 The JSON file contains invalid content.
    400 21217 An error occurred during model import. Please check the error log for details.
    400 21218 No enum constant name.
    400 21219 A model must be associated with a repository.
    400 21221 The analytic store file contains invalid content.

    Operations

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/modelRepository/ \
      -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/modelRepository/',
      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/modelRepository/', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.api+json"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://www.example.com/modelRepository/", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /

    Returns a list of links to the top-level resources that are 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. A list of top-level link objects was returned. Inline

    Check API availability

    Code samples

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

    HEAD /

    Returns whether the model repository service is available.

    Example responses

    404

    {
      "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 service is running and available. None
    404 Not Found No root resource exists at the requested path. Check the URI for errors. error2

    Check if models exist

    Code samples

    # You can also use wget
    curl -X HEAD https://www.example.com/modelRepository/models \
      -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/modelRepository/models',
      method: 'head',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.collection+json'
    }
    
    r = requests.head('https://www.example.com/modelRepository/models', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.collection+json"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("HEAD", "https://www.example.com/modelRepository/models", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    HEAD /models

    Returns header information for a list of models that are within the common model repository. Also used to determine whether models exist.

    Parameters
    Parameter In Type Required Description
    name query string(sort-criteria) false A query string that allows a search by name for a model.
    parentId query string(sort-criteria) false A query string that allows a search for models in a folder or project.
    start query integer(int32) false The starting index for the first item in a page. The index is 0-based. See Pagination in REST APIsfor more information about how pagination is applied to collections.
    limit query integer(int32) false The maximum number of items to return in the request.
    filter query string(filter-criteria) false The criteria for filtering the models. For more information, see Filtering in REST APIs
    sortBy query string false The criteria for sorting the models. For more information, see Sorting in REST APIs

    Example responses

    200

    {
      "name": "string",
      "start": 0,
      "limit": 0,
      "count": 0,
      "accept": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "version": 0,
      "items": [
        {
          "createdBy": "string",
          "modifiedBy": "string",
          "creationTimeStamp": "2019-11-22T18:48:47Z",
          "modifiedTimeStamp": "2019-11-22T18:48:47Z",
          "id": "string",
          "name": "string",
          "description": "string",
          "function": "string",
          "algorithm": "string",
          "tool": "string",
          "modeler": "string",
          "scoreCodeType": "string",
          "trainTable": "string",
          "classificationEventProbabilityVariableName": "string",
          "classificationTargetEventValue": "string",
          "champion": true,
          "role": "string",
          "location": "string",
          "targetVariable": "string",
          "projectId": "string",
          "projectName": "string",
          "projectVersionId": "string",
          "projectVersionName": "string",
          "folderId": "string",
          "repositoryId": "string",
          "championStartTime": "string",
          "championEndTime": "string",
          "suggestedChampion": true,
          "retrainable": true,
          "immutable": true,
          "modelVersionName": "string",
          "dataUris": [
            {
              "name": "string",
              "uri": "string",
              "uriType": "string",
              "mediaType": "string",
              "contentType": "string"
            }
          ],
          "properties": [
            {
              "name": "string",
              "value": "string",
              "type": "string"
            }
          ],
          "inputVariables": [
            {
              "createdBy": "string",
              "modifiedBy": "string",
              "creationTimeStamp": "2019-11-22T18:48:47Z",
              "modifiedTimeStamp": "2019-11-22T18:48:47Z",
              "name": "string",
              "description": "string",
              "role": "string",
              "type": "string",
              "level": "string",
              "format": "string",
              "length": 0,
              "version": 2
            }
          ],
          "outputVariables": [
            {
              "createdBy": "string",
              "modifiedBy": "string",
              "creationTimeStamp": "2019-11-22T18:48:47Z",
              "modifiedTimeStamp": "2019-11-22T18:48:47Z",
              "name": "string",
              "description": "string",
              "role": "string",
              "type": "string",
              "level": "string",
              "format": "string",
              "length": 0,
              "version": 2
            }
          ],
          "version": 2
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. modelCollection

    Get a list of models

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/modelRepository/models \
      -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/modelRepository/models',
      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/modelRepository/models', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.collection+json"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://www.example.com/modelRepository/models", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /models

    Returns a list of models that are within the common model repository.

    Parameters
    Parameter In Type Required Description
    name query string(sort-criteria) false A query string that allows a search by name for a model.
    parentId query string(sort-criteria) false A query string that allows a search for models in a folder or project.
    start query integer(int32) false The starting index for the first item in a page. The index is 0-based. For more information about how pagination is applied to collections, see Pagination in REST APIs.
    limit query integer(int32) false The maximum number of items to return in the request.
    filter query string(filter-criteria) false The criteria for filtering the models. For more information, see Filtering in REST APIs.
    sortBy query string false The criteria for sorting the models. For more information, see Sorting in REST APIs.

    Example responses

    200

    {
      "name": "string",
      "start": 0,
      "limit": 0,
      "count": 0,
      "accept": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "version": 0,
      "items": [
        {
          "createdBy": "string",
          "modifiedBy": "string",
          "creationTimeStamp": "2019-11-22T18:48:47Z",
          "modifiedTimeStamp": "2019-11-22T18:48:47Z",
          "id": "string",
          "name": "string",
          "description": "string",
          "function": "string",
          "algorithm": "string",
          "tool": "string",
          "modeler": "string",
          "scoreCodeType": "string",
          "trainTable": "string",
          "classificationEventProbabilityVariableName": "string",
          "classificationTargetEventValue": "string",
          "champion": true,
          "role": "string",
          "location": "string",
          "targetVariable": "string",
          "projectId": "string",
          "projectName": "string",
          "projectVersionId": "string",
          "projectVersionName": "string",
          "folderId": "string",
          "repositoryId": "string",
          "championStartTime": "string",
          "championEndTime": "string",
          "suggestedChampion": true,
          "retrainable": true,
          "immutable": true,
          "modelVersionName": "string",
          "dataUris": [
            {
              "name": "string",
              "uri": "string",
              "uriType": "string",
              "mediaType": "string",
              "contentType": "string"
            }
          ],
          "properties": [
            {
              "name": "string",
              "value": "string",
              "type": "string"
            }
          ],
          "inputVariables": [
            {
              "createdBy": "string",
              "modifiedBy": "string",
              "creationTimeStamp": "2019-11-22T18:48:47Z",
              "modifiedTimeStamp": "2019-11-22T18:48:47Z",
              "name": "string",
              "description": "string",
              "role": "string",
              "type": "string",
              "level": "string",
              "format": "string",
              "length": 0,
              "version": 2
            }
          ],
          "outputVariables": [
            {
              "createdBy": "string",
              "modifiedBy": "string",
              "creationTimeStamp": "2019-11-22T18:48:47Z",
              "modifiedTimeStamp": "2019-11-22T18:48:47Z",
              "name": "string",
              "description": "string",
              "role": "string",
              "type": "string",
              "level": "string",
              "format": "string",
              "length": 0,
              "version": 2
            }
          ],
          "version": 2
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. The models were returned. modelCollection
    400 Bad Request The request was invalid. error2

    Create a model

    Code samples

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

    POST /models

    Creates a model into a project or folder using a model JSON object.

    Body parameter

    {
      "createdBy": "string",
      "modifiedBy": "string",
      "creationTimeStamp": "2019-11-22T18:48:47Z",
      "modifiedTimeStamp": "2019-11-22T18:48:47Z",
      "id": "string",
      "name": "string",
      "description": "string",
      "function": "string",
      "algorithm": "string",
      "tool": "string",
      "modeler": "string",
      "scoreCodeType": "string",
      "trainTable": "string",
      "classificationEventProbabilityVariableName": "string",
      "classificationTargetEventValue": "string",
      "champion": true,
      "role": "string",
      "location": "string",
      "targetVariable": "string",
      "projectId": "string",
      "projectName": "string",
      "projectVersionId": "string",
      "projectVersionName": "string",
      "folderId": "string",
      "repositoryId": "string",
      "championStartTime": "string",
      "championEndTime": "string",
      "suggestedChampion": true,
      "retrainable": true,
      "immutable": true,
      "modelVersionName": "string",
      "dataUris": [
        {
          "name": "string",
          "uri": "string",
          "uriType": "string",
          "mediaType": "string",
          "contentType": "string"
        }
      ],
      "properties": [
        {
          "name": "string",
          "value": "string",
          "type": "string"
        }
      ],
      "inputVariables": [
        {
          "createdBy": "string",
          "modifiedBy": "string",
          "creationTimeStamp": "2019-11-22T18:48:47Z",
          "modifiedTimeStamp": "2019-11-22T18:48:47Z",
          "name": "string",
          "description": "string",
          "role": "string",
          "type": "string",
          "level": "string",
          "format": "string",
          "length": 0,
          "version": 2
        }
      ],
      "outputVariables": [
        {
          "createdBy": "string",
          "modifiedBy": "string",
          "creationTimeStamp": "2019-11-22T18:48:47Z",
          "modifiedTimeStamp": "2019-11-22T18:48:47Z",
          "name": "string",
          "description": "string",
          "role": "string",
          "type": "string",
          "level": "string",
          "format": "string",
          "length": 0,
          "version": 2
        }
      ],
      "version": 2
    }
    
    Parameters
    Parameter In Type Required Description
    body body model false If the model is defined craftily, then this information is mandatory. The following fields are ignored from the input: id, createdBy, modifiedBy

    Example responses

    201

    {
      "createdBy": "string",
      "modifiedBy": "string",
      "creationTimeStamp": "2019-11-22T18:48:47Z",
      "modifiedTimeStamp": "2019-11-22T18:48:47Z",
      "id": "string",
      "name": "string",
      "description": "string",
      "function": "string",
      "algorithm": "string",
      "tool": "string",
      "modeler": "string",
      "scoreCodeType": "string",
      "trainTable": "string",
      "classificationEventProbabilityVariableName": "string",
      "classificationTargetEventValue": "string",
      "champion": true,
      "role": "string",
      "location": "string",
      "targetVariable": "string",
      "projectId": "string",
      "projectName": "string",
      "projectVersionId": "string",
      "projectVersionName": "string",
      "folderId": "string",
      "repositoryId": "string",
      "championStartTime": "string",
      "championEndTime": "string",
      "suggestedChampion": true,
      "retrainable": true,
      "immutable": true,
      "modelVersionName": "string",
      "dataUris": [
        {
          "name": "string",
          "uri": "string",
          "uriType": "string",
          "mediaType": "string",
          "contentType": "string"
        }
      ],
      "properties": [
        {
          "name": "string",
          "value": "string",
          "type": "string"
        }
      ],
      "inputVariables": [
        {
          "createdBy": "string",
          "modifiedBy": "string",
          "creationTimeStamp": "2019-11-22T18:48:47Z",
          "modifiedTimeStamp": "2019-11-22T18:48:47Z",
          "name": "string",
          "description": "string",
          "role": "string",
          "type": "string",
          "level": "string",
          "format": "string",
          "length": 0,
          "version": 2
        }
      ],
      "outputVariables": [
        {
          "createdBy": "string",
          "modifiedBy": "string",
          "creationTimeStamp": "2019-11-22T18:48:47Z",
          "modifiedTimeStamp": "2019-11-22T18:48:47Z",
          "name": "string",
          "description": "string",
          "role": "string",
          "type": "string",
          "level": "string",
          "format": "string",
          "length": 0,
          "version": 2
        }
      ],
      "version": 2
    }
    
    Responses
    Status Meaning Description Schema
    201 Created A model was created. model
    400 Bad Request The request was invalid. error2
    409 Conflict The request could not be completed due to a conflict with the current state of the resource. The model already exists. error2
    Response Headers
    Status Header Type Format Description
    201 Location string /modelRepository/models/{modelId}
    201 ETag string A tag that identifies this revision of this object.

    Import models into a model project

    Code samples

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

    POST /models#Project

    Imports one or more models from the project request object. The model contains project properties and a list of model links.

    Body parameter

    Parameters
    Parameter In Type Required Description
    body body projectRequest false

    Example responses

    201

    {
      "name": "string",
      "start": 0,
      "limit": 0,
      "count": 0,
      "accept": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "version": 0,
      "items": [
        {
          "createdBy": "string",
          "modifiedBy": "string",
          "creationTimeStamp": "2019-11-22T18:48:47Z",
          "modifiedTimeStamp": "2019-11-22T18:48:47Z",
          "id": "string",
          "name": "string",
          "description": "string",
          "function": "string",
          "algorithm": "string",
          "tool": "string",
          "modeler": "string",
          "scoreCodeType": "string",
          "trainTable": "string",
          "classificationEventProbabilityVariableName": "string",
          "classificationTargetEventValue": "string",
          "champion": true,
          "role": "string",
          "location": "string",
          "targetVariable": "string",
          "projectId": "string",
          "projectName": "string",
          "projectVersionId": "string",
          "projectVersionName": "string",
          "folderId": "string",
          "repositoryId": "string",
          "championStartTime": "string",
          "championEndTime": "string",
          "suggestedChampion": true,
          "retrainable": true,
          "immutable": true,
          "modelVersionName": "string",
          "dataUris": [
            {
              "name": "string",
              "uri": "string",
              "uriType": "string",
              "mediaType": "string",
              "contentType": "string"
            }
          ],
          "properties": [
            {
              "name": "string",
              "value": "string",
              "type": "string"
            }
          ],
          "inputVariables": [
            {
              "createdBy": "string",
              "modifiedBy": "string",
              "creationTimeStamp": "2019-11-22T18:48:47Z",
              "modifiedTimeStamp": "2019-11-22T18:48:47Z",
              "name": "string",
              "description": "string",
              "role": "string",
              "type": "string",
              "level": "string",
              "format": "string",
              "length": 0,
              "version": 2
            }
          ],
          "outputVariables": [
            {
              "createdBy": "string",
              "modifiedBy": "string",
              "creationTimeStamp": "2019-11-22T18:48:47Z",
              "modifiedTimeStamp": "2019-11-22T18:48:47Z",
              "name": "string",
              "description": "string",
              "role": "string",
              "type": "string",
              "level": "string",
              "format": "string",
              "length": 0,
              "version": 2
            }
          ],
          "version": 2
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    201 Created The models were imported. modelCollection
    400 Bad Request The request was invalid. error2
    409 Conflict The request could not be completed due to a conflict with the current state of the resource. The model already exists. error2
    Response Headers
    Status Header Type Format Description
    201 Location string /modelRepository/models/{modelId}

    Import a model into a folder

    Code samples

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

    POST /models#CommonModel

    Imports a model into a folder within the common model repository.

    Body parameter

    Parameters
    Parameter In Type Required Description
    folderId query string false The unique identifier for the folder that contains the model.
    body body modelRequest false

    Example responses

    201

    {
      "createdBy": "string",
      "modifiedBy": "string",
      "creationTimeStamp": "2019-11-22T18:48:47Z",
      "modifiedTimeStamp": "2019-11-22T18:48:47Z",
      "id": "string",
      "name": "string",
      "description": "string",
      "function": "string",
      "algorithm": "string",
      "tool": "string",
      "modeler": "string",
      "scoreCodeType": "string",
      "trainTable": "string",
      "classificationEventProbabilityVariableName": "string",
      "classificationTargetEventValue": "string",
      "champion": true,
      "role": "string",
      "location": "string",
      "targetVariable": "string",
      "projectId": "string",
      "projectName": "string",
      "projectVersionId": "string",
      "projectVersionName": "string",
      "folderId": "string",
      "repositoryId": "string",
      "championStartTime": "string",
      "championEndTime": "string",
      "suggestedChampion": true,
      "retrainable": true,
      "immutable": true,
      "modelVersionName": "string",
      "dataUris": [
        {
          "name": "string",
          "uri": "string",
          "uriType": "string",
          "mediaType": "string",
          "contentType": "string"
        }
      ],
      "properties": [
        {
          "name": "string",
          "value": "string",
          "type": "string"
        }
      ],
      "inputVariables": [
        {
          "createdBy": "string",
          "modifiedBy": "string",
          "creationTimeStamp": "2019-11-22T18:48:47Z",
          "modifiedTimeStamp": "2019-11-22T18:48:47Z",
          "name": "string",
          "description": "string",
          "role": "string",
          "type": "string",
          "level": "string",
          "format": "string",
          "length": 0,
          "version": 2
        }
      ],
      "outputVariables": [
        {
          "createdBy": "string",
          "modifiedBy": "string",
          "creationTimeStamp": "2019-11-22T18:48:47Z",
          "modifiedTimeStamp": "2019-11-22T18:48:47Z",
          "name": "string",
          "description": "string",
          "role": "string",
          "type": "string",
          "level": "string",
          "format": "string",
          "length": 0,
          "version": 2
        }
      ],
      "version": 2
    }
    
    Responses
    Status Meaning Description Schema
    201 Created A model was imported. model
    400 Bad Request The request was invalid. error2
    409 Conflict The request could not be completed due to a conflict with the current state of the resource. The model already exists. error2
    Response Headers
    Status Header Type Format Description
    201 Location string /modelRepository/models/{modelId}
    201 ETag string A tag that identifies the revision of this object.

    Import a model from an SPK file

    Code samples

    # You can also use wget
    curl -X POST https://www.example.com/modelRepository/models#MultipartFormData?name=string&type=SPK \
      -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/modelRepository/models#MultipartFormData',
      method: 'post',
      data: '?name=string&type=SPK',
      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/modelRepository/models#MultipartFormData', params={
      'name': 'string',  'type': 'SPK'
    }, headers = headers)
    
    print r.json()
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"multipart/form-data"},
            "Accept": []string{"application/vnd.sas.collection+json"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://www.example.com/modelRepository/models#MultipartFormData", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /models#MultipartFormData

    Imports a model from a SAS package (SPK) file. Select an SPK file from a local machine and then import it. The folder ID or project version ID is required. If importing a model into a folder, use folder ID. Otherwise, use project version ID.

    Body parameter

    files: string
    
    
    Parameters
    Parameter In Type Required Description
    name query string true The name of the model.
    type query string(sort-criteria) true The type of model. The value must be "SPK".
    folderId query string(sort-criteria) false The unique identifier for the folder. The folderId or projectVersionId parameter must be specified.
    projectVersionId query string(sort-criteria) false The unique identifier for the project version. The folderId or projectVersionId parameter must be specified.
    function query string(sort-criteria) false The function of the model.
    description query string(sort-criteria) false The description of the model.
    body body object false
    » files body string(binary) true Select an SPK file from your local client machine.

    Example responses

    201

    {
      "name": "string",
      "start": 0,
      "limit": 0,
      "count": 0,
      "accept": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "version": 0,
      "items": [
        {
          "createdBy": "string",
          "modifiedBy": "string",
          "creationTimeStamp": "2019-11-22T18:48:47Z",
          "modifiedTimeStamp": "2019-11-22T18:48:47Z",
          "id": "string",
          "name": "string",
          "description": "string",
          "function": "string",
          "algorithm": "string",
          "tool": "string",
          "modeler": "string",
          "scoreCodeType": "string",
          "trainTable": "string",
          "classificationEventProbabilityVariableName": "string",
          "classificationTargetEventValue": "string",
          "champion": true,
          "role": "string",
          "location": "string",
          "targetVariable": "string",
          "projectId": "string",
          "projectName": "string",
          "projectVersionId": "string",
          "projectVersionName": "string",
          "folderId": "string",
          "repositoryId": "string",
          "championStartTime": "string",
          "championEndTime": "string",
          "suggestedChampion": true,
          "retrainable": true,
          "immutable": true,
          "modelVersionName": "string",
          "dataUris": [
            {
              "name": "string",
              "uri": "string",
              "uriType": "string",
              "mediaType": "string",
              "contentType": "string"
            }
          ],
          "properties": [
            {
              "name": "string",
              "value": "string",
              "type": "string"
            }
          ],
          "inputVariables": [
            {
              "createdBy": "string",
              "modifiedBy": "string",
              "creationTimeStamp": "2019-11-22T18:48:47Z",
              "modifiedTimeStamp": "2019-11-22T18:48:47Z",
              "name": "string",
              "description": "string",
              "role": "string",
              "type": "string",
              "level": "string",
              "format": "string",
              "length": 0,
              "version": 2
            }
          ],
          "outputVariables": [
            {
              "createdBy": "string",
              "modifiedBy": "string",
              "creationTimeStamp": "2019-11-22T18:48:47Z",
              "modifiedTimeStamp": "2019-11-22T18:48:47Z",
              "name": "string",
              "description": "string",
              "role": "string",
              "type": "string",
              "level": "string",
              "format": "string",
              "length": 0,
              "version": 2
            }
          ],
          "version": 2
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    201 Created The model was imported. modelCollection
    400 Bad Request The request was invalid. error2
    409 Conflict The request could not be completed due to a conflict with the current state of the resource. The model already exists. error2
    Response Headers
    Status Header Type Format Description
    201 Location string The location of this model.
    201 ETag string A tag that identifies this revision of this object.

    Import a model through an octet stream

    Code samples

    # You can also use wget
    curl -X POST https://www.example.com/modelRepository/models#octetStream?name=string&type=SPK \
      -H 'Content-Type: application/octet-stream' \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.collection+json'
    
    
    var headers = {
      'Content-Type':'application/octet-stream',
      'Accept':'application/vnd.sas.collection+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/modelRepository/models#octetStream',
      method: 'post',
      data: '?name=string&type=SPK',
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Content-Type': 'application/octet-stream',
      'Accept': 'application/vnd.sas.collection+json'
    }
    
    r = requests.post('https://www.example.com/modelRepository/models#octetStream', params={
      'name': 'string',  'type': 'SPK'
    }, headers = headers)
    
    print r.json()
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/octet-stream"},
            "Accept": []string{"application/vnd.sas.collection+json"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://www.example.com/modelRepository/models#octetStream", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /models#octetStream

    Imports a model through input stream. The folder ID or project version ID is required. If the model should be imported into a folder, use the folder ID. Otherwise, use project version ID.

    Body parameter

    string
    
    
    Parameters
    Parameter In Type Required Description
    name query string true The model name.
    type query string(sort-criteria) true The value for type can be SPK, ZIP, or CAS.
    folderId query string(sort-criteria) false You must specify a folder ID or project version ID.
    projectVersionId query string(sort-criteria) false You must specify a folder ID or project version ID.
    projectName query string(sort-criteria) false The model is imported into this project.
    versionOption query string(sort-criteria) false This parameter indicates to create a new version, use the latest version, or use an existing version to import the model into. Valid values are NEW, LATEST, or a number.
    function query string(sort-criteria) false The function of the model.
    description query string(sort-criteria) false The description of the model.
    body body string(binary) true Select a model content from your local machine to import a model.

    Example responses

    201

    {
      "name": "string",
      "start": 0,
      "limit": 0,
      "count": 0,
      "accept": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "version": 0,
      "items": [
        {
          "createdBy": "string",
          "modifiedBy": "string",
          "creationTimeStamp": "2019-11-22T18:48:47Z",
          "modifiedTimeStamp": "2019-11-22T18:48:47Z",
          "id": "string",
          "name": "string",
          "description": "string",
          "function": "string",
          "algorithm": "string",
          "tool": "string",
          "modeler": "string",
          "scoreCodeType": "string",
          "trainTable": "string",
          "classificationEventProbabilityVariableName": "string",
          "classificationTargetEventValue": "string",
          "champion": true,
          "role": "string",
          "location": "string",
          "targetVariable": "string",
          "projectId": "string",
          "projectName": "string",
          "projectVersionId": "string",
          "projectVersionName": "string",
          "folderId": "string",
          "repositoryId": "string",
          "championStartTime": "string",
          "championEndTime": "string",
          "suggestedChampion": true,
          "retrainable": true,
          "immutable": true,
          "modelVersionName": "string",
          "dataUris": [
            {
              "name": "string",
              "uri": "string",
              "uriType": "string",
              "mediaType": "string",
              "contentType": "string"
            }
          ],
          "properties": [
            {
              "name": "string",
              "value": "string",
              "type": "string"
            }
          ],
          "inputVariables": [
            {
              "createdBy": "string",
              "modifiedBy": "string",
              "creationTimeStamp": "2019-11-22T18:48:47Z",
              "modifiedTimeStamp": "2019-11-22T18:48:47Z",
              "name": "string",
              "description": "string",
              "role": "string",
              "type": "string",
              "level": "string",
              "format": "string",
              "length": 0,
              "version": 2
            }
          ],
          "outputVariables": [
            {
              "createdBy": "string",
              "modifiedBy": "string",
              "creationTimeStamp": "2019-11-22T18:48:47Z",
              "modifiedTimeStamp": "2019-11-22T18:48:47Z",
              "name": "string",
              "description": "string",
              "role": "string",
              "type": "string",
              "level": "string",
              "format": "string",
              "length": 0,
              "version": 2
            }
          ],
          "version": 2
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    201 Created The model was imported. modelCollection
    400 Bad Request The request was invalid. error2
    409 Conflict The request could not be completed due to a conflict with the current state of the resource. The model already exists. error2
    Response Headers
    Status Header Type Format Description
    201 Location string The location of the model.
    201 ETag string The entity tag for the model.

    Get a model

    Code samples

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

    GET /models/{modelId}

    Returns the model information for the specified model ID.

    Parameters
    Parameter In Type Required Description
    modelId path string true

    Example responses

    200

    {
      "createdBy": "string",
      "modifiedBy": "string",
      "creationTimeStamp": "2019-11-22T18:48:47Z",
      "modifiedTimeStamp": "2019-11-22T18:48:47Z",
      "id": "string",
      "name": "string",
      "description": "string",
      "function": "string",
      "algorithm": "string",
      "tool": "string",
      "modeler": "string",
      "scoreCodeType": "string",
      "trainTable": "string",
      "classificationEventProbabilityVariableName": "string",
      "classificationTargetEventValue": "string",
      "champion": true,
      "role": "string",
      "location": "string",
      "targetVariable": "string",
      "projectId": "string",
      "projectName": "string",
      "projectVersionId": "string",
      "projectVersionName": "string",
      "folderId": "string",
      "repositoryId": "string",
      "championStartTime": "string",
      "championEndTime": "string",
      "suggestedChampion": true,
      "retrainable": true,
      "immutable": true,
      "modelVersionName": "string",
      "dataUris": [
        {
          "name": "string",
          "uri": "string",
          "uriType": "string",
          "mediaType": "string",
          "contentType": "string"
        }
      ],
      "properties": [
        {
          "name": "string",
          "value": "string",
          "type": "string"
        }
      ],
      "inputVariables": [
        {
          "createdBy": "string",
          "modifiedBy": "string",
          "creationTimeStamp": "2019-11-22T18:48:47Z",
          "modifiedTimeStamp": "2019-11-22T18:48:47Z",
          "name": "string",
          "description": "string",
          "role": "string",
          "type": "string",
          "level": "string",
          "format": "string",
          "length": 0,
          "version": 2
        }
      ],
      "outputVariables": [
        {
          "createdBy": "string",
          "modifiedBy": "string",
          "creationTimeStamp": "2019-11-22T18:48:47Z",
          "modifiedTimeStamp": "2019-11-22T18:48:47Z",
          "name": "string",
          "description": "string",
          "role": "string",
          "type": "string",
          "level": "string",
          "format": "string",
          "length": 0,
          "version": 2
        }
      ],
      "version": 2
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. The model information is returned. model
    404 Not Found Not found error2
    Response Headers
    Status Header Type Format Description
    200 ETag string A tag that identifies the revision of this object.

    Check if a model exists

    Code samples

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

    HEAD /models/{modelId}

    Returns the header information for the specified model ID. Also used to determine whether a model exists.

    Parameters
    Parameter In Type Required Description
    modelId path string true The unique identifier for the model.

    Example responses

    200

    {
      "createdBy": "string",
      "modifiedBy": "string",
      "creationTimeStamp": "2019-11-22T18:48:47Z",
      "modifiedTimeStamp": "2019-11-22T18:48:47Z",
      "id": "string",
      "name": "string",
      "description": "string",
      "function": "string",
      "algorithm": "string",
      "tool": "string",
      "modeler": "string",
      "scoreCodeType": "string",
      "trainTable": "string",
      "classificationEventProbabilityVariableName": "string",
      "classificationTargetEventValue": "string",
      "champion": true,
      "role": "string",
      "location": "string",
      "targetVariable": "string",
      "projectId": "string",
      "projectName": "string",
      "projectVersionId": "string",
      "projectVersionName": "string",
      "folderId": "string",
      "repositoryId": "string",
      "championStartTime": "string",
      "championEndTime": "string",
      "suggestedChampion": true,
      "retrainable": true,
      "immutable": true,
      "modelVersionName": "string",
      "dataUris": [
        {
          "name": "string",
          "uri": "string",
          "uriType": "string",
          "mediaType": "string",
          "contentType": "string"
        }
      ],
      "properties": [
        {
          "name": "string",
          "value": "string",
          "type": "string"
        }
      ],
      "inputVariables": [
        {
          "createdBy": "string",
          "modifiedBy": "string",
          "creationTimeStamp": "2019-11-22T18:48:47Z",
          "modifiedTimeStamp": "2019-11-22T18:48:47Z",
          "name": "string",
          "description": "string",
          "role": "string",
          "type": "string",
          "level": "string",
          "format": "string",
          "length": 0,
          "version": 2
        }
      ],
      "outputVariables": [
        {
          "createdBy": "string",
          "modifiedBy": "string",
          "creationTimeStamp": "2019-11-22T18:48:47Z",
          "modifiedTimeStamp": "2019-11-22T18:48:47Z",
          "name": "string",
          "description": "string",
          "role": "string",
          "type": "string",
          "level": "string",
          "format": "string",
          "length": 0,
          "version": 2
        }
      ],
      "version": 2
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. The model information was returned. model
    404 Not Found No model exists at the requested path. error2
    Response Headers
    Status Header Type Format Description
    200 ETag string The entity tag for the model.

    Update a model

    Code samples

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

    PUT /models/{modelId}

    Updates the model information for the model that matches the specified criteria and model ID.

    Body parameter

    {
      "createdBy": "string",
      "modifiedBy": "string",
      "creationTimeStamp": "2019-11-22T18:48:47Z",
      "modifiedTimeStamp": "2019-11-22T18:48:47Z",
      "id": "string",
      "name": "string",
      "description": "string",
      "function": "string",
      "algorithm": "string",
      "tool": "string",
      "modeler": "string",
      "scoreCodeType": "string",
      "trainTable": "string",
      "classificationEventProbabilityVariableName": "string",
      "classificationTargetEventValue": "string",
      "champion": true,
      "role": "string",
      "location": "string",
      "targetVariable": "string",
      "projectId": "string",
      "projectName": "string",
      "projectVersionId": "string",
      "projectVersionName": "string",
      "folderId": "string",
      "repositoryId": "string",
      "championStartTime": "string",
      "championEndTime": "string",
      "suggestedChampion": true,
      "retrainable": true,
      "immutable": true,
      "modelVersionName": "string",
      "dataUris": [
        {
          "name": "string",
          "uri": "string",
          "uriType": "string",
          "mediaType": "string",
          "contentType": "string"
        }
      ],
      "properties": [
        {
          "name": "string",
          "value": "string",
          "type": "string"
        }
      ],
      "inputVariables": [
        {
          "createdBy": "string",
          "modifiedBy": "string",
          "creationTimeStamp": "2019-11-22T18:48:47Z",
          "modifiedTimeStamp": "2019-11-22T18:48:47Z",
          "name": "string",
          "description": "string",
          "role": "string",
          "type": "string",
          "level": "string",
          "format": "string",
          "length": 0,
          "version": 2
        }
      ],
      "outputVariables": [
        {
          "createdBy": "string",
          "modifiedBy": "string",
          "creationTimeStamp": "2019-11-22T18:48:47Z",
          "modifiedTimeStamp": "2019-11-22T18:48:47Z",
          "name": "string",
          "description": "string",
          "role": "string",
          "type": "string",
          "level": "string",
          "format": "string",
          "length": 0,
          "version": 2
        }
      ],
      "version": 2
    }
    
    Parameters
    Parameter In Type Required Description
    If-Match header string true Client needs to specify the previously pulled ETag as If-Matchheader.
    modelId path string true
    body body model false If the model is defined, then this information is mandatory.

    Example responses

    200

    {
      "createdBy": "string",
      "modifiedBy": "string",
      "creationTimeStamp": "2019-11-22T18:48:47Z",
      "modifiedTimeStamp": "2019-11-22T18:48:47Z",
      "id": "string",
      "name": "string",
      "description": "string",
      "function": "string",
      "algorithm": "string",
      "tool": "string",
      "modeler": "string",
      "scoreCodeType": "string",
      "trainTable": "string",
      "classificationEventProbabilityVariableName": "string",
      "classificationTargetEventValue": "string",
      "champion": true,
      "role": "string",
      "location": "string",
      "targetVariable": "string",
      "projectId": "string",
      "projectName": "string",
      "projectVersionId": "string",
      "projectVersionName": "string",
      "folderId": "string",
      "repositoryId": "string",
      "championStartTime": "string",
      "championEndTime": "string",
      "suggestedChampion": true,
      "retrainable": true,
      "immutable": true,
      "modelVersionName": "string",
      "dataUris": [
        {
          "name": "string",
          "uri": "string",
          "uriType": "string",
          "mediaType": "string",
          "contentType": "string"
        }
      ],
      "properties": [
        {
          "name": "string",
          "value": "string",
          "type": "string"
        }
      ],
      "inputVariables": [
        {
          "createdBy": "string",
          "modifiedBy": "string",
          "creationTimeStamp": "2019-11-22T18:48:47Z",
          "modifiedTimeStamp": "2019-11-22T18:48:47Z",
          "name": "string",
          "description": "string",
          "role": "string",
          "type": "string",
          "level": "string",
          "format": "string",
          "length": 0,
          "version": 2
        }
      ],
      "outputVariables": [
        {
          "createdBy": "string",
          "modifiedBy": "string",
          "creationTimeStamp": "2019-11-22T18:48:47Z",
          "modifiedTimeStamp": "2019-11-22T18:48:47Z",
          "name": "string",
          "description": "string",
          "role": "string",
          "type": "string",
          "level": "string",
          "format": "string",
          "length": 0,
          "version": 2
        }
      ],
      "version": 2
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The model was updated. model
    400 Bad Request The request was invalid. error2
    404 Not Found No model exists at the requested path. error2
    412 Precondition Failed The If-Match request header did not match the resource's entity tag, or the If-Unmodified-Since request header did not match the resource's last modified timestamp. error2
    428 Precondition Required The request headers did not include a If-Match or If-Unmodified-Since precondition. error2
    Response Headers
    Status Header Type Format Description
    200 ETag string The entity tag for the model.

    Delete a model

    Code samples

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

    DELETE /models/{modelId}

    Deletes the model with the specified ID from the model repository.

    Parameters
    Parameter In Type Required Description
    modelId path string true
    Responses
    Status Meaning Description Schema
    204 No Content The model was deleted. None
    404 Not Found No model exists at the requested path for the specified model ID. None

    Get a list of model analytic stores

    Code samples

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

    GET /models/{modelId}/analyticStore

    Returns a list of metadata for analytic stores (application/vnd.sas.models.analytic.store) that are associated with the model. Note that this does not allow retrieval of the analytic store, only the metadata.

    Parameters
    Parameter In Type Required Description
    modelId path string true

    Example responses

    200

    {
      "name": "string",
      "start": 0,
      "limit": 0,
      "count": 0,
      "accept": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "version": 0,
      "items": [
        {
          "name": "string",
          "uri": "string",
          "key": "string",
          "caslib": "string",
          "location": "string",
          "errorCode": "string",
          "host": "string",
          "fullPath": "string",
          "state": "string",
          "version": 1,
          "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 collection of analytic stores for the model was returned. The collection contains application/vnd.sas.models.analytic.store. analyticStoreCollection
    404 Not Found No model exists at the requested path. error2

    Copy analytic stores for a model

    Code samples

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

    PUT /models/{modelId}/analyticStore

    Copies all of the analytic stores for a model to the pre-defined server location (/config/data/modelsvr/astore) that is used for integration with Event Stream Processing and others. This request invokes an asynchronous call to copy the analytic store files. Check the individual analytic store uris to get the completion state: pending, copying, success, failure. Please review the full Model Manager documentation before using. Returns a collection of application/vnd.sas.models.analytic.store.

    Parameters
    Parameter In Type Required Description
    modelId path string true

    Example responses

    202

    {
      "name": "string",
      "start": 0,
      "limit": 0,
      "count": 0,
      "accept": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "version": 0,
      "items": [
        {
          "name": "string",
          "uri": "string",
          "key": "string",
          "caslib": "string",
          "location": "string",
          "errorCode": "string",
          "host": "string",
          "fullPath": "string",
          "state": "string",
          "version": 1,
          "links": [
            {
              "method": "string",
              "rel": "string",
              "uri": "string",
              "href": "string",
              "title": "string",
              "type": "string",
              "itemType": "string",
              "responseType": "string",
              "responseItemType": "string"
            }
          ]
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    202 Accepted The analytic store copy request has been accepted for processing, but the processing has not been completed. The collection contains application/vnd.sas.models.analytic.store. analyticStoreCollection
    400 Bad Request The request was invalid. error2
    404 Not Found No model exists at the requested path. error2

    Get an analytic store

    Code samples

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

    GET /models/{modelId}/analyticStore/{analyticStoreName}

    Returns the detailed metadata for an analytic store that is associated with the model.

    Parameters
    Parameter In Type Required Description
    modelId path string true
    analyticStoreName path string true

    Example responses

    200

    {
      "name": "string",
      "uri": "string",
      "key": "string",
      "caslib": "string",
      "location": "string",
      "errorCode": "string",
      "host": "string",
      "fullPath": "string",
      "state": "string",
      "version": 1,
      "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 collection of analytic stores for the model was returned. analyticStore
    404 Not Found No model or analytic store name exists at the requested path. error2

    Copy an analytic store for a model

    Code samples

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

    PUT /models/{modelId}/analyticStore/{analyticStoreName}

    Copy one of the analytic stores for this model to the pre-defined server location (/config/data/modelsvr/astore) that is used for integration with SAS Event Stream Processing and others. This request invokes an asynchronous call to copy the analytic store file. Access the URI again to get the completion state: pending, copying, success, or failure. Please review the SAS Model Manager documentation before using this operation.

    Parameters
    Parameter In Type Required Description
    modelId path string true
    analyticStoreName path string true

    Example responses

    202

    {
      "name": "string",
      "uri": "string",
      "key": "string",
      "caslib": "string",
      "location": "string",
      "errorCode": "string",
      "host": "string",
      "fullPath": "string",
      "state": "string",
      "version": 1,
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    202 Accepted The analytic store copy request has been accepted for processing, but the processing has not been completed. analyticStore
    400 Bad Request The request was invalid. error2
    404 Not Found No model or analytic store name exists at the requested path. error2

    Get model score code

    Code samples

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

    GET /models/{modelId}/code

    Returns the model score code for the specified model ID.

    Parameters
    Parameter In Type Required Description
    modelId path string true

    Example responses

    200

    "string"
    
    Responses
    Status Meaning Description Schema
    200 OK The model score code was returned. string
    404 Not Found No model exists at the requested path. error2

    Get model contents

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/modelRepository/models/{modelId}/contents \
      -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/modelRepository/models/{modelId}/contents',
      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/modelRepository/models/{modelId}/contents', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.collection+json"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://www.example.com/modelRepository/models/{modelId}/contents", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /models/{modelId}/contents

    Returns the contents of a model for the specified model ID.

    Parameters
    Parameter In Type Required Description
    modelId path string true
    start query integer(int32) false The 0-based start index of a paginated request.
    limit query integer(int32) false The maximum number of items to return in this request.

    Example responses

    200

    {
      "name": "string",
      "start": 0,
      "limit": 0,
      "count": 0,
      "accept": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "version": 0,
      "items": [
        {
          "createdBy": "string",
          "modifiedBy": "string",
          "creationTimeStamp": "2019-11-22T18:48:47Z",
          "modifiedTimeStamp": "2019-11-22T18:48:47Z",
          "name": "string",
          "modelId": "string",
          "fileUri": "string",
          "role": "string",
          "key": "string",
          "version": 2
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The contents of the model was returned. modelContentCollection
    400 Bad Request The request was invalid. error2
    404 Not Found No model exists at the requested path. error2

    Add model contents

    Code samples

    # You can also use wget
    curl -X POST https://www.example.com/modelRepository/models/{modelId}/contents \
      -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/modelRepository/models/{modelId}/contents',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.collection+json'
    }
    
    r = requests.post('https://www.example.com/modelRepository/models/{modelId}/contents', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.collection+json"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://www.example.com/modelRepository/models/{modelId}/contents", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /models/{modelId}/contents

    Adds the specified model contents to the model associated with the specified model ID.

    Parameters
    Parameter In Type Required Description
    modelId path string true

    Example responses

    201

    {
      "name": "string",
      "start": 0,
      "limit": 0,
      "count": 0,
      "accept": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "version": 0,
      "items": [
        {
          "createdBy": "string",
          "modifiedBy": "string",
          "creationTimeStamp": "2019-11-22T18:48:47Z",
          "modifiedTimeStamp": "2019-11-22T18:48:47Z",
          "name": "string",
          "modelId": "string",
          "fileUri": "string",
          "role": "string",
          "key": "string",
          "version": 2
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    201 Created The model contents were added successfully. modelContentCollection
    400 Bad Request The request was invalid. error2
    404 Not Found No model exists at the requested path. error2
    Response Headers
    Status Header Type Format Description
    201 Location string /modelRepository/models/{modelId}/contents
    201 ETag string A tag that identifies the revision of this object.

    Get model content metadata

    Code samples

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

    GET /models/{modelId}/contents/{contentId}

    Returns the metadata information for the model content that is associated with the specified model ID and content ID.

    Parameters
    Parameter In Type Required Description
    modelId path string true
    contentId path string true

    Example responses

    200

    {
      "createdBy": "string",
      "modifiedBy": "string",
      "creationTimeStamp": "2019-11-22T18:48:47Z",
      "modifiedTimeStamp": "2019-11-22T18:48:47Z",
      "name": "string",
      "modelId": "string",
      "fileUri": "string",
      "role": "string",
      "key": "string",
      "version": 2
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The model content and its metadata information was returned. modelContent
    404 Not Found No model content exists at the requested path. error2
    Response Headers
    Status Header Type Format Description
    200 ETag string The entity tag for the model content.

    Check if model content exists

    Code samples

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

    HEAD /models/{modelId}/contents/{contentId}

    Returns the metadata and header information for the model content that is associated with the specified model ID and content ID. Also used to determine whether model content exists.

    Parameters
    Parameter In Type Required Description
    modelId path string true
    contentId path string true

    Example responses

    200

    {
      "createdBy": "string",
      "modifiedBy": "string",
      "creationTimeStamp": "2019-11-22T18:48:47Z",
      "modifiedTimeStamp": "2019-11-22T18:48:47Z",
      "name": "string",
      "modelId": "string",
      "fileUri": "string",
      "role": "string",
      "key": "string",
      "version": 2
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. The metadata information for the model content was returned. modelContent
    404 Not Found No model content exists at the requested path. error2
    Response Headers
    Status Header Type Format Description
    200 ETag string The entity tag for the model content.

    Update model content metadata

    Code samples

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

    PUT /models/{modelId}/contents/{contentId}

    Updates the metadata information for the model content that is associated with the specified model ID and content ID.

    Parameters
    Parameter In Type Required Description
    If-Match header string false The client must specify the previously pulled ETag as an If-Match header.
    modelId path string true
    contentId path string true

    Example responses

    200

    {
      "createdBy": "string",
      "modifiedBy": "string",
      "creationTimeStamp": "2019-11-22T18:48:47Z",
      "modifiedTimeStamp": "2019-11-22T18:48:47Z",
      "name": "string",
      "modelId": "string",
      "fileUri": "string",
      "role": "string",
      "key": "string",
      "version": 2
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The metadata information for the model content was updated. modelContent
    400 Bad Request The request was invalid. error2
    404 Not Found No model or content exists at the requested path. error2
    412 Precondition Failed The If-Match request header did not match the resource's entity tag, or the If-Unmodified-Since request header did not match the resource's last modified timestamp. error2
    428 Precondition Required The request headers did not include a If-Match or If-Unmodified-Since precondition. error2
    Response Headers
    Status Header Type Format Description
    200 ETag string The entity tag for the model content.

    Delete model content

    Code samples

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

    DELETE /models/{modelId}/contents/{contentId}

    Deletes the model content that is associated with the specified model ID and content ID.

    Parameters
    Parameter In Type Required Description
    modelId path string true
    contentId path string true

    Example responses

    404

    Responses
    Status Meaning Description Schema
    204 No Content The model content was deleted. None
    404 Not Found No model content exits at the requested path. error2

    Get model content

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/modelRepository/models/{modelId}/contents/{contentId}/content \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: text/plain'
    
    
    var headers = {
      'Accept':'text/plain'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/modelRepository/models/{modelId}/contents/{contentId}/content',
      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/modelRepository/models/{modelId}/contents/{contentId}/content', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"text/plain"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://www.example.com/modelRepository/models/{modelId}/contents/{contentId}/content", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /models/{modelId}/contents/{contentId}/content

    Returns the model content that is associated with the specified model ID and content ID.

    Parameters
    Parameter In Type Required Description
    modelId path string true
    contentId path string true

    Example responses

    404

    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. The model content was returned. None
    404 Not Found No model or content exists at the requested path. error2
    Response Headers
    Status Header Type Format Description
    200 ETag string The entity tag for the model content.

    Update model content

    Code samples

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

    PUT /models/{modelId}/contents/{contentId}/content

    Updates the model content that is associated with the specified model ID and content ID.

    Parameters
    Parameter In Type Required Description
    If-Match header string true The entity tag obtained from the most recent ETag response header must match the current entity tag for the model content.
    modelId path string true
    contentId path string 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
    200 OK The model content was updated. None
    400 Bad Request The request was invalid. error2
    404 Not Found The model content could not be found. error2
    412 Precondition Failed The If-Match request header did not match the resource's entity tag, or the If-Unmodified-Since request header did not match the resource's last modified timestamp. error2
    428 Precondition Required The request headers did not include a If-Match or If-Unmodified-Since precondition. error2
    Response Headers
    Status Header Type Format Description
    200 ETag string The entity tag for the model content.

    Get a list of model versions

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/modelRepository/models/{modelId}/modelVersions \
      -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/modelRepository/models/{modelId}/modelVersions',
      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/modelRepository/models/{modelId}/modelVersions', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.collection+json"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://www.example.com/modelRepository/models/{modelId}/modelVersions", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /models/{modelId}/modelVersions

    Returns a list of model versions for the specified model ID.

    Parameters
    Parameter In Type Required Description
    modelId path string true The unique identifier for the model.
    start query integer(int32) false The 0-based start index of a paginated request.
    limit query integer(int32) false The maximum number of items to return in this request.

    Example responses

    200

    {
      "name": "string",
      "start": 0,
      "limit": 0,
      "count": 0,
      "accept": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "version": 0,
      "items": [
        {
          "createdBy": "string",
          "modifiedBy": "string",
          "creationTimeStamp": "2019-11-22T18:48:47Z",
          "modifiedTimeStamp": "2019-11-22T18:48:47Z",
          "id": "string",
          "name": "string",
          "description": "string",
          "function": "string",
          "algorithm": "string",
          "tool": "string",
          "modeler": "string",
          "scoreCodeType": "string",
          "trainTable": "string",
          "classificationEventProbabilityVariableName": "string",
          "classificationTargetEventValue": "string",
          "champion": true,
          "role": "string",
          "location": "string",
          "targetVariable": "string",
          "projectId": "string",
          "projectName": "string",
          "projectVersionId": "string",
          "projectVersionName": "string",
          "folderId": "string",
          "repositoryId": "string",
          "championStartTime": "string",
          "championEndTime": "string",
          "suggestedChampion": true,
          "retrainable": true,
          "immutable": true,
          "modelVersionName": "string",
          "properties": [
            {
              "name": "string",
              "value": "string",
              "type": "string"
            }
          ],
          "inputVariables": [
            {
              "createdBy": "string",
              "modifiedBy": "string",
              "creationTimeStamp": "2019-11-22T18:48:47Z",
              "modifiedTimeStamp": "2019-11-22T18:48:47Z",
              "name": "string",
              "description": "string",
              "role": "string",
              "type": "string",
              "level": "string",
              "format": "string",
              "length": 0,
              "version": 2
            }
          ],
          "outputVariables": [
            {
              "createdBy": "string",
              "modifiedBy": "string",
              "creationTimeStamp": "2019-11-22T18:48:47Z",
              "modifiedTimeStamp": "2019-11-22T18:48:47Z",
              "name": "string",
              "description": "string",
              "role": "string",
              "type": "string",
              "level": "string",
              "format": "string",
              "length": 0,
              "version": 2
            }
          ],
          "version": 2
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. The list of model versions was returned. modelVersionCollection
    404 Not Found The model could not be found. error2

    Check if model versions exist

    Code samples

    # You can also use wget
    curl -X HEAD https://www.example.com/modelRepository/models/{modelId}/modelVersions \
      -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/modelRepository/models/{modelId}/modelVersions',
      method: 'head',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.collection+json'
    }
    
    r = requests.head('https://www.example.com/modelRepository/models/{modelId}/modelVersions', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.collection+json"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("HEAD", "https://www.example.com/modelRepository/models/{modelId}/modelVersions", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    HEAD /models/{modelId}/modelVersions

    Returns the header information for the model versions that are associated with the specified model ID. Also used to determine whether model versions exist.

    Parameters
    Parameter In Type Required Description
    modelId path string true The unique identifier for the model.
    start query integer(int32) false The 0-based start index of a paginated request.
    limit query integer(int32) false The maximum number of items to return in this request.

    Example responses

    200

    {
      "name": "string",
      "start": 0,
      "limit": 0,
      "count": 0,
      "accept": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "version": 0,
      "items": [
        {
          "createdBy": "string",
          "modifiedBy": "string",
          "creationTimeStamp": "2019-11-22T18:48:47Z",
          "modifiedTimeStamp": "2019-11-22T18:48:47Z",
          "id": "string",
          "name": "string",
          "description": "string",
          "function": "string",
          "algorithm": "string",
          "tool": "string",
          "modeler": "string",
          "scoreCodeType": "string",
          "trainTable": "string",
          "classificationEventProbabilityVariableName": "string",
          "classificationTargetEventValue": "string",
          "champion": true,
          "role": "string",
          "location": "string",
          "targetVariable": "string",
          "projectId": "string",
          "projectName": "string",
          "projectVersionId": "string",
          "projectVersionName": "string",
          "folderId": "string",
          "repositoryId": "string",
          "championStartTime": "string",
          "championEndTime": "string",
          "suggestedChampion": true,
          "retrainable": true,
          "immutable": true,
          "modelVersionName": "string",
          "properties": [
            {
              "name": "string",
              "value": "string",
              "type": "string"
            }
          ],
          "inputVariables": [
            {
              "createdBy": "string",
              "modifiedBy": "string",
              "creationTimeStamp": "2019-11-22T18:48:47Z",
              "modifiedTimeStamp": "2019-11-22T18:48:47Z",
              "name": "string",
              "description": "string",
              "role": "string",
              "type": "string",
              "level": "string",
              "format": "string",
              "length": 0,
              "version": 2
            }
          ],
          "outputVariables": [
            {
              "createdBy": "string",
              "modifiedBy": "string",
              "creationTimeStamp": "2019-11-22T18:48:47Z",
              "modifiedTimeStamp": "2019-11-22T18:48:47Z",
              "name": "string",
              "description": "string",
              "role": "string",
              "type": "string",
              "level": "string",
              "format": "string",
              "length": 0,
              "version": 2
            }
          ],