Decision Management
Model Management
Base URLs:
- https://example.com/modelManagement
Email: SAS Developers Web: SAS Developers
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
The 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:
- Monitor performance of models
- Create model comparison reports
- Retrieve mapped model score code
- Retrieve publishable model code
- Associate an object with a workflow process
For more information, see SAS Model Manager: User's Guide.
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
Performance Jobs
Contains the operations for the Performance Jobs resource.
Get a list of jobs for a performance task
Code samples
# You can also use wget
curl -X GET https://example.com/modelManagement/performanceTasks/{taskId}/performanceJobs \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('https://example.com/modelManagement/performanceTasks/{taskId}/performanceJobs',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.get('https://example.com/modelManagement/performanceTasks/{taskId}/performanceJobs', 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://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
Name | 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 Response
{
"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-08-24T14:15:22Z",
"modifiedBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"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://example.com/modelManagement/performanceTasks/{taskId}/performanceJobs/{jobId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('https://example.com/modelManagement/performanceTasks/{taskId}/performanceJobs/{jobId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.get('https://example.com/modelManagement/performanceTasks/{taskId}/performanceJobs/{jobId}', 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://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
Name | 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 Response
{
"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-08-24T14:15:22Z",
"modifiedBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"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://example.com/modelManagement/performanceTasks/{taskId}/performanceJobs/{jobId}
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/modelManagement/performanceTasks/{taskId}/performanceJobs/{jobId}',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.delete('https://example.com/modelManagement/performanceTasks/{taskId}/performanceJobs/{jobId}')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "https://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
Name | In | Type | Required | Description |
---|---|---|---|---|
taskId | path | string | true | The identifier of the task. |
jobId | path | string | true | The identifier of the performance job. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | The performance job was deleted. | None |
404 | Not Found | No performance task exists at the requested path. | None |
Get the state of a performance job
Code samples
# You can also use wget
curl -X GET https://example.com/modelManagement/performanceTasks/{taskId}/performanceJobs/{jobId}/state \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: text/plain'
const headers = {
'Accept':'text/plain'
};
fetch('https://example.com/modelManagement/performanceTasks/{taskId}/performanceJobs/{jobId}/state',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'text/plain'
}
r = requests.get('https://example.com/modelManagement/performanceTasks/{taskId}/performanceJobs/{jobId}/state', 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://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
Name | 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 Response
{"code":"string","createdBy":"string","creationTimeStamp":"2019-08-24T14:15:22Z","modifiedBy":"string","modifiedTimeStamp":"2019-08-24T14:15:22Z","state":"string","jobReqId":"string"}
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://example.com/modelManagement/performanceTasks/{taskId}/performanceJobs/{jobId}/code \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: text/vnd.sas.source.sas'
const headers = {
'Accept':'text/vnd.sas.source.sas'
};
fetch('https://example.com/modelManagement/performanceTasks/{taskId}/performanceJobs/{jobId}/code',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'text/vnd.sas.source.sas'
}
r = requests.get('https://example.com/modelManagement/performanceTasks/{taskId}/performanceJobs/{jobId}/code', 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://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
Name | 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 Response
{"code":"string","createdBy":"string","creationTimeStamp":"2019-08-24T14:15:22Z","modifiedBy":"string","modifiedTimeStamp":"2019-08-24T14:15:22Z","state":"string","jobReqId":"string"}
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://example.com/modelManagement/performanceTasks/{taskId}/performanceJobs/{jobId}/log \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: text/plain'
const headers = {
'Accept':'text/plain'
};
fetch('https://example.com/modelManagement/performanceTasks/{taskId}/performanceJobs/{jobId}/log',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'text/plain'
}
r = requests.get('https://example.com/modelManagement/performanceTasks/{taskId}/performanceJobs/{jobId}/log', 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://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
Name | 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 Response
{"code":"string","createdBy":"string","creationTimeStamp":"2019-08-24T14:15:22Z","modifiedBy":"string","modifiedTimeStamp":"2019-08-24T14:15:22Z","state":"string","jobReqId":"string"}
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://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'
const headers = {
'Accept':'application/vnd.sas.collection+json',
'Accept-Item':'application/vnd.sas.models.performance.task.report.data.lift+json'
};
fetch('https://example.com/modelManagement/performanceTasks/{taskId}/performanceReportData',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
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://example.com/modelManagement/performanceTasks/{taskId}/performanceReportData', 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://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
Name | 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:
|
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 Response
{
"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": []
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | collection2 |
404 | Not Found | No performance task exists at the requested path. | error2 |
Performance Tasks
Contains the operations for the Performance Tasks resource.
Get a list of performance tasks
Code samples
# You can also use wget
curl -X GET https://example.com/modelManagement/performanceTasks \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('https://example.com/modelManagement/performanceTasks',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.get('https://example.com/modelManagement/performanceTasks', 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://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
Name | 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 Response
{
"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-08-24T14:15:22Z",
"dataLibrary": "string",
"dataPrefix": "string",
"id": "string",
"inputVariables": [
"string"
],
"maxBins": 0,
"modelId": [
"string"
],
"modifiedBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"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://example.com/modelManagement/performanceTasks \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.models.performance.task+json' \
-H 'Accept: application/vnd.sas.models.performance.task+json'
const inputBody = '{
"assessAlert": "string",
"assessWarn": "string",
"characteristicAlert": "string",
"characteristicWarn": "string",
"createdBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"dataLibrary": "string",
"dataPrefix": "string",
"id": "string",
"inputVariables": [
"string"
],
"maxBins": 0,
"modelId": [
"string"
],
"modifiedBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"outputVariables": [
"string"
],
"performanceResultSaved": true,
"resultLibrary": "string",
"scoreExecutionRequired": true,
"stabilityAlert": "string",
"stabilityWarn": "string",
"includeAllData": true,
"loadPerformanceResult": true,
"championMonitored": true,
"challengerMonitored": true,
"traceOn": true,
"version": 0
}';
const headers = {
'Content-Type':'application/vnd.sas.models.performance.task+json',
'Accept':'application/vnd.sas.models.performance.task+json'
};
fetch('https://example.com/modelManagement/performanceTasks',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.models.performance.task+json',
'Accept': 'application/vnd.sas.models.performance.task+json'
}
r = requests.post('https://example.com/modelManagement/performanceTasks', 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://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-08-24T14:15:22Z",
"dataLibrary": "string",
"dataPrefix": "string",
"id": "string",
"inputVariables": [
"string"
],
"maxBins": 0,
"modelId": [
"string"
],
"modifiedBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"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
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | performanceTask | true | The definition of the performance task. |
Example responses
201 Response
{
"assessAlert": "string",
"assessWarn": "string",
"characteristicAlert": "string",
"characteristicWarn": "string",
"createdBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"dataLibrary": "string",
"dataPrefix": "string",
"id": "string",
"inputVariables": [
"string"
],
"maxBins": 0,
"modelId": [
"string"
],
"modifiedBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"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://example.com/modelManagement/performanceTasks/@defaultTask/performanceJobs \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.models.performance.job+json' \
-H 'Accept: application/vnd.sas.models.performance.job+json'
const inputBody = '{
"code": "string",
"createdBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"state": "string",
"jobReqId": "string"
}';
const headers = {
'Content-Type':'application/vnd.sas.models.performance.job+json',
'Accept':'application/vnd.sas.models.performance.job+json'
};
fetch('https://example.com/modelManagement/performanceTasks/@defaultTask/performanceJobs',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.models.performance.job+json',
'Accept': 'application/vnd.sas.models.performance.job+json'
}
r = requests.post('https://example.com/modelManagement/performanceTasks/@defaultTask/performanceJobs', 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://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-08-24T14:15:22Z",
"modifiedBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"state": "string",
"jobReqId": "string"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | performanceJob | true | The definition of the performance job. |
Example responses
201 Response
{
"code": "string",
"createdBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"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://example.com/modelManagement/performanceTasks/{taskId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.models.performance.task+json'
const headers = {
'Accept':'application/vnd.sas.models.performance.task+json'
};
fetch('https://example.com/modelManagement/performanceTasks/{taskId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.models.performance.task+json'
}
r = requests.get('https://example.com/modelManagement/performanceTasks/{taskId}', 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://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
Name | 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 Response
{
"code": "string",
"createdBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"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://example.com/modelManagement/performanceTasks/{taskId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.models.performance.task+json'
const headers = {
'Accept':'application/vnd.sas.models.performance.task+json'
};
fetch('https://example.com/modelManagement/performanceTasks/{taskId}',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.models.performance.task+json'
}
r = requests.post('https://example.com/modelManagement/performanceTasks/{taskId}', 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://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
Name | In | Type | Required | Description |
---|---|---|---|---|
taskId | path | string | true | Identifier of the task. |
Example responses
201 Response
{
"code": "string",
"createdBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"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://example.com/modelManagement/performanceTasks/{taskId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.models.performance.task+json' \
-H 'Accept: application/vnd.sas.models.performance.task+json' \
-H 'Etag: string'
const inputBody = '{
"assessAlert": "string",
"assessWarn": "string",
"characteristicAlert": "string",
"characteristicWarn": "string",
"createdBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"dataLibrary": "string",
"dataPrefix": "string",
"id": "string",
"inputVariables": [
"string"
],
"maxBins": 0,
"modelId": [
"string"
],
"modifiedBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"outputVariables": [
"string"
],
"performanceResultSaved": true,
"resultLibrary": "string",
"scoreExecutionRequired": true,
"stabilityAlert": "string",
"stabilityWarn": "string",
"includeAllData": true,
"loadPerformanceResult": true,
"championMonitored": true,
"challengerMonitored": true,
"traceOn": true,
"version": 0
}';
const headers = {
'Content-Type':'application/vnd.sas.models.performance.task+json',
'Accept':'application/vnd.sas.models.performance.task+json',
'Etag':'string'
};
fetch('https://example.com/modelManagement/performanceTasks/{taskId}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.models.performance.task+json',
'Accept': 'application/vnd.sas.models.performance.task+json',
'Etag': 'string'
}
r = requests.put('https://example.com/modelManagement/performanceTasks/{taskId}', 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"},
"Etag": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://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-08-24T14:15:22Z",
"dataLibrary": "string",
"dataPrefix": "string",
"id": "string",
"inputVariables": [
"string"
],
"maxBins": 0,
"modelId": [
"string"
],
"modifiedBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"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
Name | In | Type | Required | Description |
---|---|---|---|---|
Etag | 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 Response
{
"assessAlert": "string",
"assessWarn": "string",
"characteristicAlert": "string",
"characteristicWarn": "string",
"createdBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"dataLibrary": "string",
"dataPrefix": "string",
"id": "string",
"inputVariables": [
"string"
],
"maxBins": 0,
"modelId": [
"string"
],
"modifiedBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"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://example.com/modelManagement/performanceTasks/{taskId}
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/modelManagement/performanceTasks/{taskId}',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.delete('https://example.com/modelManagement/performanceTasks/{taskId}')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "https://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
Name | 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 |
Workflow Associations
Contains the operations for the Workflow Associations resource.
Get all workflow object associations
Code samples
# You can also use wget
curl -X GET https://example.com/modelManagement/workflowAssociations \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('https://example.com/modelManagement/workflowAssociations',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.get('https://example.com/modelManagement/workflowAssociations', 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://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
Name | 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 Response
{
"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://example.com/modelManagement/workflowAssociations \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.workflow.object.association+json'
const headers = {
'Accept':'application/vnd.sas.workflow.object.association+json'
};
fetch('https://example.com/modelManagement/workflowAssociations',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.workflow.object.association+json'
}
r = requests.post('https://example.com/modelManagement/workflowAssociations', 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://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 Response
{
"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://example.com/modelManagement/workflowAssociations/{associationId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.workflow.object.association+json'
const headers = {
'Accept':'application/vnd.sas.workflow.object.association+json'
};
fetch('https://example.com/modelManagement/workflowAssociations/{associationId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.workflow.object.association+json'
}
r = requests.get('https://example.com/modelManagement/workflowAssociations/{associationId}', 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://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
Name | In | Type | Required | Description |
---|---|---|---|---|
associationId | path | string | true | The ID of the workflow object association. |
Example responses
200 Response
{
"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 |
Workflow Processes
Contains the operations for the Workflow Processes resource.
Get all workflow processes
Code samples
# You can also use wget
curl -X GET https://example.com/modelManagement/workflowProcesses \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('https://example.com/modelManagement/workflowProcesses',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.get('https://example.com/modelManagement/workflowProcesses', 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://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
Name | 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 Response
{
"id": "string",
"parentId": "string",
"name": "string",
"createdTimeStamp": "2019-08-24T14:15:22Z",
"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://example.com/modelManagement/workflowProcesses/{processId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.workflow.object.process+json'
const headers = {
'Accept':'application/vnd.sas.workflow.object.process+json'
};
fetch('https://example.com/modelManagement/workflowProcesses/{processId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.workflow.object.process+json'
}
r = requests.get('https://example.com/modelManagement/workflowProcesses/{processId}', 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://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
Name | In | Type | Required | Description |
---|---|---|---|---|
processId | path | string | true | The ID of the workflow process. |
Example responses
200 Response
{
"id": "string",
"parentId": "string",
"name": "string",
"createdTimeStamp": "2019-08-24T14:15:22Z",
"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 |
Workflow Tasks
Contains the operations for the Workflow Tasks resource.
Get active workflow tasks
Code samples
# You can also use wget
curl -X GET https://example.com/modelManagement/workflowTasks \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('https://example.com/modelManagement/workflowTasks',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.get('https://example.com/modelManagement/workflowTasks', 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://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
Name | 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 Response
{
"id": "string",
"processId": "string",
"processTaskId": "string",
"name": "string",
"definitionName": "string",
"actualOwner": "string",
"state": "string",
"stateTimeStamp": "2019-08-24T14:15:22Z",
"taskDueTimeStamp": "2019-08-24T14:15:22Z",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"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": []
}
]
}
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://example.com/modelManagement/workflowTasks/{taskId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.workflow.object.task+json'
const headers = {
'Accept':'application/vnd.sas.workflow.object.task+json'
};
fetch('https://example.com/modelManagement/workflowTasks/{taskId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.workflow.object.task+json'
}
r = requests.get('https://example.com/modelManagement/workflowTasks/{taskId}', 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://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
Name | In | Type | Required | Description |
---|---|---|---|---|
taskId | path | string | true | The ID of a task from the tasks collection. |
Example responses
200 Response
{
"id": "string",
"processId": "string",
"processTaskId": "string",
"name": "string",
"definitionName": "string",
"actualOwner": "string",
"state": "string",
"stateTimeStamp": "2019-08-24T14:15:22Z",
"taskDueTimeStamp": "2019-08-24T14:15:22Z",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"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": []
}
]
}
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://example.com/modelManagement/workflowTasks/{taskId}/prompts \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('https://example.com/modelManagement/workflowTasks/{taskId}/prompts',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.get('https://example.com/modelManagement/workflowTasks/{taskId}/prompts', 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://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
Name | In | Type | Required | Description |
---|---|---|---|---|
taskId | path | string | true | The ID of a task from the tasks collection. |
Example responses
200 Response
{
"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://example.com/modelManagement/workflowTasks/{taskId}/prompts/{promptId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.workflow.object.task.prompt+json'
const headers = {
'Accept':'application/vnd.sas.workflow.object.task.prompt+json'
};
fetch('https://example.com/modelManagement/workflowTasks/{taskId}/prompts/{promptId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.workflow.object.task.prompt+json'
}
r = requests.get('https://example.com/modelManagement/workflowTasks/{taskId}/prompts/{promptId}', 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://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
Name | 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 Response
{
"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 |
Code
Contains the operation for generating code for models.
Generate mapped model score code
Code samples
# You can also use wget
curl -X POST https://example.com/modelManagement/models/{modelId}/mappedCode \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.score.mapped.code+json'
const headers = {
'Accept':'application/vnd.sas.score.mapped.code+json'
};
fetch('https://example.com/modelManagement/models/{modelId}/mappedCode',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.score.mapped.code+json'
}
r = requests.post('https://example.com/modelManagement/models/{modelId}/mappedCode', 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://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
Name | In | Type | Required | Description |
---|---|---|---|---|
modelId | path | string | true | The ID of a model in the common model repository. |
Example responses
201 Response
{
"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. | mappedCode |
400 | Bad Request | The request was invalid. | error2 |
404 | Not Found | No model exists at the requested path. | None |
Model Comparison Reports
Contains the operations for a generating model comparison reports.
Create a model comparison report
Code samples
# You can also use wget
curl -X POST https://example.com/modelManagement/reports \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.models.report.comparison.request+json' \
-H 'Accept: application/vnd.sas.models.report.comparison.model+json'
const inputBody = '{
"name": "string",
"description": "string",
"modelUris": [
"string"
]
}';
const headers = {
'Content-Type':'application/vnd.sas.models.report.comparison.request+json',
'Accept':'application/vnd.sas.models.report.comparison.model+json'
};
fetch('https://example.com/modelManagement/reports',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
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://example.com/modelManagement/reports', 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://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
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | reportRequest | true | The definition of the report request. |
Example responses
201 Response
{
"parentId": "string",
"modelIds": [
"string"
],
"comparedModels": [
{
"createdBy": "string",
"modifiedBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"id": "string",
"name": "string",
"description": "string",
"function": "string",
"algorithm": "string",
"tool": "string",
"modeler": "string",
"scoreCodeType": "string",
"trainTable": "string",
"eventProbVar": "string",
"targetEvent": "string",
"champion": true,
"role": "string",
"location": "string",
"targetLevel": "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-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"name": "string",
"description": "string",
"role": "string",
"type": "string",
"level": "string",
"format": "string",
"length": 0,
"version": 2
}
],
"outputVariables": [
{
"createdBy": "string",
"modifiedBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"name": "string",
"description": "string",
"role": "string",
"type": "string",
"level": "string",
"format": "string",
"length": 0,
"version": 2
}
],
"version": 2
}
],
"allInputVariables": [
{
"createdBy": "string",
"modifiedBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"name": "string",
"description": "string",
"role": "string",
"type": "string",
"level": "string",
"format": "string",
"length": 0,
"version": 2
}
],
"allOutputVariables": [
{
"createdBy": "string",
"modifiedBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"name": "string",
"description": "string",
"role": "string",
"type": "string",
"level": "string",
"format": "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
Contains the operations for publishing models.
Publish models
Code samples
# You can also use wget
curl -X POST https://example.com/modelManagement/publish \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.models.publishing.request.asynchronous+json' \
-H 'Accept: application/vnd.sas.collection+json'
const inputBody = '{
"contents": {},
"createdBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"databaseServer": {
"authenticationDomain": "string",
"casServerName": "string",
"configDir": "string",
"createdBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"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-08-24T14:15:22Z",
"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-08-24T14:15:22Z",
"format": "string",
"formatUri": "string",
"modelId": "string",
"modelName": "string",
"modelVersionId": "string",
"modifiedBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"principalId": "string",
"projectId": "string",
"publishLevel": "string",
"publishNotes": "string",
"sourceUri": "string",
"variableXml": "string"
}
],
"modifiedBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"name": "string",
"notes": "string",
"properties": {
"property1": "string",
"property2": "string"
},
"targetServer": {
"authenticationDomain": "string",
"casServerName": "string",
"configDir": "string",
"createdBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"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-08-24T14:15:22Z",
"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
}';
const headers = {
'Content-Type':'application/vnd.sas.models.publishing.request.asynchronous+json',
'Accept':'application/vnd.sas.collection+json'
};
fetch('https://example.com/modelManagement/publish',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.models.publishing.request.asynchronous+json',
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.post('https://example.com/modelManagement/publish', 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.asynchronous+json"},
"Accept": []string{"application/vnd.sas.collection+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://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-08-24T14:15:22Z",
"databaseServer": {
"authenticationDomain": "string",
"casServerName": "string",
"configDir": "string",
"createdBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"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-08-24T14:15:22Z",
"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-08-24T14:15:22Z",
"format": "string",
"formatUri": "string",
"modelId": "string",
"modelName": "string",
"modelVersionId": "string",
"modifiedBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"principalId": "string",
"projectId": "string",
"publishLevel": "string",
"publishNotes": "string",
"sourceUri": "string",
"variableXml": "string"
}
],
"modifiedBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"name": "string",
"notes": "string",
"properties": {
"property1": "string",
"property2": "string"
},
"targetServer": {
"authenticationDomain": "string",
"casServerName": "string",
"configDir": "string",
"createdBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"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-08-24T14:15:22Z",
"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
Name | In | Type | Required | Description |
---|---|---|---|---|
force | query | boolean | false | force |
body | body | publishRequest | true | The representation of a publish request. |
Example responses
201 Response
{
"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 |
Root
Contains the operations for the Root resource.
Get a list of top-level resource links
Code samples
# You can also use wget
curl -X GET https://example.com/modelManagement/ \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.api+json'
const headers = {
'Accept':'application/vnd.sas.api+json'
};
fetch('https://example.com/modelManagement/',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.api+json'
}
r = requests.get('https://example.com/modelManagement/', 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://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.
Example responses
200 Response
{
"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 request succeeded. | api |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | A tag that identifies the revision of this object. |
Check API availability
Code samples
# You can also use wget
curl -X HEAD https://example.com/modelManagement/
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/modelManagement/',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('https://example.com/modelManagement/')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "https://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 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | ETag | string | A tag that identifies the revision of this object. | |
200 | Last-Modified | string | date-time | The last modified timestamp of this object. |
Schemas
performanceJob
{
"code": "string",
"createdBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"state": "string",
"jobReqId": "string"
}
Performance Job
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
code | string | false | none | The performance job SAS code. |
createdBy | string | false | none | The user who created the job. |
creationTimeStamp | string(date-time) | false | none | The timestamp for when the job was created, in the format of YYYY-MM-DDThh:mm:ss.sssZ . |
modifiedBy | string | false | none | The user who most recently modified the job. |
modifiedTimeStamp | string(date-time) | false | none | The timestamp for when the job was last modified, in the format of YYYY-MM-DDThh:mm:ss.sssZ . |
state | string | false | none | The performance job state (running |
jobReqId | string | false | none | The identifier for a job request. |
performanceTask
{
"assessAlert": "string",
"assessWarn": "string",
"characteristicAlert": "string",
"characteristicWarn": "string",
"createdBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"dataLibrary": "string",
"dataPrefix": "string",
"id": "string",
"inputVariables": [
"string"
],
"maxBins": 0,
"modelId": [
"string"
],
"modifiedBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"outputVariables": [
"string"
],
"performanceResultSaved": true,
"resultLibrary": "string",
"scoreExecutionRequired": true,
"stabilityAlert": "string",
"stabilityWarn": "string",
"includeAllData": true,
"loadPerformanceResult": true,
"championMonitored": true,
"challengerMonitored": true,
"traceOn": true,
"version": 0
}
Performance Task
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
assessAlert | string | false | none | The assessment measurements alert condition. |
assessWarn | string | false | none | The assessment measurements warning condition. |
characteristicAlert | string | false | none | The characteristic measurements alert condition. |
characteristicWarn | string | false | none | The characteristic measurements warning condition. |
createdBy | string | false | none | The user who created the task. |
creationTimeStamp | string(date-time) | false | none | The timestamp for when the task was created, in the format of YYYY-MM-DDThh:mm:ss.sssZ . |
dataLibrary | string | false | none | The performance table library URI. |
dataPrefix | string | false | none | The performance data table prefix. |
id | string | false | none | The identifier for a performance task. |
inputVariables | [string] | false | none | The input variables for the performance task. |
maxBins | integer(int32) | false | none | The maximum bins number. |
modelId | [string] | false | none | The modelId for the performance task. |
modifiedBy | string | false | none | The user who most recently modified the task. |
modifiedTimeStamp | string(date-time) | false | none | The timestamp for when the job was last modified, in the format of YYYY-MM-DDThh:mm:ss.sssZ . |
outputVariables | [string] | false | none | The output variables for the performance task. |
performanceResultSaved | boolean | false | none | Indicates whether the performance results are saved. |
resultLibrary | string | false | none | The performance output table library URI. |
scoreExecutionRequired | boolean | false | none | Indicates whether the scoring task execution is required. |
stabilityAlert | string | false | none | The stability measurements alert condition. |
stabilityWarn | string | false | none | The stability measurements warning condition. |
includeAllData | boolean | false | none | Indicates whether to run a performance job against all the data tables in a library. |
loadPerformanceResult | boolean | false | none | Indicates to load performance result data. |
championMonitored | boolean | false | none | Indicates to monitor the project champion model. |
challengerMonitored | boolean | false | none | Indicates to monitor challenger models. |
traceOn | boolean | false | none | Indicates whether to turn on tracing. |
version | integer | false | none | The version number of application/vnd.sas.models.performance.task+json. |
performanceTaskCollection
{
"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-08-24T14:15:22Z",
"dataLibrary": "string",
"dataPrefix": "string",
"id": "string",
"inputVariables": [
"string"
],
"maxBins": 0,
"modelId": [
"string"
],
"modifiedBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"outputVariables": [
"string"
],
"performanceResultSaved": true,
"resultLibrary": "string",
"scoreExecutionRequired": true,
"stabilityAlert": "string",
"stabilityWarn": "string",
"includeAllData": true,
"loadPerformanceResult": true,
"championMonitored": true,
"challengerMonitored": true,
"traceOn": true,
"version": 0
}
]
}
Performance Task Collection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
Performance Task Collection | any | false | none | The performance task representations. |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | baseCollection2 | false | none | 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 | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» items | [performanceTask] | true | none | An array consisting of performance task resources. |
performanceJobCollection
{
"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-08-24T14:15:22Z",
"modifiedBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"state": "string",
"jobReqId": "string"
}
]
}
Performance Job Collection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
Performance Job Collection | any | false | none | The performance job representations. |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | baseCollection2 | false | none | 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 | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» items | [performanceJob] | true | none | An array consisting of performance task resources. |
publishRequest
{
"contents": {},
"createdBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"databaseServer": {
"authenticationDomain": "string",
"casServerName": "string",
"configDir": "string",
"createdBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"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-08-24T14:15:22Z",
"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-08-24T14:15:22Z",
"format": "string",
"formatUri": "string",
"modelId": "string",
"modelName": "string",
"modelVersionId": "string",
"modifiedBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"principalId": "string",
"projectId": "string",
"publishLevel": "string",
"publishNotes": "string",
"sourceUri": "string",
"variableXml": "string"
}
],
"modifiedBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"name": "string",
"notes": "string",
"properties": {
"property1": "string",
"property2": "string"
},
"targetServer": {
"authenticationDomain": "string",
"casServerName": "string",
"configDir": "string",
"createdBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"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-08-24T14:15:22Z",
"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
}
Publish Request
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
contents | object | false | none | contents |
createdBy | string | false | none | The user who published the models. |
creationTimeStamp | string(date-time) | false | none | The timestamp for when the models were published, in the format of 'YYYY-MM-DDThh:mm:ss.sssZ'. |
databaseServer | targetServer | false | none | Information about the target server. |
description | string | false | none | The description for the destination. |
destinationName | string | false | none | The name of the destination. |
modelContents | [publishContent] | false | none | The models to be published. |
modifiedBy | string | false | none | The user who most recently modified the publish request definition. |
modifiedTimeStamp | string(date-time) | false | none | The timestamp for when the publish request definition was last modified, in the format of 'YYYY-MM-DDThh:mm:ss.sssZ'. |
name | string | false | none | Published name |
notes | string | false | none | Notes |
properties | object | false | none | Properties |
» additionalProperties | string | false | none | none |
targetServer | targetServer | false | none | Information about the target server. |
targetServerLibraryUri | string | false | none | The URI for the target server library. |
targetServerName | string | false | none | The name of the target server. |
targetServerPassword | string | false | none | The password for the target server. |
targetServerUri | string | false | none | The URI for the target server. |
type | string | false | none | The destination type. |
verified | boolean | false | none | Indicates whether the target service has been verified. |
version | integer(int32) | false | none | This media type's schema version number. |
targetServer
{
"authenticationDomain": "string",
"casServerName": "string",
"configDir": "string",
"createdBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"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-08-24T14:15:22Z",
"name": "string",
"password": "string",
"port": 0,
"restPort": 0,
"table": "string",
"type": "string",
"user": "string",
"version": 0
}
Target Server
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
authenticationDomain | string | false | none | The authentication domain that is used to retrieve the Teradata database or Hadoop credentials. |
casServerName | string | false | none | The name of the CAS server. |
configDir | string | false | none | 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 | none | The user who created the target server. |
creationTimeStamp | string(date-time) | false | none | The timestamp for when the server was created, in the format of 'YYYY-MM-DDThh:mm:ss.sssZ'. |
credentialUri | string | false | none | The URI credentials. |
databaseCasLibrary | string | false | none | The caslib that contains the external database options. |
databaseSchema | string | false | none | The connection option that names the Teradata database to use to qualify the Teradata tables. |
databaseType | string | false | none | The name of the database type (cas, hadoop, microAnalyticService, or teradata) for the target server. |
description | string | false | none | The description of the target server. |
hdfsDir | string | false | none | The root HDFS folder where the model directory is to be created. |
host | string | false | none | The host name for the server |
id | string | false | none | The identifier for the target server. |
library | string | false | none | The name of the CAS library. |
links | [link] | false | none | The links that apply to the target server. |
modifiedBy | string | false | none | The user who most recently modified the server. |
modifiedTimeStamp | string(date-time) | false | none | The timestamp for when the server was last modified, in the format of 'YYYY-MM-DDThh:mm:ss.sssZ'. |
name | string | false | none | The name of the server. |
password | string | false | none | The password for the user ID that is entered. |
port | integer(int32) | false | none | The port number for the database. |
restPort | integer(int32) | false | none | The port number for REST |
table | string | false | none | The name of the CAS or Teradata model table. |
type | string | false | none | The target server type. |
user | string | false | none | The user ID that has permission to access database content. |
version | integer(int32) | false | none | This media type's schema version number. |
publishContent
{
"astoreUri": "string",
"code": "string",
"codeDescription": "string",
"codeScope": "string",
"codeType": "string",
"codeUri": "string",
"createdBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"format": "string",
"formatUri": "string",
"modelId": "string",
"modelName": "string",
"modelVersionId": "string",
"modifiedBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"principalId": "string",
"projectId": "string",
"publishLevel": "string",
"publishNotes": "string",
"sourceUri": "string",
"variableXml": "string"
}
Published Model Content
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
astoreUri | string | false | none | The URI point to the analytic store in the CAS library. |
code | string | false | none | The model score code. |
codeDescription | string | false | none | The description of the code. |
codeScope | string | false | none | The scope of the code. |
codeType | string | false | none | The code type can be "datastep" or "ds2". |
codeUri | string | false | none | codeUri |
createdBy | string | false | none | The user who created the published content. |
creationTimeStamp | string(date-time) | false | none | The timestamp for when the publish content was created, in the format of 'YYYY-MM-DDThh:mm:ss.sssZ'.. |
format | string | false | none | The format used to determine how the values of a variable should be written or displayed. |
formatUri | string | false | none | formatUri |
modelId | string | false | none | The model ID can be used by the client to find their published model. |
modelName | string | false | none | The name of the model. |
modelVersionId | string | false | none | The model version ID. |
modifiedBy | string | false | none | The user who most recently modified the publish content. |
modifiedTimeStamp | string(date-time) | false | none | The timestamp for when the publish content was last modified, in the format of 'YYYY-MM-DDThh:mm:ss.sssZ'. |
principalId | string | false | none | The principal ID. |
projectId | string | false | none | The project ID. |
publishLevel | string | false | none | The publish level. |
publishNotes | string | false | none | The publishing notes. |
sourceUri | string | false | none | The source URI represents where the model is located. |
variableXml | string | false | none | The variables in XML format. |
workflowAssociation
{
"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"
}
]
}
Workflow Association
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | The unique identifier for the association. |
processId | string | false | none | The identifier of the workflow process. |
processName | string | false | none | The name of workflow process. |
parentProcessId | string | false | none | The identifier of the main workflow process. It is populated if the associated process is a sub-process. |
objectType | string | false | none | The type of solution object associated with the workflow process. This type is specified by the solution. |
solutionObjectId | string | false | none | The identifier of the solution object. |
solutionObjectName | string | false | none | The name of the solution object. |
solutionObjectUri | string | false | none | The URI of the solution object. |
solutionObjectMediaType | string | false | none | The media type of the solution object. |
version | integer(int32) | false | none | The version number for this media type's schema. |
links | [link] | false | none | The links that apply to the workflow association. |
workflowProcess
{
"id": "string",
"parentId": "string",
"name": "string",
"createdTimeStamp": "2019-08-24T14:15:22Z",
"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"
}
]
}
Workflow Process
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | The unique identifier of the workflow process. |
parentId | string | false | none | The identifier of the main workflow process. That is populated if this process is a sub-process. |
name | string | false | none | The name of the workflow process. |
createdTimeStamp | string(date-time) | false | none | The timestamp for when this definition revision was created, in the format of 'YYYY-MM-DDThh:mm:ss.sssZ'. |
createdBy | string | false | none | The user ID that created this workflow. |
state | string | false | none | The current processing state(In Progress |
description | string | false | none | The description of the process. |
version | integer(int32) | false | none | The version number for this media type's schema. |
links | [link] | false | none | The links that apply to the workflow process. |
workflowTask
{
"id": "string",
"processId": "string",
"processTaskId": "string",
"name": "string",
"definitionName": "string",
"actualOwner": "string",
"state": "string",
"stateTimeStamp": "2019-08-24T14:15:22Z",
"taskDueTimeStamp": "2019-08-24T14:15:22Z",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"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": []
}
]
}
Workflow Task
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | The unique identifier of the workflow task. |
processId | string | false | none | The identifier of the associated workflow process. |
processTaskId | string | false | none | The identifier of the task in the Workflow service. |
name | string | false | none | The name of the task. |
definitionName | string | false | none | The name of the definition that defines the process. |
actualOwner | string | false | none | The user ID of the owner of the task. |
state | string | false | none | The state (Started |
stateTimeStamp | string(date-time) | false | none | The timestamp of the last state change for the task. |
taskDueTimeStamp | string(date-time) | false | none | The timestamp of when the task is due to be completed. |
creationTimeStamp | string(date-time) | false | none | The timestamp of when this definition revision was created. |
createdBy | string | false | none | The user ID that created this workflow. |
associations | [workflowAssociation] | false | none | Collection of projects that are associated with this task. |
links | [link] | false | none | The links that apply to the workflow task. |
resourceCollection | [collection2] | false | none | The array of resource representations. |
taskPrompt
{
"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"
}
]
}
Workflow Task Prompt
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | The unique identifier of the prompt. |
name | string | false | none | The name of the prompt. |
variableType | string | false | none | The type of the variable associated with the prompt. |
variableName | string | false | none | The name of the variable associated with the prompt. |
values | [promptValue] | false | none | An optional collection of values that can be set on the associated variable. |
required | string | false | none | A flag that determines whether a value must be provided for this prompt. Valid values [true, false]. |
defaultValueId | string | false | none | The identifier of the prompt value, which defines the default value. |
actualValue | string | false | none | The actual value that has been specified for this prompt. |
version | integer(int32) | false | none | This media type's schema version number. |
links | [link] | false | none | The links that apply to the workflow process. |
promptValue
{
"id": "string",
"name": "string",
"value": "string"
}
Workflow Task Prompt Value
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | The identifier of the prompt value. |
name | string | false | none | The name of the prompt value. |
value | string | false | none | The value that has been specified for this prompt. |
reportRequest
{
"name": "string",
"description": "string",
"modelUris": [
"string"
]
}
Report Request
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | false | none | The name of the report. |
description | string | false | none | The description of the report. |
modelUris | [string] | false | none | Collection of model URIs, which are used to perform a model comparison. |
uriReference
{
"name": "string",
"uri": "string",
"uriType": "string",
"mediaType": "string",
"contentType": "string"
}
URI Reference
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | false | none | The name of the URI reference. |
uri | string | false | none | The value of the URI. |
uriType | string | false | none | The child or reference of the URI. |
mediaType | string | false | none | The media type of this URI. |
contentType | string | false | none | The content type that the URI points to. |
variable
{
"createdBy": "string",
"modifiedBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"name": "string",
"description": "string",
"role": "string",
"type": "string",
"level": "string",
"format": "string",
"length": 0,
"version": 2
}
Variable
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
createdBy | string | false | none | The user that created the variable. |
modifiedBy | string | false | none | The user that last modified the variable. |
creationTimeStamp | string(date-time) | false | none | The timestamp for when the variable was created, in the format of YYYY-MM-DDThh:mm:ss.sssZ . |
modifiedTimeStamp | string(date-time) | false | none | The timestamp for when the variable was last modified, in the format of YYYY-MM-DDThh:mm:ss.sssZ . |
name | string | false | none | The name of the variable. |
description | string | false | none | The description of this variable. |
role | string | false | none | The role of the variable. Valid values are: input, output, target |
type | string | false | none | The type of variable. Valid values are: string, decimal, integer, boolean, date, datetime |
level | string | false | none | The measurement level of the variable. Valid values are: binary, interval, nominal, ordinal |
format | string | false | none | The format of the variable. An example is int32. |
length | integer | false | none | The length of the variable. |
version | integer | false | none | The variable representation version. The version is 2. |
modelProperty
{
"name": "string",
"value": "string",
"type": "string"
}
Model Property
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | false | none | The name of the property. |
value | string | false | none | The value for the property. |
type | string | false | none | The data type for the property. Valid values: string, decimal, integer, date, datetime |
model
{
"createdBy": "string",
"modifiedBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"id": "string",
"name": "string",
"description": "string",
"function": "string",
"algorithm": "string",
"tool": "string",
"modeler": "string",
"scoreCodeType": "string",
"trainTable": "string",
"eventProbVar": "string",
"targetEvent": "string",
"champion": true,
"role": "string",
"location": "string",
"targetLevel": "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-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"name": "string",
"description": "string",
"role": "string",
"type": "string",
"level": "string",
"format": "string",
"length": 0,
"version": 2
}
],
"outputVariables": [
{
"createdBy": "string",
"modifiedBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"name": "string",
"description": "string",
"role": "string",
"type": "string",
"level": "string",
"format": "string",
"length": 0,
"version": 2
}
],
"version": 2
}
Model
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
createdBy | string | false | none | The user that created the model. |
modifiedBy | string | false | none | The user that last modified the model. |
creationTimeStamp | string(date-time) | false | none | The timestamp for when the model was created, in the format of YYYY-MM-DDThh:mm:ss.sssZ . |
modifiedTimeStamp | string(date-time) | false | none | The timestamp for when the model was last modified, in the format of YYYY-MM-DDThh:mm:ss.sssZ . |
id | string | false | none | The unique identifier for the model. |
name | string | false | none | The name of the model. |
description | string | false | none | The description of the model. |
function | string | false | none | The function of the model. Valid values: analytical, classification, cluster, forecasting, prediction, Text analytics, transformation |
algorithm | string | false | none | The name of model algorithm. |
tool | string | false | none | The name of the model tool. |
modeler | string | false | none | This is the user that created or built the model. |
scoreCodeType | string | false | none | The score code type for the model. |
trainTable | string | false | none | The train data table. |
eventProbVar | string | false | none | The name of the event probability variable. |
targetEvent | string | false | none | The target event value. |
champion | boolean | false | none | Indicates whether the project has champion model or not. |
role | string | false | none | The role of the model. Valid values: plain, champion, challenger |
location | string | false | none | The location of this model. |
targetLevel | string | false | none | The level of the target. |
targetVariable | string | false | none | The name of the target variable. |
projectId | string | false | none | The unique identifier for the project that contains the model. |
projectName | string | false | none | The name of the project that contains the model. |
projectVersionId | string | false | none | The unique identifier for the project version that contains the model. |
projectVersionName | string | false | none | The display name of the project version that contains the model |
folderId | string | false | none | The unique identifier for the folder that contains the model |
repositoryId | string | false | none | The unique identifier for the repository that contains the model. |
championStartTime | string | false | none | The time at which the model was set as the project champion model. |
championEndTime | string | false | none | The time at which the model was unset (cleared) as the project champion model. |
suggestedChampion | boolean | false | none | Indicates the model that was suggested as the champion model at import time. |
retrainable | boolean | false | none | Indicates whether the model can be retrained or not. |
immutable | boolean | false | none | Indicates whether the model can be changed or not. |
modelVersionName | string | false | none | The display name for a model version. |
dataUris | [uriReference] | false | none | The URI reference point to an analytic report. It can have zero or multiple URI references. |
properties | [modelProperty] | false | none | The properties for the model. |
inputVariables | [variable] | false | none | The input variables for the model. |
outputVariables | [variable] | false | none | The output variables for the model. |
version | integer | false | none | The model representation version. The version is 2. |
reportResponse
{
"parentId": "string",
"modelIds": [
"string"
],
"comparedModels": [
{
"createdBy": "string",
"modifiedBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"id": "string",
"name": "string",
"description": "string",
"function": "string",
"algorithm": "string",
"tool": "string",
"modeler": "string",
"scoreCodeType": "string",
"trainTable": "string",
"eventProbVar": "string",
"targetEvent": "string",
"champion": true,
"role": "string",
"location": "string",
"targetLevel": "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-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"name": "string",
"description": "string",
"role": "string",
"type": "string",
"level": "string",
"format": "string",
"length": 0,
"version": 2
}
],
"outputVariables": [
{
"createdBy": "string",
"modifiedBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"name": "string",
"description": "string",
"role": "string",
"type": "string",
"level": "string",
"format": "string",
"length": 0,
"version": 2
}
],
"version": 2
}
],
"allInputVariables": [
{
"createdBy": "string",
"modifiedBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"name": "string",
"description": "string",
"role": "string",
"type": "string",
"level": "string",
"format": "string",
"length": 0,
"version": 2
}
],
"allOutputVariables": [
{
"createdBy": "string",
"modifiedBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"name": "string",
"description": "string",
"role": "string",
"type": "string",
"level": "string",
"format": "string",
"length": 0,
"version": 2
}
],
"allProperties": [
{
"name": "string",
"value": "string",
"type": "string"
}
]
}
Report Response
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
parentId | string | false | none | The unique identifier of the parent project. |
modelIds | [string] | false | none | The collection of model IDs. |
comparedModels | [model] | false | none | The collection of models being compared. |
allInputVariables | [variable] | false | none | The collection of input variables. |
allOutputVariables | [variable] | false | none | The collection of output variables. |
allProperties | [modelProperty] | false | none | The collection of model properties. |
resourceCollection
{
"accept": "string",
"count": 0,
"items": [
{}
],
"limit": 0,
"name": "string",
"start": 0
}
Resource Collection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
accept | string | false | none | media type |
count | integer(int64) | false | none | The total number of items. |
items | [object] | false | none | none |
limit | integer(int32) | false | none | The maximum number of items to return in this request. |
name | string | false | none | item name |
start | integer(int64) | false | none | The 0-based start index of a paginated request. Default is 0. |
api
{
"version": 1,
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
]
}
API
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
version | integer | true | none | The version number of the API representation. This is version 1. |
links | [link] | true | none | The API's top-level links. |
mappedCode
{
"code": "/* DS2 code of an object, which generates an XYZ output table */",
"codeType": "text/vnd.sas.source.ds2",
"outputTableName": "XYZ",
"outputLibraryName": "HPS"
}
Mapped Code
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
code | string | true | none | The executable code generated by a score object. |
codeType | string(media-type) | true | none | The type of code. |
outputTableName | string | true | none | The name of the table that is generated when the code is executed. |
outputLibraryName | string | true | none | The name of the library where the table is generated when the code is executed. |
version | integer | false | none | This media type's schema version number. This representation is version 1. |
baseCollection2
{
"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
}
Base Collection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | false | none | The name of the collection. |
start | integer(int64) | false | none | The zero-based index of the first item in the collection. |
limit | integer | false | none | The number of items that were requested for the collection. |
count | integer(int64) | false | none | If populated indicates the number of items in the collection. |
accept | string | false | none | A space-delimited list of media types from which an Accept header may be constructed. |
links | [link] | false | none | The links that apply to the collection. |
version | integer | false | none | The version number of the collection representation. This representation is version 2. |
link
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
Link
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
method | string | false | none | The HTTP method for the link. |
rel | string | true | none | The relationship of the link to the resource. |
uri | string | false | none | The relative URI for the link. |
href | string | false | none | The URL for the link. |
title | string | false | none | The title for the link. |
type | string | false | none | The media type or link type for the link. |
itemType | string | false | none | 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 | none | The media type or link type of the response body for a PUT , POST , or PATCH operation. |
responseItemType | string | false | none | The media type or link type of the items in the response body for a PUT , POST , or PATCH operation. |
collection2
{
"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": []
}
Collection
Properties
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | baseCollection2 | false | none | 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 | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» items | array | false | none | Array consisting API resource representations, normally a page worth. |
error2
{
"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
}
Error
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
message | string | false | none | The message for the error. |
id | string | false | none | The string ID for the error. |
errorCode | integer | false | none | The numeric ID for the error. |
httpStatusCode | integer | true | none | The HTTP status code for the error. |
details | [string] | false | none | Messages that provide additional details about the cause of the error. |
remediation | string | false | none | A message that describes how to resolve the error. |
errors | [error2] | false | none | Any additional errors that occurred. |
links | [link] | false | none | The links that apply to the error. |
version | integer | true | none | 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.asynchronous
Describes publishing a model to a predefined destination.
The schema is at publishRequest
.
application/vnd.sas.models.publishing.request.asynchronous+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.
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
.
Links
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.
Links
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
.
Links
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.
Links
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
.
Links
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.
Links
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.
Links
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
.
Links
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.
Links
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
Base URLs:
- https://example.com/modelRepository
Email: SAS Developers Web: SAS Developers
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
The 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:
- Create, update, and delete repositories within the common model repository
- Create and import models within projects or folders
- Assess and compare model content and variables
- Versioning of projects and models
- Create, update, and delete models and projects
- Add, update, and delete model content and project content
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:
- Model Studio can register models within the common model repository by submitting a request to the Model Repository API.
- The Model Management API can submit a request to monitor performance of models that are managed by the Model Repository API.
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
Root
Contains the operations for the root resource.
Get a list of top-level resource links
Code samples
# You can also use wget
curl -X GET https://example.com/modelRepository/ \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.api+json'
const headers = {
'Accept':'application/vnd.sas.api+json'
};
fetch('https://example.com/modelRepository/',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.api+json'
}
r = requests.get('https://example.com/modelRepository/', 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://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 Response
{
"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 request succeeded. A list of top-level link objects was returned. | api |
404 | Not Found | No root resource exists at the requested path. Check the URI for errors. | error2 |
Check API availability
Code samples
# You can also use wget
curl -X HEAD https://example.com/modelRepository/ \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.api+json'
const headers = {
'Accept':'application/vnd.sas.api+json'
};
fetch('https://example.com/modelRepository/',
{
method: 'HEAD',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.api+json'
}
r = requests.head('https://example.com/modelRepository/', 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("HEAD", "https://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
200 Response
{
"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 request succeeded. The service is running and available. | api |
404 | Not Found | No root resource exists at the requested path. Check the URI for errors. | error2 |
Models
Contains operations for searching and managing models.
Check if models exist
Code samples
# You can also use wget
curl -X HEAD https://example.com/modelRepository/models \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('https://example.com/modelRepository/models',
{
method: 'HEAD',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.head('https://example.com/modelRepository/models', 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://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
Name | 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 Response
{
"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-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"id": "string",
"name": "string",
"description": "string",
"function": "string",
"algorithm": "string",
"tool": "string",
"modeler": "string",
"scoreCodeType": "string",
"trainTable": "string",
"eventProbVar": "string",
"targetEvent": "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-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"name": "string",
"description": "string",
"role": "string",
"type": "string",
"level": "string",
"format": "string",
"length": 0,
"version": 2
}
],
"outputVariables": [
{
"createdBy": "string",
"modifiedBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"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://example.com/modelRepository/models \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('https://example.com/modelRepository/models',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.get('https://example.com/modelRepository/models', 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://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
Name | 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 Response
{
"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-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"id": "string",
"name": "string",
"description": "string",
"function": "string",
"algorithm": "string",
"tool": "string",
"modeler": "string",
"scoreCodeType": "string",
"trainTable": "string",
"eventProbVar": "string",
"targetEvent": "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-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"name": "string",
"description": "string",
"role": "string",
"type": "string",
"level": "string",
"format": "string",
"length": 0,
"version": 2
}
],
"outputVariables": [
{
"createdBy": "string",
"modifiedBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"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://example.com/modelRepository/models \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.models.model' \
-H 'Accept: application/vnd.sas.models.model'
const inputBody = '{
"createdBy": "string",
"modifiedBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"id": "string",
"name": "string",
"description": "string",
"function": "string",
"algorithm": "string",
"tool": "string",
"modeler": "string",
"scoreCodeType": "string",
"trainTable": "string",
"eventProbVar": "string",
"targetEvent": "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-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"name": "string",
"description": "string",
"role": "string",
"type": "string",
"level": "string",
"format": "string",
"length": 0,
"version": 2
}
],
"outputVariables": [
{
"createdBy": "string",
"modifiedBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"name": "string",
"description": "string",
"role": "string",
"type": "string",
"level": "string",
"format": "string",
"length": 0,
"version": 2
}
],
"version": 2
}';
const headers = {
'Content-Type':'application/vnd.sas.models.model',
'Accept':'application/vnd.sas.models.model'
};
fetch('https://example.com/modelRepository/models',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.models.model',
'Accept': 'application/vnd.sas.models.model'
}
r = requests.post('https://example.com/modelRepository/models', 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://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-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"id": "string",
"name": "string",
"description": "string",
"function": "string",
"algorithm": "string",
"tool": "string",
"modeler": "string",
"scoreCodeType": "string",
"trainTable": "string",
"eventProbVar": "string",
"targetEvent": "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-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"name": "string",
"description": "string",
"role": "string",
"type": "string",
"level": "string",
"format": "string",
"length": 0,
"version": 2
}
],
"outputVariables": [
{
"createdBy": "string",
"modifiedBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"name": "string",
"description": "string",
"role": "string",
"type": "string",
"level": "string",
"format": "string",
"length": 0,
"version": 2
}
],
"version": 2
}
Parameters
Name | 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 Response
{
"createdBy": "string",
"modifiedBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"id": "string",
"name": "string",
"description": "string",
"function": "string",
"algorithm": "string",
"tool": "string",
"modeler": "string",
"scoreCodeType": "string",
"trainTable": "string",
"eventProbVar": "string",
"targetEvent": "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-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"name": "string",
"description": "string",
"role": "string",
"type": "string",
"level": "string",
"format": "string",
"length": 0,
"version": 2
}
],
"outputVariables": [
{
"createdBy": "string",
"modifiedBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"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://example.com/modelRepository/models#Project \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.models.project.request' \
-H 'Accept: application/vnd.sas.collection+json'
const inputBody = '{
"name": "string",
"description": "string",
"function": "string",
"externalProjectId": "string",
"versionOption": "string",
"modelList": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 2
}';
const headers = {
'Content-Type':'application/vnd.sas.models.project.request',
'Accept':'application/vnd.sas.collection+json'
};
fetch('https://example.com/modelRepository/models#Project',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.models.project.request',
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.post('https://example.com/modelRepository/models#Project', 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://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
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | projectRequest | false | none |
Example responses
201 Response
{
"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-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"id": "string",
"name": "string",
"description": "string",
"function": "string",
"algorithm": "string",
"tool": "string",
"modeler": "string",
"scoreCodeType": "string",
"trainTable": "string",
"eventProbVar": "string",
"targetEvent": "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-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"name": "string",
"description": "string",
"role": "string",
"type": "string",
"level": "string",
"format": "string",
"length": 0,
"version": 2
}
],
"outputVariables": [
{
"createdBy": "string",
"modifiedBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"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://example.com/modelRepository/models#CommonModel \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.models.model.request' \
-H 'Accept: application/vnd.sas.models.model'
const inputBody = '{
"id": "string",
"name": "string",
"description": "string",
"function": "string",
"algorithm": "string",
"tool": "string",
"toolVersion": "string",
"modeler": "string",
"dataUris": [
{
"name": "string",
"uri": "string",
"uriType": "string",
"mediaType": "string",
"contentType": "string"
}
],
"scoreCodeUri": {
"name": "string",
"uri": "string",
"uriType": "string",
"mediaType": "string",
"contentType": "string"
},
"trainCodeUri": {
"name": "string",
"uri": "string",
"uriType": "string",
"mediaType": "string",
"contentType": "string"
},
"targetEvent": "string",
"nondeterministic": true,
"dataSourceUri": {
"name": "string",
"uri": "string",
"uriType": "string",
"mediaType": "string",
"contentType": "string"
},
"dataSourceNotes": "string",
"externalModelId": "string",
"trainTableSummaryUri": {
"name": "string",
"uri": "string",
"uriType": "string",
"mediaType": "string",
"contentType": "string"
},
"fitStatUri": {
"name": "string",
"uri": "string",
"uriType": "string",
"mediaType": "string",
"contentType": "string"
},
"sasOptions": "string",
"dataPlanUri": {
"name": "string",
"uri": "string",
"uriType": "string",
"mediaType": "string",
"contentType": "string"
},
"rocDataUri": {
"name": "string",
"uri": "string",
"uriType": "string",
"mediaType": "string",
"contentType": "string"
},
"liftDataUri": {
"name": "string",
"uri": "string",
"uriType": "string",
"mediaType": "string",
"contentType": "string"
},
"partitionLevels": {
"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": [
{
"dataRole": "string",
"value": "string"
}
]
},
"eventLevels": {
"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": [
{
"variableName": "string",
"eventValue": "string"
}
]
},
"modelTransformation": {
"inputVariables": [
{
"createdBy": "string",
"modifiedBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"name": "string",
"description": "string",
"role": "string",
"type": "string",
"level": "string",
"format": "string",
"length": 0,
"version": 2
}
],
"outputVariables": [
{
"createdBy": "string",
"modifiedBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"name": "string",
"description": "string",
"role": "string",
"type": "string",
"level": "string",
"format": "string",
"length": 0,
"version": 2
}
],
"steps": [
{
"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": [
{
"sequence": 0,
"type": "string",
"stepUri": {
"name": "string",
"uri": "string",
"uriType": "string",
"mediaType": "string",
"contentType": "string"
}
}
]
}
]
},
"trainInputs": [
{
"createdBy": "string",
"modifiedBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"name": "string",
"description": "string",
"role": "string",
"type": "string",
"level": "string",
"format": "string",
"length": 0,
"version": 2
}
],
"version": 2
}';
const headers = {
'Content-Type':'application/vnd.sas.models.model.request',
'Accept':'application/vnd.sas.models.model'
};
fetch('https://example.com/modelRepository/models#CommonModel',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.models.model.request',
'Accept': 'application/vnd.sas.models.model'
}
r = requests.post('https://example.com/modelRepository/models#CommonModel', 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://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
Name | In | Type | Required | Description |
---|---|---|---|---|
folderId | query | string | false | The unique identifier for the folder that contains the model. |
body | body | modelRequest | false | none |
Example responses
201 Response
{
"createdBy": "string",
"modifiedBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"id": "string",
"name": "string",
"description": "string",
"function": "string",
"algorithm": "string",
"tool": "string",
"modeler": "string",
"scoreCodeType": "string",
"trainTable": "string",
"eventProbVar": "string",
"targetEvent": "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-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"name": "string",
"description": "string",
"role": "string",
"type": "string",
"level": "string",
"format": "string",
"length": 0,
"version": 2
}
],
"outputVariables": [
{
"createdBy": "string",
"modifiedBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"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://example.com/modelRepository/models#MultipartFormData?name=string&type=SPK \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: multipart/form-data' \
-H 'Accept: application/vnd.sas.collection+json'
const inputBody = '{
"files": "string"
}';
const headers = {
'Content-Type':'multipart/form-data',
'Accept':'application/vnd.sas.collection+json'
};
fetch('https://example.com/modelRepository/models#MultipartFormData?name=string&type=SPK',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'multipart/form-data',
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.post('https://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://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
Name | 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 | none |
» files | body | string(binary) | true | Select an SPK file from your local client machine. |
Example responses
201 Response
{
"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-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"id": "string",
"name": "string",
"description": "string",
"function": "string",
"algorithm": "string",
"tool": "string",
"modeler": "string",
"scoreCodeType": "string",
"trainTable": "string",
"eventProbVar": "string",
"targetEvent": "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-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"name": "string",
"description": "string",
"role": "string",
"type": "string",
"level": "string",
"format": "string",
"length": 0,
"version": 2
}
],
"outputVariables": [
{
"createdBy": "string",
"modifiedBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"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://example.com/modelRepository/models#octetStream?name=string&type=SPK \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/octet-stream' \
-H 'Accept: application/vnd.sas.collection+json'
const inputBody = 'string';
const headers = {
'Content-Type':'application/octet-stream',
'Accept':'application/vnd.sas.collection+json'
};
fetch('https://example.com/modelRepository/models#octetStream?name=string&type=SPK',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/octet-stream',
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.post('https://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://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
Name | 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 Response
{
"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-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"id": "string",
"name": "string",
"description": "string",
"function": "string",
"algorithm": "string",
"tool": "string",
"modeler": "string",
"scoreCodeType": "string",
"trainTable": "string",
"eventProbVar": "string",
"targetEvent": "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-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"name": "string",
"description": "string",
"role": "string",
"type": "string",
"level": "string",
"format": "string",
"length": 0,
"version": 2
}
],
"outputVariables": [
{
"createdBy": "string",
"modifiedBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"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://example.com/modelRepository/models/{modelId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.models.model'
const headers = {
'Accept':'application/vnd.sas.models.model'
};
fetch('https://example.com/modelRepository/models/{modelId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.models.model'
}
r = requests.get('https://example.com/modelRepository/models/{modelId}', 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://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
Name | In | Type | Required | Description |
---|---|---|---|---|
modelId | path | string | true | none |
Example responses
200 Response
{
"createdBy": "string",
"modifiedBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"id": "string",
"name": "string",
"description": "string",
"function": "string",
"algorithm": "string",
"tool": "string",
"modeler": "string",
"scoreCodeType": "string",
"trainTable": "string",
"eventProbVar": "string",
"targetEvent": "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-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"name": "string",
"description": "string",
"role": "string",
"type": "string",
"level": "string",
"format": "string",
"length": 0,
"version": 2
}
],
"outputVariables": [
{
"createdBy": "string",
"modifiedBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"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://example.com/modelRepository/models/{modelId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.models.model'
const headers = {
'Accept':'application/vnd.sas.models.model'
};
fetch('https://example.com/modelRepository/models/{modelId}',
{
method: 'HEAD',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.models.model'
}
r = requests.head('https://example.com/modelRepository/models/{modelId}', 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://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
Name | In | Type | Required | Description |
---|---|---|---|---|
modelId | path | string | true | The unique identifier for the model. |
Example responses
200 Response
{
"createdBy": "string",
"modifiedBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"id": "string",
"name": "string",
"description": "string",
"function": "string",
"algorithm": "string",
"tool": "string",
"modeler": "string",
"scoreCodeType": "string",
"trainTable": "string",
"eventProbVar": "string",
"targetEvent": "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-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"name": "string",
"description": "string",
"role": "string",
"type": "string",
"level": "string",
"format": "string",
"length": 0,
"version": 2
}
],
"outputVariables": [
{
"createdBy": "string",
"modifiedBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"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://example.com/modelRepository/models/{modelId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.models.model' \
-H 'Accept: application/vnd.sas.models.model' \
-H 'If-Match: string'
const inputBody = '{
"createdBy": "string",
"modifiedBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"id": "string",
"name": "string",
"description": "string",
"function": "string",
"algorithm": "string",
"tool": "string",
"modeler": "string",
"scoreCodeType": "string",
"trainTable": "string",
"eventProbVar": "string",
"targetEvent": "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-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"name": "string",
"description": "string",
"role": "string",
"type": "string",
"level": "string",
"format": "string",
"length": 0,
"version": 2
}
],
"outputVariables": [
{
"createdBy": "string",
"modifiedBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"name": "string",
"description": "string",
"role": "string",
"type": "string",
"level": "string",
"format": "string",
"length": 0,
"version": 2
}
],
"version": 2
}';
const headers = {
'Content-Type':'application/vnd.sas.models.model',
'Accept':'application/vnd.sas.models.model',
'If-Match':'string'
};
fetch('https://example.com/modelRepository/models/{modelId}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.models.model',
'Accept': 'application/vnd.sas.models.model',
'If-Match': 'string'
}
r = requests.put('https://example.com/modelRepository/models/{modelId}', 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://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-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"id": "string",
"name": "string",
"description": "string",
"function": "string",
"algorithm": "string",
"tool": "string",
"modeler": "string",
"scoreCodeType": "string",
"trainTable": "string",
"eventProbVar": "string",
"targetEvent": "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-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"name": "string",
"description": "string",
"role": "string",
"type": "string",
"level": "string",
"format": "string",
"length": 0,
"version": 2
}
],
"outputVariables": [
{
"createdBy": "string",
"modifiedBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"name": "string",
"description": "string",
"role": "string",
"type": "string",
"level": "string",
"format": "string",
"length": 0,
"version": 2
}
],
"version": 2
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
If-Match | header | string | true | Client needs to specify the previously pulled ETag as If-Matchheader. |
modelId | path | string | true | none |
body | body | model | false | If the model is defined, then this information is mandatory. |
Example responses
200 Response
{
"createdBy": "string",
"modifiedBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"id": "string",
"name": "string",
"description": "string",
"function": "string",
"algorithm": "string",
"tool": "string",
"modeler": "string",
"scoreCodeType": "string",
"trainTable": "string",
"eventProbVar": "string",
"targetEvent": "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-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"name": "string",
"description": "string",
"role"