Fraud and Compliance
Detection
Base URLs:
- http://mock-detection.apifirst.unx.sas.com/detection
Terms of service 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 SAS Detection API provides an entry point for customers with ION messages to apply a SAS Decisioning Architecture ecosystem decision to an incoming message and return results.
Usage Notes
Overview
The SAS Detection API enables you to execute decision rules on a message. This execution might also result in a detected alert. The message should comply with the format of one of the deployed message schemas. If a decision rules package is deployed in the same SAS Container Runtime pod, then it is invoked and the response is provided back to the caller with details about the execution. If an alert is detected, then the alert is sent downstream for alert triage.
Terminology
message-schema-type
all transactions have, in a variable in a predefined location, which message schema this transaction will operate against, for example Credit Card Fraud
format
all transactions are expected at this time to be in an ion format
transaction
the incoming payload that represents a customer transaction
ion
a data format similar to json, but not interchangeable with jso
Error Codes
The following list contains the set of error codes that are used in certain error conditions.
HTTP Status Code | Error Code | Description |
---|---|---|
400 | BBLD | Bad build number in message. |
400 | BFLD | Invalid field value in message. |
400 | BORG | Invalid messageClassificationName value. |
400 | ECMD | An error occurred while processing the ION using the Command Variable Set (SCC). |
400 | IERR | Internal error in SAS Container Runtime processing. |
400 | IION | Invalid ION message. |
400 | IODE | An internal error occurred. See the server log for details. |
400 | MFLD | Field missing from message. |
400 | MVST | A required variable set is missing from the message. |
400 | NDEP | No deployment available |
400 | NKAF | No connection to Kafka. |
400 | NSCR | No connection to SAS Container Runtime. |
400 | NRED | No connection to Redis. |
400 | NORG | The server configuration requires that the messageClassificationName field have a value. |
400 | SLAE | SLA Exceeded processing message. |
Note: Other error codes may be returned from respective provider services.
Operations
Root
The operations for the root resource.
Get a List of Top-level Links
Code samples
# You can also use wget
curl -X GET http://mock-detection.apifirst.unx.sas.com/detection/ \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.api+json'
const headers = {
'Accept':'application/vnd.sas.api+json'
};
fetch('http://mock-detection.apifirst.unx.sas.com/detection/',
{
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('http://mock-detection.apifirst.unx.sas.com/detection/', 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", "http://mock-detection.apifirst.unx.sas.com/detection/", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /
Returns a list of links to the top-level resources surfaced through this API.
Example responses
List of endpoints for Detection service
{
"version": 1,
"links": [
{
"method": "GET",
"rel": "root",
"href": "/detection",
"uri": "/detection",
"type": "application/vnd.sas.api"
},
{
"method": "GET",
"rel": "getDecision",
"href": "/detection/decision",
"uri": "/detection/decision",
"type": "application/vnd.sas.collection"
},
{
"method": "POST",
"rel": "postDecisionExecute",
"href": "/detection/decision/execute",
"uri": "/detection/decision/execute"
},
{
"method": "GET",
"rel": "getRuleMetrics",
"href": "/detection/decision/rulemetrics",
"uri": "/detection/decision/rulemetrics",
"type": "application/json"
},
{
"method": "GET",
"rel": "getSummaryDescriptionOfDecision",
"href": "/detection/decision/description/summary",
"uri": "/detection/decision/description/summary",
"type": "application/json"
},
{
"method": "GET",
"rel": "getRulesDescriptionOfDecision",
"href": "/detection/decision/description/rules",
"uri": "/detection/decision/description/rules",
"type": "application/json"
},
{
"method": "GET",
"rel": "getVariableSetDescriptionOfDecision",
"href": "/detection/decision/description/variableSets",
"uri": "/detection/decision/description/variableSets",
"type": "application/json"
},
{
"method": "GET",
"rel": "getProfileDescriptionOfDecision",
"href": "/detection/decision/description/profiles",
"uri": "/detection/decision/description/profiles",
"type": "application/json"
},
{
"method": "GET",
"rel": "getAlertTypesDescriptionOfDecision",
"href": "/detection/decision/description/alertTypes",
"uri": "/detection/decision/description/alertTypes",
"type": "application/json"
},
{
"method": "GET",
"rel": "getMessageClassificationsDescriptionOfDecision",
"href": "/detection/decision/description/messageClassifications",
"uri": "/detection/decision/description/messageClassifications",
"type": "application/json"
},
{
"method": "GET",
"rel": "getDecisionDescription",
"href": "/detection/decision/description/models",
"uri": "/detection/decision/description/models",
"type": "application/json"
},
{
"method": "POST",
"rel": "postValidate",
"href": "/detection/decision/validate",
"uri": "/detection/decision/validate",
"type": "application/json"
},
{
"method": "GET",
"rel": "getHealth",
"href": "/detection/health",
"uri": "/detection/health",
"type": "application/json"
},
{
"method": "GET",
"rel": "getStats",
"href": "/detection/stats",
"uri": "/detection/stats",
"type": "application/json"
},
{
"method": "GET",
"rel": "getStatsTimeline",
"href": "/detection/stats/timeline",
"uri": "/detection/stats/timeline",
"type": "application/json"
},
{
"method": "GET",
"rel": "getStatsTools",
"href": "/detection/stats/tools",
"uri": "/detection/stats/tools",
"type": "application/json"
},
{
"method": "GET",
"rel": "getMetrics",
"href": "/detection/metrics",
"uri": "/detection/metrics"
},
{
"method": "GET",
"rel": "getSettings",
"href": "/detection/settings",
"uri": "/detection/settings",
"type": "application/json"
},
{
"method": "POST",
"rel": "createBinaryION",
"href": "/detection/generate/binaryION",
"uri": "/detection/generate/binaryION"
},
{
"method": "POST",
"rel": "createTextIon",
"href": "/detection/generate/textION",
"uri": "/detection/generate/textION"
},
{
"method": "POST",
"rel": "createExecuteFromION",
"href": "/detection/generate/executeFromION",
"uri": "/detection/generate/executeFromION"
},
{
"method": "GET",
"rel": "getVerbose",
"href": "/detection/decision/getverbose",
"uri": "/detection/decision/getverbose",
"type": "application/json"
},
{
"method": "GET",
"rel": "setVerbose",
"href": "/detection/decision/setverbose?level=13",
"uri": "/detection/decision/setverbose?level=13",
"type": "application/json"
},
{
"method": "PATCH",
"rel": "restartPod",
"href": "/detection/restart",
"uri": "/detection/restart",
"type": "application/json"
}
]
}
{
"version": 1,
"links": [
{
"method": "GET",
"rel": "root",
"href": "/detection",
"uri": "/detection",
"type": "application/vnd.sas.api"
},
{
"method": "GET",
"rel": "getDecision",
"href": "/detection/decision",
"uri": "/detection/decision",
"type": "application/vnd.sas.collection"
},
{
"method": "POST",
"rel": "postDecisionExecute",
"href": "/detection/decision/execute",
"uri": "/detection/decision/execute"
},
{
"method": "GET",
"rel": "getRuleMetrics",
"href": "/detection/decision/rulemetrics",
"uri": "/detection/decision/rulemetrics",
"type": "application/json"
},
{
"method": "GET",
"rel": "getSummaryDescriptionOfDecision",
"href": "/detection/decision/description/summary",
"uri": "/detection/decision/description/summary",
"type": "application/json"
},
{
"method": "GET",
"rel": "getRulesDescriptionOfDecision",
"href": "/detection/decision/description/rules",
"uri": "/detection/decision/description/rules",
"type": "application/json"
},
{
"method": "GET",
"rel": "getVariableSetDescriptionOfDecision",
"href": "/detection/decision/description/variableSets",
"uri": "/detection/decision/description/variableSets",
"type": "application/json"
},
{
"method": "GET",
"rel": "getProfileDescriptionOfDecision",
"href": "/detection/decision/description/profiles",
"uri": "/detection/decision/description/profiles",
"type": "application/json"
},
{
"method": "GET",
"rel": "getAlertTypesDescriptionOfDecision",
"href": "/detection/decision/description/alertTypes",
"uri": "/detection/decision/description/alertTypes",
"type": "application/json"
},
{
"method": "GET",
"rel": "getMessageClassificationsDescriptionOfDecision",
"href": "/detection/decision/description/messageClassifications",
"uri": "/detection/decision/description/messageClassifications",
"type": "application/json"
},
{
"method": "GET",
"rel": "getDecisionDescription",
"href": "/detection/decision/description/models",
"uri": "/detection/decision/description/models",
"type": "application/json"
},
{
"method": "POST",
"rel": "postValidate",
"href": "/detection/decision/validate",
"uri": "/detection/decision/validate",
"type": "application/json"
},
{
"method": "GET",
"rel": "getHealth",
"href": "/detection/health",
"uri": "/detection/health",
"type": "application/json"
},
{
"method": "GET",
"rel": "getStats",
"href": "/detection/stats",
"uri": "/detection/stats",
"type": "application/json"
},
{
"method": "GET",
"rel": "getStatsTimeline",
"href": "/detection/stats/timeline",
"uri": "/detection/stats/timeline",
"type": "application/json"
},
{
"method": "GET",
"rel": "getStatsTools",
"href": "/detection/stats/tools",
"uri": "/detection/stats/tools",
"type": "application/json"
},
{
"method": "GET",
"rel": "getMetrics",
"href": "/detection/metrics",
"uri": "/detection/metrics"
},
{
"method": "GET",
"rel": "getSettings",
"href": "/detection/settings",
"uri": "/detection/settings",
"type": "application/json"
},
{
"method": "POST",
"rel": "createBinaryION",
"href": "/detection/generate/binaryION",
"uri": "/detection/generate/binaryION"
},
{
"method": "POST",
"rel": "createTextIon",
"href": "/detection/generate/textION",
"uri": "/detection/generate/textION"
},
{
"method": "POST",
"rel": "createExecuteFromION",
"href": "/detection/generate/executeFromION",
"uri": "/detection/generate/executeFromION"
},
{
"method": "GET",
"rel": "getVerbose",
"href": "/detection/decision/getverbose",
"uri": "/detection/decision/getverbose",
"type": "application/json"
},
{
"method": "GET",
"rel": "setVerbose",
"href": "/detection/decision/setverbose?level=13",
"uri": "/detection/decision/setverbose?level=13",
"type": "application/json"
},
{
"method": "PATCH",
"rel": "restartPod",
"href": "/detection/restart",
"uri": "/detection/restart",
"type": "application/json"
}
]
}
Here is an example of a bad request error response on a PUT request to create an object type. In this example the body did not include a name for the object type.
{
"errorCode": 1177,
"message": "The objectType was not valid.",
"details": [
"traceId: 4d148b871720c018",
"path: /types/types/testtype",
"FieldError: name: Must not be null."
],
"links": [],
"version": 2,
"httpStatusCode": 400
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | api |
404 | Not Found | Not found | errorResponse |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Etag | string | An hash-code for the response resource. | |
200 | Last-Modified | string | Date and time of last modification. | |
200 | Location | string | Location of URI for the endpoint. |
Decision
The operations for a decision.
Execute the Decision That Resides in the Same SAS Container Runtime Pod
Code samples
# You can also use wget
curl -X POST http://mock-detection.apifirst.unx.sas.com/detection/decision/execute \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.detection.message.schema_name+ion' \
-H 'Accept: text/plain'
const inputBody = 'string';
const headers = {
'Content-Type':'application/vnd.sas.detection.message.schema_name+ion',
'Accept':'text/plain'
};
fetch('http://mock-detection.apifirst.unx.sas.com/detection/decision/execute',
{
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.detection.message.schema_name+ion',
'Accept': 'text/plain'
}
r = requests.post('http://mock-detection.apifirst.unx.sas.com/detection/decision/execute', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.detection.message.schema_name+ion"},
"Accept": []string{"text/plain"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-detection.apifirst.unx.sas.com/detection/decision/execute", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /decision/execute
Executes the decision that resides in the same SAS Container Runtime (SCR) pod.
Body parameter
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
debug | query | string | false | If true, then the body returned contains the processed transaction and other information about the processing. |
body | body | string | true | ION binary format data, representing customer data, that will be augmented with results of running a decision. |
Example responses
200 Response
{"message":{"account":{"account_var1":"Flintstone"},"request":{"command":"Execute","messageClassificationName":"Bank_A","restResponseFlg":1,"schemaName":"Bank_A_global"},"sas":{"decision":{"outcome":40,"outcomeCode":"zzzz","outcomeName":"Decline","referenceIdentifier":"50212.2"},"modelfired":[{"referenceIdentifier":"TESTMDL_0100","returnDesc":"PB00","returnDetails":"SUCCESS","returnType":4,"riskReasonCodes":null,"score":162,"supplementalScore":null,"type":"fraud"}]}}}
400 Response
"{message:{sas:{system:{returnDesc:'BORG',returnDetails:{Reason:'Message Classification provided does not match valid choices. Please update messageClassificationName in the provided ION.',ValidOrganizations:['Bank_A','North_America','Europe']},returnType:8}}}}"
Here is an example of a bad request error response on a PUT request to create an object type. In this example the body did not include a name for the object type.
{
"errorCode": 1177,
"message": "The objectType was not valid.",
"details": [
"traceId: 4d148b871720c018",
"path: /types/types/testtype",
"FieldError: name: Must not be null."
],
"links": [],
"version": 2,
"httpStatusCode": 400
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful processing of incoming ION message | None |
400 | Bad Request | A problem exists in the incoming ION message | None |
404 | Not Found | Not found | errorResponse |
Response Schema
Description of the Decision That Resides in the Same SAS Container Runtime Pod
Code samples
# You can also use wget
curl -X GET http://mock-detection.apifirst.unx.sas.com/detection/decision/description \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/json'
const headers = {
'Accept':'application/json'
};
fetch('http://mock-detection.apifirst.unx.sas.com/detection/decision/description',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('http://mock-detection.apifirst.unx.sas.com/detection/decision/description', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-detection.apifirst.unx.sas.com/detection/decision/description", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /decision/description
Returns a description of the decision that resides in the same SAS Container Runtime pod.
Example responses
The following is an example of a description of a deployed module.
{
"build": 50005,
"mehMode": "redis",
"image": "registry.unx.sas.com/fraudmgmt/performancenew:1.51976.0",
"organization": {
"id": "e399b375-7fdc-4bad-a5fc-a8e55c54c9fb",
"name": "AG",
"organizationalUnits": [
{
"id": "9aa7c12b-05a4-11ee-a0db-a6bb78d5b996",
"keyCode": "AG",
"name": "AG"
},
{
"id": "9aa7c139-05a4-11ee-a0db-a6bb78d5b996",
"keyCode": "AGA",
"name": "AG_PC"
}
],
"schemas": [
{
"id": "4c0d8dfe-e221-47a0-af8c-97ba0bbe1c66",
"name": "Debit Card Fraud Decisioning",
"version": "1.0.0"
}
],
"sourceUri": "http://myMachine/detectionDefinition/deployments?organization=e399b375-7fdc-4bad-a5fc-a8e55c54c9fb"
},
"profiles": [
[
"A",
[
"identifier"
]
]
],
"requiredInput": [
".message.solution.channelType",
".message.solution.customerType",
".message.solution.authenticationType",
".message.solution.activityType",
".message.solution.originationType",
".message.request.schemaName",
".message.request.restResponseFlg",
".message.request.command",
".message.request.messageClassificationName"
],
"version": "1.0.39"
}
The following is an example response to a request to /detection/description/
{
"message": {
"sas": {
"system": {
"returnDesc": "IODE",
"returnDetails": "Reason Code [IODE]: (Describe.) The deployment package could not be described. The follow error occurred: [No step found for stepid: <invalid_description_type>, module decision.].",
"returnType": 12
}
}
}
}
The following is an example response to a request to /detection/decision/description and to a specific further endpoint that does not exist
{
"version": 2,
"httpStatusCode": 404,
"message": "There is no handler defined for the path \"/detection/decision/description/rules432\".",
"details": [
"path: /detection/decision/description/rules432",
"correlator: a08e5824-af7f-4753-948f-62ac56eb2e1c"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Decision description is returned. | describeObject |
400 | Bad Request | Bad request | errorResponse |
404 | Not Found | Not found | errorResponse |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | The media type for the response |
Description of the Variable Sets within a Decision That Resides in the Same SAS Container Runtime Pod
Code samples
# You can also use wget
curl -X GET http://mock-detection.apifirst.unx.sas.com/detection/decision/description/variableSets \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/json'
const headers = {
'Accept':'application/json'
};
fetch('http://mock-detection.apifirst.unx.sas.com/detection/decision/description/variableSets',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('http://mock-detection.apifirst.unx.sas.com/detection/decision/description/variableSets', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-detection.apifirst.unx.sas.com/detection/decision/description/variableSets", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /decision/description/variableSets
Returns a description of the variable sets and variables in a decision that resides in the same SAS Container Runtime pod.
Example responses
The following is an example of a description of the variables in a deployed module.
{
"variableSets": [
{
"name": "message",
"variableSets": [
{
"name": "sas",
"variableSets": [
{
"name": "system",
"variables": [
{
"name": "packageVersion",
"required": "false",
"type": "number"
},
{
"name": "transactionDtTmUtc",
"required": "false",
"type": "datetime"
},
{
"name": "transactionIdentifier",
"required": "false",
"type": "number"
}
]
},
{
"name": "decision"
},
{
"name": "rre"
}
],
"variables": [
{
"name": "rulefired",
"required": "false",
"type": "number"
},
{
"name": "modelfired",
"required": "false",
"type": "number"
},
{
"name": "alerted",
"required": "false",
"type": "number"
}
]
},
{
"name": "debitcard",
"variables": [
{
"name": "activationChannelInd",
"required": "false",
"type": "string"
},
{
"name": "issueDt",
"required": "false",
"type": "datetime"
},
{
"name": "lastFourDigits",
"required": "false",
"type": "string"
},
{
"name": "issueType",
"required": "false",
"type": "string"
},
{
"name": "spendLimitType",
"required": "false",
"type": "string"
},
{
"name": "lastExpiration",
"required": "false",
"type": "string"
},
{
"name": "activationDt",
"required": "false",
"type": "datetime"
},
{
"name": "binCategory",
"required": "false",
"type": "string"
},
{
"name": "invalidPinDt",
"required": "false",
"type": "datetime"
},
{
"name": "typeDesc",
"required": "false",
"type": "string"
},
{
"name": "encyptedSecurityCode",
"required": "false",
"type": "string"
},
{
"name": "statusInd",
"required": "false",
"type": "string"
},
{
"name": "issuingCountryCode",
"required": "false",
"type": "string"
},
{
"name": "lastLimit",
"required": "false",
"type": "number"
},
{
"name": "expirationYear",
"required": "false",
"type": "string"
},
{
"name": "spendLimit",
"required": "false",
"type": "number"
},
{
"name": "category",
"required": "false",
"type": "string"
},
{
"name": "limit",
"required": "false",
"type": "number"
},
{
"name": "type",
"required": "false",
"type": "string"
},
{
"name": "marker",
"required": "false",
"type": "string"
},
{
"name": "expirationMonth",
"required": "false",
"type": "string"
},
{
"name": "number",
"required": "false",
"type": "string"
},
{
"name": "bin",
"required": "false",
"type": "string"
},
{
"name": "lastPinDt",
"required": "false",
"type": "datetime"
},
{
"name": "invalidPinTries",
"required": "false",
"type": "number"
},
{
"name": "holderName",
"required": "false",
"type": "string"
},
{
"name": "lastLimitChangeDt",
"required": "false",
"type": "datetime"
},
{
"name": "blockDt",
"required": "false",
"type": "datetime"
},
{
"name": "securityCodePfToken",
"required": "false",
"type": "string"
},
{
"name": "blockCode",
"required": "false",
"type": "string"
},
{
"name": "holderEmbossedName",
"required": "false",
"type": "string"
},
{
"name": "issuingBank",
"required": "false",
"type": "string"
},
{
"name": "issuingCountry",
"required": "false",
"type": "number"
},
{
"name": "expirationDt",
"required": "false",
"type": "string"
},
{
"name": "encyptedNumber",
"required": "false",
"type": "string"
}
]
}
]
}
]
}
The following is an example response to a request to /detection/description/
{
"message": {
"sas": {
"system": {
"returnDesc": "IODE",
"returnDetails": "Reason Code [IODE]: (Describe.) The deployment package could not be described. The follow error occurred: [No step found for stepid: <invalid_description_type>, module decision.].",
"returnType": 12
}
}
}
}
The following is an example response to a request to /detection/decision/description and to a specific further endpoint that does not exist
{
"version": 2,
"httpStatusCode": 404,
"message": "There is no handler defined for the path \"/detection/decision/description/rules432\".",
"details": [
"path: /detection/decision/description/rules432",
"correlator: a08e5824-af7f-4753-948f-62ac56eb2e1c"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Decision variable sets are returned. | describeVariableSetsObject |
400 | Bad Request | Bad request | errorResponse |
404 | Not Found | Not found | errorResponse |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | The media type for the response |
Description of the Rules within a Decision That Resides in the Same SAS Container Runtime Pod
Code samples
# You can also use wget
curl -X GET http://mock-detection.apifirst.unx.sas.com/detection/decision/description/rules \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/json'
const headers = {
'Accept':'application/json'
};
fetch('http://mock-detection.apifirst.unx.sas.com/detection/decision/description/rules',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('http://mock-detection.apifirst.unx.sas.com/detection/decision/description/rules', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-detection.apifirst.unx.sas.com/detection/decision/description/rules", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /decision/description/rules
Returns a description of the rules in a decision that resides in the same SAS Container Runtime pod.
Example responses
The following is an example of a description of the decision rules in a deployed module.
{
"rules": [
{
"enabled": true,
"id": "e6300ab8-4e88-4d01-b8de-6eb6084cb3ac",
"refId": "50170.2"
},
{
"enabled": true,
"id": "095dbea7-51f4-4f56-81a2-0ae9b00ab3d2",
"refId": "50245.1"
}
]
}
The following is an example response to a request to /detection/description/
{
"message": {
"sas": {
"system": {
"returnDesc": "IODE",
"returnDetails": "Reason Code [IODE]: (Describe.) The deployment package could not be described. The follow error occurred: [No step found for stepid: <invalid_description_type>, module decision.].",
"returnType": 12
}
}
}
}
The following is an example response to a request to /detection/decision/description and to a specific further endpoint that does not exist
{
"version": 2,
"httpStatusCode": 404,
"message": "There is no handler defined for the path \"/detection/decision/description/rules432\".",
"details": [
"path: /detection/decision/description/rules432",
"correlator: a08e5824-af7f-4753-948f-62ac56eb2e1c"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Decision rules are returned. | describeRulesObject |
400 | Bad Request | Bad request | errorResponse |
404 | Not Found | Not found | errorResponse |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | The media type for the response |
Description of the Lookup Lists within a Decision That Resides in the Same SAS Container Runtime Pod
Code samples
# You can also use wget
curl -X GET http://mock-detection.apifirst.unx.sas.com/detection/decision/description/lists \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/json'
const headers = {
'Accept':'application/json'
};
fetch('http://mock-detection.apifirst.unx.sas.com/detection/decision/description/lists',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('http://mock-detection.apifirst.unx.sas.com/detection/decision/description/lists', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-detection.apifirst.unx.sas.com/detection/decision/description/lists", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /decision/description/lists
Returns the list of deployed lookup lists in a decision that resides in the same SAS Container Runtime pod.
Example responses
The following is an example of a description of the decision lookup lists in a deployed module.
{
"lists": [
{
"columns": [
{
"name": "aqo_acct_num",
"type": "string"
},
{
"name": "reason",
"type": "string"
},
{
"name": "when",
"type": "string"
}
],
"name": "closedAccts"
}
]
}
The following is an example response to a request to /detection/description/
{
"message": {
"sas": {
"system": {
"returnDesc": "IODE",
"returnDetails": "Reason Code [IODE]: (Describe.) The deployment package could not be described. The follow error occurred: [No step found for stepid: <invalid_description_type>, module decision.].",
"returnType": 12
}
}
}
}
The following is an example response to a request to /detection/decision/description and to a specific further endpoint that does not exist
{
"version": 2,
"httpStatusCode": 404,
"message": "There is no handler defined for the path \"/detection/decision/description/rules432\".",
"details": [
"path: /detection/decision/description/rules432",
"correlator: a08e5824-af7f-4753-948f-62ac56eb2e1c"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Decision lookup lists are returned. | describeListsObject |
400 | Bad Request | Bad request | errorResponse |
404 | Not Found | Not found | errorResponse |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | The media type for the response |
Description of the Profile within a Decision That Resides in the Same SAS Container Runtime Pod
Code samples
# You can also use wget
curl -X GET http://mock-detection.apifirst.unx.sas.com/detection/decision/description/profiles \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/json'
const headers = {
'Accept':'application/json'
};
fetch('http://mock-detection.apifirst.unx.sas.com/detection/decision/description/profiles',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('http://mock-detection.apifirst.unx.sas.com/detection/decision/description/profiles', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-detection.apifirst.unx.sas.com/detection/decision/description/profiles", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /decision/description/profiles
Returns a description of the profiles in a decision that resides in the same SAS Container Runtime pod.
Example responses
The following is an example of a description of the profile variable sets in a deployed module.
{
"profiles": [
{
"keys": [
".message.aqo.acct_num"
],
"name": "_a_",
"variables": [
{
"name": "count",
"required": "false",
"type": "number"
},
{
"name": "myArray",
"required": "false",
"type": "string"
}
]
},
{
"keys": [
".message.aqo.acct_num"
],
"name": "account",
"variables": [
{
"name": "acct_num",
"required": "false",
"type": "string"
},
{
"name": "account_var",
"required": "false",
"type": "string"
}
]
},
{
"keys": [
".message.xqo.cust_num"
],
"name": "customer"
},
{
"keys": [
".message.account.acct_num"
],
"name": "RuleGenerationAccount",
"variables": [
{
"name": "j",
"required": "false",
"type": "number"
},
{
"name": "k",
"required": "false",
"type": "number"
},
{
"name": "i",
"required": "false",
"type": "number"
}
]
}
]
}
The following is an example response to a request to /detection/description/
{
"message": {
"sas": {
"system": {
"returnDesc": "IODE",
"returnDetails": "Reason Code [IODE]: (Describe.) The deployment package could not be described. The follow error occurred: [No step found for stepid: <invalid_description_type>, module decision.].",
"returnType": 12
}
}
}
}
The following is an example response to a request to /detection/decision/description and to a specific further endpoint that does not exist
{
"version": 2,
"httpStatusCode": 404,
"message": "There is no handler defined for the path \"/detection/decision/description/rules432\".",
"details": [
"path: /detection/decision/description/rules432",
"correlator: a08e5824-af7f-4753-948f-62ac56eb2e1c"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Decision profile is returned. | describeProfileObject |
400 | Bad Request | Bad request | errorResponse |
404 | Not Found | Not found | errorResponse |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | The media type for the response |
Description of the Alert Types within a Decision That Resides in the Same SAS Container Runtime Pod
Code samples
# You can also use wget
curl -X GET http://mock-detection.apifirst.unx.sas.com/detection/decision/description/alertTypes \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/json'
const headers = {
'Accept':'application/json'
};
fetch('http://mock-detection.apifirst.unx.sas.com/detection/decision/description/alertTypes',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('http://mock-detection.apifirst.unx.sas.com/detection/decision/description/alertTypes', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-detection.apifirst.unx.sas.com/detection/decision/description/alertTypes", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /decision/description/alertTypes
Returns a description of the alert types in a decision that resides in the same SAS Container Runtime pod.
Example responses
The following is an example of a description of the alert types in a deployed module.
{
"alertTypes": [
{
"code": "A",
"path": ".message.aqo.acct_num"
},
{
"code": "Acct_Alert_Type",
"path": ".message.account.account_var1"
},
{
"code": "C",
"path": ".message.hqo.card_num"
},
{
"code": "S",
"path": ".message.rrr.action_info"
},
{
"code": "X",
"path": ".message.xqo.cust_num"
},
{
"code": "Z",
"path": ".message.hqo.card_num"
}
]
}
The following is an example response to a request to /detection/description/
{
"message": {
"sas": {
"system": {
"returnDesc": "IODE",
"returnDetails": "Reason Code [IODE]: (Describe.) The deployment package could not be described. The follow error occurred: [No step found for stepid: <invalid_description_type>, module decision.].",
"returnType": 12
}
}
}
}
The following is an example response to a request to /detection/decision/description and to a specific further endpoint that does not exist
{
"version": 2,
"httpStatusCode": 404,
"message": "There is no handler defined for the path \"/detection/decision/description/rules432\".",
"details": [
"path: /detection/decision/description/rules432",
"correlator: a08e5824-af7f-4753-948f-62ac56eb2e1c"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Decision alert types are returned. | describeAlertTypesObject |
400 | Bad Request | Bad request | errorResponse |
404 | Not Found | Not found | errorResponse |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | The media type for the response |
Description of the Message Classifications within a Decision That Resides in the Same SAS Container Runtime Pod
Code samples
# You can also use wget
curl -X GET http://mock-detection.apifirst.unx.sas.com/detection/decision/description/messageClassifications \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/json'
const headers = {
'Accept':'application/json'
};
fetch('http://mock-detection.apifirst.unx.sas.com/detection/decision/description/messageClassifications',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('http://mock-detection.apifirst.unx.sas.com/detection/decision/description/messageClassifications', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-detection.apifirst.unx.sas.com/detection/decision/description/messageClassifications", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /decision/description/messageClassifications
Returns a description of the message classifications in a decision that resides in the same SAS Container Runtime pod.
Example responses
The following is an example of a description of the message classifications in a deployed module.
{
"organizationalUnits": [
{
"id": "57c029c7-9b8b-11ed-b988-2adf4d2e942a",
"keyCode": "AA",
"name": "Bank_A"
},
{
"id": "57c02a30-9b8b-11ed-b988-2adf4d2e942a",
"keyCode": "AAA",
"name": "North_America"
},
{
"id": "57c02a3c-9b8b-11ed-b988-2adf4d2e942a",
"keyCode": "AAB",
"name": "Europe"
}
]
}
The following is an example response to a request to /detection/description/
{
"message": {
"sas": {
"system": {
"returnDesc": "IODE",
"returnDetails": "Reason Code [IODE]: (Describe.) The deployment package could not be described. The follow error occurred: [No step found for stepid: <invalid_description_type>, module decision.].",
"returnType": 12
}
}
}
}
The following is an example response to a request to /detection/decision/description and to a specific further endpoint that does not exist
{
"version": 2,
"httpStatusCode": 404,
"message": "There is no handler defined for the path \"/detection/decision/description/rules432\".",
"details": [
"path: /detection/decision/description/rules432",
"correlator: a08e5824-af7f-4753-948f-62ac56eb2e1c"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Decision message classifications are returned. | describeMessageClassificationsObject |
400 | Bad Request | Bad request | errorResponse |
404 | Not Found | Not found | errorResponse |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | The media type for the response |
Description of the Models within a Decision That Resides in the Same SAS Container Runtime Pod
Code samples
# You can also use wget
curl -X GET http://mock-detection.apifirst.unx.sas.com/detection/decision/description/models \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/json'
const headers = {
'Accept':'application/json'
};
fetch('http://mock-detection.apifirst.unx.sas.com/detection/decision/description/models',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('http://mock-detection.apifirst.unx.sas.com/detection/decision/description/models', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-detection.apifirst.unx.sas.com/detection/decision/description/models", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /decision/description/models
Returns a description of the models in a decision that resides in the same SAS Container Runtime pod.
Example responses
The following is an example of a description of the models in a deployed module.
{
"models": []
}
The following is an example response to a request to /detection/description/
{
"message": {
"sas": {
"system": {
"returnDesc": "IODE",
"returnDetails": "Reason Code [IODE]: (Describe.) The deployment package could not be described. The follow error occurred: [No step found for stepid: <invalid_description_type>, module decision.].",
"returnType": 12
}
}
}
}
The following is an example response to a request to /detection/decision/description and to a specific further endpoint that does not exist
{
"version": 2,
"httpStatusCode": 404,
"message": "There is no handler defined for the path \"/detection/decision/description/rules432\".",
"details": [
"path: /detection/decision/description/rules432",
"correlator: a08e5824-af7f-4753-948f-62ac56eb2e1c"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Decision models are returned. | describeModelsObject |
400 | Bad Request | Bad request | errorResponse |
404 | Not Found | Not found | errorResponse |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | The media type for the response |
Get the Name of the Decision that Resides in the same SAS Container Runtime Pod
Code samples
# You can also use wget
curl -X GET http://mock-detection.apifirst.unx.sas.com/detection/decision \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/json'
const headers = {
'Accept':'application/json'
};
fetch('http://mock-detection.apifirst.unx.sas.com/detection/decision',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('http://mock-detection.apifirst.unx.sas.com/detection/decision', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-detection.apifirst.unx.sas.com/detection/decision", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /decision
Gets the name of the decision that resides in the same SAS Container Runtime pod.
Example responses
The following is an example of a deployed decision information response.
{
"message": {
"sas": {
"system": {
"returnDetails": "Valid deployment module [ AP ]."
}
}
}
}
Here is an example of a bad request error response on a PUT request to create an object type. In this example the body did not include a name for the object type.
{
"errorCode": 1177,
"message": "The objectType was not valid.",
"details": [
"traceId: 4d148b871720c018",
"path: /types/types/testtype",
"FieldError: name: Must not be null."
],
"links": [],
"version": 2,
"httpStatusCode": 400
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful retrieval of the decision name. | decisionObject |
404 | Not Found | Not found | errorResponse |
Health
Health status of dependent resources.
Get Health of Components
Code samples
# You can also use wget
curl -X GET http://mock-detection.apifirst.unx.sas.com/detection/health \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/json'
const headers = {
'Accept':'application/json'
};
fetch('http://mock-detection.apifirst.unx.sas.com/detection/health',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('http://mock-detection.apifirst.unx.sas.com/detection/health', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-detection.apifirst.unx.sas.com/detection/health", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /health
Returns the health of components.
Example responses
The following is an example of a health check response.
{
"message": {
"Message": "Health check complete."
},
"errorCode": 0,
"readiness": {
"message": "Readiness passed."
}
}
Here is an example of a bad request error response on a PUT request to create an object type. In this example the body did not include a name for the object type.
{
"errorCode": 1177,
"message": "The objectType was not valid.",
"details": [
"traceId: 4d148b871720c018",
"path: /types/types/testtype",
"FieldError: name: Must not be null."
],
"links": [],
"version": 2,
"httpStatusCode": 400
}
{
"errorCode": 1177,
"message": "The objectType was not valid.",
"details": [
"traceId: 4d148b871720c018",
"path: /types/types/testtype",
"FieldError: name: Must not be null."
],
"links": [],
"version": 2,
"httpStatusCode": 400
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful retrieval of health endpoint. | healthObject |
400 | Bad Request | Bad request | errorResponse |
404 | Not Found | Not found | errorResponse |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | No description |
Get SAS Detection Engine Readiness
Code samples
# You can also use wget
curl -X GET http://mock-detection.apifirst.unx.sas.com/detection/ready
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('http://mock-detection.apifirst.unx.sas.com/detection/ready',
{
method: 'GET'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.get('http://mock-detection.apifirst.unx.sas.com/detection/ready')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-detection.apifirst.unx.sas.com/detection/ready", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /ready
Used internally to determine whether the SAS Detection Engine is ready to receive transactions.
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | SAS Detection Engine is ready to receive transactions. | None |
500 | Internal Server Error | SAS Detection Engine is not yet ready to receive transactions. | None |
Metrics
The metrics gathered with Prometheus.
Get Prometheus Metrics
Code samples
# You can also use wget
curl -X GET http://mock-detection.apifirst.unx.sas.com/detection/metrics \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: text/plain'
const headers = {
'Accept':'text/plain'
};
fetch('http://mock-detection.apifirst.unx.sas.com/detection/metrics',
{
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('http://mock-detection.apifirst.unx.sas.com/detection/metrics', 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", "http://mock-detection.apifirst.unx.sas.com/detection/metrics", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /metrics
Gets Prometheus metrics.
Example responses
200 Response
"sas_detection_scr_execute_milliseconds_bucket{deployment_pkg_id=\"Viya R11\",status=\"Success\",le=\"1\"} 0 sas_detection_scr_execute_milliseconds_bucket{deployment_pkg_id=\"Viya R11\",status=\"Success\",le=\"2\"} 0 sas_detection_scr_execute_milliseconds_bucket{deployment_pkg_id=\"Viya R11\",status=\"Success\",le=\"3\"} 0 sas_detection_scr_execute_milliseconds_bucket{deployment_pkg_id=\"Viya R11\",status=\"Success\",le=\"5\"} 0 sas_detection_scr_execute_milliseconds_bucket{deployment_pkg_id=\"Viya R11\",status=\"Success\",le=\"10\"} 0 sas_detection_scr_execute_milliseconds_bucket{deployment_pkg_id=\"Viya R11\",status=\"Success\",le=\"20\"} 9"
Here is an example of a bad request error response on a PUT request to create an object type. In this example the body did not include a name for the object type.
{
"errorCode": 1177,
"message": "The objectType was not valid.",
"details": [
"traceId: 4d148b871720c018",
"path: /types/types/testtype",
"FieldError: name: Must not be null."
],
"links": [],
"version": 2,
"httpStatusCode": 400
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful retrieval of Prometheus metrics. | None |
404 | Not Found | Not found | errorResponse |
Response Schema
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | The media type of the response collection. | |
200 | Last-Modified | string | The time this object was last modified. | |
200 | Etag | string | An tag that identifies this revision of this object. |
RuleMetrics
The rule metrics stored in Redis.
Get the Rule Metrics for the Decision That Resides in the Same SAS Container Runtime Pod
Code samples
# You can also use wget
curl -X GET http://mock-detection.apifirst.unx.sas.com/detection/decision/rulemetrics \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/json'
const headers = {
'Accept':'application/json'
};
fetch('http://mock-detection.apifirst.unx.sas.com/detection/decision/rulemetrics',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('http://mock-detection.apifirst.unx.sas.com/detection/decision/rulemetrics', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-detection.apifirst.unx.sas.com/detection/decision/rulemetrics", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /decision/rulemetrics
Gets the rule metrics for the decision that resides in the same SAS Container Runtime pod.
Example responses
The following is an example of a GET rulemetrics response.
{
"total": {
"metrics": [
{
"alertFired": 0,
"outcomeFired": 0,
"evaluated": 345,
"overtime": 5,
"referenceIdentifier": "50002.1"
},
{
"alertFired": 0,
"outcomeFired": 0,
"evaluated": 345,
"overtime": 0,
"referenceIdentifier": "50004.1"
}
]
},
"today": {
"metrics": [
{
"alertFired": 0,
"outcomeFired": 0,
"evaluated": 345,
"overtime": 0,
"referenceIdentifier": "50004.1"
},
{
"alertFired": 0,
"outcomeFired": 0,
"evaluated": 345,
"overtime": 5,
"referenceIdentifier": "50002.1"
}
]
},
"today-1": {
"metrics": null
},
"today-2": {
"metrics": null
},
"today-3": {
"metrics": null
},
"today-4": {
"metrics": null
},
"today-5": {
"metrics": null
},
"today-6": {
"metrics": null
}
}
Here is an example of a bad request error response on a PUT request to create an object type. In this example the body did not include a name for the object type.
{
"errorCode": 1177,
"message": "The objectType was not valid.",
"details": [
"traceId: 4d148b871720c018",
"path: /types/types/testtype",
"FieldError: name: Must not be null."
],
"links": [],
"version": 2,
"httpStatusCode": 400
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful retrieval of the rule metrics. | ruleMetrics |
404 | Not Found | Not found | errorResponse |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | The media type of the response collection. | |
200 | Last-Modified | string | The time this object was last modified. | |
200 | Etag | string | An tag that identifies this revision of this object. |
Validate
Validates the message.
Validate the Provided Information
Code samples
# You can also use wget
curl -X POST http://mock-detection.apifirst.unx.sas.com/detection/decision/validate \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.detection.message.schema_name+ion' \
-H 'Accept: application/json'
const inputBody = '{}';
const headers = {
'Content-Type':'application/vnd.sas.detection.message.schema_name+ion',
'Accept':'application/json'
};
fetch('http://mock-detection.apifirst.unx.sas.com/detection/decision/validate',
{
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.detection.message.schema_name+ion',
'Accept': 'application/json'
}
r = requests.post('http://mock-detection.apifirst.unx.sas.com/detection/decision/validate', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.detection.message.schema_name+ion"},
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-detection.apifirst.unx.sas.com/detection/decision/validate", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /decision/validate
Validates the provided information.
Body parameter
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | object | true | ION binary format data, representing customer data, that will be augmented with results of running a decision. |
Example responses
The following is an example of a validation failure.
{
"validationMessage": "Validation failed",
"failureReasons": [
"MVST",
"UVST"
],
"ServerData": {
"message": {
"sas": {
"system": {
"returnDetails": {
"validate": [
[
".message.request",
"variableset",
"missing",
""
],
[
".message.smh",
"variableset",
"unexpected",
""
]
]
},
"returnType": 0
}
}
}
}
}
{
"validationMessage": "Validation failed",
"failureReasons": [
"MVST",
"UVST"
],
"ServerData": {
"message": {
"sas": {
"system": {
"returnDetails": {
"validate": [
[
".message.request",
"variableset",
"missing",
""
],
[
".message.smh",
"variableset",
"unexpected",
""
]
]
},
"returnType": 0
}
}
}
}
}
Here is an example of a bad request error response on a PUT request to create an object type. In this example the body did not include a name for the object type.
{
"errorCode": 1177,
"message": "The objectType was not valid.",
"details": [
"traceId: 4d148b871720c018",
"path: /types/types/testtype",
"FieldError: name: Must not be null."
],
"links": [],
"version": 2,
"httpStatusCode": 400
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Validation was successful. | validation |
400 | Bad Request | There was an error that caused validation to fail. | validationFailureCause |
404 | Not Found | Not found | errorResponse |
Generate
Generates various formats from a variety of inputs.
Generate a Binary ION Message from a Textual ION Message Representation
Code samples
# You can also use wget
curl -X POST http://mock-detection.apifirst.unx.sas.com/detection/generate/binaryION \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: text/plain' \
-H 'Accept: application/octet-stream'
const inputBody = '{}';
const headers = {
'Content-Type':'text/plain',
'Accept':'application/octet-stream'
};
fetch('http://mock-detection.apifirst.unx.sas.com/detection/generate/binaryION',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'text/plain',
'Accept': 'application/octet-stream'
}
r = requests.post('http://mock-detection.apifirst.unx.sas.com/detection/generate/binaryION', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"text/plain"},
"Accept": []string{"application/octet-stream"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-detection.apifirst.unx.sas.com/detection/generate/binaryION", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /generate/binaryION
Generates a binary ION message from a textual ION message representation.
Body parameter
{}
Example responses
200 Response
Here is an example of a bad request error response on a PUT request to create an object type. In this example the body did not include a name for the object type.
{
"errorCode": 1177,
"message": "The objectType was not valid.",
"details": [
"traceId: 4d148b871720c018",
"path: /types/types/testtype",
"FieldError: name: Must not be null."
],
"links": [],
"version": 2,
"httpStatusCode": 400
}
{
"errorCode": 1177,
"message": "The objectType was not valid.",
"details": [
"traceId: 4d148b871720c018",
"path: /types/types/testtype",
"FieldError: name: Must not be null."
],
"links": [],
"version": 2,
"httpStatusCode": 400
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful generation of a binary ION message. | string |
400 | Bad Request | Bad request | errorResponse |
404 | Not Found | Not found | errorResponse |
Generate a Text ION Message from a Binary ION Message Representation
Code samples
# You can also use wget
curl -X POST http://mock-detection.apifirst.unx.sas.com/detection/generate/textION \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.detection.message+ion' \
-H 'Accept: text/plain'
const inputBody = '{}';
const headers = {
'Content-Type':'application/vnd.sas.detection.message+ion',
'Accept':'text/plain'
};
fetch('http://mock-detection.apifirst.unx.sas.com/detection/generate/textION',
{
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.detection.message+ion',
'Accept': 'text/plain'
}
r = requests.post('http://mock-detection.apifirst.unx.sas.com/detection/generate/textION', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.detection.message+ion"},
"Accept": []string{"text/plain"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-detection.apifirst.unx.sas.com/detection/generate/textION", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /generate/textION
Generates a text ION message from a binary ION message representation.
Body parameter
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | object | true | ION binary format |
Example responses
200 Response
"{SMH:{smh_acct_type:'CC',smh_activity_detail1:'NAP',smh_activity_detail2:'NAP',smh_activity_detail3:'NAP',smh_activity_type:'CA',smh_authenticate_mtd:'CD'}}"
Here is an example of a bad request error response on a PUT request to create an object type. In this example the body did not include a name for the object type.
{
"errorCode": 1177,
"message": "The objectType was not valid.",
"details": [
"traceId: 4d148b871720c018",
"path: /types/types/testtype",
"FieldError: name: Must not be null."
],
"links": [],
"version": 2,
"httpStatusCode": 400
}
{
"errorCode": 1177,
"message": "The objectType was not valid.",
"details": [
"traceId: 4d148b871720c018",
"path: /types/types/testtype",
"FieldError: name: Must not be null."
],
"links": [],
"version": 2,
"httpStatusCode": 400
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful generation of a text ION message. | None |
400 | Bad Request | Bad request | errorResponse |
404 | Not Found | Not found | errorResponse |
Response Schema
Generate a JSON Body that SCR/execute Expects from a Binary ION Message Representation
Code samples
# You can also use wget
curl -X POST http://mock-detection.apifirst.unx.sas.com/detection/generate/executeFromION \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: text/plain' \
-H 'Accept: application/json'
const inputBody = '{}';
const headers = {
'Content-Type':'text/plain',
'Accept':'application/json'
};
fetch('http://mock-detection.apifirst.unx.sas.com/detection/generate/executeFromION',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'text/plain',
'Accept': 'application/json'
}
r = requests.post('http://mock-detection.apifirst.unx.sas.com/detection/generate/executeFromION', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"text/plain"},
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-detection.apifirst.unx.sas.com/detection/generate/executeFromION", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /generate/executeFromION
Generates a JSON body that SCR/execute expects from a binary ION message representation.
Body parameter
{}
Example responses
The following is an example of an execute from ion request.
{
"inputs": [
{
"encoding": "b64",
"name": "inputTransaction",
"value": "4AEA6u7vgYPe64e+6INTTUiKc21oX3NjaGVtYY6Sc21oX211bHRpX29yZ19uYW1ljpFzbWhfdHJhbl9kYXRldGltZYNBUU+MYXFvX2FjY3RfbnVtg0hRT4xocW9fY2FyZF9udW2DVENOi3Rjbl9tb2RfYW103q6K3pSLhUNhcmRzjIJBRo1ngA/miYSKno7Xj4VTbWl0aJDWkYRKb2huktSTUsIf"
}
]
}
Here is an example of a bad request error response on a PUT request to create an object type. In this example the body did not include a name for the object type.
{
"errorCode": 1177,
"message": "The objectType was not valid.",
"details": [
"traceId: 4d148b871720c018",
"path: /types/types/testtype",
"FieldError: name: Must not be null."
],
"links": [],
"version": 2,
"httpStatusCode": 400
}
{
"errorCode": 1177,
"message": "The objectType was not valid.",
"details": [
"traceId: 4d148b871720c018",
"path: /types/types/testtype",
"FieldError: name: Must not be null."
],
"links": [],
"version": 2,
"httpStatusCode": 400
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful generation of a JSON body expected by SCR/execute. | executeFromION |
400 | Bad Request | Bad request | errorResponse |
404 | Not Found | Not found | errorResponse |
Verbose
Gets and sets the verboseness level for a given deployment package.
Get the Current Verboseness Level for the Decision That Resides in the Same SAS Container Runtime Pod
Code samples
# You can also use wget
curl -X GET http://mock-detection.apifirst.unx.sas.com/detection/decision/getverbose \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/json'
const headers = {
'Accept':'application/json'
};
fetch('http://mock-detection.apifirst.unx.sas.com/detection/decision/getverbose',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('http://mock-detection.apifirst.unx.sas.com/detection/decision/getverbose', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-detection.apifirst.unx.sas.com/detection/decision/getverbose", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /decision/getverbose
Gets the current verboseness level for the decision that resides in the same SAS Container Runtime pod.
Example responses
The following is an example of a GET verbose response.
{
"name": "verbose",
"level": 13
}
Here is an example of a bad request error response on a PUT request to create an object type. In this example the body did not include a name for the object type.
{
"errorCode": 1177,
"message": "The objectType was not valid.",
"details": [
"traceId: 4d148b871720c018",
"path: /types/types/testtype",
"FieldError: name: Must not be null."
],
"links": [],
"version": 2,
"httpStatusCode": 400
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Current verboseness level. | getverbose |
404 | Not Found | Not found | errorResponse |
Set the Current Verboseness Level for the Decision That Resides in the Same SAS Container Runtime Pod
Code samples
# You can also use wget
curl -X GET http://mock-detection.apifirst.unx.sas.com/detection/decision/setverbose?level=string \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/json'
const headers = {
'Accept':'application/json'
};
fetch('http://mock-detection.apifirst.unx.sas.com/detection/decision/setverbose?level=string',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('http://mock-detection.apifirst.unx.sas.com/detection/decision/setverbose', params={
'level': 'string'
}, headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-detection.apifirst.unx.sas.com/detection/decision/setverbose", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /decision/setverbose
Sets the current verboseness level for the decision that resides in the same SAS Container Runtime pod.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
level | query | string | true | The verboseness level to set. |
Example responses
The following is an example of a set verbose response.
{
"name": "verbose",
"oldLevel": 0,
"newLevel": 13,
"status": "changed"
}
Here is an example of a bad request error response on a PUT request to create an object type. In this example the body did not include a name for the object type.
{
"errorCode": 1177,
"message": "The objectType was not valid.",
"details": [
"traceId: 4d148b871720c018",
"path: /types/types/testtype",
"FieldError: name: Must not be null."
],
"links": [],
"version": 2,
"httpStatusCode": 400
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Echoes current verboseness level. | setverbose |
404 | Not Found | Not found | errorResponse |
Settings
The settings for the SAS Detection Engine environment.
Get SAS Detection Engine Environment Variable Settings
Code samples
# You can also use wget
curl -X GET http://mock-detection.apifirst.unx.sas.com/detection/settings \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/json'
const headers = {
'Accept':'application/json'
};
fetch('http://mock-detection.apifirst.unx.sas.com/detection/settings',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('http://mock-detection.apifirst.unx.sas.com/detection/settings', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-detection.apifirst.unx.sas.com/detection/settings", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /settings
Gets the SAS Detection Engine environment variable settings.
Example responses
The following is an example of a GET settings response.
{
"DetectionProcessing": {
"ExecutionURL": {
"EnvironmentVariable": "SAS_DETECTION_PROCESSING_EXECUTION_URL",
"Value": "https://suhens.ingress-nginx.sda-scr-m1.vch.sashq-d.openstack.sas.com/",
"PropertyFoundInThisEnvironment": true
},
"SLA": {
"EnvironmentVariable": "SAS_DETECTION_PROCESSING_SLA",
"Value": "1185",
"PropertyFoundInThisEnvironment": true
},
"DisableSchemaValidation": {
"EnvironmentVariable": "",
"Value": "",
"PropertyFoundInThisEnvironment": false
},
"Verbose": {
"EnvironmentVariable": "SAS_DETECTION_PROCESSING_SETVERBOSE",
"Value": "",
"PropertyFoundInThisEnvironment": false
},
"DisableMetrics": {
"EnvironmentVariable": "SAS_DETECTION_PROCESSING_DISABLEMETRICS",
"Value": "",
"PropertyFoundInThisEnvironment": false
},
"OutputSegments": {
"EnvironmentVariable": "SAS_DETECTION_PROCESSING_OUTPUT_FILTER",
"Value": "",
"PropertyFoundInThisEnvironment": false
}
},
"EnvironmentSettings": {
"SASDetectionServiceURL": {
"EnvironmentVariable": "SAS_DETECTION_SERVICE_URL",
"Value": "",
"PropertyFoundInThisEnvironment": false
},
"SASTlsSkipVerify": {
"EnvironmentVariable": "SAS_TLS_SKIP_VERIFY",
"Value": "true",
"PropertyFoundInThisEnvironment": true
}
},
"KafkaSettings": {
"KafkaServer": {
"EnvironmentVariable": "SAS_DETECTION_KAFKA_SERVER",
"Value": "ingress-nginx.sda-scr-m1.vch.sashq-d.openstack.sas.com:32100",
"PropertyFoundInThisEnvironment": true
},
"ConsumerEnabled": {
"EnvironmentVariable": "SAS_DETECTION_KAFKA_CONSUMER_ENABLED",
"Value": "true",
"PropertyFoundInThisEnvironment": true
},
"TdrTopic": {
"EnvironmentVariable": "SAS_DETECTION_KAFKA_TDR_TOPIC",
"Value": "SFH-local-transaction-detection-repository",
"PropertyFoundInThisEnvironment": true
},
"IncomingTopic": {
"EnvironmentVariable": "SAS_DETECTION_KAFKA_TOPIC",
"Value": "SFH-local-input-transactions",
"PropertyFoundInThisEnvironment": true
},
"RejectTopic": {
"EnvironmentVariable": "SAS_DETECTION_KAFKA_REJECTTOPIC",
"Value": "SFH-local-transaction-reject",
"PropertyFoundInThisEnvironment": true
}
},
"RedisSettings": {
"RedisServer": {
"EnvironmentVariable": "SAS_DETECTION_REDIS_STANDALONE_REDISSERVICEADDRESS",
"Value": "d26737.ingress-nginx.sda-scr-m1.vch.sashq-d.openstack.sas.com:31891",
"PropertyFoundInThisEnvironment": true
}
},
"DockerSettings": {
"DockerUsername": {
"EnvironmentVariable": "SAS_DETECTION_DOCKER_USERNAME",
"Value": "username",
"PropertyFoundInThisEnvironment": true
},
"DockerPassword": {
"EnvironmentVariable": "SAS_DETECTION_DOCKER_PASSWORD",
"Value": "*****",
"PropertyFoundInThisEnvironment": true
}
}
}
Here is an example of a bad request error response on a PUT request to create an object type. In this example the body did not include a name for the object type.
{
"errorCode": 1177,
"message": "The objectType was not valid.",
"details": [
"traceId: 4d148b871720c018",
"path: /types/types/testtype",
"FieldError: name: Must not be null."
],
"links": [],
"version": 2,
"httpStatusCode": 400
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful retrieval of SAS Detection Engine environment settings. | settings |
404 | Not Found | Not found | errorResponse |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | The media type of the response collection. | |
200 | Last-Modified | string | The time this object was last modified. | |
200 | Etag | string | An tag that identifies this revision of this object. |
Restart
Enables you to restart the Kubernetes SAS Container Runtime pod via a REST call.
Restarts All Replicas in the SAS Container Runtime Deployment from the Pod
Code samples
# You can also use wget
curl -X PATCH http://mock-detection.apifirst.unx.sas.com/detection/restart \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/json'
const headers = {
'Accept':'application/json'
};
fetch('http://mock-detection.apifirst.unx.sas.com/detection/restart',
{
method: 'PATCH',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.patch('http://mock-detection.apifirst.unx.sas.com/detection/restart', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PATCH", "http://mock-detection.apifirst.unx.sas.com/detection/restart", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PATCH /restart
Restarts all replicas in the SAS Container Runtime deployment from the pod.
1. Open a terminal, such as Git BASH.
2. Enable the ServiceAccount permissions on the cluster:
export KUBECONFIG=admin.conf
kubectl create clusterrolebinding serviceaccounts-cluster-admin-myuser --clusterrole=cluster-admin --group=system:serviceaccounts
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
version | query | string | false | The semantic version of the desired SAS Container Runtime container image. |
Example responses
The following is an example of a successful request to restart the SAS Container Runtime pod.
"Successfully restarted 1 replicas in prometheus-pushgateway namespace."
The following is an example response to a bad request to /detection/restart that includes the unrecognized parameter "badParam".
{
"version": 2,
"httpStatusCode": 400,
"message": "The restart request contained an unrecognized parameter: badParam.",
"details": [
{
"path": "/detection/restart"
},
{
"correlator": "30d01b9f-b608-4ea3-b917-dfde6be4b972"
}
]
}
The following is an example response to a request to /detection/restart that asks for a SAS Container Runtime container version that is not available in the repository.
{
"version": 2,
"httpStatusCode": 404,
"message": "Version [badVersion] does not exist in the repository for SAS Container Runtime image registry.unx.sas.com/fraudmgmt/performance.",
"details": [
{
"path": "/detection/restart,"
},
{
"correlator": "dcb16c64-f1f6-4cdb-8fda-0f737124aeb8"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful restart of all replicas in the SAS Container Runtime deployment. | string |
400 | Bad Request | Bad request | errorResponse |
404 | Not Found | Not found | errorResponse |
Stats
Statistics relative to the running system.
Get a List of All Prometheus Statistics Relevant to the SAS Detection Engine
Code samples
# You can also use wget
curl -X GET http://mock-detection.apifirst.unx.sas.com/detection/stats \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/json'
const headers = {
'Accept':'application/json'
};
fetch('http://mock-detection.apifirst.unx.sas.com/detection/stats',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('http://mock-detection.apifirst.unx.sas.com/detection/stats', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-detection.apifirst.unx.sas.com/detection/stats", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /stats
Gets a list of all Prometheus statistics that are relevant to the SAS Detection Engine.
Example responses
The following is an example of a validation failure.
{
"MetricMap": {
"sas_detection_alerted_decision": {
"Name": "sas_detection_alerted_decision",
"Count": 9
},
"sas_detection_decisioning_processTxn_milliseconds": {
"Name": "sas_detection_decisioning_processTxn_milliseconds",
"Count": 23,
"sum": 430,
"avg": 18.696
},
"sas_detection_decisioning_tx_milliseconds": {
"Name": "sas_detection_decisioning_tx_milliseconds",
"Count": 23,
"sum": 418,
"avg": 18.174
},
"sas_detection_declined_decision": {
"Name": "sas_detection_declined_decision",
"Count": 1
},
"sas_detection_just_mas_describe_milliseconds": {
"Name": "sas_detection_just_mas_describe_milliseconds",
"Count": 2,
"sum": 319,
"avg": 159.5
},
"sas_detection_just_mas_execute_milliseconds": {
"Name": "sas_detection_just_mas_execute_milliseconds",
"Count": 23,
"sum": 364,
"avg": 15.826
},
"sas_detection_kafka_queue_add": {
"Name": "sas_detection_kafka_queue_add",
"Count": 23
},
"sas_detection_mas_describe_milliseconds": {
"Name": "sas_detection_mas_describe_milliseconds",
"Count": 2,
"sum": 325,
"avg": 162.5
},
"sas_detection_negative_decision": {
"Name": "sas_detection_negative_decision",
"Count": 6
},
"sas_detection_redis_rule_metrics_milliseconds": {
"Name": "sas_detection_redis_rule_metrics_milliseconds",
"Count": 23,
"sum": 58,
"avg": 2.522
},
"sas_detection_redis_use_milliseconds": {
"Name": "sas_detection_redis_use_milliseconds",
"Count": 69,
"sum": 130,
"avg": 1.884
},
"sas_detection_response": {
"Name": "sas_detection_response",
"Count": 23
},
"sas_detection_response_milliseconds": {
"Name": "sas_detection_response_milliseconds",
"Count": 1,
"sum": 46,
"avg": 46
},
"sas_detection_rfi_alertFired": {
"Name": "sas_detection_rfi_alertFired",
"Count": 9
},
"sas_detection_rfi_outcomeFired": {
"Name": "sas_detection_rfi_outcomeFired",
"Count": 6
},
"sas_detection_rre_evaluated": {
"Name": "sas_detection_rre_evaluated",
"Count": 46
},
"sas_detection_sas_score_mehfetch_milliseconds": {
"Name": "sas_detection_sas_score_mehfetch_milliseconds",
"Count": 23,
"sum": 32.101,
"avg": 1.396
},
"sas_detection_sas_score_mehupdate_milliseconds": {
"Name": "sas_detection_sas_score_mehupdate_milliseconds",
"Count": 23,
"sum": 11.288,
"avg": 0.491
},
"sas_detection_sas_score_model_milliseconds": {
"Name": "sas_detection_sas_score_model_milliseconds",
"Count": 23,
"sum": 0.181,
"avg": 0.008
},
"sas_detection_sas_score_post_milliseconds": {
"Name": "sas_detection_sas_score_post_milliseconds",
"Count": 23
},
"sas_detection_sas_score_prep_milliseconds": {
"Name": "sas_detection_sas_score_prep_milliseconds",
"Count": 23,
"sum": 9.269,
"avg": 0.403
},
"sas_detection_sas_score_rules_milliseconds": {
"Name": "sas_detection_sas_score_rules_milliseconds",
"Count": 23,
"sum": 0.787,
"avg": 0.034
},
"sas_detection_sas_score_total_milliseconds": {
"Name": "sas_detection_sas_score_total_milliseconds",
"Count": 23
},
"sas_detection_scr_execute": {
"Name": "sas_detection_scr_execute",
"Count": 23
},
"sas_detection_scr_execute_milliseconds": {
"Name": "sas_detection_scr_execute_milliseconds",
"Count": 23,
"sum": 411,
"avg": 17.87
}
}
}
Here is an example of a bad request error response on a PUT request to create an object type. In this example the body did not include a name for the object type.
{
"errorCode": 1177,
"message": "The objectType was not valid.",
"details": [
"traceId: 4d148b871720c018",
"path: /types/types/testtype",
"FieldError: name: Must not be null."
],
"links": [],
"version": 2,
"httpStatusCode": 400
}
{
"errorCode": 1177,
"message": "The objectType was not valid.",
"details": [
"traceId: 4d148b871720c018",
"path: /types/types/testtype",
"FieldError: name: Must not be null."
],
"links": [],
"version": 2,
"httpStatusCode": 400
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | List of all the Prometheus statistics that are relevant to the SAS Detection Engine. | metricmap |
400 | Bad Request | Bad request | errorResponse |
404 | Not Found | Not found | errorResponse |
Get a List of Statistics Relevant to the SAS Detection Engine in a Timeline Format
Code samples
# You can also use wget
curl -X GET http://mock-detection.apifirst.unx.sas.com/detection/stats/timeline \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/json'
const headers = {
'Accept':'application/json'
};
fetch('http://mock-detection.apifirst.unx.sas.com/detection/stats/timeline',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('http://mock-detection.apifirst.unx.sas.com/detection/stats/timeline', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-detection.apifirst.unx.sas.com/detection/stats/timeline", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /stats/timeline
Gets a list of statistics that are relevant to the SAS Detection Engine in a timeline format.
Example responses
The following is an example of a statistics timeline response.
[
{
"1": {
"1_Description": "decision_handler.ExecuteDecision",
"2_MetricMatch": "sas_detection_response_milliseconds",
"3_Count": 2,
"4_Avg": 64,
"5_ChildMap": {
"1": {
"1_Description": "decisionService.ExecuteDecision-Before ProcessTransaction.",
"3_Count": 2,
"4_Avg": 0
},
"2": {
"1_Description": "--Missing level filled in--",
"2_MetricMatch": "----",
"3_Count": 0,
"4_Avg": 0,
"5_ChildMap": {
"1": {
"1_Description": "decision.ProcessTransaction- pt1.",
"2_MetricMatch": "sas_detection_decisioning_processTxn_milliseconds",
"3_Count": 2,
"4_Avg": 0
},
"2": {
"1_Description": "decision.ProcessTransaction- around m.MasExecute.",
"2_MetricMatch": "sas_detection_decisioning_processTxn_milliseconds",
"3_Count": 2,
"4_Avg": 20,
"5_ChildMap": {
"1": {
"1_Description": "masService.MasExecute - pt 1.",
"2_MetricMatch": "sas_detection_mas_execute_milliseconds",
"3_Count": 2,
"4_Avg": 0
},
"2": {
"1_Description": "masService.MasExecute - prep for MAS/execute REST.",
"2_MetricMatch": "sas_detection_mas_execute_milliseconds",
"3_Count": 2,
"4_Avg": 0
},
"3": {
"1_Description": "masService.MasExecute - around REST to SCR/execute.",
"2_MetricMatch": "sas_detection_mas_execute_milliseconds",
"3_Count": 2,
"4_Avg": 18,
"5_ChildMap": {
"02": {
"1_Description": "response.Metadata.elapsed_nanos to ms",
"3_Count": 2,
"4_Avg": 6.321,
"5_ChildMap": {
"01": {
"1_Description": "response.Metadata.elapsed_nanos to ms",
"3_Count": 2,
"4_Avg": 6.321
},
"02": {
"1_Description": "OSE - SASScoreTotal",
"2_MetricMatch": "sas_detection_sas_score_total_milliseconds",
"3_Count": 2,
"4_Avg": 2.671,
"5_ChildMap": {
"01": {
"1_Description": "OSE - SASScorePrep",
"2_MetricMatch": "sas_detection_sas_score_prep_milliseconds",
"3_Count": 2,
"4_Avg": 2.037
},
"02": {
"1_Description": "OSE - SASScoreMEHFetch",
"2_MetricMatch": "sas_detection_sas_score_mehfetch_milliseconds",
"3_Count": 2,
"4_Avg": 0.012
},
"03": {
"1_Description": "OSE - SASScoreModel",
"2_MetricMatch": "sas_detection_sas_score_model_milliseconds",
"3_Count": 2,
"4_Avg": 0.005
},
"04": {
"1_Description": "OSE - SASScoreRules",
"2_MetricMatch": "sas_detection_sas_score_rules_milliseconds",
"3_Count": 2,
"4_Avg": 0.359
},
"05": {
"1_Description": "OSE - SASScoreMEHUpdate",
"2_MetricMatch": "sas_detection_sas_score_mehupdate_milliseconds",
"3_Count": 2,
"4_Avg": 0.005
},
"06": {
"1_Description": "OSE - SASScorePost",
"2_MetricMatch": "sas_detection_sas_score_post_milliseconds",
"3_Count": 2,
"4_Avg": 0.252
}
}
}
}
},
"03": {
"1_Description": "Unaccounted for: timeItTookToRunRESTExecuteCall - response.MetadataGenerated.ElapsedMS",
"3_Count": 2,
"4_Avg": 11.679
}
}
},
"4": {
"1_Description": "masService.MasExecute - get ION as map.",
"2_MetricMatch": "sas_detection_mas_execute_milliseconds",
"3_Count": 2,
"4_Avg": 0
},
"5": {
"1_Description": "masService.MasExecute - last bit.",
"2_MetricMatch": "sas_detection_mas_execute_milliseconds",
"3_Count": 2,
"4_Avg": 0.5
}
}
},
"3": {
"1_Description": "decision.ProcessTransaction- last part.",
"2_MetricMatch": "sas_detection_decisioning_processTxn_milliseconds",
"3_Count": 2,
"4_Avg": 1
}
}
}
}
},
"processTxnCount": 2,
"processTxnSumMilliseconds": 42,
"processTxnThroughput": 47
},
{
"1": {
"1_Description": "decision_handler.ExecuteDecision",
"2_MetricMatch": "sas_detection_response_milliseconds",
"3_Count": 2,
"4_Avg": 151,
"5_ChildMap": {
"1": {
"1_Description": "decisionService.ExecuteDecision-Before ProcessTransaction.",
"3_Count": 2,
"4_Avg": 0
},
"2": {
"1_Description": "--Missing level filled in--",
"2_MetricMatch": "----",
"3_Count": 0,
"4_Avg": 0,
"5_ChildMap": {
"1": {
"1_Description": "decision.ProcessTransaction- pt1.",
"2_MetricMatch": "sas_detection_decisioning_processTxn_milliseconds",
"3_Count": 2,
"4_Avg": 0
},
"2": {
"1_Description": "decision.ProcessTransaction- around m.MasExecute.",
"2_MetricMatch": "sas_detection_decisioning_processTxn_milliseconds",
"3_Count": 2,
"4_Avg": 46.5,
"5_ChildMap": {
"1": {
"1_Description": "masService.MasExecute - pt 1.",
"2_MetricMatch": "sas_detection_mas_execute_milliseconds",
"3_Count": 2,
"4_Avg": 0
},
"2": {
"1_Description": "masService.MasExecute - prep for MAS/execute REST.",
"2_MetricMatch": "sas_detection_mas_execute_milliseconds",
"3_Count": 2,
"4_Avg": 0
},
"3": {
"1_Description": "masService.MasExecute - around REST to SCR/execute.",
"2_MetricMatch": "sas_detection_mas_execute_milliseconds",
"3_Count": 2,
"4_Avg": 38,
"5_ChildMap": {
"02": {
"1_Description": "response.Metadata.elapsed_nanos to ms",
"3_Count": 2,
"4_Avg": 22.821,
"5_ChildMap": {
"01": {
"1_Description": "response.Metadata.elapsed_nanos to ms",
"3_Count": 2,
"4_Avg": 22.821
},
"02": {
"1_Description": "OSE - SASScoreTotal",
"2_MetricMatch": "sas_detection_sas_score_total_milliseconds",
"3_Count": 2,
"4_Avg": 2.47,
"5_ChildMap": {
"01": {
"1_Description": "OSE - SASScorePrep",
"2_MetricMatch": "sas_detection_sas_score_prep_milliseconds",
"3_Count": 2,
"4_Avg": 1.585
},
"02": {
"1_Description": "OSE - SASScoreMEHFetch",
"2_MetricMatch": "sas_detection_sas_score_mehfetch_milliseconds",
"3_Count": 2,
"4_Avg": 0.009
},
"03": {
"1_Description": "OSE - SASScoreModel",
"2_MetricMatch": "sas_detection_sas_score_model_milliseconds",
"3_Count": 2,
"4_Avg": 0.006
},
"04": {
"1_Description": "OSE - SASScoreRules",
"2_MetricMatch": "sas_detection_sas_score_rules_milliseconds",
"3_Count": 2,
"4_Avg": 0.541
},
"05": {
"1_Description": "OSE - SASScoreMEHUpdate",
"2_MetricMatch": "sas_detection_sas_score_mehupdate_milliseconds",
"3_Count": 2,
"4_Avg": 0.006
},
"06": {
"1_Description": "OSE - SASScorePost",
"2_MetricMatch": "sas_detection_sas_score_post_milliseconds",
"3_Count": 2,
"4_Avg": 0.321
}
}
}
}
},
"03": {
"1_Description": "Unaccounted for: timeItTookToRunRESTExecuteCall - response.MetadataGenerated.ElapsedMS",
"3_Count": 2,
"4_Avg": 15.179
}
}
},
"4": {
"1_Description": "masService.MasExecute - get ION as map.",
"2_MetricMatch": "sas_detection_mas_execute_milliseconds",
"3_Count": 2,
"4_Avg": 0.5
},
"5": {
"1_Description": "masService.MasExecute - last bit.",
"2_MetricMatch": "sas_detection_mas_execute_milliseconds",
"3_Count": 2,
"4_Avg": 6.5
}
}
},
"3": {
"1_Description": "decision.ProcessTransaction- last part.",
"2_MetricMatch": "sas_detection_decisioning_processTxn_milliseconds",
"3_Count": 2,
"4_Avg": 2.5
}
}
}
}
},
"processTxnCount": 2,
"processTxnSumMilliseconds": 100,
"processTxnThroughput": 20
},
{
"1": {
"1_Description": "decision_handler.ExecuteDecision",
"2_MetricMatch": "sas_detection_response_milliseconds",
"3_Count": 2,
"4_Avg": 90,
"5_ChildMap": {
"1": {
"1_Description": "decisionService.ExecuteDecision-Before ProcessTransaction.",
"3_Count": 2,
"4_Avg": 0
},
"2": {
"1_Description": "--Missing level filled in--",
"2_MetricMatch": "----",
"3_Count": 0,
"4_Avg": 0,
"5_ChildMap": {
"1": {
"1_Description": "decision.ProcessTransaction- pt1.",
"2_MetricMatch": "sas_detection_decisioning_processTxn_milliseconds",
"3_Count": 2,
"4_Avg": 0
},
"2": {
"1_Description": "decision.ProcessTransaction- around m.MasExecute.",
"2_MetricMatch": "sas_detection_decisioning_processTxn_milliseconds",
"3_Count": 2,
"4_Avg": 18.5,
"5_ChildMap": {
"1": {
"1_Description": "masService.MasExecute - pt 1.",
"2_MetricMatch": "sas_detection_mas_execute_milliseconds",
"3_Count": 2,
"4_Avg": 0
},
"2": {
"1_Description": "masService.MasExecute - prep for MAS/execute REST.",
"2_MetricMatch": "sas_detection_mas_execute_milliseconds",
"3_Count": 2,
"4_Avg": 0
},
"3": {
"1_Description": "masService.MasExecute - around REST to SCR/execute.",
"2_MetricMatch": "sas_detection_mas_execute_milliseconds",
"3_Count": 2,
"4_Avg": 16.5,
"5_ChildMap": {
"02": {
"1_Description": "response.Metadata.elapsed_nanos to ms",
"3_Count": 2,
"4_Avg": 5.6,
"5_ChildMap": {
"01": {
"1_Description": "response.Metadata.elapsed_nanos to ms",
"3_Count": 2,
"4_Avg": 5.6
},
"02": {
"1_Description": "OSE - SASScoreTotal",
"2_MetricMatch": "sas_detection_sas_score_total_milliseconds",
"3_Count": 2,
"4_Avg": 2.402,
"5_ChildMap": {
"01": {
"1_Description": "OSE - SASScorePrep",
"2_MetricMatch": "sas_detection_sas_score_prep_milliseconds",
"3_Count": 2,
"4_Avg": 1.881
},
"02": {
"1_Description": "OSE - SASScoreMEHFetch",
"2_MetricMatch": "sas_detection_sas_score_mehfetch_milliseconds",
"3_Count": 2,
"4_Avg": 0.012
},
"03": {
"1_Description": "OSE - SASScoreModel",
"2_MetricMatch": "sas_detection_sas_score_model_milliseconds",
"3_Count": 2,
"4_Avg": 0.004
},
"04": {
"1_Description": "OSE - SASScoreRules",
"2_MetricMatch": "sas_detection_sas_score_rules_milliseconds",
"3_Count": 2,
"4_Avg": 0.301
},
"05": {
"1_Description": "OSE - SASScoreMEHUpdate",
"2_MetricMatch": "sas_detection_sas_score_mehupdate_milliseconds",
"3_Count": 2,
"4_Avg": 0.006
},
"06": {
"1_Description": "OSE - SASScorePost",
"2_MetricMatch": "sas_detection_sas_score_post_milliseconds",
"3_Count": 2,
"4_Avg": 0.197
}
}
}
}
},
"03": {
"1_Description": "Unaccounted for: timeItTookToRunRESTExecuteCall - response.MetadataGenerated.ElapsedMS",
"3_Count": 2,
"4_Avg": 10.9
}
}
},
"4": {
"1_Description": "masService.MasExecute - get ION as map.",
"2_MetricMatch": "sas_detection_mas_execute_milliseconds",
"3_Count": 2,
"4_Avg": 0
},
"5": {
"1_Description": "masService.MasExecute - last bit.",
"2_MetricMatch": "sas_detection_mas_execute_milliseconds",
"3_Count": 2,
"4_Avg": 0.5
}
}
},
"3": {
"1_Description": "decision.ProcessTransaction- last part.",
"2_MetricMatch": "sas_detection_decisioning_processTxn_milliseconds",
"3_Count": 2,
"4_Avg": 1
}
}
}
}
},
"processTxnCount": 2,
"processTxnSumMilliseconds": 39,
"processTxnThroughput": 51
},
{
"1": {
"1_Description": "decision_handler.ExecuteDecision",
"2_MetricMatch": "sas_detection_response_milliseconds",
"3_Count": 1,
"4_Avg": 297,
"5_ChildMap": {
"1": {
"1_Description": "decisionService.ExecuteDecision-Before ProcessTransaction.",
"3_Count": 1,
"4_Avg": 0
},
"2": {
"1_Description": "--Missing level filled in--",
"2_MetricMatch": "----",
"3_Count": 0,
"4_Avg": 0,
"5_ChildMap": {
"1": {
"1_Description": "decision.ProcessTransaction- pt1.",
"2_MetricMatch": "sas_detection_decisioning_processTxn_milliseconds",
"3_Count": 1,
"4_Avg": 0
},
"2": {
"1_Description": "decision.ProcessTransaction- around m.MasExecute.",
"2_MetricMatch": "sas_detection_decisioning_processTxn_milliseconds",
"3_Count": 1,
"4_Avg": 41,
"5_ChildMap": {
"1": {
"1_Description": "masService.MasExecute - pt 1.",
"2_MetricMatch": "sas_detection_mas_execute_milliseconds",
"3_Count": 1,
"4_Avg": 0
},
"2": {
"1_Description": "masService.MasExecute - prep for MAS/execute REST.",
"2_MetricMatch": "sas_detection_mas_execute_milliseconds",
"3_Count": 1,
"4_Avg": 0
},
"3": {
"1_Description": "masService.MasExecute - around REST to SCR/execute.",
"2_MetricMatch": "sas_detection_mas_execute_milliseconds",
"3_Count": 1,
"4_Avg": 37,
"5_ChildMap": {
"02": {
"1_Description": "response.Metadata.elapsed_nanos to ms",
"3_Count": 1,
"4_Avg": 13.324,
"5_ChildMap": {
"01": {
"1_Description": "response.Metadata.elapsed_nanos to ms",
"3_Count": 1,
"4_Avg": 13.324
},
"02": {
"1_Description": "OSE - SASScoreTotal",
"2_MetricMatch": "sas_detection_sas_score_total_milliseconds",
"3_Count": 1,
"4_Avg": 6.613,
"5_ChildMap": {
"01": {
"1_Description": "OSE - SASScorePrep",
"2_MetricMatch": "sas_detection_sas_score_prep_milliseconds",
"3_Count": 1,
"4_Avg": 3.875
},
"02": {
"1_Description": "OSE - SASScoreMEHFetch",
"2_MetricMatch": "sas_detection_sas_score_mehfetch_milliseconds",
"3_Count": 1,
"4_Avg": 0.014
},
"03": {
"1_Description": "OSE - SASScoreModel",
"2_MetricMatch": "sas_detection_sas_score_model_milliseconds",
"3_Count": 1,
"4_Avg": 0.02
},
"04": {
"1_Description": "OSE - SASScoreRules",
"2_MetricMatch": "sas_detection_sas_score_rules_milliseconds",
"3_Count": 1,
"4_Avg": 2.234
},
"05": {
"1_Description": "OSE - SASScoreMEHUpdate",
"2_MetricMatch": "sas_detection_sas_score_mehupdate_milliseconds",
"3_Count": 1,
"4_Avg": 0.007
},
"06": {
"1_Description": "OSE - SASScorePost",
"2_MetricMatch": "sas_detection_sas_score_post_milliseconds",
"3_Count": 1,
"4_Avg": 0.461
}
}
}
}
},
"03": {
"1_Description": "Unaccounted for: timeItTookToRunRESTExecuteCall - response.MetadataGenerated.ElapsedMS",
"3_Count": 1,
"4_Avg": 22.676
}
}
},
"4": {
"1_Description": "masService.MasExecute - get ION as map.",
"2_MetricMatch": "sas_detection_mas_execute_milliseconds",
"3_Count": 1,
"4_Avg": 1
},
"5": {
"1_Description": "masService.MasExecute - last bit.",
"2_MetricMatch": "sas_detection_mas_execute_milliseconds",
"3_Count": 1,
"4_Avg": 1
}
}
},
"3": {
"1_Description": "decision.ProcessTransaction- last part.",
"2_MetricMatch": "sas_detection_decisioning_processTxn_milliseconds",
"3_Count": 1,
"4_Avg": 1
}
}
}
}
},
"processTxnCount": 1,
"processTxnSumMilliseconds": 42,
"processTxnThroughput": 23
},
{
"processTxnCountTotal": 7,
"processTxnSumMillisecondsTotal": 223,
"processTxnThroughputTotal": 31
}
]
Here is an example of a bad request error response on a PUT request to create an object type. In this example the body did not include a name for the object type.
{
"errorCode": 1177,
"message": "The objectType was not valid.",
"details": [
"traceId: 4d148b871720c018",
"path: /types/types/testtype",
"FieldError: name: Must not be null."
],
"links": [],
"version": 2,
"httpStatusCode": 400
}
{
"errorCode": 1177,
"message": "The objectType was not valid.",
"details": [
"traceId: 4d148b871720c018",
"path: /types/types/testtype",
"FieldError: name: Must not be null."
],
"links": [],
"version": 2,
"httpStatusCode": 400
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | List of statistics that are relevant to the SAS Detection Engine in a timeline format. | statsTimelineCollection |
400 | Bad Request | Bad request | errorResponse |
404 | Not Found | Not found | errorResponse |
Get a List of Data That Is Relevant to the Current Size of the Data in Tools Such as Kafka
Code samples
# You can also use wget
curl -X GET http://mock-detection.apifirst.unx.sas.com/detection/stats/tools \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/json'
const headers = {
'Accept':'application/json'
};
fetch('http://mock-detection.apifirst.unx.sas.com/detection/stats/tools',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('http://mock-detection.apifirst.unx.sas.com/detection/stats/tools', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-detection.apifirst.unx.sas.com/detection/stats/tools", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /stats/tools
Gets a list of data that is relevant to the current size of the data in tools such as Kafka.
Example responses
The following is an example of a tool statistics response.
{
"KafkaLength": 1084,
"KafkaTopic": "transaction-detection-repository"
}
Here is an example of a bad request error response on a PUT request to create an object type. In this example the body did not include a name for the object type.
{
"errorCode": 1177,
"message": "The objectType was not valid.",
"details": [
"traceId: 4d148b871720c018",
"path: /types/types/testtype",
"FieldError: name: Must not be null."
],
"links": [],
"version": 2,
"httpStatusCode": 400
}
{
"errorCode": 1177,
"message": "The objectType was not valid.",
"details": [
"traceId: 4d148b871720c018",
"path: /types/types/testtype",
"FieldError: name: Must not be null."
],
"links": [],
"version": 2,
"httpStatusCode": 400
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | List of data that is relevant to the current size of the data in tools such as Kafka. | toolList |
400 | Bad Request | Bad request | errorResponse |
404 | Not Found | Not found | errorResponse |
Mapping
Used to interact with the mapping from where SAS Detection Engine references message content, to where it is found in the actual ION message. Use this only with the guidance of your administration and technical support.
Get the Current Mapping
Code samples
# You can also use wget
curl -X GET http://mock-detection.apifirst.unx.sas.com/detection/mapping \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/json'
const headers = {
'Accept':'application/json'
};
fetch('http://mock-detection.apifirst.unx.sas.com/detection/mapping',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('http://mock-detection.apifirst.unx.sas.com/detection/mapping', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-detection.apifirst.unx.sas.com/detection/mapping", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /mapping
Gets the current mapping from where SAS Detection Engine references message content, to where it is found in the actual ION message.
Example responses
The following is an example of a mapping response body.
{
"mapping": [
{
"name": ".request.schemaName",
"read": {
"location": ".message.request.schemaName",
"createMissingSegment": false
},
"write": {
"location": ".message.request.schemaName",
"createMissingSegment": false
}
},
{
"name": ".sas.system.packageVersion",
"read": {
"location": ".message.sas.system.packageVersion",
"createMissingSegment": false
},
"write": {
"location": ".message.sas.system.packageVersion",
"createMissingSegment": true
}
},
{
"name": ".request.messageClassificationName",
"read": {
"location": ".message.request.messageClassificationName",
"createMissingSegment": false
},
"write": {
"location": ".message.request.messageClassificationName",
"createMissingSegment": false
}
},
{
"name": ".request.restResponseFlg",
"read": {
"location": ".message.request.restResponseFlg",
"createMissingSegment": false
},
"write": {
"location": "",
"createMissingSegment": false
}
},
{
"name": ".sas.system.returnDetails",
"read": {
"location": ".message.sas.system.returnDetails",
"createMissingSegment": false
},
"write": {
"location": ".message.sas.system.returnDetails",
"createMissingSegment": true
}
},
{
"name": ".sas.system.returnType",
"read": {
"location": ".message.sas.system.returnType",
"createMissingSegment": false
},
"write": {
"location": ".message.sas.system.returnType",
"createMissingSegment": true
}
},
{
"name": ".sas.system.returnDesc",
"read": {
"location": ".message.sas.system.returnDesc",
"createMissingSegment": false
},
"write": {
"location": ".message.sas.system.returnDesc",
"createMissingSegment": true
}
},
{
"name": ".sas.system.transactionIdentifier",
"read": {
"location": ".message.sas.system.transactionIdentifier",
"createMissingSegment": false
},
"write": {
"location": ".message.sas.system.transactionIdentifier",
"createMissingSegment": true
}
},
{
"name": ".request.command",
"read": {
"location": ".message.request.command",
"createMissingSegment": false
},
"write": {
"location": ".message.request.command",
"createMissingSegment": true
}
},
{
"name": ".request.command",
"read": {
"location": ".message.request.command",
"createMissingSegment": false
},
"write": {
"location": ".message.request.command",
"createMissingSegment": true
}
},
{
"name": ".sas.system.processInd",
"read": {
"location": "",
"createMissingSegment": false
},
"write": {
"location": ".message.sas.system.processInd",
"createMissingSegment": true
}
},
{
"name": ".sas.system.transactionDtTmUtc",
"read": {
"location": "",
"createMissingSegment": false
},
"write": {
"location": ".message.sas.system.transactionDtTmUtc",
"createMissingSegment": true
}
},
{
"name": ".sas.rre.prep_micro",
"read": {
"location": ".message.sas.rre.prep_micro",
"createMissingSegment": false
},
"write": {
"location": "",
"createMissingSegment": false
}
},
{
"name": ".sas.rre.mehfetch_micro",
"read": {
"location": ".message.sas.rre.mehfetch_micro",
"createMissingSegment": false
},
"write": {
"location": "",
"createMissingSegment": false
}
},
{
"name": ".sas.rre.model_micro",
"read": {
"location": ".message.sas.rre.model_micro",
"createMissingSegment": false
},
"write": {
"location": "",
"createMissingSegment": false
}
},
{
"name": ".sas.rre.rule_micro",
"read": {
"location": ".message.sas.rre.rule_micro",
"createMissingSegment": false
},
"write": {
"location": "",
"createMissingSegment": false
}
},
{
"name": ".sas.rre.mehupdate_micro",
"read": {
"location": ".message.sas.rre.mehupdate_micro",
"createMissingSegment": false
},
"write": {
"location": "",
"createMissingSegment": false
}
},
{
"name": ".sas.rre.post_micro",
"read": {
"location": ".message.sas.rre.post_micro",
"createMissingSegment": false
},
"write": {
"location": "",
"createMissingSegment": false
}
},
{
"name": ".sas.rre.total_micro",
"read": {
"location": ".message.sas.rre.total_micro",
"createMissingSegment": false
},
"write": {
"location": "",
"createMissingSegment": false
}
},
{
"name": ".sas.rre.rules",
"read": {
"location": ".message.sas.rre.rules",
"createMissingSegment": false
},
"write": {
"location": "",
"createMissingSegment": false
}
},
{
"name": ".sas.rulefired",
"read": {
"location": ".message.sas.rulefired",
"createMissingSegment": false
},
"write": {
"location": "",
"createMissingSegment": false
}
},
{
"name": ".rdi.last_updated_timestamp",
"read": {
"location": "",
"createMissingSegment": false
},
"write": {
"location": ".details.rdi.last_updated_timestamp",
"createMissingSegment": true
}
},
{
"name": ".rdi.rules",
"read": {
"location": "",
"createMissingSegment": false
},
"write": {
"location": ".details.rdi.rules",
"fallback": ".rdi.rules",
"createMissingSegment": false
}
},
{
"name": ".cqf.alertingEvents",
"read": {
"location": ".message.sas.alerted",
"createMissingSegment": false
},
"write": {
"location": "",
"createMissingSegment": false
}
},
{
"name": ".rrr.action_code",
"read": {
"location": ".message.sas.rulefired.outcome",
"createMissingSegment": false
},
"write": {
"location": "",
"createMissingSegment": false
}
},
{
"name": ".rrr.process_ind",
"read": {
"location": "",
"createMissingSegment": false
},
"write": {
"location": ".message.sas.system.processInd",
"createMissingSegment": true
}
}
]
}
Here is an example of a bad request error response on a PUT request to create an object type. In this example the body did not include a name for the object type.
{
"errorCode": 1177,
"message": "The objectType was not valid.",
"details": [
"traceId: 4d148b871720c018",
"path: /types/types/testtype",
"FieldError: name: Must not be null."
],
"links": [],
"version": 2,
"httpStatusCode": 400
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful retreival of the current mapping. | mapping |
400 | Bad Request | Bad request | errorResponse |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | The media type of the response collection. |
Update the Current Mapping
Code samples
# You can also use wget
curl -X POST http://mock-detection.apifirst.unx.sas.com/detection/mapping \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
const inputBody = '{
"mapping": [
{
"name": ".request.schemaName",
"read": {
"location": ".message.request.schemaName"
},
"write": {
"location": ".message.request.schemaName",
"createMissingSegment": false
}
},
{
"name": ".sas.system.packageVersion",
"read": {
"location": ".message.sas.system.packageVersion"
},
"write": {
"location": ".message.sas.system.packageVersion",
"createMissingSegment": true
}
},
{
"name": ".request.messageClassificationName",
"read": {
"location": ".message.request.messageClassificationName"
},
"write": {
"location": ".message.request.messageClassificationName",
"createMissingSegment": false
}
},
{
"name": ".request.restResponseFlg",
"read": {
"location": ".message.request.restResponseFlg"
}
},
{
"name": ".sas.system.returnDetails",
"read": {
"location": ".message.sas.system.returnDetails"
},
"write": {
"location": ".message.sas.system.returnDetails",
"createMissingSegment": true
}
},
{
"name": ".sas.system.returnType",
"read": {
"location": ".message.sas.system.returnType"
},
"write": {
"location": ".message.sas.system.returnType",
"createMissingSegment": true
}
},
{
"name": ".sas.system.returnDesc",
"read": {
"location": ".message.sas.system.returnDesc"
},
"write": {
"location": ".message.sas.system.returnDesc",
"createMissingSegment": true
}
},
{
"name": ".sas.system.transactionIdentifier",
"read": {
"location": ".message.sas.system.transactionIdentifier"
},
"write": {
"location": ".message.sas.system.transactionIdentifier",
"createMissingSegment": true
}
},
{
"name": ".request.command",
"read": {
"location": ".message.request.command"
},
"write": {
"location": ".message.request.command",
"createMissingSegment": true
}
},
{
"name": ".request.command",
"read": {
"location": ".message.request.command"
},
"write": {
"location": ".message.request.command",
"createMissingSegment": true
}
},
{
"name": ".sas.system.processInd",
"write": {
"location": ".message.sas.system.processInd",
"createMissingSegment": true
}
},
{
"name": ".sas.system.transactionDtTmUtc",
"write": {
"location": ".message.sas.system.transactionDtTmUtc",
"createMissingSegment": true
}
},
{
"name": ".sas.rre.prep_micro",
"read": {
"location": ".message.sas.rre.prep_micro"
}
},
{
"name": ".sas.rre.mehfetch_micro",
"read": {
"location": ".message.sas.rre.mehfetch_micro"
}
},
{
"name": ".sas.rre.model_micro",
"read": {
"location": ".message.sas.rre.model_micro"
}
},
{
"name": ".sas.rre.rule_micro",
"read": {
"location": ".message.sas.rre.rule_micro"
}
},
{
"name": ".sas.rre.mehupdate_micro",
"read": {
"location": ".message.sas.rre.mehupdate_micro"
}
},
{
"name": ".sas.rre.post_micro",
"read": {
"location": ".message.sas.rre.post_micro"
}
},
{
"name": ".sas.rre.total_micro",
"read": {
"location": ".message.sas.rre.total_micro"
}
},
{
"name": ".sas.rre.rules",
"read": {
"location": ".message.sas.rre.rules"
}
},
{
"name": ".sas.rulefired",
"read": {
"location": ".message.sas.rulefired"
}
},
{
"name": ".rdi.last_updated_timestamp",
"write": {
"location": ".details.rdi.last_updated_timestamp",
"createMissingSegment": true
}
},
{
"name": ".rdi.rules",
"write": {
"location": ".details.rdi.rules",
"fallback": ".rdi.rules",
"createMissingSegment": false
}
},
{
"name": ".cqf.alertingEvents",
"read": {
"location": ".message.sas.alerted"
}
},
{
"name": ".rrr.action_code",
"read": {
"location": ".message.sas.rulefired.outcome"
}
},
{
"name": ".rrr.process_ind",
"write": {
"location": ".message.sas.system.processInd",
"createMissingSegment": true
}
}
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('http://mock-detection.apifirst.unx.sas.com/detection/mapping',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('http://mock-detection.apifirst.unx.sas.com/detection/mapping', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-detection.apifirst.unx.sas.com/detection/mapping", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /mapping
Updates the mapping from where SAS Detection Engine references message content, to where it is found in the actual ION message. Use this only with the guidance of your administration and technical support.
Body parameter
The following is an example of a mapping POST request body.
{
"mapping": [
{
"name": ".request.schemaName",
"read": {
"location": ".message.request.schemaName"
},
"write": {
"location": ".message.request.schemaName",
"createMissingSegment": false
}
},
{
"name": ".sas.system.packageVersion",
"read": {
"location": ".message.sas.system.packageVersion"
},
"write": {
"location": ".message.sas.system.packageVersion",
"createMissingSegment": true
}
},
{
"name": ".request.messageClassificationName",
"read": {
"location": ".message.request.messageClassificationName"
},
"write": {
"location": ".message.request.messageClassificationName",
"createMissingSegment": false
}
},
{
"name": ".request.restResponseFlg",
"read": {
"location": ".message.request.restResponseFlg"
}
},
{
"name": ".sas.system.returnDetails",
"read": {
"location": ".message.sas.system.returnDetails"
},
"write": {
"location": ".message.sas.system.returnDetails",
"createMissingSegment": true
}
},
{
"name": ".sas.system.returnType",
"read": {
"location": ".message.sas.system.returnType"
},
"write": {
"location": ".message.sas.system.returnType",
"createMissingSegment": true
}
},
{
"name": ".sas.system.returnDesc",
"read": {
"location": ".message.sas.system.returnDesc"
},
"write": {
"location": ".message.sas.system.returnDesc",
"createMissingSegment": true
}
},
{
"name": ".sas.system.transactionIdentifier",
"read": {
"location": ".message.sas.system.transactionIdentifier"
},
"write": {
"location": ".message.sas.system.transactionIdentifier",
"createMissingSegment": true
}
},
{
"name": ".request.command",
"read": {
"location": ".message.request.command"
},
"write": {
"location": ".message.request.command",
"createMissingSegment": true
}
},
{
"name": ".request.command",
"read": {
"location": ".message.request.command"
},
"write": {
"location": ".message.request.command",
"createMissingSegment": true
}
},
{
"name": ".sas.system.processInd",
"write": {
"location": ".message.sas.system.processInd",
"createMissingSegment": true
}
},
{
"name": ".sas.system.transactionDtTmUtc",
"write": {
"location": ".message.sas.system.transactionDtTmUtc",
"createMissingSegment": true
}
},
{
"name": ".sas.rre.prep_micro",
"read": {
"location": ".message.sas.rre.prep_micro"
}
},
{
"name": ".sas.rre.mehfetch_micro",
"read": {
"location": ".message.sas.rre.mehfetch_micro"
}
},
{
"name": ".sas.rre.model_micro",
"read": {
"location": ".message.sas.rre.model_micro"
}
},
{
"name": ".sas.rre.rule_micro",
"read": {
"location": ".message.sas.rre.rule_micro"
}
},
{
"name": ".sas.rre.mehupdate_micro",
"read": {
"location": ".message.sas.rre.mehupdate_micro"
}
},
{
"name": ".sas.rre.post_micro",
"read": {
"location": ".message.sas.rre.post_micro"
}
},
{
"name": ".sas.rre.total_micro",
"read": {
"location": ".message.sas.rre.total_micro"
}
},
{
"name": ".sas.rre.rules",
"read": {
"location": ".message.sas.rre.rules"
}
},
{
"name": ".sas.rulefired",
"read": {
"location": ".message.sas.rulefired"
}
},
{
"name": ".rdi.last_updated_timestamp",
"write": {
"location": ".details.rdi.last_updated_timestamp",
"createMissingSegment": true
}
},
{
"name": ".rdi.rules",
"write": {
"location": ".details.rdi.rules",
"fallback": ".rdi.rules",
"createMissingSegment": false
}
},
{
"name": ".cqf.alertingEvents",
"read": {
"location": ".message.sas.alerted"
}
},
{
"name": ".rrr.action_code",
"read": {
"location": ".message.sas.rulefired.outcome"
}
},
{
"name": ".rrr.process_ind",
"write": {
"location": ".message.sas.system.processInd",
"createMissingSegment": true
}
}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | mapping | true | JSON data representing the mapping. |
Example responses
The following is an example of a mapping response body.
{
"mapping": [
{
"name": ".request.schemaName",
"read": {
"location": ".message.request.schemaName",
"createMissingSegment": false
},
"write": {
"location": ".message.request.schemaName",
"createMissingSegment": false
}
},
{
"name": ".sas.system.packageVersion",
"read": {
"location": ".message.sas.system.packageVersion",
"createMissingSegment": false
},
"write": {
"location": ".message.sas.system.packageVersion",
"createMissingSegment": true
}
},
{
"name": ".request.messageClassificationName",
"read": {
"location": ".message.request.messageClassificationName",
"createMissingSegment": false
},
"write": {
"location": ".message.request.messageClassificationName",
"createMissingSegment": false
}
},
{
"name": ".request.restResponseFlg",
"read": {
"location": ".message.request.restResponseFlg",
"createMissingSegment": false
},
"write": {
"location": "",
"createMissingSegment": false
}
},
{
"name": ".sas.system.returnDetails",
"read": {
"location": ".message.sas.system.returnDetails",
"createMissingSegment": false
},
"write": {
"location": ".message.sas.system.returnDetails",
"createMissingSegment": true
}
},
{
"name": ".sas.system.returnType",
"read": {
"location": ".message.sas.system.returnType",
"createMissingSegment": false
},
"write": {
"location": ".message.sas.system.returnType",
"createMissingSegment": true
}
},
{
"name": ".sas.system.returnDesc",
"read": {
"location": ".message.sas.system.returnDesc",
"createMissingSegment": false
},
"write": {
"location": ".message.sas.system.returnDesc",
"createMissingSegment": true
}
},
{
"name": ".sas.system.transactionIdentifier",
"read": {
"location": ".message.sas.system.transactionIdentifier",
"createMissingSegment": false
},
"write": {
"location": ".message.sas.system.transactionIdentifier",
"createMissingSegment": true
}
},
{
"name": ".request.command",
"read": {
"location": ".message.request.command",
"createMissingSegment": false
},
"write": {
"location": ".message.request.command",
"createMissingSegment": true
}
},
{
"name": ".request.command",
"read": {
"location": ".message.request.command",
"createMissingSegment": false
},
"write": {
"location": ".message.request.command",
"createMissingSegment": true
}
},
{
"name": ".sas.system.processInd",
"read": {
"location": "",
"createMissingSegment": false
},
"write": {
"location": ".message.sas.system.processInd",
"createMissingSegment": true
}
},
{
"name": ".sas.system.transactionDtTmUtc",
"read": {
"location": "",
"createMissingSegment": false
},
"write": {
"location": ".message.sas.system.transactionDtTmUtc",
"createMissingSegment": true
}
},
{
"name": ".sas.rre.prep_micro",
"read": {
"location": ".message.sas.rre.prep_micro",
"createMissingSegment": false
},
"write": {
"location": "",
"createMissingSegment": false
}
},
{
"name": ".sas.rre.mehfetch_micro",
"read": {
"location": ".message.sas.rre.mehfetch_micro",
"createMissingSegment": false
},
"write": {
"location": "",
"createMissingSegment": false
}
},
{
"name": ".sas.rre.model_micro",
"read": {
"location": ".message.sas.rre.model_micro",
"createMissingSegment": false
},
"write": {
"location": "",
"createMissingSegment": false
}
},
{
"name": ".sas.rre.rule_micro",
"read": {
"location": ".message.sas.rre.rule_micro",
"createMissingSegment": false
},
"write": {
"location": "",
"createMissingSegment": false
}
},
{
"name": ".sas.rre.mehupdate_micro",
"read": {
"location": ".message.sas.rre.mehupdate_micro",
"createMissingSegment": false
},
"write": {
"location": "",
"createMissingSegment": false
}
},
{
"name": ".sas.rre.post_micro",
"read": {
"location": ".message.sas.rre.post_micro",
"createMissingSegment": false
},
"write": {
"location": "",
"createMissingSegment": false
}
},
{
"name": ".sas.rre.total_micro",
"read": {
"location": ".message.sas.rre.total_micro",
"createMissingSegment": false
},
"write": {
"location": "",
"createMissingSegment": false
}
},
{
"name": ".sas.rre.rules",
"read": {
"location": ".message.sas.rre.rules",
"createMissingSegment": false
},
"write": {
"location": "",
"createMissingSegment": false
}
},
{
"name": ".sas.rulefired",
"read": {
"location": ".message.sas.rulefired",
"createMissingSegment": false
},
"write": {
"location": "",
"createMissingSegment": false
}
},
{
"name": ".rdi.last_updated_timestamp",
"read": {
"location": "",
"createMissingSegment": false
},
"write": {
"location": ".details.rdi.last_updated_timestamp",
"createMissingSegment": true
}
},
{
"name": ".rdi.rules",
"read": {
"location": "",
"createMissingSegment": false
},
"write": {
"location": ".details.rdi.rules",
"fallback": ".rdi.rules",
"createMissingSegment": false
}
},
{
"name": ".cqf.alertingEvents",
"read": {
"location": ".message.sas.alerted",
"createMissingSegment": false
},
"write": {
"location": "",
"createMissingSegment": false
}
},
{
"name": ".rrr.action_code",
"read": {
"location": ".message.sas.rulefired.outcome",
"createMissingSegment": false
},
"write": {
"location": "",
"createMissingSegment": false
}
},
{
"name": ".rrr.process_ind",
"read": {
"location": "",
"createMissingSegment": false
},
"write": {
"location": ".message.sas.system.processInd",
"createMissingSegment": true
}
}
]
}
Here is an example of a bad request error response on a PUT request to create an object type. In this example the body did not include a name for the object type.
{
"errorCode": 1177,
"message": "The objectType was not valid.",
"details": [
"traceId: 4d148b871720c018",
"path: /types/types/testtype",
"FieldError: name: Must not be null."
],
"links": [],
"version": 2,
"httpStatusCode": 400
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful update to the mapping. | mapping |
400 | Bad Request | Bad request | errorResponse |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | string | The media type of the response collection. |
Schemas
api
{
"version": 0,
"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. |
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 to invoke this endpoint. |
rel | string | true | none | The relationship of this URL to the object. |
uri | string | false | none | The relative URI of the REST endpoint. |
href | string | false | none | The full URL of the REST endpoint. |
title | string | false | none | The title for the link. |
type | string | false | none | The media type consumed/produced. |
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. |
errorResponse
{
"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 error message. |
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 | [errorResponse] | 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. |
ruleMetrics
{}
Collection of rule metrics
Properties
None
validation
{
"validationMessage": "Validation completed successfully"
}
Validation results
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
validationMessage | string | false | none | validation message |
metricmap
null
Collection of prometheus metrics
Properties
None
executeFromION
null
The json that is able to be submitted to OSE execute
Properties
None
getverbose
null
Description of the current verbose level
Properties
None
setverbose
null
Description of the requested change in verbose level
Properties
None
toolList
null
Description of the tools and their status
Properties
None
statsTimelineCollection
[
{}
]
statsTimelineCollection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
statsTimelineCollection | [object] | false | none | Collection of prometheus metrics in a timeline format |
decisionObject
{}
A deployed decision
Properties
None
settings
null
SAS Detection Engine settings
Properties
None
mapping
null
SAS Detection Engine mapping
Properties
None
describeObject
null
Description of the deployment package
Properties
None
describeVariableSetsObject
null
Description of the variable sets in a deployment package
Properties
None
describeRulesObject
null
Description of the rules in a deployment package
Properties
None
describeListsObject
null
Description of the lookup lists in a deployment package
Properties
None
describeProfileObject
null
Description of the profile in a deployment package
Properties
None
describeAlertTypesObject
null
Description of the alert types in a deployment package
Properties
None
describeMessageClassificationsObject
null
Description of the message classifications in a deployment package
Properties
None
describeModelsObject
null
Description of the models in a deployment package
Properties
None
healthObject
null
Health status
Properties
None
validationFailureCause
{}
ValidationFailureCause
Properties
None
Examples
Media Type Samples
Externally Defined Media Types
- [
application/vnd.sas.detection.message.{message-schema-type}+{format}
]
application/vnd.sas.detection.message.{message-schema-type}+{format}
The application/vnd.sas.detection.message.{message-schema-type}+{format} media type serves as the complete representation of an incoming transaction.
The above media-type template requires two substitutions:
message-schema-type
: All message schemas that are defined have a type. The type should be specified here to associate the message with the message schema.format
: The only data format that is supported by the product is 'ion'. However, the intention is to extend the product to support other data formats in the future.
Example: application/vnd.sas.detection.message.finance+ion
In the above example, a message-schema-type of finance
is specified with a
message format of ion.
Detection Definition
Base URLs:
- http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition
Terms of service 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.
Provides authoring rules functionality.
Usage Notes
Overview
The SAS Detection Definition REST API supports the functionality of SAS Rules Studio.
SAS Rules Studio is a development environment for business users to author rules that identify fraudulent transactions and raise alerts in high risk situations. Once authored these rules are deployed into an operational environment to execute in real-time on incoming financial transactions and return a recommendation or create an alert for call center staff to triage.
SAS Rules Studio consists of all the following APIs:
- Rule API
- Rule Estimation API
Administration consists of following APIs
- Project API
- Deployments API
Miscellaneous APIs used across various functions
- Organizations API
Terminology
Rules
A detection rule is a business rule that runs after the analytic model score code and can be used to enhance the fraud decision. The service supports a peer development model: a rule belongs not to the individual who authored it, but to the project where the rule was created.
The SAS Detection Architecture decision engine is a sequential engine. It executes one rule after the other. Any dependencies between the rules are used to determine the execution order. Once all rules have been executed, the most severe recommendation is returned. Rules might use resources such as lookup lists, actions, and profile variables.
base rule ID: A numeric string (always an integer) that links multiple versions of a rule.
rule type: The category of a rule according to its purpose.
- variable rule: A rule that can calculate values.
- decision rule: A rule that can return a response with a decision and create an alert of a particular type.
rule state:
- Coding: Rule code can be changed in this state.
- Testing: The rule cannot be changed in this state.
- Production: The rule cannot be changed in this state.
- Trash: This state is deprecated. Use Recycle instead.
- Recycle: The rule is not usable in this state.
rule dependency: A rule can depend on other rules. A rule dependency is identified by the base rule ID of the rule it depends on. Valid rule dependencies are the following.
- by type
- A variable rule can depend on other variable rules.
- A decision rule can depend on variable rules and other decision rules.
- by state
- A rule in coding can depend on rules in coding, testing, and production.
- A rule in testing can depend on rules in testing and production.
- A rule in production can depend only on rules in production.
- no cycles: A rule cannot depend directly or indirectly on itself.
dependency resolution: For a given rule in a given state, the process of determining what rules satisfy its dependencies on other base rule IDs.
Deployments
The deployment process generates a Docker image that contains an organizations rules and models and publishes it to a configured choice of image repositories.
Organizations and Message Classifications
Message classifications are conceptual entities that are organized in a hierarchical tree structure. At the top, it is the root message classification. A message classification can have a parent and children. A message classification represents a population of transactions or messages and a set of rules that process the transactions or messages.
Organizations represent special message classifications at the designated level in the message classification tree. Organizations are conceptual entities that own projects and assets, like rules and models. Asset packages and deployments to a transaction or message processing system are arranged by organizations.
An organization can restrict the set of roles and users, and message schemas for projects in the organization.
Roles, Users, and Capabilities
A role in the detection definition service is a named collection (that is, a set of capabilities and assigned users). Users that are assigned to a role have the set of capabilities of the role.
A role of the detection definition service is a special instance of groups in a SAS Viya Environment Manager's identity service. Not every group in SAS Viya Environment Manager can be a role of the detection definition service. Only the group members in the SASDetectionRoles group are roles of the detection definition service.
SASDetectionRoles is a special group that serves as the root of the detection definition roles. No users should be assigned to the root group directly. Users should be directly assigned to a role of the detection definition service to be a valid user for the detection definition service. An indirect user member is not. The following diagram illustrates the valid assignment of roles and users.
SASDetectionRoles
|-- Role A
|-- User m
|-- User n
|-- User ...
|-- Role B
|-- User x
|-- User y
|-- User ...
|-- Role ...
Message Schemas
A message schema defines the layout of variables that are used to represent a type of messages or transactions, (for example, payments, wires, or loans). Message schemas are defined in SAS detection message schema service. An organization can authorize message schemas to be available for use in its projects and rules. A project then sets a set of message schemas for its rule authoring.
Profile Message Schemas
A profile message schema defines the layout of user variables and who has access to these user variables. User variables are typically defined by rule writers during rule authoring. A user variable that is defined in a profile message schema can be accessed only by members of the project for which it was defined. It is not visible to rules in other projects. All user variables that are defined in a profile message schema belong to the same organization. Since a profile message schema contains project-specific user variables, it is private to an organization and cannot be shared with other organizations.
Typically, you should not have to define a new profile message schema. When you create an organization, a default profile message schema shell is also created. For more information about profile message schemas, see “Organizations”.
Lists
A list or lookup list is a tabular collection of data that is used by rule writers during rule authoring. A list and its properties are defined using the listData service which uses Redis as its in-memory data store. List content can be managed using listData itself or through Redis directly.
Before a list can be used within a rule, the list must be associated with the rule's overlying organization and project.
Error Codes
HTTP Status Code | Error Code | Description |
---|---|---|
400 | 999999 | Invalid UUID was used in the request. |
400 | 1000002 | The request body was not valid. |
400 | 1000003 | Invalid response type was requested. |
400 | 1000004 | The request body was not the correct type, or could not be decoded. |
400 | 1000007 | Input mapping failed. |
400 | 11807 | Invalid URI was used. |
400 | 11810 | No messages were specified. |
400 | 11811 | A message or messages were specified but none were found. |
500 | 11815 | A dependent service was not available. The service name appears in the message. |
403 | 1000012 | Create failed because a required resource was not found. |
409 | 1000017 | Create failed due to a conflict associated with concurrent changes. |
409 | 1000020 | Delete failed due to a conflict associated with concurrent changes. |
409 | 1000022 | Update failed due to a conflict associated with concurrent changes. |
409 | 1000023 | There was a failure due to a conflict associated with concurrent changes. |
412 | 1000000 | Update failed because a precondition (for example, an ETag) did not match. |
422 | 1000014 | Create failed due to semantic level error in the request. |
422 | 1000019 | Delete failed due to semantic level error in the request. |
422 | 1000015 | Update failed due to semantic level error in the request. |
422 | 1000016 | Request failed due to semantic level error in the request. |
428 | 1000021 | Update failed because the If-Match is missing. |
Operations
Root
The operations for the root resource.
Return a List of Top-level Links
Code samples
# You can also use wget
curl -X GET http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/ \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.api+json'
const headers = {
'Accept':'application/vnd.sas.api+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/',
{
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('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/', 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", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /
Returns a list of top-level links.
Example responses
Returns a list of top-level links
{
"version": 1,
"links": [
{
"method": "GET",
"rel": "rules",
"href": "/detectionDefinition/projects/{projectId}/rules",
"uri": "/detectionDefinition/projects/{projectId}/rules",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.rule"
},
{
"method": "POST",
"rel": "createRule",
"href": "/detectionDefinition/projects/{projectId}/rules",
"uri": "/detectionDefinition/projects/{projectId}/rules",
"type": "application/vnd.sas.detection.rule"
},
{
"method": "GET",
"rel": "organizations",
"href": "/detectionDefinition/organizations",
"uri": "/detectionDefinition/organizations",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.organization"
},
{
"method": "POST",
"rel": "createOrganization",
"href": "/detectionDefinition/organizations",
"uri": "/detectionDefinition/organizations",
"type": "application/vnd.sas.detection.organization"
},
{
"method": "GET",
"rel": "projects",
"href": "/detectionDefinition/organizations/{orgId}/projects",
"uri": "/detectionDefinition/organizations/{orgId}/projects",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.project"
},
{
"method": "POST",
"rel": "createProject",
"href": "/detectionDefinition/organizations/{orgId}/projects",
"uri": "/detectionDefinition/organizations/{orgId}/projects",
"type": "application/vnd.sas.detection.project"
},
{
"method": "GET",
"rel": "deployments",
"href": "/detectionDefinition/deployments",
"uri": "/detectionDefinition/deployments",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.deployment"
},
{
"method": "POST",
"rel": "createDeployment",
"href": "/detectionDefinition/deployments",
"uri": "/detectionDefinition/deployments",
"type": "application/vnd.sas.detection.deployment"
},
{
"method": "GET",
"rel": "deploymentDefinitions",
"href": "/detectionDefinition/deploymentDefinitions",
"uri": "/detectionDefinition/deploymentDefinitions",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.deployment.definition"
},
{
"method": "POST",
"rel": "createDeploymentDefinition",
"href": "/detectionDefinition/deploymentDefinitions",
"uri": "/detectionDefinition/deploymentDefinitions",
"type": "application/vnd.sas.detection.deployment.definition"
},
{
"method": "GET",
"rel": "alertTypes",
"href": "/detectionDefinition/alertTypes",
"uri": "/detectionDefinition/alertTypes",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.alert.type"
},
{
"method": "POST",
"rel": "createAlertType",
"href": "/detectionDefinition/alertTypes",
"uri": "/detectionDefinition/alertTypes",
"type": "application/vnd.sas.detection.alert.type"
},
{
"method": "GET",
"rel": "roles",
"href": "/detectionDefinition/roles",
"uri": "/detectionDefinition/roles",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.identity.group"
},
{
"method": "POST",
"rel": "createRole",
"href": "/detectionDefinition/roles",
"uri": "/detectionDefinition/roles",
"type": "application/vnd.sas.identity.group"
},
{
"method": "GET",
"rel": "users",
"href": "/detectionDefinition/users",
"uri": "/detectionDefinition/users",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.identity.user"
},
{
"method": "POST",
"rel": "createUser",
"href": "/detectionDefinition/users",
"uri": "/detectionDefinition/users",
"type": "application/vnd.sas.identity.user"
},
{
"method": "GET",
"rel": "decisions",
"href": "/detectionDefinition/decisions",
"uri": "/detectionDefinition/decisions",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.step"
},
{
"method": "POST",
"rel": "createDecision",
"href": "/detectionDefinition/decisions",
"uri": "/detectionDefinition/decisions",
"type": "application/vnd.sas.detection.step"
},
{
"method": "GET",
"rel": "functions",
"href": "/detectionDefinition/languages/{languageId}/functions",
"uri": "/detectionDefinition/languages/{languageId}/functions",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.rule.function"
},
{
"method": "POST",
"rel": "createFunction",
"href": "/detectionDefinition/languages/{languageId}/functions",
"uri": "/detectionDefinition/languages/{languageId}/functions",
"type": "application/vnd.sas.detection.rule.function"
},
{
"method": "GET",
"rel": "macros",
"href": "/detectionDefinition/languages/{languageId}/macros",
"uri": "/detectionDefinition/languages/{languageId}/macros",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.rule.macro"
},
{
"method": "POST",
"rel": "createMacro",
"href": "/detectionDefinition/languages/{languageId}/macros",
"uri": "/detectionDefinition/languages/{languageId}/macros",
"type": "application/vnd.sas.detection.rule.macro"
},
{
"method": "GET",
"rel": "rules",
"href": "/detectionDefinition/rules",
"uri": "/detectionDefinition/rules",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.rule.variable"
},
{
"method": "POST",
"rel": "createRule",
"href": "/detectionDefinition/rules",
"uri": "/detectionDefinition/rules",
"type": "application/vnd.sas.detection.rule.variable"
},
{
"method": "GET",
"rel": "models",
"href": "/detectionDefinition/models",
"uri": "/detectionDefinition/models",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.sasmodel"
},
{
"method": "POST",
"rel": "createModel",
"href": "/detectionDefinition/models",
"uri": "/detectionDefinition/models",
"type": "application/vnd.sas.detection.sasmodel"
},
{
"method": "GET",
"rel": "variableSets",
"href": "/detectionDefinition/variableSets",
"uri": "/detectionDefinition/variableSets",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.variable.rule.usage.summary"
},
{
"method": "POST",
"rel": "createVariableSet",
"href": "/detectionDefinition/variableSets",
"uri": "/detectionDefinition/variableSets",
"type": "application/vnd.sas.detection.variable.rule.usage.summary"
}
]
}
{
"version": 1,
"links": [
{
"method": "GET",
"rel": "rules",
"href": "/detectionDefinition/projects/{projectId}/rules",
"uri": "/detectionDefinition/projects/{projectId}/rules",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.rule"
},
{
"method": "POST",
"rel": "createRule",
"href": "/detectionDefinition/projects/{projectId}/rules",
"uri": "/detectionDefinition/projects/{projectId}/rules",
"type": "application/vnd.sas.detection.rule"
},
{
"method": "GET",
"rel": "organizations",
"href": "/detectionDefinition/organizations",
"uri": "/detectionDefinition/organizations",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.organization"
},
{
"method": "POST",
"rel": "createOrganization",
"href": "/detectionDefinition/organizations",
"uri": "/detectionDefinition/organizations",
"type": "application/vnd.sas.detection.organization"
},
{
"method": "GET",
"rel": "projects",
"href": "/detectionDefinition/organizations/{orgId}/projects",
"uri": "/detectionDefinition/organizations/{orgId}/projects",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.project"
},
{
"method": "POST",
"rel": "createProject",
"href": "/detectionDefinition/organizations/{orgId}/projects",
"uri": "/detectionDefinition/organizations/{orgId}/projects",
"type": "application/vnd.sas.detection.project"
},
{
"method": "GET",
"rel": "deployments",
"href": "/detectionDefinition/deployments",
"uri": "/detectionDefinition/deployments",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.deployment"
},
{
"method": "POST",
"rel": "createDeployment",
"href": "/detectionDefinition/deployments",
"uri": "/detectionDefinition/deployments",
"type": "application/vnd.sas.detection.deployment"
},
{
"method": "GET",
"rel": "deploymentDefinitions",
"href": "/detectionDefinition/deploymentDefinitions",
"uri": "/detectionDefinition/deploymentDefinitions",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.deployment.definition"
},
{
"method": "POST",
"rel": "createDeploymentDefinition",
"href": "/detectionDefinition/deploymentDefinitions",
"uri": "/detectionDefinition/deploymentDefinitions",
"type": "application/vnd.sas.detection.deployment.definition"
},
{
"method": "GET",
"rel": "alertTypes",
"href": "/detectionDefinition/alertTypes",
"uri": "/detectionDefinition/alertTypes",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.alert.type"
},
{
"method": "POST",
"rel": "createAlertType",
"href": "/detectionDefinition/alertTypes",
"uri": "/detectionDefinition/alertTypes",
"type": "application/vnd.sas.detection.alert.type"
},
{
"method": "GET",
"rel": "roles",
"href": "/detectionDefinition/roles",
"uri": "/detectionDefinition/roles",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.identity.group"
},
{
"method": "POST",
"rel": "createRole",
"href": "/detectionDefinition/roles",
"uri": "/detectionDefinition/roles",
"type": "application/vnd.sas.identity.group"
},
{
"method": "GET",
"rel": "users",
"href": "/detectionDefinition/users",
"uri": "/detectionDefinition/users",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.identity.user"
},
{
"method": "POST",
"rel": "createUser",
"href": "/detectionDefinition/users",
"uri": "/detectionDefinition/users",
"type": "application/vnd.sas.identity.user"
},
{
"method": "GET",
"rel": "decisions",
"href": "/detectionDefinition/decisions",
"uri": "/detectionDefinition/decisions",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.step"
},
{
"method": "POST",
"rel": "createDecision",
"href": "/detectionDefinition/decisions",
"uri": "/detectionDefinition/decisions",
"type": "application/vnd.sas.detection.step"
},
{
"method": "GET",
"rel": "functions",
"href": "/detectionDefinition/languages/{languageId}/functions",
"uri": "/detectionDefinition/languages/{languageId}/functions",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.rule.function"
},
{
"method": "POST",
"rel": "createFunction",
"href": "/detectionDefinition/languages/{languageId}/functions",
"uri": "/detectionDefinition/languages/{languageId}/functions",
"type": "application/vnd.sas.detection.rule.function"
},
{
"method": "GET",
"rel": "macros",
"href": "/detectionDefinition/languages/{languageId}/macros",
"uri": "/detectionDefinition/languages/{languageId}/macros",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.rule.macro"
},
{
"method": "POST",
"rel": "createMacro",
"href": "/detectionDefinition/languages/{languageId}/macros",
"uri": "/detectionDefinition/languages/{languageId}/macros",
"type": "application/vnd.sas.detection.rule.macro"
},
{
"method": "GET",
"rel": "rules",
"href": "/detectionDefinition/rules",
"uri": "/detectionDefinition/rules",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.rule.variable"
},
{
"method": "POST",
"rel": "createRule",
"href": "/detectionDefinition/rules",
"uri": "/detectionDefinition/rules",
"type": "application/vnd.sas.detection.rule.variable"
},
{
"method": "GET",
"rel": "models",
"href": "/detectionDefinition/models",
"uri": "/detectionDefinition/models",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.sasmodel"
},
{
"method": "POST",
"rel": "createModel",
"href": "/detectionDefinition/models",
"uri": "/detectionDefinition/models",
"type": "application/vnd.sas.detection.sasmodel"
},
{
"method": "GET",
"rel": "variableSets",
"href": "/detectionDefinition/variableSets",
"uri": "/detectionDefinition/variableSets",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.variable.rule.usage.summary"
},
{
"method": "POST",
"rel": "createVariableSet",
"href": "/detectionDefinition/variableSets",
"uri": "/detectionDefinition/variableSets",
"type": "application/vnd.sas.detection.variable.rule.usage.summary"
}
]
}
404 Response
{
"default": {
"description": "Service not available 404 Response Example",
"value": {
"version": 2,
"httpStatusCode": 404,
"errorCode": 1000000,
"message": "Service not available"
}
}
}
{
"default": {
"description": "Service not available 404 Response Example",
"value": {
"version": 2,
"httpStatusCode": 404,
"errorCode": 1000000,
"message": "Service not available"
}
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | api |
404 | Not Found | Service is not available. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Etag | string | An hash-code for the response resource. | |
200 | Last-Modified | string | Date and time of last modification. | |
200 | Location | string | Location of URI for the endpoint. |
Rules
The operations for rule instances.
Return a List of Rules
Code samples
# You can also use wget
curl -X GET http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json' \
-H 'Accept-Item: application/vnd.sas.detection.rule+json'
const headers = {
'Accept':'application/vnd.sas.collection+json',
'Accept-Item':'application/vnd.sas.detection.rule+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules',
{
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.detection.rule+json'
}
r = requests.get('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules', 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.detection.rule+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /projects/{projectId}/rules
Gets the collection of rules in the identified project.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
start | query | integer | false | The 0-based offset of the first resource to return. Defaults to 0. |
limit | query | integer | false | The maximum number of resources to return. Defaults to 100. |
filter | query | string(filter-criteria) | false | The filter criteria for returned resources. For more information, see Filtering in REST APIs. |
sortBy | query | string(sort-criteria) | false | Specifies the sorting for returned resources. For more information, see Sorting in REST APIs. |
Accept-Item | header | string(media-type) | false | The media type representation for items in the returned collection. |
projectId | path | string(uuid) | true | The UUID of the project. |
Enumerated Values
Parameter | Value |
---|---|
Accept-Item | application/vnd.sas.detection.rule+json |
Accept-Item | application/vnd.sas.detection.rule.with.metrics+json |
Example responses
Example of response body content from a get rules request.
{
"version": 2,
"accept": "application/vnd.sas.detection.rule",
"count": 2,
"start": 0,
"limit": 100,
"name": "rules",
"items": [
{
"creationTimeStamp": "2022-11-17T21:53:00.168Z",
"createdBy": "user1",
"modifiedTimeStamp": "2022-11-17T21:53:47.431Z",
"modifiedBy": "user1",
"revision": 1,
"version": 2,
"id": "9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"name": "rule 2",
"baseRuleId": "50320",
"ruleVersion": 1,
"messageClassificationId": "e1166d1f-d6dc-11ec-b036-6631d4e9d21c",
"schemaName": "Payments",
"projectId": "0d2379c7-9a0e-4a29-b03f-0bbe25d1333f",
"state": "Coding",
"executionOrderType": 0,
"configuredOperationalState": "0",
"ruleTypeName": "decision"
},
{
"creationTimeStamp": "2022-11-17T21:44:10.104Z",
"createdBy": "user1",
"modifiedTimeStamp": "2022-11-17T21:52:39.975Z",
"modifiedBy": "user1",
"revision": 2,
"version": 2,
"id": "07521dab-9957-4216-b756-f8ccc024f374",
"name": "rule 1",
"baseRuleId": "50319",
"ruleVersion": 1,
"messageClassificationId": "e1166d1f-d6dc-11ec-b036-6631d4e9d21c",
"schemaName": "Payments",
"projectId": "0d2379c7-9a0e-4a29-b03f-0bbe25d1333f",
"state": "Coding",
"executionOrderType": 0,
"configuredOperationalState": "0",
"ruleTypeName": "variable"
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules",
"uri": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.rule"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules?start=0&limit=100",
"uri": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules?start=0&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.rule"
},
{
"method": "POST",
"rel": "create",
"href": "/detectionDefinition/projects/{projectId}/rules",
"uri": "/detectionDefinition/projects/{projectId}/rules",
"type": "application/vnd.sas.detection.rule",
"responseType": "application/vnd.sas.detection.rule"
}
]
}
Example of response body content from a get rules request with Accept-Item header
application/vnd.sas.detection.rule.with.metrics+json
.
{
"version": 2,
"accept": "application/vnd.sas.detection.rule.with.metrics",
"count": 2,
"start": 0,
"limit": 100,
"name": "rules",
"items": [
{
"creationTimeStamp": "2022-11-17T21:53:00.168Z",
"createdBy": "user1",
"modifiedTimeStamp": "2022-11-17T21:53:47.431Z",
"modifiedBy": "user1",
"revision": 1,
"version": 2,
"id": "9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"name": "rule 2",
"baseRuleId": "50320",
"ruleVersion": 1,
"messageClassificationId": "e1166d1f-d6dc-11ec-b036-6631d4e9d21c",
"schemaName": "Payments",
"projectId": "0d2379c7-9a0e-4a29-b03f-0bbe25d1333f",
"state": "Production",
"executionOrderType": 0,
"configuredOperationalState": "0",
"ruleTypeName": "decision",
"metrics": {
"total": {
"evaluated": 32533,
"outcomeFired": 0,
"alertFired": 0,
"overtime": 366
},
"today": {
"evaluated": 32496,
"outcomeFired": 0,
"alertFired": 0,
"overtime": 365
},
"today-1": null,
"today-2": null,
"today-3": null,
"today-4": null,
"today-5": {
"evaluated": 37,
"outcomeFired": 0,
"alertFired": 0,
"overtime": 1
},
"today-6": null
}
},
{
"creationTimeStamp": "2022-11-17T21:44:10.104Z",
"createdBy": "user1",
"modifiedTimeStamp": "2022-11-17T21:52:39.975Z",
"modifiedBy": "user1",
"revision": 2,
"version": 2,
"id": "07521dab-9957-4216-b756-f8ccc024f374",
"name": "rule 1",
"baseRuleId": "50319",
"ruleVersion": 1,
"messageClassificationId": "e1166d1f-d6dc-11ec-b036-6631d4e9d21c",
"schemaName": "Payments",
"projectId": "0d2379c7-9a0e-4a29-b03f-0bbe25d1333f",
"state": "Production",
"executionOrderType": 0,
"configuredOperationalState": "0",
"ruleTypeName": "variable",
"metrics": null
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules",
"uri": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.rule"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules?start=0&limit=100",
"uri": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules?start=0&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.rule"
},
{
"method": "POST",
"rel": "create",
"href": "/detectionDefinition/projects/{projectId}/rules",
"uri": "/detectionDefinition/projects/{projectId}/rules",
"type": "application/vnd.sas.detection.rule",
"responseType": "application/vnd.sas.detection.rule"
}
]
}
Example of response body content from a get rules request.
{
"version": 2,
"accept": "application/vnd.sas.detection.rule",
"count": 2,
"start": 0,
"limit": 100,
"name": "rules",
"items": [
{
"creationTimeStamp": "2022-11-17T21:53:00.168Z",
"createdBy": "user1",
"modifiedTimeStamp": "2022-11-17T21:53:47.431Z",
"modifiedBy": "user1",
"revision": 1,
"version": 2,
"id": "9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"name": "rule 2",
"baseRuleId": "50320",
"ruleVersion": 1,
"messageClassificationId": "e1166d1f-d6dc-11ec-b036-6631d4e9d21c",
"schemaName": "Payments",
"projectId": "0d2379c7-9a0e-4a29-b03f-0bbe25d1333f",
"state": "Coding",
"executionOrderType": 0,
"configuredOperationalState": "0",
"ruleTypeName": "decision"
},
{
"creationTimeStamp": "2022-11-17T21:44:10.104Z",
"createdBy": "user1",
"modifiedTimeStamp": "2022-11-17T21:52:39.975Z",
"modifiedBy": "user1",
"revision": 2,
"version": 2,
"id": "07521dab-9957-4216-b756-f8ccc024f374",
"name": "rule 1",
"baseRuleId": "50319",
"ruleVersion": 1,
"messageClassificationId": "e1166d1f-d6dc-11ec-b036-6631d4e9d21c",
"schemaName": "Payments",
"projectId": "0d2379c7-9a0e-4a29-b03f-0bbe25d1333f",
"state": "Coding",
"executionOrderType": 0,
"configuredOperationalState": "0",
"ruleTypeName": "variable"
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules",
"uri": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.rule"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules?start=0&limit=100",
"uri": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules?start=0&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.rule"
},
{
"method": "POST",
"rel": "create",
"href": "/detectionDefinition/projects/{projectId}/rules",
"uri": "/detectionDefinition/projects/{projectId}/rules",
"type": "application/vnd.sas.detection.rule",
"responseType": "application/vnd.sas.detection.rule"
}
]
}
Example of response body content from a get rules request with Accept-Item header
application/vnd.sas.detection.rule.with.metrics+json
.
{
"version": 2,
"accept": "application/vnd.sas.detection.rule.with.metrics",
"count": 2,
"start": 0,
"limit": 100,
"name": "rules",
"items": [
{
"creationTimeStamp": "2022-11-17T21:53:00.168Z",
"createdBy": "user1",
"modifiedTimeStamp": "2022-11-17T21:53:47.431Z",
"modifiedBy": "user1",
"revision": 1,
"version": 2,
"id": "9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"name": "rule 2",
"baseRuleId": "50320",
"ruleVersion": 1,
"messageClassificationId": "e1166d1f-d6dc-11ec-b036-6631d4e9d21c",
"schemaName": "Payments",
"projectId": "0d2379c7-9a0e-4a29-b03f-0bbe25d1333f",
"state": "Production",
"executionOrderType": 0,
"configuredOperationalState": "0",
"ruleTypeName": "decision",
"metrics": {
"total": {
"evaluated": 32533,
"outcomeFired": 0,
"alertFired": 0,
"overtime": 366
},
"today": {
"evaluated": 32496,
"outcomeFired": 0,
"alertFired": 0,
"overtime": 365
},
"today-1": null,
"today-2": null,
"today-3": null,
"today-4": null,
"today-5": {
"evaluated": 37,
"outcomeFired": 0,
"alertFired": 0,
"overtime": 1
},
"today-6": null
}
},
{
"creationTimeStamp": "2022-11-17T21:44:10.104Z",
"createdBy": "user1",
"modifiedTimeStamp": "2022-11-17T21:52:39.975Z",
"modifiedBy": "user1",
"revision": 2,
"version": 2,
"id": "07521dab-9957-4216-b756-f8ccc024f374",
"name": "rule 1",
"baseRuleId": "50319",
"ruleVersion": 1,
"messageClassificationId": "e1166d1f-d6dc-11ec-b036-6631d4e9d21c",
"schemaName": "Payments",
"projectId": "0d2379c7-9a0e-4a29-b03f-0bbe25d1333f",
"state": "Production",
"executionOrderType": 0,
"configuredOperationalState": "0",
"ruleTypeName": "variable",
"metrics": null
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules",
"uri": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.rule"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules?start=0&limit=100",
"uri": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules?start=0&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.rule"
},
{
"method": "POST",
"rel": "create",
"href": "/detectionDefinition/projects/{projectId}/rules",
"uri": "/detectionDefinition/projects/{projectId}/rules",
"type": "application/vnd.sas.detection.rule",
"responseType": "application/vnd.sas.detection.rule"
}
]
}
An example of an error 400 when the 'projectId' path parameter is not valid.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"1\" for the field \"projectId\" does not match the documented format.",
"details": [
"field: projectId",
"value: 1",
"messageID: detection-lib-api-icu.validation.invalid.value.msg",
"path: /detectionDefinition/projects/1/rules",
"correlator: a04eaaf7-5ee2-4ef9-ae41-260bde8302a6"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | ruleSummaryCollection |
400 | Bad Request | Bad request | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | undefined | No description |
Create a Rule
Code samples
# You can also use wget
curl -X POST http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.detection.rule+json' \
-H 'Accept: application/vnd.sas.detection.rule+json'
const inputBody = '{
"name": "Rule name",
"description": "Rule description",
"messageClassificationId": "ced5ac46-825b-46eb-9cc5-734a8bb58654",
"schemaName": "foo",
"ruleTypeName": "variable"
}';
const headers = {
'Content-Type':'application/vnd.sas.detection.rule+json',
'Accept':'application/vnd.sas.detection.rule+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules',
{
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.detection.rule+json',
'Accept': 'application/vnd.sas.detection.rule+json'
}
r = requests.post('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.detection.rule+json"},
"Accept": []string{"application/vnd.sas.detection.rule+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /projects/{projectId}/rules
Creates a new rule in the identified project. A new rule is always created in the Coding state.
Body parameter
An example of new coding rule request content
{
"name": "Rule name",
"description": "Rule description",
"messageClassificationId": "ced5ac46-825b-46eb-9cc5-734a8bb58654",
"schemaName": "foo",
"ruleTypeName": "variable"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | rulev2 | false | The rule to be created. |
projectId | path | string(uuid) | true | The UUID of the project. |
Example responses
Example response from a create rule request.
{
"creationTimeStamp": "2022-11-18T16:14:16.778Z",
"createdBy": "user1",
"modifiedTimeStamp": "2022-11-18T16:14:16.778Z",
"modifiedBy": "user1",
"revision": 0,
"version": 1,
"id": "118a97fa-9042-4b2b-b304-109f1eee2ef1",
"name": "Rule name",
"description": "Rule description",
"baseRuleId": "50324",
"ruleVersion": 1,
"messageClassificationId": "ced5ac46-825b-46eb-9cc5-734a8bb58654",
"schemaName": "foo",
"projectId": "0d2379c7-9a0e-4a29-b03f-0bbe25d1333f",
"state": "Coding",
"executionOrderType": 0,
"configuredOperationalState": "0",
"ruleTypeName": "variable",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/118a97fa-9042-4b2b-b304-109f1eee2ef1",
"uri": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/118a97fa-9042-4b2b-b304-109f1eee2ef1",
"type": "application/vnd.sas.detection.rule"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/118a97fa-9042-4b2b-b304-109f1eee2ef1",
"uri": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/118a97fa-9042-4b2b-b304-109f1eee2ef1",
"type": "application/vnd.sas.detection.rule"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/118a97fa-9042-4b2b-b304-109f1eee2ef1",
"uri": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/118a97fa-9042-4b2b-b304-109f1eee2ef1"
}
]
}
{
"creationTimeStamp": "2022-11-18T16:14:16.778Z",
"createdBy": "user1",
"modifiedTimeStamp": "2022-11-18T16:14:16.778Z",
"modifiedBy": "user1",
"revision": 0,
"version": 1,
"id": "118a97fa-9042-4b2b-b304-109f1eee2ef1",
"name": "Rule name",
"description": "Rule description",
"baseRuleId": "50324",
"ruleVersion": 1,
"messageClassificationId": "ced5ac46-825b-46eb-9cc5-734a8bb58654",
"schemaName": "foo",
"projectId": "0d2379c7-9a0e-4a29-b03f-0bbe25d1333f",
"state": "Coding",
"executionOrderType": 0,
"configuredOperationalState": "0",
"ruleTypeName": "variable",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/118a97fa-9042-4b2b-b304-109f1eee2ef1",
"uri": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/118a97fa-9042-4b2b-b304-109f1eee2ef1",
"type": "application/vnd.sas.detection.rule"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/118a97fa-9042-4b2b-b304-109f1eee2ef1",
"uri": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/118a97fa-9042-4b2b-b304-109f1eee2ef1",
"type": "application/vnd.sas.detection.rule"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/118a97fa-9042-4b2b-b304-109f1eee2ef1",
"uri": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/118a97fa-9042-4b2b-b304-109f1eee2ef1"
}
]
}
Example 400 error response when the request body contains an invalid rule, for example an invalid ruleTypeName field value.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The specified object with type \"Rule\" is invalid.",
"details": [
"Type: Rule",
"messageID: detection-definition-api-icu.object.invalid.msg",
"path: /detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules",
"correlator: b24eba89-0b8b-4883-9d46-05537dae71e0"
],
"errors": [
{
"version": 2,
"httpStatusCode": 500,
"message": "Key: 'RuleRep.RuleTypeName' Error:Field validation for 'RuleTypeName' failed on the 'oneof' tag"
}
]
}
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The specified object with type \"Rule\" is invalid.",
"details": [
"Type: Rule",
"messageID: detection-definition-api-icu.object.invalid.msg",
"path: /detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules",
"correlator: b24eba89-0b8b-4883-9d46-05537dae71e0"
],
"errors": [
{
"version": 2,
"httpStatusCode": 500,
"message": "Key: 'RuleRep.RuleTypeName' Error:Field validation for 'RuleTypeName' failed on the 'oneof' tag"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Created | rulev2 |
400 | Bad Request | The request was invalid (for example, invalid data or invalid structure in the request body). | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Etag | string | An hash-code for the response resource. | |
201 | Last-Modified | string | Date and time of last modification. | |
201 | Location | string | Location of URI for the endpoint. |
Get a Rule
Code samples
# You can also use wget
curl -X GET http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/{ruleId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.detection.rule+json'
const headers = {
'Accept':'application/vnd.sas.detection.rule+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/{ruleId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.detection.rule+json'
}
r = requests.get('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/{ruleId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.detection.rule+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/{ruleId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /projects/{projectId}/rules/{ruleId}
Returns a rule by ID.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
projectId | path | string(uuid) | true | The UUID of the project. |
ruleId | path | string(uuid) | true | The UUID of the rule. |
Example responses
An example of a rule object
{
"creationTimeStamp": "2022-05-26T12:40:40.879Z",
"createdBy": "userid",
"modifiedTimeStamp": "2022-05-26T12:40:40.879Z",
"modifiedBy": "userid",
"revision": 0,
"version": 1,
"id": "b9bb5ebd-c7d9-4703-8cc8-0bdc6afd77d6",
"name": "Rule2",
"description": "Rule 2",
"baseRuleId": "50001",
"ruleVersion": 1,
"messageClassificationId": "ced5ac46-825b-46eb-9cc5-734a8bb58654",
"schemaName": "PB Schema",
"projectId": "4e7d08ea-31de-474c-ab59-26ebe73101c1",
"ruleTypeName": "variable",
"state": "Coding",
"configuredOperationalState": "0",
"executionOrderType": 0,
"operationalState": "0",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/projects/4e7d08ea-31de-474c-ab59-26ebe73101c1/rules/b9bb5ebd-c7d9-4703-8cc8-0bdc6afd77d6",
"uri": "/detectionDefinition/projects/4e7d08ea-31de-474c-ab59-26ebe73101c1/rules/b9bb5ebd-c7d9-4703-8cc8-0bdc6afd77d6",
"type": "application/vnd.sas.detection.rule"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/projects/4e7d08ea-31de-474c-ab59-26ebe73101c1/rules/b9bb5ebd-c7d9-4703-8cc8-0bdc6afd77d6",
"uri": "/detectionDefinition/projects/4e7d08ea-31de-474c-ab59-26ebe73101c1/rules/b9bb5ebd-c7d9-4703-8cc8-0bdc6afd77d6",
"type": "application/vnd.sas.detection.rule"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/projects/4e7d08ea-31de-474c-ab59-26ebe73101c1/rules/b9bb5ebd-c7d9-4703-8cc8-0bdc6afd77d6",
"uri": "/detectionDefinition/projects/4e7d08ea-31de-474c-ab59-26ebe73101c1/rules/b9bb5ebd-c7d9-4703-8cc8-0bdc6afd77d6"
}
]
}
An example of a rule code object
{
"id": "b9bb5ebd-c7d9-4703-8cc8-0bdc6afd77d6",
"projectId": "4e7d08ea-31de-474c-ab59-26ebe73101c1",
"schemaName": "PB Schema",
"code": "Cg==",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/projects/4e7d08ea-31de-474c-ab59-26ebe73101c1/rules/b9bb5ebd-c7d9-4703-8cc8-0bdc6afd77d6",
"uri": "/detectionDefinition/projects/4e7d08ea-31de-474c-ab59-26ebe73101c1/rules/b9bb5ebd-c7d9-4703-8cc8-0bdc6afd77d6",
"type": "application/vnd.sas.detection.rule"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/projects/4e7d08ea-31de-474c-ab59-26ebe73101c1/rules/b9bb5ebd-c7d9-4703-8cc8-0bdc6afd77d6",
"uri": "/detectionDefinition/projects/4e7d08ea-31de-474c-ab59-26ebe73101c1/rules/b9bb5ebd-c7d9-4703-8cc8-0bdc6afd77d6",
"type": "application/vnd.sas.detection.rule"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/projects/4e7d08ea-31de-474c-ab59-26ebe73101c1/rules/b9bb5ebd-c7d9-4703-8cc8-0bdc6afd77d6",
"uri": "/detectionDefinition/projects/4e7d08ea-31de-474c-ab59-26ebe73101c1/rules/b9bb5ebd-c7d9-4703-8cc8-0bdc6afd77d6"
}
]
}
An example of a rule object
{
"creationTimeStamp": "2022-05-26T12:40:40.879Z",
"createdBy": "userid",
"modifiedTimeStamp": "2022-05-26T12:40:40.879Z",
"modifiedBy": "userid",
"revision": 0,
"version": 1,
"id": "b9bb5ebd-c7d9-4703-8cc8-0bdc6afd77d6",
"name": "Rule2",
"code": "Cg==",
"description": "Rule 2",
"baseRuleId": "50001",
"ruleVersion": 1,
"messageClassificationId": "ced5ac46-825b-46eb-9cc5-734a8bb58654",
"schemaName": "PB Schema",
"projectId": "4e7d08ea-31de-474c-ab59-26ebe73101c1",
"ruleTypeName": "variable",
"state": "Coding",
"configuredOperationalState": "0",
"executionOrderType": 0,
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/projects/4e7d08ea-31de-474c-ab59-26ebe73101c1/rules/b9bb5ebd-c7d9-4703-8cc8-0bdc6afd77d6",
"uri": "/detectionDefinition/projects/4e7d08ea-31de-474c-ab59-26ebe73101c1/rules/b9bb5ebd-c7d9-4703-8cc8-0bdc6afd77d6",
"type": "application/vnd.sas.detection.rule"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/projects/4e7d08ea-31de-474c-ab59-26ebe73101c1/rules/b9bb5ebd-c7d9-4703-8cc8-0bdc6afd77d6",
"uri": "/detectionDefinition/projects/4e7d08ea-31de-474c-ab59-26ebe73101c1/rules/b9bb5ebd-c7d9-4703-8cc8-0bdc6afd77d6",
"type": "application/vnd.sas.detection.rule"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/projects/4e7d08ea-31de-474c-ab59-26ebe73101c1/rules/b9bb5ebd-c7d9-4703-8cc8-0bdc6afd77d6",
"uri": "/detectionDefinition/projects/4e7d08ea-31de-474c-ab59-26ebe73101c1/rules/b9bb5ebd-c7d9-4703-8cc8-0bdc6afd77d6"
}
]
}
An example of a rule object with metrics collected from the operational environment.
{
"creationTimeStamp": "2023-07-11T15:06:59.689Z",
"createdBy": "anhaye",
"modifiedTimeStamp": "2023-07-11T15:21:40.959Z",
"modifiedBy": "anhaye",
"revision": 3,
"version": 2,
"id": "a2ab30d2-7f57-45af-a5cb-2e98d2c56f2f",
"name": "Alert Rule",
"baseRuleId": "50317",
"ruleVersion": 2,
"messageClassificationId": "ced5ac46-825b-46eb-9cc5-734a8bb58654",
"schemaName": "Debit Card Fraud Decisioning",
"projectId": "91454bc1-5205-4488-a349-d84e3a955148",
"state": "Production",
"alertType": "_P_",
"executionOrderType": 0,
"configuredOperationalState": "0",
"operationalState": "0",
"ruleTypeName": "decision",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/projects/91454bc1-5205-4488-a349-d84e3a955148/rules/a2ab30d2-7f57-45af-a5cb-2e98d2c56f2f",
"uri": "/detectionDefinition/projects/91454bc1-5205-4488-a349-d84e3a955148/rules/a2ab30d2-7f57-45af-a5cb-2e98d2c56f2f",
"type": "application/vnd.sas.detection.rule"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/projects/91454bc1-5205-4488-a349-d84e3a955148/rules/a2ab30d2-7f57-45af-a5cb-2e98d2c56f2f",
"uri": "/detectionDefinition/projects/91454bc1-5205-4488-a349-d84e3a955148/rules/a2ab30d2-7f57-45af-a5cb-2e98d2c56f2f",
"type": "application/vnd.sas.detection.rule"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/projects/91454bc1-5205-4488-a349-d84e3a955148/rules/a2ab30d2-7f57-45af-a5cb-2e98d2c56f2f",
"uri": "/detectionDefinition/projects/91454bc1-5205-4488-a349-d84e3a955148/rules/a2ab30d2-7f57-45af-a5cb-2e98d2c56f2f"
}
],
"metrics": {
"total": {
"evaluated": 32533,
"outcomeFired": 0,
"alertFired": 0,
"overtime": 366
},
"today": {
"evaluated": 32496,
"outcomeFired": 0,
"alertFired": 0,
"overtime": 365
},
"today-1": null,
"today-2": null,
"today-3": null,
"today-4": null,
"today-5": {
"evaluated": 22,
"outcomeFired": 0,
"alertFired": 0,
"overtime": 17
},
"today-6": null
}
}
An example of parsed rule response content
{
"id": "f49e2549-02ef-428f-b53d-2e766efbecb3",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/projects/0fce1a26-f8db-4043-9e8b-a09b68a92dde/rules/f49e2549-02ef-428f-b53d-2e766efbecb3",
"uri": "/detectionDefinition/projects/0fce1a26-f8db-4043-9e8b-a09b68a92dde/rules/f49e2549-02ef-428f-b53d-2e766efbecb3",
"type": "application/vnd.sas.detection.rule"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/projects/0fce1a26-f8db-4043-9e8b-a09b68a92dde/rules/f49e2549-02ef-428f-b53d-2e766efbecb3",
"uri": "/detectionDefinition/projects/0fce1a26-f8db-4043-9e8b-a09b68a92dde/rules/f49e2549-02ef-428f-b53d-2e766efbecb3",
"type": "application/vnd.sas.detection.rule"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/projects/0fce1a26-f8db-4043-9e8b-a09b68a92dde/rules/f49e2549-02ef-428f-b53d-2e766efbecb3",
"uri": "/detectionDefinition/projects/0fce1a26-f8db-4043-9e8b-a09b68a92dde/rules/f49e2549-02ef-428f-b53d-2e766efbecb3"
}
],
"usedActions": [
{
"actionId": "8fdc93a8-dc8e-409a-8038-bdc04f059fa6",
"createdBy": "userid",
"creationTimeStamp": "2022-08-18T20:32:36.376Z"
},
{
"actionId": "b528629a-8635-4ee6-8f90-688d8e6b84ad",
"createdBy": "userid",
"creationTimeStamp": "2022-08-18T20:32:36.374Z"
}
],
"dependencies": [
{
"dependency": {
"dependencyType": "STRONG",
"baseRuleId": "50132",
"createdBy": "userid",
"creationTimeStamp": "2022-08-18T20:32:36.379Z"
},
"resolvedRule": {
"ruleId": "b62c2d58-8126-4d65-a8ad-4a225e51cb96",
"baseRuleId": "50132",
"ruleVersion": 1,
"name": "Rule A",
"ruleTypeName": "variable",
"state": "Coding"
}
},
{
"dependency": {
"dependencyType": "WEAK",
"ruleId": "71f9a83d-8c2f-4e51-890c-d48975af6060",
"creationTimeStamp": "1901-01-01T00:00:00.000Z",
"usedVariables": [
{
"messageName": "Global Profile",
"name": "a_counter",
"jsonPath": ".a_var_set",
"createdBy": "userid",
"creationTimeStamp": "2023-01-27T17:18:30.377Z",
"isModifying": true,
"variableId": "89ebab17-9d85-419c-9391-43b73cf46aac",
"variableSetId": "d3f1902a-1911-45b1-b708-ba8838cbca35",
"type": "integer",
"arrayItem": "none"
}
]
},
"resolvedRule": {
"ruleId": "71f9a83d-8c2f-4e51-890c-d48975af6060",
"baseRuleId": "50021",
"ruleVersion": 1,
"name": "Set counter",
"ruleTypeName": "variable",
"state": "Coding"
}
}
],
"usedVariables": [
{
"messageName": "Cards",
"name": "tcn_client_amt",
"jsonPath": ".TCN",
"isModifying": false,
"variableId": "89ebab17-9d85-419c-9391-43b73cf46aac",
"variableSetId": "d3f1902a-1911-45b1-b708-ba8838cbca35",
"type": "currency",
"arrayItem": "none",
"createdBy": "userid",
"creationTimeStamp": "2022-10-13T12:24:49.514Z"
},
{
"messageName": "Global Profile",
"name": "a_counter",
"jsonPath": ".a_var_set",
"createdBy": "userid",
"creationTimeStamp": "2023-01-27T17:20:38.333Z",
"isModifying": false,
"variableId": "89ebab17-9d85-419c-9391-43b73cf46aac",
"variableSetId": "d3f1902a-1911-45b1-b708-ba8838cbca35",
"type": "integer",
"arrayItem": "none"
}
],
"usedLists": [
{
"listName": "closedAccts",
"state": "active",
"columns": [
{
"name": "acct_num",
"datatype": "string",
"position": 1,
"isKey": true,
"keyPosition": 1
}
],
"createdBy": "userid",
"creationTimeStamp": "2023-03-15T02:00:31.138Z"
}
]
}
An example of a rule with valid preconditions response content.
{
"creationTimeStamp": "2022-09-15T22:20:58.440Z",
"createdBy": "user1",
"modifiedTimeStamp": "2022-09-20T14:33:45.593Z",
"modifiedBy": "user1",
"revision": 38,
"version": 1,
"id": "fe037219-79dd-43c8-92ed-2ef84bde9a21",
"baseRuleId": "50196",
"ruleVersion": 1,
"name": "rule_620",
"ruleTypeName": "decision",
"state": "Coding",
"validPreconditions": [
{
"id": "d2063eb9-7018-49f2-a4ed-a3f60f7ec444",
"baseRuleId": "50175",
"name": "test8",
"state": "Production"
},
{
"id": "424256f6-e2f4-4432-8175-94cccd3af0f7",
"baseRuleId": "50181",
"name": "rule_test",
"state": "Testing"
},
{
"id": "e83a7533-b4f1-406b-ae30-11e8cdd7a8d9",
"baseRuleId": "50195",
"name": "rule_618",
"state": "Coding"
},
{
"id": "c9210579-e893-4754-8737-aa6e9755fb2b",
"baseRuleId": "50197",
"name": "rule_640",
"state": "Coding"
},
{
"id": "ad369f6a-2614-47d1-923c-19052ffb7376",
"baseRuleId": "50206",
"name": "rule 123",
"state": "Coding"
},
{
"id": "75306db8-0ddf-4014-9af5-393862c674cb",
"baseRuleId": "50211",
"name": "rule_920_1051",
"state": "Coding"
},
{
"id": "bb29a6bd-38f5-442d-9346-92c203f696a2",
"baseRuleId": "50212",
"name": "rule_920_1052",
"state": "Coding"
},
{
"id": "6997e5c9-fdd5-4403-a6ae-3527ed14f3b7",
"baseRuleId": "50213",
"name": "rule_920_108",
"state": "Coding"
},
{
"id": "a9478297-bda1-4b4d-9112-d4421de932d9",
"baseRuleId": "50214",
"name": "rule_920_112",
"state": "Coding"
}
],
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/projects/c4c54dfb-870c-463e-9628-353cfe2c1873/rules/fe037219-79dd-43c8-92ed-2ef84bde9a21",
"uri": "/detectionDefinition/projects/c4c54dfb-870c-463e-9628-353cfe2c1873/rules/fe037219-79dd-43c8-92ed-2ef84bde9a21",
"type": "application/vnd.sas.detection.rule"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/projects/c4c54dfb-870c-463e-9628-353cfe2c1873/rules/fe037219-79dd-43c8-92ed-2ef84bde9a21",
"uri": "/detectionDefinition/projects/c4c54dfb-870c-463e-9628-353cfe2c1873/rules/fe037219-79dd-43c8-92ed-2ef84bde9a21",
"type": "application/vnd.sas.detection.rule"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/projects/c4c54dfb-870c-463e-9628-353cfe2c1873/rules/fe037219-79dd-43c8-92ed-2ef84bde9a21",
"uri": "/detectionDefinition/projects/c4c54dfb-870c-463e-9628-353cfe2c1873/rules/fe037219-79dd-43c8-92ed-2ef84bde9a21"
}
]
}
An example of a rule object
{
"creationTimeStamp": "2022-05-26T12:40:40.879Z",
"createdBy": "userid",
"modifiedTimeStamp": "2022-05-26T12:40:40.879Z",
"modifiedBy": "userid",
"revision": 0,
"version": 1,
"id": "b9bb5ebd-c7d9-4703-8cc8-0bdc6afd77d6",
"name": "Rule2",
"description": "Rule 2",
"baseRuleId": "50001",
"ruleVersion": 1,
"messageClassificationId": "ced5ac46-825b-46eb-9cc5-734a8bb58654",
"schemaName": "PB Schema",
"projectId": "4e7d08ea-31de-474c-ab59-26ebe73101c1",
"ruleTypeName": "variable",
"state": "Coding",
"configuredOperationalState": "0",
"executionOrderType": 0,
"operationalState": "0",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/projects/4e7d08ea-31de-474c-ab59-26ebe73101c1/rules/b9bb5ebd-c7d9-4703-8cc8-0bdc6afd77d6",
"uri": "/detectionDefinition/projects/4e7d08ea-31de-474c-ab59-26ebe73101c1/rules/b9bb5ebd-c7d9-4703-8cc8-0bdc6afd77d6",
"type": "application/vnd.sas.detection.rule"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/projects/4e7d08ea-31de-474c-ab59-26ebe73101c1/rules/b9bb5ebd-c7d9-4703-8cc8-0bdc6afd77d6",
"uri": "/detectionDefinition/projects/4e7d08ea-31de-474c-ab59-26ebe73101c1/rules/b9bb5ebd-c7d9-4703-8cc8-0bdc6afd77d6",
"type": "application/vnd.sas.detection.rule"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/projects/4e7d08ea-31de-474c-ab59-26ebe73101c1/rules/b9bb5ebd-c7d9-4703-8cc8-0bdc6afd77d6",
"uri": "/detectionDefinition/projects/4e7d08ea-31de-474c-ab59-26ebe73101c1/rules/b9bb5ebd-c7d9-4703-8cc8-0bdc6afd77d6"
}
]
}
An example of an error 400 when the 'ruleId' path parameter is not valid.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"123\" for the field \"ruleId\" does not match the documented format.",
"details": [
"field: ruleId",
"value: 123",
"messageID: detection-lib-api-icu.validation.invalid.value.msg",
"path: /detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/123",
"correlator: e763b136-5508-4d07-a59c-9a0c4a44aad1"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | rulev2 |
400 | Bad Request | A bad request. Possible reason or reasons: |
|
- The rule ID might be invalid. |
error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Etag | string | An hash-code for the response resource. | |
200 | Last-Modified | string | Date and time of last modification. | |
200 | Location | string | Location of URI for the endpoint. |
Partially Update a Rule
Code samples
# You can also use wget
curl -X PATCH http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/{ruleId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.detection.rule.patch+json' \
-H 'Accept: application/vnd.sas.detection.rule.with.code+json'
const inputBody = '{
"revision": 2,
"name": "Rule name - updated",
"description": "Rule description - updated",
"code": "ZGV0ZWN0aW9uLkRlYnVnKCdoZWxsbycpOw==",
"messageClassificationId": "ced5ac46-825b-46eb-9cc5-734a8bb58654",
"schemaName": "Payments",
"alertType": "A",
"alertReason": "The reason for any alerts that were generated by the rule",
"operationalTimeLimit": 20
}';
const headers = {
'Content-Type':'application/vnd.sas.detection.rule.patch+json',
'Accept':'application/vnd.sas.detection.rule.with.code+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/{ruleId}',
{
method: 'PATCH',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.detection.rule.patch+json',
'Accept': 'application/vnd.sas.detection.rule.with.code+json'
}
r = requests.patch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/{ruleId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.detection.rule.patch+json"},
"Accept": []string{"application/vnd.sas.detection.rule.with.code+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PATCH", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/{ruleId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PATCH /projects/{projectId}/rules/{ruleId}
Partially updates the properties of a rule.
The rule must be in the Coding state.
Body parameter
An example of update rule request content.
{
"revision": 2,
"name": "Rule name - updated",
"description": "Rule description - updated",
"code": "ZGV0ZWN0aW9uLkRlYnVnKCdoZWxsbycpOw==",
"messageClassificationId": "ced5ac46-825b-46eb-9cc5-734a8bb58654",
"schemaName": "Payments",
"alertType": "A",
"alertReason": "The reason for any alerts that were generated by the rule",
"operationalTimeLimit": 20
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | updateRuleInputv2 | false | none |
projectId | path | string(uuid) | true | The UUID of the project. |
ruleId | path | string(uuid) | true | The UUID of the rule. |
Example responses
Example response from a successful rule update request.
{
"creationTimeStamp": "2022-11-17T21:53:00.168Z",
"createdBy": "user1",
"modifiedTimeStamp": "2022-12-01T19:01:31.579Z",
"modifiedBy": "user1",
"revision": 3,
"version": 1,
"id": "9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"name": "Rule name - updated",
"code": "ZGV0ZWN0aW9uLkRlYnVnKCdoZWxsbycpOw==",
"description": "Rule description - updated",
"baseRuleId": "50320",
"ruleVersion": 1,
"messageClassificationId": "ced5ac46-825b-46eb-9cc5-734a8bb58654",
"schemaName": "Payments",
"projectId": "0d2379c7-9a0e-4a29-b03f-0bbe25d1333f",
"state": "Coding",
"alertType": "A",
"alertReason": "The reason for any alerts that were generated by the rule",
"operationalTimeLimit": 20,
"executionOrderType": 0,
"configuredOperationalState": "0",
"ruleTypeName": "decision",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"uri": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"type": "application/vnd.sas.detection.rule"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"uri": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"type": "application/vnd.sas.detection.rule"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"uri": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/9c17ec3c-ec73-45f3-896e-f7a3482f2d31"
}
]
}
{
"creationTimeStamp": "2022-11-17T21:53:00.168Z",
"createdBy": "user1",
"modifiedTimeStamp": "2022-12-01T19:01:31.579Z",
"modifiedBy": "user1",
"revision": 3,
"version": 1,
"id": "9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"name": "Rule name - updated",
"code": "ZGV0ZWN0aW9uLkRlYnVnKCdoZWxsbycpOw==",
"description": "Rule description - updated",
"baseRuleId": "50320",
"ruleVersion": 1,
"messageClassificationId": "ced5ac46-825b-46eb-9cc5-734a8bb58654",
"schemaName": "Payments",
"projectId": "0d2379c7-9a0e-4a29-b03f-0bbe25d1333f",
"state": "Coding",
"alertType": "A",
"alertReason": "The reason for any alerts that were generated by the rule",
"operationalTimeLimit": 20,
"executionOrderType": 0,
"configuredOperationalState": "0",
"ruleTypeName": "decision",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"uri": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"type": "application/vnd.sas.detection.rule"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"uri": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"type": "application/vnd.sas.detection.rule"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"uri": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/9c17ec3c-ec73-45f3-896e-f7a3482f2d31"
}
]
}
An example error 400 response when the 'ruleId' path parameter is not valid.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"abc\" for the field \"ruleId\" does not match the documented format.",
"details": [
"field: ruleId",
"value: abc",
"messageID: detection-lib-api-icu.validation.invalid.value.msg",
"path: /detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/abc",
"correlator: 42b67d9b-12a2-4048-a17b-07ac8c5d67ea"
]
}
An example 409 error response when the rule cannot be updated due to its state.
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000022,
"message": "The rule with name rule 2 cannot be updated while it is in state Testing.",
"details": [
"ID: 9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"Name: rule 2",
"State: Testing",
"messageID: detection-definition-api-icu.rule.state.update.not.allowed.msg",
"path: /detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"correlator: 012f6bcc-aafa-4118-9eb7-f720b1ca00b1"
]
}
An example 412 error response when the request 'If-Match' header is not valid.
{
"version": 2,
"httpStatusCode": 412,
"errorCode": 1000000,
"message": "The object has been updated since you last retrieved it.",
"details": [
"messageID: detection-definition-api-icu.etag.mismatch.msg",
"path: /detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"correlator: 0d4caa88-eea3-45a7-b310-f65190cebdca"
]
}
An example 428 error response when the request does not include the conditional update 'If-Match' header.
{
"version": 2,
"httpStatusCode": 428,
"errorCode": 1000021,
"message": "Conditional match header is missing.",
"details": [
"messageID: detection-lib-api-icu.ifMatch.missing.msg",
"path: /detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"correlator: 4742c881-41a0-490e-9897-e29748ebcae1"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The rule was updated. | ruleWithCodev2 |
400 | Bad Request | The request was invalid | error2 |
409 | Conflict | There is a conflict with an existing resource. Possible Reason(s): |
- The messageClassificationId
value is not associated with the project.
- The schemaName
value is not associated with the project.|error2|
|412|Precondition Failed|The supplied pre-condition was not satisfied. This typically indicates stale data.|error2|
|428|Precondition Required|A required pre-condition (If-Match/If-Unmodified-Since) was not provided.|error2|
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Etag | string | An hash-code for the response resource. | |
200 | Last-Modified | string | Date and time of last modification. | |
200 | Location | string | Location of URI for the endpoint. | |
409 | Location | string | Location of URI for the endpoint. | |
412 | Location | string | Location of URI for the endpoint. | |
428 | Location | string | Location of URI for the endpoint. |
Delete a Rule
Code samples
# You can also use wget
curl -X DELETE http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/{ruleId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.error+json'
const headers = {
'Accept':'application/vnd.sas.error+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/{ruleId}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.error+json'
}
r = requests.delete('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/{ruleId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.error+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/{ruleId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /projects/{projectId}/rules/{ruleId}
Deletes a rule in the identified project.
The rule must be in the Recycle state.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
projectId | path | string(uuid) | true | The UUID of the project. |
ruleId | path | string(uuid) | true | The UUID of the rule. |
Example responses
An example error response due to an invalid 'ruleId' path parameter.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"abc\" for the field \"ruleId\" does not match the documented format.",
"details": [
"field: ruleId",
"value: abc",
"messageID: detection-lib-api-icu.validation.invalid.value.msg",
"path: /detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/abc",
"correlator: 0291b93c-48db-4e30-9d9d-9d4babce85b4"
]
}
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"abc\" for the field \"ruleId\" does not match the documented format.",
"details": [
"field: ruleId",
"value: abc",
"messageID: detection-lib-api-icu.validation.invalid.value.msg",
"path: /detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/abc",
"correlator: 0291b93c-48db-4e30-9d9d-9d4babce85b4"
]
}
Example of an error when you request to delete a rule that is not in the Recycle state.
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000020,
"message": "The rule with name XYZ cannot be deleted while it is in state Testing.",
"details": [
"Name: XYZ",
"State: Testing",
"messageID: detection-definition-api-icu.rule.state.delete.not.allowed.msg",
"path: /detectionDefinition/projects/2184fda8-1dd3-4192-8a7c-1c7a4aff89f9/rules/1e6339a7-15df-4132-9b7a-7a761704ee9f",
"correlator: b4a9719c-defe-4f5d-9768-b29923cc4ecd"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | Deleted | None |
400 | Bad Request | The request was invalid (for example, invalid data or invalid structure in the request body). | error2 |
409 | Conflict | The request was not deleted due to a conflict. |
|
For example, the rule was not deleted because it is not in the Recycle state. | error2 |
Create a New Rule Version
Code samples
# You can also use wget
curl -X POST http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/{ruleId}/revisions \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.detection.rule+json' \
-H 'Accept: application/vnd.sas.detection.rule+json'
const inputBody = '{}';
const headers = {
'Content-Type':'application/vnd.sas.detection.rule+json',
'Accept':'application/vnd.sas.detection.rule+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/{ruleId}/revisions',
{
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.detection.rule+json',
'Accept': 'application/vnd.sas.detection.rule+json'
}
r = requests.post('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/{ruleId}/revisions', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.detection.rule+json"},
"Accept": []string{"application/vnd.sas.detection.rule+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/{ruleId}/revisions", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /projects/{projectId}/rules/{ruleId}/revisions
Creates a new rule (with a new version number) from an existing rule in the same project.
The new rule is created in the Coding state, has the same base rule ID as the existing rule,
and has the next sequential rule version number for the base rule ID.
Other field values are copied from the existing rule that the new rule was created from.
Body parameter
{}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | object | false | none |
projectId | path | string(uuid) | true | The UUID of the project. |
ruleId | path | string(uuid) | true | The UUID of the rule. |
Example responses
An example of response content from the creation of a new rule version.
{
"creationTimeStamp": "2022-10-07T17:00:12.882Z",
"createdBy": "user1",
"modifiedTimeStamp": "2022-10-07T17:00:12.882Z",
"modifiedBy": "user1",
"revision": 0,
"version": 1,
"id": "157785f9-7f9f-40b0-9f2c-f5ddb4c49576",
"name": "rule name",
"baseRuleId": "50242",
"ruleVersion": 5,
"messageClassificationId": "e1162a93-d6dc-11ec-b036-6631d4e9d21c",
"schemaName": "Cards",
"projectId": "9b32dcd6-d3e2-4bec-bb1e-eaf878aa160a",
"state": "Coding",
"executionOrderType": 0,
"configuredOperationalState": "0",
"ruleTypeName": "decision",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/projects/9b32dcd6-d3e2-4bec-bb1e-eaf878aa160a/rules/157785f9-7f9f-40b0-9f2c-f5ddb4c49576",
"uri": "/detectionDefinition/projects/9b32dcd6-d3e2-4bec-bb1e-eaf878aa160a/rules/157785f9-7f9f-40b0-9f2c-f5ddb4c49576",
"type": "application/vnd.sas.detection.rule"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/projects/9b32dcd6-d3e2-4bec-bb1e-eaf878aa160a/rules/157785f9-7f9f-40b0-9f2c-f5ddb4c49576",
"uri": "/detectionDefinition/projects/9b32dcd6-d3e2-4bec-bb1e-eaf878aa160a/rules/157785f9-7f9f-40b0-9f2c-f5ddb4c49576",
"type": "application/vnd.sas.detection.rule"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/projects/9b32dcd6-d3e2-4bec-bb1e-eaf878aa160a/rules/157785f9-7f9f-40b0-9f2c-f5ddb4c49576",
"uri": "/detectionDefinition/projects/9b32dcd6-d3e2-4bec-bb1e-eaf878aa160a/rules/157785f9-7f9f-40b0-9f2c-f5ddb4c49576"
}
]
}
{
"creationTimeStamp": "2022-10-07T17:00:12.882Z",
"createdBy": "user1",
"modifiedTimeStamp": "2022-10-07T17:00:12.882Z",
"modifiedBy": "user1",
"revision": 0,
"version": 1,
"id": "157785f9-7f9f-40b0-9f2c-f5ddb4c49576",
"name": "rule name",
"baseRuleId": "50242",
"ruleVersion": 5,
"messageClassificationId": "e1162a93-d6dc-11ec-b036-6631d4e9d21c",
"schemaName": "Cards",
"projectId": "9b32dcd6-d3e2-4bec-bb1e-eaf878aa160a",
"state": "Coding",
"executionOrderType": 0,
"configuredOperationalState": "0",
"ruleTypeName": "decision",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/projects/9b32dcd6-d3e2-4bec-bb1e-eaf878aa160a/rules/157785f9-7f9f-40b0-9f2c-f5ddb4c49576",
"uri": "/detectionDefinition/projects/9b32dcd6-d3e2-4bec-bb1e-eaf878aa160a/rules/157785f9-7f9f-40b0-9f2c-f5ddb4c49576",
"type": "application/vnd.sas.detection.rule"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/projects/9b32dcd6-d3e2-4bec-bb1e-eaf878aa160a/rules/157785f9-7f9f-40b0-9f2c-f5ddb4c49576",
"uri": "/detectionDefinition/projects/9b32dcd6-d3e2-4bec-bb1e-eaf878aa160a/rules/157785f9-7f9f-40b0-9f2c-f5ddb4c49576",
"type": "application/vnd.sas.detection.rule"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/projects/9b32dcd6-d3e2-4bec-bb1e-eaf878aa160a/rules/157785f9-7f9f-40b0-9f2c-f5ddb4c49576",
"uri": "/detectionDefinition/projects/9b32dcd6-d3e2-4bec-bb1e-eaf878aa160a/rules/157785f9-7f9f-40b0-9f2c-f5ddb4c49576"
}
]
}
Example 400 error response when the 'ruleId' path parameter is invalid.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"abc\" for the field \"ruleId\" does not match the documented format.",
"details": [
"value: abc",
"messageID: detection-lib-api-icu.validation.invalid.value.msg",
"field: ruleId",
"path: /detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/abc/revisions",
"correlator: 5262c240-2e14-4c63-ad03-507a6bf17344"
]
}
Example 409 error response when a version of the rule already exists in Coding or Testing.
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000017,
"message": "The operation cannot be completed for rule \"Test rule\" in Recycle. A version of the rule with name \"Test rule\" already exists in Testing.",
"details": [
"messageID: detection-definition-api-icu.rule.dependency.blocking.error.msg",
"Name: Test rule",
"State: Recycle",
"BlockingName: Test rule",
"BlockingState: Testing",
"path: /detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/a55561c2-f4e4-4c47-96a1-3cda4928034a/revisions",
"correlator: f57d3a18-d9f7-485d-9b83-cbf3bcc0f6a0"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Created | createRuleVersionResponsev2 |
400 | Bad Request | Invalid request | error2 |
409 | Conflict | The request could not be completed due to a conflict with another resource. For example, a new rule cannot be created in the Coding state because a rule with the same base rule ID already exists in either the Coding state or the Testing state. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Etag | string | An hash-code for the response resource. | |
201 | Last-Modified | string | Date and time of last modification. | |
201 | Location | string | Location of URI for the endpoint. |
Transition Rule State
Code samples
# You can also use wget
curl -X POST http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/transitions \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.sas.collection+json'
const inputBody = '{
"rules": [
{
"id": "f49e2549-02ef-428f-b53d-2e766efbecb3",
"revision": 1
},
{
"id": "b62c2d58-8126-4d65-a8ad-4a225e51cb96",
"revision": 7
}
],
"stateTransition": {
"sourceState": "Coding",
"destinationState": "Testing"
}
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/vnd.sas.collection+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/transitions',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.post('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/transitions', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/vnd.sas.collection+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/transitions", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /projects/{projectId}/rules/transitions
Updates the state of a set of rules to Coding, Testing, Production or Recycle. The update is atomic. Either all the provided rules are updated, or none of the rules are updated. These are the supported state transitions and their consistency requirements.
Coding to Testing
- Rule code must be free of syntax errors.
- Rule type dependencies must be satisfied. A variable rule that depends on a decision rule cannot be promoted.
- Rule state dependencies must be satisfied in the Testing state. A rule cannot be promoted to Testing if it depends on a rule in Coding, unless the rule it depends on is also promoted at the same time.
- A rule cannot depend on itself, either directly or indirectly.
- If the rule code uses an action that creates an alert, the rule must be associated with an alert type.
- If the rule belongs to an organization that deploys testing rules, then the rule code cannot use an inactive advanced list. ### Testing to Production
- Rule state dependencies must be satisfied in the Production state. A rule cannot be promoted to Production if it depends on a rule in Testing, unless the rule it depends on is also promoted at the same time.
- A rule cannot depend on itself, either directly or indirectly
- The rule code cannot use an inactive advanced list. ### Production to Recycle
- Rule state dependencies must be satisfied in the Production and Testing states. A rule cannot be moved to Recycle if other rules in Production or Testing depend on it. ### Testing to Coding
- Rule state dependencies must be satisfied in the Testing state. A rule cannot be moved to Coding if other rules in Testing depend on it. ### Coding to Recycle
- Rule dependencies are not enforced in Coding, so this transition is always allowed.
Body parameter
An example of rule state change request content
{
"rules": [
{
"id": "f49e2549-02ef-428f-b53d-2e766efbecb3",
"revision": 1
},
{
"id": "b62c2d58-8126-4d65-a8ad-4a225e51cb96",
"revision": 7
}
],
"stateTransition": {
"sourceState": "Coding",
"destinationState": "Testing"
}
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | ruleTransition | false | Selection of rules and state transition |
projectId | path | string(uuid) | true | The UUID of the project. |
Example responses
Example response from successful rule transition.
[
{
"creationTimeStamp": "2022-11-17T21:53:00.168Z",
"createdBy": "user1",
"modifiedTimeStamp": "2022-11-21T19:51:30.956Z",
"modifiedBy": "user1",
"version": 1,
"id": "9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"name": "rule 2",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"uri": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"type": "application/vnd.sas.detection.rule"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"uri": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"type": "application/vnd.sas.detection.rule"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"uri": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/9c17ec3c-ec73-45f3-896e-f7a3482f2d31"
}
],
"revision": 2
}
]
Example of a 400 error response when the request body contains an invalid resource ID.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The specified object with type \"RuleStateTransition\" is invalid.",
"details": [
"Type: RuleStateTransition",
"messageID: detection-definition-api-icu.object.invalid.msg",
"path: /detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/transitions",
"correlator: 44b6e4ab-1633-4fa9-ab08-9c89f46b7dfb"
],
"errors": [
{
"version": 2,
"httpStatusCode": 500,
"message": "Key: 'RuleStateTransition.Rules[0].ID' Error:Field validation for 'ID' failed on the 'uuid' tag"
}
]
}
Example of 409 error response when rule data in the request body is stale.
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000022,
"message": "The object has been updated since you last retrieved it.",
"details": [
"messageID: detection-definition-api-icu.etag.mismatch.msg",
"path: /detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/transitions",
"correlator: 74edcc66-6e36-4345-8c19-5434ec5762d8"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Transition successful | ruleTransitionCollection |
400 | Bad Request | Invalid request | error2 |
409 | Conflict | The request could not be completed due to a conflict with another resource. For example: |
A rule cannot be moved to destinationState
because it depends on a rule that is not available in that state.
A resource revision
in the request body is not valid.|error2|
Get Rule Prioritizations
Code samples
# You can also use wget
curl -X GET http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/prioritizations \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json' \
-H 'Accept-Item: application/vnd.sas.detection.rule.prioritization+json'
const headers = {
'Accept':'application/vnd.sas.collection+json',
'Accept-Item':'application/vnd.sas.detection.rule.prioritization+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/prioritizations',
{
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.detection.rule.prioritization+json'
}
r = requests.get('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/prioritizations', 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.detection.rule.prioritization+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/prioritizations", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /projects/{projectId}/rules/prioritizations
Gets the active rules in the project in prioritized order, based on rule type, execution order type, and execution order priority: - Variable rules - Pre Rules - Dependency Ordered Rules - Post Rules - Decision rules - Pre Rules - Dependency Ordered Rules - Post Rules
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Item | header | string(media-type) | false | The media type representation for items in the returned collection. |
ruleTypeName | query | string | false | The rule type to be returned from the query. |
projectId | path | string(uuid) | true | The UUID of the project. |
Enumerated Values
Parameter | Value |
---|---|
Accept-Item | application/vnd.sas.detection.rule.prioritization+json |
ruleTypeName | variable |
ruleTypeName | decision |
Example responses
An example of a collection of rule prioritizations.
{
"version": 2,
"accept": "application/vnd.sas.detection.rule.prioritization",
"count": 31,
"start": 0,
"limit": 100,
"name": "rules",
"items": [
{
"version": 1,
"id": "3266224a-1dfe-448c-9197-11f541f6235b",
"name": "Variable Rule 1",
"baseRuleId": "50110",
"ruleVersion": 1,
"state": "Coding",
"ruleTypeName": "variable",
"executionOrderType": 0,
"executionOrderPriority": 0,
"dependencies": null
},
{
"version": 1,
"id": "8756a831-680a-44f7-8329-036a0333f5a8",
"name": "Variable Rule 2",
"baseRuleId": "50113",
"ruleVersion": 1,
"state": "Coding",
"ruleTypeName": "variable",
"executionOrderType": 0,
"executionOrderPriority": 0,
"dependencies": null
},
{
"version": 1,
"id": "65579322-3961-42d7-8c0b-45d079ddaa25",
"name": "Variable Rule 3",
"baseRuleId": "50111",
"ruleVersion": 1,
"state": "Coding",
"ruleTypeName": "variable",
"executionOrderType": 0,
"executionOrderPriority": 0,
"dependencies": [
{
"dependency": {
"dependencyType": "STRONG",
"baseRuleId": "50113"
},
"resolvedRule": {
"ruleId": "8756a831-680a-44f7-8329-036a0333f5a8",
"baseRuleId": "50113",
"ruleVersion": 1,
"name": "Variable Rule 2",
"ruleTypeName": "variable",
"state": "Coding"
}
}
]
},
{
"version": 1,
"id": "686900fb-f789-4584-bae8-471560bc8e76",
"name": "Variable Rule 4",
"baseRuleId": "50307",
"ruleVersion": 1,
"state": "Coding",
"ruleTypeName": "variable",
"executionOrderType": 0,
"executionOrderPriority": 0,
"dependencies": [
{
"dependency": {
"dependencyType": "WEAK",
"usedVariables": [
{
"messageName": "Global Profile",
"name": "count_foo",
"jsonPath": ".pb_var_set",
"isModifying": false
}
]
},
"resolvedRule": {
"ruleId": "3266224a-1dfe-448c-9197-11f541f6235b",
"baseRuleId": "50110",
"ruleVersion": 1,
"name": "Variable Rule 1",
"ruleTypeName": "variable",
"state": "Coding"
}
}
]
},
{
"version": 1,
"id": "aaf13951-cb67-484f-a79d-60f7fe5a5509",
"name": "Decision Rule A",
"baseRuleId": "50022",
"ruleVersion": 1,
"state": "Production",
"ruleTypeName": "decision",
"executionOrderType": 0,
"executionOrderPriority": 0,
"dependencies": null
},
{
"version": 1,
"id": "539a3914-835a-47e8-8ef5-604c4c9b886a",
"name": "Decision Rule B",
"baseRuleId": "50023",
"ruleVersion": 1,
"state": "Production",
"ruleTypeName": "decision",
"executionOrderType": 0,
"executionOrderPriority": 0,
"dependencies": [
{
"dependency": {
"dependencyType": "STRONG",
"creationTimeStamp": "1901-01-01T00:00:00.000Z"
},
"resolvedRule": {
"ruleId": "aaf13951-cb67-484f-a79d-60f7fe5a5509",
"baseRuleId": "50022",
"ruleVersion": 1,
"name": "Decision Rule A",
"ruleTypeName": "decision",
"state": "Production"
}
}
]
}
]
}
{
"version": 2,
"accept": "application/vnd.sas.detection.rule.prioritization",
"count": 31,
"start": 0,
"limit": 100,
"name": "rules",
"items": [
{
"version": 1,
"id": "3266224a-1dfe-448c-9197-11f541f6235b",
"name": "Variable Rule 1",
"baseRuleId": "50110",
"ruleVersion": 1,
"state": "Coding",
"ruleTypeName": "variable",
"executionOrderType": 0,
"executionOrderPriority": 0,
"dependencies": null
},
{
"version": 1,
"id": "8756a831-680a-44f7-8329-036a0333f5a8",
"name": "Variable Rule 2",
"baseRuleId": "50113",
"ruleVersion": 1,
"state": "Coding",
"ruleTypeName": "variable",
"executionOrderType": 0,
"executionOrderPriority": 0,
"dependencies": null
},
{
"version": 1,
"id": "65579322-3961-42d7-8c0b-45d079ddaa25",
"name": "Variable Rule 3",
"baseRuleId": "50111",
"ruleVersion": 1,
"state": "Coding",
"ruleTypeName": "variable",
"executionOrderType": 0,
"executionOrderPriority": 0,
"dependencies": [
{
"dependency": {
"dependencyType": "STRONG",
"baseRuleId": "50113"
},
"resolvedRule": {
"ruleId": "8756a831-680a-44f7-8329-036a0333f5a8",
"baseRuleId": "50113",
"ruleVersion": 1,
"name": "Variable Rule 2",
"ruleTypeName": "variable",
"state": "Coding"
}
}
]
},
{
"version": 1,
"id": "686900fb-f789-4584-bae8-471560bc8e76",
"name": "Variable Rule 4",
"baseRuleId": "50307",
"ruleVersion": 1,
"state": "Coding",
"ruleTypeName": "variable",
"executionOrderType": 0,
"executionOrderPriority": 0,
"dependencies": [
{
"dependency": {
"dependencyType": "WEAK",
"usedVariables": [
{
"messageName": "Global Profile",
"name": "count_foo",
"jsonPath": ".pb_var_set",
"isModifying": false
}
]
},
"resolvedRule": {
"ruleId": "3266224a-1dfe-448c-9197-11f541f6235b",
"baseRuleId": "50110",
"ruleVersion": 1,
"name": "Variable Rule 1",
"ruleTypeName": "variable",
"state": "Coding"
}
}
]
},
{
"version": 1,
"id": "aaf13951-cb67-484f-a79d-60f7fe5a5509",
"name": "Decision Rule A",
"baseRuleId": "50022",
"ruleVersion": 1,
"state": "Production",
"ruleTypeName": "decision",
"executionOrderType": 0,
"executionOrderPriority": 0,
"dependencies": null
},
{
"version": 1,
"id": "539a3914-835a-47e8-8ef5-604c4c9b886a",
"name": "Decision Rule B",
"baseRuleId": "50023",
"ruleVersion": 1,
"state": "Production",
"ruleTypeName": "decision",
"executionOrderType": 0,
"executionOrderPriority": 0,
"dependencies": [
{
"dependency": {
"dependencyType": "STRONG",
"creationTimeStamp": "1901-01-01T00:00:00.000Z"
},
"resolvedRule": {
"ruleId": "aaf13951-cb67-484f-a79d-60f7fe5a5509",
"baseRuleId": "50022",
"ruleVersion": 1,
"name": "Decision Rule A",
"ruleTypeName": "decision",
"state": "Production"
}
}
]
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | rulePrioritizationCollection |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Etag | string | An hash-code for the response resource. | |
200 | Last-Modified | string | Date and time of last modification. | |
200 | Location | string | Location of URI for the endpoint. |
Update Rule Prioritizations
Code samples
# You can also use wget
curl -X PATCH http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/prioritizations \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.detection.rule.prioritization.diff+json' \
-H 'Accept: application/vnd.sas.collection+json'
const inputBody = '{
"diff": [
{
"id": "3266224a-1dfe-448c-9197-11f541f6235b",
"executionOrderType": -1,
"executionOrderPriority": 0
},
{
"id": "539a3914-835a-47e8-8ef5-604c4c9b886a",
"executionOrderType": 1,
"executionOrderPriority": 0
}
]
}';
const headers = {
'Content-Type':'application/vnd.sas.detection.rule.prioritization.diff+json',
'Accept':'application/vnd.sas.collection+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/prioritizations',
{
method: 'PATCH',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.detection.rule.prioritization.diff+json',
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.patch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/prioritizations', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.detection.rule.prioritization.diff+json"},
"Accept": []string{"application/vnd.sas.collection+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PATCH", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/prioritizations", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PATCH /projects/{projectId}/rules/prioritizations
Updates rule prioritizations in the project. Rule prioritizations can be updated for rules in the following states: - Coding - Testing - Production
Body parameter
An example of an update rule prioritizations request body.
{
"diff": [
{
"id": "3266224a-1dfe-448c-9197-11f541f6235b",
"executionOrderType": -1,
"executionOrderPriority": 0
},
{
"id": "539a3914-835a-47e8-8ef5-604c4c9b886a",
"executionOrderType": 1,
"executionOrderPriority": 0
}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | rulePrioritizationDiff | false | Difference set (diff) of rule prioritizations |
projectId | path | string(uuid) | true | The UUID of the project. |
Example responses
An exmple of a collection of rule prioritizations.
{
"version": 2,
"accept": "application/vnd.sas.detection.rule.prioritization",
"count": 31,
"start": 0,
"limit": 100,
"name": "rules",
"items": [
{
"version": 1,
"id": "3266224a-1dfe-448c-9197-11f541f6235b",
"name": "Variable Rule 1",
"baseRuleId": "50110",
"ruleVersion": 1,
"state": "Coding",
"ruleTypeName": "variable",
"executionOrderType": -1,
"executionOrderPriority": 0,
"dependencies": null
},
{
"version": 1,
"id": "8756a831-680a-44f7-8329-036a0333f5a8",
"name": "Variable Rule 2",
"baseRuleId": "50113",
"ruleVersion": 1,
"state": "Coding",
"ruleTypeName": "variable",
"executionOrderType": 0,
"executionOrderPriority": 0,
"dependencies": null
},
{
"version": 1,
"id": "65579322-3961-42d7-8c0b-45d079ddaa25",
"name": "Variable Rule 3",
"baseRuleId": "50111",
"ruleVersion": 1,
"state": "Coding",
"ruleTypeName": "variable",
"executionOrderType": 0,
"executionOrderPriority": 0,
"dependencies": [
{
"dependency": {
"dependencyType": "STRONG",
"baseRuleId": "50113"
},
"resolvedRule": {
"ruleId": "8756a831-680a-44f7-8329-036a0333f5a8",
"baseRuleId": "50113",
"ruleVersion": 1,
"name": "Variable Rule 2",
"ruleTypeName": "variable",
"state": "Coding"
}
}
]
},
{
"version": 1,
"id": "686900fb-f789-4584-bae8-471560bc8e76",
"name": "Variable Rule 4",
"baseRuleId": "50307",
"ruleVersion": 1,
"state": "Coding",
"ruleTypeName": "variable",
"executionOrderType": 0,
"executionOrderPriority": 0,
"dependencies": [
{
"dependency": {
"dependencyType": "WEAK",
"usedVariables": [
{
"messageName": "Global Profile",
"name": "count_foo",
"jsonPath": ".pb_var_set",
"isModifying": false
}
]
},
"resolvedRule": {
"ruleId": "3266224a-1dfe-448c-9197-11f541f6235b",
"baseRuleId": "50110",
"ruleVersion": 1,
"name": "Variable Rule 1",
"ruleTypeName": "variable",
"state": "Coding"
}
}
]
},
{
"version": 1,
"id": "aaf13951-cb67-484f-a79d-60f7fe5a5509",
"name": "Decision Rule A",
"baseRuleId": "50022",
"ruleVersion": 1,
"state": "Production",
"ruleTypeName": "decision",
"executionOrderType": 0,
"executionOrderPriority": 0,
"dependencies": null
},
{
"version": 1,
"id": "539a3914-835a-47e8-8ef5-604c4c9b886a",
"name": "Decision Rule B",
"baseRuleId": "50023",
"ruleVersion": 1,
"state": "Production",
"ruleTypeName": "decision",
"executionOrderType": 1,
"executionOrderPriority": 0,
"dependencies": [
{
"dependency": {
"dependencyType": "STRONG",
"creationTimeStamp": "1901-01-01T00:00:00.000Z"
},
"resolvedRule": {
"ruleId": "aaf13951-cb67-484f-a79d-60f7fe5a5509",
"baseRuleId": "50022",
"ruleVersion": 1,
"name": "Decision Rule A",
"ruleTypeName": "decision",
"state": "Production"
}
}
]
}
]
}
{
"version": 2,
"accept": "application/vnd.sas.detection.rule.prioritization",
"count": 31,
"start": 0,
"limit": 100,
"name": "rules",
"items": [
{
"version": 1,
"id": "3266224a-1dfe-448c-9197-11f541f6235b",
"name": "Variable Rule 1",
"baseRuleId": "50110",
"ruleVersion": 1,
"state": "Coding",
"ruleTypeName": "variable",
"executionOrderType": -1,
"executionOrderPriority": 0,
"dependencies": null
},
{
"version": 1,
"id": "8756a831-680a-44f7-8329-036a0333f5a8",
"name": "Variable Rule 2",
"baseRuleId": "50113",
"ruleVersion": 1,
"state": "Coding",
"ruleTypeName": "variable",
"executionOrderType": 0,
"executionOrderPriority": 0,
"dependencies": null
},
{
"version": 1,
"id": "65579322-3961-42d7-8c0b-45d079ddaa25",
"name": "Variable Rule 3",
"baseRuleId": "50111",
"ruleVersion": 1,
"state": "Coding",
"ruleTypeName": "variable",
"executionOrderType": 0,
"executionOrderPriority": 0,
"dependencies": [
{
"dependency": {
"dependencyType": "STRONG",
"baseRuleId": "50113"
},
"resolvedRule": {
"ruleId": "8756a831-680a-44f7-8329-036a0333f5a8",
"baseRuleId": "50113",
"ruleVersion": 1,
"name": "Variable Rule 2",
"ruleTypeName": "variable",
"state": "Coding"
}
}
]
},
{
"version": 1,
"id": "686900fb-f789-4584-bae8-471560bc8e76",
"name": "Variable Rule 4",
"baseRuleId": "50307",
"ruleVersion": 1,
"state": "Coding",
"ruleTypeName": "variable",
"executionOrderType": 0,
"executionOrderPriority": 0,
"dependencies": [
{
"dependency": {
"dependencyType": "WEAK",
"usedVariables": [
{
"messageName": "Global Profile",
"name": "count_foo",
"jsonPath": ".pb_var_set",
"isModifying": false
}
]
},
"resolvedRule": {
"ruleId": "3266224a-1dfe-448c-9197-11f541f6235b",
"baseRuleId": "50110",
"ruleVersion": 1,
"name": "Variable Rule 1",
"ruleTypeName": "variable",
"state": "Coding"
}
}
]
},
{
"version": 1,
"id": "aaf13951-cb67-484f-a79d-60f7fe5a5509",
"name": "Decision Rule A",
"baseRuleId": "50022",
"ruleVersion": 1,
"state": "Production",
"ruleTypeName": "decision",
"executionOrderType": 0,
"executionOrderPriority": 0,
"dependencies": null
},
{
"version": 1,
"id": "539a3914-835a-47e8-8ef5-604c4c9b886a",
"name": "Decision Rule B",
"baseRuleId": "50023",
"ruleVersion": 1,
"state": "Production",
"ruleTypeName": "decision",
"executionOrderType": 1,
"executionOrderPriority": 0,
"dependencies": [
{
"dependency": {
"dependencyType": "STRONG",
"creationTimeStamp": "1901-01-01T00:00:00.000Z"
},
"resolvedRule": {
"ruleId": "aaf13951-cb67-484f-a79d-60f7fe5a5509",
"baseRuleId": "50022",
"ruleVersion": 1,
"name": "Decision Rule A",
"ruleTypeName": "decision",
"state": "Production"
}
}
]
}
]
}
An example error 400 response when the 'id' in the request body is not valid.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The specified object with type \"application/vnd.sas.detection.rule.prioritization\" is invalid.",
"details": [
"path: /detectionDefinition/projects/a10b03a3-215b-4cfc-95fc-9de206b96ce3/rules/prioritizations",
"correlator: 0826157b-6ec6-4d52-a766-48295a651fd6"
]
}
An example error response when the request attempts to update the prioritization of a rule that is not in an allowed state.
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000022,
"message": "The rule \"Rule name\" cannot be updated while it is in \"Archive\".",
"details": [
"path: /detectionDefinition/projects/a10b03a3-215b-4cfc-95fc-9de206b96ce3/rules/prioritizations",
"correlator: 0b5d7e30-f170-4f0e-afa2-a17cd9fbc7c3"
]
}
An example 412 error response when the request 'If-Match' header is not valid.
{
"version": 2,
"httpStatusCode": 412,
"errorCode": 1000000,
"message": "The object has been updated since you last retrieved it.",
"details": [
"messageID: detection-definition-api-icu.etag.mismatch.msg",
"path: /detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/prioritizations",
"correlator: 0d4caa88-eea3-45a7-b310-f65190cebdca"
]
}
An example of an error response when the rule prioritization request would result in an execution order inconsistent with rule dependencies.
{
"version": 2,
"httpStatusCode": 422,
"errorCode": 1000015,
"message": "The rule \"Rule 2\" has a dependency on rule \"Rule 1\". You cannot move rule \"Rule 2\" to be before rule \"Rule 1\".",
"details": [
"path: /detectionDefinition/projects/a10b03a3-215b-4cfc-95fc-9de206b96ce3/rules/prioritizations",
"correlator: 1987aa26-a6d3-4dac-b299-d5ad1477048c"
]
}
An example 428 error response when the request does not include the conditional update 'If-Match' header.
{
"version": 2,
"httpStatusCode": 428,
"errorCode": 1000021,
"message": "Conditional match header is missing.",
"details": [
"messageID: detection-lib-api-icu.ifMatch.missing.msg",
"path: /detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/prioritizations",
"correlator: 4742c881-41a0-490e-9897-e29748ebcae1"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | rulePrioritizationCollection |
400 | Bad Request | The request was invalid | error2 |
409 | Conflict | There is a conflict with an existing resource. |
Possible reason or reasons:
- The request attempts to change the prioritization of a rule that is not in an allowed state.|error2|
|412|Precondition Failed|The supplied pre-condition was not satisfied. This typically indicates stale data.|error2|
|422|Unprocessable Entity|The request cannot be processed even though it is syntactically valid. Possible reasons include:
- The reprioritized rules would not be consistent with strong rule dependencies.
- A rule would be moved before a rule that it has a strong dependency on.
- A rule would be moved after a rule that has a strong dependency on it.
- The reprioritized rules would result in 2 or more rules of the same type (variable or decision)
and the same execution order type (Pre Rules or Post Rules) having the same execution order priority.|error2|
|428|Precondition Required|A required pre-condition (If-Match/If-Unmodified-Since) was not provided.|error2|
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Etag | string | An hash-code for the response resource. | |
200 | Last-Modified | string | Date and time of last modification. | |
200 | Location | string | Location of URI for the endpoint. | |
412 | Location | string | Location of URI for the endpoint. | |
422 | Location | string | Location of URI for the endpoint. | |
428 | Location | string | Location of URI for the endpoint. |
Disable Rules
Code samples
# You can also use wget
curl -X POST http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/disabled \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.sas.collection+json'
const inputBody = '{
"rules": [
{
"id": "f49e2549-02ef-428f-b53d-2e766efbecb3",
"revision": 1
},
{
"id": "b62c2d58-8126-4d65-a8ad-4a225e51cb96",
"revision": 7
}
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/vnd.sas.collection+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/disabled',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.post('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/disabled', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/vnd.sas.collection+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/disabled", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /projects/{projectId}/rules/disabled
Disables a set of rules so they cannot be run against incoming transactions. If any rule in the set cannot be disabled (for example, a rule has an invalid rule ID), then no rules are disabled.
Body parameter
An example of a request to enable or disable rules.
{
"rules": [
{
"id": "f49e2549-02ef-428f-b53d-2e766efbecb3",
"revision": 1
},
{
"id": "b62c2d58-8126-4d65-a8ad-4a225e51cb96",
"revision": 7
}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | ruleIdList | false | Selection of rules |
projectId | path | string(uuid) | true | The UUID of the project. |
Example responses
Example response from successful disabling or enabling of a rule.
[
{
"creationTimeStamp": "2022-11-17T21:53:00.168Z",
"createdBy": "user1",
"modifiedTimeStamp": "2022-11-21T19:51:30.956Z",
"modifiedBy": "user1",
"version": 1,
"id": "9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"name": "rule 2",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"uri": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"type": "application/vnd.sas.detection.rule"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"uri": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"type": "application/vnd.sas.detection.rule"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"uri": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/9c17ec3c-ec73-45f3-896e-f7a3482f2d31"
}
],
"revision": 2
}
]
Example of a 400 error response when the request body contains an invalid resource ID.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The specified object with type \"RuleIDList\" is invalid.",
"details": [
"path: /detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/disabled",
"correlator: 44b6e4ab-1633-4fa9-ab08-9c89f46b7dfb"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Disable successful | ruleDisableCollection |
400 | Bad Request | Invalid request | error2 |
Enable Rules
Code samples
# You can also use wget
curl -X POST http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/enabled \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.sas.collection+json'
const inputBody = '{
"rules": [
{
"id": "f49e2549-02ef-428f-b53d-2e766efbecb3",
"revision": 1
},
{
"id": "b62c2d58-8126-4d65-a8ad-4a225e51cb96",
"revision": 7
}
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/vnd.sas.collection+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/enabled',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.post('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/enabled', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/vnd.sas.collection+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/enabled", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /projects/{projectId}/rules/enabled
Enables a set of rules so they can be run against incoming transactions. If any rule in the set cannot be enabled (for example, a rule has an invalid rule ID), then no rules are enabled.
Body parameter
An example of a request to enable or disable rules.
{
"rules": [
{
"id": "f49e2549-02ef-428f-b53d-2e766efbecb3",
"revision": 1
},
{
"id": "b62c2d58-8126-4d65-a8ad-4a225e51cb96",
"revision": 7
}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | ruleIdList | false | Selection of rules |
projectId | path | string(uuid) | true | The UUID of the project. |
Example responses
Example response from successful disabling or enabling of a rule.
[
{
"creationTimeStamp": "2022-11-17T21:53:00.168Z",
"createdBy": "user1",
"modifiedTimeStamp": "2022-11-21T19:51:30.956Z",
"modifiedBy": "user1",
"version": 1,
"id": "9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"name": "rule 2",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"uri": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"type": "application/vnd.sas.detection.rule"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"uri": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"type": "application/vnd.sas.detection.rule"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"uri": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/9c17ec3c-ec73-45f3-896e-f7a3482f2d31"
}
],
"revision": 2
}
]
Example of a 400 error response when the request body contains an invalid resource ID.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The specified object with type \"RuleIDList\" is invalid.",
"details": [
"path: /detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/disabled",
"correlator: 44b6e4ab-1633-4fa9-ab08-9c89f46b7dfb"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Enable successful | ruleDisableCollection |
400 | Bad Request | Invalid request | error2 |
Validate Rule Code
Code samples
# You can also use wget
curl -X POST http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/{ruleId}/validation \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.detection.rule+json' \
-H 'Accept: application/vnd.sas.collection+json'
const inputBody = '{
"id": "bc813ea8-5fa5-11ed-9b6a-0242ac120002",
"code": "JURlY2xhcmVBcnJheSgmcnVsZS5EQSwgX0FfQ0hBUl8xIC0gX0FfQ0hBUl8zKTsKLyogJURlY2xhcmVBcnJheSgmcnVsZS5EQiwgSFFPX0NBUkRfTlVNLCBBUU9fQ0FSRF9OVU0pOyAqLwphdHRyaWIgJnJ1bGUuYXQxIGxlbmd0aD0kMjsKJnJ1bGUuYXQxID0gJ0FCJzsKLyphdHRyaWIgJnJ1bGUuYXQyIGxlbmd0aD0yOyAqLwpsZW5ndGggJnJ1bGUueCAkMzsKJnJ1bGUueD0nYWJjJzsKLypsZW5ndGggJnJ1bGUueSA5LjsgKi8KSUYgTEVOR1RIKCdUZXN0IExlbmd0aCcpIDwgMiB0aGVuIGRvOwplbmQ7CgpsZW5ndGggJnJ1bGUuZmYgJDU7CiZydWxlLmZmID0gJ2FiYyc7CgomcnVsZS5hPSdBQic7CiZydWxlLmI9J0JCJzsKaWYgKEhRT19DQVJEX05VTSA9ICcyJykgdGhlbiAmcnVsZS5hID0gJ0FDJzsKCmFycmF5ICZydWxlLlNTX2FycmF5XzFbM10gJDE7CiZydWxlLlNTX2FycmF5XzF7MX09J0EnOwomcnVsZS5TU19hcnJheV8xKDIpPSdCJzsKJnJ1bGUuU1NfYXJyYXlfMVszXT0nQyc7Ci8qJnJ1bGUuU1NfYXJyYXlfMSg0KT0nRCc7Ki8KYXJyYXkgJnJ1bGUuU1NfYXJyYXlfMlszXSAzOwomcnVsZS5TU19hcnJheV8yezF9PTAwMDsKYXJyYXkgJnJ1bGUuU1NfYXJyYXlfM3sqfSBfQV9DSEFSXzEtX0FfQ0hBUl8zOwphcnJheSAmcnVsZS5TU19hcnJheV80KCopICZydWxlLmEgJnJ1bGUuYiBfQV9DSEFSXzE7CmFycmF5ICZydWxlLlNTX2FycmF5XzUoMikgX0FfTlVNXzEtX0FfTlVNXzI7CgovKgomcnVsZS5TU19hcnJheV8zKDQpPSdOQSc7CiZydWxlLlNTX2FycmF5XzQoNCk9J05BJzsKJnJ1bGUuU1NfYXJyYXlfNSgzKT05OwoKbGVuZ3RoICZydWxlLnggJDM7CiZydWxlLng9J0NBVCc7CnN1YnN0cigmcnVsZS54LDIsMik9J0FBJzsKc3Vic3RyKCZydWxlLngsMik9J0FCJzsKKi8KCiZydWxlLmE9U1VCU1RSKF9YX0NIQVI4LDIpOwolQWN0aW9uX0RlYnVnKCZydWxlLmEpOwppZiBTVUJTVFIoX1hfQ0hBUjgsMSwyKSA9ICcxMicgdGhlbgogICAlQWN0aW9uX0RlYnVnKCdUZXN0IDEyJyk7CmVsc2UKICAgJUFjdGlvbl9EZWJ1ZygnVGVzdCAzNCcpOwoKbGVuZ3RoICZydWxlLlNTXzEgJDQ7CiZydWxlLlNTXzE9J1Rlc3QnOwomcnVsZS5TU18xPSdUZXN0MSc7Ci8qJnJ1bGUuU1NfMT0xMjM7ICovCmxlbmd0aCAmcnVsZS5TU18yIDQuOwomcnVsZS5TU18yPTEyMzQ7CiZydWxlLlNTXzI9MTIzNDU7Ci8qJnJ1bGUuU1NfMj0nQUJDRCc7Ki8K",
"schemaName": "Cards"
}';
const headers = {
'Content-Type':'application/vnd.sas.detection.rule+json',
'Accept':'application/vnd.sas.collection+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/{ruleId}/validation',
{
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.detection.rule+json',
'Accept': 'application/vnd.sas.collection+json'
}
r = requests.post('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/{ruleId}/validation', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.detection.rule+json"},
"Accept": []string{"application/vnd.sas.collection+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/{ruleId}/validation", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /projects/{projectId}/rules/{ruleId}/validation
Check for errors in the rule code.
Body parameter
Validate Rule Code Example
{
"id": "bc813ea8-5fa5-11ed-9b6a-0242ac120002",
"code": "JURlY2xhcmVBcnJheSgmcnVsZS5EQSwgX0FfQ0hBUl8xIC0gX0FfQ0hBUl8zKTsKLyogJURlY2xhcmVBcnJheSgmcnVsZS5EQiwgSFFPX0NBUkRfTlVNLCBBUU9fQ0FSRF9OVU0pOyAqLwphdHRyaWIgJnJ1bGUuYXQxIGxlbmd0aD0kMjsKJnJ1bGUuYXQxID0gJ0FCJzsKLyphdHRyaWIgJnJ1bGUuYXQyIGxlbmd0aD0yOyAqLwpsZW5ndGggJnJ1bGUueCAkMzsKJnJ1bGUueD0nYWJjJzsKLypsZW5ndGggJnJ1bGUueSA5LjsgKi8KSUYgTEVOR1RIKCdUZXN0IExlbmd0aCcpIDwgMiB0aGVuIGRvOwplbmQ7CgpsZW5ndGggJnJ1bGUuZmYgJDU7CiZydWxlLmZmID0gJ2FiYyc7CgomcnVsZS5hPSdBQic7CiZydWxlLmI9J0JCJzsKaWYgKEhRT19DQVJEX05VTSA9ICcyJykgdGhlbiAmcnVsZS5hID0gJ0FDJzsKCmFycmF5ICZydWxlLlNTX2FycmF5XzFbM10gJDE7CiZydWxlLlNTX2FycmF5XzF7MX09J0EnOwomcnVsZS5TU19hcnJheV8xKDIpPSdCJzsKJnJ1bGUuU1NfYXJyYXlfMVszXT0nQyc7Ci8qJnJ1bGUuU1NfYXJyYXlfMSg0KT0nRCc7Ki8KYXJyYXkgJnJ1bGUuU1NfYXJyYXlfMlszXSAzOwomcnVsZS5TU19hcnJheV8yezF9PTAwMDsKYXJyYXkgJnJ1bGUuU1NfYXJyYXlfM3sqfSBfQV9DSEFSXzEtX0FfQ0hBUl8zOwphcnJheSAmcnVsZS5TU19hcnJheV80KCopICZydWxlLmEgJnJ1bGUuYiBfQV9DSEFSXzE7CmFycmF5ICZydWxlLlNTX2FycmF5XzUoMikgX0FfTlVNXzEtX0FfTlVNXzI7CgovKgomcnVsZS5TU19hcnJheV8zKDQpPSdOQSc7CiZydWxlLlNTX2FycmF5XzQoNCk9J05BJzsKJnJ1bGUuU1NfYXJyYXlfNSgzKT05OwoKbGVuZ3RoICZydWxlLnggJDM7CiZydWxlLng9J0NBVCc7CnN1YnN0cigmcnVsZS54LDIsMik9J0FBJzsKc3Vic3RyKCZydWxlLngsMik9J0FCJzsKKi8KCiZydWxlLmE9U1VCU1RSKF9YX0NIQVI4LDIpOwolQWN0aW9uX0RlYnVnKCZydWxlLmEpOwppZiBTVUJTVFIoX1hfQ0hBUjgsMSwyKSA9ICcxMicgdGhlbgogICAlQWN0aW9uX0RlYnVnKCdUZXN0IDEyJyk7CmVsc2UKICAgJUFjdGlvbl9EZWJ1ZygnVGVzdCAzNCcpOwoKbGVuZ3RoICZydWxlLlNTXzEgJDQ7CiZydWxlLlNTXzE9J1Rlc3QnOwomcnVsZS5TU18xPSdUZXN0MSc7Ci8qJnJ1bGUuU1NfMT0xMjM7ICovCmxlbmd0aCAmcnVsZS5TU18yIDQuOwomcnVsZS5TU18yPTEyMzQ7CiZydWxlLlNTXzI9MTIzNDU7Ci8qJnJ1bGUuU1NfMj0nQUJDRCc7Ki8K",
"schemaName": "Cards"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | validationRule | false | The minimal representation of a rule. |
projectId | path | string(uuid) | true | The UUID of the project. |
ruleId | path | string(uuid) | true | The UUID of the rule. |
Example responses
Example validation response with no syntax errors.
{
"version": 2,
"accept": "application/vnd.sas.detection.rule",
"count": 0,
"start": 0,
"limit": 0,
"name": "validation",
"items": [],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/07521dab-9957-4216-b756-f8ccc024f374",
"uri": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/07521dab-9957-4216-b756-f8ccc024f374",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.rule"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/07521dab-9957-4216-b756-f8ccc024f374?start=0&limit=0",
"uri": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/07521dab-9957-4216-b756-f8ccc024f374?start=0&limit=0",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.rule"
}
]
}
Example validation response with syntax errors.
{
"version": 2,
"accept": "application/vnd.sas.detection.rule",
"count": 1,
"start": 0,
"limit": 1,
"name": "validation",
"items": [
{
"version": 1,
"row": 1,
"message": "mismatched input '<EOF>' expecting {'msg', ALERT, APPROVE, APPROVE_UNTIL, AUTHORIZE, AUTHORIZE_UNTIL, DEBUG, DECLINE, DECLINE_UNTIL, EXCLUDE, EXCLUDE_UNTIL, EXIT_ALL_RULES, EXIT_THIS_RULE, FIRE, HOLD, IGNORE_RECOMMENDATION, PICKUP, PICKUP_UNTIL, REFER, REFER_UNTIL, RETURN_RESULT, VERIFY, VERIFY_UNTIL, DECLARE, DCL, DO, CONTINUE, LEAVE, IF, SELECT, ';', RETURN, DETECTION, HASRULEFIRED, IDENT}"
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/07521dab-9957-4216-b756-f8ccc024f374",
"uri": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/07521dab-9957-4216-b756-f8ccc024f374",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.rule"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/07521dab-9957-4216-b756-f8ccc024f374?start=0&limit=1",
"uri": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/07521dab-9957-4216-b756-f8ccc024f374?start=0&limit=1",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.rule"
}
]
}
Example validation response with no syntax errors.
{
"version": 2,
"accept": "application/vnd.sas.detection.rule",
"count": 0,
"start": 0,
"limit": 0,
"name": "validation",
"items": [],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/07521dab-9957-4216-b756-f8ccc024f374",
"uri": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/07521dab-9957-4216-b756-f8ccc024f374",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.rule"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/07521dab-9957-4216-b756-f8ccc024f374?start=0&limit=0",
"uri": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/07521dab-9957-4216-b756-f8ccc024f374?start=0&limit=0",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.rule"
}
]
}
Example validation response with syntax errors.
{
"version": 2,
"accept": "application/vnd.sas.detection.rule",
"count": 1,
"start": 0,
"limit": 1,
"name": "validation",
"items": [
{
"version": 1,
"row": 1,
"message": "mismatched input '<EOF>' expecting {'msg', ALERT, APPROVE, APPROVE_UNTIL, AUTHORIZE, AUTHORIZE_UNTIL, DEBUG, DECLINE, DECLINE_UNTIL, EXCLUDE, EXCLUDE_UNTIL, EXIT_ALL_RULES, EXIT_THIS_RULE, FIRE, HOLD, IGNORE_RECOMMENDATION, PICKUP, PICKUP_UNTIL, REFER, REFER_UNTIL, RETURN_RESULT, VERIFY, VERIFY_UNTIL, DECLARE, DCL, DO, CONTINUE, LEAVE, IF, SELECT, ';', RETURN, DETECTION, HASRULEFIRED, IDENT}"
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/07521dab-9957-4216-b756-f8ccc024f374",
"uri": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/07521dab-9957-4216-b756-f8ccc024f374",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.rule"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/07521dab-9957-4216-b756-f8ccc024f374?start=0&limit=1",
"uri": "/detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/07521dab-9957-4216-b756-f8ccc024f374?start=0&limit=1",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.rule"
}
]
}
Example of 400 error response when the 'ruleId' path parameter is invalid.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"abc\" for the field \"ruleId\" does not match the documented format.",
"details": [
"field: ruleId",
"value: abc",
"messageID: detection-lib-api-icu.validation.invalid.value.msg",
"path: /detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/rules/abc/validation",
"correlator: b7bf9525-9b84-4f64-98ce-843fff4448d4"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | ruleSyntaxErrorCollection |
400 | Bad Request | Bad request | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | Date and time of last modification. |
Delete Rules
Code samples
# You can also use wget
curl -X POST http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/deletions \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.selection+json' \
-H 'Accept: application/vnd.sas.error+json'
const inputBody = '{
"type": "id",
"resources": [
"6def514e-b251-4499-a9a6-1e9066950b62",
"a91804b1-db4f-4662-97fd-cca50662488f"
],
"version": 1
}';
const headers = {
'Content-Type':'application/vnd.sas.selection+json',
'Accept':'application/vnd.sas.error+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/deletions',
{
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.selection+json',
'Accept': 'application/vnd.sas.error+json'
}
r = requests.post('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/deletions', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.selection+json"},
"Accept": []string{"application/vnd.sas.error+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/deletions", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /projects/{projectId}/rules/deletions
Deletes a selection of rules.
The selected rules must all be in the Recycle state.
Body parameter
An example of resource selections of type "id" request content.
{
"type": "id",
"resources": [
"6def514e-b251-4499-a9a6-1e9066950b62",
"a91804b1-db4f-4662-97fd-cca50662488f"
],
"version": 1
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | selection | false | The selection of rules. |
projectId | path | string(uuid) | true | The UUID of the project. |
Example responses
An example error response due to an invalid resource ID in the request.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The field resources value \"1\" is not a valid ID.",
"details": [
"messageID: detection-definition-api-icu.invalid.uuid.msg",
"FieldName: resources",
"FieldValue: 1",
"path: /detectionDefinition/projects/8b37bd34-8eb3-4afc-ba3f-ecb7549d8987/rules/deletions",
"correlator: e3f7fedd-10b4-4881-963e-a80427fab485"
]
}
Example of an error response due to an invalid URI in the request resources.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The field resources value \"/detectionDefinition/projects/otherProjectId/rules/5a8311c3-563d-4719-9711-e1852b2ec484\" is not a valid URI.",
"details": [
"messageID: detection-definition-api-icu.invalid.uri.msg",
"FieldName: resources",
"FieldValue: /detectionDefinition/projects/otherProjectId/rules/5a8311c3-563d-4719-9711-e1852b2ec484",
"path: /detectionDefinition/projects/8b37bd34-8eb3-4afc-ba3f-ecb7549d8987/rules/deletions",
"correlator: 32f96252-c164-4915-be3b-1caface2ff4a"
]
}
Example of an error when you request to delete a rule that is not in the Recycle state.
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000020,
"message": "The rule with name XYZ cannot be deleted while it is in state Testing.",
"details": [
"Name: XYZ",
"State: Testing",
"messageID: detection-definition-api-icu.rule.state.delete.not.allowed.msg",
"path: /detectionDefinition/projects/2184fda8-1dd3-4192-8a7c-1c7a4aff89f9/rules/1e6339a7-15df-4132-9b7a-7a761704ee9f",
"correlator: b4a9719c-defe-4f5d-9768-b29923cc4ecd"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | The rules were deleted. | None |
400 | Bad Request | Invalid request. For example: |
A resource ID in the request is not valid.
A resource URI in the request is not valid.|error2|
|409|Conflict|The request was not completed due to a conflict.
For example, a rule was not deleted because it is not in the Recycle state.|error2|
Get Audit Log
Code samples
# You can also use wget
curl -X GET http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/auditLog#withQuery?baseRuleId=string \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/auditLog#withQuery?baseRuleId=string',
{
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('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/auditLog#withQuery', params={
'baseRuleId': 'string'
}, 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", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rules/auditLog#withQuery", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /projects/{projectId}/rules/auditLog#withQuery
Returns audit log history of a rule by base rule ID.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
projectId | path | string(uuid) | true | The UUID of the project. |
baseRuleId | query | string | true | The identifier of the base rule. |
Example responses
An example of a collection of Rule Audit Logs
{
"version": 2,
"accept": "application/vnd.sas.detection.rule.audit+json",
"count": 3,
"start": 0,
"limit": 100,
"name": "auditLog",
"items": [
{
"version": 0,
"auditId": "74efbb6b-8673-448f-92f3-135516438279",
"ruleId": "5d70ada7-7ef2-4412-bbbb-332a689fa148",
"auditTypeCode": "Coding",
"creationTimeStamp": "2022-08-05T19:34:24.092Z",
"createdBy": "sasboot",
"baseRuleId": "50001",
"ruleName": "test_rule_1",
"ruleVersion": 1
},
{
"version": 0,
"auditId": "cfaf76af-91b8-47bf-b74f-6c92ffe4c44d",
"ruleId": "5d70ada7-7ef2-4412-bbbb-332a689fa148",
"auditTypeCode": "Testing",
"creationTimeStamp": "2022-08-05T19:40:40.128Z",
"createdBy": "sasboot",
"baseRuleId": "50001",
"ruleName": "test_rule_1",
"ruleVersion": 1
},
{
"version": 0,
"auditId": "9fde8963-6552-44a8-84a4-c2709d357f40",
"ruleId": "5d70ada7-7ef2-4412-bbbb-332a689fa148",
"auditTypeCode": "Deployed",
"auditTypeText": "Deployed from Testing folder to package#50591",
"creationTimeStamp": "2022-08-08T20:29:23.330Z",
"createdBy": "susahu",
"baseRuleId": "50001",
"ruleName": "test_rule_1",
"ruleVersion": 1
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/projects/e595dc98-30e6-41a3-84ad-be28857743db/rules/auditLog?baseRuleId=50001",
"uri": "/detectionDefinition/projects/e595dc98-30e6-41a3-84ad-be28857743db/rules/auditLog?baseRuleId=50001",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.rule.audit"
}
]
}
{
"version": 2,
"accept": "application/vnd.sas.detection.rule.audit+json",
"count": 3,
"start": 0,
"limit": 100,
"name": "auditLog",
"items": [
{
"version": 0,
"auditId": "74efbb6b-8673-448f-92f3-135516438279",
"ruleId": "5d70ada7-7ef2-4412-bbbb-332a689fa148",
"auditTypeCode": "Coding",
"creationTimeStamp": "2022-08-05T19:34:24.092Z",
"createdBy": "sasboot",
"baseRuleId": "50001",
"ruleName": "test_rule_1",
"ruleVersion": 1
},
{
"version": 0,
"auditId": "cfaf76af-91b8-47bf-b74f-6c92ffe4c44d",
"ruleId": "5d70ada7-7ef2-4412-bbbb-332a689fa148",
"auditTypeCode": "Testing",
"creationTimeStamp": "2022-08-05T19:40:40.128Z",
"createdBy": "sasboot",
"baseRuleId": "50001",
"ruleName": "test_rule_1",
"ruleVersion": 1
},
{
"version": 0,
"auditId": "9fde8963-6552-44a8-84a4-c2709d357f40",
"ruleId": "5d70ada7-7ef2-4412-bbbb-332a689fa148",
"auditTypeCode": "Deployed",
"auditTypeText": "Deployed from Testing folder to package#50591",
"creationTimeStamp": "2022-08-08T20:29:23.330Z",
"createdBy": "susahu",
"baseRuleId": "50001",
"ruleName": "test_rule_1",
"ruleVersion": 1
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/projects/e595dc98-30e6-41a3-84ad-be28857743db/rules/auditLog?baseRuleId=50001",
"uri": "/detectionDefinition/projects/e595dc98-30e6-41a3-84ad-be28857743db/rules/auditLog?baseRuleId=50001",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.rule.audit"
}
]
}
An example of an error 400 when the 'projectId' path parameter is not valid.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"c4c54dfb-870c-463e-9628-353cfe2c1873X\" for the field \"projectId\" does not match the documented format.",
"details": [
"field: projectId",
"value: c4c54dfb-870c-463e-9628-353cfe2c1873X",
"messageID: detection-lib-api-icu.validation.invalid.value.msg",
"path: /detectionDefinition/projects/c4c54dfb-870c-463e-9628-353cfe2c1873X/rules/auditLog",
"correlator: 8aa8e06f-6845-4b4d-8815-9bae7016e620"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | auditLogCollection |
400 | Bad Request | Invalid request | error2 |
Return a List of functions
Code samples
# You can also use wget
curl -X GET http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/languages/{languageId}/functions \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/languages/{languageId}/functions',
{
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('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/languages/{languageId}/functions', 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", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/languages/{languageId}/functions", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /languages/{languageId}/functions
Return the list of all functions supported for the rule programming language.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
languageId | path | string | true | The programming language code. |
Enumerated Values
Parameter | Value |
---|---|
languageId | ds2 |
Example responses
Here is an example of a list of functions for a language.
{
"version": 2,
"accept": "application/vnd.sas.detection.rule.function",
"count": 3,
"start": 0,
"limit": 1000,
"name": "functions",
"items": [
{
"version": 1,
"name": "abs",
"reqArgCnt": 1,
"argsAsString": "1_reqnum"
},
{
"version": 1,
"name": "anyalnum",
"reqArgCnt": 1,
"argsAsString": "1_reqstr 1_optnum"
},
{
"version": 1,
"name": "anyalpha",
"reqArgCnt": 1,
"argsAsString": "1_reqstr 1_optnum"
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/languages/ds2/functions",
"uri": "/detectionDefinition/languages/ds2/functions",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.rule.function"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/languages/ds2/functions?start=0&limit=1000",
"uri": "/detectionDefinition/languages/ds2/functions?start=0&limit=1000",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.rule.function"
}
]
}
{
"version": 2,
"accept": "application/vnd.sas.detection.rule.function",
"count": 3,
"start": 0,
"limit": 1000,
"name": "functions",
"items": [
{
"version": 1,
"name": "abs",
"reqArgCnt": 1,
"argsAsString": "1_reqnum"
},
{
"version": 1,
"name": "anyalnum",
"reqArgCnt": 1,
"argsAsString": "1_reqstr 1_optnum"
},
{
"version": 1,
"name": "anyalpha",
"reqArgCnt": 1,
"argsAsString": "1_reqstr 1_optnum"
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/languages/ds2/functions",
"uri": "/detectionDefinition/languages/ds2/functions",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.rule.function"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/languages/ds2/functions?start=0&limit=1000",
"uri": "/detectionDefinition/languages/ds2/functions?start=0&limit=1000",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.rule.function"
}
]
}
{
"version": 2,
"accept": "application/vnd.sas.detection.rule.function",
"count": 3,
"start": 0,
"limit": 1000,
"name": "functions",
"items": [
{
"version": 1,
"name": "abs",
"reqArgCnt": 1,
"argsAsString": "1_reqnum"
},
{
"version": 1,
"name": "anyalnum",
"reqArgCnt": 1,
"argsAsString": "1_reqstr 1_optnum"
},
{
"version": 1,
"name": "anyalpha",
"reqArgCnt": 1,
"argsAsString": "1_reqstr 1_optnum"
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/languages/ds2/functions",
"uri": "/detectionDefinition/languages/ds2/functions",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.rule.function"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/languages/ds2/functions?start=0&limit=1000",
"uri": "/detectionDefinition/languages/ds2/functions?start=0&limit=1000",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.rule.function"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | functionCollection |
400 | Bad Request | Bad request. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | undefined | No description |
Return a List of Actions
Code samples
# You can also use wget
curl -X GET http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/languages/{languageId}/macros \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/languages/{languageId}/macros',
{
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('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/languages/{languageId}/macros', 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", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/languages/{languageId}/macros", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /languages/{languageId}/macros
Return the collection of all actions supported for the rule programming language.
Filtering
The collection can be filtered by the rule type that allows the action.
In 'filter-criteria', use:
* function: "eq"
* name: "ruleTypes.ruleType"
* literal: the rule type of interest, 'decision' or 'variable'
For example:
* eq(ruleTypes.ruleType,'variable')
* eq(ruleTypes.ruleType,'decision')
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
languageId | path | string | true | The programming language code. |
filter | query | string(filter-criteria) | false | The filter criteria for returned resources. For more information, see Filtering in REST APIs. |
Enumerated Values
Parameter | Value |
---|---|
languageId | ds2 |
Example responses
An example list of all rule actions.
{
"version": 2,
"accept": "application/vnd.sas.detection.rule.macro",
"count": 26,
"start": 0,
"limit": 1000,
"name": "macros",
"items": [
{
"version": 1,
"id": "8fdc93a8-dc8e-409a-8038-bdc04f059fa6",
"name": "detection.alert",
"code": "detection.Alert();",
"description": "This action will result in the creation of an alert in the queue associated with this rule",
"reqArgCnt": 0,
"createAlert": true
},
{
"version": 1,
"id": "4bc53fb1-68ea-4ff9-83a7-c2c8ea121a59",
"name": "detection.approve",
"code": "detection.Approve(<info>,<date>,<time>);",
"description": "Code of '1' is returned in the rrr_prelim_dec_code.\n record that the rule has fired in the rrf_rule_data and this rule's ID can be considered in the rrf_rule_id",
"reqArgCnt": 0,
"createAlert": false
},
{
"version": 1,
"id": "cf7a3d80-b41d-4e38-850d-16223c536938",
"name": "detection.approveUntil",
"code": "detection.Approve_Until(<info>,<delayDays>,<delaySeconds>);",
"description": "Code of '1'' is returned in the rrr_prelim_dec_code.\n Record that the rule has fired in the rrf_rule_data and this rule's ID can be considered in the rrf_rule_id",
"reqArgCnt": 0,
"createAlert": false
},
{
"version": 1,
"id": "5a4fabc4-0867-41e6-bd21-b58566f1795d",
"name": "detection.authorize",
"code": "detection.Authorize(<code>,<info>,<date>,<time>);",
"description": "The code is set in rrr_prelim_dec_code.\nRecord that the rule has fired in the rrf_rule_data and this rule's ID can be considered in the rrf_rule_id (if code is not 1)",
"reqArgCnt": 1,
"createAlert": false
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/languages/ds2/macros",
"uri": "/detectionDefinition/languages/ds2/macros",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.rule.macro"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/languages/ds2/macros?start=0&limit=1000",
"uri": "/detectionDefinition/languages/ds2/macros?start=0&limit=1000",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.rule.macro"
}
]
}
{
"version": 2,
"accept": "application/vnd.sas.detection.rule.macro",
"count": 26,
"start": 0,
"limit": 1000,
"name": "macros",
"items": [
{
"version": 1,
"id": "8fdc93a8-dc8e-409a-8038-bdc04f059fa6",
"name": "detection.alert",
"code": "detection.Alert();",
"description": "This action will result in the creation of an alert in the queue associated with this rule",
"reqArgCnt": 0,
"createAlert": true
},
{
"version": 1,
"id": "4bc53fb1-68ea-4ff9-83a7-c2c8ea121a59",
"name": "detection.approve",
"code": "detection.Approve(<info>,<date>,<time>);",
"description": "Code of '1' is returned in the rrr_prelim_dec_code.\n record that the rule has fired in the rrf_rule_data and this rule's ID can be considered in the rrf_rule_id",
"reqArgCnt": 0,
"createAlert": false
},
{
"version": 1,
"id": "cf7a3d80-b41d-4e38-850d-16223c536938",
"name": "detection.approveUntil",
"code": "detection.Approve_Until(<info>,<delayDays>,<delaySeconds>);",
"description": "Code of '1'' is returned in the rrr_prelim_dec_code.\n Record that the rule has fired in the rrf_rule_data and this rule's ID can be considered in the rrf_rule_id",
"reqArgCnt": 0,
"createAlert": false
},
{
"version": 1,
"id": "5a4fabc4-0867-41e6-bd21-b58566f1795d",
"name": "detection.authorize",
"code": "detection.Authorize(<code>,<info>,<date>,<time>);",
"description": "The code is set in rrr_prelim_dec_code.\nRecord that the rule has fired in the rrf_rule_data and this rule's ID can be considered in the rrf_rule_id (if code is not 1)",
"reqArgCnt": 1,
"createAlert": false
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/languages/ds2/macros",
"uri": "/detectionDefinition/languages/ds2/macros",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.rule.macro"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/languages/ds2/macros?start=0&limit=1000",
"uri": "/detectionDefinition/languages/ds2/macros?start=0&limit=1000",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.rule.macro"
}
]
}
{
"version": 2,
"accept": "application/vnd.sas.detection.rule.macro",
"count": 26,
"start": 0,
"limit": 1000,
"name": "macros",
"items": [
{
"version": 1,
"id": "8fdc93a8-dc8e-409a-8038-bdc04f059fa6",
"name": "detection.alert",
"code": "detection.Alert();",
"description": "This action will result in the creation of an alert in the queue associated with this rule",
"reqArgCnt": 0,
"createAlert": true
},
{
"version": 1,
"id": "4bc53fb1-68ea-4ff9-83a7-c2c8ea121a59",
"name": "detection.approve",
"code": "detection.Approve(<info>,<date>,<time>);",
"description": "Code of '1' is returned in the rrr_prelim_dec_code.\n record that the rule has fired in the rrf_rule_data and this rule's ID can be considered in the rrf_rule_id",
"reqArgCnt": 0,
"createAlert": false
},
{
"version": 1,
"id": "cf7a3d80-b41d-4e38-850d-16223c536938",
"name": "detection.approveUntil",
"code": "detection.Approve_Until(<info>,<delayDays>,<delaySeconds>);",
"description": "Code of '1'' is returned in the rrr_prelim_dec_code.\n Record that the rule has fired in the rrf_rule_data and this rule's ID can be considered in the rrf_rule_id",
"reqArgCnt": 0,
"createAlert": false
},
{
"version": 1,
"id": "5a4fabc4-0867-41e6-bd21-b58566f1795d",
"name": "detection.authorize",
"code": "detection.Authorize(<code>,<info>,<date>,<time>);",
"description": "The code is set in rrr_prelim_dec_code.\nRecord that the rule has fired in the rrf_rule_data and this rule's ID can be considered in the rrf_rule_id (if code is not 1)",
"reqArgCnt": 1,
"createAlert": false
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/languages/ds2/macros",
"uri": "/detectionDefinition/languages/ds2/macros",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.rule.macro"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/languages/ds2/macros?start=0&limit=1000",
"uri": "/detectionDefinition/languages/ds2/macros?start=0&limit=1000",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.rule.macro"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | macroCollection |
400 | Bad Request | Bad request. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Content-Type | undefined | No description |
Organizations
The operations for organization instances.
Create an Organization
Code samples
# You can also use wget
curl -X POST http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.detection.organization+json' \
-H 'Accept: application/vnd.sas.detection.organization+json'
const inputBody = '{
"displayName": "GLOBAL",
"name": "GLOBAL",
"description": "The Global organization.",
"messageClassificationId": "ced5ac46-825b-46eb-9cc5-734a8bb58654",
"roleRelations": [
{
"roleId": "SDASystemAdmin"
}
],
"schemaRelations": [
{
"schemaName": "Core"
}
]
}';
const headers = {
'Content-Type':'application/vnd.sas.detection.organization+json',
'Accept':'application/vnd.sas.detection.organization+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations',
{
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.detection.organization+json',
'Accept': 'application/vnd.sas.detection.organization+json'
}
r = requests.post('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.detection.organization+json"},
"Accept": []string{"application/vnd.sas.detection.organization+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /organizations
During the creation of an organization: * a default profile message schema shell named <Organization Name> Profile is created in SAS detection message schema service * a default deployment definition is created for the organization
To create an organization from a JSON representation
- Set Content-type header to application/vnd.sas.detection.organization+json or application/json.
- Provide the organization's JSON representation in the request body.
- Set the organization's name, description and display name. You can use different names from the associated message classification.
- Specify at least one role and one message schema for the organization.
- (Optional) Specify the preferred profile schema name, assign additional roles, message schemas, and advanced lists.
Note: The additional data that you provide must exist before your organization is created. An organization creation request fails if your preferred profile schema, a specified role, message schema, or advanced list does not exist.
Body parameter
An example of new organization request content
{
"displayName": "GLOBAL",
"name": "GLOBAL",
"description": "The Global organization.",
"messageClassificationId": "ced5ac46-825b-46eb-9cc5-734a8bb58654",
"roleRelations": [
{
"roleId": "SDASystemAdmin"
}
],
"schemaRelations": [
{
"schemaName": "Core"
}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | createOrganizationInput | false | A JSON representation of the organization to be created. |
Example responses
An example of organization object
{
"createdBy": "userid",
"creationTimeStamp": "2022-05-05T14:16:37.557Z",
"description": "The Global organization.",
"displayName": "GLOBAL",
"id": "8d4a70b8-565f-4416-9be5-c2a940455516",
"links": [
{
"href": "/detectionDefinition/organizations/8d4a70b8-565f-4416-9be5-c2a940455516",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.detection.organization",
"uri": "/detectionDefinition/organizations/8d4a70b8-565f-4416-9be5-c2a940455516"
},
{
"href": "/detectionDefinition/organizations/8d4a70b8-565f-4416-9be5-c2a940455516",
"method": "PATCH",
"rel": "patch",
"type": "application/vnd.sas.detection.organization",
"uri": "/detectionDefinition/organizations/8d4a70b8-565f-4416-9be5-c2a940455516"
},
{
"href": "/detectionDefinition/organizations/8d4a70b8-565f-4416-9be5-c2a940455516",
"method": "DELETE",
"rel": "delete",
"uri": "/detectionDefinition/organizations/8d4a70b8-565f-4416-9be5-c2a940455516"
}
],
"modifiedBy": "userid",
"modifiedTimeStamp": "2022-05-05T14:16:37.557Z",
"name": "GLOBAL",
"messageClassificationId": "ced5ac46-825b-46eb-9cc5-734a8bb58654",
"profileSchemaName": "GLOBAL Profile",
"roleRelations": [
{
"roleId": "SDARulesEditor",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/identities/groups/SDARulesEditor",
"uri": "/identities/groups/SDARulesEditor",
"type": "application/vnd.sas.identity.group"
}
]
}
],
"schemaRelations": [
{
"schemaName": "Digital Loan Application",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionMessageSchema/messages?filter=eq('name','Digital Loan Application')",
"uri": "/detectionMessageSchema/messages?filter=eq('name','Digital Loan Application')",
"type": "application/vnd.sas.collection+json"
}
]
}
],
"listRelations": [
{
"listId": "ee8c7ec1-d343-4057-814f-c2ccb31a1c1f"
},
{
"listId": "7f3343b5-be79-41c2-bd1f-a7559e844731"
}
],
"revision": 0,
"version": 2
}
{
"createdBy": "userid",
"creationTimeStamp": "2022-05-05T14:16:37.557Z",
"description": "The Global organization.",
"displayName": "GLOBAL",
"id": "8d4a70b8-565f-4416-9be5-c2a940455516",
"links": [
{
"href": "/detectionDefinition/organizations/8d4a70b8-565f-4416-9be5-c2a940455516",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.detection.organization",
"uri": "/detectionDefinition/organizations/8d4a70b8-565f-4416-9be5-c2a940455516"
},
{
"href": "/detectionDefinition/organizations/8d4a70b8-565f-4416-9be5-c2a940455516",
"method": "PATCH",
"rel": "patch",
"type": "application/vnd.sas.detection.organization",
"uri": "/detectionDefinition/organizations/8d4a70b8-565f-4416-9be5-c2a940455516"
},
{
"href": "/detectionDefinition/organizations/8d4a70b8-565f-4416-9be5-c2a940455516",
"method": "DELETE",
"rel": "delete",
"uri": "/detectionDefinition/organizations/8d4a70b8-565f-4416-9be5-c2a940455516"
}
],
"modifiedBy": "userid",
"modifiedTimeStamp": "2022-05-05T14:16:37.557Z",
"name": "GLOBAL",
"messageClassificationId": "ced5ac46-825b-46eb-9cc5-734a8bb58654",
"profileSchemaName": "GLOBAL Profile",
"roleRelations": [
{
"roleId": "SDARulesEditor",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/identities/groups/SDARulesEditor",
"uri": "/identities/groups/SDARulesEditor",
"type": "application/vnd.sas.identity.group"
}
]
}
],
"schemaRelations": [
{
"schemaName": "Digital Loan Application",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionMessageSchema/messages?filter=eq('name','Digital Loan Application')",
"uri": "/detectionMessageSchema/messages?filter=eq('name','Digital Loan Application')",
"type": "application/vnd.sas.collection+json"
}
]
}
],
"listRelations": [
{
"listId": "ee8c7ec1-d343-4057-814f-c2ccb31a1c1f"
},
{
"listId": "7f3343b5-be79-41c2-bd1f-a7559e844731"
}
],
"revision": 0,
"version": 2
}
Here is an example of an error when organization's name contains spaces or special characters.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The specified object with type \"Organization\" is invalid.",
"details": [
"path: /detectionDefinition/organizations",
"correlator: 33c38a92-3ec2-4c6e-a29b-d4881e277786"
]
}
An example of an error when no message schema is specified for an organization.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000007,
"message": "An organization must have at least one message schema.",
"details": [
"path: /detectionDefinition/organizations",
"correlator: 83d9019f-6e51-4ffa-b98a-876520efbe31"
]
}
An example of an error when no role is specified for an organization.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000007,
"message": "An organization must have at least one role.",
"details": [
"path: /detectionDefinition/organizations",
"correlator: 2ac899b8-f3ef-4a41-ac96-7ca9dd3fa0f3"
]
}
Here is an example of an error when you create an organization reusing an organizational unit.
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000017,
"message": "The organization Bank B could not be created. The organizational unit GLOBAL with id \"ced5ac46-825b-46eb-9cc5-734a8bb58654\" has been associated to the organization Bank A with id \"7c7e96cd-248a-4a46-b274-57dc50ba948f\".",
"details": [
"path: /detectionDefinition/organizations",
"correlator: 5b53b341-db96-4bc6-9c22-a27960f1fff9"
]
}
Here is an example of an organization creation error when failed to create the default profile schema.
{
"version": 2,
"httpStatusCode": 422,
"errorCode": 1000014,
"message": "Profile schema Bank B Profile of type profile could not be created.",
"details": [
"path: /detectionDefinition/organizations",
"correlator: 15ba0559-0324-4df2-a037-d1213220769a"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | An organization is created from a JSON representation. | organizationv2 |
400 | Bad Request | A bad request. Possible reason or reasons: |
- The organization name may not be a valid name.
- The message classification with the specified ID may not exist.
- The specified custom profile schema may not exist.
- The specified advanced list may not exist.
- No message schema is specified.
- No role is specified.|error2|
|409|Conflict|There is a conflict with an existing resource.
Possible reason or reasons:
- The organization name may not be unique.|error2|
|422|Unprocessable Entity|Entity cannot be processed.
Possible reason or reasons:
- Fail to create a default profile schema for the organization.|error2|
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Etag | string | An hash-code for the response resource. | |
201 | Last-Modified | string | Date and time of last modification. | |
201 | Location | string | Location of URI for the endpoint. |
Return a List of Organizations
Code samples
# You can also use wget
curl -X GET http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations',
{
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('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations', 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", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /organizations
Gets the collection of organizations.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
start | query | integer | false | The 0-based offset of the first resource to return. Defaults to 0. |
limit | query | integer | false | The maximum number of resources to return. Defaults to 100. |
filter | query | string(filter-criteria) | false | The filter criteria for returned resources. For more information, see Filtering in REST APIs. |
sortBy | query | string(sort-criteria) | false | Specifies the sorting for returned resources. For more information, see Sorting in REST APIs. |
Example responses
Here is an example of an organization list.
{
"version": 2,
"accept": "application/vnd.sas.detection.organization",
"count": 2,
"start": 0,
"limit": 100,
"name": "organizations",
"items": [
{
"creationTimeStamp": "2022-05-18T19:01:21.316Z",
"createdBy": "user1",
"modifiedTimeStamp": "2022-09-15T21:03:23.884Z",
"modifiedBy": "user1",
"revision": 3,
"version": 2,
"id": "0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8",
"name": "AF_NP",
"displayName": "Bank A",
"description": "The description of Bank A.",
"messageClassificationId": "e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"profileSchemaName": "AF_NP Profile"
},
{
"creationTimeStamp": "2022-05-18T19:01:21.290Z",
"createdBy": "user1",
"modifiedTimeStamp": "2022-05-18T19:01:21.290Z",
"modifiedBy": "user1",
"revision": 0,
"version": 2,
"id": "16495c0d-e31f-40ed-8eb2-98b20783bfab",
"name": "AB_NP",
"displayName": "Bank B",
"description": "The description of Bank B.",
"messageClassificationId": "e1166e4a-d6dc-11ec-b036-6631d4e9d21c",
"profileSchemaName": "AB_NP Profile"
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/organizations",
"uri": "/detectionDefinition/organizations",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.organization"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/organizations?start=0&limit=100",
"uri": "/detectionDefinition/organizations?start=0&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.organization"
}
]
}
{
"version": 2,
"accept": "application/vnd.sas.detection.organization",
"count": 2,
"start": 0,
"limit": 100,
"name": "organizations",
"items": [
{
"creationTimeStamp": "2022-05-18T19:01:21.316Z",
"createdBy": "user1",
"modifiedTimeStamp": "2022-09-15T21:03:23.884Z",
"modifiedBy": "user1",
"revision": 3,
"version": 2,
"id": "0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8",
"name": "AF_NP",
"displayName": "Bank A",
"description": "The description of Bank A.",
"messageClassificationId": "e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"profileSchemaName": "AF_NP Profile"
},
{
"creationTimeStamp": "2022-05-18T19:01:21.290Z",
"createdBy": "user1",
"modifiedTimeStamp": "2022-05-18T19:01:21.290Z",
"modifiedBy": "user1",
"revision": 0,
"version": 2,
"id": "16495c0d-e31f-40ed-8eb2-98b20783bfab",
"name": "AB_NP",
"displayName": "Bank B",
"description": "The description of Bank B.",
"messageClassificationId": "e1166e4a-d6dc-11ec-b036-6631d4e9d21c",
"profileSchemaName": "AB_NP Profile"
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/organizations",
"uri": "/detectionDefinition/organizations",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.organization"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/organizations?start=0&limit=100",
"uri": "/detectionDefinition/organizations?start=0&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.organization"
}
]
}
Here is an example of an error when you retrieve organizations with an invalid field name in the query filter.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000011,
"message": "The input query parameters are invalid",
"details": [
"messageID: detection-definition-api-icu.invalid.query.params.msg",
"path: /detectionDefinition/organizations",
"correlator: 98efe902-471e-41f5-b4ad-763141b5fc36"
],
"errors": [
{
"version": 2,
"httpStatusCode": 500,
"message": "InvalidInputError: Field orgName is invalid for the target type. Error Code: 1020"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | organizationCollectionv2 |
400 | Bad Request | A bad request. Possible reason or reasons: |
|
- The query parameter may be invalid. |
error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | Date and time of last modification. |
Return an Organization
Code samples
# You can also use wget
curl -X GET http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.detection.organization+json'
const headers = {
'Accept':'application/vnd.sas.detection.organization+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.detection.organization+json'
}
r = requests.get('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.detection.organization+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /organizations/{orgId}
Gets the organization by its ID. Specify a depth to return the associated message classification and sub-message classifications up to the depth. If a depth is not specified, then no message classifications are returned. Set the depth to 0 to include only the associated message classification. To return all sub-message classifications, set depth to -1.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
depth | query | integer | false | Specifies the depth that sub-message classifications are to be retrieved with the message classification. Specify a value of -1 to retrieve all sub-message classifications. Specify a value of 0 to retrieve no sub-message classifications. Specify a positive number to retrieve sub-message classifications up to the depth. |
orgId | path | string | true | The UUID of the organization. |
Example responses
An example of organization object
{
"createdBy": "userid",
"creationTimeStamp": "2022-05-05T14:16:37.557Z",
"description": "The Global organization.",
"displayName": "GLOBAL",
"id": "8d4a70b8-565f-4416-9be5-c2a940455516",
"links": [
{
"href": "/detectionDefinition/organizations/8d4a70b8-565f-4416-9be5-c2a940455516",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.detection.organization",
"uri": "/detectionDefinition/organizations/8d4a70b8-565f-4416-9be5-c2a940455516"
},
{
"href": "/detectionDefinition/organizations/8d4a70b8-565f-4416-9be5-c2a940455516",
"method": "PATCH",
"rel": "patch",
"type": "application/vnd.sas.detection.organization",
"uri": "/detectionDefinition/organizations/8d4a70b8-565f-4416-9be5-c2a940455516"
},
{
"href": "/detectionDefinition/organizations/8d4a70b8-565f-4416-9be5-c2a940455516",
"method": "DELETE",
"rel": "delete",
"uri": "/detectionDefinition/organizations/8d4a70b8-565f-4416-9be5-c2a940455516"
}
],
"modifiedBy": "userid",
"modifiedTimeStamp": "2022-05-05T14:16:37.557Z",
"name": "GLOBAL",
"messageClassificationId": "ced5ac46-825b-46eb-9cc5-734a8bb58654",
"profileSchemaName": "GLOBAL Profile",
"roleRelations": [
{
"roleId": "SDARulesEditor",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/identities/groups/SDARulesEditor",
"uri": "/identities/groups/SDARulesEditor",
"type": "application/vnd.sas.identity.group"
}
]
}
],
"schemaRelations": [
{
"schemaName": "Digital Loan Application",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionMessageSchema/messages?filter=eq('name','Digital Loan Application')",
"uri": "/detectionMessageSchema/messages?filter=eq('name','Digital Loan Application')",
"type": "application/vnd.sas.collection+json"
}
]
}
],
"listRelations": [
{
"listId": "ee8c7ec1-d343-4057-814f-c2ccb31a1c1f"
},
{
"listId": "7f3343b5-be79-41c2-bd1f-a7559e844731"
}
],
"revision": 0,
"version": 2
}
{
"createdBy": "userid",
"creationTimeStamp": "2022-05-05T14:16:37.557Z",
"description": "The Global organization.",
"displayName": "GLOBAL",
"id": "8d4a70b8-565f-4416-9be5-c2a940455516",
"links": [
{
"href": "/detectionDefinition/organizations/8d4a70b8-565f-4416-9be5-c2a940455516",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.detection.organization",
"uri": "/detectionDefinition/organizations/8d4a70b8-565f-4416-9be5-c2a940455516"
},
{
"href": "/detectionDefinition/organizations/8d4a70b8-565f-4416-9be5-c2a940455516",
"method": "PATCH",
"rel": "patch",
"type": "application/vnd.sas.detection.organization",
"uri": "/detectionDefinition/organizations/8d4a70b8-565f-4416-9be5-c2a940455516"
},
{
"href": "/detectionDefinition/organizations/8d4a70b8-565f-4416-9be5-c2a940455516",
"method": "DELETE",
"rel": "delete",
"uri": "/detectionDefinition/organizations/8d4a70b8-565f-4416-9be5-c2a940455516"
}
],
"modifiedBy": "userid",
"modifiedTimeStamp": "2022-05-05T14:16:37.557Z",
"name": "GLOBAL",
"messageClassificationId": "ced5ac46-825b-46eb-9cc5-734a8bb58654",
"profileSchemaName": "GLOBAL Profile",
"roleRelations": [
{
"roleId": "SDARulesEditor",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/identities/groups/SDARulesEditor",
"uri": "/identities/groups/SDARulesEditor",
"type": "application/vnd.sas.identity.group"
}
]
}
],
"schemaRelations": [
{
"schemaName": "Digital Loan Application",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionMessageSchema/messages?filter=eq('name','Digital Loan Application')",
"uri": "/detectionMessageSchema/messages?filter=eq('name','Digital Loan Application')",
"type": "application/vnd.sas.collection+json"
}
]
}
],
"listRelations": [
{
"listId": "ee8c7ec1-d343-4057-814f-c2ccb31a1c1f"
},
{
"listId": "7f3343b5-be79-41c2-bd1f-a7559e844731"
}
],
"revision": 0,
"version": 2
}
Here is an example of an error when you retrieve an organization with an invalid UUID.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"7c7e96cd_248a_4a46_b274_57dc50ba948f\" for the field \"orgId\" does not match the documented format.",
"details": [
"path: /detectionDefinition/organizations/7c7e96cd-248a-4a46-b274-57dc50ba948fX",
"correlator: 61cabe1e-5303-4c3b-af38-a0574a173bbd"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | organizationv2 |
400 | Bad Request | A bad request. Possible reason or reasons: |
|
- The organization ID may be invalid. |
error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | Date and time of last modification. |
Partially Update an Organization
Code samples
# You can also use wget
curl -X PATCH http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.detection.organization+json' \
-H 'Accept: application/vnd.sas.detection.organization+json'
const inputBody = '{
"displayName": "GLOBAL",
"name": "GLOBAL",
"description": "The Global organization."
}';
const headers = {
'Content-Type':'application/vnd.sas.detection.organization+json',
'Accept':'application/vnd.sas.detection.organization+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}',
{
method: 'PATCH',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.detection.organization+json',
'Accept': 'application/vnd.sas.detection.organization+json'
}
r = requests.patch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.detection.organization+json"},
"Accept": []string{"application/vnd.sas.detection.organization+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PATCH", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PATCH /organizations/{orgId}
Partially updates the specified organization. Only the name, description and displayName fields can be modified.
Body parameter
An example of update organization request content
{
"displayName": "GLOBAL",
"name": "GLOBAL",
"description": "The Global organization."
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | updateOrganizationInput | false | A JSON representation of one or more fields to be updated |
orgId | path | string | true | The UUID of the organization. |
Example responses
An example of organization object
{
"createdBy": "userid",
"creationTimeStamp": "2022-05-05T14:16:37.557Z",
"description": "The Global organization.",
"displayName": "GLOBAL",
"id": "8d4a70b8-565f-4416-9be5-c2a940455516",
"links": [
{
"href": "/detectionDefinition/organizations/8d4a70b8-565f-4416-9be5-c2a940455516",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.detection.organization",
"uri": "/detectionDefinition/organizations/8d4a70b8-565f-4416-9be5-c2a940455516"
},
{
"href": "/detectionDefinition/organizations/8d4a70b8-565f-4416-9be5-c2a940455516",
"method": "PATCH",
"rel": "patch",
"type": "application/vnd.sas.detection.organization",
"uri": "/detectionDefinition/organizations/8d4a70b8-565f-4416-9be5-c2a940455516"
},
{
"href": "/detectionDefinition/organizations/8d4a70b8-565f-4416-9be5-c2a940455516",
"method": "DELETE",
"rel": "delete",
"uri": "/detectionDefinition/organizations/8d4a70b8-565f-4416-9be5-c2a940455516"
}
],
"modifiedBy": "userid",
"modifiedTimeStamp": "2022-05-05T14:16:37.557Z",
"name": "GLOBAL",
"messageClassificationId": "ced5ac46-825b-46eb-9cc5-734a8bb58654",
"profileSchemaName": "GLOBAL Profile",
"roleRelations": [
{
"roleId": "SDARulesEditor",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/identities/groups/SDARulesEditor",
"uri": "/identities/groups/SDARulesEditor",
"type": "application/vnd.sas.identity.group"
}
]
}
],
"schemaRelations": [
{
"schemaName": "Digital Loan Application",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionMessageSchema/messages?filter=eq('name','Digital Loan Application')",
"uri": "/detectionMessageSchema/messages?filter=eq('name','Digital Loan Application')",
"type": "application/vnd.sas.collection+json"
}
]
}
],
"listRelations": [
{
"listId": "ee8c7ec1-d343-4057-814f-c2ccb31a1c1f"
},
{
"listId": "7f3343b5-be79-41c2-bd1f-a7559e844731"
}
],
"revision": 0,
"version": 2
}
{
"createdBy": "userid",
"creationTimeStamp": "2022-05-05T14:16:37.557Z",
"description": "The Global organization.",
"displayName": "GLOBAL",
"id": "8d4a70b8-565f-4416-9be5-c2a940455516",
"links": [
{
"href": "/detectionDefinition/organizations/8d4a70b8-565f-4416-9be5-c2a940455516",
"method": "GET",
"rel": "self",
"type": "application/vnd.sas.detection.organization",
"uri": "/detectionDefinition/organizations/8d4a70b8-565f-4416-9be5-c2a940455516"
},
{
"href": "/detectionDefinition/organizations/8d4a70b8-565f-4416-9be5-c2a940455516",
"method": "PATCH",
"rel": "patch",
"type": "application/vnd.sas.detection.organization",
"uri": "/detectionDefinition/organizations/8d4a70b8-565f-4416-9be5-c2a940455516"
},
{
"href": "/detectionDefinition/organizations/8d4a70b8-565f-4416-9be5-c2a940455516",
"method": "DELETE",
"rel": "delete",
"uri": "/detectionDefinition/organizations/8d4a70b8-565f-4416-9be5-c2a940455516"
}
],
"modifiedBy": "userid",
"modifiedTimeStamp": "2022-05-05T14:16:37.557Z",
"name": "GLOBAL",
"messageClassificationId": "ced5ac46-825b-46eb-9cc5-734a8bb58654",
"profileSchemaName": "GLOBAL Profile",
"roleRelations": [
{
"roleId": "SDARulesEditor",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/identities/groups/SDARulesEditor",
"uri": "/identities/groups/SDARulesEditor",
"type": "application/vnd.sas.identity.group"
}
]
}
],
"schemaRelations": [
{
"schemaName": "Digital Loan Application",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionMessageSchema/messages?filter=eq('name','Digital Loan Application')",
"uri": "/detectionMessageSchema/messages?filter=eq('name','Digital Loan Application')",
"type": "application/vnd.sas.collection+json"
}
]
}
],
"listRelations": [
{
"listId": "ee8c7ec1-d343-4057-814f-c2ccb31a1c1f"
},
{
"listId": "7f3343b5-be79-41c2-bd1f-a7559e844731"
}
],
"revision": 0,
"version": 2
}
Here is an example of an error when organization's name contains spaces or special characters or is too long.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The specified object with type \"Organization\" is invalid.",
"details": [
"path: /detectionDefinition/organizations",
"correlator: 33c38a92-3ec2-4c6e-a29b-d4881e277786"
]
}
Here is an example of an error when you update an organization.
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000022,
"message": "The organization's name Bank A must be unique.",
"details": [
"path: /detectionDefinition/organizations/7c7e96cd-248a-4a46-b274-57dc50ba948f",
"correlator: e8b0416d-400e-4983-a61d-35879687f3db"
]
}
Here is an example of an error when you update an object with a stale ETag value.
{
"version": 2,
"httpStatusCode": 412,
"errorCode": 1000000,
"message": "The object has been updated since you last retrieved it.",
"details": [
"path: /detectionDefinition/organizations/7c7e96cd-248a-4a46-b274-57dc50ba948f",
"correlator: 94104746-3382-4e5c-887c-ad919d38447a"
]
}
Here is an example of an error when a required pre-condition header (If-Match/If-Unmodified-Since) was not provided.
{
"version": 2,
"httpStatusCode": 428,
"errorCode": 1000021,
"message": "Conditional match header is missing.",
"details": [
"path: /detectionDefinition/organizations/7c7e96cd-248a-4a46-b274-57dc50ba948f",
"correlator: 8351e27c-2624-412a-967c-3a3297e6585c"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successfully updated the organization. | organizationv2 |
400 | Bad Request | A bad request. Possible reason or reasons: |
- The organization ID may be invalid.
- The organization name may not be a valid name.
- The ID in the request body may not match the ID in the URL.|error2|
|409|Conflict|There is a conflict with an existing resource.
Possible reason or reasons:
- The new name is in use by another organization.|error2|
|412|Precondition Failed|A precondition has not been met. Make sure that the If-Match header has been set with the latest ETag of the object.|error2|
|428|Precondition Required|A required pre-condition (If-Match/If-Unmodified-Since) was not provided.|error2|
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | Date and time of last modification. | |
428 | Location | string | Location of URI for the endpoint. |
Delete an Organization
Code samples
# You can also use wget
curl -X DELETE http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.error+json'
const headers = {
'Accept':'application/vnd.sas.error+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.error+json'
}
r = requests.delete('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.error+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /organizations/{orgId}
Deletes an organization and removes all links to associated roles and message schemas. Also deletes the organization's deployment definition.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
orgId | path | string | true | The UUID of the organization. |
Example responses
Here is an example of an invalid organization ID that is used as the path parameter.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"a-fake-id-value\" for the field \"orgId\" does not match the documented format.",
"details": [
"path: /detectionDefinition/organizations/a-fake-id-value/",
"correlator: ba7f9c2d-76be-40fe-8ded-1b07cbd0dbac"
]
}
Here is an example of an error when you try to delete an organization that has one or more projects.
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000020,
"message": "One or more projects exist in the organization Bank XYZ with id \"ba4ed07d-7088-43fb-aadd-519ba12c6b0d\"",
"details": [
"path: /detectionDefinition/organizations/ba4ed07d-7088-43fb-aadd-519ba12c6b0d",
"correlator: f077ca4c-5732-4426-9457-d1c9e388ee50"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | Deleted | None |
400 | Bad Request | A bad request with an existing resource. Possible reason or reasons: |
|
- The organization ID is not valid. |
error2 | ||
409 | Conflict | There is a conflict with an existing resource. Possible reason or reasons: |
|
- One or more projects exist in the organization. |
error2 |
Return a Collection of Message Classifications Under an Organization
Code samples
# You can also use wget
curl -X GET http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/messageClassifications \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/messageClassifications',
{
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('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/messageClassifications', 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", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/messageClassifications", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /organizations/{orgId}/messageClassifications
Gets a collection of message classifications of the specified organization. Specify a depth to return sub-message classifications up to the depth. If no depth is specified or a depth is set to -1, then all sub-message classifications are returned.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
orgId | path | string | true | The UUID of the organization. |
depth | query | integer | false | Specifies the depth that sub-message classifications are to be retrieved with the message classification. Specify a value of -1 to retrieve all sub-message classifications. Specify a value of 0 to retrieve no sub-message classifications. Specify a positive number to retrieve sub-message classifications up to the depth. |
Example responses
An example of a message classification list of an organization.
{
"version": 2,
"accept": "application/vnd.sas.detection.message.classification",
"count": 3,
"start": 0,
"limit": 3,
"name": "messageClassifications",
"items": [
{
"creationTimeStamp": "2022-10-21T14:56:22.331Z",
"createdBy": "user1",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"revision": 0,
"version": 1,
"id": "d1267966-f431-41c0-b1fa-0a1a17e4365a",
"name": "ChildA",
"displayName": "Child A",
"keyCode": "ZA",
"parentId": "3a90164e-ba5d-4337-b006-055ae9995237",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/messageClassifications/d1267966-f431-41c0-b1fa-0a1a17e4365a",
"uri": "/detectionDefinition/messageClassifications/d1267966-f431-41c0-b1fa-0a1a17e4365a",
"type": "application/vnd.sas.detection.ou"
}
]
},
{
"creationTimeStamp": "2022-10-21T14:56:47.977Z",
"createdBy": "user1",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"revision": 0,
"version": 1,
"id": "37c21f45-b482-445f-8cc2-55e4f67133f0",
"name": "ChildB",
"displayName": "Child B",
"keyCode": "ZB",
"parentId": "3a90164e-ba5d-4337-b006-055ae9995237",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/messageClassifications/37c21f45-b482-445f-8cc2-55e4f67133f0",
"uri": "/detectionDefinition/messageClassifications/37c21f45-b482-445f-8cc2-55e4f67133f0",
"type": "application/vnd.sas.detection.ou"
}
]
},
{
"creationTimeStamp": "2022-10-17T21:19:14.940Z",
"createdBy": "user1",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"revision": 0,
"version": 1,
"id": "3a90164e-ba5d-4337-b006-055ae9995237",
"name": "ROOT",
"displayName": "Root",
"keyCode": "Z",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/messageClassifications/3a90164e-ba5d-4337-b006-055ae9995237",
"uri": "/detectionDefinition/messageClassifications/3a90164e-ba5d-4337-b006-055ae9995237",
"type": "application/vnd.sas.detection.ou"
}
]
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/organizations/7c7e96cd-248a-4a46-b274-57dc50ba948f/messageClassifications?depth=",
"uri": "/detectionDefinition/organizations/7c7e96cd-248a-4a46-b274-57dc50ba948f/messageClassifications?depth=",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.ou"
}
]
}
{
"version": 2,
"accept": "application/vnd.sas.detection.message.classification",
"count": 3,
"start": 0,
"limit": 3,
"name": "messageClassifications",
"items": [
{
"creationTimeStamp": "2022-10-21T14:56:22.331Z",
"createdBy": "user1",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"revision": 0,
"version": 1,
"id": "d1267966-f431-41c0-b1fa-0a1a17e4365a",
"name": "ChildA",
"displayName": "Child A",
"keyCode": "ZA",
"parentId": "3a90164e-ba5d-4337-b006-055ae9995237",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/messageClassifications/d1267966-f431-41c0-b1fa-0a1a17e4365a",
"uri": "/detectionDefinition/messageClassifications/d1267966-f431-41c0-b1fa-0a1a17e4365a",
"type": "application/vnd.sas.detection.ou"
}
]
},
{
"creationTimeStamp": "2022-10-21T14:56:47.977Z",
"createdBy": "user1",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"revision": 0,
"version": 1,
"id": "37c21f45-b482-445f-8cc2-55e4f67133f0",
"name": "ChildB",
"displayName": "Child B",
"keyCode": "ZB",
"parentId": "3a90164e-ba5d-4337-b006-055ae9995237",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/messageClassifications/37c21f45-b482-445f-8cc2-55e4f67133f0",
"uri": "/detectionDefinition/messageClassifications/37c21f45-b482-445f-8cc2-55e4f67133f0",
"type": "application/vnd.sas.detection.ou"
}
]
},
{
"creationTimeStamp": "2022-10-17T21:19:14.940Z",
"createdBy": "user1",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"revision": 0,
"version": 1,
"id": "3a90164e-ba5d-4337-b006-055ae9995237",
"name": "ROOT",
"displayName": "Root",
"keyCode": "Z",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/messageClassifications/3a90164e-ba5d-4337-b006-055ae9995237",
"uri": "/detectionDefinition/messageClassifications/3a90164e-ba5d-4337-b006-055ae9995237",
"type": "application/vnd.sas.detection.ou"
}
]
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/organizations/7c7e96cd-248a-4a46-b274-57dc50ba948f/messageClassifications?depth=",
"uri": "/detectionDefinition/organizations/7c7e96cd-248a-4a46-b274-57dc50ba948f/messageClassifications?depth=",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.ou"
}
]
}
Here is an example of an error when you retrieve an organization with an invalid UUID.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"7c7e96cd_248a_4a46_b274_57dc50ba948f\" for the field \"orgId\" does not match the documented format.",
"details": [
"path: /detectionDefinition/organizations/7c7e96cd-248a-4a46-b274-57dc50ba948fX",
"correlator: 61cabe1e-5303-4c3b-af38-a0574a173bbd"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | messageClassificationCollection |
400 | Bad Request | A bad request. Possible reason or reasons: |
|
- The organization ID may be invalid. |
error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | Date and time of last modification. |
Associate a Role to an Organization
Code samples
# You can also use wget
curl -X POST http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/roleRelationships/{roleId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.error+json'
const headers = {
'Accept':'application/vnd.sas.error+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/roleRelationships/{roleId}',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.error+json'
}
r = requests.post('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/roleRelationships/{roleId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.error+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/roleRelationships/{roleId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /organizations/{orgId}/roleRelationships/{roleId}
Creates the relationship between an organization and a role of the detection definition service.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
orgId | path | string | true | The UUID of the organization. |
roleId | path | string | true | The ID of a role. |
Example responses
Here is an example of an error when you assign to an organization a role that is not a SDA role.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 999999,
"message": "The identity RoleXYZ is not a member of role SASDetectionRoles.",
"details": [
"path: /detectionDefinition/organizations/7c7e96cd-248a-4a46-b274-57dc50ba948f/roleRelationships/Payments",
"correlator: 537756aa-2e69-4175-97d2-18d8740899a6"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | Created | None |
400 | Bad Request | A bad request with an existing resource. Possible reason or reasons: |
- The organization ID is not valid.
- The role ID is not valid, or it is not a role in the detection definition service.|error2|
Disassociate a Role from an Organization
Code samples
# You can also use wget
curl -X DELETE http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/roleRelationships/{roleId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.error+json'
const headers = {
'Accept':'application/vnd.sas.error+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/roleRelationships/{roleId}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.error+json'
}
r = requests.delete('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/roleRelationships/{roleId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.error+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/roleRelationships/{roleId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /organizations/{orgId}/roleRelationships/{roleId}
Deletes the relationship between an organization and a role of the detection definition service.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
orgId | path | string | true | The UUID of the organization. |
roleId | path | string | true | The ID of a role. |
Example responses
Here is an example of an invalid organization ID that is used as the path parameter.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"a-fake-id-value\" for the field \"orgId\" does not match the documented format.",
"details": [
"path: /detectionDefinition/organizations/a-fake-id-value/",
"correlator: ba7f9c2d-76be-40fe-8ded-1b07cbd0dbac"
]
}
An example of an error when the organization ID that is used as the path parameter does not exist.
{
"version": 2,
"httpStatusCode": 404,
"errorCode": 1000001,
"message": "The organization with the ID \"fef22880-352c-11ee-be56-0242ac120002\" is missing.",
"details": [
"path: /detectionDefinition/organizations/fef22880-352c-11ee-be56-0242ac120002/roleRelationships/SDARulesEditor",
"correlator: 3190b806-da41-4f70-87c0-f74ab5f74f00"
]
}
An example of an error response when a role relation cannot be deleted from an organization.
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000020,
"message": "You cannot remove all roles from the organization \"Sample Organization\". Removed roles: SDASystemAdmin.",
"details": [
"path: /detectionDefinition/organizations/b132e742-ca32-4d43-94db-1b484539ab86/roleRelationships/SDASystemAdmin",
"correlator: 669d7030-1860-4249-8515-2e3740aea6e6"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | Deleted | None |
400 | Bad Request | A bad request with an existing resource. Possible reason or reasons: |
|
- The organization ID is not valid. |
error2 | ||
404 | Not Found | A bad request with a missing resource. Possible reason or reasons: |
|
- The organization with the specified ID does not exist. |
error2 | ||
409 | Conflict | There is a conflict with an existing resource. |
Possible reason or reasons:
- All roles would be removed from the organization.|error2|
Associate a Message Schema to an Organization
Code samples
# You can also use wget
curl -X POST http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/schemaRelationships \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.detection.schemarelation+json' \
-H 'Accept: application/vnd.sas.error+json'
const inputBody = '{
"schemaName": "Schema Name"
}';
const headers = {
'Content-Type':'application/vnd.sas.detection.schemarelation+json',
'Accept':'application/vnd.sas.error+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/schemaRelationships',
{
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.detection.schemarelation+json',
'Accept': 'application/vnd.sas.error+json'
}
r = requests.post('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/schemaRelationships', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.detection.schemarelation+json"},
"Accept": []string{"application/vnd.sas.error+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/schemaRelationships", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /organizations/{orgId}/schemaRelationships
Creates the relationship between an organization and a message schema of the detection definition service.
Body parameter
An example of new org schema relationship request body
{
"schemaName": "Schema Name"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | schemaRelationshipRep | false | A JSON representation of the schema relationship to be created. |
orgId | path | string | true | The UUID of the organization. |
Example responses
Here is an example of an error when you assign to an organization a schema that does not exist in the Detection Message Schema Service.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 999999,
"message": "The schema object does not exist.",
"details": [
"path: /detectionDefinition/organizations/7c7e96cd-248a-4a46-b274-57dc50ba948f/schemaRelationships/NotASchema",
"correlator: 13db4331-b8c1-4e95-b82d-c18931c464f4"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | Created | None |
400 | Bad Request | A bad request with an existing resource. Possible reason or reasons: |
- The organization ID is not valid.
- The schema name is not valid or does not exist in the SAS detection message schema service.|error2|
Disassociate a Schema from an Organization
Code samples
# You can also use wget
curl -X DELETE http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/schemaRelationships \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.detection.schemarelation+json' \
-H 'Accept: application/vnd.sas.error+json'
const inputBody = '{
"schemaName": "Schema Name"
}';
const headers = {
'Content-Type':'application/vnd.sas.detection.schemarelation+json',
'Accept':'application/vnd.sas.error+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/schemaRelationships',
{
method: 'DELETE',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.detection.schemarelation+json',
'Accept': 'application/vnd.sas.error+json'
}
r = requests.delete('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/schemaRelationships', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.detection.schemarelation+json"},
"Accept": []string{"application/vnd.sas.error+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/schemaRelationships", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /organizations/{orgId}/schemaRelationships
Deletes the relationship between an organization and a message schema.
Body parameter
An example of new org schema relationship request body
{
"schemaName": "Schema Name"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | schemaRelationshipRep | false | A JSON representation of the schema relationship to be disassociated. |
orgId | path | string | true | The UUID of the organization. |
Example responses
Here is an example of an error when you remove a schema from an organization.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"Cards$ABC\" for the field \"schemaName\" does not match the documented format.",
"details": [
"path: /detectionDefinition/organizations/7c7e96cd-248a-4a46-b274-57dc50ba948f/schemaRelationships/Cards$ABC",
"correlator: a5f29b1b-27aa-4dd5-8cae-09809ae6fb5b"
]
}
An example of an error when the organization ID that is used as the path parameter does not exist.
{
"version": 2,
"httpStatusCode": 404,
"errorCode": 1000001,
"message": "The organization with the ID \"fef22880-352c-11ee-be56-0242ac120002\" is missing.",
"details": [
"path: /detectionDefinition/organizations/fef22880-352c-11ee-be56-0242ac120002/roleRelationships/SDARulesEditor",
"correlator: 3190b806-da41-4f70-87c0-f74ab5f74f00"
]
}
An example of an error when you remove a schema association from an organization when the schema is in use.
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000020,
"message": "The organization cannot be unsubscribed from the message schema. The message schema is in use by one or more projects in the organization.",
"details": [
"path: /detectionDefinition/organizations/7c7e96cd-248a-4a46-b274-57dc50ba948f/schemaRelationships/Cards",
"correlator: a5f29b1b-27aa-4dd5-8cae-09809ae6fb5b"
]
}
An example of an error when you remove all message schema associations from an organization.
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000020,
"message": "You cannot remove all message schemas from the organization \"Sample Organization\". Removed schemas: Core.",
"details": [
"path: /detectionDefinition/organizations/b132e742-ca32-4d43-94db-1b484539ab86/schemaRelationships",
"correlator: 6ee213e4-4947-4ee5-b75f-3b1a9629ace1"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | Deleted | None |
400 | Bad Request | A bad request with an existing resource. Possible reason or reasons: |
- The organization ID is not valid.
- The schema name is not valid.|error2|
|404|Not Found|A bad request with a missing resource.
Possible reason or reasons:
- The organization with the specified ID does not exist.|error2|
|409|Conflict|There is a conflict with an existing resource.
Possible reason or reasons:
- The message schema is in use by projects in the organization.
- All message schemas would be removed from the organization.|error2|
Associate a List to an Organization
Code samples
# You can also use wget
curl -X POST http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/listRelationships/{listId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.error+json'
const headers = {
'Accept':'application/vnd.sas.error+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/listRelationships/{listId}',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.error+json'
}
r = requests.post('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/listRelationships/{listId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.error+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/listRelationships/{listId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /organizations/{orgId}/listRelationships/{listId}
Creates the relationship between an organization and a list.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
orgId | path | string | true | The UUID of the organization. |
listId | path | string | true | The UUID of the list. |
Example responses
An example of an error when you assign a list with an inactive state to an organization.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000006,
"message": "The list closedAccts is not active.",
"details": [
"path: /detectionDefinition/organizations/bda32319-352b-4106-80a6-ef36ad639173/listRelationships/1da99c43-442a-497c-8b29-72eca01e70f1",
"correlator: b028b37b-f53a-4a66-afa6-f4db1bed1b08"
]
}
An example of an error when you assign a list that does not exist to an organization.
{
"version": 2,
"httpStatusCode": 403,
"errorCode": 1000012,
"message": "The list could not be found in folder \"Detection Repository/Lists/d5ed693d-bf7a-4e6a-99ca-bb646782ef32\".",
"details": [
"path: /detectionDefinition/organizations/bda32319-352b-4106-80a6-ef36ad639172/listRelationships/d5ed693d-bf7a-4e6a-99ca-bb646782ef32",
"correlator: 47ea0ee1-d4d5-4b9b-8aa0-00429c3f0b5b"
]
}
An example of an error when you assign a list to an organization with an invalid orgID.
{
"version": 2,
"httpStatusCode": 422,
"errorCode": 1000014,
"message": "The object failed to be created.",
"details": [
"path: /detectionDefinition/organizations/bda32319-352b-4106-80a6-ef36ad639172/listRelationships/1da99c43-442a-497c-8b29-72eca01e70f1",
"correlator: 6d5411a7-bc2a-4fb6-be0b-02bc5b7ff7e4"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | Created | None |
400 | Bad Request | A bad request with an existing resource. Possible reason or reasons: |
|
- The list state is not active. |
error2 | ||
403 | Forbidden | A bad request with an existing resource. Possible reason or reasons: |
- The list ID is not valid.
- The list having the specified list ID could not be found in the repository.|error2|
|422|Unprocessable Entity|A bad request with an existing resource.
Possible reason or reasons:
- The organization ID is not valid.|error2|
Disassociate a List from an Organization
Code samples
# You can also use wget
curl -X DELETE http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/listRelationships/{listId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.error+json'
const headers = {
'Accept':'application/vnd.sas.error+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/listRelationships/{listId}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.error+json'
}
r = requests.delete('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/listRelationships/{listId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.error+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/listRelationships/{listId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /organizations/{orgId}/listRelationships/{listId}
Deletes the relationship between an organization and a list.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
orgId | path | string | true | The UUID of the organization. |
listId | path | string | true | The UUID of the list. |
Example responses
An example of an error when you remove a list from an organization.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"e95ce1bd-$2490-42aa-87a9-95fab4bb7fc\" for the field \"listID\" does not match the documented format.",
"details": [
"path: /detectionDefinition/organizations/3559dadc-7896-45c9-86be-38629507e72d/listRelationships/e95ce1bd-$2490-42aa-87a9-95fab4bb7fc",
"correlator: 90a829fe-74f4-4131-88de-3f4d41263cd5"
]
}
An example of an error when the organization ID that is used as the path parameter does not exist.
{
"version": 2,
"httpStatusCode": 404,
"errorCode": 1000001,
"message": "The organization with the ID \"fef22880-352c-11ee-be56-0242ac120002\" is missing.",
"details": [
"path: /detectionDefinition/organizations/fef22880-352c-11ee-be56-0242ac120002/roleRelationships/SDARulesEditor",
"correlator: 3190b806-da41-4f70-87c0-f74ab5f74f00"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | Deleted | None |
400 | Bad Request | A bad request with an existing resource. Possible reason or reasons: |
- The organization ID is not valid.
- The list id is not valid.|error2|
|404|Not Found|A bad request with a missing resource.
Possible reason or reasons:
- The organization with the specified ID does not exist.|error2|
Get a List of the Lists Associated with an Organization
Code samples
# You can also use wget
curl -X GET http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/lists \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/lists',
{
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('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/lists', 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", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/lists", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /organizations/{orgId}/lists
Returns the list of lists associated with an organization.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
orgId | path | string | true | The UUID of the organization. |
Example responses
An example of a collection of organization lists
{
"version": 2,
"accept": "application/vnd.sas.detection.organization",
"count": 2,
"start": 0,
"limit": 100,
"name": "lists",
"items": [
{
"version": 1,
"columns": [
{
"name": "merch_term_id",
"datatype": "string",
"position": 1,
"isKey": true,
"keyPosition": 1
}
],
"creationTimeStamp": "1901-01-01T00:00:00.000Z",
"id": "ee8c7ec1-d343-4057-814f-c2ccb31a1c1f",
"name": "bad_merchant_terminal"
},
{
"version": 1,
"columns": [
{
"name": "aqo_acct_num",
"datatype": "string",
"position": 1,
"isKey": true,
"keyPosition": 1
},
{
"name": "reason",
"datatype": "string",
"position": 2
},
{
"name": "when",
"datatype": "string",
"position": 3
}
],
"creationTimeStamp": "1901-01-01T00:00:00.000Z",
"id": "7f3343b5-be79-41c2-bd1f-a7559e844731",
"name": "closedAccts"
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/organizations/3559dadc-7896-45c9-86be-38629507e72d/lists",
"uri": "/detectionDefinition/organizations/3559dadc-7896-45c9-86be-38629507e72d/lists",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.organization"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/organizations/3559dadc-7896-45c9-86be-38629507e72d/lists?start=0&limit=100",
"uri": "/detectionDefinition/organizations/3559dadc-7896-45c9-86be-38629507e72d/lists?start=0&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.organization"
}
]
}
{
"version": 2,
"accept": "application/vnd.sas.detection.organization",
"count": 2,
"start": 0,
"limit": 100,
"name": "lists",
"items": [
{
"version": 1,
"columns": [
{
"name": "merch_term_id",
"datatype": "string",
"position": 1,
"isKey": true,
"keyPosition": 1
}
],
"creationTimeStamp": "1901-01-01T00:00:00.000Z",
"id": "ee8c7ec1-d343-4057-814f-c2ccb31a1c1f",
"name": "bad_merchant_terminal"
},
{
"version": 1,
"columns": [
{
"name": "aqo_acct_num",
"datatype": "string",
"position": 1,
"isKey": true,
"keyPosition": 1
},
{
"name": "reason",
"datatype": "string",
"position": 2
},
{
"name": "when",
"datatype": "string",
"position": 3
}
],
"creationTimeStamp": "1901-01-01T00:00:00.000Z",
"id": "7f3343b5-be79-41c2-bd1f-a7559e844731",
"name": "closedAccts"
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/organizations/3559dadc-7896-45c9-86be-38629507e72d/lists",
"uri": "/detectionDefinition/organizations/3559dadc-7896-45c9-86be-38629507e72d/lists",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.organization"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/organizations/3559dadc-7896-45c9-86be-38629507e72d/lists?start=0&limit=100",
"uri": "/detectionDefinition/organizations/3559dadc-7896-45c9-86be-38629507e72d/lists?start=0&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.organization"
}
]
}
An example of an error when retrieving organization lists with an invalid organization ID.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"3edc056f-74d9-4033-963e-a38f571c0b9b3\" for the field \"orgId\" does not match the documented format.",
"details": [
"path: /detectionDefinition/organizations/3edc056f-74d9-4033-963e-a38f571c0b9b3/lists",
"correlator: b0000bd7-e277-4408-94f1-ff21fbc46f85"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | listCollection |
400 | Bad Request | A bad request with an existing resource. Possible reason: |
|
- The organization ID is not valid. |
error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | Date and time of last modification. |
Get the List of Variables of All Message Schemas Associated with an Organization
Code samples
# You can also use wget
curl -X GET http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/variables \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/variables',
{
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('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/variables', 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", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/variables", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /organizations/{orgId}/variables
Returns the list of variables of all message schemas associated with an organization.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
orgId | path | string | true | The UUID of the organization. |
Example responses
An example of a collection of project message schema variables
{
"version": 2,
"accept": "application/vnd.sas.detection.message.variable",
"count": 2,
"start": 0,
"limit": 100,
"name": "variables",
"items": [
{
"access": "ro",
"arrayItem": "none",
"createdBy": "userabc",
"creationTimeStamp": "2022-06-30T17:28:23.345Z",
"defaultValue": "",
"deprecated": false,
"description": "",
"displayName": "aqo_cash_balance",
"enumURI": "",
"exclusiveMaximum": false,
"id": "c9e0accd-1c01-4c8c-86fa-d12122af70aa",
"inclusiveMinimum": false,
"isMissing": false,
"jsonPath": ".AQO",
"locked": false,
"maxItems": 0,
"maxLength": 0,
"maximum": 0,
"minItems": 0,
"minLength": 0,
"minimum": 0,
"modifiedBy": "userabc",
"modifiedTimeStamp": "2022-07-01T14:44:13.845Z",
"name": "aqo_cash_balance",
"private": false,
"required": false,
"revision": 1,
"type": "number",
"userGroup": "DMSDefault",
"variableSetId": "45c682f9-7d22-435b-b79b-d361e6c1cb3a",
"version": 1
},
{
"access": "ro",
"arrayItem": "none",
"createdBy": "userabc",
"creationTimeStamp": "2022-06-30T17:28:49.194Z",
"defaultValue": "",
"deprecated": false,
"description": "",
"displayName": "tcn_merch_curr_code",
"enumURI": "",
"exclusiveMaximum": false,
"id": "dfd76464-b37d-4220-ae31-fadfd52f8e9b",
"inclusiveMinimum": false,
"isMissing": false,
"jsonPath": ".TCN",
"locked": false,
"maxItems": 0,
"maxLength": 3,
"maximum": 0,
"minItems": 0,
"minLength": 0,
"minimum": 0,
"modifiedBy": "userabc",
"modifiedTimeStamp": "2022-07-01T14:43:42.425Z",
"name": "tcn_merch_curr_code",
"private": false,
"required": false,
"revision": 1,
"type": "string",
"userGroup": "DMSDefault",
"variableSetId": "409363c3-c475-4570-a009-a5f3ae9fbd37",
"version": 1
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/organizations/3edc056f-74d9-4033-963e-a38f571c0b9b/variables",
"uri": "/detectionDefinition/organizations/3edc056f-74d9-4033-963e-a38f571c0b9b/variables",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message.variable"
}
]
}
{
"version": 2,
"accept": "application/vnd.sas.detection.message.variable",
"count": 2,
"start": 0,
"limit": 100,
"name": "variables",
"items": [
{
"access": "ro",
"arrayItem": "none",
"createdBy": "userabc",
"creationTimeStamp": "2022-06-30T17:28:23.345Z",
"defaultValue": "",
"deprecated": false,
"description": "",
"displayName": "aqo_cash_balance",
"enumURI": "",
"exclusiveMaximum": false,
"id": "c9e0accd-1c01-4c8c-86fa-d12122af70aa",
"inclusiveMinimum": false,
"isMissing": false,
"jsonPath": ".AQO",
"locked": false,
"maxItems": 0,
"maxLength": 0,
"maximum": 0,
"minItems": 0,
"minLength": 0,
"minimum": 0,
"modifiedBy": "userabc",
"modifiedTimeStamp": "2022-07-01T14:44:13.845Z",
"name": "aqo_cash_balance",
"private": false,
"required": false,
"revision": 1,
"type": "number",
"userGroup": "DMSDefault",
"variableSetId": "45c682f9-7d22-435b-b79b-d361e6c1cb3a",
"version": 1
},
{
"access": "ro",
"arrayItem": "none",
"createdBy": "userabc",
"creationTimeStamp": "2022-06-30T17:28:49.194Z",
"defaultValue": "",
"deprecated": false,
"description": "",
"displayName": "tcn_merch_curr_code",
"enumURI": "",
"exclusiveMaximum": false,
"id": "dfd76464-b37d-4220-ae31-fadfd52f8e9b",
"inclusiveMinimum": false,
"isMissing": false,
"jsonPath": ".TCN",
"locked": false,
"maxItems": 0,
"maxLength": 3,
"maximum": 0,
"minItems": 0,
"minLength": 0,
"minimum": 0,
"modifiedBy": "userabc",
"modifiedTimeStamp": "2022-07-01T14:43:42.425Z",
"name": "tcn_merch_curr_code",
"private": false,
"required": false,
"revision": 1,
"type": "string",
"userGroup": "DMSDefault",
"variableSetId": "409363c3-c475-4570-a009-a5f3ae9fbd37",
"version": 1
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/organizations/3edc056f-74d9-4033-963e-a38f571c0b9b/variables",
"uri": "/detectionDefinition/organizations/3edc056f-74d9-4033-963e-a38f571c0b9b/variables",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message.variable"
}
]
}
An example of an error when orgnanization variables with an invalid organization ID.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"3edc056f-74d9-4033-963e-a38f571c0b9b3\" for the field \"orgId\" does not match the documented format.",
"details": [
"path: /detectionDefinition/organizations/3edc056f-74d9-4033-963e-a38f571c0b9b3/variables",
"correlator: b0000bd7-e277-4408-94f1-ff21fbc46f85"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | variableSummaryCollection |
400 | Bad Request | A bad request with an existing resource. Possible reason: |
|
- The organization ID is not valid. |
error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | Date and time of last modification. |
Message Classifications
The operations for message classification instances.
Create a Message Classification
Code samples
# You can also use wget
curl -X POST http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/messageClassifications \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.detection.message.classification+json' \
-H 'Accept: application/vnd.sas.detection.message.classification+json'
const inputBody = '{
"name": "NA",
"displayName": "North America",
"parentId": "UUID of the parent message classification if not the root"
}';
const headers = {
'Content-Type':'application/vnd.sas.detection.message.classification+json',
'Accept':'application/vnd.sas.detection.message.classification+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/messageClassifications',
{
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.detection.message.classification+json',
'Accept': 'application/vnd.sas.detection.message.classification+json'
}
r = requests.post('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/messageClassifications', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.detection.message.classification+json"},
"Accept": []string{"application/vnd.sas.detection.message.classification+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/messageClassifications", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /messageClassifications
Creates a message classification from a JSON representation.
Body parameter
An example of new message classification object
{
"name": "NA",
"displayName": "North America",
"parentId": "UUID of the parent message classification if not the root"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | messageClassification | false | A JSON representation of the message classification to be created. |
Example responses
An example of message classification object
{
"creationTimeStamp": "2022-05-18T19:01:09.985Z",
"createdBy": "userid",
"modifiedTimeStamp": "2022-05-18T19:01:09.985Z",
"modifiedBy": "userid",
"revision": 0,
"version": 1,
"id": "e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"name": "NA",
"displayName": "North America",
"keyCode": "1.6.2",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"uri": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"type": "application/vnd.sas.detection.message.classification"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"uri": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"type": "application/vnd.sas.detection.message.classification"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"uri": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c"
}
]
}
{
"creationTimeStamp": "2022-05-18T19:01:09.985Z",
"createdBy": "userid",
"modifiedTimeStamp": "2022-05-18T19:01:09.985Z",
"modifiedBy": "userid",
"revision": 0,
"version": 1,
"id": "e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"name": "NA",
"displayName": "North America",
"keyCode": "1.6.2",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"uri": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"type": "application/vnd.sas.detection.message.classification"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"uri": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"type": "application/vnd.sas.detection.message.classification"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"uri": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c"
}
]
}
An example of an error response when you update a message classification with an invalid key code.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000006,
"message": "The message classification's code '1.2.1' must start with and extend its parent's code '1.1'.",
"details": [
"path: /detectionDefinition/messageClassifications/37c21f45-b482-445f-8cc2-55e4f67133f0",
"correlator: ac695830-2719-43b6-bcf1-50876350f654"
]
}
An example of an error response when you create another root message classification.
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000017,
"message": "The root message classification already exists. Current root is GLOBAL with id \"ced5ac46-825b-46eb-9cc5-734a8bb58654\".",
"details": [
"path: /detectionDefinition/messageClassifications",
"correlator: 6c375e8d-ca18-4b9f-8b60-59795aa7c0db"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Created | messageClassification |
400 | Bad Request | A bad request. Possible reason or reasons: |
- The message classification name or key code may not be valid.
- The parent message classification with the specified ID may not exist.
- The message classification key code may not be prefixed with its parent's keyCode.
- The system may not be able to generate a key code for the message classification because:
- The parent message classification is already at the deepest allowed level.
- The parent message classification already has the maximum number of allowed children.|error2|
|409|Conflict|There is a conflict with an existing resource.
Possible reason or reasons:
- The name or key code of the message classification may not be unique.
- The root message classification already exists.|error2|
- The parent message classification is already at the deepest allowed level.
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Etag | string | An hash-code for the response resource. | |
201 | Last-Modified | string | Date and time of last modification. | |
201 | Location | string | Location of URI for the endpoint. |
Return a List of Message Classifications
Code samples
# You can also use wget
curl -X GET http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/messageClassifications \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/messageClassifications',
{
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('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/messageClassifications', 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", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/messageClassifications", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /messageClassifications
Gets the collection of message classifications.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
start | query | integer | false | The 0-based offset of the first resource to return. Defaults to 0. |
limit | query | integer | false | The maximum number of resources to return. Defaults to 100. |
filter | query | string(filter-criteria) | false | The filter criteria for returned resources. For more information, see Filtering in REST APIs. |
sortBy | query | string(sort-criteria) | false | Specifies the sorting for returned resources. For more information, see Sorting in REST APIs. |
Example responses
An example of a message classification list.
{
"version": 2,
"accept": "application/vnd.sas.detection.message.classification",
"count": 3,
"start": 0,
"limit": 100,
"name": "messageClassifications",
"items": [
{
"creationTimeStamp": "2022-10-17T21:19:14.940Z",
"createdBy": "user1",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"revision": 0,
"version": 1,
"id": "3a90164e-ba5d-4337-b006-055ae9995237",
"name": "ROOT",
"displayName": "Root",
"keyCode": "1"
},
{
"creationTimeStamp": "2022-10-21T14:56:22.331Z",
"createdBy": "user1",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"revision": 0,
"version": 1,
"id": "d1267966-f431-41c0-b1fa-0a1a17e4365a",
"name": "ChildA",
"displayName": "Child A",
"keyCode": "1.1",
"parentId": "3a90164e-ba5d-4337-b006-055ae9995237"
},
{
"creationTimeStamp": "2022-10-21T14:56:47.977Z",
"createdBy": "user1",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"revision": 0,
"version": 1,
"id": "37c21f45-b482-445f-8cc2-55e4f67133f0",
"name": "ChildB",
"displayName": "Child B",
"keyCode": "1.2",
"parentId": "3a90164e-ba5d-4337-b006-055ae9995237"
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/messageClassifications",
"uri": "/detectionDefinition/messageClassifications",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message.classification"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/messageClassifications?start=0&limit=100&filter=contains%28keyCode%2C+%27Z%27%29",
"uri": "/detectionDefinition/messageClassifications?start=0&limit=100&filter=contains%28keyCode%2C+%27Z%27%29",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message.classification"
}
]
}
{
"version": 2,
"accept": "application/vnd.sas.detection.message.classification",
"count": 3,
"start": 0,
"limit": 100,
"name": "messageClassifications",
"items": [
{
"creationTimeStamp": "2022-10-17T21:19:14.940Z",
"createdBy": "user1",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"revision": 0,
"version": 1,
"id": "3a90164e-ba5d-4337-b006-055ae9995237",
"name": "ROOT",
"displayName": "Root",
"keyCode": "1"
},
{
"creationTimeStamp": "2022-10-21T14:56:22.331Z",
"createdBy": "user1",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"revision": 0,
"version": 1,
"id": "d1267966-f431-41c0-b1fa-0a1a17e4365a",
"name": "ChildA",
"displayName": "Child A",
"keyCode": "1.1",
"parentId": "3a90164e-ba5d-4337-b006-055ae9995237"
},
{
"creationTimeStamp": "2022-10-21T14:56:47.977Z",
"createdBy": "user1",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"revision": 0,
"version": 1,
"id": "37c21f45-b482-445f-8cc2-55e4f67133f0",
"name": "ChildB",
"displayName": "Child B",
"keyCode": "1.2",
"parentId": "3a90164e-ba5d-4337-b006-055ae9995237"
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/messageClassifications",
"uri": "/detectionDefinition/messageClassifications",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message.classification"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/messageClassifications?start=0&limit=100&filter=contains%28keyCode%2C+%27Z%27%29",
"uri": "/detectionDefinition/messageClassifications?start=0&limit=100&filter=contains%28keyCode%2C+%27Z%27%29",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message.classification"
}
]
}
An example of an error response when you retrieve message classifications with an invalid field name in the query filter.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000011,
"message": "The input query parameters are invalid",
"details": [
"path: /detectionDefinition/messageClassifications",
"correlator: 9fb6a9a6-e209-4920-b624-4bc3a0d3e63f"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | messageClassificationCollection |
400 | Bad Request | A bad request. Possible reason or reasons: |
|
- The query parameter may be invalid. |
error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | Date and time of last modification. |
Import the Message Classification Hierarchy from a CSV File
Code samples
# You can also use wget
curl -X POST http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/messageClassifications/imports \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: text/csv' \
-H 'Accept: application/vnd.sas.detection.message.classification.import.validation+json'
const inputBody = 'keyCode,name,displayName,createdBy
1,GLOBAL,GLOBAL,sas
1.1,NA,North America,sas
1.1.1,US,United States,sas
';
const headers = {
'Content-Type':'text/csv',
'Accept':'application/vnd.sas.detection.message.classification.import.validation+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/messageClassifications/imports',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'text/csv',
'Accept': 'application/vnd.sas.detection.message.classification.import.validation+json'
}
r = requests.post('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/messageClassifications/imports', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"text/csv"},
"Accept": []string{"application/vnd.sas.detection.message.classification.import.validation+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/messageClassifications/imports", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /messageClassifications/imports
Imports message classifications from a CSV file. To import an entire message classification hierarchical structure from a CSV file, complete these steps: 1. Set the Content-Type header to text/csv. 2. Provide the message classification hierarchical structure in the request body. 3. To validate a CSV file and receive the summary first, set the Accept header to application/vnd.sas.detection.message.classification.import.validation+json. 4. Correct all errors that were reported in the previous step and re-validate the file until no validation errors are found. 5. To import the message classification hierarchical structure, set the Accept header to application/vnd.sas.detection.message.classification+json or application/json.
Body parameter
This is an example of message classification hierarchy tree import CSV file.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | messageClassificationCsv | false | The comma-separated message classification values to import. |
Example responses
This is an example of the validation summary for the valid import CSV content:
keyCode,name,displayName,createdBy
1,GLOBAL,GLOBAL,sas
1.1,NA,North America,sas
1.1.1,US,United States,sas
{
"version": 1,
"messageClassification": {
"version": 1,
"name": "GLOBAL",
"displayName": "GLOBAL",
"keyCode": "1",
"childCount": 1,
"messageClassifications": [
{
"version": 1,
"name": "NA",
"displayName": "North America",
"keyCode": "1.1",
"childCount": 1,
"messageClassifications": [
{
"version": 1,
"name": "US",
"displayName": "United States",
"keyCode": "1.1.1",
"childCount": 0
}
]
}
]
},
"messageClassificationCount": 3,
"isValid": true
}
This is an example of the validation summary for the invalid import CSV content:
keyCode,name,displayName,createdBy
1,GLOBAL,GLOBAL,sas
1.2,NA,North America,sas
1.1.1,U.S.,United States,sas
{
"isValid": false,
"errors": [
{
"error": {
"Message": "Found 2 error or errors when parsing the records",
"Code": 1000002,
"Detail": {
"Count": 2,
"messageID": "detection-definition-api-icu.msgclasses.import.record.invalid.data.error.msg"
},
"Parent": null
},
"details": [
{
"row": 3,
"ref": "keyCode",
"value": "1.1.1",
"message": "The parent message classification with the key code '1.1' was not found."
},
{
"row": 3,
"ref": "name",
"value": "U.S.",
"message": "The data contains invalid characters for the field."
}
]
}
]
}
An example of message classification object
{
"creationTimeStamp": "2022-05-18T19:01:09.985Z",
"createdBy": "userid",
"modifiedTimeStamp": "2022-05-18T19:01:09.985Z",
"modifiedBy": "userid",
"revision": 0,
"version": 1,
"id": "e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"name": "NA",
"displayName": "North America",
"keyCode": "1.6.2",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"uri": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"type": "application/vnd.sas.detection.message.classification"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"uri": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"type": "application/vnd.sas.detection.message.classification"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"uri": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c"
}
]
}
{
"creationTimeStamp": "2022-05-18T19:01:09.985Z",
"createdBy": "userid",
"modifiedTimeStamp": "2022-05-18T19:01:09.985Z",
"modifiedBy": "userid",
"revision": 0,
"version": 1,
"id": "e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"name": "NA",
"displayName": "North America",
"keyCode": "1.6.2",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"uri": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"type": "application/vnd.sas.detection.message.classification"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"uri": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"type": "application/vnd.sas.detection.message.classification"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"uri": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c"
}
]
}
An example of an error response when the import CSV content does not contain all required columns.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "One or more required columns are missing in the import file. Missing columns: keyCode.",
"details": [
"path: /detectionDefinition/messageClassifications/imports",
"correlator: 159c4b7c-7644-4494-902d-a16e6f7bc7c1"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The summary of an import file validation when "application/vnd.sas.detection.message.classification.import.validation+json" is set as the Accept header. | messageClassificationImportValidation |
201 | Created | A hierarchy of message classifications is created from the import file. | messageClassification |
400 | Bad Request | A bad request. Possible reason or reasons: |
- The input CSV file is invalid (for example, it is missing required columns or contains incorrect data types).
- The name or key code of a message classification is not unique.|error2|
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Etag | string | An hash-code for the response resource. | |
201 | Last-Modified | string | Date and time of last modification. | |
201 | Location | string | Location of URI for the endpoint. |
Return a Message Classification
Code samples
# You can also use wget
curl -X GET http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/messageClassifications/{messageClassificationId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.detection.message.classification+json'
const headers = {
'Accept':'application/vnd.sas.detection.message.classification+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/messageClassifications/{messageClassificationId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.detection.message.classification+json'
}
r = requests.get('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/messageClassifications/{messageClassificationId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.detection.message.classification+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/messageClassifications/{messageClassificationId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /messageClassifications/{messageClassificationId}
Gets the message classification by its ID. Specify a depth to return sub-message classifications together with the message classification. If a depth is not specified or is set to 0, then no sub-message classifications are returned. To return all sub-message classifications, set the depth to -1.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
depth | query | integer | false | Specifies the depth that sub-message classifications are to be retrieved with the message classification. Specify a value of -1 to retrieve all sub-message classifications. Specify a value of 0 to retrieve no sub-message classifications. Specify a positive number to retrieve sub-message classifications up to the depth. |
messageClassificationId | path | string | true | The UUID of the message classification. |
Example responses
An example of a message classification with sub-message classifications.
{
"creationTimeStamp": "2022-10-17T21:19:14.940Z",
"createdBy": "user1",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"revision": 0,
"version": 1,
"id": "3a90164e-ba5d-4337-b006-055ae9995237",
"name": "ROOT",
"displayName": "Root",
"keyCode": "1",
"messageClassifications": [
{
"creationTimeStamp": "2022-10-21T14:56:22.331Z",
"createdBy": "user1",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"revision": 0,
"version": 1,
"id": "d1267966-f431-41c0-b1fa-0a1a17e4365a",
"name": "ChildA",
"displayName": "Child A",
"keyCode": "1.1",
"parentId": "3a90164e-ba5d-4337-b006-055ae9995237",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/messageClassifications/d1267966-f431-41c0-b1fa-0a1a17e4365a",
"uri": "/detectionDefinition/messageClassifications/d1267966-f431-41c0-b1fa-0a1a17e4365a",
"type": "application/vnd.sas.detection.message.classification"
}
]
},
{
"creationTimeStamp": "2022-10-21T14:56:47.977Z",
"createdBy": "user1",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"revision": 0,
"version": 1,
"id": "37c21f45-b482-445f-8cc2-55e4f67133f0",
"name": "ChildB",
"displayName": "Child B",
"keyCode": "1.2",
"parentId": "3a90164e-ba5d-4337-b006-055ae9995237",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/messageClassifications/37c21f45-b482-445f-8cc2-55e4f67133f0",
"uri": "/detectionDefinition/messageClassifications/37c21f45-b482-445f-8cc2-55e4f67133f0",
"type": "application/vnd.sas.detection.message.classification"
}
]
}
],
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/messageClassifications/3a90164e-ba5d-4337-b006-055ae9995237",
"uri": "/detectionDefinition/messageClassifications/3a90164e-ba5d-4337-b006-055ae9995237",
"type": "application/vnd.sas.detection.message.classification"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/messageClassifications/3a90164e-ba5d-4337-b006-055ae9995237",
"uri": "/detectionDefinition/messageClassifications/3a90164e-ba5d-4337-b006-055ae9995237",
"type": "application/vnd.sas.detection.message.classification"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/messageClassifications/3a90164e-ba5d-4337-b006-055ae9995237",
"uri": "/detectionDefinition/messageClassifications/3a90164e-ba5d-4337-b006-055ae9995237"
}
]
}
{
"creationTimeStamp": "2022-10-17T21:19:14.940Z",
"createdBy": "user1",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"revision": 0,
"version": 1,
"id": "3a90164e-ba5d-4337-b006-055ae9995237",
"name": "ROOT",
"displayName": "Root",
"keyCode": "1",
"messageClassifications": [
{
"creationTimeStamp": "2022-10-21T14:56:22.331Z",
"createdBy": "user1",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"revision": 0,
"version": 1,
"id": "d1267966-f431-41c0-b1fa-0a1a17e4365a",
"name": "ChildA",
"displayName": "Child A",
"keyCode": "1.1",
"parentId": "3a90164e-ba5d-4337-b006-055ae9995237",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/messageClassifications/d1267966-f431-41c0-b1fa-0a1a17e4365a",
"uri": "/detectionDefinition/messageClassifications/d1267966-f431-41c0-b1fa-0a1a17e4365a",
"type": "application/vnd.sas.detection.message.classification"
}
]
},
{
"creationTimeStamp": "2022-10-21T14:56:47.977Z",
"createdBy": "user1",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"revision": 0,
"version": 1,
"id": "37c21f45-b482-445f-8cc2-55e4f67133f0",
"name": "ChildB",
"displayName": "Child B",
"keyCode": "1.2",
"parentId": "3a90164e-ba5d-4337-b006-055ae9995237",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/messageClassifications/37c21f45-b482-445f-8cc2-55e4f67133f0",
"uri": "/detectionDefinition/messageClassifications/37c21f45-b482-445f-8cc2-55e4f67133f0",
"type": "application/vnd.sas.detection.message.classification"
}
]
}
],
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/messageClassifications/3a90164e-ba5d-4337-b006-055ae9995237",
"uri": "/detectionDefinition/messageClassifications/3a90164e-ba5d-4337-b006-055ae9995237",
"type": "application/vnd.sas.detection.message.classification"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/messageClassifications/3a90164e-ba5d-4337-b006-055ae9995237",
"uri": "/detectionDefinition/messageClassifications/3a90164e-ba5d-4337-b006-055ae9995237",
"type": "application/vnd.sas.detection.message.classification"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/messageClassifications/3a90164e-ba5d-4337-b006-055ae9995237",
"uri": "/detectionDefinition/messageClassifications/3a90164e-ba5d-4337-b006-055ae9995237"
}
]
}
Example of an error response when an invalid message classification ID is used as the path parameter.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 999999,
"message": "The field value \"a-fake-id-value\" is not a valid ID.",
"details": [
"path: /detectionDefinition/messageClassifications/a-fake-id-value",
"correlator: 81e449c8-aa16-4261-af42-bcd8f1dbd232"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | messageClassification |
400 | Bad Request | - The message classification ID may be invalid. |
error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | Date and time of last modification. |
Partially Update a Message Classification
Code samples
# You can also use wget
curl -X PATCH http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/messageClassifications/{messageClassificationId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.detection.message.classification+json' \
-H 'Accept: application/vnd.sas.detection.message.classification+json'
const inputBody = '{
"name": "NA",
"displayName": "North America"
}';
const headers = {
'Content-Type':'application/vnd.sas.detection.message.classification+json',
'Accept':'application/vnd.sas.detection.message.classification+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/messageClassifications/{messageClassificationId}',
{
method: 'PATCH',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.detection.message.classification+json',
'Accept': 'application/vnd.sas.detection.message.classification+json'
}
r = requests.patch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/messageClassifications/{messageClassificationId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.detection.message.classification+json"},
"Accept": []string{"application/vnd.sas.detection.message.classification+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PATCH", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/messageClassifications/{messageClassificationId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PATCH /messageClassifications/{messageClassificationId}
Partially updates the specified message classification. Only the name and displayName fields can be modified.
Body parameter
An example of update message classification request content
{
"name": "NA",
"displayName": "North America"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | updateMessageClassificationInput | false | A JSON representation of one or more fields to be updated |
messageClassificationId | path | string | true | The UUID of the message classification. |
Example responses
An example of message classification object
{
"creationTimeStamp": "2022-05-18T19:01:09.985Z",
"createdBy": "userid",
"modifiedTimeStamp": "2022-05-18T19:01:09.985Z",
"modifiedBy": "userid",
"revision": 0,
"version": 1,
"id": "e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"name": "NA",
"displayName": "North America",
"keyCode": "1.6.2",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"uri": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"type": "application/vnd.sas.detection.message.classification"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"uri": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"type": "application/vnd.sas.detection.message.classification"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"uri": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c"
}
]
}
{
"creationTimeStamp": "2022-05-18T19:01:09.985Z",
"createdBy": "userid",
"modifiedTimeStamp": "2022-05-18T19:01:09.985Z",
"modifiedBy": "userid",
"revision": 0,
"version": 1,
"id": "e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"name": "NA",
"displayName": "North America",
"keyCode": "1.6.2",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"uri": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"type": "application/vnd.sas.detection.message.classification"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"uri": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"type": "application/vnd.sas.detection.message.classification"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"uri": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c"
}
]
}
Example of an error response when the message classification name is invalid.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The specified object with type \"MessageClassification\" is invalid.",
"details": [
"path: /detectionDefinition/messageClassifications",
"correlator: 33c38a92-3ec2-4c6e-a29b-d4881e277786"
]
}
Example of an error response when you update a message classification with a non-unique name.
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000022,
"message": "The message classification's name \"ChildA\" must be unique.",
"details": [
"path: /detectionDefinition/messageClassifications/37c21f45-b482-445f-8cc2-55e4f67133f0",
"correlator: cc6dedcb-eb9f-412b-b364-bd99cc5a0f0f"
]
}
Example of an error response when you update an object with a stale ETag value.
{
"version": 2,
"httpStatusCode": 412,
"errorCode": 1000000,
"message": "The object has been updated since you last retrieved it.",
"details": [
"path: /detectionDefinition/messageClassifications/7c7e96cd-248a-4a46-b274-57dc50ba948f",
"correlator: 94104746-3382-4e5c-887c-ad919d38447a"
]
}
Example of an error response when you update a non-existent message classification.
{
"version": 2,
"httpStatusCode": 422,
"errorCode": 1000015,
"message": "The message classification with id \"8351e27c-2624-412a-967c-3a3297e6585c\" is missing.",
"details": [
"path: /detectionDefinition/messageClassifications/8351e27c-2624-412a-967c-3a3297e6585c",
"correlator: ba1a5c6d-8726-45b0-99a4-ef95265fa90b"
]
}
Example of an error response when a required pre-condition header (If-Match/If-Unmodified-Since) was not provided.
{
"version": 2,
"httpStatusCode": 428,
"errorCode": 1000021,
"message": "Conditional match header is missing.",
"details": [
"path: /detectionDefinition/messageClassifications/7c7e96cd-248a-4a46-b274-57dc50ba948f",
"correlator: 8351e27c-2624-412a-967c-3a3297e6585c"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successfully updated the message classification. | messageClassification |
400 | Bad Request | A bad request. Possible reason or reasons: |
- The message classification ID may be invalid.
- The name of the message classification may not be valid.
- The ID in the request body may not match the ID in the URL.|error2|
|409|Conflict|There is a conflict with an existing resource.
Possible reason or reasons:
- The new name is in use by another message classification.|error2|
|412|Precondition Failed|A precondition has not been met. Make sure that the If-Match header has been set with the latest ETag of the object.|error2|
|422|Unprocessable Entity|Entity cannot be processed.
Possible reason or reasons:
- The message classification with the specified ID does not exis.|error2|
|428|Precondition Required|A required pre-condition (If-Match/If-Unmodified-Since) was not provided.|error2|
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | Date and time of last modification. | |
428 | Location | string | Location of URI for the endpoint. |
Delete a Message Classification
Code samples
# You can also use wget
curl -X DELETE http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/messageClassifications/{messageClassificationId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.error+json'
const headers = {
'Accept':'application/vnd.sas.error+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/messageClassifications/{messageClassificationId}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.error+json'
}
r = requests.delete('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/messageClassifications/{messageClassificationId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.error+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/messageClassifications/{messageClassificationId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /messageClassifications/{messageClassificationId}
Deletes a message classification and all its sub-message classifications.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
messageClassificationId | path | string | true | The UUID of the message classification. |
Example responses
Example of an error response when an invalid message classification ID is used as the path parameter.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 999999,
"message": "The field value \"a-fake-id-value\" is not a valid ID.",
"details": [
"path: /detectionDefinition/messageClassifications/a-fake-id-value",
"correlator: 81e449c8-aa16-4261-af42-bcd8f1dbd232"
]
}
Example of an error response when you try to delete a message classification that is currently associated with an organization.
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000020,
"message": "The message classification Bank XYZ or its sub-message classifications are in use in one or more organizations.",
"details": [
"path: /detectionDefinition/messageClassifications/b035daf6-9c68-47d7-b081-27af24202022",
"correlator: 8d727314-c3f2-436d-9d21-e916d7bd8c0d"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | Deleted | None |
400 | Bad Request | A bad request with an existing resource. Possible reason or reasons: |
|
- The message classification ID is not valid. |
error2 | ||
409 | Conflict | There is a conflict with an existing resource. Possible reason or reasons: |
- The message classification or its sub-message classifications are in use in one or more organizations.
- The message classification or its sub-message classifications are in use in one or more projects.
- The message classification or its sub-message classifications are in use in one or more models.|error2|
Impact Analyses
The operations for impact analysis.
Get transaction related info for a set of rules
Code samples
# You can also use wget
curl -X POST http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rulesTransactionInfo \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.selection+json' \
-H 'Accept: application/vnd.sas.detection.rules.transaction.info+json'
const inputBody = '{
"type": "id",
"resources": [
"6def514e-b251-4499-a9a6-1e9066950b62",
"a91804b1-db4f-4662-97fd-cca50662488f"
],
"version": 1
}';
const headers = {
'Content-Type':'application/vnd.sas.selection+json',
'Accept':'application/vnd.sas.detection.rules.transaction.info+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rulesTransactionInfo',
{
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.selection+json',
'Accept': 'application/vnd.sas.detection.rules.transaction.info+json'
}
r = requests.post('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rulesTransactionInfo', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.selection+json"},
"Accept": []string{"application/vnd.sas.detection.rules.transaction.info+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/rulesTransactionInfo", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /projects/{projectId}/rulesTransactionInfo
Returns details associated with transaction population with respect to executing the given rules.
Body parameter
An example of resource selections of type "id" request content.
{
"type": "id",
"resources": [
"6def514e-b251-4499-a9a6-1e9066950b62",
"a91804b1-db4f-4662-97fd-cca50662488f"
],
"version": 1
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | selection | false | The selection of rules. |
projectId | path | string(uuid) | true | The UUID of the project. |
Example responses
Example of response body content from a get rules transaction information request.
{
"version": 1,
"earliestPossibleTransactionTimestamp": "2023-07-21T18:23:48.237Z",
"earliestRecommendedTransactionTimestamp": null,
"profileVariablesSetByAuthRule": [
{
"messageName": "AH Profile",
"name": "ia_var_12",
"jsonPath": ".ss_UV_1",
"createdBy": "susahu",
"creationTimeStamp": "2023-08-16T17:53:44.191Z",
"isModifying": true,
"variableId": "ce91b8c2-7735-4f97-9576-a2554d67c9cb",
"variableSetId": "d5d2e49f-ef86-4841-878b-606b5b6449b2",
"type": "string",
"arrayItem": "none"
}
],
"rulesReferenceProfileVariables": true,
"rulesReferenceNonRoiRules": false,
"slowPathRequired": true,
"ruleRelatesEvents": [
{
"eventType": "PV_FIRST_DEPLOYED",
"varId": "097f3604-fefa-4444-91cd-b91a3b4e66ff",
"when": null
}
],
"links": [
{
"method": "POST",
"rel": "self",
"href": "/detectionDefinition/projects/238e0dec-2250-407c-8dd0-4df9a461dd15/rulesTransactionInfo",
"uri": "/detectionDefinition/projects/238e0dec-2250-407c-8dd0-4df9a461dd15/rulesTransactionInfo",
"type": "application/vnd.sas.detection.rules.transaction.info+json"
}
]
}
{
"version": 1,
"earliestPossibleTransactionTimestamp": "2023-07-21T18:23:48.237Z",
"earliestRecommendedTransactionTimestamp": null,
"profileVariablesSetByAuthRule": [
{
"messageName": "AH Profile",
"name": "ia_var_12",
"jsonPath": ".ss_UV_1",
"createdBy": "susahu",
"creationTimeStamp": "2023-08-16T17:53:44.191Z",
"isModifying": true,
"variableId": "ce91b8c2-7735-4f97-9576-a2554d67c9cb",
"variableSetId": "d5d2e49f-ef86-4841-878b-606b5b6449b2",
"type": "string",
"arrayItem": "none"
}
],
"rulesReferenceProfileVariables": true,
"rulesReferenceNonRoiRules": false,
"slowPathRequired": true,
"ruleRelatesEvents": [
{
"eventType": "PV_FIRST_DEPLOYED",
"varId": "097f3604-fefa-4444-91cd-b91a3b4e66ff",
"when": null
}
],
"links": [
{
"method": "POST",
"rel": "self",
"href": "/detectionDefinition/projects/238e0dec-2250-407c-8dd0-4df9a461dd15/rulesTransactionInfo",
"uri": "/detectionDefinition/projects/238e0dec-2250-407c-8dd0-4df9a461dd15/rulesTransactionInfo",
"type": "application/vnd.sas.detection.rules.transaction.info+json"
}
]
}
An example error response due to an invalid resource ID in the request.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The field resources value \"1\" is not a valid ID.",
"details": [
"messageID: detection-definition-api-icu.invalid.uuid.msg",
"FieldName: resources",
"FieldValue: 1",
"path: /detectionDefinition/impactAnalyses/rulesTransactionInfo",
"correlator: e3f7fedd-10b4-4881-963e-a80427fab485"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | rulesTransactionInfo |
400 | Bad Request | Invalid request. For example: |
A resource ID in the request is not valid.
A resource URI in the request is not valid.|error2|
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | Date and time of last modification. |
Get a List of Impact Analyses
Code samples
# You can also use wget
curl -X GET http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/impactAnalyses \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/impactAnalyses',
{
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('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/impactAnalyses', 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", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/impactAnalyses", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /projects/{projectId}/impactAnalyses
Returns a list of impact analyses.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
start | query | integer | false | The 0-based offset of the first resource to return. Defaults to 0. |
limit | query | integer | false | The maximum number of resources to return. Defaults to 100. |
filter | query | string(filter-criteria) | false | The filter criteria for returned resources. For more information, see Filtering in REST APIs. |
sortBy | query | string(sort-criteria) | false | Specifies the sorting for returned resources. For more information, see Sorting in REST APIs. |
projectId | path | string(uuid) | true | The UUID of the project. |
Example responses
Example of response body content from a get impact analyses request.
{
"version": 2,
"accept": "application/vnd.sas.detection.impact.analysis",
"count": 1,
"start": 0,
"limit": 100,
"name": "impactAnalyses",
"items": [
{
"creationTimeStamp": "2023-05-26T18:27:32.661Z",
"createdBy": "susahu",
"modifiedTimeStamp": "2023-05-26T18:29:19.283Z",
"modifiedBy": "susahu",
"revision": 2,
"version": 1,
"id": "9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"name": "Test",
"impactAnalysisNum": 50238,
"projectId": "b53b2b62-fc34-4391-a80a-3ebc8b285efe",
"state": "completed",
"jobStartTime": "2023-05-26T14:28:00.268Z",
"jobEndTime": "2023-05-26T14:29:19.112Z",
"jobDuration": 79,
"sessionId": "2d9895d1-14f5-46d5-803f-c100fcb33e04-ses0000",
"jobId": "E22BD263-6866-234F-9FDE-59B3B2426AE6",
"totalTransactionCount": 10208,
"processedTransactionCount": 695,
"canBeCanceled": false,
"canBeDeleted": true
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/projects/b53b2b62-fc34-4391-a80a-3ebc8b285efe/impactAnalyses",
"uri": "/detectionDefinition/projects/b53b2b62-fc34-4391-a80a-3ebc8b285efe/impactAnalyses",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.impact.analysis"
},
{
"method": "GET",
"rel": "next",
"href": "/detectionDefinition/projects/b53b2b62-fc34-4391-a80a-3ebc8b285efe/impactAnalyses?start=100&limit=100",
"uri": "/detectionDefinition/projects/b53b2b62-fc34-4391-a80a-3ebc8b285efe/impactAnalyses?start=100&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.impact.analysis"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/projects/b53b2b62-fc34-4391-a80a-3ebc8b285efe/impactAnalyses?start=0&limit=100",
"uri": "/detectionDefinition/projects/b53b2b62-fc34-4391-a80a-3ebc8b285efe/impactAnalyses?start=0&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.impact.analysis"
},
{
"method": "POST",
"rel": "create",
"href": "/detectionDefinition/projects/b53b2b62-fc34-4391-a80a-3ebc8b285efe/impactAnalyses",
"uri": "/detectionDefinition/projects/b53b2b62-fc34-4391-a80a-3ebc8b285efe/impactAnalyses",
"type": "application/vnd.sas.detection.impact.analysis",
"responseType": "application/vnd.sas.detection.impact.analysis"
}
]
}
{
"version": 2,
"accept": "application/vnd.sas.detection.impact.analysis",
"count": 1,
"start": 0,
"limit": 100,
"name": "impactAnalyses",
"items": [
{
"creationTimeStamp": "2023-05-26T18:27:32.661Z",
"createdBy": "susahu",
"modifiedTimeStamp": "2023-05-26T18:29:19.283Z",
"modifiedBy": "susahu",
"revision": 2,
"version": 1,
"id": "9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"name": "Test",
"impactAnalysisNum": 50238,
"projectId": "b53b2b62-fc34-4391-a80a-3ebc8b285efe",
"state": "completed",
"jobStartTime": "2023-05-26T14:28:00.268Z",
"jobEndTime": "2023-05-26T14:29:19.112Z",
"jobDuration": 79,
"sessionId": "2d9895d1-14f5-46d5-803f-c100fcb33e04-ses0000",
"jobId": "E22BD263-6866-234F-9FDE-59B3B2426AE6",
"totalTransactionCount": 10208,
"processedTransactionCount": 695,
"canBeCanceled": false,
"canBeDeleted": true
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/projects/b53b2b62-fc34-4391-a80a-3ebc8b285efe/impactAnalyses",
"uri": "/detectionDefinition/projects/b53b2b62-fc34-4391-a80a-3ebc8b285efe/impactAnalyses",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.impact.analysis"
},
{
"method": "GET",
"rel": "next",
"href": "/detectionDefinition/projects/b53b2b62-fc34-4391-a80a-3ebc8b285efe/impactAnalyses?start=100&limit=100",
"uri": "/detectionDefinition/projects/b53b2b62-fc34-4391-a80a-3ebc8b285efe/impactAnalyses?start=100&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.impact.analysis"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/projects/b53b2b62-fc34-4391-a80a-3ebc8b285efe/impactAnalyses?start=0&limit=100",
"uri": "/detectionDefinition/projects/b53b2b62-fc34-4391-a80a-3ebc8b285efe/impactAnalyses?start=0&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.impact.analysis"
},
{
"method": "POST",
"rel": "create",
"href": "/detectionDefinition/projects/b53b2b62-fc34-4391-a80a-3ebc8b285efe/impactAnalyses",
"uri": "/detectionDefinition/projects/b53b2b62-fc34-4391-a80a-3ebc8b285efe/impactAnalyses",
"type": "application/vnd.sas.detection.impact.analysis",
"responseType": "application/vnd.sas.detection.impact.analysis"
}
]
}
An example of an error 400 when the 'projectId' path parameter is not valid.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"1\" for the field \"projectId\" does not match the documented format.",
"details": [
"field: projectId",
"value: 1",
"messageID: detection-lib-api-icu.validation.invalid.value.msg",
"path: /detectionDefinition/projects/1/impactAnalyses",
"correlator: a04eaaf7-5ee2-4ef9-ae41-260bde8302a6"
]
}
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"1\" for the field \"projectId\" does not match the documented format.",
"details": [
"field: projectId",
"value: 1",
"messageID: detection-lib-api-icu.validation.invalid.value.msg",
"path: /detectionDefinition/projects/1/impactAnalyses",
"correlator: a04eaaf7-5ee2-4ef9-ae41-260bde8302a6"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | impactAnalysisCollection |
400 | Bad Request | Bad request | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | Date and time of last modification. |
Create an Impact Analysis
Code samples
# You can also use wget
curl -X POST http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/impactAnalyses \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.detection.impact.analysis.criteria+json' \
-H 'Accept: application/vnd.sas.detection.impact.analysis+json'
const inputBody = '{
"name": "Impact-Analysis-1",
"rangeStartDate": "2023-03-29T20:24:49.877Z",
"rangeEndDate": "2023-03-30T20:24:49.877Z",
"rules": [
{
"id": "fa4c1556-2b26-4032-9597-f8ff7fe7e677"
}
],
"logWithAdditionalDetails": true,
"outcomeLimit": 1000,
"alertLimit": 1000,
"userVariablePrimingDuration": 0,
"userVariablePrimingUnit": "DAYS",
"forceUserVariableRecalculation": false
}';
const headers = {
'Content-Type':'application/vnd.sas.detection.impact.analysis.criteria+json',
'Accept':'application/vnd.sas.detection.impact.analysis+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/impactAnalyses',
{
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.detection.impact.analysis.criteria+json',
'Accept': 'application/vnd.sas.detection.impact.analysis+json'
}
r = requests.post('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/impactAnalyses', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.detection.impact.analysis.criteria+json"},
"Accept": []string{"application/vnd.sas.detection.impact.analysis+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/impactAnalyses", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /projects/{projectId}/impactAnalyses
Creates a new impact analysis for the criteria provided.
Body parameter
An example of new impact analysis request content
{
"name": "Impact-Analysis-1",
"rangeStartDate": "2023-03-29T20:24:49.877Z",
"rangeEndDate": "2023-03-30T20:24:49.877Z",
"rules": [
{
"id": "fa4c1556-2b26-4032-9597-f8ff7fe7e677"
}
],
"logWithAdditionalDetails": true,
"outcomeLimit": 1000,
"alertLimit": 1000,
"userVariablePrimingDuration": 0,
"userVariablePrimingUnit": "DAYS",
"forceUserVariableRecalculation": false
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | impactAnalysisCriteria | false | The impact analysis to be created. |
projectId | path | string(uuid) | true | The UUID of the project. |
Example responses
Example response from a create impact analysis request.
{
"version": 1,
"id": "9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"projectId": "238e0dec-2250-407c-8dd0-4df9a461dd15",
"name": "Impact-Analysis-1",
"impactAnalysisNum": 50237,
"jobStartTime": "2023-06-30T22:44:25.648Z",
"jobEndTime": "2023-06-30T22:44:37.287Z",
"jobDuration": 12,
"sessionId": "72b364d7-d5cf-428c-99b6-37f77447a369-ses0000",
"jobId": "881B8056-727A-B74C-B8E3-04825C3E57C0",
"totalTransactionCount": 100,
"processedTransactionCount": 0,
"criteria": {
"version": 1,
"name": "Impact-Analysis-1",
"description": "Impact Analysis description",
"rules": [
{
"id": "fa4c1556-2b26-4032-9597-f8ff7fe7e677"
}
],
"rangeStartDate": "2023-03-29T20:24:49.877Z",
"rangeEndDate": "2023-03-30T20:24:49.877Z",
"outcomeLimit": 1000,
"alertLimit": 1000,
"logWithAdditionalDetails": true,
"userVariablePrimingDuration": 12,
"userVariablePrimingUnit": "HOURS"
},
"state": "completed",
"creationTimeStamp": "2023-04-04T14:23:34.892Z",
"createdBy": "susahu",
"modifiedTimeStamp": "2023-04-04T14:23:34.892Z",
"modifiedBy": "susahu",
"revision": 0,
"decisionMetrics": {
"tp": 0,
"tn": 0,
"fp": 0,
"fn": 0
},
"alertMetrics": {
"tp": 0,
"tn": 0,
"fp": 0,
"fn": 0
},
"links": [
{
"method": "GET",
"rel": "up",
"href": "/detectionDefinition/projects/238e0dec-2250-407c-8dd0-4df9a461dd15/impactAnalyses",
"uri": "/detectionDefinition/projects/238e0dec-2250-407c-8dd0-4df9a461dd15/impactAnalyses",
"type": "application/vnd.sas.collection+json",
"itemType": "application/vnd.sas.detection.impact.analysis+json"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/impactAnalyses/9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"uri": "/detectionDefinition/impactAnalyses/9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"type": "application/vnd.sas.detection.impact.analysis+json"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/impactAnalyses/9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"uri": "/detectionDefinition/impactAnalyses/9c17ec3c-ec73-45f3-896e-f7a3482f2d31"
},
{
"method": "POST",
"rel": "cancel",
"href": "/detectionDefinition/impactAnalyses/9c17ec3c-ec73-45f3-896e-f7a3482f2d31/cancel",
"uri": "/detectionDefinition/impactAnalyses/9c17ec3c-ec73-45f3-896e-f7a3482f2d31/cancel",
"type": "application/json"
}
]
}
{
"version": 1,
"id": "9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"projectId": "238e0dec-2250-407c-8dd0-4df9a461dd15",
"name": "Impact-Analysis-1",
"impactAnalysisNum": 50237,
"jobStartTime": "2023-06-30T22:44:25.648Z",
"jobEndTime": "2023-06-30T22:44:37.287Z",
"jobDuration": 12,
"sessionId": "72b364d7-d5cf-428c-99b6-37f77447a369-ses0000",
"jobId": "881B8056-727A-B74C-B8E3-04825C3E57C0",
"totalTransactionCount": 100,
"processedTransactionCount": 0,
"criteria": {
"version": 1,
"name": "Impact-Analysis-1",
"description": "Impact Analysis description",
"rules": [
{
"id": "fa4c1556-2b26-4032-9597-f8ff7fe7e677"
}
],
"rangeStartDate": "2023-03-29T20:24:49.877Z",
"rangeEndDate": "2023-03-30T20:24:49.877Z",
"outcomeLimit": 1000,
"alertLimit": 1000,
"logWithAdditionalDetails": true,
"userVariablePrimingDuration": 12,
"userVariablePrimingUnit": "HOURS"
},
"state": "completed",
"creationTimeStamp": "2023-04-04T14:23:34.892Z",
"createdBy": "susahu",
"modifiedTimeStamp": "2023-04-04T14:23:34.892Z",
"modifiedBy": "susahu",
"revision": 0,
"decisionMetrics": {
"tp": 0,
"tn": 0,
"fp": 0,
"fn": 0
},
"alertMetrics": {
"tp": 0,
"tn": 0,
"fp": 0,
"fn": 0
},
"links": [
{
"method": "GET",
"rel": "up",
"href": "/detectionDefinition/projects/238e0dec-2250-407c-8dd0-4df9a461dd15/impactAnalyses",
"uri": "/detectionDefinition/projects/238e0dec-2250-407c-8dd0-4df9a461dd15/impactAnalyses",
"type": "application/vnd.sas.collection+json",
"itemType": "application/vnd.sas.detection.impact.analysis+json"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/impactAnalyses/9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"uri": "/detectionDefinition/impactAnalyses/9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"type": "application/vnd.sas.detection.impact.analysis+json"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/impactAnalyses/9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"uri": "/detectionDefinition/impactAnalyses/9c17ec3c-ec73-45f3-896e-f7a3482f2d31"
},
{
"method": "POST",
"rel": "cancel",
"href": "/detectionDefinition/impactAnalyses/9c17ec3c-ec73-45f3-896e-f7a3482f2d31/cancel",
"uri": "/detectionDefinition/impactAnalyses/9c17ec3c-ec73-45f3-896e-f7a3482f2d31/cancel",
"type": "application/json"
}
]
}
Example 400 error response when the request body cannot be parsed.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000004,
"message": "The specified request body cannot be parsed.",
"details": [
"path: /detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/impactAnalyses",
"correlator: 160fe032-f91f-44b6-a582-033d7f067787"
]
}
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000004,
"message": "The specified request body cannot be parsed.",
"details": [
"path: /detectionDefinition/projects/0d2379c7-9a0e-4a29-b03f-0bbe25d1333f/impactAnalyses",
"correlator: 160fe032-f91f-44b6-a582-033d7f067787"
]
}
Example 422 error response when create impact analysis request initiated for an invalid organization.
{
"version": 2,
"httpStatusCode": 422,
"errorCode": 1000014,
"message": "The object failed to be created.",
"details": [
"messageID: detection-definition-api-icu.failed.to.create.msg",
"path: /detectionDefinition/projects/blahblah-0c66-4e23-832e-fd6d905d8702/impactAnalyses",
"correlator: 28efc350-23c0-4840-89c9-e6b685a7687d"
],
"errors": [
{
"version": 2,
"httpStatusCode": 403,
"errorCode": 1000012,
"message": "No permissions to access resource.",
"details": [
"messageID: detection-definition-api-icu.forbidden.msg",
"id: 3edc056f-74d9-4033-963e-a38f571c0b9c"
]
}
]
}
{
"version": 2,
"httpStatusCode": 422,
"errorCode": 1000014,
"message": "The object failed to be created.",
"details": [
"messageID: detection-definition-api-icu.failed.to.create.msg",
"path: /detectionDefinition/projects/blahblah-0c66-4e23-832e-fd6d905d8702/impactAnalyses",
"correlator: 28efc350-23c0-4840-89c9-e6b685a7687d"
],
"errors": [
{
"version": 2,
"httpStatusCode": 403,
"errorCode": 1000012,
"message": "No permissions to access resource.",
"details": [
"messageID: detection-definition-api-icu.forbidden.msg",
"id: 3edc056f-74d9-4033-963e-a38f571c0b9c"
]
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | The Impact Analysis job submission succeeded. | impactAnalysis |
400 | Bad Request | The request was invalid (for example, invalid data or invalid structure in the request body). | error2 |
422 | Unprocessable Entity | The request cannot be processed even though it is a valid request. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Etag | string | An hash-code for the response resource. | |
201 | Last-Modified | string | Date and time of last modification. | |
201 | Location | string | Location of URI for the endpoint. | |
422 | Location | string | Location of URI for the endpoint. |
Delete Impact Analyses
Code samples
# You can also use wget
curl -X POST http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/impactAnalyses/deletions \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.selection+json' \
-H 'Accept: application/vnd.sas.error+json'
const inputBody = '{
"type": "id",
"resources": [
"6def514e-b251-4499-a9a6-1e9066950b62",
"a91804b1-db4f-4662-97fd-cca50662488f"
],
"version": 1
}';
const headers = {
'Content-Type':'application/vnd.sas.selection+json',
'Accept':'application/vnd.sas.error+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/impactAnalyses/deletions',
{
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.selection+json',
'Accept': 'application/vnd.sas.error+json'
}
r = requests.post('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/impactAnalyses/deletions', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.selection+json"},
"Accept": []string{"application/vnd.sas.error+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/impactAnalyses/deletions", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /projects/{projectId}/impactAnalyses/deletions
Deletes a selection of impact analyses.
Body parameter
An example of resource selections of type "id" request content.
{
"type": "id",
"resources": [
"6def514e-b251-4499-a9a6-1e9066950b62",
"a91804b1-db4f-4662-97fd-cca50662488f"
],
"version": 1
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | selection | false | The selection of impact analyses. |
projectId | path | string(uuid) | true | The UUID of the project. |
Example responses
An example error response due to an invalid resource ID in the request.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The field resources value \"1\" is not a valid ID.",
"details": [
"messageID: detection-definition-api-icu.invalid.uuid.msg",
"FieldName: resources",
"FieldValue: 1",
"path: /detectionDefinition/impactAnalyses/deletions",
"correlator: e3f7fedd-10b4-4881-963e-a80427fab485"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | The impact analyses were deleted. | None |
400 | Bad Request | Invalid request. For example: |
A resource ID in the request is not valid.
A resource URI in the request is not valid.|error2|
Get an Impact Analysis
Code samples
# You can also use wget
curl -X GET http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/impactAnalyses/{impactAnalysisId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.detection.impact.analysis+json'
const headers = {
'Accept':'application/vnd.sas.detection.impact.analysis+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/impactAnalyses/{impactAnalysisId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.detection.impact.analysis+json'
}
r = requests.get('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/impactAnalyses/{impactAnalysisId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.detection.impact.analysis+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/impactAnalyses/{impactAnalysisId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /impactAnalyses/{impactAnalysisId}
Returns impact analysis by ID.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
impactAnalysisId | path | string(uuid) | true | The UUID of the impact analysis. |
Example responses
Example of response body content from a get impact analysis request.
{
"version": 1,
"id": "9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"name": "Test1",
"description": "Impact Analysis description",
"impactAnalysisNum": 50236,
"projectId": "blahd24d-0c66-4e23-832e-fd6d905d8702",
"creationTimeStamp": "2023-04-04T14:23:34.892Z",
"createdBy": "susahu",
"modifiedTimeStamp": "2023-04-04T14:23:34.892Z",
"modifiedBy": "susahu",
"revision": 2,
"criteria": {
"name": "Impact-Analysis-1",
"description": "Impact Analysis description",
"version": 1,
"rules": [
{
"id": "9c17ec3c-ec73-45f3-896e-f7a3482f2d31"
}
],
"rangeStartDate": "2023-03-29T20:24:49.877Z",
"rangeEndDate": "2023-03-30T20:24:49.877Z",
"outcomeLimit": 1000,
"alertLimit": 1000,
"logWithAdditionalDetails": true,
"userVariablePrimingDuration": 12,
"userVariablePrimingUnit": "HOURS"
},
"totalTransactionCount": 100,
"processedTransactionCount": 100,
"jobStartTime": "2023-03-01T15:09:49.615Z",
"jobEndTime": "2023-03-01T15:11:04.570Z",
"jobDuration": 75,
"jobId": "3B0C3D8B-AB8D-E447-8A0F-E084FCA6482C",
"sessionId": "719743bb-c43c-4b85-95e7-f369aa4a3a6b-ses0000",
"state": "Completed",
"canBeCanceled": false,
"canBeDeleted": true,
"decisionMetrics": {
"tp": 2,
"tn": 2,
"fp": 1,
"fn": 3
},
"alertMetrics": {
"tp": 0,
"tn": 0,
"fp": 1,
"fn": 1
},
"alertTypeMetrics": [
{
"code": "M",
"name": "MERCHANT",
"tp": 0,
"tn": 6,
"fp": 0,
"fn": 1
}
],
"decisionValueMetrics": {
"tp": 10.15,
"fn": 20.11
},
"alerts": 1,
"outcomes": {
"summary": {
"predictedConditionPositive": 5,
"predictedConditionNegative": 3
},
"distribution": [
{
"outcome": "Unknown",
"code": 0,
"frequency": 0
},
{
"outcome": "Approve",
"code": 10,
"frequency": 5
},
{
"outcome": "Verify",
"code": 20,
"frequency": 0
},
{
"outcome": "Refer",
"code": 30,
"frequency": 0
},
{
"outcome": "Decline",
"code": 40,
"frequency": 3
},
{
"outcome": "Pickup",
"code": 50,
"frequency": 0
},
{
"outcome": "Exclude",
"code": 90,
"frequency": 0
},
{
"outcome": "Ignore",
"code": 99,
"frequency": 0
}
]
},
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/impactAnalyses/9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"uri": "/detectionDefinition/impactAnalyses/9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"type": "application/vnd.sas.detection.impact.analysis+json;charset=utf-8"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/impactAnalyses/9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"uri": "/detectionDefinition/impactAnalyses/9c17ec3c-ec73-45f3-896e-f7a3482f2d31"
}
]
}
{
"version": 1,
"id": "9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"name": "Test1",
"description": "Impact Analysis description",
"impactAnalysisNum": 50236,
"projectId": "blahd24d-0c66-4e23-832e-fd6d905d8702",
"creationTimeStamp": "2023-04-04T14:23:34.892Z",
"createdBy": "susahu",
"modifiedTimeStamp": "2023-04-04T14:23:34.892Z",
"modifiedBy": "susahu",
"revision": 2,
"criteria": {
"name": "Impact-Analysis-1",
"description": "Impact Analysis description",
"version": 1,
"rules": [
{
"id": "9c17ec3c-ec73-45f3-896e-f7a3482f2d31"
}
],
"rangeStartDate": "2023-03-29T20:24:49.877Z",
"rangeEndDate": "2023-03-30T20:24:49.877Z",
"outcomeLimit": 1000,
"alertLimit": 1000,
"logWithAdditionalDetails": true,
"userVariablePrimingDuration": 12,
"userVariablePrimingUnit": "HOURS"
},
"totalTransactionCount": 100,
"processedTransactionCount": 100,
"jobStartTime": "2023-03-01T15:09:49.615Z",
"jobEndTime": "2023-03-01T15:11:04.570Z",
"jobDuration": 75,
"jobId": "3B0C3D8B-AB8D-E447-8A0F-E084FCA6482C",
"sessionId": "719743bb-c43c-4b85-95e7-f369aa4a3a6b-ses0000",
"state": "Completed",
"canBeCanceled": false,
"canBeDeleted": true,
"decisionMetrics": {
"tp": 2,
"tn": 2,
"fp": 1,
"fn": 3
},
"alertMetrics": {
"tp": 0,
"tn": 0,
"fp": 1,
"fn": 1
},
"alertTypeMetrics": [
{
"code": "M",
"name": "MERCHANT",
"tp": 0,
"tn": 6,
"fp": 0,
"fn": 1
}
],
"decisionValueMetrics": {
"tp": 10.15,
"fn": 20.11
},
"alerts": 1,
"outcomes": {
"summary": {
"predictedConditionPositive": 5,
"predictedConditionNegative": 3
},
"distribution": [
{
"outcome": "Unknown",
"code": 0,
"frequency": 0
},
{
"outcome": "Approve",
"code": 10,
"frequency": 5
},
{
"outcome": "Verify",
"code": 20,
"frequency": 0
},
{
"outcome": "Refer",
"code": 30,
"frequency": 0
},
{
"outcome": "Decline",
"code": 40,
"frequency": 3
},
{
"outcome": "Pickup",
"code": 50,
"frequency": 0
},
{
"outcome": "Exclude",
"code": 90,
"frequency": 0
},
{
"outcome": "Ignore",
"code": 99,
"frequency": 0
}
]
},
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/impactAnalyses/9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"uri": "/detectionDefinition/impactAnalyses/9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"type": "application/vnd.sas.detection.impact.analysis+json;charset=utf-8"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/impactAnalyses/9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"uri": "/detectionDefinition/impactAnalyses/9c17ec3c-ec73-45f3-896e-f7a3482f2d31"
}
]
}
An example of an error 400 when the 'impactAnalysisId' path parameter is not valid.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"1\" for the field \"impactAnalysisId\" does not match the documented format.",
"details": [
"field: impactAnalysisId",
"value: 1",
"messageID: detection-lib-api-icu.validation.invalid.value.msg",
"path: /detectionDefinition/impactAnalyses/1",
"correlator: a04eaaf7-5ee2-4ef9-ae41-260bde8302a6"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | impactAnalysis |
400 | Bad Request | A bad request. Possible reason or reasons: |
|
- The impact analysis ID might be invalid. |
error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Etag | string | An hash-code for the response resource. | |
200 | Last-Modified | string | Date and time of last modification. | |
200 | Location | string | Location of URI for the endpoint. |
Delete Impact Analysis
Code samples
# You can also use wget
curl -X DELETE http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/impactAnalyses/{impactAnalysisId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.error+json'
const headers = {
'Accept':'application/vnd.sas.error+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/impactAnalyses/{impactAnalysisId}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.error+json'
}
r = requests.delete('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/impactAnalyses/{impactAnalysisId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.error+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/impactAnalyses/{impactAnalysisId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /impactAnalyses/{impactAnalysisId}
Deletes impact analysis.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
impactAnalysisId | path | string(uuid) | true | The UUID of the impact analysis. |
Example responses
An example error response due to an invalid 'impactAnalysisId' path parameter.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"abc\" for the field \"impactAnalysisId\" does not match the documented format.",
"details": [
"field: impactAnalysisId",
"value: abc",
"messageID: detection-lib-api-icu.validation.invalid.value.msg",
"path: /detectionDefinition/impactAnalyses/abc",
"correlator: 0291b93c-48db-4e30-9d9d-9d4babce85b4"
]
}
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"abc\" for the field \"impactAnalysisId\" does not match the documented format.",
"details": [
"field: impactAnalysisId",
"value: abc",
"messageID: detection-lib-api-icu.validation.invalid.value.msg",
"path: /detectionDefinition/impactAnalyses/abc",
"correlator: 0291b93c-48db-4e30-9d9d-9d4babce85b4"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | Deleted | None |
400 | Bad Request | The request was invalid (for example, invalid data or invalid structure in the request body). | error2 |
Get List of Rules for the Impact Analysis ID
Code samples
# You can also use wget
curl -X GET http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/impactAnalyses/{impactAnalysisId}/rules \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/impactAnalyses/{impactAnalysisId}/rules',
{
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('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/impactAnalyses/{impactAnalysisId}/rules', 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", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/impactAnalyses/{impactAnalysisId}/rules", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /impactAnalyses/{impactAnalysisId}/rules
Returns list of rules used for the impact analysis.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
start | query | integer | false | The 0-based offset of the first resource to return. Defaults to 0. |
limit | query | integer | false | The maximum number of resources to return. Defaults to 100. |
filter | query | string(filter-criteria) | false | The filter criteria for returned resources. For more information, see Filtering in REST APIs. |
sortBy | query | string(sort-criteria) | false | Specifies the sorting for returned resources. For more information, see Sorting in REST APIs. |
impactAnalysisId | path | string(uuid) | true | The UUID of the impact analysis. |
Example responses
Example of response body content from a get impact analysis rules request.
{
"version": 1,
"accept": "application/vnd.sas.detection.impact.analysis.rule",
"count": 1,
"start": 0,
"limit": 100,
"name": "impactAnalysisRules",
"items": [
{
"ruleId": "a45c37fa-6efe-4b8a-9e54-05799133a48b",
"baseRuleId": "50479",
"ruleVersion": 1,
"executionOrderType": 0,
"name": "SS_IA_Rule_1",
"description": "SS IA Rule 1",
"schemaName": "payment_schema",
"state": "Testing",
"alertTypeCode": "A",
"alertTypeName": "Account",
"messageClassificationKeyCode": "AH",
"messageClassificationDisplayName": "AH Org Name"
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/impactAnalyses/a2506ee2-99a5-417d-9356-8dd51a63bbc6/rules",
"uri": "/detectionDefinition/impactAnalyses/a2506ee2-99a5-417d-9356-8dd51a63bbc6/rules",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.impact.analysis.rules"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/impactAnalyses/a2506ee2-99a5-417d-9356-8dd51a63bbc6/rules?start=0&limit=100",
"uri": "/detectionDefinition/impactAnalyses/a2506ee2-99a5-417d-9356-8dd51a63bbc6/rules?start=0&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.impact.analysis.rules"
}
]
}
{
"version": 1,
"accept": "application/vnd.sas.detection.impact.analysis.rule",
"count": 1,
"start": 0,
"limit": 100,
"name": "impactAnalysisRules",
"items": [
{
"ruleId": "a45c37fa-6efe-4b8a-9e54-05799133a48b",
"baseRuleId": "50479",
"ruleVersion": 1,
"executionOrderType": 0,
"name": "SS_IA_Rule_1",
"description": "SS IA Rule 1",
"schemaName": "payment_schema",
"state": "Testing",
"alertTypeCode": "A",
"alertTypeName": "Account",
"messageClassificationKeyCode": "AH",
"messageClassificationDisplayName": "AH Org Name"
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/impactAnalyses/a2506ee2-99a5-417d-9356-8dd51a63bbc6/rules",
"uri": "/detectionDefinition/impactAnalyses/a2506ee2-99a5-417d-9356-8dd51a63bbc6/rules",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.impact.analysis.rules"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/impactAnalyses/a2506ee2-99a5-417d-9356-8dd51a63bbc6/rules?start=0&limit=100",
"uri": "/detectionDefinition/impactAnalyses/a2506ee2-99a5-417d-9356-8dd51a63bbc6/rules?start=0&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.impact.analysis.rules"
}
]
}
An example of an error 400 when the 'impactAnalysisId' path parameter is not valid.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"1\" for the field \"impactAnalysisId\" does not match the documented format.",
"details": [
"field: impactAnalysisId",
"value: 1",
"messageID: detection-lib-api-icu.validation.invalid.value.msg",
"path: /detectionDefinition/impactAnalyses/1/rules",
"correlator: a04eaaf7-5ee2-4ef9-ae41-260bde8302a6"
]
}
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"1\" for the field \"impactAnalysisId\" does not match the documented format.",
"details": [
"field: impactAnalysisId",
"value: 1",
"messageID: detection-lib-api-icu.validation.invalid.value.msg",
"path: /detectionDefinition/impactAnalyses/1/rules",
"correlator: a04eaaf7-5ee2-4ef9-ae41-260bde8302a6"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | impactAnalysisRuleCollection |
400 | Bad Request | Bad request | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | Date and time of last modification. |
Get rule details for Impact Analysis
Code samples
# You can also use wget
curl -X GET http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/impactAnalyses/{impactAnalysisId}/rules/{ruleId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.detection.impact.analysis.rule.with.code+json'
const headers = {
'Accept':'application/vnd.sas.detection.impact.analysis.rule.with.code+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/impactAnalyses/{impactAnalysisId}/rules/{ruleId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.detection.impact.analysis.rule.with.code+json'
}
r = requests.get('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/impactAnalyses/{impactAnalysisId}/rules/{ruleId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.detection.impact.analysis.rule.with.code+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/impactAnalyses/{impactAnalysisId}/rules/{ruleId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /impactAnalyses/{impactAnalysisId}/rules/{ruleId}
Get rule details of an Impact Analysis.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
impactAnalysisId | path | string(uuid) | true | The UUID of the impact analysis. |
ruleId | path | string(uuid) | true | The UUID of the rule. |
Example responses
Example of response body content from a get impact analysis request.
{
"ruleId": "a45c37fa-6efe-4b8a-9e54-05799133a48b",
"baseRuleId": "50479",
"ruleVersion": 1,
"executionOrderType": 0,
"name": "SS_IA_Rule_1",
"description": "SS IA Rule 1",
"schemaName": "payment_schema",
"state": "Testing",
"alertTypeCode": "A",
"alertTypeName": "Account",
"messageClassificationKeyCode": "AH",
"messageClassificationDisplayName": "AH Org Name",
"code": "detection.Alert();",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/impactAnalyses/a2506ee2-99a5-417d-9356-8dd51a63bbc6/rules/a45c37fa-6efe-4b8a-9e54-05799133a48b",
"uri": "/detectionDefinition/impactAnalyses/a2506ee2-99a5-417d-9356-8dd51a63bbc6/rules/a45c37fa-6efe-4b8a-9e54-05799133a48b",
"type": "application/vnd.sas.detection.impact.analysis.rule.with.code"
},
{
"method": "GET",
"rel": "up",
"href": "/detectionDefinition/impactAnalyses/a2506ee2-99a5-417d-9356-8dd51a63bbc6/rules",
"uri": "/detectionDefinition/impactAnalyses/a2506ee2-99a5-417d-9356-8dd51a63bbc6/rules",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.impact.analysis.rule"
}
]
}
{
"ruleId": "a45c37fa-6efe-4b8a-9e54-05799133a48b",
"baseRuleId": "50479",
"ruleVersion": 1,
"executionOrderType": 0,
"name": "SS_IA_Rule_1",
"description": "SS IA Rule 1",
"schemaName": "payment_schema",
"state": "Testing",
"alertTypeCode": "A",
"alertTypeName": "Account",
"messageClassificationKeyCode": "AH",
"messageClassificationDisplayName": "AH Org Name",
"code": "detection.Alert();",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/impactAnalyses/a2506ee2-99a5-417d-9356-8dd51a63bbc6/rules/a45c37fa-6efe-4b8a-9e54-05799133a48b",
"uri": "/detectionDefinition/impactAnalyses/a2506ee2-99a5-417d-9356-8dd51a63bbc6/rules/a45c37fa-6efe-4b8a-9e54-05799133a48b",
"type": "application/vnd.sas.detection.impact.analysis.rule.with.code"
},
{
"method": "GET",
"rel": "up",
"href": "/detectionDefinition/impactAnalyses/a2506ee2-99a5-417d-9356-8dd51a63bbc6/rules",
"uri": "/detectionDefinition/impactAnalyses/a2506ee2-99a5-417d-9356-8dd51a63bbc6/rules",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.impact.analysis.rule"
}
]
}
An example of an error 400 when the 'impactAnalysisId' path parameter is not valid.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"1\" for the field \"impactAnalysisId\" does not match the documented format.",
"details": [
"field: impactAnalysisId",
"value: 1",
"messageID: detection-lib-api-icu.validation.invalid.value.msg",
"path: /detectionDefinition/impactAnalyses/1/rules/2",
"correlator: a04eaaf7-5ee2-4ef9-ae41-260bde8302a6"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | impactAnalysisRule |
400 | Bad Request | A bad request. Possible reason or reasons: |
|
- The impact analysis ID and/or rule ID might be invalid. |
error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | Date and time of last modification. |
Cancel an Impact Analysis
Code samples
# You can also use wget
curl -X POST http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/impactAnalyses/{impactAnalysisId}/cancel \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.detection.impact.analysis.cancel.result+json'
const headers = {
'Accept':'application/vnd.sas.detection.impact.analysis.cancel.result+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/impactAnalyses/{impactAnalysisId}/cancel',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.detection.impact.analysis.cancel.result+json'
}
r = requests.post('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/impactAnalyses/{impactAnalysisId}/cancel', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.detection.impact.analysis.cancel.result+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/impactAnalyses/{impactAnalysisId}/cancel", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /impactAnalyses/{impactAnalysisId}/cancel
Cancel an Impact Analysis.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
impactAnalysisId | path | string(uuid) | true | The UUID of the impact analysis. |
Example responses
Example of response body content from a cancel impact analysis request.
{
"version": 1,
"canceled": true
}
{
"version": 1,
"canceled": true
}
An example error response due to an invalid 'impactAnalysisId' path parameter.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"abc\" for the field \"impactAnalysisId\" does not match the documented format.",
"details": [
"field: impactAnalysisId",
"value: abc",
"messageID: detection-lib-api-icu.validation.invalid.value.msg",
"path: /detectionDefinition/impactAnalyses/abc",
"correlator: 0291b93c-48db-4e30-9d9d-9d4babce85b4"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | cancelImpactAnalysis |
400 | Bad Request | Bad request | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | Date and time of last modification. |
Get Impact Analysis Log
Code samples
# You can also use wget
curl -X GET http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/impactAnalyses/{impactAnalysisId}/log \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.detection.impact.analysis.log+json'
const headers = {
'Accept':'application/vnd.sas.detection.impact.analysis.log+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/impactAnalyses/{impactAnalysisId}/log',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.detection.impact.analysis.log+json'
}
r = requests.get('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/impactAnalyses/{impactAnalysisId}/log', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.detection.impact.analysis.log+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/impactAnalyses/{impactAnalysisId}/log", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /impactAnalyses/{impactAnalysisId}/log
Returns log for the Impact Analysis.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
impactAnalysisId | path | string(uuid) | true | The UUID of the impact analysis. |
Example responses
Example of response body content from a get impact analysis log request.
"sample log file here"
"sample log file here"
An example of an error 400 when the 'impactAnalysisId' path parameter is not valid.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"1\" for the field \"impactAnalysisId\" does not match the documented format.",
"details": [
"field: impactAnalysisId",
"value: 1",
"messageID: detection-lib-api-icu.validation.invalid.value.msg",
"path: /detectionDefinition/impactAnalyses/1",
"correlator: a04eaaf7-5ee2-4ef9-ae41-260bde8302a6"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | getImpactAnalysisLog |
400 | Bad Request | Bad request | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | Date and time of last modification. |
Get timing metrics for Impact Analysis
Code samples
# You can also use wget
curl -X GET http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/impactAnalyses/{impactAnalysisId}/timingMetrics \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.detection.impact.analysis.time.metrics+json'
const headers = {
'Accept':'application/vnd.sas.detection.impact.analysis.time.metrics+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/impactAnalyses/{impactAnalysisId}/timingMetrics',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.detection.impact.analysis.time.metrics+json'
}
r = requests.get('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/impactAnalyses/{impactAnalysisId}/timingMetrics', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.detection.impact.analysis.time.metrics+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/impactAnalyses/{impactAnalysisId}/timingMetrics", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /impactAnalyses/{impactAnalysisId}/timingMetrics
Returns information about how long it took to execute the impact analysis.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
impactAnalysisId | path | string(uuid) | true | The UUID of the impact analysis. |
Example responses
Example of response body content from a get impact analysis timing metrics request.
{
"version": 1,
"accept": "application/vnd.sas.detection.impact.analysis.time.metrics+json",
"id": "9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"impactAnalysisNum": 50236,
"name": "Test1",
"timingMetrics": [
{
"timeInMicroseconds": 150,
"rule": {
"ruleId": "9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"baseRuleId": "50100",
"ruleVersion": 1,
"name": "create_alert",
"state": "Production"
}
}
],
"links": [
{
"method": "GET",
"rel": "up",
"href": "/detectionDefinition/impactAnalyses/9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"uri": "/detectionDefinition/impactAnalyses/9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"type": "application/vnd.sas.detection.impact.analysis+json"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/impactAnalyses/9c17ec3c-ec73-45f3-896e-f7a3482f2d31/timingMetrics",
"uri": "/detectionDefinition/impactAnalyses/9c17ec3c-ec73-45f3-896e-f7a3482f2d31/timingMetrics",
"type": "application/vnd.sas.detection.impact.analysis.time.metrics+json"
}
]
}
{
"version": 1,
"accept": "application/vnd.sas.detection.impact.analysis.time.metrics+json",
"id": "9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"impactAnalysisNum": 50236,
"name": "Test1",
"timingMetrics": [
{
"timeInMicroseconds": 150,
"rule": {
"ruleId": "9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"baseRuleId": "50100",
"ruleVersion": 1,
"name": "create_alert",
"state": "Production"
}
}
],
"links": [
{
"method": "GET",
"rel": "up",
"href": "/detectionDefinition/impactAnalyses/9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"uri": "/detectionDefinition/impactAnalyses/9c17ec3c-ec73-45f3-896e-f7a3482f2d31",
"type": "application/vnd.sas.detection.impact.analysis+json"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/impactAnalyses/9c17ec3c-ec73-45f3-896e-f7a3482f2d31/timingMetrics",
"uri": "/detectionDefinition/impactAnalyses/9c17ec3c-ec73-45f3-896e-f7a3482f2d31/timingMetrics",
"type": "application/vnd.sas.detection.impact.analysis.time.metrics+json"
}
]
}
An example of an error 400 when the 'impactAnalysisId' path parameter is not valid.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"1\" for the field \"impactAnalysisId\" does not match the documented format.",
"details": [
"field: impactAnalysisId",
"value: 1",
"messageID: detection-lib-api-icu.validation.invalid.value.msg",
"path: /detectionDefinition/impactAnalyses/1",
"correlator: a04eaaf7-5ee2-4ef9-ae41-260bde8302a6"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | impactAnalysisTimeMetrics |
400 | Bad Request | Bad request | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | Date and time of last modification. |
Projects
The operations for project instances.
Get a List of Projects
Code samples
# You can also use wget
curl -X GET http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/projects \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/projects',
{
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('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/projects', 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", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/projects", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /organizations/{orgId}/projects
Returns a list of projects.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
start | query | integer | false | The 0-based offset of the first resource to return. Defaults to 0. |
limit | query | integer | false | The maximum number of resources to return. Defaults to 100. |
filter | query | string(filter-criteria) | false | The filter criteria for returned resources. For more information, see Filtering in REST APIs. |
sortBy | query | string(sort-criteria) | false | Specifies the sorting for returned resources. For more information, see Sorting in REST APIs. |
orgId | path | string | true | The UUID of the organization. |
Example responses
An example of a collection of summary of projects that the current user has access
{
"version": 2,
"accept": "application/vnd.sas.detection.project",
"count": 5,
"start": 0,
"limit": 100,
"name": "projects",
"items": [
{
"creationTimeStamp": "2022-06-07T17:48:58.410Z",
"createdBy": "userid",
"modifiedTimeStamp": "2022-06-07T17:48:58.410Z",
"modifiedBy": "userid",
"revision": 0,
"version": 1,
"id": "blahd24d-0c66-4e23-832e-fd6d905d8702",
"name": "Project6",
"description": "Project6 Description",
"organizationId": "blahc1bd-e087-41a8-a1b9-a4a25ec4969b"
},
{
"creationTimeStamp": "2022-06-07T18:58:08.937Z",
"createdBy": "userid",
"modifiedTimeStamp": "2022-06-07T18:58:08.937Z",
"modifiedBy": "userid",
"revision": 0,
"version": 1,
"id": "blahde23-e58c-4d41-8c98-e2691fb5b587",
"name": "Project7",
"description": "Project7 Description",
"organizationId": "blahc1bd-e087-41a8-a1b9-a4a25ec4969b"
},
{
"creationTimeStamp": "2022-06-07T19:13:40.911Z",
"createdBy": "userid",
"modifiedTimeStamp": "2022-06-07T19:13:40.911Z",
"modifiedBy": "userid",
"revision": 0,
"version": 1,
"id": "blahe7e7-8222-4c59-9984-d55142c253a6",
"name": "Project8",
"description": "Project8 Description",
"organizationId": "blahc1bd-e087-41a8-a1b9-a4a25ec4969b"
},
{
"creationTimeStamp": "2022-06-08T16:55:57.367Z",
"createdBy": "userid",
"modifiedTimeStamp": "2022-06-08T16:55:57.367Z",
"modifiedBy": "userid",
"revision": 0,
"version": 1,
"id": "blaha51f-2d39-4bd0-b86a-93d07899978d",
"name": "Project9",
"description": "Project9 Description",
"organizationId": "blahc1bd-e087-41a8-a1b9-a4a25ec4969b"
},
{
"creationTimeStamp": "2022-06-08T17:25:00.005Z",
"createdBy": "userid",
"modifiedTimeStamp": "2022-06-08T17:25:00.005Z",
"modifiedBy": "userid",
"revision": 0,
"version": 1,
"id": "blah74c0-e9eb-44e8-be76-6bb72ec8c027",
"name": "Project10",
"description": "Project10 Description",
"organizationId": "blahc1bd-e087-41a8-a1b9-a4a25ec4969b"
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/organizations/blahc1bd-e087-41a8-a1b9-a4a25ec4969b/projects",
"uri": "/detectionDefinition/organizations/blahc1bd-e087-41a8-a1b9-a4a25ec4969b/projects",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.project"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/organizations/blahc1bd-e087-41a8-a1b9-a4a25ec4969b/projects?start=0&limit=100",
"uri": "/detectionDefinition/organizations/blahc1bd-e087-41a8-a1b9-a4a25ec4969b/projects?start=0&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.project"
}
]
}
{
"version": 2,
"accept": "application/vnd.sas.detection.project",
"count": 5,
"start": 0,
"limit": 100,
"name": "projects",
"items": [
{
"creationTimeStamp": "2022-06-07T17:48:58.410Z",
"createdBy": "userid",
"modifiedTimeStamp": "2022-06-07T17:48:58.410Z",
"modifiedBy": "userid",
"revision": 0,
"version": 1,
"id": "blahd24d-0c66-4e23-832e-fd6d905d8702",
"name": "Project6",
"description": "Project6 Description",
"organizationId": "blahc1bd-e087-41a8-a1b9-a4a25ec4969b"
},
{
"creationTimeStamp": "2022-06-07T18:58:08.937Z",
"createdBy": "userid",
"modifiedTimeStamp": "2022-06-07T18:58:08.937Z",
"modifiedBy": "userid",
"revision": 0,
"version": 1,
"id": "blahde23-e58c-4d41-8c98-e2691fb5b587",
"name": "Project7",
"description": "Project7 Description",
"organizationId": "blahc1bd-e087-41a8-a1b9-a4a25ec4969b"
},
{
"creationTimeStamp": "2022-06-07T19:13:40.911Z",
"createdBy": "userid",
"modifiedTimeStamp": "2022-06-07T19:13:40.911Z",
"modifiedBy": "userid",
"revision": 0,
"version": 1,
"id": "blahe7e7-8222-4c59-9984-d55142c253a6",
"name": "Project8",
"description": "Project8 Description",
"organizationId": "blahc1bd-e087-41a8-a1b9-a4a25ec4969b"
},
{
"creationTimeStamp": "2022-06-08T16:55:57.367Z",
"createdBy": "userid",
"modifiedTimeStamp": "2022-06-08T16:55:57.367Z",
"modifiedBy": "userid",
"revision": 0,
"version": 1,
"id": "blaha51f-2d39-4bd0-b86a-93d07899978d",
"name": "Project9",
"description": "Project9 Description",
"organizationId": "blahc1bd-e087-41a8-a1b9-a4a25ec4969b"
},
{
"creationTimeStamp": "2022-06-08T17:25:00.005Z",
"createdBy": "userid",
"modifiedTimeStamp": "2022-06-08T17:25:00.005Z",
"modifiedBy": "userid",
"revision": 0,
"version": 1,
"id": "blah74c0-e9eb-44e8-be76-6bb72ec8c027",
"name": "Project10",
"description": "Project10 Description",
"organizationId": "blahc1bd-e087-41a8-a1b9-a4a25ec4969b"
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/organizations/blahc1bd-e087-41a8-a1b9-a4a25ec4969b/projects",
"uri": "/detectionDefinition/organizations/blahc1bd-e087-41a8-a1b9-a4a25ec4969b/projects",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.project"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/organizations/blahc1bd-e087-41a8-a1b9-a4a25ec4969b/projects?start=0&limit=100",
"uri": "/detectionDefinition/organizations/blahc1bd-e087-41a8-a1b9-a4a25ec4969b/projects?start=0&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.project"
}
]
}
An example of error 400 when the organization ID provided is not in the correct format.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"blah3d15-8d0f-447b-aa2c-dd42d1e2adbx\" for the field \"orgId\" does not match the documented format.",
"details": [
"path: /detectionDefinition/organizations/blah3d15-8d0f-447b-aa2c-dd42d1e2adbx/projects",
"correlator: c7a31263-b540-47e2-ba19-0fd95608e373"
]
}
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"blah3d15-8d0f-447b-aa2c-dd42d1e2adbx\" for the field \"orgId\" does not match the documented format.",
"details": [
"path: /detectionDefinition/organizations/blah3d15-8d0f-447b-aa2c-dd42d1e2adbx/projects",
"correlator: c7a31263-b540-47e2-ba19-0fd95608e373"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | projectCollection |
400 | Bad Request | Bad request | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | Date and time of last modification. |
Create a Project
Code samples
# You can also use wget
curl -X POST http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/projects \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.sas.detection.project+json'
const inputBody = '{
"name": "Project name",
"description": "Project description",
"messageClassificationRelations": [
{
"messageClassificationId": "UUID of a message classification member of organization"
},
{
"messageClassificationId": "UUID of a message classification member of organization"
}
],
"schemaRelations": [
{
"schemaName": "name of a schema"
},
{
"schemaName": "name of a schema"
}
],
"userRelations": [
{
"userId": "ID of a user of the project organization"
},
{
"userId": "ID of a user of the project organization"
}
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/vnd.sas.detection.project+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/projects',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/vnd.sas.detection.project+json'
}
r = requests.post('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/projects', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/vnd.sas.detection.project+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/projects", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /organizations/{orgId}/projects
Creates a new project with the properties specified in the request body. If the message classification relations are not provided, then it defaults to the associated message classification for the organization.
During project creation, a unique user group is established on the Identities Service. The user group is prefixed with DDPVUG (Detection Definition Profile Variable User Group) and controls the access of user variables that are defined in the project. All users that are assigned to the project are members of the user group.
Body parameter
An example of new project request content
{
"name": "Project name",
"description": "Project description",
"messageClassificationRelations": [
{
"messageClassificationId": "UUID of a message classification member of organization"
},
{
"messageClassificationId": "UUID of a message classification member of organization"
}
],
"schemaRelations": [
{
"schemaName": "name of a schema"
},
{
"schemaName": "name of a schema"
}
],
"userRelations": [
{
"userId": "ID of a user of the project organization"
},
{
"userId": "ID of a user of the project organization"
}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | createProjectInputv2 | false | The project to be created. |
orgId | path | string | true | The UUID of the organization. |
Example responses
An example of a project
{
"creationTimeStamp": "2022-05-19T14:10:39.169Z",
"createdBy": "userid",
"modifiedTimeStamp": "2022-05-19T14:10:39.169Z",
"modifiedBy": "userid",
"revision": 0,
"version": 1,
"id": "2db75d39-fd51-49eb-af34-53497d181a85",
"name": "project 123",
"description": "my super project",
"organizationId": "0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8",
"messageClassificationRelations": [
{
"messageClassificationId": "e1163df5-d6dc-11ec-b036-6631d4e9d21c"
},
{
"messageClassificationId": "e1162f78-d6dc-11ec-b036-1234d5e6d78c"
}
],
"schemaRelations": [
{
"schemaName": "Cards"
}
],
"userRelations": [
{
"userId": "user_ID1"
},
{
"userId": "user_ID2"
}
],
"listRelations": [
{
"listId": "ee8c7ec1-d343-4057-814f-c2ccb31a1c1f"
},
{
"listId": "7f3343b5-be79-41c2-bd1f-a7559e844731"
}
],
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/organizations/0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/2db75d39-fd51-49eb-af34-53497d181a85",
"uri": "/detectionDefinition/organizations/0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/2db75d39-fd51-49eb-af34-53497d181a85",
"type": "application/vnd.sas.detection.project"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/organizations/0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/2db75d39-fd51-49eb-af34-53497d181a85",
"uri": "/detectionDefinition/organizations/0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/2db75d39-fd51-49eb-af34-53497d181a85",
"type": "application/vnd.sas.detection.project"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/organizations/0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/2db75d39-fd51-49eb-af34-53497d181a85",
"uri": "/detectionDefinition/organizations/0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/2db75d39-fd51-49eb-af34-53497d181a85"
},
{
"method": "GET",
"rel": "messageClassifications",
"href": "/detectionDefinition/projects/2db75d39-fd51-49eb-af34-53497d181a85/messageClassifications",
"uri": "/detectionDefinition/projects/2db75d39-fd51-49eb-af34-53497d181a85/messageClassifications",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.ou"
}
]
}
{
"creationTimeStamp": "2022-05-19T14:10:39.169Z",
"createdBy": "userid",
"modifiedTimeStamp": "2022-05-19T14:10:39.169Z",
"modifiedBy": "userid",
"revision": 0,
"version": 1,
"id": "2db75d39-fd51-49eb-af34-53497d181a85",
"name": "project 123",
"description": "my super project",
"organizationId": "0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8",
"messageClassificationRelations": [
{
"messageClassificationId": "e1163df5-d6dc-11ec-b036-6631d4e9d21c"
},
{
"messageClassificationId": "e1162f78-d6dc-11ec-b036-1234d5e6d78c"
}
],
"schemaRelations": [
{
"schemaName": "Cards"
}
],
"userRelations": [
{
"userId": "user_ID1"
},
{
"userId": "user_ID2"
}
],
"listRelations": [
{
"listId": "ee8c7ec1-d343-4057-814f-c2ccb31a1c1f"
},
{
"listId": "7f3343b5-be79-41c2-bd1f-a7559e844731"
}
],
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/organizations/0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/2db75d39-fd51-49eb-af34-53497d181a85",
"uri": "/detectionDefinition/organizations/0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/2db75d39-fd51-49eb-af34-53497d181a85",
"type": "application/vnd.sas.detection.project"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/organizations/0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/2db75d39-fd51-49eb-af34-53497d181a85",
"uri": "/detectionDefinition/organizations/0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/2db75d39-fd51-49eb-af34-53497d181a85",
"type": "application/vnd.sas.detection.project"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/organizations/0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/2db75d39-fd51-49eb-af34-53497d181a85",
"uri": "/detectionDefinition/organizations/0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/2db75d39-fd51-49eb-af34-53497d181a85"
},
{
"method": "GET",
"rel": "messageClassifications",
"href": "/detectionDefinition/projects/2db75d39-fd51-49eb-af34-53497d181a85/messageClassifications",
"uri": "/detectionDefinition/projects/2db75d39-fd51-49eb-af34-53497d181a85/messageClassifications",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.ou"
}
]
}
An example of error 400 response when one or more message schemas are invalid.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000007,
"message": "Not all schemas in the list have subscribed to the organization of the project My Project.",
"details": [
"Name: My Project",
"messageID: detection-definition-api-icu.org.not-subscribed.schemas.error.msg",
"path: /detectionDefinition/organizations/0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects",
"correlator: 21b71997-8b9b-4a24-9675-434566eb81a5"
]
}
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000007,
"message": "Not all schemas in the list have subscribed to the organization of the project My Project.",
"details": [
"Name: My Project",
"messageID: detection-definition-api-icu.org.not-subscribed.schemas.error.msg",
"path: /detectionDefinition/organizations/0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects",
"correlator: 21b71997-8b9b-4a24-9675-434566eb81a5"
]
}
An example of error response when attempting to create a project with a name that already exists.
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000017,
"message": "A project with the name My Project already exists.",
"details": [
"Name: My Project",
"messageID: detection-definition-api-icu.project.already.exists.msg",
"path: /detectionDefinition/organizations/0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects",
"correlator: 00465f4f-db21-4202-a843-1c58821df51d"
]
}
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000017,
"message": "A project with the name My Project already exists.",
"details": [
"Name: My Project",
"messageID: detection-definition-api-icu.project.already.exists.msg",
"path: /detectionDefinition/organizations/0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects",
"correlator: 00465f4f-db21-4202-a843-1c58821df51d"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | The project was created and returned in the response body. | projectv2 |
400 | Bad Request | The request was invalid. Possible reasons: |
- The name of the project is not provided or invalid.
- No message schemas are specified.
- One or more message schemas have not been subscribed to by the organization of the project.
- No users are specified.
- One or more users do not have access to the organization of the project.|error2|
|409|Conflict|The request could not be completed due to a conflict with another resource. The project cannot be created because there already exists a project with the same name.|error2|
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Etag | string | An hash-code for the response resource. | |
201 | Last-Modified | string | Date and time of last modification. | |
201 | Location | string | Location of URI for the endpoint. |
Get a Project
Code samples
# You can also use wget
curl -X GET http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/projects/{projectId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.detection.project+json'
const headers = {
'Accept':'application/vnd.sas.detection.project+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/projects/{projectId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.detection.project+json'
}
r = requests.get('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/projects/{projectId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.detection.project+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/projects/{projectId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /organizations/{orgId}/projects/{projectId}
Returns the project identified by the given ID.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
orgId | path | string | true | The UUID of the organization. |
projectId | path | string(uuid) | true | The UUID of the project. |
Example responses
An example of a project
{
"creationTimeStamp": "2022-05-19T14:10:39.169Z",
"createdBy": "userid",
"modifiedTimeStamp": "2022-05-19T14:10:39.169Z",
"modifiedBy": "userid",
"revision": 0,
"version": 1,
"id": "2db75d39-fd51-49eb-af34-53497d181a85",
"name": "project 123",
"description": "my super project",
"organizationId": "0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8",
"messageClassificationRelations": [
{
"messageClassificationId": "e1163df5-d6dc-11ec-b036-6631d4e9d21c"
},
{
"messageClassificationId": "e1162f78-d6dc-11ec-b036-1234d5e6d78c"
}
],
"schemaRelations": [
{
"schemaName": "Cards"
}
],
"userRelations": [
{
"userId": "user_ID1"
},
{
"userId": "user_ID2"
}
],
"listRelations": [
{
"listId": "ee8c7ec1-d343-4057-814f-c2ccb31a1c1f"
},
{
"listId": "7f3343b5-be79-41c2-bd1f-a7559e844731"
}
],
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/organizations/0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/2db75d39-fd51-49eb-af34-53497d181a85",
"uri": "/detectionDefinition/organizations/0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/2db75d39-fd51-49eb-af34-53497d181a85",
"type": "application/vnd.sas.detection.project"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/organizations/0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/2db75d39-fd51-49eb-af34-53497d181a85",
"uri": "/detectionDefinition/organizations/0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/2db75d39-fd51-49eb-af34-53497d181a85",
"type": "application/vnd.sas.detection.project"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/organizations/0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/2db75d39-fd51-49eb-af34-53497d181a85",
"uri": "/detectionDefinition/organizations/0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/2db75d39-fd51-49eb-af34-53497d181a85"
},
{
"method": "GET",
"rel": "messageClassifications",
"href": "/detectionDefinition/projects/2db75d39-fd51-49eb-af34-53497d181a85/messageClassifications",
"uri": "/detectionDefinition/projects/2db75d39-fd51-49eb-af34-53497d181a85/messageClassifications",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.ou"
}
]
}
{
"creationTimeStamp": "2022-05-19T14:10:39.169Z",
"createdBy": "userid",
"modifiedTimeStamp": "2022-05-19T14:10:39.169Z",
"modifiedBy": "userid",
"revision": 0,
"version": 1,
"id": "2db75d39-fd51-49eb-af34-53497d181a85",
"name": "project 123",
"description": "my super project",
"organizationId": "0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8",
"messageClassificationRelations": [
{
"messageClassificationId": "e1163df5-d6dc-11ec-b036-6631d4e9d21c"
},
{
"messageClassificationId": "e1162f78-d6dc-11ec-b036-1234d5e6d78c"
}
],
"schemaRelations": [
{
"schemaName": "Cards"
}
],
"userRelations": [
{
"userId": "user_ID1"
},
{
"userId": "user_ID2"
}
],
"listRelations": [
{
"listId": "ee8c7ec1-d343-4057-814f-c2ccb31a1c1f"
},
{
"listId": "7f3343b5-be79-41c2-bd1f-a7559e844731"
}
],
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/organizations/0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/2db75d39-fd51-49eb-af34-53497d181a85",
"uri": "/detectionDefinition/organizations/0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/2db75d39-fd51-49eb-af34-53497d181a85",
"type": "application/vnd.sas.detection.project"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/organizations/0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/2db75d39-fd51-49eb-af34-53497d181a85",
"uri": "/detectionDefinition/organizations/0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/2db75d39-fd51-49eb-af34-53497d181a85",
"type": "application/vnd.sas.detection.project"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/organizations/0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/2db75d39-fd51-49eb-af34-53497d181a85",
"uri": "/detectionDefinition/organizations/0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/2db75d39-fd51-49eb-af34-53497d181a85"
},
{
"method": "GET",
"rel": "messageClassifications",
"href": "/detectionDefinition/projects/2db75d39-fd51-49eb-af34-53497d181a85/messageClassifications",
"uri": "/detectionDefinition/projects/2db75d39-fd51-49eb-af34-53497d181a85/messageClassifications",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.ou"
}
]
}
An example of error 400 when the project ID provided is not in the correct format.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"blah86d1-4637-4b41-9910-3bf1e450e662\" for the field \"projectId\" does not match the documented format.",
"details": [
"path: /detectionDefinition/projects/blah86d1-4637-4b41-9910-3bf1e450e662",
"correlator: f6a63c0a-8989-4847-85a4-3a947dd4b783"
]
}
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"blah86d1-4637-4b41-9910-3bf1e450e662\" for the field \"projectId\" does not match the documented format.",
"details": [
"path: /detectionDefinition/projects/blah86d1-4637-4b41-9910-3bf1e450e662",
"correlator: f6a63c0a-8989-4847-85a4-3a947dd4b783"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The project was found and returned in the response body. | projectv2 |
400 | Bad Request | Bad request | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Etag | string | An hash-code for the response resource. | |
200 | Last-Modified | string | Date and time of last modification. | |
200 | Location | string | Location of URI for the endpoint. |
Delete a Project
Code samples
# You can also use wget
curl -X DELETE http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/projects/{projectId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.error+json'
const headers = {
'Accept':'application/vnd.sas.error+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/projects/{projectId}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.error+json'
}
r = requests.delete('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/projects/{projectId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.error+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/projects/{projectId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /organizations/{orgId}/projects/{projectId}
Deletes a project, if there are no associated assets (for example, rules). The profile variable user group that belongs to the project is also removed.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
orgId | path | string | true | The UUID of the organization. |
projectId | path | string(uuid) | true | The UUID of the project. |
Example responses
An example of error 400 when the project ID provided is not in the correct format.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"blah56eb-3282-4083-8a8f-9cfc47a654bx\" for the field \"projectId\" does not match the documented format.",
"details": [
"path: /detectionDefinition/organizations/blah3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/blah56eb-3282-4083-8a8f-9cfc47a654bx",
"correlator: 80458009-8aa5-492f-a4a4-ad393c7a54c4"
]
}
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"blah56eb-3282-4083-8a8f-9cfc47a654bx\" for the field \"projectId\" does not match the documented format.",
"details": [
"path: /detectionDefinition/organizations/blah3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/blah56eb-3282-4083-8a8f-9cfc47a654bx",
"correlator: 80458009-8aa5-492f-a4a4-ad393c7a54c4"
]
}
An example of error 409 when deleting a project that has rules.
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000020,
"message": "Cannot delete project that has rules and/or profile variables.",
"details": [
"path: /detectionDefinition/organizations/blah3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/blah56eb-3282-4083-8a8f-9cfc47a654b3",
"correlator: 0a1154b8-7e8c-4d1c-b9f9-8f65a76d5c75"
]
}
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000020,
"message": "Cannot delete project that has rules and/or profile variables.",
"details": [
"path: /detectionDefinition/organizations/blah3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/blah56eb-3282-4083-8a8f-9cfc47a654b3",
"correlator: 0a1154b8-7e8c-4d1c-b9f9-8f65a76d5c75"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | The project was deleted | None |
400 | Bad Request | Bad request | error2 |
409 | Conflict | Cannot delete a project that has associated assets. Delete or reassign the associated assets and then try again. | error2 |
Partially Update a Project
Code samples
# You can also use wget
curl -X PATCH http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/projects/{projectId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/json-patch+json' \
-H 'Accept: application/vnd.sas.detection.project+json'
const inputBody = '[
{
"op": "replace",
"path": "name",
"value": "Project new name"
},
{
"op": "replace",
"path": "description",
"value": "Project new description."
},
{
"op": "add",
"path": "messageClassificationRelations",
"value": "e1164e8b-d6dc-11ec-b036-6631d4e9d21c"
},
{
"op": "remove",
"path": "messageClassificationRelations",
"value": "e1164eaa-d6dc-11ec-b036-6631d4e9d21c"
},
{
"op": "add",
"path": "schemaRelations",
"value": [
"Payments",
"Deposits"
]
},
{
"op": "remove",
"path": "schemaRelations",
"value": "Cards"
},
{
"op": "add",
"path": "userRelations",
"value": "user_1"
},
{
"op": "remove",
"path": "userRelations",
"value": [
"user_2",
"user_3"
]
},
{
"op": "add",
"path": "listRelations",
"value": "7f3343b5-be79-41c2-bd1f-a7559e844731"
},
{
"op": "remove",
"path": "listRelations",
"value": "7f3343b5-be79-41c2-bd1f-a7559e844731"
}
]';
const headers = {
'Content-Type':'application/json-patch+json',
'Accept':'application/vnd.sas.detection.project+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/projects/{projectId}',
{
method: 'PATCH',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/json-patch+json',
'Accept': 'application/vnd.sas.detection.project+json'
}
r = requests.patch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/projects/{projectId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json-patch+json"},
"Accept": []string{"application/vnd.sas.detection.project+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PATCH", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/projects/{projectId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PATCH /organizations/{orgId}/projects/{projectId}
Partially updates a project. Select content type "application/json-patch+json" to update the name and description of a project, add new relations to a project, or remove existing relations from a project. You also can use other content types when changing project's name and description only.
Body parameter
An example of project JSONPatch request content
[
{
"op": "replace",
"path": "name",
"value": "Project new name"
},
{
"op": "replace",
"path": "description",
"value": "Project new description."
},
{
"op": "add",
"path": "messageClassificationRelations",
"value": "e1164e8b-d6dc-11ec-b036-6631d4e9d21c"
},
{
"op": "remove",
"path": "messageClassificationRelations",
"value": "e1164eaa-d6dc-11ec-b036-6631d4e9d21c"
},
{
"op": "add",
"path": "schemaRelations",
"value": [
"Payments",
"Deposits"
]
},
{
"op": "remove",
"path": "schemaRelations",
"value": "Cards"
},
{
"op": "add",
"path": "userRelations",
"value": "user_1"
},
{
"op": "remove",
"path": "userRelations",
"value": [
"user_2",
"user_3"
]
},
{
"op": "add",
"path": "listRelations",
"value": "7f3343b5-be79-41c2-bd1f-a7559e844731"
},
{
"op": "remove",
"path": "listRelations",
"value": "7f3343b5-be79-41c2-bd1f-a7559e844731"
}
]
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | projectJsonPatchInput | false | none |
orgId | path | string | true | The UUID of the organization. |
projectId | path | string(uuid) | true | The UUID of the project. |
Example responses
An example response from a successful project update request.
{
"creationTimeStamp": "2023-01-04T20:58:17.527Z",
"createdBy": "bob",
"description": "Project new description",
"modifiedTimeStamp": "2023-01-05T16:31:30.586Z",
"modifiedBy": "bob",
"revision": 2,
"version": 1,
"id": "blah56eb-3282-4083-8a8f-9cfc47a654b3",
"name": "Project new name",
"organizationId": "blah3d15-8d0f-447b-aa2c-dd42d1e2adb8",
"messageClassificationRelations": [
{
"messageClassificationId": "e1164e8b-d6dc-11ec-b036-6631d4e9d21c"
}
],
"schemaRelations": [
{
"schemaName": "Deposits"
},
{
"schemaName": "Payments"
}
],
"userRelations": [
{
"userId": "user_1"
},
{
"userId": "user_20"
},
{
"userId": "user_30"
}
],
"userGroupId": "DDPVUG-3486E5EE346623A7",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/organizations/blah3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/blah56eb-3282-4083-8a8f-9cfc47a654b3",
"uri": "/detectionDefinition/organizations/blah3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/blah56eb-3282-4083-8a8f-9cfc47a654b3",
"type": "application/vnd.sas.detection.project"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/organizations/blah3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/blah56eb-3282-4083-8a8f-9cfc47a654b3",
"uri": "/detectionDefinition/organizations/blah3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/blah56eb-3282-4083-8a8f-9cfc47a654b3",
"type": "application/vnd.sas.detection.project"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/organizations/blah3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/blah56eb-3282-4083-8a8f-9cfc47a654b3",
"uri": "/detectionDefinition/organizations/blah3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/blah56eb-3282-4083-8a8f-9cfc47a654b3"
},
{
"method": "GET",
"rel": "messageClassifications",
"href": "/detectionDefinition/projects/blah56eb-3282-4083-8a8f-9cfc47a654b3/messageClassifications",
"uri": "/detectionDefinition/projects/blah56eb-3282-4083-8a8f-9cfc47a654b3/messageClassifications",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.ou"
}
]
}
{
"creationTimeStamp": "2023-01-04T20:58:17.527Z",
"createdBy": "bob",
"description": "Project new description",
"modifiedTimeStamp": "2023-01-05T16:31:30.586Z",
"modifiedBy": "bob",
"revision": 2,
"version": 1,
"id": "blah56eb-3282-4083-8a8f-9cfc47a654b3",
"name": "Project new name",
"organizationId": "blah3d15-8d0f-447b-aa2c-dd42d1e2adb8",
"messageClassificationRelations": [
{
"messageClassificationId": "e1164e8b-d6dc-11ec-b036-6631d4e9d21c"
}
],
"schemaRelations": [
{
"schemaName": "Deposits"
},
{
"schemaName": "Payments"
}
],
"userRelations": [
{
"userId": "user_1"
},
{
"userId": "user_20"
},
{
"userId": "user_30"
}
],
"userGroupId": "DDPVUG-3486E5EE346623A7",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/organizations/blah3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/blah56eb-3282-4083-8a8f-9cfc47a654b3",
"uri": "/detectionDefinition/organizations/blah3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/blah56eb-3282-4083-8a8f-9cfc47a654b3",
"type": "application/vnd.sas.detection.project"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/organizations/blah3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/blah56eb-3282-4083-8a8f-9cfc47a654b3",
"uri": "/detectionDefinition/organizations/blah3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/blah56eb-3282-4083-8a8f-9cfc47a654b3",
"type": "application/vnd.sas.detection.project"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/organizations/blah3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/blah56eb-3282-4083-8a8f-9cfc47a654b3",
"uri": "/detectionDefinition/organizations/blah3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/blah56eb-3282-4083-8a8f-9cfc47a654b3"
},
{
"method": "GET",
"rel": "messageClassifications",
"href": "/detectionDefinition/projects/blah56eb-3282-4083-8a8f-9cfc47a654b3/messageClassifications",
"uri": "/detectionDefinition/projects/blah56eb-3282-4083-8a8f-9cfc47a654b3/messageClassifications",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.ou"
}
]
}
An example of error 400 when the new project name is invalid.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The specified object with type \"Project\" is invalid.",
"details": [
"path: /detectionDefinition/organizations/0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/19f156eb-3282-4083-8a8f-9cfc47a654b3",
"correlator: 7a0a6961-e833-4e73-864b-b44150a131cf"
]
}
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The specified object with type \"Project\" is invalid.",
"details": [
"path: /detectionDefinition/organizations/0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/19f156eb-3282-4083-8a8f-9cfc47a654b3",
"correlator: 7a0a6961-e833-4e73-864b-b44150a131cf"
]
}
An example of error 409 when the new project name is duplicate of an existing project.
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000022,
"message": "A project with the name BLAH already exists.",
"details": [
"path: /detectionDefinition/organizations/blah3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/blah56eb-3282-4083-8a8f-9cfc47a654b3",
"correlator: 6424d0b0-2a04-486d-836e-7fb42d4a9d8e"
]
}
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000022,
"message": "A project with the name BLAH already exists.",
"details": [
"path: /detectionDefinition/organizations/blah3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/blah56eb-3282-4083-8a8f-9cfc47a654b3",
"correlator: 6424d0b0-2a04-486d-836e-7fb42d4a9d8e"
]
}
An example of 412 error when updating a project with an 'If-Match' request header that is not valid.
{
"version": 2,
"httpStatusCode": 412,
"errorCode": 1000000,
"message": "The object has been updated since you last retrieved it.",
"details": [
"path: /detectionDefinition/organizations/blah3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/blah56eb-3282-4083-8a8f-9cfc47a654b3",
"correlator: 63f3339d-67a0-4f13-9a96-1db2522a9017"
]
}
{
"version": 2,
"httpStatusCode": 412,
"errorCode": 1000000,
"message": "The object has been updated since you last retrieved it.",
"details": [
"path: /detectionDefinition/organizations/blah3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/blah56eb-3282-4083-8a8f-9cfc47a654b3",
"correlator: 63f3339d-67a0-4f13-9a96-1db2522a9017"
]
}
An example of 428 error when the request does not include the 'If-Match' request header.
{
"version": 2,
"httpStatusCode": 428,
"errorCode": 1000021,
"message": "Conditional match header is missing.",
"details": [
"messageID: detection-lib-api-icu.ifMatch.missing.msg",
"path: /detectionDefinition/organizations/blah3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/blah56eb-3282-4083-8a8f-9cfc47a654b3",
"correlator: 63f3339d-67a0-4f13-9a96-1db2522a9017"
]
}
{
"version": 2,
"httpStatusCode": 428,
"errorCode": 1000021,
"message": "Conditional match header is missing.",
"details": [
"messageID: detection-lib-api-icu.ifMatch.missing.msg",
"path: /detectionDefinition/organizations/blah3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/blah56eb-3282-4083-8a8f-9cfc47a654b3",
"correlator: 63f3339d-67a0-4f13-9a96-1db2522a9017"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successfully updated the project | projectv2 |
400 | Bad Request | The request was invalid. Possible reason or reasons: |
- The new name of the project is invalid.
- One or more new schemas have not been subscribed to by the organization of the project.
- One or more users do not have access to the organization of the project.
- One or more message classifications do not belong to the organization of the project.
- One or more lists are not associated with the organization of the project.
- One or more lists do not have a state if active.|error2|
|409|Conflict|There is a conflict associated with existing resource.
Possible reason or reasons:
- A project exists with the same name.
- One or more schemas to be removed are in use by rules in the project.
- One or more message classifications to be removed are in use by rules in the project.
- One or more lists to be removed are in use by rules in the project.
- All schemas, users, or message classifications would be removed from the project.|error2|
|412|Precondition Failed|The supplied pre-condition was not satisfactory. This typically indicates stale data.|error2|
|428|Precondition Required|A required pre-condition (If-Match/If-Unmodified-Since) was not provided.|error2|
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Etag | string | An hash-code for the response resource. | |
200 | Last-Modified | string | Date and time of last modification. | |
200 | Location | string | Location of URI for the endpoint. | |
409 | Location | string | Location of URI for the endpoint. | |
412 | Location | string | Location of URI for the endpoint. | |
428 | Location | string | Location of URI for the endpoint. |
Get the List of Variables of the Associated Message Schemas of a Project
Code samples
# You can also use wget
curl -X GET http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/projects/{projectId}/variables \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/projects/{projectId}/variables',
{
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('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/projects/{projectId}/variables', 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", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/{orgId}/projects/{projectId}/variables", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /organizations/{orgId}/projects/{projectId}/variables
Returns the list of variables of the message schemas that are associated with the project.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
start | query | integer | false | The 0-based offset of the first resource to return. Defaults to 0. |
limit | query | integer | false | The maximum number of resources to return. Defaults to 100. |
filter | query | string(filter-criteria) | false | The filter criteria for returned resources. For more information, see Filtering in REST APIs. |
sortBy | query | string(sort-criteria) | false | Specifies the sorting for returned resources. For more information, see Sorting in REST APIs. |
orgId | path | string | true | The UUID of the organization. |
projectId | path | string(uuid) | true | The UUID of the project. |
Example responses
An example of a collection of project message schema variables
{
"version": 2,
"accept": "application/vnd.sas.detection.message.variable",
"count": 2,
"start": 0,
"limit": 100,
"name": "variables",
"items": [
{
"access": "ro",
"arrayItem": "none",
"createdBy": "userabc",
"creationTimeStamp": "2022-06-30T17:28:23.345Z",
"defaultValue": "",
"deprecated": false,
"description": "",
"displayName": "aqo_cash_balance",
"enumURI": "",
"exclusiveMaximum": false,
"id": "c9e0accd-1c01-4c8c-86fa-d12122af70aa",
"inclusiveMinimum": false,
"isMissing": false,
"jsonPath": ".AQO",
"locked": false,
"maxItems": 0,
"maxLength": 0,
"maximum": 0,
"minItems": 0,
"minLength": 0,
"minimum": 0,
"modifiedBy": "userabc",
"modifiedTimeStamp": "2022-07-01T14:44:13.845Z",
"name": "aqo_cash_balance",
"private": false,
"required": false,
"revision": 1,
"type": "number",
"userGroup": "DMSDefault",
"variableSetId": "45c682f9-7d22-435b-b79b-d361e6c1cb3a",
"version": 1
},
{
"access": "ro",
"arrayItem": "none",
"createdBy": "userabc",
"creationTimeStamp": "2022-06-30T17:28:49.194Z",
"defaultValue": "",
"deprecated": false,
"description": "",
"displayName": "tcn_merch_curr_code",
"enumURI": "",
"exclusiveMaximum": false,
"id": "dfd76464-b37d-4220-ae31-fadfd52f8e9b",
"inclusiveMinimum": false,
"isMissing": false,
"jsonPath": ".TCN",
"locked": false,
"maxItems": 0,
"maxLength": 3,
"maximum": 0,
"minItems": 0,
"minLength": 0,
"minimum": 0,
"modifiedBy": "userabc",
"modifiedTimeStamp": "2022-07-01T14:43:42.425Z",
"name": "tcn_merch_curr_code",
"private": false,
"required": false,
"revision": 1,
"type": "string",
"userGroup": "DMSDefault",
"variableSetId": "409363c3-c475-4570-a009-a5f3ae9fbd37",
"version": 1
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/organizations/0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/521786d1-4637-4b41-9910-3bf1e450e662/variables",
"uri": "/detectionDefinition/organizations/0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/521786d1-4637-4b41-9910-3bf1e450e662/variables",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message.variable"
}
]
}
{
"version": 2,
"accept": "application/vnd.sas.detection.message.variable",
"count": 2,
"start": 0,
"limit": 100,
"name": "variables",
"items": [
{
"access": "ro",
"arrayItem": "none",
"createdBy": "userabc",
"creationTimeStamp": "2022-06-30T17:28:23.345Z",
"defaultValue": "",
"deprecated": false,
"description": "",
"displayName": "aqo_cash_balance",
"enumURI": "",
"exclusiveMaximum": false,
"id": "c9e0accd-1c01-4c8c-86fa-d12122af70aa",
"inclusiveMinimum": false,
"isMissing": false,
"jsonPath": ".AQO",
"locked": false,
"maxItems": 0,
"maxLength": 0,
"maximum": 0,
"minItems": 0,
"minLength": 0,
"minimum": 0,
"modifiedBy": "userabc",
"modifiedTimeStamp": "2022-07-01T14:44:13.845Z",
"name": "aqo_cash_balance",
"private": false,
"required": false,
"revision": 1,
"type": "number",
"userGroup": "DMSDefault",
"variableSetId": "45c682f9-7d22-435b-b79b-d361e6c1cb3a",
"version": 1
},
{
"access": "ro",
"arrayItem": "none",
"createdBy": "userabc",
"creationTimeStamp": "2022-06-30T17:28:49.194Z",
"defaultValue": "",
"deprecated": false,
"description": "",
"displayName": "tcn_merch_curr_code",
"enumURI": "",
"exclusiveMaximum": false,
"id": "dfd76464-b37d-4220-ae31-fadfd52f8e9b",
"inclusiveMinimum": false,
"isMissing": false,
"jsonPath": ".TCN",
"locked": false,
"maxItems": 0,
"maxLength": 3,
"maximum": 0,
"minItems": 0,
"minLength": 0,
"minimum": 0,
"modifiedBy": "userabc",
"modifiedTimeStamp": "2022-07-01T14:43:42.425Z",
"name": "tcn_merch_curr_code",
"private": false,
"required": false,
"revision": 1,
"type": "string",
"userGroup": "DMSDefault",
"variableSetId": "409363c3-c475-4570-a009-a5f3ae9fbd37",
"version": 1
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/organizations/0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/521786d1-4637-4b41-9910-3bf1e450e662/variables",
"uri": "/detectionDefinition/organizations/0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/521786d1-4637-4b41-9910-3bf1e450e662/variables",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message.variable"
}
]
}
An example of error 400 when the limit query parameter is less than zero.
{
"httpStatusCode": 400,
"errorCode": 1126,
"message": "The limit parameter must be greater or equal to zero.",
"details": [
"path: /detectionDefinition/organizations/0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8/projects/521786d1-4637-4b41-9910-3bf1e450e662/variables?limit=-1",
"correlator: 01ea6a41-c153-4220-8abe-76732f28acaf"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | variableSummaryCollection |
400 | Bad Request | Bad request | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | Date and time of last modification. |
Get a List of Projects that the Current User is a Member
Code samples
# You can also use wget
curl -X GET http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/projects \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/projects',
{
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('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/projects', 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", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/organizations/projects", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /organizations/projects
Returns a list of projects that the current user is a member.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
start | query | integer | false | The 0-based offset of the first resource to return. Defaults to 0. |
limit | query | integer | false | The maximum number of resources to return. Defaults to 100. |
filter | query | string(filter-criteria) | false | The filter criteria for returned resources. For more information, see Filtering in REST APIs. |
sortBy | query | string(sort-criteria) | false | Specifies the sorting for returned resources. For more information, see Sorting in REST APIs. |
Example responses
An example of a list of projects that the current user is a member.
{
"version": 2,
"accept": "application/vnd.sas.detection.project",
"count": 2,
"start": 0,
"limit": 2,
"name": "projects",
"items": [
{
"creationTimeStamp": "2022-07-19T17:35:23.096Z",
"createdBy": "bob",
"modifiedTimeStamp": "2022-07-19T17:35:23.096Z",
"modifiedBy": "bob",
"revision": 0,
"version": 1,
"id": "blah5d39-fd51-49eb-af34-53497d181a85",
"name": "My Project",
"organizationId": "blah3d15-8d0f-447b-aa2c-dd42d1e2adb8"
},
{
"creationTimeStamp": "2022-08-04T14:58:24.179Z",
"createdBy": "sccons",
"modifiedTimeStamp": "2022-11-14T15:59:10.772Z",
"modifiedBy": "bob",
"revision": 1,
"version": 1,
"id": "blaha30f-c0ab-4979-ad4c-27aeb6fb607f",
"name": "Project xyz",
"description": "Project for xyz",
"organizationId": "blahbf42-3511-4e48-8e77-a43d97d9dad9"
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/organizations//projects",
"uri": "/detectionDefinition/organizations//projects",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.project"
},
{
"method": "GET",
"rel": "self",
"href": "detectionDefinition/organizations//projects?start=0&limit=100",
"uri": "/detectionDefinition/organizations//projects?start=0&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.project"
}
]
}
{
"version": 2,
"accept": "application/vnd.sas.detection.project",
"count": 2,
"start": 0,
"limit": 2,
"name": "projects",
"items": [
{
"creationTimeStamp": "2022-07-19T17:35:23.096Z",
"createdBy": "bob",
"modifiedTimeStamp": "2022-07-19T17:35:23.096Z",
"modifiedBy": "bob",
"revision": 0,
"version": 1,
"id": "blah5d39-fd51-49eb-af34-53497d181a85",
"name": "My Project",
"organizationId": "blah3d15-8d0f-447b-aa2c-dd42d1e2adb8"
},
{
"creationTimeStamp": "2022-08-04T14:58:24.179Z",
"createdBy": "sccons",
"modifiedTimeStamp": "2022-11-14T15:59:10.772Z",
"modifiedBy": "bob",
"revision": 1,
"version": 1,
"id": "blaha30f-c0ab-4979-ad4c-27aeb6fb607f",
"name": "Project xyz",
"description": "Project for xyz",
"organizationId": "blahbf42-3511-4e48-8e77-a43d97d9dad9"
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/organizations//projects",
"uri": "/detectionDefinition/organizations//projects",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.project"
},
{
"method": "GET",
"rel": "self",
"href": "detectionDefinition/organizations//projects?start=0&limit=100",
"uri": "/detectionDefinition/organizations//projects?start=0&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.project"
}
]
}
An example of error 400 when the value of the limit query parameter is invalid.
{
"httpStatusCode": 400,
"errorCode": 1126,
"message": "The limit parameter must be greater or equal to zero.",
"details": [
"path: /detectionDefinition/organizations/projects",
"correlator: 0bf44f51-3f87-4e37-a59a-342b88622557"
]
}
{
"httpStatusCode": 400,
"errorCode": 1126,
"message": "The limit parameter must be greater or equal to zero.",
"details": [
"path: /detectionDefinition/organizations/projects",
"correlator: 0bf44f51-3f87-4e37-a59a-342b88622557"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | projectCollection |
400 | Bad Request | Bad request | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | Date and time of last modification. |
Get a List of Message Classifications Associated with a Project
Code samples
# You can also use wget
curl -X GET http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/messageClassifications \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/messageClassifications',
{
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('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/messageClassifications', 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", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/messageClassifications", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /projects/{projectId}/messageClassifications
Returns the message classifications that are associated with the project identified by the given ID.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
projectId | path | string(uuid) | true | The UUID of the project. |
start | query | integer | false | The 0-based offset of the first resource to return. Defaults to 0. |
limit | query | integer | false | The maximum number of resources to return. Defaults to 100. |
filter | query | string(filter-criteria) | false | The filter criteria for returned resources. For more information, see Filtering in REST APIs. |
sortBy | query | string(sort-criteria) | false | Specifies the sorting for returned resources. For more information, see Sorting in REST APIs. |
Example responses
Example response content of message classifications that are associated with a project
{
"version": 2,
"accept": "application/vnd.sas.detection.message.classification",
"count": 2,
"start": 0,
"limit": 100,
"name": "messageClassifications",
"items": [
{
"creationTimeStamp": "2022-05-18T19:01:10.138Z",
"createdBy": "userid",
"modifiedTimeStamp": "2022-05-18T19:01:10.138Z",
"modifiedBy": "userid",
"revision": 0,
"version": 1,
"id": "e1162f78-d6dc-11ec-b036-6631d4e9d21c",
"name": "AG_PC_DB",
"displayName": "AG_PC_DB",
"keyCode": "AGAA",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/messageClassifications/e1162f78-d6dc-11ec-b036-6631d4e9d21c",
"uri": "/detectionDefinition/messageClassifications/e1162f78-d6dc-11ec-b036-6631d4e9d21c",
"type": "application/vnd.sas.detection.message.classification"
}
]
},
{
"creationTimeStamp": "2022-05-18T19:01:10.145Z",
"createdBy": "userid",
"modifiedTimeStamp": "2022-05-18T19:01:10.145Z",
"modifiedBy": "userid",
"revision": 0,
"version": 1,
"id": "e1163df5-d6dc-11ec-b036-6631d4e9d21c",
"name": "AG_PC_CR",
"displayName": "AG_PC_CR",
"keyCode": "AGAB",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/messageClassifications/e1163df5-d6dc-11ec-b036-6631d4e9d21c",
"uri": "/detectionDefinition/messageClassifications/e1163df5-d6dc-11ec-b036-6631d4e9d21c",
"type": "application/vnd.sas.detection.message.classification"
}
]
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/projects/5d66e3b8-8a7e-4fd2-9a5c-86a75dd4f8fc/messageClassifications",
"uri": "/detectionDefinition/projects/5d66e3b8-8a7e-4fd2-9a5c-86a75dd4f8fc/messageClassifications",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message.classification"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/projects/5d66e3b8-8a7e-4fd2-9a5c-86a75dd4f8fc/messageClassifications?start=0&limit=100",
"uri": "/detectionDefinition/projects/5d66e3b8-8a7e-4fd2-9a5c-86a75dd4f8fc/messageClassifications?start=0&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message.classification"
}
]
}
{
"version": 2,
"accept": "application/vnd.sas.detection.message.classification",
"count": 2,
"start": 0,
"limit": 100,
"name": "messageClassifications",
"items": [
{
"creationTimeStamp": "2022-05-18T19:01:10.138Z",
"createdBy": "userid",
"modifiedTimeStamp": "2022-05-18T19:01:10.138Z",
"modifiedBy": "userid",
"revision": 0,
"version": 1,
"id": "e1162f78-d6dc-11ec-b036-6631d4e9d21c",
"name": "AG_PC_DB",
"displayName": "AG_PC_DB",
"keyCode": "AGAA",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/messageClassifications/e1162f78-d6dc-11ec-b036-6631d4e9d21c",
"uri": "/detectionDefinition/messageClassifications/e1162f78-d6dc-11ec-b036-6631d4e9d21c",
"type": "application/vnd.sas.detection.message.classification"
}
]
},
{
"creationTimeStamp": "2022-05-18T19:01:10.145Z",
"createdBy": "userid",
"modifiedTimeStamp": "2022-05-18T19:01:10.145Z",
"modifiedBy": "userid",
"revision": 0,
"version": 1,
"id": "e1163df5-d6dc-11ec-b036-6631d4e9d21c",
"name": "AG_PC_CR",
"displayName": "AG_PC_CR",
"keyCode": "AGAB",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/messageClassifications/e1163df5-d6dc-11ec-b036-6631d4e9d21c",
"uri": "/detectionDefinition/messageClassifications/e1163df5-d6dc-11ec-b036-6631d4e9d21c",
"type": "application/vnd.sas.detection.message.classification"
}
]
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/projects/5d66e3b8-8a7e-4fd2-9a5c-86a75dd4f8fc/messageClassifications",
"uri": "/detectionDefinition/projects/5d66e3b8-8a7e-4fd2-9a5c-86a75dd4f8fc/messageClassifications",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message.classification"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/projects/5d66e3b8-8a7e-4fd2-9a5c-86a75dd4f8fc/messageClassifications?start=0&limit=100",
"uri": "/detectionDefinition/projects/5d66e3b8-8a7e-4fd2-9a5c-86a75dd4f8fc/messageClassifications?start=0&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message.classification"
}
]
}
An example of error 400 when the project ID provided is not in the correct format.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"blah86d1-4637-4b41-9910-3bf1e450e66x\" for the field \"projectId\" does not match the documented format.",
"details": [
"path: /detectionDefinition/projects/blah86d1-4637-4b41-9910-3bf1e450e66x/messageClassifications",
"correlator: f96d8a5b-3c2a-4e6c-ba07-8760f986d6f6"
]
}
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"blah86d1-4637-4b41-9910-3bf1e450e66x\" for the field \"projectId\" does not match the documented format.",
"details": [
"path: /detectionDefinition/projects/blah86d1-4637-4b41-9910-3bf1e450e66x/messageClassifications",
"correlator: f96d8a5b-3c2a-4e6c-ba07-8760f986d6f6"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | messageClassificationCollection |
400 | Bad Request | Bad request | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Location | string | Location of URI for the endpoint. |
Get a Message Classification Associated with a Project
Code samples
# You can also use wget
curl -X GET http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/messageClassifications/{messageClassificationId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.detection.message.classification+json'
const headers = {
'Accept':'application/vnd.sas.detection.message.classification+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/messageClassifications/{messageClassificationId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.detection.message.classification+json'
}
r = requests.get('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/messageClassifications/{messageClassificationId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.detection.message.classification+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/messageClassifications/{messageClassificationId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /projects/{projectId}/messageClassifications/{messageClassificationId}
Returns the message classification that is associated with the identified project, by its ID. Specify a depth to return sub-message classifications together with the message classification.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
projectId | path | string(uuid) | true | The UUID of the project. |
messageClassificationId | path | string | true | The UUID of the message classification. |
depth | query | integer | false | Specifies the depth that sub-message classifications are to be retrieved with the message classification. Specify a value of -1 to retrieve all sub-message classifications. Specify a value of 0 to retrieve no sub-message classifications. Specify a positive number to retrieve sub-message classifications up to the depth. |
Example responses
An example of message classification object
{
"creationTimeStamp": "2022-05-18T19:01:09.985Z",
"createdBy": "userid",
"modifiedTimeStamp": "2022-05-18T19:01:09.985Z",
"modifiedBy": "userid",
"revision": 0,
"version": 1,
"id": "e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"name": "NA",
"displayName": "North America",
"keyCode": "1.6.2",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"uri": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"type": "application/vnd.sas.detection.message.classification"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"uri": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"type": "application/vnd.sas.detection.message.classification"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"uri": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c"
}
]
}
{
"creationTimeStamp": "2022-05-18T19:01:09.985Z",
"createdBy": "userid",
"modifiedTimeStamp": "2022-05-18T19:01:09.985Z",
"modifiedBy": "userid",
"revision": 0,
"version": 1,
"id": "e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"name": "NA",
"displayName": "North America",
"keyCode": "1.6.2",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"uri": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"type": "application/vnd.sas.detection.message.classification"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"uri": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"type": "application/vnd.sas.detection.message.classification"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c",
"uri": "/detectionDefinition/messageClassifications/e1166ce9-d6dc-11ec-b036-6631d4e9d21c"
}
]
}
An example of error 400 when the message classification ID provided is not in the correct format.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"blah6ce9-d6dc-11ec-b036-6631d4e9d21x\" for the field \"messageClassificationId\" does not match the documented format.",
"details": [
"path: /detectionDefinition/projects/blah86d1-4637-4b41-9910-3bf1e450e662/messageClassifications/blah6ce9-d6dc-11ec-b036-6631d4e9d21x",
"correlator: f6a63c0a-8989-4847-85a4-3a947dd4b783"
]
}
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"blah6ce9-d6dc-11ec-b036-6631d4e9d21x\" for the field \"messageClassificationId\" does not match the documented format.",
"details": [
"path: /detectionDefinition/projects/blah86d1-4637-4b41-9910-3bf1e450e662/messageClassifications/blah6ce9-d6dc-11ec-b036-6631d4e9d21x",
"correlator: f6a63c0a-8989-4847-85a4-3a947dd4b783"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | messageClassification |
400 | Bad Request | Bad request | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | Date and time of last modification. |
Get a List of the Lists Associated with a Project
Code samples
# You can also use wget
curl -X GET http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/lists \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/lists',
{
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('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/lists', 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", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/projects/{projectId}/lists", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /projects/{projectId}/lists
Returns the list of lists associated with a project.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
projectId | path | string(uuid) | true | The UUID of the project. |
Example responses
An example of a collection of project lists
{
"version": 2,
"accept": "application/vnd.sas.detection.list",
"count": 2,
"start": 0,
"limit": 100,
"name": "lists",
"items": [
{
"version": 1,
"columns": [
{
"name": "merch_term_id",
"datatype": "string",
"position": 1,
"isKey": true,
"keyPosition": 1
}
],
"creationTimeStamp": "2023-02-06T13:46:35.934Z",
"id": "ee8c7ec1-d343-4057-814f-c2ccb31a1c1f",
"name": "bad_merchant_terminal"
},
{
"version": 1,
"columns": [
{
"name": "aqo_acct_num",
"datatype": "string",
"position": 1,
"isKey": true,
"keyPosition": 1
},
{
"name": "reason",
"datatype": "string",
"position": 2
},
{
"name": "when",
"datatype": "string",
"position": 3
}
],
"creationTimeStamp": "2023-02-06T18:40:01.354Z",
"id": "7f3343b5-be79-41c2-bd1f-a7559e844731",
"name": "closedAccts"
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/projects/f31aaff1-6991-4e43-83be-3c9b62aa0b22/lists",
"uri": "/detectionDefinition/projects/f31aaff1-6991-4e43-83be-3c9b62aa0b22/lists",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.list"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/projects/f31aaff1-6991-4e43-83be-3c9b62aa0b22/lists?start=0&limit=100",
"uri": "/detectionDefinition/projects/f31aaff1-6991-4e43-83be-3c9b62aa0b22/lists?start=0&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.list"
}
]
}
{
"version": 2,
"accept": "application/vnd.sas.detection.list",
"count": 2,
"start": 0,
"limit": 100,
"name": "lists",
"items": [
{
"version": 1,
"columns": [
{
"name": "merch_term_id",
"datatype": "string",
"position": 1,
"isKey": true,
"keyPosition": 1
}
],
"creationTimeStamp": "2023-02-06T13:46:35.934Z",
"id": "ee8c7ec1-d343-4057-814f-c2ccb31a1c1f",
"name": "bad_merchant_terminal"
},
{
"version": 1,
"columns": [
{
"name": "aqo_acct_num",
"datatype": "string",
"position": 1,
"isKey": true,
"keyPosition": 1
},
{
"name": "reason",
"datatype": "string",
"position": 2
},
{
"name": "when",
"datatype": "string",
"position": 3
}
],
"creationTimeStamp": "2023-02-06T18:40:01.354Z",
"id": "7f3343b5-be79-41c2-bd1f-a7559e844731",
"name": "closedAccts"
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/projects/f31aaff1-6991-4e43-83be-3c9b62aa0b22/lists",
"uri": "/detectionDefinition/projects/f31aaff1-6991-4e43-83be-3c9b62aa0b22/lists",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.list"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/projects/f31aaff1-6991-4e43-83be-3c9b62aa0b22/lists?start=0&limit=100",
"uri": "/detectionDefinition/projects/f31aaff1-6991-4e43-83be-3c9b62aa0b22/lists?start=0&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.list"
}
]
}
An example of an error when retrieving project lists with an invalid project ID.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"fb684b41-89e4-4a65-8f86-e34a80927c232\" for the field \"projectId\" does not match the documented format.",
"details": [
"path: /detectionDefinition/projects/fb684b41-89e4-4a65-8f86-e34a80927c232/lists/",
"correlator: f446e31e-c808-4a14-ba62-f0451d590820"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | listCollection |
400 | Bad Request | A bad request with an existing resource. Possible reason: |
|
- The project ID is not valid. |
error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | Date and time of last modification. |
Deployments
The operations for deployments.
Get a Deployment
Code samples
# You can also use wget
curl -X GET http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/deployments/{deploymentId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/json'
const headers = {
'Accept':'application/json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/deployments/{deploymentId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/deployments/{deploymentId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/deployments/{deploymentId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /deployments/{deploymentId}
Returns details about a deployment.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
deploymentId | path | string | true | The UUID of the deployment. |
Example responses
An example of get deployment request content
{
"creationTimeStamp": "2022-12-19T21:09:06.680Z",
"createdBy": "susahu",
"modifiedTimeStamp": "2022-12-19T21:10:46.124Z",
"modifiedBy": "susahu",
"revision": 2,
"version": 1,
"id": "69c0cf00-c475-48da-9636-eda5f826a346",
"buildNumber": 51611,
"state": "completed",
"organizationId": "16495c0d-e31f-40ed-8eb2-98b20783bfab",
"publishId": "5fe42437-9300-4ed2-8a11-12f55c7b45a0",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/deployments/69c0cf00-c475-48da-9636-eda5f826a346",
"uri": "/detectionDefinition/deployments/69c0cf00-c475-48da-9636-eda5f826a346",
"type": "application/vnd.sas.detection.deployment"
}
]
}
{
"creationTimeStamp": "2022-12-19T21:09:06.680Z",
"createdBy": "susahu",
"modifiedTimeStamp": "2022-12-19T21:10:46.124Z",
"modifiedBy": "susahu",
"revision": 2,
"version": 1,
"id": "69c0cf00-c475-48da-9636-eda5f826a346",
"buildNumber": 51611,
"state": "completed",
"organizationId": "16495c0d-e31f-40ed-8eb2-98b20783bfab",
"publishId": "5fe42437-9300-4ed2-8a11-12f55c7b45a0",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/deployments/69c0cf00-c475-48da-9636-eda5f826a346",
"uri": "/detectionDefinition/deployments/69c0cf00-c475-48da-9636-eda5f826a346",
"type": "application/vnd.sas.detection.deployment"
}
]
}
Here is an example of an error when you retrieve a deployment with an invalid UUID.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 999999,
"message": "The field deploymentId value \"69c0cf00-c475-48da-9636-eda5f826a346X\" is not a valid ID.",
"details": [
"FieldName: deploymentId",
"FieldValue: 69c0cf00-c475-48da-9636-eda5f826a346X",
"messageID: detection-definition-api-icu.invalid.uuid.msg",
"path: /detectionDefinition/deployments/69c0cf00-c475-48da-9636-eda5f826a346X",
"correlator: 6644ea3e-d413-4295-a39f-337ad32aa4ef"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | deployment |
400 | Bad Request | A bad request. Possible reason or reasons: |
|
- The deployment ID may be invalid. |
error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | Date and time of last modification. |
Get model manifest for a Deployment
Code samples
# You can also use wget
curl -X GET http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/deployments/{deploymentId}/modelManifest \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/json'
const headers = {
'Accept':'application/json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/deployments/{deploymentId}/modelManifest',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/deployments/{deploymentId}/modelManifest', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/deployments/{deploymentId}/modelManifest", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /deployments/{deploymentId}/modelManifest
Returns details about a deployment.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
deploymentId | path | string | true | The UUID of the deployment. |
Example responses
An example of deployment manifest content
{
"creationTimeStamp": "1901-01-01T00:00:00.000Z",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"name": "d0e8a2d1-471c-442e-b93f-80dad39c312e",
"destination": {
"creationTimeStamp": "1901-01-01T00:00:00.000Z",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"name": "SDADockerRegistry"
},
"content": {
"creationTimeStamp": "1901-01-01T00:00:00.000Z",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"modelName": "detection_0110_1",
"code": "ds2 code here",
"codeType": "ds2"
},
"inputVariables": [
{
"name": "inputVarName"
}
],
"outputVariables": [
{
"name": "outputVarName"
}
],
"component": {},
"product": {},
"service": {},
"baseImage": {},
"description": "Manifest for deployment 50246",
"requirements": [
{
"name": "deploymentFraud",
"value": "fraud"
},
{
"name": "deploymentRedis",
"value": "hiredis"
},
{
"name": "deploymentKafka",
"value": "kafka"
}
]
}
{
"creationTimeStamp": "1901-01-01T00:00:00.000Z",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"name": "d0e8a2d1-471c-442e-b93f-80dad39c312e",
"destination": {
"creationTimeStamp": "1901-01-01T00:00:00.000Z",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"name": "SDADockerRegistry"
},
"content": {
"creationTimeStamp": "1901-01-01T00:00:00.000Z",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"modelName": "detection_0110_1",
"code": "ds2 code here",
"codeType": "ds2"
},
"inputVariables": [
{
"name": "inputVarName"
}
],
"outputVariables": [
{
"name": "outputVarName"
}
],
"component": {},
"product": {},
"service": {},
"baseImage": {},
"description": "Manifest for deployment 50246",
"requirements": [
{
"name": "deploymentFraud",
"value": "fraud"
},
{
"name": "deploymentRedis",
"value": "hiredis"
},
{
"name": "deploymentKafka",
"value": "kafka"
}
]
}
Here is an example of an error when you retrieve a deployment manifest with an invalid UUID.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 999999,
"message": "The field deploymentId value \"69c0cf00-c475-48da-9636-eda5f826a346X\" is not a valid ID.",
"details": [
"FieldName: deploymentId",
"FieldValue: 69c0cf00-c475-48da-9636-eda5f826a346X",
"messageID: detection-definition-api-icu.invalid.uuid.msg",
"path: /detectionDefinition/deployments/69c0cf00-c475-48da-9636-eda5f826a346X",
"correlator: 6644ea3e-d413-4295-a39f-337ad32aa4ef"
]
}
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 999999,
"message": "The field deploymentId value \"69c0cf00-c475-48da-9636-eda5f826a346X\" is not a valid ID.",
"details": [
"FieldName: deploymentId",
"FieldValue: 69c0cf00-c475-48da-9636-eda5f826a346X",
"messageID: detection-definition-api-icu.invalid.uuid.msg",
"path: /detectionDefinition/deployments/69c0cf00-c475-48da-9636-eda5f826a346X",
"correlator: 6644ea3e-d413-4295-a39f-337ad32aa4ef"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | modelManifest |
400 | Bad Request | Bad request. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | Date and time of last modification. |
Get Deployment Updates for organizations
Code samples
# You can also use wget
curl -X GET http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/deployments/updates \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/deployments/updates',
{
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('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/deployments/updates', 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", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/deployments/updates", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /deployments/updates
Returns updates since last deployment and current deployable candidates.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
organization | query | string | false | The UUID of the organization. |
filter | query | string(filter-criteria) | false | The filter criteria for returned resources. For more information, see Filtering in REST APIs. |
sortBy | query | string(sort-criteria) | false | Specifies the sorting for returned resources. For more information, see Sorting in REST APIs. |
Example responses
An example of get deployment update request content
{
"version": 2,
"accept": "application/vnd.sas.detection.deployment.package",
"count": 11,
"start": 0,
"limit": 11,
"name": "deployment updates",
"items": [
{
"id": "3edc056f-74d9-4033-963e-a38f571c0b9b",
"name": "AG_PC",
"displayName": "Bank AGPC",
"latestDeploymentId": "a20c25c7-3774-46a4-936f-51f1cff1324b",
"state": "completed",
"lastDeploymentTimeStamp": "2022-12-23T01:53:06.973Z",
"productionRules": [
{
"creationTimeStamp": "2022-12-21T19:38:16.924Z",
"createdBy": "susahu",
"modifiedTimeStamp": "2022-12-21T19:44:23.510Z",
"modifiedBy": "susahu",
"revision": 2,
"version": 1,
"id": "b568ce1f-f139-4a70-a5a4-1b886cda0078",
"name": "SS Auto Deploy Rule",
"baseRuleId": "50312",
"ruleVersion": 4,
"messageClassificationId": "e1166d1f-d6dc-11ec-b036-6631d4e9d21c",
"schemaName": "Payments",
"projectId": "416a94bb-3a33-4d85-ba0b-db62315ceaac",
"state": "Production",
"executionOrderType": 0,
"configuredOperationalState": "0",
"ruleTypeName": "decision",
"projectName": "SS Project 1",
"messageDisplayName": "R11 Payments Message",
"messageClassificationKeyCode": "AGA",
"messageClassificationDisplayName": "AG_PC",
"deployed": true,
"deployedTimeStamp": "2022-12-23T01:51:23.407Z"
},
{
"creationTimeStamp": "2022-12-21T19:38:22.021Z",
"createdBy": "susahu",
"modifiedTimeStamp": "2022-12-21T19:44:23.504Z",
"modifiedBy": "susahu",
"revision": 2,
"version": 1,
"id": "2d07a6ef-63f5-4e91-9069-25cb765e9d8c",
"name": "SS_AGPC_1",
"baseRuleId": "50353",
"ruleVersion": 6,
"messageClassificationId": "e1166d1f-d6dc-11ec-b036-6631d4e9d21c",
"schemaName": "Payments",
"projectId": "416a94bb-3a33-4d85-ba0b-db62315ceaac",
"state": "Production",
"executionOrderType": 0,
"configuredOperationalState": "0",
"ruleTypeName": "decision",
"projectName": "SS Project 1",
"messageDisplayName": "R11 Payments Message",
"messageClassificationKeyCode": "AGA",
"messageClassificationDisplayName": "AG_PC",
"deployed": true,
"deployedTimeStamp": "2022-12-23T01:51:23.860Z"
}
],
"testingRules": [
{
"creationTimeStamp": "2022-12-21T20:27:39.290Z",
"createdBy": "susahu",
"modifiedTimeStamp": "2022-12-21T20:27:55.509Z",
"modifiedBy": "susahu",
"revision": 1,
"version": 1,
"id": "ee571dfd-29ee-496b-b4ee-33074c9f02e5",
"name": "SS_AGPC_1",
"baseRuleId": "50353",
"ruleVersion": 7,
"messageClassificationId": "e1166d1f-d6dc-11ec-b036-6631d4e9d21c",
"schemaName": "Payments",
"projectId": "416a94bb-3a33-4d85-ba0b-db62315ceaac",
"state": "Testing",
"executionOrderType": 0,
"configuredOperationalState": "0",
"ruleTypeName": "decision",
"projectName": "SS Project 1",
"messageDisplayName": "R11 Payments Message",
"messageClassificationKeyCode": "AGA",
"messageClassificationDisplayName": "AG_PC",
"deployed": true,
"deployedTimeStamp": "2022-12-23T01:51:24.305Z"
},
{
"creationTimeStamp": "2022-12-12T20:54:09.959Z",
"createdBy": "susahu",
"modifiedTimeStamp": "2022-12-12T20:54:17.943Z",
"modifiedBy": "susahu",
"revision": 1,
"version": 1,
"id": "052b8918-e2e6-4893-b328-260cec2bbd05",
"name": "SS_AGPC_3",
"baseRuleId": "50357",
"ruleVersion": 1,
"messageClassificationId": "e1166d1f-d6dc-11ec-b036-6631d4e9d21c",
"schemaName": "Payments",
"projectId": "416a94bb-3a33-4d85-ba0b-db62315ceaac",
"state": "Testing",
"executionOrderType": 0,
"configuredOperationalState": "0",
"ruleTypeName": "decision",
"projectName": "SS Project 1",
"messageDisplayName": "R11 Payments Message",
"messageClassificationKeyCode": "AGA",
"messageClassificationDisplayName": "AG_PC",
"deployed": true,
"deployedTimeStamp": "2022-12-23T01:51:24.747Z"
},
{
"creationTimeStamp": "2022-12-13T00:13:18.821Z",
"createdBy": "susahu",
"modifiedTimeStamp": "2022-12-13T00:13:26.367Z",
"modifiedBy": "susahu",
"revision": 1,
"version": 1,
"id": "58b7f996-0dea-43b0-b7af-1b5d1b22152d",
"name": "SS_AGPC_4",
"baseRuleId": "50358",
"ruleVersion": 1,
"messageClassificationId": "e1166d1f-d6dc-11ec-b036-6631d4e9d21c",
"schemaName": "Payments",
"projectId": "416a94bb-3a33-4d85-ba0b-db62315ceaac",
"state": "Testing",
"executionOrderType": 0,
"configuredOperationalState": "0",
"ruleTypeName": "decision",
"projectName": "SS Project 1",
"messageDisplayName": "R11 Payments Message",
"messageClassificationKeyCode": "AGA",
"messageClassificationDisplayName": "AG_PC",
"deployed": true,
"deployedTimeStamp": "2022-12-23T01:51:25.187Z"
}
],
"canDeploy": true
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/deployments/updates",
"uri": "/detectionDefinition/deployments/updates",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.deployment.package"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/deployments/updates?start=0&limit=100",
"uri": "/detectionDefinition/deployments/updates?start=0&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.deployment.package"
}
]
}
{
"version": 2,
"accept": "application/vnd.sas.detection.deployment.package",
"count": 11,
"start": 0,
"limit": 11,
"name": "deployment updates",
"items": [
{
"id": "3edc056f-74d9-4033-963e-a38f571c0b9b",
"name": "AG_PC",
"displayName": "Bank AGPC",
"latestDeploymentId": "a20c25c7-3774-46a4-936f-51f1cff1324b",
"state": "completed",
"lastDeploymentTimeStamp": "2022-12-23T01:53:06.973Z",
"productionRules": [
{
"creationTimeStamp": "2022-12-21T19:38:16.924Z",
"createdBy": "susahu",
"modifiedTimeStamp": "2022-12-21T19:44:23.510Z",
"modifiedBy": "susahu",
"revision": 2,
"version": 1,
"id": "b568ce1f-f139-4a70-a5a4-1b886cda0078",
"name": "SS Auto Deploy Rule",
"baseRuleId": "50312",
"ruleVersion": 4,
"messageClassificationId": "e1166d1f-d6dc-11ec-b036-6631d4e9d21c",
"schemaName": "Payments",
"projectId": "416a94bb-3a33-4d85-ba0b-db62315ceaac",
"state": "Production",
"executionOrderType": 0,
"configuredOperationalState": "0",
"ruleTypeName": "decision",
"projectName": "SS Project 1",
"messageDisplayName": "R11 Payments Message",
"messageClassificationKeyCode": "AGA",
"messageClassificationDisplayName": "AG_PC",
"deployed": true,
"deployedTimeStamp": "2022-12-23T01:51:23.407Z"
},
{
"creationTimeStamp": "2022-12-21T19:38:22.021Z",
"createdBy": "susahu",
"modifiedTimeStamp": "2022-12-21T19:44:23.504Z",
"modifiedBy": "susahu",
"revision": 2,
"version": 1,
"id": "2d07a6ef-63f5-4e91-9069-25cb765e9d8c",
"name": "SS_AGPC_1",
"baseRuleId": "50353",
"ruleVersion": 6,
"messageClassificationId": "e1166d1f-d6dc-11ec-b036-6631d4e9d21c",
"schemaName": "Payments",
"projectId": "416a94bb-3a33-4d85-ba0b-db62315ceaac",
"state": "Production",
"executionOrderType": 0,
"configuredOperationalState": "0",
"ruleTypeName": "decision",
"projectName": "SS Project 1",
"messageDisplayName": "R11 Payments Message",
"messageClassificationKeyCode": "AGA",
"messageClassificationDisplayName": "AG_PC",
"deployed": true,
"deployedTimeStamp": "2022-12-23T01:51:23.860Z"
}
],
"testingRules": [
{
"creationTimeStamp": "2022-12-21T20:27:39.290Z",
"createdBy": "susahu",
"modifiedTimeStamp": "2022-12-21T20:27:55.509Z",
"modifiedBy": "susahu",
"revision": 1,
"version": 1,
"id": "ee571dfd-29ee-496b-b4ee-33074c9f02e5",
"name": "SS_AGPC_1",
"baseRuleId": "50353",
"ruleVersion": 7,
"messageClassificationId": "e1166d1f-d6dc-11ec-b036-6631d4e9d21c",
"schemaName": "Payments",
"projectId": "416a94bb-3a33-4d85-ba0b-db62315ceaac",
"state": "Testing",
"executionOrderType": 0,
"configuredOperationalState": "0",
"ruleTypeName": "decision",
"projectName": "SS Project 1",
"messageDisplayName": "R11 Payments Message",
"messageClassificationKeyCode": "AGA",
"messageClassificationDisplayName": "AG_PC",
"deployed": true,
"deployedTimeStamp": "2022-12-23T01:51:24.305Z"
},
{
"creationTimeStamp": "2022-12-12T20:54:09.959Z",
"createdBy": "susahu",
"modifiedTimeStamp": "2022-12-12T20:54:17.943Z",
"modifiedBy": "susahu",
"revision": 1,
"version": 1,
"id": "052b8918-e2e6-4893-b328-260cec2bbd05",
"name": "SS_AGPC_3",
"baseRuleId": "50357",
"ruleVersion": 1,
"messageClassificationId": "e1166d1f-d6dc-11ec-b036-6631d4e9d21c",
"schemaName": "Payments",
"projectId": "416a94bb-3a33-4d85-ba0b-db62315ceaac",
"state": "Testing",
"executionOrderType": 0,
"configuredOperationalState": "0",
"ruleTypeName": "decision",
"projectName": "SS Project 1",
"messageDisplayName": "R11 Payments Message",
"messageClassificationKeyCode": "AGA",
"messageClassificationDisplayName": "AG_PC",
"deployed": true,
"deployedTimeStamp": "2022-12-23T01:51:24.747Z"
},
{
"creationTimeStamp": "2022-12-13T00:13:18.821Z",
"createdBy": "susahu",
"modifiedTimeStamp": "2022-12-13T00:13:26.367Z",
"modifiedBy": "susahu",
"revision": 1,
"version": 1,
"id": "58b7f996-0dea-43b0-b7af-1b5d1b22152d",
"name": "SS_AGPC_4",
"baseRuleId": "50358",
"ruleVersion": 1,
"messageClassificationId": "e1166d1f-d6dc-11ec-b036-6631d4e9d21c",
"schemaName": "Payments",
"projectId": "416a94bb-3a33-4d85-ba0b-db62315ceaac",
"state": "Testing",
"executionOrderType": 0,
"configuredOperationalState": "0",
"ruleTypeName": "decision",
"projectName": "SS Project 1",
"messageDisplayName": "R11 Payments Message",
"messageClassificationKeyCode": "AGA",
"messageClassificationDisplayName": "AG_PC",
"deployed": true,
"deployedTimeStamp": "2022-12-23T01:51:25.187Z"
}
],
"canDeploy": true
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/deployments/updates",
"uri": "/detectionDefinition/deployments/updates",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.deployment.package"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/deployments/updates?start=0&limit=100",
"uri": "/detectionDefinition/deployments/updates?start=0&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.deployment.package"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | deploymentPackageCollection |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | Date and time of last modification. |
Get a List of Deployments for organization(s)
Code samples
# You can also use wget
curl -X GET http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/deployments \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/deployments',
{
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('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/deployments', 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", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/deployments", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /deployments
Returns a list of deployments.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
organization | query | string | false | The UUID of the organization. |
start | query | integer | false | The 0-based offset of the first resource to return. Defaults to 0. |
limit | query | integer | false | The maximum number of resources to return. Defaults to 100. |
filter | query | string(filter-criteria) | false | The filter criteria for returned resources. For more information, see Filtering in REST APIs. |
sortBy | query | string(sort-criteria) | false | Specifies the sorting for returned resources. For more information, see Sorting in REST APIs. |
Example responses
An example of get deployments request content
{
"version": 2,
"accept": "application/vnd.sas.detection.deployment",
"count": 2,
"start": 0,
"limit": 100,
"name": "deployments",
"items": [
{
"creationTimeStamp": "2022-07-19T17:29:38.803Z",
"createdBy": "sasboot",
"modifiedTimeStamp": "2022-07-19T17:29:38.803Z",
"modifiedBy": "sasboot",
"revision": 0,
"version": 1,
"id": "af075bde-f1b4-4853-9f41-4bc188b6b37c",
"buildNumber": 50351,
"organizationId": "dfc5ba23-85d4-41e8-b347-3eb94e767dbe"
},
{
"creationTimeStamp": "2022-07-26T02:31:09.751Z",
"createdBy": "sasboot",
"modifiedTimeStamp": "2022-07-26T02:31:09.751Z",
"modifiedBy": "sasboot",
"revision": 0,
"version": 1,
"id": "c69bcd8a-58f1-47ab-b5df-e3394084a4da",
"buildNumber": 50436,
"organizationId": "6157e6c4-0de6-4901-b69f-6348905d4c7c"
}
]
}
{
"version": 2,
"accept": "application/vnd.sas.detection.deployment",
"count": 2,
"start": 0,
"limit": 100,
"name": "deployments",
"items": [
{
"creationTimeStamp": "2022-07-19T17:29:38.803Z",
"createdBy": "sasboot",
"modifiedTimeStamp": "2022-07-19T17:29:38.803Z",
"modifiedBy": "sasboot",
"revision": 0,
"version": 1,
"id": "af075bde-f1b4-4853-9f41-4bc188b6b37c",
"buildNumber": 50351,
"organizationId": "dfc5ba23-85d4-41e8-b347-3eb94e767dbe"
},
{
"creationTimeStamp": "2022-07-26T02:31:09.751Z",
"createdBy": "sasboot",
"modifiedTimeStamp": "2022-07-26T02:31:09.751Z",
"modifiedBy": "sasboot",
"revision": 0,
"version": 1,
"id": "c69bcd8a-58f1-47ab-b5df-e3394084a4da",
"buildNumber": 50436,
"organizationId": "6157e6c4-0de6-4901-b69f-6348905d4c7c"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | deploymentCollection |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | Date and time of last modification. |
Create a Deployment
Code samples
# You can also use wget
curl -X POST http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/deployments \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.detection.deployment+json'
const headers = {
'Accept':'application/vnd.sas.detection.deployment+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/deployments',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.detection.deployment+json'
}
r = requests.post('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/deployments', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.detection.deployment+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/deployments", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /deployments
Deploys the specified organization's detection rules and models.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
organization | query | string | false | The UUID of the organization. |
Example responses
Example response from a create deployment request.
{
"creationTimeStamp": "2022-12-23T01:51:22.137Z",
"createdBy": "susahu",
"modifiedTimeStamp": "2022-12-23T01:51:22.137Z",
"modifiedBy": "susahu",
"revision": 0,
"version": 1,
"id": "30203c42-b70f-4a32-b843-1c9798356204",
"buildNumber": 51627,
"state": "publishing",
"organizationId": "3edc056f-74d9-4033-963e-a38f571c0b9b",
"publishId": "15d83d9e-fc25-447f-909f-2c14e93d8db5",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/deployments/30203c42-b70f-4a32-b843-1c9798356204",
"uri": "/detectionDefinition/deployments/30203c42-b70f-4a32-b843-1c9798356204",
"type": "application/vnd.sas.detection.deployment"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/deployments/30203c42-b70f-4a32-b843-1c9798356204",
"uri": "/detectionDefinition/deployments/30203c42-b70f-4a32-b843-1c9798356204",
"type": "application/vnd.sas.detection.deployment"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/deployments/30203c42-b70f-4a32-b843-1c9798356204",
"uri": "/detectionDefinition/deployments/30203c42-b70f-4a32-b843-1c9798356204"
}
]
}
{
"creationTimeStamp": "2022-12-23T01:51:22.137Z",
"createdBy": "susahu",
"modifiedTimeStamp": "2022-12-23T01:51:22.137Z",
"modifiedBy": "susahu",
"revision": 0,
"version": 1,
"id": "30203c42-b70f-4a32-b843-1c9798356204",
"buildNumber": 51627,
"state": "publishing",
"organizationId": "3edc056f-74d9-4033-963e-a38f571c0b9b",
"publishId": "15d83d9e-fc25-447f-909f-2c14e93d8db5",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/deployments/30203c42-b70f-4a32-b843-1c9798356204",
"uri": "/detectionDefinition/deployments/30203c42-b70f-4a32-b843-1c9798356204",
"type": "application/vnd.sas.detection.deployment"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/deployments/30203c42-b70f-4a32-b843-1c9798356204",
"uri": "/detectionDefinition/deployments/30203c42-b70f-4a32-b843-1c9798356204",
"type": "application/vnd.sas.detection.deployment"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/deployments/30203c42-b70f-4a32-b843-1c9798356204",
"uri": "/detectionDefinition/deployments/30203c42-b70f-4a32-b843-1c9798356204"
}
]
}
Example 422 error response when create deployment request initiated for an invalid organization.
{
"version": 2,
"httpStatusCode": 422,
"errorCode": 1000014,
"message": "The object failed to be created.",
"details": [
"messageID: detection-definition-api-icu.failed.to.create.msg",
"path: /detectionDefinition/deployments",
"correlator: 28efc350-23c0-4840-89c9-e6b685a7687d"
],
"errors": [
{
"version": 2,
"httpStatusCode": 403,
"errorCode": 1000012,
"message": "No permissions to access resource.",
"details": [
"messageID: detection-definition-api-icu.forbidden.msg",
"id: 3edc056f-74d9-4033-963e-a38f571c0b9c"
]
}
]
}
{
"version": 2,
"httpStatusCode": 422,
"errorCode": 1000014,
"message": "The object failed to be created.",
"details": [
"messageID: detection-definition-api-icu.failed.to.create.msg",
"path: /detectionDefinition/deployments",
"correlator: 28efc350-23c0-4840-89c9-e6b685a7687d"
],
"errors": [
{
"version": 2,
"httpStatusCode": 403,
"errorCode": 1000012,
"message": "No permissions to access resource.",
"details": [
"messageID: detection-definition-api-icu.forbidden.msg",
"id: 3edc056f-74d9-4033-963e-a38f571c0b9c"
]
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | The deployment succeeded. | deployment |
422 | Unprocessable Entity | The request cannot be processed even though it is a valid request. Possible Reason(s): |
|
- The Organizaton does not have a message definition associated to it |
error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Last-Modified | string | Date and time of last modification. | |
201 | Location | string | Location of URI for the endpoint. | |
422 | Location | string | Location of URI for the endpoint. |
Deployment Definitions
The operations for deployment definitions.
Get Deployment Definitions for an organization
Code samples
# You can also use wget
curl -X GET http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/deploymentDefinitions?organization=string \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/json'
const headers = {
'Accept':'application/json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/deploymentDefinitions?organization=string',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/deploymentDefinitions', params={
'organization': 'string'
}, headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/deploymentDefinitions", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /deploymentDefinitions
Returns deployment definitions for an Organization.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
organization | query | string | true | The UUID of the organization. |
Example responses
Example of response body content of deployment definition for an organization request.
{
"creationTimeStamp": "2022-10-04T16:35:43.290Z",
"createdBy": "susahu",
"modifiedTimeStamp": "2022-10-04T16:35:43.290Z",
"modifiedBy": "susahu",
"revision": 0,
"version": 1,
"organizationId": "16495c0d-e31f-40ed-8eb2-98b20783bfab",
"detectionURL": "http://susahu.ingress-nginx.sda-scr-m1.vch.sashq-d.openstack.sas.com",
"deployTestingRules": true,
"expiresAfter": 14,
"destination": "SDADockerRegistry",
"maxMessageLength": 62000,
"autoDeployment": false,
"autoDeploymentDelayInSeconds": 20,
"restartDetectionService": false,
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/deploymentDefinitions",
"uri": "/detectionDefinition/deploymentDefinitions",
"type": "application/vnd.sas.detection.deployment.definition"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/deploymentDefinitions",
"uri": "/detectionDefinition/deploymentDefinitions",
"type": "application/vnd.sas.detection.deployment.definition"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/deploymentDefinitions",
"uri": "/detectionDefinition/deploymentDefinitions"
}
]
}
{
"creationTimeStamp": "2022-10-04T16:35:43.290Z",
"createdBy": "susahu",
"modifiedTimeStamp": "2022-10-04T16:35:43.290Z",
"modifiedBy": "susahu",
"revision": 0,
"version": 1,
"organizationId": "16495c0d-e31f-40ed-8eb2-98b20783bfab",
"detectionURL": "http://susahu.ingress-nginx.sda-scr-m1.vch.sashq-d.openstack.sas.com",
"deployTestingRules": true,
"expiresAfter": 14,
"destination": "SDADockerRegistry",
"maxMessageLength": 62000,
"autoDeployment": false,
"autoDeploymentDelayInSeconds": 20,
"restartDetectionService": false,
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/deploymentDefinitions",
"uri": "/detectionDefinition/deploymentDefinitions",
"type": "application/vnd.sas.detection.deployment.definition"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/deploymentDefinitions",
"uri": "/detectionDefinition/deploymentDefinitions",
"type": "application/vnd.sas.detection.deployment.definition"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/deploymentDefinitions",
"uri": "/detectionDefinition/deploymentDefinitions"
}
]
}
Here is an example of an error when you retrieve a deployment definition with invalid query parameter.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000011,
"message": "The input query parameters are invalid",
"details": [
"messageID: detection-definition-api-icu.invalid.query.params.msg",
"path: /detectionDefinition/deploymentDefinitions",
"correlator: f2ab8ce4-60cf-4583-bbd0-19a38e59208c"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | deploymentDefinition |
400 | Bad Request | Bad request | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | Date and time of last modification. |
Creates Deployment Definitions
Code samples
# You can also use wget
curl -X POST http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/deploymentDefinitions?organization=string \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.sas.detection.deployment.definition+json'
const inputBody = '{
"creationTimeStamp": "2022-12-21T00:42:57.443Z",
"createdBy": "susahu",
"modifiedTimeStamp": "2022-12-21T00:42:57.443Z",
"modifiedBy": "susahu",
"revision": 0,
"version": 1,
"organizationId": "ad08c1bd-e087-41a8-a1b9-a4a25ec4969b",
"detectionURL": "http://susahu.ingress-nginx.sda-scr-m1.vch.sashq-d.openstack.sas.com",
"deployTestingRules": true,
"expiresAfter": 14,
"destination": "SDADockerRegistry",
"tdrTopic": "tdr-susahu",
"restartDetectionService": true,
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/deploymentDefinitions",
"uri": "/detectionDefinition/deploymentDefinitions",
"type": "application/vnd.sas.detection.deployment.definition"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/deploymentDefinitions",
"uri": "/detectionDefinition/deploymentDefinitions",
"type": "application/vnd.sas.detection.deployment.definition"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/deploymentDefinitions",
"uri": "/detectionDefinition/deploymentDefinitions"
}
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/vnd.sas.detection.deployment.definition+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/deploymentDefinitions?organization=string',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/vnd.sas.detection.deployment.definition+json'
}
r = requests.post('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/deploymentDefinitions', params={
'organization': 'string'
}, headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/vnd.sas.detection.deployment.definition+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/deploymentDefinitions", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /deploymentDefinitions
Creates various definition related to deployment.
Body parameter
Example response from a create deployment definition request.
{
"creationTimeStamp": "2022-12-21T00:42:57.443Z",
"createdBy": "susahu",
"modifiedTimeStamp": "2022-12-21T00:42:57.443Z",
"modifiedBy": "susahu",
"revision": 0,
"version": 1,
"organizationId": "ad08c1bd-e087-41a8-a1b9-a4a25ec4969b",
"detectionURL": "http://susahu.ingress-nginx.sda-scr-m1.vch.sashq-d.openstack.sas.com",
"deployTestingRules": true,
"expiresAfter": 14,
"destination": "SDADockerRegistry",
"tdrTopic": "tdr-susahu",
"restartDetectionService": true,
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/deploymentDefinitions",
"uri": "/detectionDefinition/deploymentDefinitions",
"type": "application/vnd.sas.detection.deployment.definition"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/deploymentDefinitions",
"uri": "/detectionDefinition/deploymentDefinitions",
"type": "application/vnd.sas.detection.deployment.definition"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/deploymentDefinitions",
"uri": "/detectionDefinition/deploymentDefinitions"
}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | deploymentDefinition | false | The deployment definitions to be created. |
organization | query | string | true | The UUID of the organization. |
Example responses
Example response from a create deployment definition request.
{
"creationTimeStamp": "2022-12-21T00:42:57.443Z",
"createdBy": "susahu",
"modifiedTimeStamp": "2022-12-21T00:42:57.443Z",
"modifiedBy": "susahu",
"revision": 0,
"version": 1,
"organizationId": "ad08c1bd-e087-41a8-a1b9-a4a25ec4969b",
"detectionURL": "http://susahu.ingress-nginx.sda-scr-m1.vch.sashq-d.openstack.sas.com",
"deployTestingRules": true,
"expiresAfter": 14,
"destination": "SDADockerRegistry",
"tdrTopic": "tdr-susahu",
"restartDetectionService": true,
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/deploymentDefinitions",
"uri": "/detectionDefinition/deploymentDefinitions",
"type": "application/vnd.sas.detection.deployment.definition"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/deploymentDefinitions",
"uri": "/detectionDefinition/deploymentDefinitions",
"type": "application/vnd.sas.detection.deployment.definition"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/deploymentDefinitions",
"uri": "/detectionDefinition/deploymentDefinitions"
}
]
}
{
"creationTimeStamp": "2022-12-21T00:42:57.443Z",
"createdBy": "susahu",
"modifiedTimeStamp": "2022-12-21T00:42:57.443Z",
"modifiedBy": "susahu",
"revision": 0,
"version": 1,
"organizationId": "ad08c1bd-e087-41a8-a1b9-a4a25ec4969b",
"detectionURL": "http://susahu.ingress-nginx.sda-scr-m1.vch.sashq-d.openstack.sas.com",
"deployTestingRules": true,
"expiresAfter": 14,
"destination": "SDADockerRegistry",
"tdrTopic": "tdr-susahu",
"restartDetectionService": true,
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/deploymentDefinitions",
"uri": "/detectionDefinition/deploymentDefinitions",
"type": "application/vnd.sas.detection.deployment.definition"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/deploymentDefinitions",
"uri": "/detectionDefinition/deploymentDefinitions",
"type": "application/vnd.sas.detection.deployment.definition"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/deploymentDefinitions",
"uri": "/detectionDefinition/deploymentDefinitions"
}
]
}
Example 400 error response when invalid parameters are passed, for example missing organization Id.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000011,
"message": "The input query parameters are invalid",
"details": [
"messageID: detection-definition-api-icu.invalid.query.params.msg",
"path: /detectionDefinition/deploymentDefinitions",
"correlator: fc76ba0c-f192-436c-ad92-e93dd1d5988b"
]
}
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000011,
"message": "The input query parameters are invalid",
"details": [
"messageID: detection-definition-api-icu.invalid.query.params.msg",
"path: /detectionDefinition/deploymentDefinitions",
"correlator: fc76ba0c-f192-436c-ad92-e93dd1d5988b"
]
}
Example 409 error response when deployment definition already exists for the organization.
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000017,
"message": "Deployment definition already exists for \"ad08c1bd-e087-41a8-a1b9-a4a25ec4969b\".",
"details": [
"OrgId: ad08c1bd-e087-41a8-a1b9-a4a25ec4969b",
"messageID: detection-definition-api-icu.deployment.definition.already.exists.msg",
"path: /detectionDefinition/deploymentDefinitions",
"correlator: 7c890231-d5b6-4360-a961-6da37e9cc225"
]
}
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000017,
"message": "Deployment definition already exists for \"ad08c1bd-e087-41a8-a1b9-a4a25ec4969b\".",
"details": [
"OrgId: ad08c1bd-e087-41a8-a1b9-a4a25ec4969b",
"messageID: detection-definition-api-icu.deployment.definition.already.exists.msg",
"path: /detectionDefinition/deploymentDefinitions",
"correlator: 7c890231-d5b6-4360-a961-6da37e9cc225"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Created | deploymentDefinition |
400 | Bad Request | The request was invalid (for example, invalid data or an invalid structure in the request body). | error2 |
409 | Conflict | There is a conflict with an existing resource. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Etag | string | An hash-code for the response resource. | |
201 | Last-Modified | string | Date and time of last modification. | |
201 | Location | string | Location of URI for the endpoint. |
Partial update to deployment definitions for an organization
Code samples
# You can also use wget
curl -X PATCH http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/deploymentDefinitions?organization=string \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.detection.deployment.definition+json' \
-H 'Accept: application/vnd.sas.detection.deployment.definition+json'
const inputBody = '{
"detectionURL": "http://susahu.ingress-nginx.sda-scr-m1.vch.sashq-d.openstack.sas.com",
"deployTestingRules": false,
"expiresAfter": 14
}';
const headers = {
'Content-Type':'application/vnd.sas.detection.deployment.definition+json',
'Accept':'application/vnd.sas.detection.deployment.definition+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/deploymentDefinitions?organization=string',
{
method: 'PATCH',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.detection.deployment.definition+json',
'Accept': 'application/vnd.sas.detection.deployment.definition+json'
}
r = requests.patch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/deploymentDefinitions', params={
'organization': 'string'
}, headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.detection.deployment.definition+json"},
"Accept": []string{"application/vnd.sas.detection.deployment.definition+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PATCH", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/deploymentDefinitions", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PATCH /deploymentDefinitions
Updates deployment definitions for an organization. This will replace prior definitions.
Body parameter
An example of deployment definition update request content
{
"detectionURL": "http://susahu.ingress-nginx.sda-scr-m1.vch.sashq-d.openstack.sas.com",
"deployTestingRules": false,
"expiresAfter": 14
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | deploymentDefinition | false | none |
organization | query | string | true | The UUID of the organization. |
Example responses
An example of deployment definition update request content
{
"detectionURL": "http://susahu.ingress-nginx.sda-scr-m1.vch.sashq-d.openstack.sas.com",
"deployTestingRules": false,
"expiresAfter": 14
}
{
"detectionURL": "http://susahu.ingress-nginx.sda-scr-m1.vch.sashq-d.openstack.sas.com",
"deployTestingRules": false,
"expiresAfter": 14
}
An example error 400 response when the 'expiresAfter' property value is not valid.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000004,
"message": "The specified request body cannot be parsed.",
"details": [
"Type: DeploymentDefinition",
"messageID: detection-definition-api-icu.request.body.msg",
"Method: PATCH",
"path: /detectionDefinition/deploymentDefinitions",
"correlator: eec1984f-4235-4a34-87bc-77c5a67c992f"
],
"errors": [
{
"version": 2,
"httpStatusCode": 500,
"message": "json: cannot unmarshal string into Go struct field DeploymentDefinitionRep.expiresAfter of type int"
}
]
}
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000004,
"message": "The specified request body cannot be parsed.",
"details": [
"Type: DeploymentDefinition",
"messageID: detection-definition-api-icu.request.body.msg",
"Method: PATCH",
"path: /detectionDefinition/deploymentDefinitions",
"correlator: eec1984f-4235-4a34-87bc-77c5a67c992f"
],
"errors": [
{
"version": 2,
"httpStatusCode": 500,
"message": "json: cannot unmarshal string into Go struct field DeploymentDefinitionRep.expiresAfter of type int"
}
]
}
An example 412 error response when the request 'If-Match' header is not valid.
{
"version": 2,
"httpStatusCode": 412,
"errorCode": 1000000,
"message": "The object has been updated since you last retrieved it.",
"details": [
"messageID: detection-definition-api-icu.etag.mismatch.msg",
"path: /detectionDefinition/deploymentDefinitions",
"correlator: 3acfbbe1-6a64-4084-8af2-a7d820f84d57"
]
}
{
"version": 2,
"httpStatusCode": 412,
"errorCode": 1000000,
"message": "The object has been updated since you last retrieved it.",
"details": [
"messageID: detection-definition-api-icu.etag.mismatch.msg",
"path: /detectionDefinition/deploymentDefinitions",
"correlator: 3acfbbe1-6a64-4084-8af2-a7d820f84d57"
]
}
Example of an error when you request to update deployment definition that does not exist.
{
"version": 2,
"httpStatusCode": 422,
"errorCode": 1000015,
"message": "Deployment definition does not exist for \"3edc056f-74d9-4033-963e-a38f571c0b9c\".",
"details": [
"OrgId: 3edc056f-74d9-4033-963e-a38f571c0b9c",
"messageID: detection-definition-api-icu.deployment.definition.does.not.exist.msg",
"path: /detectionDefinition/deploymentDefinitions",
"correlator: 0957442b-59cb-4da4-8f3a-a1101cb14837"
]
}
{
"version": 2,
"httpStatusCode": 422,
"errorCode": 1000015,
"message": "Deployment definition does not exist for \"3edc056f-74d9-4033-963e-a38f571c0b9c\".",
"details": [
"OrgId: 3edc056f-74d9-4033-963e-a38f571c0b9c",
"messageID: detection-definition-api-icu.deployment.definition.does.not.exist.msg",
"path: /detectionDefinition/deploymentDefinitions",
"correlator: 0957442b-59cb-4da4-8f3a-a1101cb14837"
]
}
An example 428 error response when the request does not include the conditional update 'If-Match' header.
{
"version": 2,
"httpStatusCode": 428,
"errorCode": 1000021,
"message": "Conditional match header is missing.",
"details": [
"messageID: detection-lib-api-icu.ifMatch.missing.msg",
"path: /detectionDefinition/deploymentDefinitions",
"correlator: e1716f5b-b88c-43ae-9c8c-bf003e0c2359"
]
}
{
"version": 2,
"httpStatusCode": 428,
"errorCode": 1000021,
"message": "Conditional match header is missing.",
"details": [
"messageID: detection-lib-api-icu.ifMatch.missing.msg",
"path: /detectionDefinition/deploymentDefinitions",
"correlator: e1716f5b-b88c-43ae-9c8c-bf003e0c2359"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successfully updated the deployment definitions | deploymentDefinition |
400 | Bad Request | The request was invalid | error2 |
412 | Precondition Failed | The supplied pre-condition was not satisfactory, typically indicating stale data. | error2 |
422 | Unprocessable Entity | The request cannot be processed even though it is a valid request. | error2 |
428 | Precondition Required | A required pre-condition (If-Match/If-Unmodified-Since) was not provided. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Etag | string | An hash-code for the response resource. | |
200 | Last-Modified | string | Date and time of last modification. | |
200 | Location | string | Location of URI for the endpoint. | |
412 | Location | string | Location of URI for the endpoint. | |
422 | Location | string | Location of URI for the endpoint. | |
428 | Location | string | Location of URI for the endpoint. |
Delete deployment definitions for an organization
Code samples
# You can also use wget
curl -X DELETE http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/deploymentDefinitions?organization=string \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.error+json'
const headers = {
'Accept':'application/vnd.sas.error+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/deploymentDefinitions?organization=string',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.error+json'
}
r = requests.delete('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/deploymentDefinitions', params={
'organization': 'string'
}, headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.error+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/deploymentDefinitions", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /deploymentDefinitions
Deletes all deployment definitions for an organization.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
organization | query | string | true | The UUID of the organization. |
Example responses
Here is an example of an error when you try to delete deployment definition with invalid query parameter.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000011,
"message": "The input query parameters are invalid",
"details": [
"messageID: detection-definition-api-icu.invalid.query.params.msg",
"path: /detectionDefinition/deploymentDefinitions",
"correlator: f2ab8ce4-60cf-4583-bbd0-19a38e59208c"
]
}
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000011,
"message": "The input query parameters are invalid",
"details": [
"messageID: detection-definition-api-icu.invalid.query.params.msg",
"path: /detectionDefinition/deploymentDefinitions",
"correlator: f2ab8ce4-60cf-4583-bbd0-19a38e59208c"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | Deleted | None |
400 | Bad Request | The request was invalid (for example, invalid data or invalid structure in the request body). | error2 |
Roles And Users
The operations for roles, users, and capabilities of detection definition service.
Get a List of Roles of the Detection Definition Service
Code samples
# You can also use wget
curl -X GET http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/roles \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/roles',
{
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('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/roles', 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", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/roles", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /roles
Returns the list of roles of the detection definition service. If an orgId is specified, then the list contains the roles that are associated with the specified organization. For more information about filterable and sortable fields of groups, see the SAS identity service API.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
orgId | query | string | false | The UUID of an organization. |
start | query | integer | false | The 0-based offset of the first resource to return. Defaults to 0. |
limit | query | integer | false | The maximum number of resources to return. Defaults to 100. |
filter | query | string(filter-criteria) | false | The filter criteria for returned resources. For more information, see Filtering in REST APIs. |
sortBy | query | string(sort-criteria) | false | Specifies the sorting for returned resources. For more information, see Sorting in REST APIs. |
Example responses
Here is an example of a list of SAS Detection Definition default roles.
{
"version": 2,
"accept": "application/vnd.sas.identity.group",
"count": 3,
"start": 0,
"limit": 100,
"name": "roles",
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/roles",
"uri": "/detectionDefinition/roles",
"type": "application/vnd.sas.collection",
"itemType": "roles"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/roles?start=0&limit=100",
"uri": "/detectionDefinition/roles?start=0&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "roles"
}
],
"items": [
{
"version": 1,
"id": "SDARulesEditor",
"name": "SDARulesEditor",
"description": "Rules Editor",
"providerId": "local",
"creationTimeStamp": "2022-03-29T23:57:23.242Z",
"modifiedTimeStamp": "2022-06-29T12:26:34.479Z",
"state": "active",
"members": [
{
"version": 1,
"id": "user1",
"name": "User 1",
"type": "user",
"providerId": "ldap"
}
]
},
{
"version": 1,
"id": "SDASrRulesEditor",
"name": "SDASrRulesEditor",
"description": "Senior Rules Editor",
"providerId": "local",
"creationTimeStamp": "2022-03-29T23:57:24.082Z",
"modifiedTimeStamp": "2022-06-29T12:26:34.041Z",
"state": "active",
"members": [
{
"version": 1,
"id": "user1",
"name": "User 1",
"type": "user",
"providerId": "ldap"
}
]
},
{
"version": 1,
"id": "SDASystemAdmin",
"name": "SDASystemAdmin",
"description": "System Administrator",
"providerId": "local",
"creationTimeStamp": "2022-03-29T23:57:23.074Z",
"modifiedTimeStamp": "2022-06-29T12:26:34.788Z",
"state": "active",
"members": [
{
"version": 1,
"id": "user1",
"name": "User 1",
"type": "user",
"providerId": "ldap"
}
]
}
]
}
{
"version": 2,
"accept": "application/vnd.sas.identity.group",
"count": 3,
"start": 0,
"limit": 100,
"name": "roles",
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/roles",
"uri": "/detectionDefinition/roles",
"type": "application/vnd.sas.collection",
"itemType": "roles"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/roles?start=0&limit=100",
"uri": "/detectionDefinition/roles?start=0&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "roles"
}
],
"items": [
{
"version": 1,
"id": "SDARulesEditor",
"name": "SDARulesEditor",
"description": "Rules Editor",
"providerId": "local",
"creationTimeStamp": "2022-03-29T23:57:23.242Z",
"modifiedTimeStamp": "2022-06-29T12:26:34.479Z",
"state": "active",
"members": [
{
"version": 1,
"id": "user1",
"name": "User 1",
"type": "user",
"providerId": "ldap"
}
]
},
{
"version": 1,
"id": "SDASrRulesEditor",
"name": "SDASrRulesEditor",
"description": "Senior Rules Editor",
"providerId": "local",
"creationTimeStamp": "2022-03-29T23:57:24.082Z",
"modifiedTimeStamp": "2022-06-29T12:26:34.041Z",
"state": "active",
"members": [
{
"version": 1,
"id": "user1",
"name": "User 1",
"type": "user",
"providerId": "ldap"
}
]
},
{
"version": 1,
"id": "SDASystemAdmin",
"name": "SDASystemAdmin",
"description": "System Administrator",
"providerId": "local",
"creationTimeStamp": "2022-03-29T23:57:23.074Z",
"modifiedTimeStamp": "2022-06-29T12:26:34.788Z",
"state": "active",
"members": [
{
"version": 1,
"id": "user1",
"name": "User 1",
"type": "user",
"providerId": "ldap"
}
]
}
]
}
Here is an example of an error when you query roles with an invalid field name in the sortBy or filter parameter.
{
"version": 2,
"httpStatusCode": 422,
"errorCode": 1000016,
"message": "The object failed to be queried.",
"details": [
"Type: Message",
"messageID: detection-definition-api-icu.failed.to.query.msg",
"path: /detectionDefinition/roles",
"correlator: ffb4af7c-3519-4c68-b8c4-f9feeed010ae"
],
"errors": [
{}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | roleCollection |
422 | Unprocessable Entity | The request cannot be processed. | error2 |
Get a List of Users of the Detection Definition Service
Code samples
# You can also use wget
curl -X GET http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/users \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/users',
{
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('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/users', 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", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/users", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /users
Returns a list of users of the detection definition service. If an orgId is specified, then the list contains users of the roles that are associated with the organization. Valid users are direct members of the role of detection definition service. For more information about filterable and sortable fields, see the SAS identity service API.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
orgId | query | string | false | The UUID of an organization. |
start | query | integer | false | The 0-based offset of the first resource to return. Defaults to 0. |
limit | query | integer | false | The maximum number of resources to return. Defaults to 100. |
filter | query | string(filter-criteria) | false | The filter criteria for returned resources. For more information, see Filtering in REST APIs. |
sortBy | query | string(sort-criteria) | false | Specifies the sorting for returned resources. For more information, see Sorting in REST APIs. |
Example responses
Here is an example of a list of SAS Detection Definition users of an organization.
{
"version": 2,
"accept": "application/vnd.sas.identity.user",
"count": 1,
"start": 0,
"limit": 50,
"name": "users",
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/users",
"uri": "/detectionDefinition/users",
"type": "application/vnd.sas.collection",
"itemType": "users"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/users?start=0&limit=50&orgId=0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8",
"uri": "/detectionDefinition/users?start=0&limit=50&orgId=0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8",
"type": "application/vnd.sas.collection",
"itemType": "users"
}
],
"items": [
{
"version": 1,
"id": "user1",
"name": "User 1",
"providerId": "ldap",
"creationTimeStamp": "2003-03-05T19:16:22.000Z",
"modifiedTimeStamp": "2022-10-23T02:17:30.000Z",
"state": "active",
"title": "",
"uid": 0,
"gid": 0,
"memberOf": [
{
"version": 1,
"id": "SDASystemAdmin",
"name": "SDASystemAdmin",
"type": "group",
"providerId": "local"
}
]
}
]
}
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": [
{
"id": "string",
"name": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"provideId": "string",
"title": "string",
"state": "string",
"version": 0,
"memberOf": [
{
"id": "string",
"name": "string",
"type": "user",
"provideId": "string",
"version": 0,
"members": [
null
]
}
]
}
]
}
Here is an example of an error when you query users with an invalid field name in the sortBy or filter parameter.
{
"version": 2,
"httpStatusCode": 422,
"errorCode": 1000016,
"message": "The object failed to be queried.",
"details": [
"Type: Message",
"messageID: detection-definition-api-icu.failed.to.query.msg",
"path: /detectionDefinition/users",
"correlator: a6c9909e-190f-4eb4-9438-0e6606aa1b9a"
],
"errors": [
{}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | userCollection |
422 | Unprocessable Entity | The request cannot be processed. | error2 |
Get the Capabilities
Code samples
# You can also use wget
curl -X GET http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/capabilities \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/capabilities',
{
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('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/capabilities', 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", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/capabilities", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /capabilities
Returns your capabilities of the detection definition service. If you specify an orgId, then the list contains your capabilities for the roles that are associated with the organization. If you are a SAS Administrator, then you can also retrieve the list of capabilities defined in SAS Detection Architecture or the capabilities of a role.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
orgId | query | string | false | The UUID of an organization. |
roleId | query | string | false | The identifier of a role. It is applicable only if the current user is a SAS Administrator. If the roleId parameter is set, then the orgId is ignored. |
system | query | string | false | Indicates to return the list of capabilities of SAS Detection Architecture. It is applicable only if the current user is a SAS Administrator. If the system parameter is specified, then both the roleId and orgId are ignored. |
Example responses
An example of current user's capabilities
{
"accept": "application/vnd.sas.detection.capability.summary",
"count": 4,
"start": 0,
"limit": 4,
"name": "capabilitySummaries",
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/capabilities",
"uri": "/detectionDefinition/capabilities",
"type": "application/vnd.sas.collection",
"itemType": "capabilitySummaries"
}
],
"items": [
{
"name": "sda.rules.enableDisable",
"description": "Disable/Enable Rules",
"scope": "organization"
},
{
"name": "sda.rules.promote",
"description": "Promote Rules Without Review",
"scope": "project"
},
{
"name": "sda.rules.update",
"description": "Add and Modify Rules",
"scope": "project"
},
{
"name": "sda.rules.view",
"description": "View Rules",
"scope": "project"
}
]
}
{
"accept": "application/vnd.sas.detection.capability.summary",
"count": 4,
"start": 0,
"limit": 4,
"name": "capabilitySummaries",
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/capabilities",
"uri": "/detectionDefinition/capabilities",
"type": "application/vnd.sas.collection",
"itemType": "capabilitySummaries"
}
],
"items": [
{
"name": "sda.rules.enableDisable",
"description": "Disable/Enable Rules",
"scope": "organization"
},
{
"name": "sda.rules.promote",
"description": "Promote Rules Without Review",
"scope": "project"
},
{
"name": "sda.rules.update",
"description": "Add and Modify Rules",
"scope": "project"
},
{
"name": "sda.rules.view",
"description": "View Rules",
"scope": "project"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | capabilitySummaryCollection |
Check One or a Combination of Capabilities of the Current User
Code samples
# You can also use wget
curl -X GET http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/capabilities/granted?criteria=string \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/json'
const headers = {
'Accept':'application/json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/capabilities/granted?criteria=string',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/capabilities/granted', params={
'criteria': 'string'
}, headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/capabilities/granted", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /capabilities/granted
Checks whether the current user has been granted capabilities within the service. Specify the capabilities to be checked with the criteria parameter. A single capability can be checked or you can specify a combination of capabilities to check (for example, AND(sda.projects.view, sda.rules.view)). Returns true if the current user has the capabilities, or and false if they do not. Some capabilities are granted at service scope, while others are granted at organization or project scope. If the criteria parameter consists of one or more capabilities with a project scope, then you must provide a projectId. If the criteria parameter consists of one or more capabilities with an organization scope, then you must provide an orgId (unless you specified a projectId).
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
criteria | query | string | true | Specify a single capability or a combination of capabilities to be checked. |
orgId | query | string | false | The UUID of an organization. |
projectId | query | string | false | The UUID of a project. |
Detailed descriptions
criteria: Specify a single capability or a combination of capabilities to be checked.
The combination of capabilities is expressed in the following format:
criteria = capability.name | expressionFor example, set criteria=sda.projects.view to check whether the current user can view projects.where expression = AND | OR ( capability.name | expression, ...)
Set criteria=AND(sda.projects.view, sda.rules.update) to check whether the current user can create or update rules in a project.
Example responses
200 Response
true
Here is an example of an error when you check current user's capability with a wrong name
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "Found unexpected token sda.organization.create at position 1.",
"details": [
"Token: sda.organization.create",
"Position: 1",
"messageID: detection-definition-api-icu.invalid.capability.token.error.msg",
"path: /detectionDefinition/capabilities/granted",
"correlator: 58c79752-fa8b-4203-9b9b-51695925d83c"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | boolean |
400 | Bad Request | A bad request. Possible reason or reasons: |
- The criteria parameter may be missing.
- The capability name or names in the criteria parameter may not be valid.
- The scope is missing or incorrect, e.g. missing orgId parameter when checking an organization scope capability.|error2|
Models
The operations for models.
Return a List of Models
Code samples
# You can also use wget
curl -X GET http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/models \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/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('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/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", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/models", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /models
Gets the collection of models.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
start | query | integer | false | The 0-based offset of the first resource to return. Defaults to 0. |
limit | query | integer | false | The maximum number of resources to return. Defaults to 100. |
filter | query | string(filter-criteria) | false | The filter criteria for returned resources. For more information, see Filtering in REST APIs. |
sortBy | query | string(sort-criteria) | false | Specifies the sorting for returned resources. For more information, see Sorting in REST APIs. |
Example responses
An example of a collection of models list
{
"version": 2,
"accept": "application/vnd.sas.detection.getsasmodel",
"count": 3,
"start": 0,
"limit": 100,
"name": "models",
"items": [
{
"id": "38465742-0452-4fd7-bdfd-9182599d16bc",
"version": 2,
"modelLabel": "PyModelA0000",
"modelPackage": "Package_0002",
"messageClassifications": [
{
"creationTimeStamp": "2022-05-17T13:03:18.042Z",
"createdBy": "sas.detectionDefinition",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"revision": 0,
"version": 1,
"id": "ced5ac46-825b-46eb-9cc5-734a8bb58654",
"name": "GLOBAL",
"displayName": "GLOBAL",
"keyCode": "A"
},
{
"creationTimeStamp": "2022-05-18T19:01:09.963Z",
"createdBy": "sasboot",
"modifiedTimeStamp": "2022-05-18T19:01:09.963Z",
"revision": 0,
"version": 1,
"id": "e1162a93-d6dc-11ec-b036-6631d4e9d21c",
"name": "AP_PC",
"displayName": "AP_PC",
"keyCode": "AAA",
"parentId": "e1162a1c-d6dc-11ec-b036-6631d4e9d21c"
}
],
"rules": [
{
"creationTimeStamp": "2022-05-26T12:40:40.879Z",
"createdBy": "userid",
"modifiedTimeStamp": "2022-05-26T12:40:40.879Z",
"modifiedBy": "userid",
"revision": 0,
"version": 2,
"id": "b9bb5ebd-c7d9-4703-8cc8-0bdc6afd77d6",
"name": "Rule2",
"description": "Rule 2",
"baseRuleId": "50001",
"ruleVersion": 1,
"messageClassificationId": "ced5ac46-825b-46eb-9cc5-734a8bb58654",
"schemaName": "PB Schema",
"projectId": "4e7d08ea-31de-474c-ab59-26ebe73101c1",
"ruleTypeName": "variable",
"state": "Coding",
"configuredOperationalState": "0",
"executionOrderType": 0,
"operationalState": "0",
"code": "Cg=="
}
],
"createdBy": "userid",
"modifiedBy": "userid",
"creationTimeStamp": "1901-01-01T00:00:00.000Z",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"revision": 0,
"modelScoreVariable": {
"displayName": "Score 1",
"name": "rrr_score_1"
},
"organizationId": "3559dadc-7896-45c9-86be-38629507e72d"
},
{
"id": "ced6ac46-825b-46ac-9dd5-734a8bb58654",
"version": 2,
"modelLabel": "PyModelA0001",
"modelPackage": "SURR81__0100",
"messageClassifications": [
{
"creationTimeStamp": "2022-05-17T13:03:18.042Z",
"createdBy": "sas.detectionDefinition",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"revision": 0,
"version": 1,
"id": "ced5ac46-825b-46eb-9cc5-734a8bb58654",
"name": "GLOBAL",
"displayName": "GLOBAL",
"keyCode": "A"
},
{
"creationTimeStamp": "2022-05-18T19:01:09.963Z",
"createdBy": "sasboot",
"modifiedTimeStamp": "2022-05-18T19:01:09.963Z",
"revision": 0,
"version": 1,
"id": "e1162a93-d6dc-11ec-b036-6631d4e9d21c",
"name": "AP_PC",
"displayName": "AP_PC",
"keyCode": "AAA",
"parentId": "e1162a1c-d6dc-11ec-b036-6631d4e9d21c"
}
],
"rules": [
{
"creationTimeStamp": "2022-05-26T12:40:40.879Z",
"createdBy": "userid",
"modifiedTimeStamp": "2022-05-26T12:40:40.879Z",
"modifiedBy": "userid",
"revision": 0,
"version": 2,
"id": "b9bb5ebd-c7d9-4703-8cc8-0bdc6afd77d6",
"name": "Rule2",
"description": "Rule 2",
"baseRuleId": "50001",
"ruleVersion": 1,
"messageClassificationId": "ced5ac46-825b-46eb-9cc5-734a8bb58654",
"schemaName": "PB Schema",
"projectId": "4e7d08ea-31de-474c-ab59-26ebe73101c1",
"ruleTypeName": "variable",
"state": "Coding",
"configuredOperationalState": "0",
"executionOrderType": 0,
"operationalState": "0",
"code": "Cg=="
}
],
"createdBy": "userid",
"modifiedBy": "userid",
"creationTimeStamp": "1901-01-01T00:00:00.000Z",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"revision": 0,
"modelScoreVariable": {
"displayName": "Score 1",
"name": "rrr_score_1"
},
"organizationId": "f09695d7-ba80-4564-a7cc-26a7a02863c7"
},
{
"id": "89655742-0252-3fd7-bdfd-5682599d16ad",
"version": 2,
"modelLabel": "PyModelA0002",
"modelPackage": "PyModelA0000",
"messageClassifications": [
{
"creationTimeStamp": "2022-05-17T13:03:18.042Z",
"createdBy": "sas.detectionDefinition",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"revision": 0,
"version": 1,
"id": "ced5ac46-825b-46eb-9cc5-734a8bb58654",
"name": "GLOBAL",
"displayName": "GLOBAL",
"keyCode": "A"
},
{
"creationTimeStamp": "2022-05-18T19:01:09.963Z",
"createdBy": "sasboot",
"modifiedTimeStamp": "2022-05-18T19:01:09.963Z",
"revision": 0,
"version": 1,
"id": "e1162a93-d6dc-11ec-b036-6631d4e9d21c",
"name": "AP_PC",
"displayName": "AP_PC",
"keyCode": "AAA",
"parentId": "e1162a1c-d6dc-11ec-b036-6631d4e9d21c"
}
],
"rules": [
{
"creationTimeStamp": "2022-05-26T12:40:40.879Z",
"createdBy": "userid",
"modifiedTimeStamp": "2022-05-26T12:40:40.879Z",
"modifiedBy": "userid",
"revision": 0,
"version": 2,
"id": "b9bb5ebd-c7d9-4703-8cc8-0bdc6afd77d6",
"name": "Rule2",
"description": "Rule 2",
"baseRuleId": "50001",
"ruleVersion": 1,
"messageClassificationId": "ced5ac46-825b-46eb-9cc5-734a8bb58654",
"schemaName": "PB Schema",
"projectId": "4e7d08ea-31de-474c-ab59-26ebe73101c1",
"ruleTypeName": "variable",
"state": "Coding",
"configuredOperationalState": "0",
"executionOrderType": 0,
"operationalState": "0",
"code": "Cg=="
}
],
"createdBy": "userid",
"modifiedBy": "userid",
"creationTimeStamp": "1901-01-01T00:00:00.000Z",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"revision": 0,
"modelScoreVariable": {
"displayName": "Score 2",
"name": "rrr_score_2"
},
"organizationId": "3559dadc-7896-45c9-86be-38629507e72d"
}
],
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/models/89655742-0252-3fd7-bdfd-5682599d16ad",
"uri": "/detectionDefinition/models/89655742-0252-3fd7-bdfd-5682599d16ad",
"type": "application/vnd.sas.detection.sasmodel"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/models/89655742-0252-3fd7-bdfd-5682599d16ad",
"uri": "/detectionDefinition/models/89655742-0252-3fd7-bdfd-5682599d16ad",
"type": "application/vnd.sas.detection.sasmodel"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/models/89655742-0252-3fd7-bdfd-5682599d16ad",
"uri": "/detectionDefinition/models/89655742-0252-3fd7-bdfd-5682599d16ad"
}
]
}
{
"version": 2,
"accept": "application/vnd.sas.detection.getsasmodel",
"count": 3,
"start": 0,
"limit": 100,
"name": "models",
"items": [
{
"id": "38465742-0452-4fd7-bdfd-9182599d16bc",
"version": 2,
"modelLabel": "PyModelA0000",
"modelPackage": "Package_0002",
"messageClassifications": [
{
"creationTimeStamp": "2022-05-17T13:03:18.042Z",
"createdBy": "sas.detectionDefinition",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"revision": 0,
"version": 1,
"id": "ced5ac46-825b-46eb-9cc5-734a8bb58654",
"name": "GLOBAL",
"displayName": "GLOBAL",
"keyCode": "A"
},
{
"creationTimeStamp": "2022-05-18T19:01:09.963Z",
"createdBy": "sasboot",
"modifiedTimeStamp": "2022-05-18T19:01:09.963Z",
"revision": 0,
"version": 1,
"id": "e1162a93-d6dc-11ec-b036-6631d4e9d21c",
"name": "AP_PC",
"displayName": "AP_PC",
"keyCode": "AAA",
"parentId": "e1162a1c-d6dc-11ec-b036-6631d4e9d21c"
}
],
"rules": [
{
"creationTimeStamp": "2022-05-26T12:40:40.879Z",
"createdBy": "userid",
"modifiedTimeStamp": "2022-05-26T12:40:40.879Z",
"modifiedBy": "userid",
"revision": 0,
"version": 2,
"id": "b9bb5ebd-c7d9-4703-8cc8-0bdc6afd77d6",
"name": "Rule2",
"description": "Rule 2",
"baseRuleId": "50001",
"ruleVersion": 1,
"messageClassificationId": "ced5ac46-825b-46eb-9cc5-734a8bb58654",
"schemaName": "PB Schema",
"projectId": "4e7d08ea-31de-474c-ab59-26ebe73101c1",
"ruleTypeName": "variable",
"state": "Coding",
"configuredOperationalState": "0",
"executionOrderType": 0,
"operationalState": "0",
"code": "Cg=="
}
],
"createdBy": "userid",
"modifiedBy": "userid",
"creationTimeStamp": "1901-01-01T00:00:00.000Z",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"revision": 0,
"modelScoreVariable": {
"displayName": "Score 1",
"name": "rrr_score_1"
},
"organizationId": "3559dadc-7896-45c9-86be-38629507e72d"
},
{
"id": "ced6ac46-825b-46ac-9dd5-734a8bb58654",
"version": 2,
"modelLabel": "PyModelA0001",
"modelPackage": "SURR81__0100",
"messageClassifications": [
{
"creationTimeStamp": "2022-05-17T13:03:18.042Z",
"createdBy": "sas.detectionDefinition",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"revision": 0,
"version": 1,
"id": "ced5ac46-825b-46eb-9cc5-734a8bb58654",
"name": "GLOBAL",
"displayName": "GLOBAL",
"keyCode": "A"
},
{
"creationTimeStamp": "2022-05-18T19:01:09.963Z",
"createdBy": "sasboot",
"modifiedTimeStamp": "2022-05-18T19:01:09.963Z",
"revision": 0,
"version": 1,
"id": "e1162a93-d6dc-11ec-b036-6631d4e9d21c",
"name": "AP_PC",
"displayName": "AP_PC",
"keyCode": "AAA",
"parentId": "e1162a1c-d6dc-11ec-b036-6631d4e9d21c"
}
],
"rules": [
{
"creationTimeStamp": "2022-05-26T12:40:40.879Z",
"createdBy": "userid",
"modifiedTimeStamp": "2022-05-26T12:40:40.879Z",
"modifiedBy": "userid",
"revision": 0,
"version": 2,
"id": "b9bb5ebd-c7d9-4703-8cc8-0bdc6afd77d6",
"name": "Rule2",
"description": "Rule 2",
"baseRuleId": "50001",
"ruleVersion": 1,
"messageClassificationId": "ced5ac46-825b-46eb-9cc5-734a8bb58654",
"schemaName": "PB Schema",
"projectId": "4e7d08ea-31de-474c-ab59-26ebe73101c1",
"ruleTypeName": "variable",
"state": "Coding",
"configuredOperationalState": "0",
"executionOrderType": 0,
"operationalState": "0",
"code": "Cg=="
}
],
"createdBy": "userid",
"modifiedBy": "userid",
"creationTimeStamp": "1901-01-01T00:00:00.000Z",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"revision": 0,
"modelScoreVariable": {
"displayName": "Score 1",
"name": "rrr_score_1"
},
"organizationId": "f09695d7-ba80-4564-a7cc-26a7a02863c7"
},
{
"id": "89655742-0252-3fd7-bdfd-5682599d16ad",
"version": 2,
"modelLabel": "PyModelA0002",
"modelPackage": "PyModelA0000",
"messageClassifications": [
{
"creationTimeStamp": "2022-05-17T13:03:18.042Z",
"createdBy": "sas.detectionDefinition",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"revision": 0,
"version": 1,
"id": "ced5ac46-825b-46eb-9cc5-734a8bb58654",
"name": "GLOBAL",
"displayName": "GLOBAL",
"keyCode": "A"
},
{
"creationTimeStamp": "2022-05-18T19:01:09.963Z",
"createdBy": "sasboot",
"modifiedTimeStamp": "2022-05-18T19:01:09.963Z",
"revision": 0,
"version": 1,
"id": "e1162a93-d6dc-11ec-b036-6631d4e9d21c",
"name": "AP_PC",
"displayName": "AP_PC",
"keyCode": "AAA",
"parentId": "e1162a1c-d6dc-11ec-b036-6631d4e9d21c"
}
],
"rules": [
{
"creationTimeStamp": "2022-05-26T12:40:40.879Z",
"createdBy": "userid",
"modifiedTimeStamp": "2022-05-26T12:40:40.879Z",
"modifiedBy": "userid",
"revision": 0,
"version": 2,
"id": "b9bb5ebd-c7d9-4703-8cc8-0bdc6afd77d6",
"name": "Rule2",
"description": "Rule 2",
"baseRuleId": "50001",
"ruleVersion": 1,
"messageClassificationId": "ced5ac46-825b-46eb-9cc5-734a8bb58654",
"schemaName": "PB Schema",
"projectId": "4e7d08ea-31de-474c-ab59-26ebe73101c1",
"ruleTypeName": "variable",
"state": "Coding",
"configuredOperationalState": "0",
"executionOrderType": 0,
"operationalState": "0",
"code": "Cg=="
}
],
"createdBy": "userid",
"modifiedBy": "userid",
"creationTimeStamp": "1901-01-01T00:00:00.000Z",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"revision": 0,
"modelScoreVariable": {
"displayName": "Score 2",
"name": "rrr_score_2"
},
"organizationId": "3559dadc-7896-45c9-86be-38629507e72d"
}
],
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/models/89655742-0252-3fd7-bdfd-5682599d16ad",
"uri": "/detectionDefinition/models/89655742-0252-3fd7-bdfd-5682599d16ad",
"type": "application/vnd.sas.detection.sasmodel"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/models/89655742-0252-3fd7-bdfd-5682599d16ad",
"uri": "/detectionDefinition/models/89655742-0252-3fd7-bdfd-5682599d16ad",
"type": "application/vnd.sas.detection.sasmodel"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/models/89655742-0252-3fd7-bdfd-5682599d16ad",
"uri": "/detectionDefinition/models/89655742-0252-3fd7-bdfd-5682599d16ad"
}
]
}
An example of an 400 error when the model limit is set to a negative value.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000011,
"message": "The limit parameter must be greater or equal to zero.",
"details": [
"path: /detectionDefinition/models",
"correlator: 6995260c-82ab-4a09-94cd-b484147e375d"
]
}
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000011,
"message": "The limit parameter must be greater or equal to zero.",
"details": [
"path: /detectionDefinition/models",
"correlator: 6995260c-82ab-4a09-94cd-b484147e375d"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | modelCollectionv2 |
400 | Bad Request | The request was invalid | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | Date and time of last modification. |
Registers a Model
Code samples
# You can also use wget
curl -X POST http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/models \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.detection.sasmodel+json' \
-H 'Accept: application/vnd.sas.detection.sasmodel+json'
const inputBody = '{
"modelLabel": "PyModelA0000",
"organizationId": "0dda4eac-c035-4d1d-bb1f-b9bba207a863",
"messageClassificationRelations": [
{
"messageClassificationId": "0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8"
}
],
"modelScoreVariable": {
"displayName": "Score 1",
"name": "rrr_score_1"
},
"modelPackage": "Package000001"
}';
const headers = {
'Content-Type':'application/vnd.sas.detection.sasmodel+json',
'Accept':'application/vnd.sas.detection.sasmodel+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/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.detection.sasmodel+json',
'Accept': 'application/vnd.sas.detection.sasmodel+json'
}
r = requests.post('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/models', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.detection.sasmodel+json"},
"Accept": []string{"application/vnd.sas.detection.sasmodel+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/models", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /models
Creates a new model.
Body parameter
An example of new model creation request content.
{
"modelLabel": "PyModelA0000",
"organizationId": "0dda4eac-c035-4d1d-bb1f-b9bba207a863",
"messageClassificationRelations": [
{
"messageClassificationId": "0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8"
}
],
"modelScoreVariable": {
"displayName": "Score 1",
"name": "rrr_score_1"
},
"modelPackage": "Package000001"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | postModelv2 | false | The model to be created. |
Example responses
An example of response content from the creation of a new model.
{
"id": "38465742-0452-4fd7-bdfd-9182599d16bc",
"version": 2,
"modelLabel": "PyModelA0000",
"organizationId": "0dda4eac-c035-4d1d-bb1f-b9bba207a863",
"messageClassificationRelations": [
{
"messageClassificationId": "0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8"
}
],
"rules": [
{
"creationTimeStamp": "2022-05-26T12:40:40.879Z",
"createdBy": "userid",
"modifiedTimeStamp": "2022-05-26T12:40:40.879Z",
"modifiedBy": "userid",
"revision": 0,
"version": 2,
"id": "b9bb5ebd-c7d9-4703-8cc8-0bdc6afd77d6",
"name": "Rule2",
"description": "Rule 2",
"baseRuleId": "50001",
"ruleVersion": 1,
"messageClassificationId": "ced5ac46-825b-46eb-9cc5-734a8bb58654",
"schemaName": "PB Schema",
"projectId": "4e7d08ea-31de-474c-ab59-26ebe73101c1",
"ruleTypeName": "variable",
"state": "Coding",
"configuredOperationalState": "0",
"executionOrderType": 0,
"operationalState": "0",
"code": "Cg=="
}
],
"createdBy": "userid",
"modifiedBy": "userid",
"creationTimeStamp": "1901-01-01T00:00:00.000Z",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"revision": 0,
"modelScoreVariable": {
"displayName": "Score 1",
"name": "rrr_score_1"
}
}
{
"id": "38465742-0452-4fd7-bdfd-9182599d16bc",
"version": 2,
"modelLabel": "PyModelA0000",
"organizationId": "0dda4eac-c035-4d1d-bb1f-b9bba207a863",
"messageClassificationRelations": [
{
"messageClassificationId": "0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8"
}
],
"rules": [
{
"creationTimeStamp": "2022-05-26T12:40:40.879Z",
"createdBy": "userid",
"modifiedTimeStamp": "2022-05-26T12:40:40.879Z",
"modifiedBy": "userid",
"revision": 0,
"version": 2,
"id": "b9bb5ebd-c7d9-4703-8cc8-0bdc6afd77d6",
"name": "Rule2",
"description": "Rule 2",
"baseRuleId": "50001",
"ruleVersion": 1,
"messageClassificationId": "ced5ac46-825b-46eb-9cc5-734a8bb58654",
"schemaName": "PB Schema",
"projectId": "4e7d08ea-31de-474c-ab59-26ebe73101c1",
"ruleTypeName": "variable",
"state": "Coding",
"configuredOperationalState": "0",
"executionOrderType": 0,
"operationalState": "0",
"code": "Cg=="
}
],
"createdBy": "userid",
"modifiedBy": "userid",
"creationTimeStamp": "1901-01-01T00:00:00.000Z",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"revision": 0,
"modelScoreVariable": {
"displayName": "Score 1",
"name": "rrr_score_1"
}
}
An example of invalid request body
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000004,
"message": "The specified request body cannot be parsed.",
"details": [
"path: /detectionDefinition/models",
"correlator: 160fe032-f91f-44b6-a582-033d7f067787"
]
}
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000004,
"message": "The specified request body cannot be parsed.",
"details": [
"path: /detectionDefinition/models",
"correlator: 160fe032-f91f-44b6-a582-033d7f067787"
]
}
An example of error response when attempting to create a model with a name that already exists.
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000017,
"message": "Model label already exists.",
"details": [
"path: /detectionDefinition/models",
"correlator: 894c7491-8672-4f95-8047-3f1c8fe9c357"
]
}
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000017,
"message": "Model label already exists.",
"details": [
"path: /detectionDefinition/models",
"correlator: 894c7491-8672-4f95-8047-3f1c8fe9c357"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Created | postModelOutputv2 |
400 | Bad Request | The request was invalid. Possible Reason(s): |
- The Organization with the specified ID may not exist.
- The Organizational unit with the specified ID may not exist or may not belong to organization specified in the request.
- The package specified may not exist.|error2|
|409|Conflict|There is a conflict with an existing resource.
Possible Reason(s):
- A model already exists with the same name.|error2|
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Etag | string | An hash-code for the response resource. | |
201 | Last-Modified | string | Date and time of last modification. | |
201 | Location | string | Location of URI for the endpoint. | |
409 | Location | string | Location of URI for the endpoint. |
Return a Specific Registered Model
Code samples
# You can also use wget
curl -X GET http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/models/{modelId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.detection.sasmodel+json'
const headers = {
'Accept':'application/vnd.sas.detection.sasmodel+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/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.detection.sasmodel+json'
}
r = requests.get('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/models/{modelId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.detection.sasmodel+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/models/{modelId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /models/{modelId}
Gets a specific model.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
modelId | path | string | true | The UUID of the model. |
Example responses
An example of a registered model.
{
"id": "ced6ac46-825b-46ac-9dd5-734a8bb58654",
"version": 2,
"modelLabel": "PyModelA0000",
"modelPackage": "Package_0002",
"messageClassifications": [
{
"creationTimeStamp": "2022-05-17T13:03:18.042Z",
"createdBy": "sas.detectionDefinition",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"revision": 0,
"version": 1,
"id": "ced5ac46-825b-46eb-9cc5-734a8bb58654",
"name": "GLOBAL",
"displayName": "GLOBAL",
"keyCode": "A"
},
{
"creationTimeStamp": "2022-05-18T19:01:09.963Z",
"createdBy": "sasboot",
"modifiedTimeStamp": "2022-05-18T19:01:09.963Z",
"revision": 0,
"version": 1,
"id": "e1162a93-d6dc-11ec-b036-6631d4e9d21c",
"name": "AP_PC",
"displayName": "AP_PC",
"keyCode": "AAA",
"parentId": "e1162a1c-d6dc-11ec-b036-6631d4e9d21c"
}
],
"rules": [
{
"creationTimeStamp": "2022-05-26T12:40:40.879Z",
"createdBy": "userid",
"modifiedTimeStamp": "2022-05-26T12:40:40.879Z",
"modifiedBy": "userid",
"revision": 0,
"version": 2,
"id": "b9bb5ebd-c7d9-4703-8cc8-0bdc6afd77d6",
"name": "Rule2",
"description": "Rule 2",
"baseRuleId": "50001",
"ruleVersion": 1,
"messageClassificationId": "ced5ac46-825b-46eb-9cc5-734a8bb58654",
"schemaName": "PB Schema",
"projectId": "4e7d08ea-31de-474c-ab59-26ebe73101c1",
"ruleTypeName": "variable",
"state": "Coding",
"configuredOperationalState": "0",
"executionOrderType": 0,
"operationalState": "0",
"code": "Cg=="
}
],
"createdBy": "userid",
"modifiedBy": "userid",
"creationTimeStamp": "1901-01-01T00:00:00.000Z",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"revision": 0,
"modelScoreVariable": {
"displayName": "Score 1",
"name": "rrr_score_1"
},
"organizationId": "3559dadc-7896-45c9-86be-38629507e72d"
}
{
"id": "ced6ac46-825b-46ac-9dd5-734a8bb58654",
"version": 2,
"modelLabel": "PyModelA0000",
"modelPackage": "Package_0002",
"messageClassifications": [
{
"creationTimeStamp": "2022-05-17T13:03:18.042Z",
"createdBy": "sas.detectionDefinition",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"revision": 0,
"version": 1,
"id": "ced5ac46-825b-46eb-9cc5-734a8bb58654",
"name": "GLOBAL",
"displayName": "GLOBAL",
"keyCode": "A"
},
{
"creationTimeStamp": "2022-05-18T19:01:09.963Z",
"createdBy": "sasboot",
"modifiedTimeStamp": "2022-05-18T19:01:09.963Z",
"revision": 0,
"version": 1,
"id": "e1162a93-d6dc-11ec-b036-6631d4e9d21c",
"name": "AP_PC",
"displayName": "AP_PC",
"keyCode": "AAA",
"parentId": "e1162a1c-d6dc-11ec-b036-6631d4e9d21c"
}
],
"rules": [
{
"creationTimeStamp": "2022-05-26T12:40:40.879Z",
"createdBy": "userid",
"modifiedTimeStamp": "2022-05-26T12:40:40.879Z",
"modifiedBy": "userid",
"revision": 0,
"version": 2,
"id": "b9bb5ebd-c7d9-4703-8cc8-0bdc6afd77d6",
"name": "Rule2",
"description": "Rule 2",
"baseRuleId": "50001",
"ruleVersion": 1,
"messageClassificationId": "ced5ac46-825b-46eb-9cc5-734a8bb58654",
"schemaName": "PB Schema",
"projectId": "4e7d08ea-31de-474c-ab59-26ebe73101c1",
"ruleTypeName": "variable",
"state": "Coding",
"configuredOperationalState": "0",
"executionOrderType": 0,
"operationalState": "0",
"code": "Cg=="
}
],
"createdBy": "userid",
"modifiedBy": "userid",
"creationTimeStamp": "1901-01-01T00:00:00.000Z",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"revision": 0,
"modelScoreVariable": {
"displayName": "Score 1",
"name": "rrr_score_1"
},
"organizationId": "3559dadc-7896-45c9-86be-38629507e72d"
}
Here is an example of an error when you retrieve an model with an invalid UUID.
{
"id": "string",
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"38465742-0452-4fd7-bdfd-9182599d16bcgo\" for the field \"modelId\" does not match the documented format.",
"details": [
"path: /detectionDefinition/models/38465742-0452-4fd7-bdfd-9182599d16bcgo",
"correlator: 61cabe1e-5303-4c3b-af38-a0574a173bbd"
],
"remediation": "string",
"errors": [
"string"
],
"links": [
"string"
]
}
{
"id": "string",
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"38465742-0452-4fd7-bdfd-9182599d16bcgo\" for the field \"modelId\" does not match the documented format.",
"details": [
"path: /detectionDefinition/models/38465742-0452-4fd7-bdfd-9182599d16bcgo",
"correlator: 61cabe1e-5303-4c3b-af38-a0574a173bbd"
],
"remediation": "string",
"errors": [
"string"
],
"links": [
"string"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | modelv2 |
400 | Bad Request | Bad request | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | Date and time of last modification. |
Partially Update a Model
Code samples
# You can also use wget
curl -X PATCH http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/models/{modelId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.detection.updatesasmodel+json' \
-H 'Accept: application/vnd.sas.detection.sasmodel+json'
const inputBody = '{
"modelLabel": "PyModelA0000",
"messageClassificationRelations": [
{
"messageClassificationId": "ced5ac46-825b-46eb-9cc5-734a8bb58654"
},
{
"messageClassificationId": "bgd5ac46-825b-46eb-9fc5-734a8bb58234"
}
]
}';
const headers = {
'Content-Type':'application/vnd.sas.detection.updatesasmodel+json',
'Accept':'application/vnd.sas.detection.sasmodel+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/models/{modelId}',
{
method: 'PATCH',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.detection.updatesasmodel+json',
'Accept': 'application/vnd.sas.detection.sasmodel+json'
}
r = requests.patch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/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.detection.updatesasmodel+json"},
"Accept": []string{"application/vnd.sas.detection.sasmodel+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PATCH", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/models/{modelId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PATCH /models/{modelId}
Only label and associated message classifications can be updated.
Body parameter
An example of the request content for updating a model.
{
"modelLabel": "PyModelA0000",
"messageClassificationRelations": [
{
"messageClassificationId": "ced5ac46-825b-46eb-9cc5-734a8bb58654"
},
{
"messageClassificationId": "bgd5ac46-825b-46eb-9fc5-734a8bb58234"
}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
modelId | path | string | true | The UUID of the model. |
body | body | updateModelv2 | false | Model details to be updated. |
Example responses
An example of response content of updating a model.
{
"id": "38465742-0452-4fd7-bdfd-9182599d16bc",
"version": 2,
"modelLabel": "PyModelA0000",
"organizationId": "0dda4eac-c035-4d1d-bb1f-b9bba207a863",
"messageClassificationRelations": [
{
"messageClassificationId": "ced5ac46-825b-46eb-9cc5-734a8bb58654"
},
{
"messageClassificationId": "bgd5ac46-825b-46eb-9fc5-734a8bb58234"
}
],
"modelScoreVariable": {
"displayName": "Score 1",
"name": "rrr_score_1"
},
"rules": [
{
"creationTimeStamp": "2022-05-26T12:40:40.879Z",
"createdBy": "userid",
"modifiedTimeStamp": "2022-05-26T12:40:40.879Z",
"modifiedBy": "userid",
"revision": 0,
"version": 2,
"id": "b9bb5ebd-c7d9-4703-8cc8-0bdc6afd77d6",
"name": "Rule2",
"description": "Rule 2",
"baseRuleId": "50001",
"ruleVersion": 1,
"messageClassificationId": "ced5ac46-825b-46eb-9cc5-734a8bb58654",
"schemaName": "PB Schema",
"projectId": "4e7d08ea-31de-474c-ab59-26ebe73101c1",
"ruleTypeName": "variable",
"state": "Coding",
"configuredOperationalState": "0",
"executionOrderType": 0,
"operationalState": "0",
"code": "Cg=="
}
],
"createdBy": "userid",
"modifiedBy": "userid",
"creationTimeStamp": "1901-01-01T00:00:00.000Z",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"revision": 0,
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/models/38465742-0452-4fd7-bdfd-9182599d16bc",
"uri": "/detectionDefinition/models/38465742-0452-4fd7-bdfd-9182599d16bc",
"type": "application/vnd.sas.detection.sasmodel"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/models/38465742-0452-4fd7-bdfd-9182599d16bc",
"uri": "/detectionDefinition/models/38465742-0452-4fd7-bdfd-9182599d16bc",
"type": "application/vnd.sas.detection.sasmodel"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/models/38465742-0452-4fd7-bdfd-9182599d16bc",
"uri": "/detectionDefinition/models/38465742-0452-4fd7-bdfd-9182599d16bc"
}
]
}
{
"id": "38465742-0452-4fd7-bdfd-9182599d16bc",
"version": 2,
"modelLabel": "PyModelA0000",
"organizationId": "0dda4eac-c035-4d1d-bb1f-b9bba207a863",
"messageClassificationRelations": [
{
"messageClassificationId": "ced5ac46-825b-46eb-9cc5-734a8bb58654"
},
{
"messageClassificationId": "bgd5ac46-825b-46eb-9fc5-734a8bb58234"
}
],
"modelScoreVariable": {
"displayName": "Score 1",
"name": "rrr_score_1"
},
"rules": [
{
"creationTimeStamp": "2022-05-26T12:40:40.879Z",
"createdBy": "userid",
"modifiedTimeStamp": "2022-05-26T12:40:40.879Z",
"modifiedBy": "userid",
"revision": 0,
"version": 2,
"id": "b9bb5ebd-c7d9-4703-8cc8-0bdc6afd77d6",
"name": "Rule2",
"description": "Rule 2",
"baseRuleId": "50001",
"ruleVersion": 1,
"messageClassificationId": "ced5ac46-825b-46eb-9cc5-734a8bb58654",
"schemaName": "PB Schema",
"projectId": "4e7d08ea-31de-474c-ab59-26ebe73101c1",
"ruleTypeName": "variable",
"state": "Coding",
"configuredOperationalState": "0",
"executionOrderType": 0,
"operationalState": "0",
"code": "Cg=="
}
],
"createdBy": "userid",
"modifiedBy": "userid",
"creationTimeStamp": "1901-01-01T00:00:00.000Z",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"revision": 0,
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/models/38465742-0452-4fd7-bdfd-9182599d16bc",
"uri": "/detectionDefinition/models/38465742-0452-4fd7-bdfd-9182599d16bc",
"type": "application/vnd.sas.detection.sasmodel"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/models/38465742-0452-4fd7-bdfd-9182599d16bc",
"uri": "/detectionDefinition/models/38465742-0452-4fd7-bdfd-9182599d16bc",
"type": "application/vnd.sas.detection.sasmodel"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/models/38465742-0452-4fd7-bdfd-9182599d16bc",
"uri": "/detectionDefinition/models/38465742-0452-4fd7-bdfd-9182599d16bc"
}
]
}
An example of 400 error response for a PATCH request.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000004,
"message": "The specified request body cannot be parsed.",
"details": [
"messageID: detection-definition-api-icu.request.body.msg",
"path: /detectionDefinition/models/1de42f49-ae98-45bf-9208-6a655c21393e",
"correlator: 7dd0f5d3-91a5-41c5-a320-c38940618f7c"
]
}
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000004,
"message": "The specified request body cannot be parsed.",
"details": [
"messageID: detection-definition-api-icu.request.body.msg",
"path: /detectionDefinition/models/1de42f49-ae98-45bf-9208-6a655c21393e",
"correlator: 7dd0f5d3-91a5-41c5-a320-c38940618f7c"
]
}
An example of error response when attempting to update a model with a name that already exists.
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000022,
"message": "Model label already exists.",
"details": [
"path: /detectionDefinition/models/466d005d-3507-4030-b056-d7045586aad2",
"correlator: 5c6aba14-35e8-4fc5-a5d6-7d2fbc92b85e"
]
}
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000022,
"message": "Model label already exists.",
"details": [
"path: /detectionDefinition/models/466d005d-3507-4030-b056-d7045586aad2",
"correlator: 5c6aba14-35e8-4fc5-a5d6-7d2fbc92b85e"
]
}
An example of 412 error when updating a model with an 'If-Match' request header that is not valid.
{
"version": 2,
"httpStatusCode": 412,
"errorCode": 1000000,
"message": "The object has been updated since you last retrieved it.",
"details": [
"path: /detectionDefinition/models/38465742-0452-4fd7-bdfd-9182599d16bcgo",
"correlator: 61cabe1e-5303-4c3b-af38-a0574a173bbd"
]
}
{
"version": 2,
"httpStatusCode": 412,
"errorCode": 1000000,
"message": "The object has been updated since you last retrieved it.",
"details": [
"path: /detectionDefinition/models/38465742-0452-4fd7-bdfd-9182599d16bcgo",
"correlator: 61cabe1e-5303-4c3b-af38-a0574a173bbd"
]
}
An example 428 error response when the request does not include the conditional update 'If-Match' header.
{
"version": 2,
"httpStatusCode": 428,
"errorCode": 1000021,
"message": "Conditional match header is missing.",
"details": [
"path: /detectionDefinition/models/466d005d-3507-4030-b056-d7045586aad2",
"correlator: b8ffa63d-5406-4d5d-9761-7238bf79e75e"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The model was updated. | postModelOutputv2 |
400 | Bad Request | The request was invalid (for example, invalid data or an invalid structure in the request body). Possible Reason(s): |
|
- The message classification with the specified ID may not exist or may not belong to the organization specified in the request. |
error2 | ||
409 | Conflict | There is a conflict with an existing resource. Possible Reason(s): |
|
- A model already exists with the same name. |
error2 | ||
412 | Precondition Failed | The supplied pre-condition was not satisfactory. This typically indicates stale data. | error2 |
428 | Precondition Required | A required pre-condition (If-Match/If-Unmodified-Since) was not provided. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Etag | string | An hash-code for the response resource. | |
200 | Last-Modified | string | Date and time of last modification. | |
200 | Location | string | Location of URI for the endpoint. | |
409 | Location | string | Location of URI for the endpoint. | |
412 | Location | string | Location of URI for the endpoint. | |
428 | Location | string | Location of URI for the endpoint. |
Returns Metadata of a Specific Registered Model
Code samples
# You can also use wget
curl -X HEAD http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/models/{modelId}
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/models/{modelId}',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/models/{modelId}')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/models/{modelId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /models/{modelId}
Gets metadata of a specific model through response headers.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
modelId | path | string | true | The UUID of the model. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Etag | string | An hash-code for the response resource. | |
200 | Last-Modified | string | Date and time of last modification. |
Deletes a model
Code samples
# You can also use wget
curl -X DELETE http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/models/{modelId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.error+json'
const headers = {
'Accept':'application/vnd.sas.error+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/models/{modelId}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.error+json'
}
r = requests.delete('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/models/{modelId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.error+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/models/{modelId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /models/{modelId}
Deletes a model with specified modelId
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
modelId | path | string | true | The UUID of the model. |
Example responses
Here is an example of an error when you try to delete a model that does not exists.
{
"version": 2,
"httpStatusCode": 404,
"errorCode": 1000001,
"message": "record not found",
"details": [
"path: /detectionDefinition/models/d495df5c-5fef-4c08-b729-5f30b0b56e76",
"correlator: 66b8c7b4-c27c-48ac-9cba-3b3bc36c6c41"
]
}
{
"version": 2,
"httpStatusCode": 404,
"errorCode": 1000001,
"message": "record not found",
"details": [
"path: /detectionDefinition/models/d495df5c-5fef-4c08-b729-5f30b0b56e76",
"correlator: 66b8c7b4-c27c-48ac-9cba-3b3bc36c6c41"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | Deleted | None |
404 | Not Found | Not found. There is no model with the specified identifier. | error2 |
Deletes multiple models
Code samples
# You can also use wget
curl -X POST http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/models/deletions \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.selection+json' \
-H 'Accept: application/vnd.sas.error+json'
const inputBody = '[
{
"id": "3c5c3514-e8dc-41fd-b424-d78ee1b8c017"
},
{
"id": "e772a447-35ab-4ee0-8a33-7a81a6d23ab5"
}
]';
const headers = {
'Content-Type':'application/vnd.sas.selection+json',
'Accept':'application/vnd.sas.error+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/models/deletions',
{
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.selection+json',
'Accept': 'application/vnd.sas.error+json'
}
r = requests.post('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/models/deletions', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.selection+json"},
"Accept": []string{"application/vnd.sas.error+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/models/deletions", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /models/deletions
Deletes multiple models with specified modelIds
Body parameter
An example of request body for deleting multiple models
[
{
"id": "3c5c3514-e8dc-41fd-b424-d78ee1b8c017"
},
{
"id": "e772a447-35ab-4ee0-8a33-7a81a6d23ab5"
}
]
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | modelIdArray | false | Array of modelIDs. |
Example responses
Here is an example of an error when you try to delete a model that does not exists.
{
"version": 2,
"httpStatusCode": 404,
"errorCode": 1000001,
"message": "record not found",
"details": [
"path: /detectionDefinition/models/d495df5c-5fef-4c08-b729-5f30b0b56e76",
"correlator: 66b8c7b4-c27c-48ac-9cba-3b3bc36c6c41"
]
}
{
"version": 2,
"httpStatusCode": 404,
"errorCode": 1000001,
"message": "record not found",
"details": [
"path: /detectionDefinition/models/d495df5c-5fef-4c08-b729-5f30b0b56e76",
"correlator: 66b8c7b4-c27c-48ac-9cba-3b3bc36c6c41"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | None |
204 | No Content | Deleted | None |
404 | Not Found | Not found. There is no model with the specified identifier. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Etag | string | An hash-code for the response resource. | |
200 | Last-Modified | string | Date and time of last modification. |
Returns model score variables
Code samples
# You can also use wget
curl -X GET http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/models/scoreVariables \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/models/scoreVariables',
{
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('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/models/scoreVariables', 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", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/models/scoreVariables", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /models/scoreVariables
Gets a list of model score variables
Example responses
An example of score variable response content.
[
{
"name": "rrr_score_1",
"displayName": "Score 1",
"inUse": true
},
{
"name": "rrr_score_2",
"displayName": "Score 2",
"inUse": true
},
{
"name": "rrr_score_3",
"displayName": "Score 3",
"inUse": false
},
{
"name": "rrr_score_4",
"displayName": "Score 4",
"inUse": false
}
]
[
{
"name": "rrr_score_1",
"displayName": "Score 1",
"inUse": true
},
{
"name": "rrr_score_2",
"displayName": "Score 2",
"inUse": true
},
{
"name": "rrr_score_3",
"displayName": "Score 3",
"inUse": false
},
{
"name": "rrr_score_4",
"displayName": "Score 4",
"inUse": false
}
]
An example of 400 error response for a GET request.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 11807,
"message": "Invalid URI was used",
"details": [
"messageID: detection-definition-api-icu.request.body.msg",
"path: /detectionDefinition/models/scoreVariables",
"correlator: 7dd0f5d3-91a5-41c5-a320-c38940618f7c"
],
"errors": [
{
"version": 2,
"httpStatusCode": 400,
"message": " "
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | scoreVariables |
400 | Bad Request | Bad request | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | Date and time of last modification. |
Returns model's packages
Code samples
# You can also use wget
curl -X GET http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/models/packages \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/models/packages',
{
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('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/models/packages', 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", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/models/packages", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /models/packages
Gets a list of all model packages
Example responses
An example of packages response content.
[
{
"modelPackage": "SURR81__0100",
"scores": [
"Incident Score"
]
},
{
"modelPackage": "PyModelB0000",
"scores": [
"Incident Score"
]
},
{
"modelPackage": "PyModelA0000",
"scores": [
"Incident Score"
]
}
]
[
{
"modelPackage": "SURR81__0100",
"scores": [
"Incident Score"
]
},
{
"modelPackage": "PyModelB0000",
"scores": [
"Incident Score"
]
},
{
"modelPackage": "PyModelA0000",
"scores": [
"Incident Score"
]
}
]
An example of 400 error response for a GET request.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 11807,
"message": "Invalid URI was used",
"details": [
"messageID: detection-definition-api-icu.request.body.msg",
"path: /detectionDefinition/models/scoreVariables",
"correlator: 7dd0f5d3-91a5-41c5-a320-c38940618f7c"
],
"errors": [
{
"version": 2,
"httpStatusCode": 400,
"message": " "
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | packages |
400 | Bad Request | Bad request | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | Date and time of last modification. |
Alert Types
The operations for alert types.
Returns a List of Alert Types
Code samples
# You can also use wget
curl -X GET http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/alertTypes \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/alertTypes',
{
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('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/alertTypes', 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", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/alertTypes", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /alertTypes
Gets the collection of alert types.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
messageName | query | string | false | Message name. |
filter | query | string(filter-criteria) | false | The filter criteria for returned resources. For more information, see Filtering in REST APIs. |
Example responses
Example of response body content from a get alerts request.
{
"version": 2,
"accept": "application/vnd.sas.detection.alert.type",
"count": 2,
"start": 0,
"limit": 100,
"name": "alertTypes",
"items": [
{
"creationTimeStamp": "2022-09-13T11:35:51.541Z",
"createdBy": "susahu",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"revision": 0,
"version": 1,
"code": "A",
"name": "Account",
"variableRelation": {
"messageName": "Common Financial",
"pathName": ".aqo",
"name": "acct_num"
}
},
{
"creationTimeStamp": "2022-09-16T05:32:21.307Z",
"createdBy": "susahu",
"modifiedTimeStamp": "2022-09-16T05:32:21.307Z",
"modifiedBy": "susahu",
"revision": 0,
"version": 1,
"code": "C",
"name": "Card",
"variableRelation": {
"messageName": "Common Financial",
"pathName": ".hqo",
"name": "card_num"
}
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/alertTypes",
"uri": "/detectionDefinition/alertTypes",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.alert.type"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/alertTypes?start=0&limit=100",
"uri": "/detectionDefinition/alertTypes?start=0&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.alert.type"
}
]
}
{
"version": 2,
"accept": "application/vnd.sas.detection.alert.type",
"count": 2,
"start": 0,
"limit": 100,
"name": "alertTypes",
"items": [
{
"creationTimeStamp": "2022-09-13T11:35:51.541Z",
"createdBy": "susahu",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"revision": 0,
"version": 1,
"code": "A",
"name": "Account",
"variableRelation": {
"messageName": "Common Financial",
"pathName": ".aqo",
"name": "acct_num"
}
},
{
"creationTimeStamp": "2022-09-16T05:32:21.307Z",
"createdBy": "susahu",
"modifiedTimeStamp": "2022-09-16T05:32:21.307Z",
"modifiedBy": "susahu",
"revision": 0,
"version": 1,
"code": "C",
"name": "Card",
"variableRelation": {
"messageName": "Common Financial",
"pathName": ".hqo",
"name": "card_num"
}
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/alertTypes",
"uri": "/detectionDefinition/alertTypes",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.alert.type"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/alertTypes?start=0&limit=100",
"uri": "/detectionDefinition/alertTypes?start=0&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.alert.type"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | alertTypeCollection |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | Date and time of last modification. |
Creates an Alert type
Code samples
# You can also use wget
curl -X POST http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/alertTypes \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.sas.detection.alert.type+json'
const inputBody = '{
"code": "A",
"name": "Account",
"variableRelation": {
"messageName": "Common Financial",
"pathName": ".aqo",
"name": "acct_num"
}
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/vnd.sas.detection.alert.type+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/alertTypes',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/vnd.sas.detection.alert.type+json'
}
r = requests.post('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/alertTypes', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/vnd.sas.detection.alert.type+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/alertTypes", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /alertTypes
Creates a new alert type.
Body parameter
An example of new alert type request content
{
"code": "A",
"name": "Account",
"variableRelation": {
"messageName": "Common Financial",
"pathName": ".aqo",
"name": "acct_num"
}
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | alertType | false | The alert type to be created. |
Example responses
An example of new alert type request content
{
"code": "A",
"name": "Account",
"variableRelation": {
"messageName": "Common Financial",
"pathName": ".aqo",
"name": "acct_num"
}
}
{
"code": "A",
"name": "Account",
"variableRelation": {
"messageName": "Common Financial",
"pathName": ".aqo",
"name": "acct_num"
}
}
Example 400 error response when invalid parameters are passed, for example invalid variable path.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000011,
"message": "Invalid variable path provided for Alert Type creation.",
"details": [
"path: /detectionDefinition/alertTypes",
"correlator: 9b1b545e-22e5-479b-b630-ed14d2cb5e9a"
]
}
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000011,
"message": "Invalid variable path provided for Alert Type creation.",
"details": [
"path: /detectionDefinition/alertTypes",
"correlator: 9b1b545e-22e5-479b-b630-ed14d2cb5e9a"
]
}
Example 409 error response when an alert type already exists.
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000017,
"message": "Alert type \"A\" already exists.",
"details": [
"path: /detectionDefinition/alertTypes",
"correlator: e4b03dd3-ec84-4c5a-ae7f-a138da38bb2b"
]
}
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000017,
"message": "Alert type \"A\" already exists.",
"details": [
"path: /detectionDefinition/alertTypes",
"correlator: e4b03dd3-ec84-4c5a-ae7f-a138da38bb2b"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Created | alertType |
400 | Bad Request | The request was invalid (for example, invalid data or an invalid structure in the request body). | error2 |
409 | Conflict | There is a conflict with an existing resource. | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Etag | string | An hash-code for the response resource. | |
201 | Last-Modified | string | Date and time of last modification. | |
201 | Location | string | Location of URI for the endpoint. |
Returns details of a Specific Alert Type
Code samples
# You can also use wget
curl -X GET http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/alertTypes/{alertTypeCode} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/json'
const headers = {
'Accept':'application/json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/alertTypes/{alertTypeCode}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/alertTypes/{alertTypeCode}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/alertTypes/{alertTypeCode}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /alertTypes/{alertTypeCode}
Gets a specific Alert Type.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
alertTypeCode | path | string | true | The alert type code. |
Example responses
Example of response body content from a get alert type request.
{
"creationTimeStamp": "2022-09-13T11:35:51.541Z",
"createdBy": "susahu",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"revision": 0,
"version": 1,
"code": "A",
"name": "Account",
"variableRelation": {
"messageName": "Common Financial",
"pathName": ".aqo",
"name": "acct_num"
},
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/alertTypes/A",
"uri": "/detectionDefinition/alertTypes/A",
"type": "application/vnd.sas.detection.alert.type"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/alertTypes/A",
"uri": "/detectionDefinition/alertTypes/A",
"type": "application/vnd.sas.detection.alert.type"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/alertTypes/A",
"uri": "/detectionDefinition/alertTypes/A"
}
]
}
{
"creationTimeStamp": "2022-09-13T11:35:51.541Z",
"createdBy": "susahu",
"modifiedTimeStamp": "1901-01-01T00:00:00.000Z",
"revision": 0,
"version": 1,
"code": "A",
"name": "Account",
"variableRelation": {
"messageName": "Common Financial",
"pathName": ".aqo",
"name": "acct_num"
},
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/alertTypes/A",
"uri": "/detectionDefinition/alertTypes/A",
"type": "application/vnd.sas.detection.alert.type"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/alertTypes/A",
"uri": "/detectionDefinition/alertTypes/A",
"type": "application/vnd.sas.detection.alert.type"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/alertTypes/A",
"uri": "/detectionDefinition/alertTypes/A"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | alertType |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | Date and time of last modification. |
Delete an alert Type
Code samples
# You can also use wget
curl -X DELETE http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/alertTypes/{alertTypeCode} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.error+json'
const headers = {
'Accept':'application/vnd.sas.error+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/alertTypes/{alertTypeCode}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.error+json'
}
r = requests.delete('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/alertTypes/{alertTypeCode}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.error+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/alertTypes/{alertTypeCode}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /alertTypes/{alertTypeCode}
Delete an alert type
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
alertTypeCode | path | string | true | The alert type code. |
Example responses
Example of an error when you request to delete an alert type that is in use.
{
"version": 2,
"httpStatusCode": 422,
"errorCode": 1000019,
"message": "You cannot delete alert type \"A\" that is in use by rules in testing or production.",
"details": [
"path: /detectionDefinition/alertTypes/A",
"correlator: d281c183-11d8-408f-a969-09fdbb3f21bc"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | Deleted | None |
422 | Unprocessable Entity | The request was not deleted due to a conflict. | |
- The alert type code is currently in use. |
error2 |
Message Schemas
The operations for message schemas.
Return OK if the message schema is in-use
Code samples
# You can also use wget
curl -X HEAD http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/messages/{messageId}
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/messages/{messageId}',
{
method: 'HEAD'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.head('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/messages/{messageId}')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("HEAD", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/messages/{messageId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
HEAD /messages/{messageId}
Returns a status of OK if the message schema is in use/exists
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
messageId | path | string | true | The UUID of the message |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | None |
404 | Not Found | Not Found | None |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Etag | string | An hash-code for the response resource. | |
200 | Last-Modified | string | Date and time of last modification. | |
200 | Location | string | Location of URI for the endpoint. | |
404 | Etag | string | An hash-code for the response resource. | |
404 | Last-Modified | string | Date and time of last modification. | |
404 | Location | string | Location of URI for the endpoint. |
Returns a list of latest message schemas
Code samples
# You can also use wget
curl -X GET http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/messages/@latest \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/messages/@latest',
{
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('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/messages/@latest', 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", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/messages/@latest", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /messages/@latest
Returns message schemas with an option to scope by organizations and/or message categories
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
orgIds | query | string | false | A list of organization UUIDs separated by ' |
catIds | query | string | false | A list of message categories separated by ' |
start | query | integer | false | The 0-based offset of the first resource to return. Defaults to 0. |
limit | query | integer | false | The maximum number of resources to return. Defaults to 100. |
filter | query | string(filter-criteria) | false | The filter criteria for returned resources. For more information, see Filtering in REST APIs. |
sortBy | query | string(sort-criteria) | false | Specifies the sorting for returned resources. For more information, see Sorting in REST APIs. |
Detailed descriptions
orgIds: A list of organization UUIDs separated by '|'.
For example, orgIds=123e4567-e89b-12d3-a456-426614174000|123e4567-e89b-12d3-a456-426614174001
catIds: A list of message categories separated by '|'
* composite
- container that holds other schemas
* linked
- schemas that have been added to other schemas
* unlinked
- schemas that have not been added to other schemas
Enumerated Values
Parameter | Value |
---|---|
catIds | composite |
catIds | linked |
catIds | unlinked |
Example responses
Example of response body from latest message using query parameters and filter
{
"version": 2,
"accept": "application/vnd.sas.detection.message",
"count": 1,
"start": 0,
"limit": 100,
"name": "messages",
"items": [
{
"createdBy": "bob",
"creationTimeStamp": "2023-08-11T18:40:46.695Z",
"description": "User variable sets of organization cat-test",
"displayName": "cat test Profile",
"id": "98081fe2-dc86-4589-9328-f12573bab9cc",
"modifiedBy": "bob",
"modifiedTimeStamp": "2023-08-11T18:40:46.695Z",
"name": "cat test Profile",
"revision": 0,
"state": "Developing",
"type": "profile",
"version": 1
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/messages",
"uri": "/detectionDefinition/messages",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/messages?start=0&limit=100&filter=eq%28%27type%27%2C%27profile%27%29",
"uri": "/detectionDefinition/messages?start=0&limit=100&filter=eq%28%27type%27%2C%27profile%27%29",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message"
}
]
}
{
"version": 2,
"accept": "application/vnd.sas.detection.message",
"count": 1,
"start": 0,
"limit": 100,
"name": "messages",
"items": [
{
"createdBy": "bob",
"creationTimeStamp": "2023-08-11T18:40:46.695Z",
"description": "User variable sets of organization cat-test",
"displayName": "cat test Profile",
"id": "98081fe2-dc86-4589-9328-f12573bab9cc",
"modifiedBy": "bob",
"modifiedTimeStamp": "2023-08-11T18:40:46.695Z",
"name": "cat test Profile",
"revision": 0,
"state": "Developing",
"type": "profile",
"version": 1
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/messages",
"uri": "/detectionDefinition/messages",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/messages?start=0&limit=100&filter=eq%28%27type%27%2C%27profile%27%29",
"uri": "/detectionDefinition/messages?start=0&limit=100&filter=eq%28%27type%27%2C%27profile%27%29",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message"
}
]
}
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "Invalid message category. Allowed values are: composite, component and unrelated.",
"details": [
"messageID: detection-definition-api-icu.message.invalid.category.msg",
"path: /detectionDefinition/messages/@latest",
"correlator: a05bc778-98cd-463c-aa28-e88e5ce272bf"
],
"errors": [
{
"version": 2,
"httpStatusCode": 500,
"message": "unknown message category:`unrelatedx`"
}
]
}
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "Invalid message category. Allowed values are: composite, component and unrelated.",
"details": [
"messageID: detection-definition-api-icu.message.invalid.category.msg",
"path: /detectionDefinition/messages/@latest",
"correlator: a05bc778-98cd-463c-aa28-e88e5ce272bf"
],
"errors": [
{
"version": 2,
"httpStatusCode": 500,
"message": "unknown message category:`unrelatedx`"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | messageSummaryCollection |
400 | Bad Request | The request was invalid. Possible reasons: | |
- The filter expression is not in the correct format. |
error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | Date and time of last modification. |
Get the List of Variables of a Variable Set with Rule Usage Information
Code samples
# You can also use wget
curl -X GET http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/variableSets/{variableSetId}/variables \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/variableSets/{variableSetId}/variables',
{
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('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/variableSets/{variableSetId}/variables', 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", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/variableSets/{variableSetId}/variables", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /variableSets/{variableSetId}/variables
Returns the variables of a variable set. The information that is returned includes
the number of rules that use each variable and the ID of the rules, when applicable.
If it is profile variable set, the user must be a member of the project in
order to view the variables.
If a projectId is specified, the variable set must be a profile variable set.
Only the variables of the variable set that were created in that project are returned.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
start | query | integer | false | The 0-based offset of the first resource to return. Defaults to 0. |
limit | query | integer | false | The maximum number of resources to return. Defaults to 100. |
filter | query | string(filter-criteria) | false | The filter criteria for returned resources. For more information, see Filtering in REST APIs. |
sortBy | query | string(sort-criteria) | false | Specifies the sorting for returned resources. For more information, see Sorting in REST APIs. |
variableSetId | path | string | true | The UUID of the variable set. |
projectId | query | string | false | The UUID of a project. |
Example responses
Example of response body content from a get variable set variables request.
{
"version": 2,
"accept": "application/vnd.sas.detection.variable.rule.usage.summary",
"count": 2,
"start": 0,
"limit": 100,
"name": "variables",
"items": [
{
"access": "rw",
"arrayItem": "none",
"createdBy": "bob",
"creationTimeStamp": "2022-08-24T19:59:26.619Z",
"defaultValue": "",
"deprecated": false,
"description": "",
"displayName": "_a_account",
"enumURI": "",
"exclusiveMaximum": false,
"id": "a67fd481-ed2f-4d74-9fa9-81423701d886",
"inclusiveMinimum": false,
"isMissing": false,
"jsonPath": "._A_",
"locked": false,
"maxItems": 0,
"maxLength": 10,
"maximum": 0,
"minItems": 0,
"minLength": 0,
"minimum": 0,
"modifiedBy": "user1",
"modifiedTimeStamp": "2022-08-24T19:59:26.619Z",
"name": "_a_account",
"private": false,
"required": false,
"revision": 0,
"type": "string",
"userGroup": "DMSDefault",
"variableSetId": "7bfa4102-b973-4841-85c5-3caf92174b77",
"version": 1,
"ruleCount": 2,
"ruleIds": [
"21b71997-b973-4841-85c5-dd42d1e2adb8",
"0fbe3d15-b973-4841-85c5-434566eb81a5"
]
},
{
"access": "rw",
"arrayItem": "none",
"createdBy": "user2",
"creationTimeStamp": "2022-08-24T20:51:12.809Z",
"defaultValue": "",
"deprecated": false,
"description": "",
"displayName": "_a_acc",
"enumURI": "",
"exclusiveMaximum": false,
"id": "a311d515-d2e3-48fb-9faa-4c7220be8657",
"inclusiveMinimum": false,
"isMissing": false,
"jsonPath": "._A_",
"locked": false,
"maxItems": 0,
"maxLength": 10,
"maximum": 0,
"minItems": 0,
"minLength": 0,
"minimum": 0,
"modifiedBy": "bob",
"modifiedTimeStamp": "2022-08-24T20:51:12.809Z",
"name": "_a_acc",
"private": false,
"required": false,
"revision": 0,
"type": "string",
"userGroup": "DMSDefault",
"variableSetId": "7bfa4102-b973-4841-85c5-3caf92174b77",
"version": 1,
"ruleCount": 0,
"ruleIds": []
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/variableSets/7bfa4102-b973-4841-85c5-3caf92174b77/variables?orgId=0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8",
"uri": "/detectionDefinition/variableSets/7bfa4102-b973-4841-85c5-3caf92174b77/variables?orgId=0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.variable.rule.usage.summary"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/variableSets/7bfa4102-b973-4841-85c5-3caf92174b77/variables?start=0&limit=100&orgId=0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8",
"uri": "/detectionDefinition/variableSets/7bfa4102-b973-4841-85c5-3caf92174b77/variables?start=0&limit=100&orgId=0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.variable.rule.usage.summary"
}
]
}
{
"version": 2,
"accept": "application/vnd.sas.detection.variable.rule.usage.summary",
"count": 2,
"start": 0,
"limit": 100,
"name": "variables",
"items": [
{
"access": "rw",
"arrayItem": "none",
"createdBy": "bob",
"creationTimeStamp": "2022-08-24T19:59:26.619Z",
"defaultValue": "",
"deprecated": false,
"description": "",
"displayName": "_a_account",
"enumURI": "",
"exclusiveMaximum": false,
"id": "a67fd481-ed2f-4d74-9fa9-81423701d886",
"inclusiveMinimum": false,
"isMissing": false,
"jsonPath": "._A_",
"locked": false,
"maxItems": 0,
"maxLength": 10,
"maximum": 0,
"minItems": 0,
"minLength": 0,
"minimum": 0,
"modifiedBy": "user1",
"modifiedTimeStamp": "2022-08-24T19:59:26.619Z",
"name": "_a_account",
"private": false,
"required": false,
"revision": 0,
"type": "string",
"userGroup": "DMSDefault",
"variableSetId": "7bfa4102-b973-4841-85c5-3caf92174b77",
"version": 1,
"ruleCount": 2,
"ruleIds": [
"21b71997-b973-4841-85c5-dd42d1e2adb8",
"0fbe3d15-b973-4841-85c5-434566eb81a5"
]
},
{
"access": "rw",
"arrayItem": "none",
"createdBy": "user2",
"creationTimeStamp": "2022-08-24T20:51:12.809Z",
"defaultValue": "",
"deprecated": false,
"description": "",
"displayName": "_a_acc",
"enumURI": "",
"exclusiveMaximum": false,
"id": "a311d515-d2e3-48fb-9faa-4c7220be8657",
"inclusiveMinimum": false,
"isMissing": false,
"jsonPath": "._A_",
"locked": false,
"maxItems": 0,
"maxLength": 10,
"maximum": 0,
"minItems": 0,
"minLength": 0,
"minimum": 0,
"modifiedBy": "bob",
"modifiedTimeStamp": "2022-08-24T20:51:12.809Z",
"name": "_a_acc",
"private": false,
"required": false,
"revision": 0,
"type": "string",
"userGroup": "DMSDefault",
"variableSetId": "7bfa4102-b973-4841-85c5-3caf92174b77",
"version": 1,
"ruleCount": 0,
"ruleIds": []
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/variableSets/7bfa4102-b973-4841-85c5-3caf92174b77/variables?orgId=0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8",
"uri": "/detectionDefinition/variableSets/7bfa4102-b973-4841-85c5-3caf92174b77/variables?orgId=0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.variable.rule.usage.summary"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/variableSets/7bfa4102-b973-4841-85c5-3caf92174b77/variables?start=0&limit=100&orgId=0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8",
"uri": "/detectionDefinition/variableSets/7bfa4102-b973-4841-85c5-3caf92174b77/variables?start=0&limit=100&orgId=0fbe3d15-8d0f-447b-aa2c-dd42d1e2adb8",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.variable.rule.usage.summary"
}
]
}
An example of an 400 error when the variable set ID provided is not in the correct format.
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"3edc056f-74d9-4033-963e-a38f571c0b9b3\" for the field \"variableSetId\" does not match the documented format.",
"details": [
"path: /detectionDefinition/variableSets/a799b1ef-b0c0-4cc2-9942-a302c7f02cb0/variables",
"correlator: b0000bd7-e277-4408-94f1-ff21fbc46f85"
]
}
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"3edc056f-74d9-4033-963e-a38f571c0b9b3\" for the field \"variableSetId\" does not match the documented format.",
"details": [
"path: /detectionDefinition/variableSets/a799b1ef-b0c0-4cc2-9942-a302c7f02cb0/variables",
"correlator: b0000bd7-e277-4408-94f1-ff21fbc46f85"
]
}
An example of error 422 when the variable set specified does not belong to the profile message schema of the organization of the project.
{
"version": 2,
"httpStatusCode": 422,
"errorCode": 1000016,
"message": "The object failed to be queried.",
"details": [
"Type: Message",
"messageID: detection-definition-api-icu.failed.to.query.msg",
"path: /detectionDefinition/variableSets/a799b1ef-b0c0-4cc2-9942-a302c7f02cb0/variables",
"correlator: 24ce1f46-5b1c-4f1b-8a06-4924318990ff"
]
}
{
"version": 2,
"httpStatusCode": 422,
"errorCode": 1000016,
"message": "The object failed to be queried.",
"details": [
"Type: Message",
"messageID: detection-definition-api-icu.failed.to.query.msg",
"path: /detectionDefinition/variableSets/a799b1ef-b0c0-4cc2-9942-a302c7f02cb0/variables",
"correlator: 24ce1f46-5b1c-4f1b-8a06-4924318990ff"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | variableRuleUsageSummaryCollection |
400 | Bad Request | The request was invalid. Possible reasons: | |
- The variableSetId path parameter is not in the correct format. |
error2 | ||
422 | Unprocessable Entity | The request cannot be processed. Possible reasons: | |
- The variable set specified does not belong to the profile message schema of the organization. |
error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | Date and time of last modification. |
Lists
The operations for lists.
Get a List of Lists
Code samples
# You can also use wget
curl -X GET http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/lists \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/lists',
{
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('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/lists', 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", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/lists", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /lists
Gets the collection of lists from the repository folder.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
start | query | integer | false | The 0-based offset of the first resource to return. Defaults to 0. |
limit | query | integer | false | The maximum number of resources to return. Defaults to 100. |
filter | query | string(filter-criteria) | false | The filter criteria for returned resources. For more information, see Filtering in REST APIs. |
sortBy | query | string(sort-criteria) | false | Specifies the sorting for returned resources. For more information, see Sorting in REST APIs. |
Example responses
An example of a collection of lists.
{
"version": 2,
"accept": "application/vnd.sas.detection.list",
"count": 2,
"start": 0,
"limit": 100,
"name": "lists",
"items": [
{
"version": 1,
"columns": [
{
"name": "merch_term_id",
"datatype": "string",
"position": 1,
"isKey": true,
"keyPosition": 1
}
],
"creationTimeStamp": "2023-02-06T13:46:35.934Z",
"id": "ee8c7ec1-d343-4057-814f-c2ccb31a1c1f",
"name": "bad_merchant_terminal"
},
{
"version": 1,
"columns": [
{
"name": "aqo_acct_num",
"datatype": "string",
"position": 1,
"isKey": true,
"keyPosition": 1
},
{
"name": "reason",
"datatype": "string",
"position": 2
},
{
"name": "when",
"datatype": "string",
"position": 3
}
],
"creationTimeStamp": "2023-02-06T18:40:01.354Z",
"id": "7f3343b5-be79-41c2-bd1f-a7559e844731",
"name": "closedAccts"
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/projects/f31aaff1-6991-4e43-83be-3c9b62aa0b22/lists",
"uri": "/detectionDefinition/projects/f31aaff1-6991-4e43-83be-3c9b62aa0b22/lists",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.list"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/projects/f31aaff1-6991-4e43-83be-3c9b62aa0b22/lists?start=0&limit=100",
"uri": "/detectionDefinition/projects/f31aaff1-6991-4e43-83be-3c9b62aa0b22/lists?start=0&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.list"
}
]
}
{
"version": 2,
"accept": "application/vnd.sas.detection.list",
"count": 2,
"start": 0,
"limit": 100,
"name": "lists",
"items": [
{
"version": 1,
"columns": [
{
"name": "merch_term_id",
"datatype": "string",
"position": 1,
"isKey": true,
"keyPosition": 1
}
],
"creationTimeStamp": "2023-02-06T13:46:35.934Z",
"id": "ee8c7ec1-d343-4057-814f-c2ccb31a1c1f",
"name": "bad_merchant_terminal"
},
{
"version": 1,
"columns": [
{
"name": "aqo_acct_num",
"datatype": "string",
"position": 1,
"isKey": true,
"keyPosition": 1
},
{
"name": "reason",
"datatype": "string",
"position": 2
},
{
"name": "when",
"datatype": "string",
"position": 3
}
],
"creationTimeStamp": "2023-02-06T18:40:01.354Z",
"id": "7f3343b5-be79-41c2-bd1f-a7559e844731",
"name": "closedAccts"
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionDefinition/projects/f31aaff1-6991-4e43-83be-3c9b62aa0b22/lists",
"uri": "/detectionDefinition/projects/f31aaff1-6991-4e43-83be-3c9b62aa0b22/lists",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.list"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/projects/f31aaff1-6991-4e43-83be-3c9b62aa0b22/lists?start=0&limit=100",
"uri": "/detectionDefinition/projects/f31aaff1-6991-4e43-83be-3c9b62aa0b22/lists?start=0&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.list"
}
]
}
An example of an error when the limit is set to a negative value.
{
"httpStatusCode": 400,
"errorCode": 1126,
"message": "The limit parameter must be greater or equal to zero.",
"details": [
"path: /detectionDefinition/lists",
"correlator: 8356c642-058b-47d4-b47e-7be3248a375f"
]
}
{
"httpStatusCode": 400,
"errorCode": 1126,
"message": "The limit parameter must be greater or equal to zero.",
"details": [
"path: /detectionDefinition/lists",
"correlator: 8356c642-058b-47d4-b47e-7be3248a375f"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | listCollection |
400 | Bad Request | The request was invalid | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | Date and time of last modification. |
Get a Specific List
Code samples
# You can also use wget
curl -X GET http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/lists/{listId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/lists/{listId}',
{
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('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/lists/{listId}', 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", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/lists/{listId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /lists/{listId}
Gets a specific list.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
listId | path | string | true | The UUID of the list. |
Example responses
An example of a registered list.
{
"version": 1,
"columns": [
{
"name": "merch_id",
"datatype": "string",
"position": 1,
"isKey": true,
"keyPosition": 1
},
{
"name": "merch_name",
"datatype": "string",
"position": 2
},
{
"name": "score",
"datatype": "string",
"position": 3
}
],
"creationTimeStamp": "2023-02-17T20:34:01.861Z",
"id": "3580a791-4bef-4163-9e54-517f48caddd2",
"name": "CreditListName",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/lists/3580a791-4bef-4163-9e54-517f48caddd2",
"uri": "/detectionDefinition/lists/3580a791-4bef-4163-9e54-517f48caddd2",
"type": "application/vnd.sas.detection.list"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/lists/3580a791-4bef-4163-9e54-517f48caddd2",
"uri": "/detectionDefinition/lists/3580a791-4bef-4163-9e54-517f48caddd2",
"type": "application/vnd.sas.detection.list"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/lists/3580a791-4bef-4163-9e54-517f48caddd2",
"uri": "/detectionDefinition/lists/3580a791-4bef-4163-9e54-517f48caddd2"
}
]
}
{
"version": 1,
"columns": [
{
"name": "merch_id",
"datatype": "string",
"position": 1,
"isKey": true,
"keyPosition": 1
},
{
"name": "merch_name",
"datatype": "string",
"position": 2
},
{
"name": "score",
"datatype": "string",
"position": 3
}
],
"creationTimeStamp": "2023-02-17T20:34:01.861Z",
"id": "3580a791-4bef-4163-9e54-517f48caddd2",
"name": "CreditListName",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionDefinition/lists/3580a791-4bef-4163-9e54-517f48caddd2",
"uri": "/detectionDefinition/lists/3580a791-4bef-4163-9e54-517f48caddd2",
"type": "application/vnd.sas.detection.list"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionDefinition/lists/3580a791-4bef-4163-9e54-517f48caddd2",
"uri": "/detectionDefinition/lists/3580a791-4bef-4163-9e54-517f48caddd2",
"type": "application/vnd.sas.detection.list"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionDefinition/lists/3580a791-4bef-4163-9e54-517f48caddd2",
"uri": "/detectionDefinition/lists/3580a791-4bef-4163-9e54-517f48caddd2"
}
]
}
An example of an error when retrieving a list with an invalid UUID.
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000017,
"message": "The specified list does not exist ",
"details": [
"path: /detectionDefinition/lists/7f3343b5-be79-41c2-bd1f-a7559e844731",
"correlator: 3560b15a-4692-416f-ba78-b30e85232afb"
]
}
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000017,
"message": "The specified list does not exist ",
"details": [
"path: /detectionDefinition/lists/7f3343b5-be79-41c2-bd1f-a7559e844731",
"correlator: 3560b15a-4692-416f-ba78-b30e85232afb"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | list |
409 | Conflict | Bad request | error2 |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | Date and time of last modification. |
Register a List
Code samples
# You can also use wget
curl -X POST http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/lists/{listId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.error+json'
const headers = {
'Accept':'application/vnd.sas.error+json'
};
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/lists/{listId}',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.error+json'
}
r = requests.post('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/lists/{listId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.error+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/lists/{listId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /lists/{listId}
Registers a list with the specified listId from the listData service.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
listId | path | string | true | The UUID of the list. |
Example responses
An example of error response when attempting to create a list with a UUID that already exists.
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000017,
"message": "List id \"e95ce1bd-2490-42aa-87a9-95fab4bb7fc9\" already exists.",
"details": [
"path: /detectionDefinition/lists/e95ce1bd-2490-42aa-87a9-95fab4bb7fc9",
"correlator: 3e2a8120-de33-4e94-9d6c-e6ee7c535775"
]
}
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000017,
"message": "List id \"e95ce1bd-2490-42aa-87a9-95fab4bb7fc9\" already exists.",
"details": [
"path: /detectionDefinition/lists/e95ce1bd-2490-42aa-87a9-95fab4bb7fc9",
"correlator: 3e2a8120-de33-4e94-9d6c-e6ee7c535775"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | Created | None |
409 | Conflict | There is a conflict with an existing resource. Possible Reason(s): |
- A list already exists with the same id.
- The list does not exist on the listData service.|error2|
Delete a list
Code samples
# You can also use wget
curl -X DELETE http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/lists/{listId}
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/lists/{listId}',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.delete('http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/lists/{listId}')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "http://mock-detectionDefinition.apifirst.unx.sas.com/detectionDefinition/lists/{listId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /lists/{listId}
Deletes a list with specified listlId
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
listId | path | string | true | The UUID of the list. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | Deleted | None |
Schemas
deployment
{
"id": "string",
"buildNumber": 0,
"state": "string",
"organizationId": "string",
"publishId": "string",
"createdBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"version": 1
}
A detection deployment
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | none |
buildNumber | integer | false | none | none |
state | string | false | none | The state of the deployment (building, publishing, completed, failed) |
organizationId | string | false | none | The organization ID of the organization that created this deployment |
publishId | string | false | none | The ID of the corresponding model in the /modelPublish service |
createdBy | string | false | none | The user who created the object. |
creationTimeStamp | string(date-time) | false | none | The timestamp for when the object was created, in the format of YYYY-MM-DDThh:mm:ss.sssZ . |
modifiedBy | string | false | none | The user who most recently modified the object. |
modifiedTimeStamp | string(date-time) | false | none | The timestamp for when the object was last modified, in the format of YYYY-MM-DDThh:mm:ss.sssZ . |
version | integer | false | none | The API representation version. |
deploymentCollection
{
"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": [
{
"id": "string",
"buildNumber": 0,
"state": "string",
"organizationId": "string",
"publishId": "string",
"createdBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"version": 1
}
]
}
deploymentCollection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
deploymentCollection | any | false | none | A collection of deployment objects |
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 | [deployment] | false | none | The actual results of a query |
deploymentPackage
{
"id": "string",
"name": "string",
"displayName": "string",
"latestDeploymentId": "string",
"state": "string",
"lastDeploymentTimeStamp": "2019-08-24T14:15:22Z",
"rulesAdded": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"baseRuleId": "string",
"ruleVersion": 0,
"messageClassificationId": "30cfcff2-22df-4b7c-aa2d-6571c7fe702a",
"schemaName": "string",
"projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
"ruleTypeName": "decision",
"state": "string",
"pendingApproval": false,
"keywords": "string",
"alertType": "string",
"alertReason": "string",
"executionOrderType": -1,
"executionOrderPriority": 0,
"configuredOperationalState": "0",
"operationalState": "-2",
"operationalTimeLimit": 0,
"creationTimeStamp": "string",
"createdBy": "string",
"modifiedTimeStamp": "string",
"modifiedBy": "string",
"revision": 0,
"version": 0,
"messageDisplayName": "string",
"messageClassificationKeyCode": "string",
"messageClassificatinoDisplayName": "string",
"deployed": false,
"deployedTimeStamp": "string",
"canView": false
}
],
"rulesUpdated": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"baseRuleId": "string",
"ruleVersion": 0,
"messageClassificationId": "30cfcff2-22df-4b7c-aa2d-6571c7fe702a",
"schemaName": "string",
"projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
"ruleTypeName": "decision",
"state": "string",
"pendingApproval": false,
"keywords": "string",
"alertType": "string",
"alertReason": "string",
"executionOrderType": -1,
"executionOrderPriority": 0,
"configuredOperationalState": "0",
"operationalState": "-2",
"operationalTimeLimit": 0,
"creationTimeStamp": "string",
"createdBy": "string",
"modifiedTimeStamp": "string",
"modifiedBy": "string",
"revision": 0,
"version": 0,
"messageDisplayName": "string",
"messageClassificationKeyCode": "string",
"messageClassificatinoDisplayName": "string",
"deployed": false,
"deployedTimeStamp": "string",
"canView": false
}
],
"rulesRemoved": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"baseRuleId": "string",
"ruleVersion": 0,
"messageClassificationId": "30cfcff2-22df-4b7c-aa2d-6571c7fe702a",
"schemaName": "string",
"projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
"ruleTypeName": "decision",
"state": "string",
"pendingApproval": false,
"keywords": "string",
"alertType": "string",
"alertReason": "string",
"executionOrderType": -1,
"executionOrderPriority": 0,
"configuredOperationalState": "0",
"operationalState": "-2",
"operationalTimeLimit": 0,
"creationTimeStamp": "string",
"createdBy": "string",
"modifiedTimeStamp": "string",
"modifiedBy": "string",
"revision": 0,
"version": 0,
"messageDisplayName": "string",
"messageClassificationKeyCode": "string",
"messageClassificatinoDisplayName": "string",
"deployed": false,
"deployedTimeStamp": "string",
"canView": false
}
],
"productionRules": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"baseRuleId": "string",
"ruleVersion": 0,
"messageClassificationId": "30cfcff2-22df-4b7c-aa2d-6571c7fe702a",
"schemaName": "string",
"projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
"ruleTypeName": "decision",
"state": "string",
"pendingApproval": false,
"keywords": "string",
"alertType": "string",
"alertReason": "string",
"executionOrderType": -1,
"executionOrderPriority": 0,
"configuredOperationalState": "0",
"operationalState": "-2",
"operationalTimeLimit": 0,
"creationTimeStamp": "string",
"createdBy": "string",
"modifiedTimeStamp": "string",
"modifiedBy": "string",
"revision": 0,
"version": 0,
"messageDisplayName": "string",
"messageClassificationKeyCode": "string",
"messageClassificatinoDisplayName": "string",
"deployed": false,
"deployedTimeStamp": "string",
"canView": false
}
],
"testingRules": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"baseRuleId": "string",
"ruleVersion": 0,
"messageClassificationId": "30cfcff2-22df-4b7c-aa2d-6571c7fe702a",
"schemaName": "string",
"projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
"ruleTypeName": "decision",
"state": "string",
"pendingApproval": false,
"keywords": "string",
"alertType": "string",
"alertReason": "string",
"executionOrderType": -1,
"executionOrderPriority": 0,
"configuredOperationalState": "0",
"operationalState": "-2",
"operationalTimeLimit": 0,
"creationTimeStamp": "string",
"createdBy": "string",
"modifiedTimeStamp": "string",
"modifiedBy": "string",
"revision": 0,
"version": 0,
"messageDisplayName": "string",
"messageClassificationKeyCode": "string",
"messageClassificatinoDisplayName": "string",
"deployed": false,
"deployedTimeStamp": "string",
"canView": false
}
],
"modelsAdded": [
{
"id": "string",
"version": 0,
"modelLabel": "string",
"modelPackage": "string",
"organizationId": "string",
"messageClassifications": [
{
"id": "string",
"parentId": "string",
"name": "string",
"displayName": "string",
"keyCode": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"revision": 0,
"version": 0,
"messageClassifications": [
null
],
"childCount": 0
}
],
"rules": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"baseRuleId": "string",
"ruleVersion": 0,
"messageClassificationId": "30cfcff2-22df-4b7c-aa2d-6571c7fe702a",
"schemaName": "string",
"projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
"ruleTypeName": "decision",
"state": "string",
"pendingApproval": false,
"keywords": "string",
"alertType": "string",
"alertReason": "string",
"executionOrderType": -1,
"executionOrderPriority": 0,
"configuredOperationalState": "0",
"operationalState": "-2",
"operationalTimeLimit": 0,
"creationTimeStamp": "string",
"createdBy": "string",
"modifiedTimeStamp": "string",
"modifiedBy": "string",
"revision": 0,
"version": 0
}
],
"createdBy": "string",
"modifiedBy": "string",
"creationTimeStamp": "string",
"modifiedTimeStamp": "string",
"revision": 0,
"modelScoreVariable": {
"name": "string",
"displayName": "string",
"inUse": true
}
}
],
"modelsRemoved": [
{
"id": "string",
"version": 0,
"modelLabel": "string",
"modelPackage": "string",
"organizationId": "string",
"messageClassifications": [
{
"id": "string",
"parentId": "string",
"name": "string",
"displayName": "string",
"keyCode": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"revision": 0,
"version": 0,
"messageClassifications": [
null
],
"childCount": 0
}
],
"rules": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"baseRuleId": "string",
"ruleVersion": 0,
"messageClassificationId": "30cfcff2-22df-4b7c-aa2d-6571c7fe702a",
"schemaName": "string",
"projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
"ruleTypeName": "decision",
"state": "string",
"pendingApproval": false,
"keywords": "string",
"alertType": "string",
"alertReason": "string",
"executionOrderType": -1,
"executionOrderPriority": 0,
"configuredOperationalState": "0",
"operationalState": "-2",
"operationalTimeLimit": 0,
"creationTimeStamp": "string",
"createdBy": "string",
"modifiedTimeStamp": "string",
"modifiedBy": "string",
"revision": 0,
"version": 0
}
],
"createdBy": "string",
"modifiedBy": "string",
"creationTimeStamp": "string",
"modifiedTimeStamp": "string",
"revision": 0,
"modelScoreVariable": {
"name": "string",
"displayName": "string",
"inUse": true
}
}
],
"models": [
{
"id": "string",
"version": 0,
"modelLabel": "string",
"modelPackage": "string",
"organizationId": "string",
"messageClassifications": [
{
"id": "string",
"parentId": "string",
"name": "string",
"displayName": "string",
"keyCode": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"revision": 0,
"version": 0,
"messageClassifications": [
null
],
"childCount": 0
}
],
"rules": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"baseRuleId": "string",
"ruleVersion": 0,
"messageClassificationId": "30cfcff2-22df-4b7c-aa2d-6571c7fe702a",
"schemaName": "string",
"projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
"ruleTypeName": "decision",
"state": "string",
"pendingApproval": false,
"keywords": "string",
"alertType": "string",
"alertReason": "string",
"executionOrderType": -1,
"executionOrderPriority": 0,
"configuredOperationalState": "0",
"operationalState": "-2",
"operationalTimeLimit": 0,
"creationTimeStamp": "string",
"createdBy": "string",
"modifiedTimeStamp": "string",
"modifiedBy": "string",
"revision": 0,
"version": 0
}
],
"createdBy": "string",
"modifiedBy": "string",
"creationTimeStamp": "string",
"modifiedTimeStamp": "string",
"revision": 0,
"modelScoreVariable": {
"name": "string",
"displayName": "string",
"inUse": true
}
}
],
"rulesAddedCount": 0,
"rulesUpdatedCount": 0,
"rulesRemovedCount": 0,
"modelsAddedCount": 0,
"modelsRemovedCount": 0,
"canDeploy": true
}
Details of updates since last deployment and deployable candidates.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | The UUID of the organization. |
name | string | false | none | The internal short name of the organization. |
displayName | string | false | none | The descriptive name of the organization. |
latestDeploymentId | string | false | none | The UUID of the latest deployment for the organization. |
state | string | false | none | The state of the deployment (building, publishing, completed, failed) |
lastDeploymentTimeStamp | string(date-time) | false | none | Time of last successful deployment. |
rulesAdded | [deployablerule] | false | none | Rules added since last deployment. |
rulesUpdated | [deployablerule] | false | none | Rules updated since last deployment. |
rulesRemoved | [deployablerule] | false | none | Rules removed since last deployment. |
productionRules | [deployablerule] | false | none | Production rules eligible for current deployment. |
testingRules | [deployablerule] | false | none | Testing Rules eligible for current deployment. |
modelsAdded | [modelv2] | false | none | Models added since last deployment. |
modelsRemoved | [modelv2] | false | none | Models removed since last deployment. |
models | [modelv2] | false | none | Models eligible for current deployment. |
rulesAddedCount | integer | false | none | Number of rules added since last deployment. |
rulesUpdatedCount | integer | false | none | Number of rules updated since last deployment. |
rulesRemovedCount | integer | false | none | Number of rules removed since last deployment. |
modelsAddedCount | integer | false | none | Number of models added since last deployment. |
modelsRemovedCount | integer | false | none | Number of models removed since last deployment. |
canDeploy | boolean | false | none | Flag indicating whether the current user can deploy the organization or not. |
deploymentPackageCollection
{
"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": [
{
"id": "string",
"name": "string",
"displayName": "string",
"latestDeploymentId": "string",
"state": "string",
"lastDeploymentTimeStamp": "2019-08-24T14:15:22Z",
"rulesAdded": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"baseRuleId": "string",
"ruleVersion": 0,
"messageClassificationId": "30cfcff2-22df-4b7c-aa2d-6571c7fe702a",
"schemaName": "string",
"projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
"ruleTypeName": "decision",
"state": "string",
"pendingApproval": false,
"keywords": "string",
"alertType": "string",
"alertReason": "string",
"executionOrderType": -1,
"executionOrderPriority": 0,
"configuredOperationalState": "0",
"operationalState": "-2",
"operationalTimeLimit": 0,
"creationTimeStamp": "string",
"createdBy": "string",
"modifiedTimeStamp": "string",
"modifiedBy": "string",
"revision": 0,
"version": 0,
"messageDisplayName": "string",
"messageClassificationKeyCode": "string",
"messageClassificatinoDisplayName": "string",
"deployed": false,
"deployedTimeStamp": "string",
"canView": false
}
],
"rulesUpdated": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"baseRuleId": "string",
"ruleVersion": 0,
"messageClassificationId": "30cfcff2-22df-4b7c-aa2d-6571c7fe702a",
"schemaName": "string",
"projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
"ruleTypeName": "decision",
"state": "string",
"pendingApproval": false,
"keywords": "string",
"alertType": "string",
"alertReason": "string",
"executionOrderType": -1,
"executionOrderPriority": 0,
"configuredOperationalState": "0",
"operationalState": "-2",
"operationalTimeLimit": 0,
"creationTimeStamp": "string",
"createdBy": "string",
"modifiedTimeStamp": "string",
"modifiedBy": "string",
"revision": 0,
"version": 0,
"messageDisplayName": "string",
"messageClassificationKeyCode": "string",
"messageClassificatinoDisplayName": "string",
"deployed": false,
"deployedTimeStamp": "string",
"canView": false
}
],
"rulesRemoved": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"baseRuleId": "string",
"ruleVersion": 0,
"messageClassificationId": "30cfcff2-22df-4b7c-aa2d-6571c7fe702a",
"schemaName": "string",
"projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
"ruleTypeName": "decision",
"state": "string",
"pendingApproval": false,
"keywords": "string",
"alertType": "string",
"alertReason": "string",
"executionOrderType": -1,
"executionOrderPriority": 0,
"configuredOperationalState": "0",
"operationalState": "-2",
"operationalTimeLimit": 0,
"creationTimeStamp": "string",
"createdBy": "string",
"modifiedTimeStamp": "string",
"modifiedBy": "string",
"revision": 0,
"version": 0,
"messageDisplayName": "string",
"messageClassificationKeyCode": "string",
"messageClassificatinoDisplayName": "string",
"deployed": false,
"deployedTimeStamp": "string",
"canView": false
}
],
"productionRules": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"baseRuleId": "string",
"ruleVersion": 0,
"messageClassificationId": "30cfcff2-22df-4b7c-aa2d-6571c7fe702a",
"schemaName": "string",
"projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
"ruleTypeName": "decision",
"state": "string",
"pendingApproval": false,
"keywords": "string",
"alertType": "string",
"alertReason": "string",
"executionOrderType": -1,
"executionOrderPriority": 0,
"configuredOperationalState": "0",
"operationalState": "-2",
"operationalTimeLimit": 0,
"creationTimeStamp": "string",
"createdBy": "string",
"modifiedTimeStamp": "string",
"modifiedBy": "string",
"revision": 0,
"version": 0,
"messageDisplayName": "string",
"messageClassificationKeyCode": "string",
"messageClassificatinoDisplayName": "string",
"deployed": false,
"deployedTimeStamp": "string",
"canView": false
}
],
"testingRules": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"baseRuleId": "string",
"ruleVersion": 0,
"messageClassificationId": "30cfcff2-22df-4b7c-aa2d-6571c7fe702a",
"schemaName": "string",
"projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
"ruleTypeName": "decision",
"state": "string",
"pendingApproval": false,
"keywords": "string",
"alertType": "string",
"alertReason": "string",
"executionOrderType": -1,
"executionOrderPriority": 0,
"configuredOperationalState": "0",
"operationalState": "-2",
"operationalTimeLimit": 0,
"creationTimeStamp": "string",
"createdBy": "string",
"modifiedTimeStamp": "string",
"modifiedBy": "string",
"revision": 0,
"version": 0,
"messageDisplayName": "string",
"messageClassificationKeyCode": "string",
"messageClassificatinoDisplayName": "string",
"deployed": false,
"deployedTimeStamp": "string",
"canView": false
}
],
"modelsAdded": [
{
"id": "string",
"version": 0,
"modelLabel": "string",
"modelPackage": "string",
"organizationId": "string",
"messageClassifications": [
{
"id": "string",
"parentId": "string",
"name": "string",
"displayName": "string",
"keyCode": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"revision": 0,
"version": 0,
"messageClassifications": [
null
],
"childCount": 0
}
],
"rules": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"baseRuleId": "string",
"ruleVersion": 0,
"messageClassificationId": "30cfcff2-22df-4b7c-aa2d-6571c7fe702a",
"schemaName": "string",
"projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
"ruleTypeName": "decision",
"state": "string",
"pendingApproval": false,
"keywords": "string",
"alertType": "string",
"alertReason": "string",
"executionOrderType": -1,
"executionOrderPriority": 0,
"configuredOperationalState": "0",
"operationalState": "-2",
"operationalTimeLimit": 0,
"creationTimeStamp": "string",
"createdBy": "string",
"modifiedTimeStamp": "string",
"modifiedBy": "string",
"revision": 0,
"version": 0
}
],
"createdBy": "string",
"modifiedBy": "string",
"creationTimeStamp": "string",
"modifiedTimeStamp": "string",
"revision": 0,
"modelScoreVariable": {
"name": "string",
"displayName": "string",
"inUse": true
}
}
],
"modelsRemoved": [
{
"id": "string",
"version": 0,
"modelLabel": "string",
"modelPackage": "string",
"organizationId": "string",
"messageClassifications": [
{
"id": "string",
"parentId": "string",
"name": "string",
"displayName": "string",
"keyCode": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"revision": 0,
"version": 0,
"messageClassifications": [
null
],
"childCount": 0
}
],
"rules": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"baseRuleId": "string",
"ruleVersion": 0,
"messageClassificationId": "30cfcff2-22df-4b7c-aa2d-6571c7fe702a",
"schemaName": "string",
"projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
"ruleTypeName": "decision",
"state": "string",
"pendingApproval": false,
"keywords": "string",
"alertType": "string",
"alertReason": "string",
"executionOrderType": -1,
"executionOrderPriority": 0,
"configuredOperationalState": "0",
"operationalState": "-2",
"operationalTimeLimit": 0,
"creationTimeStamp": "string",
"createdBy": "string",
"modifiedTimeStamp": "string",
"modifiedBy": "string",
"revision": 0,
"version": 0
}
],
"createdBy": "string",
"modifiedBy": "string",
"creationTimeStamp": "string",
"modifiedTimeStamp": "string",
"revision": 0,
"modelScoreVariable": {
"name": "string",
"displayName": "string",
"inUse": true
}
}
],
"models": [
{
"id": "string",
"version": 0,
"modelLabel": "string",
"modelPackage": "string",
"organizationId": "string",
"messageClassifications": [
{
"id": "string",
"parentId": "string",
"name": "string",
"displayName": "string",
"keyCode": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"revision": 0,
"version": 0,
"messageClassifications": [
null
],
"childCount": 0
}
],
"rules": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"baseRuleId": "string",
"ruleVersion": 0,
"messageClassificationId": "30cfcff2-22df-4b7c-aa2d-6571c7fe702a",
"schemaName": "string",
"projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
"ruleTypeName": "decision",
"state": "string",
"pendingApproval": false,
"keywords": "string",
"alertType": "string",
"alertReason": "string",
"executionOrderType": -1,
"executionOrderPriority": 0,
"configuredOperationalState": "0",
"operationalState": "-2",
"operationalTimeLimit": 0,
"creationTimeStamp": "string",
"createdBy": "string",
"modifiedTimeStamp": "string",
"modifiedBy": "string",
"revision": 0,
"version": 0
}
],
"createdBy": "string",
"modifiedBy": "string",
"creationTimeStamp": "string",
"modifiedTimeStamp": "string",
"revision": 0,
"modelScoreVariable": {
"name": "string",
"displayName": "string",
"inUse": true
}
}
],
"rulesAddedCount": 0,
"rulesUpdatedCount": 0,
"rulesRemovedCount": 0,
"modelsAddedCount": 0,
"modelsRemovedCount": 0,
"canDeploy": true
}
]
}
deploymentPackageCollection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
deploymentPackageCollection | any | false | none | A collection of deployment packages |
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 | [deploymentPackage] | false | none | The actual results of a query |
deploymentDefinition
{
"organizationId": "string",
"detectionURL": "string",
"deployTestingRules": true,
"expiresAfter": 14,
"destination": "string",
"tdrTopic": "string",
"restartDetectionService": true,
"createdBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"maxMessageLength": 0,
"autoDeployment": true,
"autoDeploymentDelayInSeconds": 0,
"version": 2
}
Deployment definitions for an organization.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
organizationId | string | false | none | The organization ID of the organization. |
detectionURL | string | false | none | URL to connect to the detection. |
deployTestingRules | boolean | false | none | Whether to deploy rules in testing or not. |
expiresAfter | integer | false | none | Expiration in days after which deployments are deleted. |
destination | string | false | none | Destination for the deployment package. |
tdrTopic | string | false | none | Transaction repository Kafka topic. |
restartDetectionService | boolean | false | none | When set to true, Detection Service will be restarted automatically after successful model publishing. |
createdBy | string | false | none | The user who created the object. |
creationTimeStamp | string(date-time) | false | none | The timestamp for when the object was created, in the format of YYYY-MM-DDThh:mm:ss.sssZ . |
modifiedBy | string | false | none | The user who most recently modified the object. |
modifiedTimeStamp | string(date-time) | false | none | The timestamp for when the object was last modified, in the format of YYYY-MM-DDThh:mm:ss.sssZ . |
maxMessageLength | integer | false | none | The maximum number of bytes expected in an input or output message. |
autoDeployment | boolean | false | none | If true, a deployment is automatically done when a rule is promoted to production. |
autoDeploymentDelayInSeconds | integer | false | none | The number of seconds to count down after a rule is promoted to production before an automatic deployment is done. If a subsequent rule is promoted to production during this period, then the count down time is reset and begins again. This ensures that when promotong a large number of rules to production, only one automatic deployment occurs after the last rule is promoted. |
version | integer | false | none | The API representation version. |
rulev2
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"baseRuleId": "string",
"ruleVersion": 0,
"messageClassificationId": "30cfcff2-22df-4b7c-aa2d-6571c7fe702a",
"schemaName": "string",
"projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
"ruleTypeName": "decision",
"state": "string",
"pendingApproval": false,
"keywords": "string",
"alertType": "string",
"alertReason": "string",
"executionOrderType": -1,
"executionOrderPriority": 0,
"configuredOperationalState": "0",
"operationalState": "-2",
"operationalTimeLimit": 0,
"creationTimeStamp": "string",
"createdBy": "string",
"modifiedTimeStamp": "string",
"modifiedBy": "string",
"revision": 0,
"version": 0
}
A detection rule (without code)
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string(uuid) | false | none | The UUID of the rule. |
name | string | true | none | The name of the rule. Valid values are letters, numbers, hyphens, underscores, and spaces. |
description | string | false | none | The description of the rule. |
baseRuleId | string | false | none | The identifier of the base rule (shared by all versions of the rule). |
ruleVersion | number | false | none | The version number of the rule. |
messageClassificationId | string(uuid) | true | none | The UUID of the associated message classification. |
schemaName | string | true | none | The unique name of the associated message schema. |
projectId | string(uuid) | false | none | The UUID of the associated project. |
ruleTypeName | string | false | none | The name of the rule type that is associated with this rule. The rule type cannot be changed after the rule has been created. |
state | string | false | none | The current state of the rule. |
pendingApproval | boolean | false | none | Flag indicating whether the current state of the rule is pending approval. |
keywords | string | false | none | Keywords that apply to the rule. |
alertType | string | false | none | Alert type to be used for the rule. |
alertReason | string | false | none | Alert reason for any alerts that were generated by the rule. |
executionOrderType | integer | false | none | Type of the execution order. There are 3 pre-defined sets of rules. (-1) Pre Rules (0) Dependency Ordered rules (1) Post Rules The Pre-rule set executes first, then the dependency ordered rule set, then the post rule set. |
executionOrderPriority | integer | false | none | Priority of the execution order |
configuredOperationalState | string | false | none | The configured operational state of the rule. (0) Active (1) ExecutionDisabled |
operationalState | string | false | none | The operational state of the rule in the ODE. (-2) NotPresent - The rule is not running in the ODE (-1) Unknown - Connection to ODE not established (0) Active (1) ExecutionDisabled |
operationalTimeLimit | number | false | none | The maximum execution time for the rule (in microseconds). |
creationTimeStamp | string | false | none | none |
createdBy | string | false | none | none |
modifiedTimeStamp | string | false | none | none |
modifiedBy | string | false | none | none |
revision | number | false | none | The last revision update to the rule. Used for optimistic concurrency control. |
version | number | false | none | Version number of the rule schema |
Enumerated Values
Property | Value |
---|---|
ruleTypeName | variable |
ruleTypeName | decision |
executionOrderType | -1 |
executionOrderType | 0 |
executionOrderType | 1 |
configuredOperationalState | 0 |
configuredOperationalState | 1 |
operationalState | -2 |
operationalState | -1 |
operationalState | 0 |
operationalState | 1 |
rulewithcodev2
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"code": "string",
"description": "string",
"baseRuleId": "string",
"ruleVersion": 0,
"messageClassificationId": "30cfcff2-22df-4b7c-aa2d-6571c7fe702a",
"schemaName": "string",
"projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
"ruleTypeName": "decision",
"state": "string",
"pendingApproval": false,
"keywords": "string",
"alertType": "string",
"alertReason": "string",
"executionOrderType": -1,
"executionOrderPriority": 0,
"configuredOperationalState": "0",
"operationalTimeLimit": 0,
"creationTimeStamp": "string",
"createdBy": "string",
"modifiedTimeStamp": "string",
"modifiedBy": "string",
"revision": 0,
"version": 0
}
Properties
None
rulewithmetricsv2
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"baseRuleId": "string",
"ruleVersion": 0,
"messageClassificationId": "30cfcff2-22df-4b7c-aa2d-6571c7fe702a",
"schemaName": "string",
"projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
"ruleTypeName": "decision",
"state": "string",
"pendingApproval": false,
"keywords": "string",
"alertType": "string",
"alertReason": "string",
"executionOrderType": -1,
"executionOrderPriority": 0,
"configuredOperationalState": "0",
"operationalState": "-2",
"operationalTimeLimit": 0,
"creationTimeStamp": "string",
"createdBy": "string",
"modifiedTimeStamp": "string",
"modifiedBy": "string",
"revision": 0,
"version": 0,
"metrics": {
"total": {
"evaluated": 0,
"outcomeFired": 0,
"alertFired": 0,
"overtime": 0
},
"today": {
"evaluated": 0,
"outcomeFired": 0,
"alertFired": 0,
"overtime": 0
},
"today-1": {
"evaluated": 0,
"outcomeFired": 0,
"alertFired": 0,
"overtime": 0
},
"today-2": {
"evaluated": 0,
"outcomeFired": 0,
"alertFired": 0,
"overtime": 0
},
"today-3": {
"evaluated": 0,
"outcomeFired": 0,
"alertFired": 0,
"overtime": 0
},
"today-4": {
"evaluated": 0,
"outcomeFired": 0,
"alertFired": 0,
"overtime": 0
},
"today-5": {
"evaluated": 0,
"outcomeFired": 0,
"alertFired": 0,
"overtime": 0
},
"today-6": {
"evaluated": 0,
"outcomeFired": 0,
"alertFired": 0,
"overtime": 0
}
}
}
Properties
None
rulecode
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"code": "string",
"schemaName": "string",
"projectId": "5a8591dd-4039-49df-9202-96385ba3eff8"
}
Properties
None
parsedrule
{
"id": "string",
"usedActions": [
{
"actionId": "string",
"creationTimeStamp": "string",
"createdBy": "string"
}
],
"dependencies": [
{
"dependency": {
"dependencyType": "STRONG",
"ruleId": "string",
"baseRuleId": "string",
"usedVariables": [
{
"schemaName": "string",
"name": "string",
"jsonPath": "string",
"isModifying": true,
"type": "array",
"arrayItem": "none",
"variableId": "string",
"variableSetId": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string"
}
],
"creationTimeStamp": "string",
"createdBy": "string"
},
"resolvedRule": {
"ruleId": "string",
"baseRuleId": "string",
"ruleVersion": 0,
"name": "string",
"ruleTypeName": "string",
"state": "string"
}
}
],
"usedVariables": [
{
"schemaName": "string",
"name": "string",
"jsonPath": "string",
"isModifying": true,
"type": "array",
"arrayItem": "none",
"variableId": "string",
"variableSetId": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string"
}
],
"usedLists": [
{
"listName": "string",
"columns": [
{
"name": "string",
"datatype": "string",
"position": 0,
"isKey": true,
"keyPosition": 0
}
],
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string"
}
]
}
Properties
None
ruleWithLegalPreReqs
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"baseRuleId": "string",
"ruleVersion": 0,
"name": "string",
"ruleTypeName": "string",
"state": "string",
"validPreconditions": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"baseRuleId": "string",
"name": "string",
"state": "string"
}
],
"creationTimeStamp": "string",
"createdBy": "string",
"modifiedTimeStamp": "string",
"modifiedBy": "string",
"version": 0,
"revision": 0
}
The representation of a rule with its list of rules that are valid preconditions.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string(uuid) | false | none | The UUID of the rule. |
baseRuleId | string | false | none | The identifier of the base rule (shared by all versions of the rule). |
ruleVersion | number | false | none | The version number of the rule. |
name | string | false | none | The name of the rule. |
ruleTypeName | string | false | none | The name of the rule type that is associated with this rule. |
state | string | false | none | The current state of the rule. |
validPreconditions | [object] | false | none | The list of rules that are valid preconditions of the rule. The valid preconditions of a rule are other rules in the same project that: * use the same message schema * are in the same organizational unit lineage based on key code * satisfy the valid rule dependency criteria |
» id | string(uuid) | false | none | The id of the valid precondition rule. |
» baseRuleId | string | false | none | The base rule ID of the valid precondition rule. |
» name | string | false | none | The name of the valid precondition rule. |
» state | string | false | none | The current state of the valid precondition rule. |
creationTimeStamp | string | false | none | The timestamp when the rule was created. |
createdBy | string | false | none | The user who created the rule. |
modifiedTimeStamp | string | false | none | The timestamp when the rule was last modified. |
modifiedBy | string | false | none | The user who last modified the rule. |
version | integer | false | none | The version number of the object schema. |
revision | integer | false | none | The last revision update to the rule. |
validationRule
{
"code": "string",
"schemaName": "string"
}
minimal representation of a rule.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
code | string | true | none | A base64 encoded rule code. |
schemaName | string | true | none | The unique name of the associated message schema. |
ruleSyntaxError
{
"row": 0,
"column": 0,
"warning": true,
"message": "string",
"version": 0
}
Validation error in the rule code.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
row | integer | false | none | The line number of the error message. |
column | integer | false | none | The starting column number of the error message. |
warning | boolean | false | none | Not an error but a warning if true. |
message | string | false | none | The error message details. |
version | number | false | none | none |
ruleTransitionCollection
[
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"creationTimeStamp": "string",
"createdBy": "string",
"modifiedTimeStamp": "string",
"modifiedBy": "string",
"version": 0,
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
]
}
]
RuleTransitionCollection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
RuleTransitionCollection | [ruleTransitionItem] | false | none | A collection of rules changed by the rule transition request |
ruleDisableCollection
[
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"creationTimeStamp": "string",
"createdBy": "string",
"modifiedTimeStamp": "string",
"modifiedBy": "string",
"revision": 0,
"version": 0
}
]
ruleDisableCollection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
ruleDisableCollection | [ruleSummary] | false | none | A collection of rules changed by the rule enable or disable requests |
ruleSyntaxErrorCollection
{
"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": [
{
"row": 0,
"column": 0,
"warning": true,
"message": "string",
"version": 0
}
]
}
RuleSyntaxErrorCollection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
RuleSyntaxErrorCollection | any | false | none | A collection of rule syntax errors |
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 | [ruleSyntaxError] | false | none | The actual results of a query |
ruleSummary
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"creationTimeStamp": "string",
"createdBy": "string",
"modifiedTimeStamp": "string",
"modifiedBy": "string",
"revision": 0,
"version": 0
}
A summary of a detection rule
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string(uuid) | true | none | UUID of the rule |
name | string | false | none | Name of the rule |
description | string | false | none | Description of the rule |
creationTimeStamp | string | false | none | none |
createdBy | string | false | none | none |
modifiedTimeStamp | string | false | none | none |
modifiedBy | string | false | none | none |
revision | number | true | none | none |
version | number | false | none | none |
ruleSummaryCollection
{
"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": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"creationTimeStamp": "string",
"createdBy": "string",
"modifiedTimeStamp": "string",
"modifiedBy": "string",
"revision": 0,
"version": 0
}
]
}
RuleSummaryCollection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
RuleSummaryCollection | any | false | none | A collection of rule summary objects |
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 | [ruleSummary] | false | none | The actual results of a query |
ruleExportCollection
{
"rules": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"code": "string",
"description": "string",
"baseRuleId": "string",
"ruleVersion": 0,
"messageClassificationId": "30cfcff2-22df-4b7c-aa2d-6571c7fe702a",
"schemaName": "string",
"projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
"ruleTypeName": "decision",
"state": "string",
"pendingApproval": false,
"keywords": "string",
"alertType": "string",
"alertReason": "string",
"executionOrderType": -1,
"executionOrderPriority": 0,
"configuredOperationalState": "0",
"operationalTimeLimit": 0,
"creationTimeStamp": "string",
"createdBy": "string",
"modifiedTimeStamp": "string",
"modifiedBy": "string",
"revision": 0,
"version": 0,
"messageClassification": "string",
"usedVariables": [
{
"schemaName": "string",
"jsonPath": "string",
"name": "string",
"isProfile": true,
"variableSummary": {
"name": "string",
"displayName": "string",
"type": "array",
"description": "string",
"tags": [
{
"name": "string",
"value": "string"
}
],
"version": 1,
"minLength": 0,
"maxLength": 0,
"enumValues": [
"string"
],
"enumURI": "string",
"minimum": 0,
"maximum": 0,
"inclusiveMinimum": true,
"exclusiveMaximum": true,
"arrayItem": "none",
"minItems": 0,
"maxItems": 0,
"required": false,
"deprecated": false,
"private": false,
"access": "rw",
"isMissing": false,
"defaultValue": "",
"locked": true,
"userGroup": "DMSDefault",
"revision": 0,
"id": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"variableSetId": "string",
"jsonPath": "string"
}
}
],
"usedLists": [
{
"name": "string"
}
],
"dependencies": [
{
"baseRuleId": "string"
}
]
}
],
"version": 0
}
A collection of exported rules.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
rules | [ruleExport] | false | none | The exported rules. |
version | integer | false | none | The version of the rule export collection schema. |
ruleImportValidation
{
"ruleImportValidationResults": [
{
"baseRuleId": "string",
"name": "string",
"code": "string",
"alertTypeMatch": {
"value": "string",
"found": true
},
"baseRuleIdMapping": {
"originalValue": "string",
"mappedValue": "string"
},
"dependencyMappings": [
{
"originalValue": "string",
"mappedValue": "string"
}
],
"messageClassificationMatch": {
"value": "string",
"found": true
},
"messageClassificationMapping": {
"originalValue": "string",
"mappedValue": "string"
},
"schemaNameMatch": {
"value": "string",
"found": true
},
"usedVariableMatches": [
{
"value": "string",
"found": true
}
],
"usedListMatches": [
{
"value": "string",
"found": true
}
]
}
]
}
The validation result.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
ruleImportValidationResults | [ruleImportResult] | false | none | The collection of import validation results of the rules. |
ruleState
"Coding"
The current state of a rule
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | string | false | none | The current state of a rule |
Enumerated Values
Property | Value |
---|---|
anonymous | Coding |
anonymous | Testing |
anonymous | Production |
anonymous | Recycle |
ruleTransition
{
"rules": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"creationTimeStamp": "string",
"createdBy": "string",
"modifiedTimeStamp": "string",
"modifiedBy": "string",
"revision": 0,
"version": 0
}
],
"stateTransition": {
"sourceState": "Coding",
"destinationState": "Coding",
"fromEmailAddress": "user@example.com",
"toEmailAddresses": [
"user@example.com"
],
"userNotes": "string"
}
}
A collection of RuleSummary objects and a desired state transition
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
rules | [ruleSummary] | false | none | [A summary of a detection rule] |
stateTransition | stateTransition | false | none | Transition from source to destination state. |
stateTransition
{
"sourceState": "Coding",
"destinationState": "Coding",
"fromEmailAddress": "user@example.com",
"toEmailAddresses": [
"user@example.com"
],
"userNotes": "string"
}
Transition from source to destination state.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
sourceState | ruleState | true | none | The current state of a rule |
destinationState | ruleState | true | none | The current state of a rule |
fromEmailAddress | string(email) | false | none | The from email address for the transition request notification. Used only when the transition requires approval. |
toEmailAddresses | [string] | false | none | The to email addresses for the transition request notification. Used only when the transition requires approval. |
userNotes | string | false | none | An optional message from the requester describing the transition request. Used only when the transition requires approval. |
ruleIdList
{
"rules": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"creationTimeStamp": "string",
"createdBy": "string",
"modifiedTimeStamp": "string",
"modifiedBy": "string",
"revision": 0,
"version": 0
}
]
}
A collection of RuleSummary objects
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
rules | [ruleSummary] | false | none | [A summary of a detection rule] |
rulePrioritizationCollection
{
"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": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"baseRuleId": "string",
"ruleVersion": 0,
"name": "string",
"ruleTypeName": "string",
"state": "string",
"executionOrderType": -1,
"executionOrderPriority": 0,
"version": 0
}
]
}
A collection of rule prioritization objects.
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 | [rulePrioritization] | false | none | The actual results of a query. |
rulePrioritizationDiff
{
"diff": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"executionOrderType": -1,
"executionOrderPriority": 0
}
]
}
A collection of rule prioritization update objects.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
diff | [updateRulePrioritizationInput] | false | none | The array of rule prioritization updates. |
impactAnalysis
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"impactAnalysisNum": 0,
"status": "string",
"jobStartTime": "2019-08-24T14:15:22Z",
"jobEndTime": "2019-08-24T14:15:22Z",
"estJobEndTime": "2019-08-24T14:15:22Z",
"jobDuration": 0,
"jobId": "9d222c6d-893e-4e79-8201-3c9ca16a0f39",
"sessionId": "string",
"totalTransactionCount": 0,
"processedTransactionCount": 0,
"projectId": "string",
"canBeCanceled": false,
"canBeDeleted": false,
"isResultAvailable": false,
"isLogAvailable": false,
"isTimingMetricsAvailable": false,
"decisionMetrics": {
"tp": 0,
"tn": 0,
"fp": 0,
"fn": 0
},
"alertMetrics": {
"tp": 0,
"tn": 0,
"fp": 0,
"fn": 0
},
"alerts": 0,
"outcomes": {
"summary": {
"predictedConditionPositive": 0,
"predictedConditionNegative": 0
},
"distribution": [
{
"outcome": "string",
"code": 0,
"frequency": 0
}
]
},
"alertTypeMetrics": [
{
"code": "string",
"name": "string",
"tp": 0,
"tn": 0,
"fp": 0,
"fn": 0
}
],
"decisionValueMetrics": {
"tp": 0,
"fn": 0
},
"criteria": {
"name": "string",
"description": "string",
"rules": [
{
"ruleId": "70af3071-65d9-4ec3-b3cb-5283e8d55dac",
"baseRuleId": "string",
"ruleVersion": 0,
"executionOrderType": 0,
"name": "string",
"description": "string",
"state": "string",
"schemaName": "string",
"alertTypeCode": "string",
"alertTypeName": "string",
"messageClassificationKeyCode": "string",
"messageClassificationDisplayName": "string",
"code": "string"
}
],
"rangeStartDate": "string",
"rangeEndDate": "string",
"outcomeLimit": 0,
"alertLimit": 0,
"logWithAdditionalDetails": true,
"userVariablePrimingDuration": 0,
"userVariablePrimingUnit": "HOURS",
"forceUserVariableRecalculation": true
},
"creationTimeStamp": "string",
"createdBy": "string",
"version": 0,
"revision": 0
}
A detection impact analysis
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string(uuid) | false | none | The UUID of the impact analysis. |
name | string | true | none | The name of the impact analysis. Valid values are letters, numbers, hyphens, underscores, and spaces. |
description | string | false | none | Description of the impact analysis. |
impactAnalysisNum | integer | false | none | Impact analysis number. |
status | string | false | none | The status of the impact analysis run. |
jobStartTime | string(date-time) | false | none | The timestamp when the impact analysis job started, in the format of YYYY-MM-DDThh:mm:ss.sssZ . |
jobEndTime | string(date-time) | false | none | The timestamp when the impact analysis job completed, in the format of YYYY-MM-DDThh:mm:ss.sssZ . |
estJobEndTime | string(date-time) | false | none | The estimated timestamp when the impact analysis job will be completed, in the format of YYYY-MM-DDThh:mm:ss.sssZ . The estimated time will be available only when the job has started processing transactions. |
jobDuration | integer | false | none | The time in seconds the job is running. |
jobId | string(uuid) | false | none | The UUID of the job submitted. |
sessionId | string | false | none | The session ID used for impact analysis. |
totalTransactionCount | number | false | none | Total number of transactions processed. |
processedTransactionCount | number | false | none | Number of transactions processed so far. |
projectId | string | false | none | The UUID of the associated project. |
canBeCanceled | boolean | false | none | Flag indicating whether the impact analysis can be canceled or not. |
canBeDeleted | boolean | false | none | Flag indicating whether the impact analysis can be deleted or not. |
isResultAvailable | boolean | false | none | Flag indicating whether result is available or not. |
isLogAvailable | boolean | false | none | Flag indicating whether log is available or not. |
isTimingMetricsAvailable | boolean | false | none | Flag indicating whether timing metrics is available or not. |
decisionMetrics | confusionMetrics | false | none | Confusion metrics |
alertMetrics | confusionMetrics | false | none | Confusion metrics |
alerts | number | false | none | Number of alerts generated. |
outcomes | outcomes | false | none | Outcome details |
alertTypeMetrics | [alertTypeMatrix] | false | none | Alert type metrics. |
decisionValueMetrics | decisionValueMetrics | false | none | Decision value metrics. |
criteria | impactAnalysisCriteria | false | none | A detection impact analysis criteria |
creationTimeStamp | string | false | none | none |
createdBy | string | false | none | none |
version | number | false | none | Version number of the impact analysis schema |
revision | number | false | none | The last revision update to the impact analysis. |
impactAnalysisCriteria
{
"name": "string",
"description": "string",
"rules": [
{
"ruleId": "70af3071-65d9-4ec3-b3cb-5283e8d55dac",
"baseRuleId": "string",
"ruleVersion": 0,
"executionOrderType": 0,
"name": "string",
"description": "string",
"state": "string",
"schemaName": "string",
"alertTypeCode": "string",
"alertTypeName": "string",
"messageClassificationKeyCode": "string",
"messageClassificationDisplayName": "string",
"code": "string"
}
],
"rangeStartDate": "string",
"rangeEndDate": "string",
"outcomeLimit": 0,
"alertLimit": 0,
"logWithAdditionalDetails": true,
"userVariablePrimingDuration": 0,
"userVariablePrimingUnit": "HOURS",
"forceUserVariableRecalculation": true
}
A detection impact analysis criteria
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | true | none | The name of the impact analysis. Valid values are letters, numbers, hyphens, underscores, and spaces. |
description | string | false | none | Description of the impact analysis. |
rules | [impactAnalysisRule] | true | none | Rules selected for the impact analysis. |
rangeStartDate | string | true | none | Transaction range start date. |
rangeEndDate | string | true | none | Transaction range end date. |
outcomeLimit | number | false | none | Decision outcome limit for Impact Analysis. |
alertLimit | number | false | none | Alert limit for Impact Analysis. |
logWithAdditionalDetails | boolean | false | none | Additional log details. |
userVariablePrimingDuration | number | false | none | User variable priming duration. |
userVariablePrimingUnit | string | false | none | User variable priming duration unit. |
forceUserVariableRecalculation | boolean | false | none | Whether to force user variable recalculation or not. |
Enumerated Values
Property | Value |
---|---|
userVariablePrimingUnit | HOURS |
userVariablePrimingUnit | DAYS |
impactAnalysisRule
{
"ruleId": "70af3071-65d9-4ec3-b3cb-5283e8d55dac",
"baseRuleId": "string",
"ruleVersion": 0,
"executionOrderType": 0,
"name": "string",
"description": "string",
"state": "string",
"schemaName": "string",
"alertTypeCode": "string",
"alertTypeName": "string",
"messageClassificationKeyCode": "string",
"messageClassificationDisplayName": "string",
"code": "string"
}
Rule used to run Impact Analysis
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
ruleId | string(uuid) | false | none | UUID of the rule |
baseRuleId | string | false | none | The identifier of the base rule |
ruleVersion | number | false | none | The version number of the rule. |
executionOrderType | number | false | none | Type of the execution order. There are 3 pre-defined sets of rules. (-1) Pre Rules (0) Dependency Ordered rules (1) Post Rules The Pre-rule set executes first, then the dependency ordered rule set, then the post rule set. |
name | string | false | none | The name of the rule. Valid values are letters, numbers, hyphens, underscores, and spaces. |
description | string | false | none | The description of the rule. |
state | string | false | none | The y state of the rule. |
schemaName | string | false | none | The unique name of the associated message schema. |
alertTypeCode | string | false | none | Alert type to be used for the rule. |
alertTypeName | string | false | none | The name of the alert type. |
messageClassificationKeyCode | string | false | none | The internal short name of the organization. |
messageClassificationDisplayName | string | false | none | The descriptive name of the organization. |
code | string | false | none | The base64 encoded rule code. |
impactAnalysisCollection
{
"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": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"impactAnalysisNum": 0,
"status": "string",
"jobStartTime": "2019-08-24T14:15:22Z",
"jobEndTime": "2019-08-24T14:15:22Z",
"estJobEndTime": "2019-08-24T14:15:22Z",
"jobDuration": 0,
"jobId": "9d222c6d-893e-4e79-8201-3c9ca16a0f39",
"sessionId": "string",
"totalTransactionCount": 0,
"processedTransactionCount": 0,
"projectId": "string",
"canBeCanceled": false,
"canBeDeleted": false,
"isResultAvailable": false,
"isLogAvailable": false,
"isTimingMetricsAvailable": false,
"creationTimeStamp": "string",
"createdBy": "string",
"version": 0
}
]
}
ImpactAnalysisCollection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
ImpactAnalysisCollection | any | false | none | A collection of impact analysis objects |
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 | [impactAnalysisSummary] | false | none | The actual results of a query |
impactAnalysisRuleCollection
{
"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": [
{
"ruleId": "70af3071-65d9-4ec3-b3cb-5283e8d55dac",
"baseRuleId": "string",
"ruleVersion": 0,
"name": "string",
"description": "string",
"revision": 0,
"state": "string",
"schemaName": "string",
"alertTypeCode": "string",
"alertTypeName": "string",
"messageClassificationKeyCode": "string",
"messageClassificationDisplayName": "string"
}
]
}
ImpactAnalysisRuleCollection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
ImpactAnalysisRuleCollection | any | false | none | A collection of impact analysis rule objects |
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 | [impactAnalysisRuleSummary] | false | none | The actual results of a query |
auditLogCollection
{
"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": [
{
"version": 0,
"auditId": "string",
"ruleId": "string",
"baseRuleId": "string",
"ruleName": "string",
"ruleVersion": 0,
"auditTypeCode": "Created",
"auditTypeText": "string",
"creationTimeStamp": "string",
"createdBy": "string"
}
]
}
AuditLogCollection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
AuditLogCollection | any | false | none | A collection of audit log objects. Audit log of a particular rule as it changes state and gets deployed. |
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 | [auditLog] | false | none | The actual results of a query. |
auditLog
{
"version": 0,
"auditId": "string",
"ruleId": "string",
"baseRuleId": "string",
"ruleName": "string",
"ruleVersion": 0,
"auditTypeCode": "Created",
"auditTypeText": "string",
"creationTimeStamp": "string",
"createdBy": "string"
}
Rule activity information.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
version | number | false | none | none |
auditId | string | false | none | The UUID of the audit log. |
ruleId | string | false | none | The UUID of the rule Id. |
baseRuleId | string | false | none | The base rule Id. |
ruleName | string | false | none | Name of the rule. |
ruleVersion | number | false | none | Rule version. |
auditTypeCode | string | false | none | Audit type code. |
auditTypeText | string | false | none | Audit information. |
creationTimeStamp | string | false | none | none |
createdBy | string | false | none | none |
Enumerated Values
Property | Value |
---|---|
auditTypeCode | Created |
auditTypeCode | Requested Production |
auditTypeCode | Approved Production |
auditTypeCode | New Version |
auditTypeCode | Archived |
auditTypeCode | Coding |
auditTypeCode | Testing |
auditTypeCode | Priority Changed |
auditTypeCode | Requested Recycle |
auditTypeCode | Approved Recycle |
auditTypeCode | Deployed |
auditTypeCode | Disabled |
auditTypeCode | Enabled |
organizationv2
{
"id": "string",
"name": "string",
"displayName": "string",
"description": "string",
"messageClassificationId": "string",
"profileSchemaName": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"revision": 0,
"version": 0,
"roleRelations": [
{
"roleId": "string"
}
],
"schemaRelations": [
{
"schemaName": "string"
}
],
"listRelations": [
{
"listId": "string"
}
],
"messageClassification": {
"id": "string",
"parentId": "string",
"name": "string",
"displayName": "string",
"keyCode": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"revision": 0,
"version": 0,
"messageClassifications": [
null
],
"childCount": 0
}
}
An organization
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | The UUID of the organization. |
name | string | true | none | The internal short name of the organization. Valid values are letters, numbers, hyphens, and underscores. |
displayName | string | true | none | The descriptive name of the organization. |
description | string | false | none | The description of the organization. |
messageClassificationId | string | true | none | The UUID of the associated message classification. |
profileSchemaName | string | false | none | The name of unique profile schema of the organization. |
creationTimeStamp | string(date-time) | false | none | none |
createdBy | string | false | none | none |
modifiedTimeStamp | string(date-time) | false | none | none |
modifiedBy | string | false | none | none |
revision | number | false | none | none |
version | integer | false | none | The representation version. This is version 2 of this representation. |
roleRelations | [object] | false | none | The list of roles that are associated with the organization. |
» roleId | string | true | none | The ID of a role |
schemaRelations | [object] | false | none | The list of message schemas that are associated with the organization. |
» schemaName | string | true | none | Unique name of a message schema |
listRelations | [object] | false | none | The list of lists that are associated with the organization. |
» listId | string | true | none | The UUID of the list. |
messageClassification | messageClassification | false | none | A message classification. |
organizationCollectionv2
{
"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": [
{
"id": "string",
"name": "string",
"displayName": "string",
"description": "string",
"messageClassificationId": "string",
"profileSchemaName": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"revision": 0,
"version": 0,
"roleRelations": [
{
"roleId": "string"
}
],
"schemaRelations": [
{
"schemaName": "string"
}
],
"listRelations": [
{
"listId": "string"
}
],
"messageClassification": {
"id": "string",
"parentId": "string",
"name": "string",
"displayName": "string",
"keyCode": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"revision": 0,
"version": 0,
"messageClassifications": [
null
],
"childCount": 0
}
}
]
}
OrganizationCollection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
OrganizationCollection | any | false | none | A collection of organization objects |
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 | [organizationv2] | false | none | The actual results of a query |
createOrganizationInput
{
"id": "string",
"name": "string",
"displayName": "string",
"description": "string",
"messageClassificationId": "string",
"profileSchemaName": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"revision": 0,
"version": 0,
"roleRelations": [
{
"roleId": "string"
}
],
"schemaRelations": [
{
"schemaName": "string"
}
],
"listRelations": [
{
"listId": "string"
}
],
"messageClassification": {
"id": "string",
"parentId": "string",
"name": "string",
"displayName": "string",
"keyCode": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"revision": 0,
"version": 0,
"messageClassifications": [
null
],
"childCount": 0
}
}
CreateOrganization
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
CreateOrganization | organizationv2 | false | none | A create request representation for an organization. |
updateOrganizationInput
{
"name": "string",
"displayName": "string",
"description": "string"
}
An update request representation for an organization.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | false | none | The internal short name of the organization. |
displayName | string | false | none | The descriptive name of the organization. |
description | string | false | none | The description of the organization. |
messageClassification
{
"id": "string",
"parentId": "string",
"name": "string",
"displayName": "string",
"keyCode": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"revision": 0,
"version": 0,
"messageClassifications": [
null
],
"childCount": 0
}
A message classification.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | UUID of the message classification |
parentId | string | false | none | UUID of the parent message classification. Specify if this message classification is not the root. |
name | string | true | none | The internal short name of the message classification. Valid values are letters, numbers, hyphens, and underscores. |
displayName | string | true | none | The descriptive name of the message classification |
keyCode | string | false | none | The unique code that represents the transaction population of the message classification. A key code: * must begin with digit '1' * must contain only digits and the '.' separator * may consist of up to 7 segments, each separated by '.' * each segment may be up to 4 digits in the range 1 - 9999 The key code also reflects the hierarchical position of the message classification, and extends its parent's key code. For example, the root message classification's key code is '1'; the next level message classification’s key code should use '1.1', '1.2' ... '1.9999', and so on. |
creationTimeStamp | string(date-time) | false | none | none |
createdBy | string | false | none | none |
modifiedTimeStamp | string(date-time) | false | none | none |
modifiedBy | string | false | none | none |
revision | number | false | none | none |
version | number | false | none | none |
messageClassifications | [messageClassification] | false | none | Contains a list of sub-message classifications. Each item is also an object of type message classification. |
childCount | number | false | none | The count of direct sub-message classifications |
messageClassificationCollection
{
"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": [
{
"id": "string",
"parentId": "string",
"name": "string",
"displayName": "string",
"keyCode": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"revision": 0,
"version": 0,
"messageClassifications": [
null
],
"childCount": 0
}
]
}
MessageClassificationCollection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
MessageClassificationCollection | any | false | none | A collection of message classification objects |
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 | [messageClassification] | false | none | The actual results of a query |
messageClassificationCsv
"string"
The column headings and data types of a CSV file for message classification import:
keyCode: (Required) The message classification key code. Contains string values of up to 36 characters [0-9\.].
name: (Required) The internal short name of the message classification. Contains string values of up to 16 characters.
displayName: (Required) The descriptive name of the message classification. Contains string values of up to 75 characters.
createdBy: (Optional) The user ID that created the message classification. Contains string values of up to 40 characters.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | string | false | none | The column headings and data types of a CSV file for message classification import:
|
messageClassificationImportValidation
{
"messageClassification": {
"name": "string",
"displayName": "string",
"keyCode": "string",
"messageClassifications": [
null
],
"childCount": 0,
"version": 0
},
"messageClassificationCount": 0,
"orphanRecordCount": 0,
"isValid": true,
"errors": [
{
"error": {
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
},
"details": [
{
"row": 0,
"ref": "string",
"value": "string",
"message": "string"
}
]
}
]
}
A validation response representation for a message classification import.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
messageClassification | messageClassificationPreview | false | none | The preview of a message classification to be created. |
messageClassificationCount | number | false | none | The number of valid message classifications to be created from the import file. |
orphanRecordCount | number | false | none | The number of orphan records found in the import file. |
isValid | boolean | false | none | The indicator whether the import file is valid. |
errors | [importValidationError] | false | none | Validation errors found in the import file. |
updateMessageClassificationInput
{
"name": "string",
"displayName": "string"
}
An update request representation for a message classification.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | false | none | The internal short name of the message classification |
displayName | string | false | none | The descriptive name of the message classification |
projectv2
{
"createdBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"description": "string",
"id": "string",
"modifiedBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"name": "string",
"organizationId": "string",
"revision": 0,
"messageClassificationRelations": [
{
"messageClassificationId": "string"
}
],
"schemaRelations": [
{
"schemaName": "string"
}
],
"userRelations": [
{
"userId": "string"
}
],
"listRelations": [
{
"listId": "string"
}
]
}
A detection project
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
createdBy | string | false | none | The user who created the project. |
creationTimeStamp | string(date-time) | false | none | The timestamp when the project was created. |
description | string | false | none | The description of the project. |
id | string | false | none | The identifier, which is a UUID, of the project. |
modifiedBy | string | false | none | The user who last modified the project. |
modifiedTimeStamp | string(date-time) | false | none | The timestamp when the project was last modified. |
name | string | true | none | The name of the project. Valid values are letters, numbers, hyphens, underscores, and spaces. |
organizationId | string | true | none | The ID, a UUID, of the orgranization that the project is associated with. |
revision | number | false | none | The last revision update to the poject. Used for optimistic concurrency control. |
messageClassificationRelations | [object] | false | none | A collection of message classifications that are related to the project. The message classifications must be members of the organization that is related to the project. |
» messageClassificationId | string | true | none | UUID of a message classification |
schemaRelations | [object] | false | none | The list of message schemas that are associated with the project. |
» schemaName | string | true | none | Unique name of a message schema |
userRelations | [object] | false | none | A collection of selected users that belong to the organization of the project. |
» userId | string | true | none | ID of a user |
listRelations | [object] | false | none | The list of lists that are associated with the project. |
» listId | string | true | none | The UUID of the list. |
projectCollection
{
"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",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"description": "string",
"id": "string",
"modifiedBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"name": "string",
"organizationId": "string",
"revision": 0
}
]
}
ProjectCollection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
ProjectCollection | any | false | none | A collection of project objects |
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 | [projectSummary] | false | none | The actual results of a query |
role
{
"id": "string",
"name": "string",
"description": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"provideId": "string",
"state": "string",
"version": 0,
"members": [
{
"id": "string",
"name": "string",
"type": "user",
"provideId": "string",
"version": 0,
"members": [
null
]
}
]
}
A role is a collection of users or roles of the detection definition service. It is also the group object in the Identity Service. Please refer to the REST document of the Identity Service for complete information.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | true | none | The ID of the role |
name | string | true | none | The name of the role |
description | string | false | none | The description of the role |
creationTimeStamp | string(date-time) | false | none | none |
modifiedTimeStamp | string(date-time) | false | none | none |
provideId | string | false | none | Indicates whether the role is stored locally or is from another source (for example, LDAP). |
state | string | false | none | Indicate if the role is "active", "inactive", or "locked". |
version | number | false | none | none |
members | [roleMember] | false | none | Provides a list of users that have been assigned this role. |
roleCollection
{
"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": [
{
"id": "string",
"name": "string",
"description": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"provideId": "string",
"state": "string",
"version": 0,
"members": [
{
"id": "string",
"name": "string",
"type": "user",
"provideId": "string",
"version": 0,
"members": [
null
]
}
]
}
]
}
RoleCollection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
RoleCollection | any | false | none | A collection of role objects |
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 | [role] | false | none | The actual results of a query |
user
{
"id": "string",
"name": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"provideId": "string",
"title": "string",
"state": "string",
"version": 0,
"memberOf": [
{
"id": "string",
"name": "string",
"type": "user",
"provideId": "string",
"version": 0,
"members": [
null
]
}
]
}
An user of the detection definition service. It is also the user object in the SAS Identity Service. Please refer to the REST document of the Identity Service for complete information.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | true | none | The ID of the user |
name | string | true | none | The name of the user |
creationTimeStamp | string(date-time) | false | none | none |
modifiedTimeStamp | string(date-time) | false | none | none |
provideId | string | false | none | Indicate if the user is a "local" stored or from other sources, such as LDAP. |
title | string | false | none | User's title |
state | string | false | none | Indicate if the user is "active", "inactive", or "locked". |
version | number | false | none | none |
memberOf | [roleMember] | false | none | Provides a list of roles that the user is a member of. |
userCollection
{
"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": [
{
"id": "string",
"name": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"provideId": "string",
"title": "string",
"state": "string",
"version": 0,
"memberOf": [
{
"id": "string",
"name": "string",
"type": "user",
"provideId": "string",
"version": 0,
"members": [
null
]
}
]
}
]
}
UserCollection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
UserCollection | any | false | none | A collection of user objects |
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 | [user] | false | none | The actual results of a query |
capabilitySummary
{
"name": "string",
"description": "string",
"scope": "string"
}
A capability summary object.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | true | none | The unique name of the capability |
description | string | false | none | The description of the capability |
scope | string | true | none | Indicates whether the capability is applied at the system, organization, or project level. |
capabilitySummaryCollection
{
"name": "string",
"start": 0,
"limit": 0,
"count": 0,
"accept": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0,
"items": [
{
"name": "string",
"description": "string",
"scope": "string"
}
]
}
CapabilitySummaryCollection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
CapabilitySummaryCollection | any | false | none | A collection of capability summary objects |
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 | [capabilitySummary] | false | none | The actual results of a query |
function
{
"name": "string",
"reqArgCnt": 0,
"version": 0
}
The function supported by the language
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | true | none | The name of the function |
reqArgCnt | integer | false | none | The number of required arguments for the function |
version | number | false | none | none |
functionCollection
{
"name": "string",
"start": 0,
"limit": 0,
"count": 0,
"accept": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0,
"items": [
{
"name": "string",
"reqArgCnt": 0,
"version": 0
}
]
}
FunctionCollection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
FunctionCollection | any | false | none | A collection of function objects |
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 | [function] | false | none | The actual results of a query |
macro
{
"name": "string",
"code": "string",
"reqArgCnt": 0,
"createAlert": false,
"version": 0
}
The macro supported by the language
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | true | none | The name of the macro |
code | string | false | none | The code template for the macro |
reqArgCnt | integer | false | none | The number of required arguments for the macro |
createAlert | boolean | false | none | Indicator that the action creates an alert. |
version | number | false | none | none |
macroCollection
{
"name": "string",
"start": 0,
"limit": 0,
"count": 0,
"accept": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0,
"items": [
{
"name": "string",
"code": "string",
"reqArgCnt": 0,
"createAlert": false,
"version": 0
}
]
}
MacroCollection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
MacroCollection | any | false | none | A collection of macro objects |
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 | [macro] | false | none | The actual results of a query |
modelv2
{
"id": "string",
"version": 0,
"modelLabel": "string",
"modelPackage": "string",
"organizationId": "string",
"messageClassifications": [
{
"id": "string",
"parentId": "string",
"name": "string",
"displayName": "string",
"keyCode": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"revision": 0,
"version": 0,
"messageClassifications": [
null
],
"childCount": 0
}
],
"rules": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"baseRuleId": "string",
"ruleVersion": 0,
"messageClassificationId": "30cfcff2-22df-4b7c-aa2d-6571c7fe702a",
"schemaName": "string",
"projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
"ruleTypeName": "decision",
"state": "string",
"pendingApproval": false,
"keywords": "string",
"alertType": "string",
"alertReason": "string",
"executionOrderType": -1,
"executionOrderPriority": 0,
"configuredOperationalState": "0",
"operationalState": "-2",
"operationalTimeLimit": 0,
"creationTimeStamp": "string",
"createdBy": "string",
"modifiedTimeStamp": "string",
"modifiedBy": "string",
"revision": 0,
"version": 0
}
],
"createdBy": "string",
"modifiedBy": "string",
"creationTimeStamp": "string",
"modifiedTimeStamp": "string",
"revision": 0,
"modelScoreVariable": {
"name": "string",
"displayName": "string",
"inUse": true
}
}
getsasmodelv2
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | The UUID of the model. |
version | number | false | none | version number for model. |
modelLabel | string | true | none | The label of the model. Valid values are letters, numbers, hyphens, underscores, and spaces. |
modelPackage | string | false | none | model package's unique name |
organizationId | string | true | none | The ID, a UUID, of the organization that the model is associated with. |
messageClassifications | [messageClassification] | false | none | The message classifications that the model is associated with. |
rules | [rulev2] | false | none | The rules that are applied by the model to evaluate the score. |
createdBy | string | false | none | The user who created the model. |
modifiedBy | string | false | none | The last user who modified the model. |
creationTimeStamp | string | false | none | The creation timestamp of a model, in the format of YYYY-MM-DDThh:mm:ss.sssZ . |
modifiedTimeStamp | string | false | none | The timestamp of last update of a model, in the format of YYYY-MM-DDThh:mm:ss.sssZ . |
revision | integer | false | none | The revision ID. |
modelScoreVariable | modelScoreVariable | true | none | A score field for model |
postModelv2
{
"modelLabel": "string",
"messageClassificationRelations": [
{
"messageClassificationId": "string"
}
],
"modelScoreVariable": {
"name": "string",
"displayName": "string",
"inUse": true
},
"modelPackage": "stringstring",
"organizationId": "string"
}
A model object that represents input required for model creation.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
modelLabel | string | true | none | The label of the model. Valid values are letters, numbers, hyphens, underscores, and spaces. |
messageClassificationRelations | [object] | true | none | The list of UUIDs of the associated message classifications. |
» messageClassificationId | string | false | none | The ID of a message classification |
modelScoreVariable | modelScoreVariable | true | none | A score field for model |
modelPackage | string | true | none | Name of the Package |
organizationId | string | true | none | The ID, a UUID, of the orgranization that the model is associated with. |
postModelOutputv2
{
"id": "string",
"version": 0,
"modelLabel": "string",
"messageClassificationRelations": [
{
"messageClassificationId": "string"
}
],
"rules": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"baseRuleId": "string",
"ruleVersion": 0,
"messageClassificationId": "30cfcff2-22df-4b7c-aa2d-6571c7fe702a",
"schemaName": "string",
"projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
"ruleTypeName": "decision",
"state": "string",
"pendingApproval": false,
"keywords": "string",
"alertType": "string",
"alertReason": "string",
"executionOrderType": -1,
"executionOrderPriority": 0,
"configuredOperationalState": "0",
"operationalState": "-2",
"operationalTimeLimit": 0,
"creationTimeStamp": "string",
"createdBy": "string",
"modifiedTimeStamp": "string",
"modifiedBy": "string",
"revision": 0,
"version": 0
}
],
"createdBy": "string",
"modifiedBy": "string",
"creationTimeStamp": "string",
"modifiedTimeStamp": "string",
"revision": 0,
"modelScoreVariable": {
"name": "string",
"displayName": "string",
"inUse": true
},
"organizationId": "string"
}
A model object returned in response for POST and PATCH requests.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | The UUID of the model. |
version | number | false | none | version number for model. |
modelLabel | string | true | none | The label of the model. Valid values are letters, numbers, hyphens, underscores, and spaces. |
messageClassificationRelations | [object] | true | none | The list of UUIDs of the associated message classifications. |
» messageClassificationId | string | false | none | The ID of a message classification |
rules | [rulev2] | false | none | The rules that are applied by the model to evaluate the score. |
createdBy | string | false | none | The user who created the model. |
modifiedBy | string | false | none | The last user who modified the model. |
creationTimeStamp | string | false | none | The creation timestamp of a model, in the format of YYYY-MM-DDThh:mm:ss.sssZ . |
modifiedTimeStamp | string | false | none | The timestamp of last update of a model, in the format of YYYY-MM-DDThh:mm:ss.sssZ . |
revision | integer | false | none | The revision ID. |
modelScoreVariable | modelScoreVariable | true | none | A score field for model |
organizationId | string | true | none | The ID, a UUID, of the orgranization that the model is associated with. |
modelScoreVariable
{
"name": "string",
"displayName": "string",
"inUse": true
}
A score field for model
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | false | none | name for score variable. |
displayName | string | false | none | label for score variable (shown to user in UI) |
inUse | boolean | false | none | indicates if this scoreVariable is in use within/across the model. |
updateModelv2
{
"modelLabel": "string",
"messageClassificationRelations": [
{
"messageClassificationId": "string"
}
]
}
A model containing details to be updated.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
modelLabel | string | false | none | label used for model. Valid values are letters, numbers, hyphens, underscores, and spaces. |
messageClassificationRelations | [object] | false | none | The list of UUIDs of the associated message classifications. |
» messageClassificationId | string | false | none | The ID of a message classification |
modelCollectionv2
{
"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": [
{
"id": "string",
"version": 0,
"modelLabel": "string",
"modelPackage": "string",
"organizationId": "string",
"messageClassifications": [
{
"id": "string",
"parentId": "string",
"name": "string",
"displayName": "string",
"keyCode": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"revision": 0,
"version": 0,
"messageClassifications": [
null
],
"childCount": 0
}
],
"rules": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"baseRuleId": "string",
"ruleVersion": 0,
"messageClassificationId": "30cfcff2-22df-4b7c-aa2d-6571c7fe702a",
"schemaName": "string",
"projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
"ruleTypeName": "decision",
"state": "string",
"pendingApproval": false,
"keywords": "string",
"alertType": "string",
"alertReason": "string",
"executionOrderType": -1,
"executionOrderPriority": 0,
"configuredOperationalState": "0",
"operationalState": "-2",
"operationalTimeLimit": 0,
"creationTimeStamp": "string",
"createdBy": "string",
"modifiedTimeStamp": "string",
"modifiedBy": "string",
"revision": 0,
"version": 0
}
],
"createdBy": "string",
"modifiedBy": "string",
"creationTimeStamp": "string",
"modifiedTimeStamp": "string",
"revision": 0,
"modelScoreVariable": {
"name": "string",
"displayName": "string",
"inUse": true
}
}
]
}
ModelCollection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
ModelCollection | any | false | none | A collection of model objects |
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 | [modelv2] | false | none | The actual results of a query |
alertType
{
"code": "string",
"name": "string",
"variableRelation": {
"messageName": "string",
"pathName": "string",
"name": "string"
},
"createdBy": "string",
"modifiedBy": "string",
"creationTimeStamp": "string",
"modifiedTimeStamp": "string",
"revision": 0
}
An Alert Type
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
code | string | true | none | The alert type code. Valid values are letters, and numbers. |
name | string | true | none | The name of the alert type. Valid values are letters, numbers, and underscores. |
variableRelation | variableRelation | true | none | Information about the variable on which the alert type is created. |
createdBy | string | false | none | The user who created the alert type. |
modifiedBy | string | false | none | The last user who modified the alert type. |
creationTimeStamp | string | false | none | The creation timestamp of a alert type. |
modifiedTimeStamp | string | false | none | The timestamp of last update of a alert type. |
revision | integer | false | none | The revision ID. |
alertTypeCollection
{
"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",
"name": "string",
"variableRelation": {
"messageName": "string",
"pathName": "string",
"name": "string"
},
"createdBy": "string",
"modifiedBy": "string",
"creationTimeStamp": "string",
"modifiedTimeStamp": "string",
"revision": 0
}
]
}
AlertTypeCollection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
AlertTypeCollection | any | false | none | A collection of alert type objects |
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 | [alertType] | false | none | The actual results of a query |
scoreVariables
[
{
"name": "string",
"displayName": "string",
"inUse": true
}
]
Array of model score variable
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [modelScoreVariable] | false | none | Array of model score variable |
packages
[
{
"modelPackage": "string",
"scores": [
"string"
]
}
]
Array of model's packages
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [package] | false | none | Array of model's packages |
messageSummaryCollection
{
"name": "string",
"start": 0,
"limit": 0,
"count": 0,
"accept": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0,
"items": [
{
"name": "string",
"displayName": "string",
"description": "string",
"type": "financial",
"state": "Developing",
"revision": 0,
"id": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"parentMsgCnt": 0,
"memberMsgCnt": 0,
"version": 1
}
]
}
MessageSummaryCollection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
MessageSummaryCollection | any | false | none | This is a collection of message summary. |
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 | [messageSummary] | false | none | The actual results of a query |
messageSummary
{
"name": "string",
"displayName": "string",
"description": "string",
"type": "financial",
"state": "Developing",
"revision": 0,
"id": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"parentMsgCnt": 0,
"memberMsgCnt": 0,
"version": 1
}
MessageSummary
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
MessageSummary | any | false | none | A summary representation of a message |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | updateMessage | false | none | An update request representation for a message. |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» id | string | false | none | The identifier of the message. |
» creationTimeStamp | string(date-time) | false | none | The creation timestamp of a message |
» createdBy | string | false | none | The user who created the message |
» modifiedTimeStamp | string(date-time) | false | none | The last modified timestamp of the message |
» modifiedBy | string | false | none | The last user who modified the message |
» parentMsgCnt | integer | false | none | The number of message schemas that owns this message schema |
» memberMsgCnt | integer | false | none | The number of message schemas owned by this message schema |
» version | integer | false | none | The representation version of a message |
variableSummary
{
"name": "string",
"displayName": "string",
"type": "array",
"description": "string",
"tags": [
{
"name": "string",
"value": "string"
}
],
"version": 1,
"minLength": 0,
"maxLength": 0,
"enumValues": [
"string"
],
"enumURI": "string",
"minimum": 0,
"maximum": 0,
"inclusiveMinimum": true,
"exclusiveMaximum": true,
"arrayItem": "none",
"minItems": 0,
"maxItems": 0,
"required": false,
"deprecated": false,
"private": false,
"access": "rw",
"isMissing": false,
"defaultValue": "",
"locked": true,
"userGroup": "DMSDefault",
"revision": 0,
"id": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"variableSetId": "string",
"jsonPath": "string"
}
VariableSummary
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
VariableSummary | any | false | none | A summary representation of a variable. |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | updateVariable | false | none | An update request representation for a variable. |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» id | string | false | none | The identifier of the variable. |
» creationTimeStamp | string(date-time) | false | none | The creation timestamp of a variable |
» createdBy | string | false | none | The user who created the variable |
» modifiedTimeStamp | string(date-time) | false | none | The last modified timestamp of the variable |
» modifiedBy | string | false | none | The last user who modified the variable. |
» variableSetId | string | false | none | This is an identifier (in uuid) for the variable set. |
» jsonPath | string | false | none | This represents the jsonpath expression to uniquely identify the variable. |
variableSummaryCollection
{
"name": "string",
"start": 0,
"limit": 0,
"count": 0,
"accept": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0,
"items": [
{
"name": "string",
"displayName": "string",
"type": "array",
"description": "string",
"tags": [
{
"name": "string",
"value": "string"
}
],
"version": 1,
"minLength": 0,
"maxLength": 0,
"enumValues": [
"string"
],
"enumURI": "string",
"minimum": 0,
"maximum": 0,
"inclusiveMinimum": true,
"exclusiveMaximum": true,
"arrayItem": "none",
"minItems": 0,
"maxItems": 0,
"required": false,
"deprecated": false,
"private": false,
"access": "rw",
"isMissing": false,
"defaultValue": "",
"locked": true,
"userGroup": "DMSDefault",
"revision": 0,
"id": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"variableSetId": "string",
"jsonPath": "string"
}
]
}
VariableSummaryCollection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
VariableSummaryCollection | any | false | none | This is a collection of variable summary. |
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 | [variableSummary] | false | none | The actual results of a query |
variableRuleUsageSummary
{
"name": "string",
"displayName": "string",
"type": "array",
"description": "string",
"tags": [
{
"name": "string",
"value": "string"
}
],
"version": 1,
"minLength": 0,
"maxLength": 0,
"enumValues": [
"string"
],
"enumURI": "string",
"minimum": 0,
"maximum": 0,
"inclusiveMinimum": true,
"exclusiveMaximum": true,
"arrayItem": "none",
"minItems": 0,
"maxItems": 0,
"required": false,
"deprecated": false,
"private": false,
"access": "rw",
"isMissing": false,
"defaultValue": "",
"locked": true,
"userGroup": "DMSDefault",
"ruleIds": [
"string"
],
"ruleCount": 0
}
VariableRuleUsageSummary
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
VariableRuleUsageSummary | any | false | none | A summary of usage of a profile variable by rules |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | createVariable | false | none | A create request representation for a variable. |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» ruleIds | [string] | false | none | The UUID of the rules that use the variable. |
» ruleCount | integer | false | none | The number of rules in Testing or Production state that use the variable. |
variableRuleUsageSummaryCollection
{
"name": "string",
"start": 0,
"limit": 0,
"count": 0,
"accept": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0,
"items": [
{
"name": "string",
"displayName": "string",
"type": "array",
"description": "string",
"tags": [
{
"name": "string",
"value": "string"
}
],
"version": 1,
"minLength": 0,
"maxLength": 0,
"enumValues": [
"string"
],
"enumURI": "string",
"minimum": 0,
"maximum": 0,
"inclusiveMinimum": true,
"exclusiveMaximum": true,
"arrayItem": "none",
"minItems": 0,
"maxItems": 0,
"required": false,
"deprecated": false,
"private": false,
"access": "rw",
"isMissing": false,
"defaultValue": "",
"locked": true,
"userGroup": "DMSDefault",
"ruleIds": [
"string"
],
"ruleCount": 0
}
]
}
VariableRuleUsageSummaryCollection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
VariableRuleUsageSummaryCollection | any | false | none | A collection of variable rule usage objects |
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 | [variableRuleUsageSummary] | false | none | The actual results of a query |
modelIdArray
[
{
"id": "string"
}
]
The list of UUIDs of models to be deleted.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [modelID] | false | none | The list of UUIDs of models to be deleted. |
list
{
"id": "string",
"name": "string",
"description": "string",
"version": 0,
"creationTimeStamp": "string",
"columns": [
{
"name": "string",
"datatype": "string",
"position": 0,
"isKey": true,
"keyPosition": 0
}
]
}
A detection lookup list
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | true | none | The UUID of the list. |
name | string | false | none | The name of the list. |
description | string | false | none | The description of the list. |
version | number | false | none | The version number for the list. |
creationTimeStamp | string | false | none | The creation timestamp of the list, in the format of YYYY-MM-DDThh:mm:ss.sssZ . |
columns | [object] | false | none | The list columns information. |
» name | string | true | none | The column name. |
» datatype | string | true | none | The type of data for the column. |
» position | integer | true | none | The column position in the list. |
» isKey | boolean | false | none | An indicator that the column's value is used to create the key value. |
» keyPosition | integer | false | none | A 1-based position index that specifies where a column's value is located in the key value. A '0' means not a key.The column key indicator. |
listCollection
{
"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": [
{
"id": "string",
"name": "string",
"description": "string",
"version": 0,
"creationTimeStamp": "string",
"columns": [
{
"name": "string",
"datatype": "string",
"position": 0,
"isKey": true,
"keyPosition": 0
}
]
}
]
}
ListCollection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
ListCollection | any | false | none | A collection of list objects |
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 | [list] | false | none | The actual results of a query |
updateMessage
{
"name": "string",
"displayName": "string",
"description": "string",
"type": "financial",
"state": "Developing",
"revision": 0
}
UpdateMessage
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
UpdateMessage | any | false | none | An update request representation for a message. |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | createMessage | false | none | A create request representation for a message. |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» state | string | false | none | The state reflects the capabilities that are allowed on the message schema. The supplied value is case-insensitive.Deployed is a state that represents the message schema has been published successfully and is immutable.Developing is a state that represents the message schema is undergoing modifications. There can only be one "developing" version active.Deployment-Ready is a state that represents the message schema allows limited changes and intended to be deployed. |
» revision | integer | true | none | The last revision update to the message. This a number that is used for database optimistic locking during concurrent requests. Each time an update occurs the value is incremented. It must be provided for performing PATCH updates only. This number is independent of the multiple revisions of a schema. |
Enumerated Values
Property | Value |
---|---|
state | Developing |
state | Deployed |
state | Deployment-Ready |
createMessage
{
"name": "string",
"displayName": "string",
"description": "string",
"type": "financial"
}
CreateMessage
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | true | none | Name of the message schema. The name of the message cannot be modified once assigned. Allowed characters are letters, numbers, underscores, and whitespaces. |
displayName | string | false | none | This is a general purpose name for the message that can be modified. Defaults to the name if not provided. |
description | string | false | none | The purpose of the message schema |
type | string | true | none | The kind of message schema defined that can be used for categorization. Potential values could be:banking , insurance , payments , or healthcare The subtype allows only lowercase alphanumeric characters. It will be automatically converted to lowercase. |
createRuleVersionResponsev2
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"baseRuleId": "string",
"ruleVersion": 0,
"messageClassificationId": "30cfcff2-22df-4b7c-aa2d-6571c7fe702a",
"schemaName": "string",
"projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
"ruleTypeName": "string",
"state": "Coding",
"pendingApproval": false,
"keywords": "string",
"alertType": "string",
"alertReason": "string",
"executionOrderType": 0,
"executionOrderPriority": 0,
"configuredOperationalState": "string",
"operationalState": "string",
"operationalTimeLimit": 0,
"code": "string",
"creationTimeStamp": "string",
"createdBy": "string",
"modifiedTimeStamp": "string",
"modifiedBy": "string",
"revision": 0,
"version": 0
}
A detection rule created as a new version of an existing detection rule.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string(uuid) | false | none | The UUID of the rule. |
name | string | false | none | The name of the rule. Copied from the existing rule. |
description | string | false | none | The description of the rule. Copied from the existing rule. |
baseRuleId | string | false | none | The identifier of the base rule (shared by all versions of the rule). Copied from the existing rule. |
ruleVersion | number | false | none | The version number of the rule. |
messageClassificationId | string(uuid) | false | none | The UUID of the associated message classification. Copied from the existing rule. |
schemaName | string | false | none | The unique name of the associated message schema. Copied from the existing rule. |
projectId | string(uuid) | false | none | The UUID of the associated project. |
ruleTypeName | string | false | none | The name of the rule type that is associated with this rule. Copied from the existing rule. |
state | string | false | none | The current state of the rule. |
pendingApproval | boolean | false | none | Flag indicating whether the current state of the rule is pending approval. |
keywords | string | false | none | Keywords that apply to the rule. Copied from the existing rule. |
alertType | string | false | none | Alert type to be used for the rule. Copied from the existing rule. |
alertReason | string | false | none | Alert reason for any alerts that were generated by the rule. Copied from the existing rule. |
executionOrderType | integer | false | none | Type of the execution order Copied from the existing rule. |
executionOrderPriority | integer | false | none | Priority of the execution order Copied from the existing rule. |
configuredOperationalState | string | false | none | The configured operational state of the rule. Copied from the existing rule. |
operationalState | string | false | none | The operational state of the rule. |
operationalTimeLimit | number | false | none | The maximum execution time for the rule (in microseconds). Copied from the existing rule. |
code | string | false | none | The base64 encoded rule code. Copied from the existing rule. |
creationTimeStamp | string | false | none | none |
createdBy | string | false | none | none |
modifiedTimeStamp | string | false | none | none |
modifiedBy | string | false | none | none |
revision | number | false | none | The last revision update to the rule. Used for optimistic concurrency control. |
version | number | false | none | Version number of the rule schema |
getImpactAnalysisLog
"string"
Response from get impact analysis log
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | string | false | none | Response from get impact analysis log |
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. |
selection
{
"version": 0,
"template": "string",
"type": "id",
"resources": [
"string"
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
]
}
Selection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
version | integer | true | none | The schema version number of this media type. This representation is version 1. |
template | string | false | none | A URI template in which the {id} parameter can be replaced with a value from the "resources" array in order to yield the URI of the identified resource. |
type | string | false | none | Specifies whether the resources array contains IDs, URIs, or both.
|
resources | [string] | true | none | An array of resource IDs or URIs |
links | [link] | false | none | An array of links to related resources and actions. |
Enumerated Values
Property | Value |
---|---|
type | id |
type | uri |
type | mixed |
ruleImportResult
{
"baseRuleId": "string",
"name": "string",
"code": "string",
"alertTypeMatch": {
"value": "string",
"found": true
},
"baseRuleIdMapping": {
"originalValue": "string",
"mappedValue": "string"
},
"dependencyMappings": [
{
"originalValue": "string",
"mappedValue": "string"
}
],
"messageClassificationMatch": {
"value": "string",
"found": true
},
"messageClassificationMapping": {
"originalValue": "string",
"mappedValue": "string"
},
"schemaNameMatch": {
"value": "string",
"found": true
},
"usedVariableMatches": [
{
"value": "string",
"found": true
}
],
"usedListMatches": [
{
"value": "string",
"found": true
}
]
}
The imported rule result.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
baseRuleId | string | false | none | The base rule identifier assigned by the system. |
name | string | false | none | The name of the rule. |
code | string | false | none | The rule code. |
alertTypeMatch | alertTypeMatchingResult | false | none | The matching result for the rule's alertType. |
baseRuleIdMapping | baseRuleIdMappingResult | false | none | The mapping from the original baseRuleId to the baseRuleId of the rule after import. |
dependencyMappings | [mappingResult]¦null | false | none | The mappings from the original strong dependencies of the rule to the strong dependencies of the rule after import. |
messageClassificationMatch | messageClassificationMatchingResult | false | none | The matching result for the rule's messageClassification. |
messageClassificationMapping | messageClassificationMappingResult | false | none | The mapping from the rule's original messageClassification to the messageClassification of the rule after import. This property is set only if the original messageClassification was not found. |
schemaNameMatch | schemaNameMatchingResult | false | none | The matching result for the rule's schemaName. |
usedVariableMatches | [matchingResult]¦null | false | none | The collection of matching results for the rule's usedVariables. |
usedListMatches | [matchingResult]¦null | false | none | The collection of matching results for the rule's usedLists. |
alertTypeMatchingResult
{
"value": "string",
"found": true
}
matchingResult
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
matchingResult | matchingResult | false | none | The matching result for the rule's alertType. |
baseRuleIdMappingResult
{
"originalValue": "string",
"mappedValue": "string"
}
mappingResult
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
mappingResult | mappingResult | false | none | The mapping from the original baseRuleId to the baseRuleId of the rule after import. |
mappingResult
{
"originalValue": "string",
"mappedValue": "string"
}
A mapping from an original value to a mapped value.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
originalValue | anyValue | false | none | The original value. |
mappedValue | anyValue | false | none | The mapped value. |
messageClassificationMatchingResult
{
"value": "string",
"found": true
}
matchingResult
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
matchingResult | matchingResult | false | none | The matching result for the rule's messageClassification. |
messageClassificationMappingResult
{
"originalValue": "string",
"mappedValue": "string"
}
mappingResult
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
mappingResult | mappingResult | false | none | The mapping from the rule's original messageClassification to the messageClassification of the rule after import. This property is set only if the original messageClassification was not found. |
schemaNameMatchingResult
{
"value": "string",
"found": true
}
matchingResult
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
matchingResult | matchingResult | false | none | The matching result for the rule's schemaName. |
matchingResult
{
"value": "string",
"found": true
}
The result of searching for a matching value.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
value | anyValue | false | none | The value that was searched for. |
found | boolean | false | none | Whether the value was found in context. |
anyValue
"string"
Can be any value - string, number, integer, boolean, array, or object - including null
.
Properties
anyOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | string | false | none | none |
or
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | number | false | none | none |
or
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | integer | false | none | none |
or
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | boolean | false | none | none |
or
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [any] | false | none | none |
or
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
projectJsonPatchInput
[
{
"op": "replace",
"path": "name",
"value": "string"
}
]
A JSONPatch request representation for a update of a project and its relations.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
op | string | true | none | An operation to be performed in the patch. Supported operations are the following: - replace: updates project's properties. - add: adds one or more relations of schemas, users, message classifications, or lists. - remove: removes one or more schema, user, message classification, or list relations from the project. |
path | string | true | none | The name of a property or relationship of the project to update. Applicable values for supported operations are the following: - replace: replaces name or description - add or remove: adds or removes schemaRelations, userRelations, messageClassificationRelations, or listRelations |
value | any | true | none | The property's new value, or one or more relations to be added or removed. |
oneOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» anonymous | string | false | none | none |
xor
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» anonymous | [string] | false | none | none |
Enumerated Values
Property | Value |
---|---|
op | replace |
op | add |
op | remove |
path | name |
path | description |
path | schemaRelations |
path | userRelations |
path | messageClassificationRelations |
path | listRelations |
rulePrioritization
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"baseRuleId": "string",
"ruleVersion": 0,
"name": "string",
"ruleTypeName": "string",
"state": "string",
"executionOrderType": -1,
"executionOrderPriority": 0,
"version": 0
}
The execution priority of a rule relative to other rules in the same project.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string(uuid) | false | none | The UUID of the rule. |
baseRuleId | string | false | none | The identifier of the base rule (shared by all versions of the rule). |
ruleVersion | number | false | none | The version number of the rule. |
name | string | false | none | The name of the rule. |
ruleTypeName | string | false | none | The name of the rule type that is associated with this rule. |
state | string | false | none | The current state of the rule. |
executionOrderType | integer | false | none | Type of the execution order. There are 3 pre-defined sets of rules. (-1) Pre Rules (0) Dependency Ordered rules (1) Post Rules The Pre Rules set executes first, then the Dependency Ordered Rules set, then the Post Rules set. |
executionOrderPriority | integer | false | none | Priority of the rule within execution order type. |
version | integer | false | none | Version number of the rule prioritization representation schema. This representation is version 1. |
Enumerated Values
Property | Value |
---|---|
executionOrderType | -1 |
executionOrderType | 0 |
executionOrderType | 1 |
ruleWithMetricsv2
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"baseRuleId": "string",
"ruleVersion": 0,
"messageClassificationId": "30cfcff2-22df-4b7c-aa2d-6571c7fe702a",
"schemaName": "string",
"projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
"ruleTypeName": "decision",
"state": "string",
"pendingApproval": false,
"keywords": "string",
"alertType": "string",
"alertReason": "string",
"executionOrderType": -1,
"executionOrderPriority": 0,
"configuredOperationalState": "0",
"operationalState": "-2",
"operationalTimeLimit": 0,
"creationTimeStamp": "string",
"createdBy": "string",
"modifiedTimeStamp": "string",
"modifiedBy": "string",
"revision": 0,
"version": 0,
"metrics": {
"total": {
"evaluated": 0,
"outcomeFired": 0,
"alertFired": 0,
"overtime": 0
},
"today": {
"evaluated": 0,
"outcomeFired": 0,
"alertFired": 0,
"overtime": 0
},
"today-1": {
"evaluated": 0,
"outcomeFired": 0,
"alertFired": 0,
"overtime": 0
},
"today-2": {
"evaluated": 0,
"outcomeFired": 0,
"alertFired": 0,
"overtime": 0
},
"today-3": {
"evaluated": 0,
"outcomeFired": 0,
"alertFired": 0,
"overtime": 0
},
"today-4": {
"evaluated": 0,
"outcomeFired": 0,
"alertFired": 0,
"overtime": 0
},
"today-5": {
"evaluated": 0,
"outcomeFired": 0,
"alertFired": 0,
"overtime": 0
},
"today-6": {
"evaluated": 0,
"outcomeFired": 0,
"alertFired": 0,
"overtime": 0
}
}
}
A detection rule with metrics.
Properties
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | rulev2 | false | none | A detection rule (without code) |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | ruleMetricsSeries | false | none | Metrics from rule execution in the operational environment - total and daily counts from the most recent 7 days. |
ruleMetricsSeries
{
"metrics": {
"total": {
"evaluated": 0,
"outcomeFired": 0,
"alertFired": 0,
"overtime": 0
},
"today": {
"evaluated": 0,
"outcomeFired": 0,
"alertFired": 0,
"overtime": 0
},
"today-1": {
"evaluated": 0,
"outcomeFired": 0,
"alertFired": 0,
"overtime": 0
},
"today-2": {
"evaluated": 0,
"outcomeFired": 0,
"alertFired": 0,
"overtime": 0
},
"today-3": {
"evaluated": 0,
"outcomeFired": 0,
"alertFired": 0,
"overtime": 0
},
"today-4": {
"evaluated": 0,
"outcomeFired": 0,
"alertFired": 0,
"overtime": 0
},
"today-5": {
"evaluated": 0,
"outcomeFired": 0,
"alertFired": 0,
"overtime": 0
},
"today-6": {
"evaluated": 0,
"outcomeFired": 0,
"alertFired": 0,
"overtime": 0
}
}
}
Metrics from rule execution in the operational environment - total and daily counts from the most recent 7 days.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
metrics | object | false | none | Metrics from rule execution in the operational environment - total and daily counts from the most recent 7 days. |
» total | ruleMetrics | false | none | Metrics collected on a single rule during a single time period. |
» today | ruleMetrics | false | none | Metrics collected on a single rule during a single time period. |
» today-1 | ruleMetrics | false | none | Metrics collected on a single rule during a single time period. |
» today-2 | ruleMetrics | false | none | Metrics collected on a single rule during a single time period. |
» today-3 | ruleMetrics | false | none | Metrics collected on a single rule during a single time period. |
» today-4 | ruleMetrics | false | none | Metrics collected on a single rule during a single time period. |
» today-5 | ruleMetrics | false | none | Metrics collected on a single rule during a single time period. |
» today-6 | ruleMetrics | false | none | Metrics collected on a single rule during a single time period. |
ruleMetrics
{
"evaluated": 0,
"outcomeFired": 0,
"alertFired": 0,
"overtime": 0
}
Metrics collected on a single rule during a single time period.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
evaluated | integer | false | none | The number of times the rule was evaluated. |
outcomeFired | integer | false | none | The number of times the rule produced an outcome. |
alertFired | integer | false | none | The number of times the rule resulted in an alert. |
overtime | integer | false | none | The number of times the rule exceeded its execution time. |
ruleWithCodev2
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"code": "string",
"description": "string",
"baseRuleId": "string",
"ruleVersion": 0,
"messageClassificationId": "30cfcff2-22df-4b7c-aa2d-6571c7fe702a",
"schemaName": "string",
"projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
"ruleTypeName": "decision",
"state": "string",
"pendingApproval": false,
"keywords": "string",
"alertType": "string",
"alertReason": "string",
"executionOrderType": -1,
"executionOrderPriority": 0,
"configuredOperationalState": "0",
"operationalTimeLimit": 0,
"creationTimeStamp": "string",
"createdBy": "string",
"modifiedTimeStamp": "string",
"modifiedBy": "string",
"revision": 0,
"version": 0
}
A detection rule (with rule code).
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string(uuid) | false | none | The UUID of the rule. |
name | string | false | none | The name of the rule. Valid values are letters, numbers, hyphens, underscores, and spaces. |
code | string | false | none | The base64 encoded rule code. |
description | string | false | none | The description of the rule. |
baseRuleId | string | false | none | The identifier of the base rule (shared by all versions of the rule). |
ruleVersion | number | false | none | The version number of the rule. |
messageClassificationId | string(uuid) | false | none | The UUID of the associated message classification. |
schemaName | string | false | none | The unique name of the associated message schema. |
projectId | string(uuid) | false | none | The UUID of the associated project. |
ruleTypeName | string | false | none | The name of the rule type that is associated with this rule. The rule type cannot be changed after the rule has been created. |
state | string | false | none | The current state of the rule. |
pendingApproval | boolean | false | none | Flag indicating whether the current state of the rule is pending approval. |
keywords | string | false | none | Keywords that apply to the rule. |
alertType | string | false | none | Alert type to be used for the rule. |
alertReason | string | false | none | Alert reason for any alerts that were generated by the rule. |
executionOrderType | integer | false | none | Type of the execution order. There are 3 pre-defined sets of rules. (-1) Pre Rules (0) Dependency Ordered rules (1) Post Rules The Pre-rule set executes first, then the dependency ordered rule set, then the post rule set. |
executionOrderPriority | integer | false | none | Priority of the execution order |
configuredOperationalState | string | false | none | The configured operational state of the rule. (0) Active (1) ExecutionDisabled |
operationalTimeLimit | number | false | none | The maximum execution time for the rule (in microseconds). |
creationTimeStamp | string | false | none | none |
createdBy | string | false | none | none |
modifiedTimeStamp | string | false | none | none |
modifiedBy | string | false | none | none |
revision | number | false | none | The last revision update to the rule. Used for optimistic concurrency control. |
version | number | false | none | Version number of the rule schema |
Enumerated Values
Property | Value |
---|---|
ruleTypeName | variable |
ruleTypeName | decision |
executionOrderType | -1 |
executionOrderType | 0 |
executionOrderType | 1 |
configuredOperationalState | 0 |
configuredOperationalState | 1 |
impactAnalysisSummary
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"impactAnalysisNum": 0,
"status": "string",
"jobStartTime": "2019-08-24T14:15:22Z",
"jobEndTime": "2019-08-24T14:15:22Z",
"estJobEndTime": "2019-08-24T14:15:22Z",
"jobDuration": 0,
"jobId": "9d222c6d-893e-4e79-8201-3c9ca16a0f39",
"sessionId": "string",
"totalTransactionCount": 0,
"processedTransactionCount": 0,
"projectId": "string",
"canBeCanceled": false,
"canBeDeleted": false,
"isResultAvailable": false,
"isLogAvailable": false,
"isTimingMetricsAvailable": false,
"creationTimeStamp": "string",
"createdBy": "string",
"version": 0
}
A summary of an impact analysis
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string(uuid) | false | none | The UUID of the impact analysis. |
name | string | false | none | The name of the impact analysis. Valid values are letters, numbers, hyphens, underscores, and spaces. |
description | string | false | none | Description of the impact analysis. |
impactAnalysisNum | integer | false | none | Impact analysis number. |
status | string | false | none | The status of the impact analysis run. |
jobStartTime | string(date-time) | false | none | The timestamp when the impact analysis job started, in the format of YYYY-MM-DDThh:mm:ss.sssZ . |
jobEndTime | string(date-time) | false | none | The timestamp when the impact analysis job completed, in the format of YYYY-MM-DDThh:mm:ss.sssZ . |
estJobEndTime | string(date-time) | false | none | The estimated timestamp when the impact analysis job will be completed, in the format of YYYY-MM-DDThh:mm:ss.sssZ . The estimated time will be available only when the job has started processing transactions. |
jobDuration | integer | false | none | The time in seconds the job is running. |
jobId | string(uuid) | false | none | The UUID of the job submitted. |
sessionId | string | false | none | The session ID used for impact analysis. |
totalTransactionCount | number | false | none | Total number of transactions processed. |
processedTransactionCount | number | false | none | Number of transactions processed so far. |
projectId | string | false | none | The UUID of the associated project. |
canBeCanceled | boolean | false | none | Flag indicating whether the impact analysis can be canceled or not. |
canBeDeleted | boolean | false | none | Flag indicating whether the impact analysis can be deleted or not. |
isResultAvailable | boolean | false | none | Flag indicating whether result is available or not. |
isLogAvailable | boolean | false | none | Flag indicating whether log is available or not. |
isTimingMetricsAvailable | boolean | false | none | Flag indicating whether timing metrics is available or not. |
creationTimeStamp | string | false | none | none |
createdBy | string | false | none | none |
version | number | false | none | Version number of the impact analysis schema |
ruleTransitionItem
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"creationTimeStamp": "string",
"createdBy": "string",
"modifiedTimeStamp": "string",
"modifiedBy": "string",
"version": 0,
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
]
}
A summary of a rule affected by a transition request
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string(uuid) | true | none | UUID of the rule |
name | string | false | none | Name of the rule |
description | string | false | none | Description of the rule |
creationTimeStamp | string | false | none | none |
createdBy | string | false | none | none |
modifiedTimeStamp | string | false | none | none |
modifiedBy | string | false | none | none |
version | number | false | none | none |
links | [link] | false | none | The links that apply to the collection |
updateRulePrioritizationInput
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"executionOrderType": -1,
"executionOrderPriority": 0
}
The updated execution priority of a rule relative to other rules in the same project.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string(uuid) | true | none | The UUID of the rule. |
executionOrderType | integer | true | none | Type of the execution order. There are 3 pre-defined sets of rules. (-1) Pre Rules (0) Dependency Ordered rules (1) Post Rules The Pre Rules set executes first, then the Dependency Ordered Rules set, then the Post Rules set. |
executionOrderPriority | integer | false | none | Priority of the rule within execution order type. Required for Pre Rules or Post Rules. Ignored for Dependency Ordered Rules. |
Enumerated Values
Property | Value |
---|---|
executionOrderType | -1 |
executionOrderType | 0 |
executionOrderType | 1 |
messageClassificationPreview
{
"name": "string",
"displayName": "string",
"keyCode": "string",
"messageClassifications": [
null
],
"childCount": 0,
"version": 0
}
The preview of a message classification to be created.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | false | none | The internal short name of the message classification. Valid values are letters, numbers, hyphens, and underscores. |
displayName | string | false | none | The descriptive name of the message classification |
keyCode | string | false | none | The unique code that represents the transaction population of the message classification. |
messageClassifications | [messageClassificationPreview] | false | none | Contains a list of sub-message classifications. Each item is also an object of type message classification. |
childCount | integer | false | none | The count of direct sub-message classifications |
version | number | false | none | none |
importValidationError
{
"error": {
"message": "string",
"id": "string",
"errorCode": 0,
"httpStatusCode": 0,
"details": [
"string"
],
"remediation": "string",
"errors": [
null
],
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
},
"details": [
{
"row": 0,
"ref": "string",
"value": "string",
"message": "string"
}
]
}
A validation error of the import file.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
error | error2 | false | none | The representation of an error. |
details | [importValidationDetail] | false | none | Import validation details. |
importValidationDetail
{
"row": 0,
"ref": "string",
"value": "string",
"message": "string"
}
An entry of import validation detail.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
row | number | false | none | The row number of the record. |
ref | string | false | none | The reference position, either a column header, or the row number of a referring record if the error is between two records. |
value | string | false | none | The data being validated. |
message | string | false | none | The detailed validation information about the data. |
parsedRule
{
"id": "string",
"usedActions": [
{
"actionId": "string",
"creationTimeStamp": "string",
"createdBy": "string"
}
],
"dependencies": [
{
"dependency": {
"dependencyType": "STRONG",
"ruleId": "string",
"baseRuleId": "string",
"usedVariables": [
{
"schemaName": "string",
"name": "string",
"jsonPath": "string",
"isModifying": true,
"type": "array",
"arrayItem": "none",
"variableId": "string",
"variableSetId": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string"
}
],
"creationTimeStamp": "string",
"createdBy": "string"
},
"resolvedRule": {
"ruleId": "string",
"baseRuleId": "string",
"ruleVersion": 0,
"name": "string",
"ruleTypeName": "string",
"state": "string"
}
}
],
"usedVariables": [
{
"schemaName": "string",
"name": "string",
"jsonPath": "string",
"isModifying": true,
"type": "array",
"arrayItem": "none",
"variableId": "string",
"variableSetId": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string"
}
],
"usedLists": [
{
"listName": "string",
"columns": [
{
"name": "string",
"datatype": "string",
"position": 0,
"isKey": true,
"keyPosition": 0
}
],
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string"
}
]
}
The parsed representation of a rule.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | The UUID of the rule. |
usedActions | [object] | false | none | The actions used by the parsed rule. |
» actionId | string | false | none | The UUID of the action. |
» creationTimeStamp | string | false | none | none |
» createdBy | string | false | none | none |
dependencies | [object] | false | none | The parsed rule's dependencies on other rules. |
» dependency | object | false | none | A dependency on another rule. |
»» dependencyType | string | false | none | The type of dependency. + STRONG - This rule depends on another rule using detection.hasRuleFired() .+ WEAK - This rule depends on a user variable whose valueis assigned by another rule. |
»» ruleId | string | false | none | The UUID of the other rule that this rule depends on. Set for WEAK dependencies only. |
»» baseRuleId | string | false | none | The numeric base rule ID of the other rule that this rule depends on. Set for STRONG dependencies only. |
»» usedVariables | [ruleUsedVariable] | false | none | The message schema variables that are assigned by the other rule, causing the dependency. Set for WEAK dependencies only. |
»» creationTimeStamp | string | false | none | none |
»» createdBy | string | false | none | none |
» resolvedRule | object | false | none | The rule that satisfies the dependency. |
»» ruleId | string | false | none | The UUID of the resolved rule. |
»» baseRuleId | string | false | none | The numeric base rule id of the resolved rule. |
»» ruleVersion | integer | false | none | The version number of the resolved rule. |
»» name | string | false | none | The name of the resolved rule. |
»» ruleTypeName | string | false | none | The rule type name of the resolved rule. |
»» state | string | false | none | The state of the resolved rule. |
usedVariables | [ruleUsedVariable] | false | none | The message schema variables used by the rule code. |
usedLists | [ruleUsedList] | false | none | The lookup lists used by the rule code. |
Enumerated Values
Property | Value |
---|---|
dependencyType | STRONG |
dependencyType | WEAK |
impactAnalysisTimeMetrics
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"impactAnalysisNum": 0,
"name": "string",
"timingMetrics": [
{
"timeInMicroseconds": 0,
"rule": {
"ruleId": "70af3071-65d9-4ec3-b3cb-5283e8d55dac",
"baseRuleId": "string",
"ruleVersion": 0,
"executionOrderType": 0,
"name": "string",
"description": "string",
"state": "string",
"schemaName": "string",
"alertTypeCode": "string",
"alertTypeName": "string",
"messageClassificationKeyCode": "string",
"messageClassificationDisplayName": "string",
"code": "string"
}
}
]
}
Execution time metics for rules in detection impact analysis
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string(uuid) | false | none | The UUID of the impact analysis. |
impactAnalysisNum | integer | false | none | Impact analysis number. |
name | string | false | none | The name of the impact analysis. Valid values are letters, numbers, hyphens, underscores, and spaces. |
timingMetrics | [ruleTimingMetrics] | false | none | A collection of rule time metrics objects |
ruleTimingMetrics
{
"timeInMicroseconds": 0,
"rule": {
"ruleId": "70af3071-65d9-4ec3-b3cb-5283e8d55dac",
"baseRuleId": "string",
"ruleVersion": 0,
"executionOrderType": 0,
"name": "string",
"description": "string",
"state": "string",
"schemaName": "string",
"alertTypeCode": "string",
"alertTypeName": "string",
"messageClassificationKeyCode": "string",
"messageClassificationDisplayName": "string",
"code": "string"
}
}
Execution metrics per rule
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
timeInMicroseconds | integer | false | none | Time in microseconds it took to run the rule. |
rule | impactAnalysisRule | false | none | Rule used to run Impact Analysis |
deployablerule
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"baseRuleId": "string",
"ruleVersion": 0,
"messageClassificationId": "30cfcff2-22df-4b7c-aa2d-6571c7fe702a",
"schemaName": "string",
"projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
"ruleTypeName": "decision",
"state": "string",
"pendingApproval": false,
"keywords": "string",
"alertType": "string",
"alertReason": "string",
"executionOrderType": -1,
"executionOrderPriority": 0,
"configuredOperationalState": "0",
"operationalState": "-2",
"operationalTimeLimit": 0,
"creationTimeStamp": "string",
"createdBy": "string",
"modifiedTimeStamp": "string",
"modifiedBy": "string",
"revision": 0,
"version": 0,
"messageDisplayName": "string",
"messageClassificationKeyCode": "string",
"messageClassificatinoDisplayName": "string",
"deployed": false,
"deployedTimeStamp": "string",
"canView": false
}
Properties
None
confusionMetrics
{
"tp": 0,
"tn": 0,
"fp": 0,
"fn": 0
}
Confusion metrics
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
tp | number | false | none | True Positive. |
tn | number | false | none | True Negative. |
fp | number | false | none | False Positive. |
fn | number | false | none | False Negative. |
outcomes
{
"summary": {
"predictedConditionPositive": 0,
"predictedConditionNegative": 0
},
"distribution": [
{
"outcome": "string",
"code": 0,
"frequency": 0
}
]
}
Outcome details
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
summary | outcomeSummary | false | none | Outcome Summary |
distribution | [outcome] | false | none | A collection of outcome objects |
alertTypeMatrix
{
"code": "string",
"name": "string",
"tp": 0,
"tn": 0,
"fp": 0,
"fn": 0
}
Alert type matrix.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
code | string | false | none | Alert type code. |
name | string | false | none | Alert type name. |
tp | number | false | none | True positive value. |
tn | number | false | none | True negative value. |
fp | number | false | none | False positive value. |
fn | number | false | none | False negative value. |
decisionValueMetrics
{
"tp": 0,
"fn": 0
}
Decision value metrics.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
tp | number | false | none | True positive value. |
fn | number | false | none | False negative value. |
outcomeSummary
{
"predictedConditionPositive": 0,
"predictedConditionNegative": 0
}
Outcome Summary
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
predictedConditionPositive | number | false | none | Frequency of positive decision. |
predictedConditionNegative | number | false | none | Frequency of negative decision. |
outcome
{
"outcome": "string",
"code": 0,
"frequency": 0
}
Decision outcome
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
outcome | string | false | none | Outcome label. |
code | number | false | none | Outcome code. |
frequency | number | false | none | Frequecy of decision outcome. |
ruleExport
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"code": "string",
"description": "string",
"baseRuleId": "string",
"ruleVersion": 0,
"messageClassificationId": "30cfcff2-22df-4b7c-aa2d-6571c7fe702a",
"schemaName": "string",
"projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
"ruleTypeName": "decision",
"state": "string",
"pendingApproval": false,
"keywords": "string",
"alertType": "string",
"alertReason": "string",
"executionOrderType": -1,
"executionOrderPriority": 0,
"configuredOperationalState": "0",
"operationalTimeLimit": 0,
"creationTimeStamp": "string",
"createdBy": "string",
"modifiedTimeStamp": "string",
"modifiedBy": "string",
"revision": 0,
"version": 0,
"messageClassification": "string",
"usedVariables": [
{
"schemaName": "string",
"jsonPath": "string",
"name": "string",
"isProfile": true,
"variableSummary": {
"name": "string",
"displayName": "string",
"type": "array",
"description": "string",
"tags": [
{
"name": "string",
"value": "string"
}
],
"version": 1,
"minLength": 0,
"maxLength": 0,
"enumValues": [
"string"
],
"enumURI": "string",
"minimum": 0,
"maximum": 0,
"inclusiveMinimum": true,
"exclusiveMaximum": true,
"arrayItem": "none",
"minItems": 0,
"maxItems": 0,
"required": false,
"deprecated": false,
"private": false,
"access": "rw",
"isMissing": false,
"defaultValue": "",
"locked": true,
"userGroup": "DMSDefault",
"revision": 0,
"id": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"variableSetId": "string",
"jsonPath": "string"
}
}
],
"usedLists": [
{
"name": "string"
}
],
"dependencies": [
{
"baseRuleId": "string"
}
]
}
An exported rule.
Properties
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | ruleWithCodev2 | false | none | A detection rule (with rule code). |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» messageClassification | string | false | none | The message classification of the rule. |
» usedVariables | [ruleExportUsedVariable] | false | none | The variables used by the rule. |
» usedLists | [ruleExportUsedList] | false | none | The lists used by the rule. |
» dependencies | [ruleExportDependency] | false | none | The rules depended on by the rule. |
projectSummary
{
"createdBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"description": "string",
"id": "string",
"modifiedBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"name": "string",
"organizationId": "string",
"revision": 0
}
A summary of a detection project
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
createdBy | string | false | none | The user who created the project. |
creationTimeStamp | string(date-time) | false | none | The timestamp when the project was created. |
description | string | false | none | The description of the project. |
id | string | false | none | The identifier, which is a UUID, of the project. |
modifiedBy | string | false | none | The user who last modified the project. |
modifiedTimeStamp | string(date-time) | false | none | The timestamp when the project was last modified. |
name | string | false | none | The name of the project. |
organizationId | string | false | none | The ID, a UUID, of the organization that the project is associated with. |
revision | number | false | none | The last revision update to the project. Used for optimistic concurrency control. |
modelManifest
{
"id": "string",
"name": "string",
"sourceUri": "string",
"destination": {
"name": "string",
"casServerName": "string",
"casLibrary": "string",
"description": "string",
"destinationTable": "string",
"destinationType": "string",
"databaseCasLibrary": "string",
"user": "string",
"hdfsDirectory": "string",
"configurationDirectory": "string",
"authenticationDomain": "string",
"masUri": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"createdBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"version": 1
},
"destinationName": "string",
"content": {
"analyticStoreUri": [
"string"
],
"code": "string",
"codeMediaType": "string",
"codeType": "string",
"codeURI": "string",
"createdBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"format": "string",
"formatURI": "string",
"modelName": "string",
"modelID": "string",
"modifiedBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"principalID": "string",
"projectID": "string",
"publishLevel": "string",
"publishNotes": "string",
"sourceURI": "string",
"variableXml": "string",
"version": 1
},
"properties": {
"name": "string",
"value": "string"
},
"resources": {
"name": "string",
"uri": "string",
"mediaType": "string",
"contentType": "string",
"key": "string",
"location": "string"
},
"inputVariables": [
{
"name": "string",
"description": "string",
"role": "string",
"type": "string",
"level": "string",
"format": "string",
"aggregation": "string",
"length": 0,
"generateDataGridColumns": true
}
],
"outputVariables": [
{
"name": "string",
"description": "string",
"role": "string",
"type": "string",
"level": "string",
"format": "string",
"aggregation": "string",
"length": 0,
"generateDataGridColumns": true
}
],
"component": {
"majorVersion": 0,
"minorVersion": 0,
"versionName": "string",
"name": "string",
"reference": [
{
"name": "string",
"uri": "string",
"mediaType": "string",
"contentType": "string",
"key": "string",
"location": "string"
}
],
"location": "string"
},
"product": {
"majorVersion": 0,
"minorVersion": 0,
"versionName": "string",
"name": "string",
"reference": [
{
"name": "string",
"uri": "string",
"mediaType": "string",
"contentType": "string",
"key": "string",
"location": "string"
}
],
"location": "string"
},
"service": {
"majorVersion": 0,
"minorVersion": 0,
"versionName": "string",
"name": "string",
"reference": [
{
"name": "string",
"uri": "string",
"mediaType": "string",
"contentType": "string",
"key": "string",
"location": "string"
}
],
"location": "string"
},
"baseImage": {
"majorVersion": 0,
"minorVersion": 0,
"versionName": "string",
"name": "string",
"reference": [
{
"name": "string",
"uri": "string",
"mediaType": "string",
"contentType": "string",
"key": "string",
"location": "string"
}
],
"location": "string"
},
"createdBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"version": 1
}
Published Model Manifest
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | The ID of the published model. |
name | string | false | none | The published name for a model. |
sourceUri | string | false | none | The URI of the source reference. |
destination | destination | false | none | Contains information about a publishing destination. |
destinationName | string | false | none | The name of the publishing destination. |
content | publishContent | false | none | Contains information about publishing model content. |
properties | destinationProperty | false | none | Contains information about a destination property. |
resources | uriReference | false | none | Contains information about an URI reference. |
inputVariables | [modelVariable] | false | none | A list of input variables. |
outputVariables | [modelVariable] | false | none | A list of output variables. |
component | resourceVersion | false | none | Contains information about the resource version. |
product | resourceVersion | false | none | Contains information about the resource version. |
service | resourceVersion | false | none | Contains information about the resource version. |
baseImage | resourceVersion | false | none | Contains information about the resource version. |
createdBy | string | false | none | The user who created the object. |
creationTimeStamp | string(date-time) | false | none | The timestamp for when the object was created, in the format of YYYY-MM-DDThh:mm:ss.sssZ . |
modifiedBy | string | false | none | The user who most recently modified the object. |
modifiedTimeStamp | string(date-time) | false | none | The timestamp for when the object was last modified, in the format of YYYY-MM-DDThh:mm:ss.sssZ . |
version | integer | false | none | The API representation version. |
rulesTransactionInfo
{
"version": 0,
"earliestPossibleTransactionDate": "2019-08-24T14:15:22Z",
"earliestRecommendedTransactionDate": "2019-08-24T14:15:22Z",
"transactionsPresent": true,
"rulesReferenceProfileVariables": true,
"rulesReferenceNonRoiRules": true
}
Transaction information for the selected rules.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
version | number | false | none | Version number of the rules transaction information schema |
earliestPossibleTransactionDate | string(date-time) | false | none | The timestamp of the earliest transaction available, in the format of YYYY-MM-DDThh:mm:ss.sssZ . |
earliestRecommendedTransactionDate | string(date-time) | false | none | The timestamp of the earliest recommended transaction, in the format of YYYY-MM-DDThh:mm:ss.sssZ . |
transactionsPresent | boolean | false | none | Flag indicating whether transaction available or not. |
rulesReferenceProfileVariables | boolean | false | none | Flag indicating whether user variables are used or not. |
rulesReferenceNonRoiRules | boolean | false | none | Flag indicating whether non ROI rules are referenced or not. |
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. |
cancelImpactAnalysis
{
"canceled": true,
"message": "string",
"version": 0
}
Response from cancel impact analysis
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
canceled | boolean | false | none | Flag indicating whether the cancellation process was successful or not. |
message | string | false | none | cancellation message. |
version | number | false | none | Version number of the cancel impact analysis schema |
createProjectInputv2
{
"name": "string",
"description": "string",
"messageClassificationRelations": [
{
"messageClassificationId": "string"
}
],
"schemaRelations": [
{
"schemaName": "string"
}
],
"userRelations": [
{
"userId": "string"
}
],
"listRelations": [
{
"listId": "string"
}
]
}
CreateProject
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | true | none | The name of the project. Valid values are letters, numbers, hyphens, underscores, and spaces. |
description | string | false | none | The description of the project. |
messageClassificationRelations | [object] | false | none | A collection of message classifications that are related to the project. The message classifications must be members of the organization that is related to the project. |
» messageClassificationId | string | true | none | UUID of a message classification |
schemaRelations | [object] | true | none | The list of message schemas that are associated with the project. |
» schemaName | string | true | none | Unique name of a message schema. Valid values are letters, numbers, underscores, and spaces. |
userRelations | [object] | true | none | A collection of selected users that belong to the organization of the project. |
» userId | string | true | none | ID of a user |
listRelations | [object] | false | none | The list of lists that are associated with the project. |
» listId | string | true | none | The UUID of the list |
roleMember
{
"id": "string",
"name": "string",
"type": "user",
"provideId": "string",
"version": 0,
"members": [
null
]
}
A member of a role of the detection definition service. It is also the group member object in the Identity Service. Please refer to the REST document of the Identity Service for complete information.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | The ID of the member |
name | string | false | none | The name of the member |
type | string | false | none | The member’s type. Valid values are either user or group (that is, the role). |
provideId | string | false | none | Indicates whether the role is stored locally or is from another source (for example, LDAP). |
version | number | false | none | Specifies the version number. |
members | [roleMember] | false | none | The sub-members of the group. This field is applicable only if the Type is group. |
Enumerated Values
Property | Value |
---|---|
type | user |
type | group |
updateRuleInputv2
{
"name": "string",
"description": "string",
"code": "string",
"messageClassificationId": "30cfcff2-22df-4b7c-aa2d-6571c7fe702a",
"schemaName": "string",
"alertType": "string",
"alertReason": "string",
"operationalTimeLimit": 0,
"revision": 0
}
UpdateRule
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | false | none | The name of the rule. Valid values are letters, numbers, hyphens, underscores, and spaces. |
description | string | false | none | The description of the rule. |
code | string | false | none | The base64 encoded rule code. |
messageClassificationId | string(uuid) | false | none | The UUID of the associated message classification. |
schemaName | string | false | none | The unique name of the associated message schema. |
alertType | string | false | none | The unique code of the alert type that is to be used for the rule. |
alertReason | string | false | none | Alert reason for any alerts that were generated by the rule. |
operationalTimeLimit | number | false | none | The maximum execution time for the rule (in microseconds). |
revision | number | true | none | The last revision update to the rule. Used for optimistic concurrency control. |
modelID
{
"id": "string"
}
represents model ID object
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | The ID of a model. |
ruleCode
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"code": "string",
"schemaName": "string",
"projectId": "5a8591dd-4039-49df-9202-96385ba3eff8"
}
Rule code of a detection rule.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string(uuid) | false | none | The UUID of the rule. |
code | string | false | none | The base64 encoded rule code. |
schemaName | string | false | none | The unique name of the associated message schema. |
projectId | string(uuid) | false | none | The UUID of the associated project. |
impactAnalysisRuleSummary
{
"ruleId": "70af3071-65d9-4ec3-b3cb-5283e8d55dac",
"baseRuleId": "string",
"ruleVersion": 0,
"name": "string",
"description": "string",
"revision": 0,
"state": "string",
"schemaName": "string",
"alertTypeCode": "string",
"alertTypeName": "string",
"messageClassificationKeyCode": "string",
"messageClassificationDisplayName": "string"
}
Rule used to run Impact Analysis
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
ruleId | string(uuid) | false | none | UUID of the rule |
baseRuleId | string | false | none | The identifier of the base rule |
ruleVersion | number | false | none | The version number of the rule. |
name | string | false | none | The name of the rule. Valid values are letters, numbers, hyphens, underscores, and spaces. |
description | string | false | none | The description of the rule. |
revision | number | false | none | The last revision update to the rule. |
state | string | false | none | The y state of the rule. |
schemaName | string | false | none | The unique name of the associated message schema. |
alertTypeCode | string | false | none | Alert type to be used for the rule. |
alertTypeName | string | false | none | The name of the alert type. |
messageClassificationKeyCode | string | false | none | The internal short name of the organization. |
messageClassificationDisplayName | string | false | none | The descriptive name of the organization. |
package
{
"modelPackage": "string",
"scores": [
"string"
]
}
The model package information including its associated score labels.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
modelPackage | string | false | none | model package's unique name |
scores | [string] | false | none | Incident scores for the package. |
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. |
schemaRelationshipRep
{
"schemaName": "string"
}
A representation of a schema
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
schemaName | string | false | none | The unique name of a Message Schema |
resourceVersion
{
"majorVersion": 0,
"minorVersion": 0,
"versionName": "string",
"name": "string",
"reference": [
{
"name": "string",
"uri": "string",
"mediaType": "string",
"contentType": "string",
"key": "string",
"location": "string"
}
],
"location": "string"
}
Resource Version
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
majorVersion | integer | false | none | The major version of the resource. |
minorVersion | integer | false | none | The minor version of the resource. |
versionName | string | false | none | The version of the resource. |
name | string | false | none | The name of the resource version. |
reference | [uriReference] | false | none | A list of resource that related to this resource version. |
location | string | false | none | The location of the resource. |
modelVariable
{
"name": "string",
"description": "string",
"role": "string",
"type": "string",
"level": "string",
"format": "string",
"aggregation": "string",
"length": 0,
"generateDataGridColumns": true
}
Model Variable
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
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 this variable. |
type | string | false | none | The type of this variable. |
level | string | false | none | The level of this variable. |
format | string | false | none | The format of this variable. |
aggregation | string | false | none | The collection of related items. |
length | integer | false | none | The length of this variable. |
generateDataGridColumns | boolean | false | none | The indication of generate data grid columns. |
variableRelation
{
"messageName": "string",
"pathName": "string",
"name": "string"
}
Information about the variable on which the alert type is created.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
messageName | string | false | none | The message schema name. Valid values are letters, numbers, underscores, and spaces. |
pathName | string | false | none | The json path name to the variable set. Valid values are letters, numbers, underscores and periods. |
name | string | false | none | The property name of the variable. Valid values are letters, numbers, and underscores. |
ruleExportUsedList
{
"name": "string"
}
A list used by an exported rule.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | false | none | The name of the list. |
publishContent
{
"analyticStoreUri": [
"string"
],
"code": "string",
"codeMediaType": "string",
"codeType": "string",
"codeURI": "string",
"createdBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"format": "string",
"formatURI": "string",
"modelName": "string",
"modelID": "string",
"modifiedBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"principalID": "string",
"projectID": "string",
"publishLevel": "string",
"publishNotes": "string",
"sourceURI": "string",
"variableXml": "string",
"version": 1
}
Publishing Model Content
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
analyticStoreUri | [string] | false | none | The URI that points to the analytic store in the CAS library. |
code | string | true | none | The model score code. |
codeMediaType | string | false | none | The code media type indicates the format of the code when it is downloaded. |
codeType | string | true | none | The code type can be datastep or ds2 . |
codeURI | string | false | none | The URI for the model score code that points to the score code. |
createdBy | string | false | none | The user who created the object. |
creationTimeStamp | string(date-time) | false | none | The timestamp for when the object 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 | The URI for the variable format. |
modelName | string | true | none | The name of the model. |
modelID | string | false | none | The model ID that can be used by the client to find their published model. |
modifiedBy | string | false | none | The user who most recently modified the object. |
modifiedTimeStamp | string(date-time) | false | none | The timestamp for when the object 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 | This URI represents where the model came from. |
variableXml | string | false | none | The variables in XML format. |
version | integer | false | none | The API representation version. |
createVariable
{
"name": "string",
"displayName": "string",
"type": "array",
"description": "string",
"tags": [
{
"name": "string",
"value": "string"
}
],
"version": 1,
"minLength": 0,
"maxLength": 0,
"enumValues": [
"string"
],
"enumURI": "string",
"minimum": 0,
"maximum": 0,
"inclusiveMinimum": true,
"exclusiveMaximum": true,
"arrayItem": "none",
"minItems": 0,
"maxItems": 0,
"required": false,
"deprecated": false,
"private": false,
"access": "rw",
"isMissing": false,
"defaultValue": "",
"locked": true,
"userGroup": "DMSDefault"
}
CreateVariable
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | true | none | The name of the variable. Valid values are letters, numbers, and underscores. |
displayName | string | false | none | This is a general purpose name for the variable. Defaults to the name if not provided. |
type | variableTypeEnum | true | none | The primitive data type of the variable. Please refer to Data Types section for limits. |
description | string | false | none | The purpose of the variable |
tags | [tag] | false | none | An array of variable tags. |
version | integer | false | none | The minimum and maximum version supported. Enables future version support such as version 1 and 2 |
minLength | integer | false | none | The minimum length of a string |
maxLength | integer | false | none | The maximum length of a string |
enumValues | [string] | false | none | A pre-defined set of valid values. Use it for enumerations no more than 20. |
enumURI | string | false | none | An external reference URI of a large set of enumerated values. |
minimum | number | false | none | A minimum value for a number. |
maximum | number | false | none | A maximum value for a number. |
inclusiveMinimum | boolean | false | none | A value of true represents the minimum value is inclusive. |
exclusiveMaximum | boolean | false | none | A value of true represents the maximum value is exclusive. |
arrayItem | arrayItemTypeEnum | false | none | The type for an array. |
minItems | integer | false | none | The minimum number of items in the array |
maxItems | integer | false | none | The maximum number of items in the array |
required | boolean | false | none | This variable is required if set to true |
deprecated | boolean | false | none | This variable is should not be used as it may be removed in the future when true . |
private | boolean | false | none | This variable neither can be modified nor deleted when true .They can only be modified by prescribed templates. |
access | string | false | none | The read-write access allowed on the variable.na - Not-Applicable. This variable is a blackbox that cannot be read nor modified by SAS.rw - Read-Write. This variable can be read and modifed.ro - Read-Only. This variable cannot be modified. |
isMissing | boolean | false | none | This signifies missing value. Only applies to numeric types. |
defaultValue | string | false | none | This is the default or initial value of the variable. Only applies to string and numeric types. |
locked | boolean | false | none | That flag provides external clients with more control to disallow any modification until unlocked. This is managed primarily by an external client. |
userGroup | string | false | none | The users in the user group can only operate on this variable. The custom group DMSDefault implictlyapplies to all users. Other specialization are users in the DMSViewer can view all variables in any group.Users in the DMSAdmin can read and update any variable. |
Enumerated Values
Property | Value |
---|---|
access | na |
access | rw |
access | ro |
variableTypeEnum
"array"
VariableType
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
VariableType | string | false | none | The primitive data type of the variable. Please refer to Data Types section for limits. |
Enumerated Values
Property | Value |
---|---|
VariableType | array |
VariableType | string |
VariableType | number |
VariableType | integer |
VariableType | bigint |
VariableType | currency |
VariableType | boolean |
VariableType | timestamp |
VariableType | epochMillis |
VariableType | sasdatetime |
arrayItemTypeEnum
"none"
ArrayItemType
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
ArrayItemType | string | false | none | The type for an array. |
Enumerated Values
Property | Value |
---|---|
ArrayItemType | none |
ArrayItemType | string |
ArrayItemType | integer |
ArrayItemType | number |
ArrayItemType | boolean |
ArrayItemType | byte |
ArrayItemType | epochMillis |
ArrayItemType | timestamp |
ArrayItemType | currency |
ArrayItemType | bigint |
ArrayItemType | sasdatetime |
ruleUsedList
{
"listName": "string",
"columns": [
{
"name": "string",
"datatype": "string",
"position": 0,
"isKey": true,
"keyPosition": 0
}
],
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string"
}
The association between a rule and a list that is used by the rule.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
listName | string | false | none | The name of the lookup list. |
columns | [object] | false | none | The list columns information. |
» name | string | false | none | The column name. |
» datatype | string | false | none | The type of data for the column. |
» position | integer | false | none | The column position in the list. |
» isKey | boolean | false | none | An indicator that the column's value is used to create the key value. |
» keyPosition | integer | false | none | A 1-based position index that specifies where a column's value is located in the key value. A '0' means not a key.The column key indicator. |
creationTimeStamp | string(date-time) | false | none | The timestamp when the relationship between the rule and the list was created. |
createdBy | string | false | none | The user who created the relationship between the rule and the list. |
uriReference
{
"name": "string",
"uri": "string",
"mediaType": "string",
"contentType": "string",
"key": "string",
"location": "string"
}
URI Reference
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | false | none | The name of the URI reference. |
uri | string | false | none | A unique sequence of characters that identifies a logical or physical resource. |
mediaType | string | false | none | Represents an internet media type. |
contentType | string | false | none | The indication the original media type of the resource. |
key | string | false | none | The key of analytic store. |
location | string | false | none | The location of the resource. |
ruleExportUsedVariable
{
"schemaName": "string",
"jsonPath": "string",
"name": "string",
"isProfile": true,
"variableSummary": {
"name": "string",
"displayName": "string",
"type": "array",
"description": "string",
"tags": [
{
"name": "string",
"value": "string"
}
],
"version": 1,
"minLength": 0,
"maxLength": 0,
"enumValues": [
"string"
],
"enumURI": "string",
"minimum": 0,
"maximum": 0,
"inclusiveMinimum": true,
"exclusiveMaximum": true,
"arrayItem": "none",
"minItems": 0,
"maxItems": 0,
"required": false,
"deprecated": false,
"private": false,
"access": "rw",
"isMissing": false,
"defaultValue": "",
"locked": true,
"userGroup": "DMSDefault",
"revision": 0,
"id": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"variableSetId": "string",
"jsonPath": "string"
}
}
A variable used by an exported rule.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
schemaName | string | false | none | The name of the variable's schema. |
jsonPath | string | false | none | The JSON path to the variable set. |
name | string | false | none | The name of the variable. |
isProfile | boolean | false | none | A flag indicating whether the used variable is in a profile schema. If it is, the VariableSummary is also provided. |
variableSummary | variableSummary | false | none | A summary representation of a variable. |
destination
{
"name": "string",
"casServerName": "string",
"casLibrary": "string",
"description": "string",
"destinationTable": "string",
"destinationType": "string",
"databaseCasLibrary": "string",
"user": "string",
"hdfsDirectory": "string",
"configurationDirectory": "string",
"authenticationDomain": "string",
"masUri": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"createdBy": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"version": 1
}
Publishing Destination
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | true | none | The name of the publishing destination server. |
casServerName | string | false | none | The name of the CAS server. |
casLibrary | string | false | none | The name of the CAS library. |
description | string | false | none | The description of the publishing destination server. |
destinationTable | string | false | none | The name of the publishing destination table. |
destinationType | string | false | none | The destination type can be "cas", "microAnalyticServer", "teradata", "hadoop", "aws", "azure", "aml", "git", and "privateDocker". |
databaseCasLibrary | string | false | none | The pre-defined CAS library that was used by Teradata. |
user | string | false | none | The user name of Hadoop. |
hdfsDirectory | string | false | none | The root HDFS folder where the model directory is to be created. |
configurationDirectory | string | false | none | The class path for Hadoop JAR files. For example: /opt/hadoopjars |
authenticationDomain | string | false | none | The name of the authentication domain that contains the remote login information for publishing users to gain access to the remote environment for the SAS Micro Analytic Service. For example: remoteAuthDomain |
masUri | string | false | none | The base URI that contains the host, the protocol, and an optional port, which addresses the remote SAS Micro Analytic Service that this destination publishes to for this destination. For example: http://hostA.com |
links | [link] | false | none | links |
createdBy | string | false | none | The user who created the object. |
creationTimeStamp | string(date-time) | false | none | The timestamp for when the object was created, in the format of YYYY-MM-DDThh:mm:ss.sssZ . |
modifiedBy | string | false | none | The user who most recently modified the object. |
modifiedTimeStamp | string(date-time) | false | none | The timestamp for when the object was last modified, in the format of YYYY-MM-DDThh:mm:ss.sssZ . |
version | integer | false | none | The API representation version. |
ruleUsedVariable
{
"schemaName": "string",
"name": "string",
"jsonPath": "string",
"isModifying": true,
"type": "array",
"arrayItem": "none",
"variableId": "string",
"variableSetId": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string"
}
RuleUsedVariable
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
schemaName | string | false | none | The name of the message schema. |
name | string | false | none | The name of the variable. |
jsonPath | string | false | none | The JSON path to the variable set. |
isModifying | boolean | false | none | Flag that indicates whether this rule modifies the variable's value. |
type | variableTypeEnum | false | none | The primitive data type of the variable. Please refer to Data Types section for limits. |
arrayItem | arrayItemTypeEnum | false | none | The type for an array. |
variableId | string | false | none | The unique identifier of the message schema variable used by the rule. |
variableSetId | string | false | none | The unique identifier of the variable set that contains the variable used by the rule. |
creationTimeStamp | string(date-time) | false | none | The timestamp when the relationship between the rule and the variable was created. |
createdBy | string | false | none | The user who created the relationship between the rule and the variable. |
deployableRulev2
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"baseRuleId": "string",
"ruleVersion": 0,
"messageClassificationId": "30cfcff2-22df-4b7c-aa2d-6571c7fe702a",
"schemaName": "string",
"projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
"ruleTypeName": "decision",
"state": "string",
"pendingApproval": false,
"keywords": "string",
"alertType": "string",
"alertReason": "string",
"executionOrderType": -1,
"executionOrderPriority": 0,
"configuredOperationalState": "0",
"operationalState": "-2",
"operationalTimeLimit": 0,
"creationTimeStamp": "string",
"createdBy": "string",
"modifiedTimeStamp": "string",
"modifiedBy": "string",
"revision": 0,
"version": 0,
"messageDisplayName": "string",
"messageClassificationKeyCode": "string",
"messageClassificatinoDisplayName": "string",
"deployed": false,
"deployedTimeStamp": "string",
"canView": false
}
deployablerule
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
deployablerule | any | false | none | The representation of deployable rule. |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | rulev2 | false | none | A detection rule (without code) |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» name | string | false | none | The name of the project. |
» messageDisplayName | string | false | none | This is a general purpose name for the message. |
» messageClassificationKeyCode | string | false | none | The unique code that represents the message classification. |
» messageClassificatinoDisplayName | string | false | none | The descriptive name of the message classification. |
» deployed | boolean | false | none | Flag indicating whether the rule has been deployed or not. |
» deployedTimeStamp | string | false | none | Time when the rule was last deployed. |
» canView | boolean | false | none | Flag indicating the current user has access to view the rule or not. |
updateVariable
{
"name": "string",
"displayName": "string",
"type": "array",
"description": "string",
"tags": [
{
"name": "string",
"value": "string"
}
],
"version": 1,
"minLength": 0,
"maxLength": 0,
"enumValues": [
"string"
],
"enumURI": "string",
"minimum": 0,
"maximum": 0,
"inclusiveMinimum": true,
"exclusiveMaximum": true,
"arrayItem": "none",
"minItems": 0,
"maxItems": 0,
"required": false,
"deprecated": false,
"private": false,
"access": "rw",
"isMissing": false,
"defaultValue": "",
"locked": true,
"userGroup": "DMSDefault",
"revision": 0
}
UpdateVariable
Properties
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | createVariable | false | none | A create request representation for a variable. |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» revision | integer | false | none | The last revision update to the variable. This a number that is used for database optimistic locking during concurrent requests. Each time an update occurs the value is incremented. It must be provided for performing PATCH updates only. This number is independent of the multiple revisions of a schema. |
destinationProperty
{
"name": "string",
"value": "string"
}
Destination 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. |
ruleExportDependency
{
"baseRuleId": "string"
}
A rule dependency used by an exported rule.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
baseRuleId | string | false | none | The base rule identifier of the rule dependency used by the exported rule. |
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. |
tag
{
"name": "string",
"value": "string"
}
Tag
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | true | none | The property name of the tag. |
value | string | false | none | The property value of the tag |
Examples
Detection Message Schema
Base URLs:
http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema
https://example.com/detectionMessageSchema
Terms of service 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.
This API provides lifecycle operations to design the layout of a user message including additional metadata to facilitate solution use cases. Additionally, this API also provides lifecycle operations to promote reusable message schema and variable set templates (aka definitions). Detection Message Schema API enables solutions to parse and validate the message schema against the actual message, detect data quality issues, enforce coherent structures of messages within an organization. In addition, it supports flexible and hierarchical layouts.
Usage Notes
Overview
The Detection Message Schema API is separated into two categories namely instance-based and template-based lifecycle operations. The instance-based lifecycle operations are performed on Messages, Variable Sets and Variables. These schema instances are used for validating the actual message for conformance and governance. The template-based life-cycle operations provides definitions that can be reused across schema instances.
The anatomy of a message schema is shown below:
Lifecycle of a Message Schema
Each message schema has a state
. A state
dictates the capabilities of operations that are allowed. There can only be
one Developing
version in a message schema revision tree. A Deployed
message schema is immutable so no changes can
occur. The following diagrams shows the states and transitions.
Backward Compatibility
The detection message schema restricts operations to avoid breaking changes. Variables are deprecated and marked optional and eventually removed by the client. Additional message schema's can be created if required.
Partial Updates with PATCH Operations
The detection message schema supports PATCH operations to enable partial updates to the domain model. The request body
should only include fields that are needed to be modified. It does not support PUT operations that replace the
entire set of domain attributes. In order to use PATCH operations the client must provide if-Match
in the header and
a revision
attribute in the request body. Both the ETag
header value and the revision
number in the request body
must be provided from the database object to successfully update. Typically, a GET operation of the object is done prior
to a PATCH operation in-order to know the ETag
and revision
values. Note, revision
stands for the last update number
and not the version of a message schema. It is used to enforce optimistic locking at the database.
User Group Integration with Variables
All variables are associated with a user group that controls access to the variable. The Detection Message Schema creates DMSDefault, DMSViewer, and DMAdmin user groups on startup. On the creation of a variable, the user group defaults to DMSDefault. All users are implicit members of the DMSDefault. These users can perform all operations on a variable with user group DMSDefault. DMSViewer and DMSAdmin are explicit user groups. An administrator must manually add a user to these groups. A member of the DMSViewer user group can view all variables but not modify them. A member of the DMSAdmin user group can view and modify any variable. A variable created with a specific custom user group is viewed and modified by members of that user group only. In summary:
- Viewer (
DMSViewer
) Role Group - Members of this can vew all variables regardless of its user group. - Admin (
DMSAdmin
) Role Group - Members can view, create, update and delete any variable. - Default (
DMSDefault
) User Group - All users implicitly can view, create, update and delete variables ofDMSDefault
. - User Defined User Group - Members of this user group can view, create, update and delete variables of its group only.
Advanced Features
Metadata for Associations
In addition to allowing metadata for messages, variable sets, and variables, the message schema service also allows
metadata on associations or relationships. The message schema supports two type of metadata associations namely
associative
and compositive
.
An associative
relationship type is between a variable set and a variable i.e. a
variable set of one message schema can associate with variables of another message schema. As an example, a relationship
can be used to capture the keys for a group-by
for a variables in a variable set.
A composite
relationship type is between a message schema set and other simple message schemas i.e.
a message schema set is a collection of other reusable message schemas. As an example, a relationship can be used
to create multiple variations of a message schema sets by including common set of message schemas and some specific
message schemas.
Data Types
The detection message schema supports the following data types. Various language integration tools can use the following mappings as a guidance.
Message Schema Type |
Minimum Value |
Maximum Value |
SDA (DS2) Type |
Golang Type |
Java Type |
Python Type |
JSON Type |
ION Type |
Avro Type |
---|---|---|---|---|---|---|---|---|---|
string | 0 | n > 0 | varchar(n) | string | String | str/unicode | string | string | string |
number | 4.94065645841E-324 | 1.7976931348623157e+308 | double | float64 | double | float | number | float/decimal | float/double |
integer | -2,147,483,648 | 2,147,483,647 | int | int32 | int | int | integer | int | int/long |
bigint | -9,223,372,036,854,775,807 | 9,223,372,036,854,775,807 | bigint | int64 | long | int | number | integer | long |
boolean | false | true | int | bool | boolean | bool | boolean | bool | boolean |
currencysame as number except solutions may enforce limits | 4.94065645841E-324 | 1.7976931348623157e+308 | double | float64 | double | float | number | decimal | double |
timestamp | n/a | n/a | double | time.Time/uint64 | DateTime/long | datetime/int | string | timestamp | long |
epochMillis | 0 | >0 | bigint | uint64 | long | int | number | integer | |
array | 0 | 65535 | - | - | - | - | array | list | array |
Terminology
Message
A Message is a schema that defines the layout of variables. It consists of a collection of variable sets. Examples of message schema are payments, loans, wires, identity, etc. The message schema can be defined by the user or SAS Institute. SAS-provided messages are called prescribed templates to promote consistency across solution implementations.
Variable Set
A Variable Set is a container of defined variables. A Variable Set can be nested with other Variable Sets. Any number of Variable Sets can be added to the Message. The user can follow best practices on how the Variable Sets are grouped and reusable.
Variable
A Variable is a property definition associated with a Variable Set. A property definition contains the name, type, and additional metadata associated with the Variable.
Tag
A Tag is a collection of name and value pairs associated with domain resources such as Messages, Variable Sets, or Variables. The purpose, format, and importance of these tags are driven by the schema authors; however, they are meant to provide additional metadata properties associated with a domain resource. The name of the tag MUST be unique per domain resource.
Error Codes
HTTP Status Code | Error Code | Description |
---|---|---|
400 | 11806 | Invalid id used in request |
400 | 11807 | Invalid URI used |
400 | 11810 | No messages were specified. |
400 | 11811 | Message(s) were specified but none could not be found. |
500 | 11815 | A dependent service was not available. The service name appears in the message. |
409 | Update failed due to conflict associated with concurrent changes. | |
412 | Update failed due to precondition such as ETag did not match | |
422 | Update failed due to semantic level error in the request | |
428 | Update failed due to if-Match is missing. |
Operations
Root
The operations for the root resource.
Return a list of top-level links
Code samples
# You can also use wget
curl -X GET http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/ \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.api+json'
const headers = {
'Accept':'application/vnd.sas.api+json'
};
fetch('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/',
{
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('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/', 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", "http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /
Return a list of top-level links.
Example responses
Return a list of API Links
{
"version": 1,
"links": [
{
"method": "GET",
"rel": "variables",
"href": "/detectionMessageSchema/variableSets/{variableSetId}/variables",
"uri": "/detectionMessageSchema/variableSets/{variableSetId}/variables",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message.variable"
},
{
"method": "POST",
"rel": "createVariable",
"href": "/detectionMessageSchema/variableSets/{variableSetId}/variables",
"uri": "/detectionMessageSchema/variableSets/{variableSetId}/variables",
"type": "application/vnd.sas.detection.message.variable"
},
{
"method": "GET",
"rel": "variableSets",
"href": "/detectionMessageSchema/messages/{messageId}/variableSets",
"uri": "/detectionMessageSchema/messages/{messageId}/variableSets",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message.variables"
},
{
"method": "POST",
"rel": "createVariableSet",
"href": "/detectionMessageSchema/messages/{messageId}/variableSets",
"uri": "/detectionMessageSchema/messages/{messageId}/variableSets",
"type": "application/vnd.sas.detection.message.variables"
},
{
"method": "GET",
"rel": "messages",
"href": "/detectionMessageSchema/messages",
"uri": "/detectionMessageSchema/messages",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message"
},
{
"method": "POST",
"rel": "createMessage",
"href": "/detectionMessageSchema/messages",
"uri": "/detectionMessageSchema/messages",
"type": "application/vnd.sas.detection.message"
},
{
"method": "GET",
"rel": "templates",
"href": "/detectionMessageSchema/templates",
"uri": "/detectionMessageSchema/templates",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message.schema.template"
},
{
"method": "POST",
"rel": "createTemplate",
"href": "/detectionMessageSchema/templates",
"uri": "/detectionMessageSchema/templates",
"type": "application/vnd.sas.detection.message.schema.template"
}
]
}
{
"version": 1,
"links": [
{
"method": "GET",
"rel": "variables",
"href": "/detectionMessageSchema/variableSets/{variableSetId}/variables",
"uri": "/detectionMessageSchema/variableSets/{variableSetId}/variables",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message.variable"
},
{
"method": "POST",
"rel": "createVariable",
"href": "/detectionMessageSchema/variableSets/{variableSetId}/variables",
"uri": "/detectionMessageSchema/variableSets/{variableSetId}/variables",
"type": "application/vnd.sas.detection.message.variable"
},
{
"method": "GET",
"rel": "variableSets",
"href": "/detectionMessageSchema/messages/{messageId}/variableSets",
"uri": "/detectionMessageSchema/messages/{messageId}/variableSets",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message.variables"
},
{
"method": "POST",
"rel": "createVariableSet",
"href": "/detectionMessageSchema/messages/{messageId}/variableSets",
"uri": "/detectionMessageSchema/messages/{messageId}/variableSets",
"type": "application/vnd.sas.detection.message.variables"
},
{
"method": "GET",
"rel": "messages",
"href": "/detectionMessageSchema/messages",
"uri": "/detectionMessageSchema/messages",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message"
},
{
"method": "POST",
"rel": "createMessage",
"href": "/detectionMessageSchema/messages",
"uri": "/detectionMessageSchema/messages",
"type": "application/vnd.sas.detection.message"
},
{
"method": "GET",
"rel": "templates",
"href": "/detectionMessageSchema/templates",
"uri": "/detectionMessageSchema/templates",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message.schema.template"
},
{
"method": "POST",
"rel": "createTemplate",
"href": "/detectionMessageSchema/templates",
"uri": "/detectionMessageSchema/templates",
"type": "application/vnd.sas.detection.message.schema.template"
}
]
}
Service not available 404 Response Example
{
"version": 2,
"httpStatusCode": 404,
"errorCode": 1000000,
"message": "Service not available"
}
{
"version": 2,
"httpStatusCode": 404,
"errorCode": 1000000,
"message": "Service not available"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
404 | Not Found | Service is not available | Inline |
Response Schema
Status Code 200
API
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» version | integer | true | none | The version number of the API representation. This is version 1. |
» links | [messageSummaryCollection/allOf/0/properties/links/items] | true | none | The API's top-level links. |
»» Link | messageSummaryCollection/allOf/0/properties/links/items | false | none | A link to a related operation or resource. |
»»» 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. |
Status Code 404
Error
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 | [#/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [messageSummaryCollection/allOf/0/properties/links/items] | false | none | The links that apply to the error. |
»» Link | messageSummaryCollection/allOf/0/properties/links/items | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Etag | string | An hash-code for the response resource. | |
200 | Last-Modified | string | Data and Time of last modification. | |
200 | Location | string | Location of URI for the endpoint. | |
404 | Last-Modified | string | Data and Time of last modification. | |
404 | Location | string | Location of URI for the endpoint. |
Instances
The operations for message schema instances.
Create a new message
Code samples
# You can also use wget
curl -X POST http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.detection.message+json' \
-H 'Accept: application/vnd.sas.detection.message+json'
const inputBody = '{
"name": "string",
"displayName": "string",
"description": "string",
"type": "financial"
}';
const headers = {
'Content-Type':'application/vnd.sas.detection.message+json',
'Accept':'application/vnd.sas.detection.message+json'
};
fetch('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages',
{
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.detection.message+json',
'Accept': 'application/vnd.sas.detection.message+json'
}
r = requests.post('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.detection.message+json"},
"Accept": []string{"application/vnd.sas.detection.message+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /messages
This endpoint creates a new message. By default the message schema is created as a "Developing" version.
Also, a root
variable set named after the message is created automatically during this operation for
additional variable sets to be created.
It is only to be used for a new message schema that has no prior version.
The name of the message schema MUST be unique across all message schemas otherwise it will fail with a 409.
Body parameter
{
"name": "string",
"displayName": "string",
"description": "string",
"type": "financial"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | #/paths/~1messages/post/requestBody/content/application~1vnd.sas.detection.message%2Bjson/schema | false | none |
Example responses
Get a Message Example
{
"creationTimeStamp": "2022-10-22T16:37:45.395451Z",
"createdBy": "anonymous",
"modifiedTimeStamp": "2022-10-22T16:37:45.39544Z",
"modifiedBy": "anonymous",
"revision": 0,
"version": 1,
"id": "f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"name": "TESTSchema",
"displayName": "MyDisplayName",
"state": "Developing",
"type": "test",
"description": "Description for TESTSchema",
"messageSetId": "52143f1a-22b0-4507-aae8-bba7e86d4f9e",
"semVersion": "1.0.0",
"committedSemVersion": "1.0.0",
"variableSet": {
"creationTimeStamp": "2022-10-22T16:37:45.397558Z",
"createdBy": "anonymous",
"modifiedTimeStamp": "2022-10-22T16:37:45.397551Z",
"modifiedBy": "anonymous",
"revision": 0,
"version": 1,
"id": "8e330df8-a534-45af-b468-610de9930f5b",
"name": "TESTSchema",
"displayName": "TESTSchema",
"description": "",
"type": "object",
"required": false,
"deprecated": false,
"private": false,
"maxItems": 10,
"messageId": "f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"childCount": 2
},
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"uri": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"type": "application/vnd.sas.detection.message"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"uri": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"type": "application/vnd.sas.detection.message"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"uri": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7"
},
{
"method": "GET",
"rel": "variableSet",
"href": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7/variableSets/8e330df8-a534-45af-b468-610de9930f5b",
"uri": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7/variableSets/8e330df8-a534-45af-b468-610de9930f5b",
"type": "application/vnd.sas.detection.message.variables"
}
]
}
{
"creationTimeStamp": "2022-10-22T16:37:45.395451Z",
"createdBy": "anonymous",
"modifiedTimeStamp": "2022-10-22T16:37:45.39544Z",
"modifiedBy": "anonymous",
"revision": 0,
"version": 1,
"id": "f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"name": "TESTSchema",
"displayName": "MyDisplayName",
"state": "Developing",
"type": "test",
"description": "Description for TESTSchema",
"messageSetId": "52143f1a-22b0-4507-aae8-bba7e86d4f9e",
"semVersion": "1.0.0",
"committedSemVersion": "1.0.0",
"variableSet": {
"creationTimeStamp": "2022-10-22T16:37:45.397558Z",
"createdBy": "anonymous",
"modifiedTimeStamp": "2022-10-22T16:37:45.397551Z",
"modifiedBy": "anonymous",
"revision": 0,
"version": 1,
"id": "8e330df8-a534-45af-b468-610de9930f5b",
"name": "TESTSchema",
"displayName": "TESTSchema",
"description": "",
"type": "object",
"required": false,
"deprecated": false,
"private": false,
"maxItems": 10,
"messageId": "f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"childCount": 2
},
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"uri": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"type": "application/vnd.sas.detection.message"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"uri": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"type": "application/vnd.sas.detection.message"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"uri": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7"
},
{
"method": "GET",
"rel": "variableSet",
"href": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7/variableSets/8e330df8-a534-45af-b468-610de9930f5b",
"uri": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7/variableSets/8e330df8-a534-45af-b468-610de9930f5b",
"type": "application/vnd.sas.detection.message.variables"
}
]
}
New Message 400 Response Example
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"A3HtzlFDDdHYm_ 4RK6HU5GAmzuwb cY5DVl TLKwLiloRKHk3nQLirXo4Np7_w5H07gWIOtixEUXF8qPDdFkLiI7n2VsBVITwMMp Q6Npp_zBaMpknSxwRb92u42aZw\" for the field \"Name\" exceeds the maximum length of 127.",
"details": [
"field: Name",
"value: A3HtzlFDDdHYm_ 4RK6HU5GAmzuwb cY5DVl TLKwLiloRKHk3nQLirXo4Np7_w5H07gWIOtixEUXF8qPDdFkLiI7n2VsBVITwMMp Q6Npp_zBaMpknSxwRb92u42aZw",
"maximumLength: 127",
"messageID: detection-lib-api-icu.validation.invalid.value.too.long.msg",
"path: /detectionMessageSchema/messages",
"correlator: ab674f0f-52d5-48b2-8377-5d0ed69c29bd"
]
}
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"A3HtzlFDDdHYm_ 4RK6HU5GAmzuwb cY5DVl TLKwLiloRKHk3nQLirXo4Np7_w5H07gWIOtixEUXF8qPDdFkLiI7n2VsBVITwMMp Q6Npp_zBaMpknSxwRb92u42aZw\" for the field \"Name\" exceeds the maximum length of 127.",
"details": [
"field: Name",
"value: A3HtzlFDDdHYm_ 4RK6HU5GAmzuwb cY5DVl TLKwLiloRKHk3nQLirXo4Np7_w5H07gWIOtixEUXF8qPDdFkLiI7n2VsBVITwMMp Q6Npp_zBaMpknSxwRb92u42aZw",
"maximumLength: 127",
"messageID: detection-lib-api-icu.validation.invalid.value.too.long.msg",
"path: /detectionMessageSchema/messages",
"correlator: ab674f0f-52d5-48b2-8377-5d0ed69c29bd"
]
}
New Message 409 Response Example
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000017,
"message": "An existing message schema with name \"TEST\" already exists.",
"details": [
"Name: TEST",
"messageID: detection-message-schema-api-icu.message.already.exists.msg",
"path: /detectionMessageSchema/messages",
"correlator: 3545df53-bd35-4c35-be66-0c62c3ebf105"
]
}
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000017,
"message": "An existing message schema with name \"TEST\" already exists.",
"details": [
"Name: TEST",
"messageID: detection-message-schema-api-icu.message.already.exists.msg",
"path: /detectionMessageSchema/messages",
"correlator: 3545df53-bd35-4c35-be66-0c62c3ebf105"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Created | message |
400 | Bad Request | The request was invalid. Reasons may be invalid data or structure in the request body`. | Inline |
409 | Conflict | There is a conflict with an existing resource. Possible Reason(s): |
- The Developing
revision already exists,
- The message schema with the same name
already exists|Inline|
Response Schema
Status Code 400
Error
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 | [#/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [messageSummaryCollection/allOf/0/properties/links/items] | false | none | The links that apply to the error. |
»» Link | messageSummaryCollection/allOf/0/properties/links/items | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 409
Error
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 | [#/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [messageSummaryCollection/allOf/0/properties/links/items] | false | none | The links that apply to the error. |
»» Link | messageSummaryCollection/allOf/0/properties/links/items | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Etag | string | An hash-code for the response resource. | |
201 | Last-Modified | string | Data and Time of last modification. | |
201 | Location | string | Location of URI for the endpoint. |
Return a list of messages
Code samples
# You can also use wget
curl -X GET http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages',
{
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('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages', 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", "http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /messages
This endpoint returns a list of messages. The items returned are a summary representation of a message.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
start | query | integer | false | 0-based Offset of first resource to return. Defaults to 0. |
limit | query | integer | false | Maximum number of resources to return. Defaults to 100. |
filter | query | string(filter-criteria) | false | Filter criteria for returned resources. See Filtering in REST APIs. |
sortBy | query | string(sort-criteria) | false | Sort returned resources. See Sorting in REST APIs. |
Example responses
List of Messages Example
{
"version": 2,
"accept": "application/vnd.sas.detection.message",
"count": 13,
"start": 0,
"limit": 100,
"name": "messages",
"items": [
{
"creationTimeStamp": "2022-10-20T02:33:59.887392Z",
"createdBy": "sas.detectionDefinition",
"modifiedTimeStamp": "2022-10-20T02:33:59.887342Z",
"modifiedBy": "sas.detectionDefinition",
"revision": 0,
"version": 1,
"id": "f4d21e8b-3087-4c82-b676-5d19f1d5d4ad",
"name": "System",
"displayName": "System",
"state": "Developing",
"type": "financial",
"description": "Required Schema for Messages processed through the SAS Detection Architecture",
"messageSetId": "6054c182-5bd3-4f41-b3c3-d027623edfe6",
"semVersion": "1.0.0",
"committedSemVersion": "1.0.0"
},
{
"creationTimeStamp": "2022-10-20T02:34:05.537995Z",
"createdBy": "sas.detectionDefinition",
"modifiedTimeStamp": "2022-10-20T02:34:05.537948Z",
"modifiedBy": "sas.detectionDefinition",
"revision": 0,
"version": 1,
"id": "862395ed-02f6-485a-92ab-6087eb1c284b",
"name": "Command Ext",
"displayName": "Command Ext",
"state": "Developing",
"type": "financial",
"description": "Schema for Command Extension",
"messageSetId": "bb665b29-d522-49cd-9a90-66ca676416ae",
"semVersion": "1.0.0",
"committedSemVersion": "1.0.0"
},
{
"creationTimeStamp": "2022-10-20T02:34:06.573398Z",
"createdBy": "sas.detectionDefinition",
"modifiedTimeStamp": "2022-10-20T02:34:06.573322Z",
"modifiedBy": "sas.detectionDefinition",
"revision": 0,
"version": 1,
"id": "c53e2ea9-9485-48a4-ac02-05cf7b206b06",
"name": "Command",
"displayName": "Command",
"state": "Developing",
"type": "financial",
"description": "Schema for Command messages",
"messageSetId": "bd036c68-7f41-4692-adf7-c26bef432fe8",
"semVersion": "1.0.0",
"committedSemVersion": "1.0.0"
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionMessageSchema/messages",
"uri": "/detectionMessageSchema/messages",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionMessageSchema/messages?start=0&limit=100",
"uri": "/detectionMessageSchema/messages?start=0&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message"
}
]
}
{
"version": 2,
"accept": "application/vnd.sas.detection.message",
"count": 13,
"start": 0,
"limit": 100,
"name": "messages",
"items": [
{
"creationTimeStamp": "2022-10-20T02:33:59.887392Z",
"createdBy": "sas.detectionDefinition",
"modifiedTimeStamp": "2022-10-20T02:33:59.887342Z",
"modifiedBy": "sas.detectionDefinition",
"revision": 0,
"version": 1,
"id": "f4d21e8b-3087-4c82-b676-5d19f1d5d4ad",
"name": "System",
"displayName": "System",
"state": "Developing",
"type": "financial",
"description": "Required Schema for Messages processed through the SAS Detection Architecture",
"messageSetId": "6054c182-5bd3-4f41-b3c3-d027623edfe6",
"semVersion": "1.0.0",
"committedSemVersion": "1.0.0"
},
{
"creationTimeStamp": "2022-10-20T02:34:05.537995Z",
"createdBy": "sas.detectionDefinition",
"modifiedTimeStamp": "2022-10-20T02:34:05.537948Z",
"modifiedBy": "sas.detectionDefinition",
"revision": 0,
"version": 1,
"id": "862395ed-02f6-485a-92ab-6087eb1c284b",
"name": "Command Ext",
"displayName": "Command Ext",
"state": "Developing",
"type": "financial",
"description": "Schema for Command Extension",
"messageSetId": "bb665b29-d522-49cd-9a90-66ca676416ae",
"semVersion": "1.0.0",
"committedSemVersion": "1.0.0"
},
{
"creationTimeStamp": "2022-10-20T02:34:06.573398Z",
"createdBy": "sas.detectionDefinition",
"modifiedTimeStamp": "2022-10-20T02:34:06.573322Z",
"modifiedBy": "sas.detectionDefinition",
"revision": 0,
"version": 1,
"id": "c53e2ea9-9485-48a4-ac02-05cf7b206b06",
"name": "Command",
"displayName": "Command",
"state": "Developing",
"type": "financial",
"description": "Schema for Command messages",
"messageSetId": "bd036c68-7f41-4692-adf7-c26bef432fe8",
"semVersion": "1.0.0",
"committedSemVersion": "1.0.0"
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionMessageSchema/messages",
"uri": "/detectionMessageSchema/messages",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionMessageSchema/messages?start=0&limit=100",
"uri": "/detectionMessageSchema/messages?start=0&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | List of messages. | messageSummaryCollection |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | Data and Time of last modification. |
Return the latest version of messages
Code samples
# You can also use wget
curl -X GET http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/@latest \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/@latest',
{
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('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/@latest', 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", "http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/@latest", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /messages/@latest
This endpoint returns the list of latest versions of messages. The latest version is based on creation timestamp.
The items returned are a summary representation of a message.
The use of filter
expression containing the id
parameter will return an error.
It will return a message schema if the latest version does not satisfy the filter criteria.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
start | query | integer | false | 0-based Offset of first resource to return. Defaults to 0. |
limit | query | integer | false | Maximum number of resources to return. Defaults to 100. |
filter | query | string(filter-criteria) | false | Filter criteria for returned resources. See Filtering in REST APIs. |
sortBy | query | string(sort-criteria) | false | Sort returned resources. See Sorting in REST APIs. |
Example responses
List of Messages Example
{
"version": 2,
"accept": "application/vnd.sas.detection.message",
"count": 13,
"start": 0,
"limit": 100,
"name": "messages",
"items": [
{
"creationTimeStamp": "2022-10-20T02:33:59.887392Z",
"createdBy": "sas.detectionDefinition",
"modifiedTimeStamp": "2022-10-20T02:33:59.887342Z",
"modifiedBy": "sas.detectionDefinition",
"revision": 0,
"version": 1,
"id": "f4d21e8b-3087-4c82-b676-5d19f1d5d4ad",
"name": "System",
"displayName": "System",
"state": "Developing",
"type": "financial",
"description": "Required Schema for Messages processed through the SAS Detection Architecture",
"messageSetId": "6054c182-5bd3-4f41-b3c3-d027623edfe6",
"semVersion": "1.0.0",
"committedSemVersion": "1.0.0"
},
{
"creationTimeStamp": "2022-10-20T02:34:05.537995Z",
"createdBy": "sas.detectionDefinition",
"modifiedTimeStamp": "2022-10-20T02:34:05.537948Z",
"modifiedBy": "sas.detectionDefinition",
"revision": 0,
"version": 1,
"id": "862395ed-02f6-485a-92ab-6087eb1c284b",
"name": "Command Ext",
"displayName": "Command Ext",
"state": "Developing",
"type": "financial",
"description": "Schema for Command Extension",
"messageSetId": "bb665b29-d522-49cd-9a90-66ca676416ae",
"semVersion": "1.0.0",
"committedSemVersion": "1.0.0"
},
{
"creationTimeStamp": "2022-10-20T02:34:06.573398Z",
"createdBy": "sas.detectionDefinition",
"modifiedTimeStamp": "2022-10-20T02:34:06.573322Z",
"modifiedBy": "sas.detectionDefinition",
"revision": 0,
"version": 1,
"id": "c53e2ea9-9485-48a4-ac02-05cf7b206b06",
"name": "Command",
"displayName": "Command",
"state": "Developing",
"type": "financial",
"description": "Schema for Command messages",
"messageSetId": "bd036c68-7f41-4692-adf7-c26bef432fe8",
"semVersion": "1.0.0",
"committedSemVersion": "1.0.0"
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionMessageSchema/messages",
"uri": "/detectionMessageSchema/messages",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionMessageSchema/messages?start=0&limit=100",
"uri": "/detectionMessageSchema/messages?start=0&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message"
}
]
}
{
"version": 2,
"accept": "application/vnd.sas.detection.message",
"count": 13,
"start": 0,
"limit": 100,
"name": "messages",
"items": [
{
"creationTimeStamp": "2022-10-20T02:33:59.887392Z",
"createdBy": "sas.detectionDefinition",
"modifiedTimeStamp": "2022-10-20T02:33:59.887342Z",
"modifiedBy": "sas.detectionDefinition",
"revision": 0,
"version": 1,
"id": "f4d21e8b-3087-4c82-b676-5d19f1d5d4ad",
"name": "System",
"displayName": "System",
"state": "Developing",
"type": "financial",
"description": "Required Schema for Messages processed through the SAS Detection Architecture",
"messageSetId": "6054c182-5bd3-4f41-b3c3-d027623edfe6",
"semVersion": "1.0.0",
"committedSemVersion": "1.0.0"
},
{
"creationTimeStamp": "2022-10-20T02:34:05.537995Z",
"createdBy": "sas.detectionDefinition",
"modifiedTimeStamp": "2022-10-20T02:34:05.537948Z",
"modifiedBy": "sas.detectionDefinition",
"revision": 0,
"version": 1,
"id": "862395ed-02f6-485a-92ab-6087eb1c284b",
"name": "Command Ext",
"displayName": "Command Ext",
"state": "Developing",
"type": "financial",
"description": "Schema for Command Extension",
"messageSetId": "bb665b29-d522-49cd-9a90-66ca676416ae",
"semVersion": "1.0.0",
"committedSemVersion": "1.0.0"
},
{
"creationTimeStamp": "2022-10-20T02:34:06.573398Z",
"createdBy": "sas.detectionDefinition",
"modifiedTimeStamp": "2022-10-20T02:34:06.573322Z",
"modifiedBy": "sas.detectionDefinition",
"revision": 0,
"version": 1,
"id": "c53e2ea9-9485-48a4-ac02-05cf7b206b06",
"name": "Command",
"displayName": "Command",
"state": "Developing",
"type": "financial",
"description": "Schema for Command messages",
"messageSetId": "bd036c68-7f41-4692-adf7-c26bef432fe8",
"semVersion": "1.0.0",
"committedSemVersion": "1.0.0"
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionMessageSchema/messages",
"uri": "/detectionMessageSchema/messages",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionMessageSchema/messages?start=0&limit=100",
"uri": "/detectionMessageSchema/messages?start=0&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | List of messages. | messageSummaryCollection |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | Data and Time of last modification. |
Return unique list of message types used
Code samples
# You can also use wget
curl -X GET http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/types \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/types',
{
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('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/types', 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", "http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/types", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /messages/types
This endpoint returns a unique list of message types used. The creation timestamp represents the first time message type was created. The modified timestamp is always the same as the creation timestamp.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
start | query | integer | false | 0-based Offset of first resource to return. Defaults to 0. |
limit | query | integer | false | Maximum number of resources to return. Defaults to 100. |
filter | query | string(filter-criteria) | false | Filter criteria for returned resources. See Filtering in REST APIs. |
sortBy | query | string(sort-criteria) | false | Sort returned resources. See Sorting in REST APIs. |
Example responses
List of Message Types Example
{
"version": 2,
"accept": "application/vnd.sas.detection.message.type",
"count": 6,
"start": 0,
"limit": 100,
"name": "messageTypes",
"items": [
{
"creationTimeStamp": "2023-03-23T21:00:43.000000Z",
"modifiedTimeStamp": "2023-03-23T21:00:43.000000Z",
"version": 1,
"type": "prescribed"
},
{
"creationTimeStamp": "2023-03-06T18:29:43.000000Z",
"modifiedTimeStamp": "2023-03-06T18:29:43.000000Z",
"version": 1,
"type": "fraud"
},
{
"creationTimeStamp": "2023-07-28T04:39:42.906657Z",
"modifiedTimeStamp": "2023-07-28T04:39:42.906657Z",
"version": 1,
"type": "compliance"
},
{
"creationTimeStamp": "2023-05-10T17:58:42.387608Z",
"modifiedTimeStamp": "2023-05-10T17:58:42.387608Z",
"version": 1,
"type": "claims"
},
{
"creationTimeStamp": "2023-06-29T15:28:22.849609Z",
"modifiedTimeStamp": "2023-06-29T15:28:22.849609Z",
"version": 1,
"type": "solution_by_sas"
},
{
"creationTimeStamp": "2023-01-20T21:57:31.000000Z",
"modifiedTimeStamp": "2023-01-20T21:57:31.000000Z",
"version": 1,
"type": "profile"
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionMessageSchema/messages",
"uri": "/detectionMessageSchema/messages",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionMessageSchema/messages?start=0&limit=100",
"uri": "/detectionMessageSchema/messages?start=0&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message"
}
]
}
{
"version": 2,
"accept": "application/vnd.sas.detection.message.type",
"count": 6,
"start": 0,
"limit": 100,
"name": "messageTypes",
"items": [
{
"creationTimeStamp": "2023-03-23T21:00:43.000000Z",
"modifiedTimeStamp": "2023-03-23T21:00:43.000000Z",
"version": 1,
"type": "prescribed"
},
{
"creationTimeStamp": "2023-03-06T18:29:43.000000Z",
"modifiedTimeStamp": "2023-03-06T18:29:43.000000Z",
"version": 1,
"type": "fraud"
},
{
"creationTimeStamp": "2023-07-28T04:39:42.906657Z",
"modifiedTimeStamp": "2023-07-28T04:39:42.906657Z",
"version": 1,
"type": "compliance"
},
{
"creationTimeStamp": "2023-05-10T17:58:42.387608Z",
"modifiedTimeStamp": "2023-05-10T17:58:42.387608Z",
"version": 1,
"type": "claims"
},
{
"creationTimeStamp": "2023-06-29T15:28:22.849609Z",
"modifiedTimeStamp": "2023-06-29T15:28:22.849609Z",
"version": 1,
"type": "solution_by_sas"
},
{
"creationTimeStamp": "2023-01-20T21:57:31.000000Z",
"modifiedTimeStamp": "2023-01-20T21:57:31.000000Z",
"version": 1,
"type": "profile"
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionMessageSchema/messages",
"uri": "/detectionMessageSchema/messages",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionMessageSchema/messages?start=0&limit=100",
"uri": "/detectionMessageSchema/messages?start=0&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | List of message types. | messageTypeCollection |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | Data and Time of last modification. |
Partial update a message
Code samples
# You can also use wget
curl -X PATCH http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.detection.message+json' \
-H 'Accept: application/vnd.sas.detection.message+json'
const inputBody = '{
"name": "string",
"displayName": "string",
"description": "string",
"type": "financial",
"state": "Developing",
"revision": 0
}';
const headers = {
'Content-Type':'application/vnd.sas.detection.message+json',
'Accept':'application/vnd.sas.detection.message+json'
};
fetch('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}',
{
method: 'PATCH',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.detection.message+json',
'Accept': 'application/vnd.sas.detection.message+json'
}
r = requests.patch('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.detection.message+json"},
"Accept": []string{"application/vnd.sas.detection.message+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PATCH", "http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PATCH /messages/{messageId}
Partially update the properties of a message. Only "Developing" or "Deployment-Ready" messages can be updated.
Message property name
cannot be modified.
Body parameter
{
"name": "string",
"displayName": "string",
"description": "string",
"type": "financial",
"state": "Developing",
"revision": 0
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
messageId | path | string | true | This is the message UUID identifier of the existing message schema instance. |
body | body | #/paths/~1messages~1%7BmessageId%7D/patch/requestBody/content/application~1vnd.sas.detection.message%2Bjson/schema | false | none |
Example responses
Get a Message Example
{
"creationTimeStamp": "2022-10-22T16:37:45.395451Z",
"createdBy": "anonymous",
"modifiedTimeStamp": "2022-10-22T16:37:45.39544Z",
"modifiedBy": "anonymous",
"revision": 0,
"version": 1,
"id": "f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"name": "TESTSchema",
"displayName": "MyDisplayName",
"state": "Developing",
"type": "test",
"description": "Description for TESTSchema",
"messageSetId": "52143f1a-22b0-4507-aae8-bba7e86d4f9e",
"semVersion": "1.0.0",
"committedSemVersion": "1.0.0",
"variableSet": {
"creationTimeStamp": "2022-10-22T16:37:45.397558Z",
"createdBy": "anonymous",
"modifiedTimeStamp": "2022-10-22T16:37:45.397551Z",
"modifiedBy": "anonymous",
"revision": 0,
"version": 1,
"id": "8e330df8-a534-45af-b468-610de9930f5b",
"name": "TESTSchema",
"displayName": "TESTSchema",
"description": "",
"type": "object",
"required": false,
"deprecated": false,
"private": false,
"maxItems": 10,
"messageId": "f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"childCount": 2
},
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"uri": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"type": "application/vnd.sas.detection.message"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"uri": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"type": "application/vnd.sas.detection.message"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"uri": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7"
},
{
"method": "GET",
"rel": "variableSet",
"href": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7/variableSets/8e330df8-a534-45af-b468-610de9930f5b",
"uri": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7/variableSets/8e330df8-a534-45af-b468-610de9930f5b",
"type": "application/vnd.sas.detection.message.variables"
}
]
}
{
"creationTimeStamp": "2022-10-22T16:37:45.395451Z",
"createdBy": "anonymous",
"modifiedTimeStamp": "2022-10-22T16:37:45.39544Z",
"modifiedBy": "anonymous",
"revision": 0,
"version": 1,
"id": "f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"name": "TESTSchema",
"displayName": "MyDisplayName",
"state": "Developing",
"type": "test",
"description": "Description for TESTSchema",
"messageSetId": "52143f1a-22b0-4507-aae8-bba7e86d4f9e",
"semVersion": "1.0.0",
"committedSemVersion": "1.0.0",
"variableSet": {
"creationTimeStamp": "2022-10-22T16:37:45.397558Z",
"createdBy": "anonymous",
"modifiedTimeStamp": "2022-10-22T16:37:45.397551Z",
"modifiedBy": "anonymous",
"revision": 0,
"version": 1,
"id": "8e330df8-a534-45af-b468-610de9930f5b",
"name": "TESTSchema",
"displayName": "TESTSchema",
"description": "",
"type": "object",
"required": false,
"deprecated": false,
"private": false,
"maxItems": 10,
"messageId": "f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"childCount": 2
},
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"uri": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"type": "application/vnd.sas.detection.message"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"uri": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"type": "application/vnd.sas.detection.message"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"uri": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7"
},
{
"method": "GET",
"rel": "variableSet",
"href": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7/variableSets/8e330df8-a534-45af-b468-610de9930f5b",
"uri": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7/variableSets/8e330df8-a534-45af-b468-610de9930f5b",
"type": "application/vnd.sas.detection.message.variables"
}
]
}
Patch Message 400 Response Example
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"rHC6Fe0YzdOov_6vGhGtvURSMuwfoawhO\" for the field \"Type\" exceeds the maximum length of 32.",
"details": [
"field: Type",
"value: rHC6Fe0YzdOov_6vGhGtvURSMuwfoawhO",
"maximumLength: 32",
"messageID: detection-lib-api-icu.validation.invalid.value.too.long.msg",
"path: /detectionMessageSchema/messages/b8b7c5fc-eed9-4976-b5e8-7645be43041f",
"correlator: b77a1db5-b182-4818-b77b-d5397edea6fc"
]
}
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"rHC6Fe0YzdOov_6vGhGtvURSMuwfoawhO\" for the field \"Type\" exceeds the maximum length of 32.",
"details": [
"field: Type",
"value: rHC6Fe0YzdOov_6vGhGtvURSMuwfoawhO",
"maximumLength: 32",
"messageID: detection-lib-api-icu.validation.invalid.value.too.long.msg",
"path: /detectionMessageSchema/messages/b8b7c5fc-eed9-4976-b5e8-7645be43041f",
"correlator: b77a1db5-b182-4818-b77b-d5397edea6fc"
]
}
Patch Message 409 Response Example
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000022,
"message": "Modifying field \"Name\" affects backward compatibility for message schema \"TESTSchema\" with state \"Developing\".",
"details": [
"FieldName: Name",
"Name: TESTSchema",
"State: Developing",
"messageID: detection-message-schema-api-icu.backwards.compatibility.msg",
"path: /detectionMessageSchema/messages/b8b7c5fc-eed9-4976-b5e8-7645be43041f",
"correlator: ab774c4c-4a33-4b33-bfb5-d9d3a41f9c01"
]
}
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000022,
"message": "Modifying field \"Name\" affects backward compatibility for message schema \"TESTSchema\" with state \"Developing\".",
"details": [
"FieldName: Name",
"Name: TESTSchema",
"State: Developing",
"messageID: detection-message-schema-api-icu.backwards.compatibility.msg",
"path: /detectionMessageSchema/messages/b8b7c5fc-eed9-4976-b5e8-7645be43041f",
"correlator: ab774c4c-4a33-4b33-bfb5-d9d3a41f9c01"
]
}
Patch Message 412 Response Example
{
"version": 2,
"httpStatusCode": 412,
"errorCode": 1000000,
"message": "The object has been updated since you last retrieved it.",
"details": [
"messageID: detection-message-schema-api-icu.etag.mismatch.msg",
"path: /detectionMessageSchema/messages/b8b7c5fc-eed9-4976-b5e8-7645be43041f",
"correlator: 8573d5ac-01d2-4dc9-bf92-c6c4fddb86e8"
]
}
{
"version": 2,
"httpStatusCode": 412,
"errorCode": 1000000,
"message": "The object has been updated since you last retrieved it.",
"details": [
"messageID: detection-message-schema-api-icu.etag.mismatch.msg",
"path: /detectionMessageSchema/messages/b8b7c5fc-eed9-4976-b5e8-7645be43041f",
"correlator: 8573d5ac-01d2-4dc9-bf92-c6c4fddb86e8"
]
}
Error 422 Response Example
{
"version": 2,
"httpStatusCode": 422,
"errorCode": 1000002,
"message": "Failed to process the request even though valid"
}
{
"version": 2,
"httpStatusCode": 422,
"errorCode": 1000002,
"message": "Failed to process the request even though valid"
}
Error 428 Response Example
{
"version": 2,
"httpStatusCode": 428,
"errorCode": 1000002,
"message": "Missing required pre-condition If-Match header"
}
{
"version": 2,
"httpStatusCode": 428,
"errorCode": 1000002,
"message": "Missing required pre-condition If-Match header"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successfully updated the message | message |
400 | Bad Request | The request was invalid | Inline |
409 | Conflict | There is a conflict associated with existing resource. Possible Reason(s): |
- The message schema is immutable because it is in a Deployed
state
- The requested state is invalid due to the current state of the resource.|Inline|
|412|Precondition Failed|The supplied pre-condition was not satisfactory, typically indicating stale data.|Inline|
|422|Unprocessable Entity|The request cannot be processed even though it is a valid request.
Possible Reason(s):
- The requested message state could not be persisted|Inline|
|428|Precondition Required|A required pre-condition (If-Match/If-Unmodified-Since) was not provided.|Inline|
Response Schema
Status Code 400
Error
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 | [#/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [messageSummaryCollection/allOf/0/properties/links/items] | false | none | The links that apply to the error. |
»» Link | messageSummaryCollection/allOf/0/properties/links/items | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 409
Error
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 | [#/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [messageSummaryCollection/allOf/0/properties/links/items] | false | none | The links that apply to the error. |
»» Link | messageSummaryCollection/allOf/0/properties/links/items | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 412
Error
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 | [#/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [messageSummaryCollection/allOf/0/properties/links/items] | false | none | The links that apply to the error. |
»» Link | messageSummaryCollection/allOf/0/properties/links/items | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 422
Error
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 | [#/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [messageSummaryCollection/allOf/0/properties/links/items] | false | none | The links that apply to the error. |
»» Link | messageSummaryCollection/allOf/0/properties/links/items | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 428
Error
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 | [#/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [messageSummaryCollection/allOf/0/properties/links/items] | false | none | The links that apply to the error. |
»» Link | messageSummaryCollection/allOf/0/properties/links/items | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Etag | string | An hash-code for the response resource. | |
200 | Last-Modified | string | Data and Time of last modification. | |
200 | Location | string | Location of URI for the endpoint. | |
409 | Location | string | Location of URI for the endpoint. | |
412 | Location | string | Location of URI for the endpoint. | |
422 | Location | string | Location of URI for the endpoint. | |
428 | Location | string | Location of URI for the endpoint. |
Return a message
Code samples
# You can also use wget
curl -X GET http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.detection.message+json'
const headers = {
'Accept':'application/vnd.sas.detection.message+json'
};
fetch('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.detection.message+json'
}
r = requests.get('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.detection.message+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /messages/{messageId}
This endpoint returns a message.
A URI link to the root variableSet
link is returned.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
messageId | path | string | true | This is the message UUID identifier of the existing message schema instance. |
Example responses
Get a Message Example
{
"creationTimeStamp": "2022-10-22T16:37:45.395451Z",
"createdBy": "anonymous",
"modifiedTimeStamp": "2022-10-22T16:37:45.39544Z",
"modifiedBy": "anonymous",
"revision": 0,
"version": 1,
"id": "f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"name": "TESTSchema",
"displayName": "MyDisplayName",
"state": "Developing",
"type": "test",
"description": "Description for TESTSchema",
"messageSetId": "52143f1a-22b0-4507-aae8-bba7e86d4f9e",
"semVersion": "1.0.0",
"committedSemVersion": "1.0.0",
"variableSet": {
"creationTimeStamp": "2022-10-22T16:37:45.397558Z",
"createdBy": "anonymous",
"modifiedTimeStamp": "2022-10-22T16:37:45.397551Z",
"modifiedBy": "anonymous",
"revision": 0,
"version": 1,
"id": "8e330df8-a534-45af-b468-610de9930f5b",
"name": "TESTSchema",
"displayName": "TESTSchema",
"description": "",
"type": "object",
"required": false,
"deprecated": false,
"private": false,
"maxItems": 10,
"messageId": "f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"childCount": 2
},
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"uri": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"type": "application/vnd.sas.detection.message"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"uri": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"type": "application/vnd.sas.detection.message"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"uri": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7"
},
{
"method": "GET",
"rel": "variableSet",
"href": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7/variableSets/8e330df8-a534-45af-b468-610de9930f5b",
"uri": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7/variableSets/8e330df8-a534-45af-b468-610de9930f5b",
"type": "application/vnd.sas.detection.message.variables"
}
]
}
{
"creationTimeStamp": "2022-10-22T16:37:45.395451Z",
"createdBy": "anonymous",
"modifiedTimeStamp": "2022-10-22T16:37:45.39544Z",
"modifiedBy": "anonymous",
"revision": 0,
"version": 1,
"id": "f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"name": "TESTSchema",
"displayName": "MyDisplayName",
"state": "Developing",
"type": "test",
"description": "Description for TESTSchema",
"messageSetId": "52143f1a-22b0-4507-aae8-bba7e86d4f9e",
"semVersion": "1.0.0",
"committedSemVersion": "1.0.0",
"variableSet": {
"creationTimeStamp": "2022-10-22T16:37:45.397558Z",
"createdBy": "anonymous",
"modifiedTimeStamp": "2022-10-22T16:37:45.397551Z",
"modifiedBy": "anonymous",
"revision": 0,
"version": 1,
"id": "8e330df8-a534-45af-b468-610de9930f5b",
"name": "TESTSchema",
"displayName": "TESTSchema",
"description": "",
"type": "object",
"required": false,
"deprecated": false,
"private": false,
"maxItems": 10,
"messageId": "f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"childCount": 2
},
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"uri": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"type": "application/vnd.sas.detection.message"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"uri": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"type": "application/vnd.sas.detection.message"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"uri": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7"
},
{
"method": "GET",
"rel": "variableSet",
"href": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7/variableSets/8e330df8-a534-45af-b468-610de9930f5b",
"uri": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7/variableSets/8e330df8-a534-45af-b468-610de9930f5b",
"type": "application/vnd.sas.detection.message.variables"
}
]
}
{
"creationTimeStamp": "2022-10-22T16:37:45.395451Z",
"createdBy": "anonymous",
"modifiedTimeStamp": "2022-10-22T16:37:45.39544Z",
"modifiedBy": "anonymous",
"revision": 0,
"version": 1,
"id": "f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"name": "TESTSchema",
"displayName": "MyDisplayName",
"state": "Developing",
"type": "test",
"description": "Description for TESTSchema",
"messageSetId": "52143f1a-22b0-4507-aae8-bba7e86d4f9e",
"semVersion": "1.0.0",
"committedSemVersion": "1.0.0",
"variableSet": {
"creationTimeStamp": "2022-10-22T16:37:45.397558Z",
"createdBy": "anonymous",
"modifiedTimeStamp": "2022-10-22T16:37:45.397551Z",
"modifiedBy": "anonymous",
"revision": 0,
"version": 1,
"id": "8e330df8-a534-45af-b468-610de9930f5b",
"name": "TESTSchema",
"displayName": "TESTSchema",
"description": "",
"type": "object",
"required": false,
"deprecated": false,
"private": false,
"maxItems": 10,
"messageId": "f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"childCount": 2
},
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"uri": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"type": "application/vnd.sas.detection.message"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"uri": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"type": "application/vnd.sas.detection.message"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7",
"uri": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7"
},
{
"method": "GET",
"rel": "variableSet",
"href": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7/variableSets/8e330df8-a534-45af-b468-610de9930f5b",
"uri": "/detectionMessageSchema/messages/f7f544cd-b2c8-43a4-be5d-3f21144cbda7/variableSets/8e330df8-a534-45af-b468-610de9930f5b",
"type": "application/vnd.sas.detection.message.variables"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Return a message. | Inline |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Etag | string | An hash-code for the response resource. | |
200 | Last-Modified | string | Data and Time of last modification. | |
200 | Location | string | Location of URI for the endpoint. |
Delete a message
Code samples
# You can also use wget
curl -X DELETE http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.delete('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /messages/{messageId}
Delete a "Developing" version. The message can be deleted only if there is no existing message or variable relationship
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
messageId | path | string | true | This is the message UUID identifier of the existing message schema instance. |
clientValidationUri | query | string | false | The clientValidationUri is an optional URI path called before performing a delete request. The business logic will make a HEAD request to the clientValidationUri to determine if the returned status is "Not Found (400)". An HTTP status of Not Found will delete the requested object. Otherwise, it will assume the requested object remotely in use. The provided clientValidationUri must be a valid endpoint; otherwise, it will result in an incorrect validation and an unexpected outcome. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | The message was deleted. | None |
400 | Bad Request | The request is malformed. | None |
409 | Conflict | There is a conflict with an existing resource. Possible Reason(s): |
- Only a message schema that is in a "Developing" state can be deleted
- There are existing message relationships associated with this message schema|None|
Create a new revision of a message
Code samples
# You can also use wget
curl -X POST http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/revisions \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.sas.detection.message+json'
const inputBody = '{}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/vnd.sas.detection.message+json'
};
fetch('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/revisions',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/vnd.sas.detection.message+json'
}
r = requests.post('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/revisions', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/vnd.sas.detection.message+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/revisions", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /messages/{messageId}/revisions
This endpoint creates a new revision of the message from the latest revision.
It returns an error if the latest revision is already in Developing
state.
Body parameter
{}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
messageId | path | string | true | This is the message UUID identifier of the existing message schema instance. |
body | body | object | false | none |
Example responses
New Message Response Example
{
"creationTimeStamp": "2022-10-22T16:37:41.277398Z",
"createdBy": "anonymous",
"modifiedTimeStamp": "2022-10-22T16:37:41.277393Z",
"modifiedBy": "anonymous",
"revision": 0,
"version": 1,
"id": "17b95122-4d73-4cd7-9096-e9d7253051f0",
"name": "TEST",
"displayName": "TEST",
"state": "Developing",
"type": "cscp",
"messageSetId": "408a1b6d-97cf-4f90-bce3-bfff8762801c",
"semVersion": "1.0.0",
"committedSemVersion": "1.0.0"
}
{
"creationTimeStamp": "2022-10-22T16:37:41.277398Z",
"createdBy": "anonymous",
"modifiedTimeStamp": "2022-10-22T16:37:41.277393Z",
"modifiedBy": "anonymous",
"revision": 0,
"version": 1,
"id": "17b95122-4d73-4cd7-9096-e9d7253051f0",
"name": "TEST",
"displayName": "TEST",
"state": "Developing",
"type": "cscp",
"messageSetId": "408a1b6d-97cf-4f90-bce3-bfff8762801c",
"semVersion": "1.0.0",
"committedSemVersion": "1.0.0"
}
New Message 400 Response Example
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"A3HtzlFDDdHYm_ 4RK6HU5GAmzuwb cY5DVl TLKwLiloRKHk3nQLirXo4Np7_w5H07gWIOtixEUXF8qPDdFkLiI7n2VsBVITwMMp Q6Npp_zBaMpknSxwRb92u42aZw\" for the field \"Name\" exceeds the maximum length of 127.",
"details": [
"field: Name",
"value: A3HtzlFDDdHYm_ 4RK6HU5GAmzuwb cY5DVl TLKwLiloRKHk3nQLirXo4Np7_w5H07gWIOtixEUXF8qPDdFkLiI7n2VsBVITwMMp Q6Npp_zBaMpknSxwRb92u42aZw",
"maximumLength: 127",
"messageID: detection-lib-api-icu.validation.invalid.value.too.long.msg",
"path: /detectionMessageSchema/messages",
"correlator: ab674f0f-52d5-48b2-8377-5d0ed69c29bd"
]
}
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"A3HtzlFDDdHYm_ 4RK6HU5GAmzuwb cY5DVl TLKwLiloRKHk3nQLirXo4Np7_w5H07gWIOtixEUXF8qPDdFkLiI7n2VsBVITwMMp Q6Npp_zBaMpknSxwRb92u42aZw\" for the field \"Name\" exceeds the maximum length of 127.",
"details": [
"field: Name",
"value: A3HtzlFDDdHYm_ 4RK6HU5GAmzuwb cY5DVl TLKwLiloRKHk3nQLirXo4Np7_w5H07gWIOtixEUXF8qPDdFkLiI7n2VsBVITwMMp Q6Npp_zBaMpknSxwRb92u42aZw",
"maximumLength: 127",
"messageID: detection-lib-api-icu.validation.invalid.value.too.long.msg",
"path: /detectionMessageSchema/messages",
"correlator: ab674f0f-52d5-48b2-8377-5d0ed69c29bd"
]
}
New Message 409 Response Example
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000017,
"message": "An existing message schema with name \"TEST\" already exists.",
"details": [
"Name: TEST",
"messageID: detection-message-schema-api-icu.message.already.exists.msg",
"path: /detectionMessageSchema/messages",
"correlator: 3545df53-bd35-4c35-be66-0c62c3ebf105"
]
}
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000017,
"message": "An existing message schema with name \"TEST\" already exists.",
"details": [
"Name: TEST",
"messageID: detection-message-schema-api-icu.message.already.exists.msg",
"path: /detectionMessageSchema/messages",
"correlator: 3545df53-bd35-4c35-be66-0c62c3ebf105"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Created | message |
400 | Bad Request | The request was invalid | Inline |
409 | Conflict | There is a conflict with an existing resource. Possible Reason(s): |
- A Developing
revision already exists
- The existing resource is not in a Deployed
state|Inline|
Response Schema
Status Code 400
Error
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 | [#/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [messageSummaryCollection/allOf/0/properties/links/items] | false | none | The links that apply to the error. |
»» Link | messageSummaryCollection/allOf/0/properties/links/items | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 409
Error
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 | [#/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [messageSummaryCollection/allOf/0/properties/links/items] | false | none | The links that apply to the error. |
»» Link | messageSummaryCollection/allOf/0/properties/links/items | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Etag | string | An hash-code for the response resource. | |
201 | Last-Modified | string | Data and Time of last modification. | |
201 | Location | string | Location of URI for the endpoint. |
Create a new snapshot of a message
Code samples
# You can also use wget
curl -X POST http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/snapshots \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.sas.detection.message+json'
const inputBody = '{}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/vnd.sas.detection.message+json'
};
fetch('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/snapshots',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/vnd.sas.detection.message+json'
}
r = requests.post('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/snapshots', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/vnd.sas.detection.message+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/snapshots", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /messages/{messageId}/snapshots
This endpoint creates a new snapshot of a message.
Body parameter
{}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
messageId | path | string | true | This is the message UUID identifier of the existing message schema instance. |
body | body | object | false | none |
Example responses
New Message Response Example
{
"creationTimeStamp": "2022-10-22T16:37:41.277398Z",
"createdBy": "anonymous",
"modifiedTimeStamp": "2022-10-22T16:37:41.277393Z",
"modifiedBy": "anonymous",
"revision": 0,
"version": 1,
"id": "17b95122-4d73-4cd7-9096-e9d7253051f0",
"name": "TEST",
"displayName": "TEST",
"state": "Developing",
"type": "cscp",
"messageSetId": "408a1b6d-97cf-4f90-bce3-bfff8762801c",
"semVersion": "1.0.0",
"committedSemVersion": "1.0.0"
}
{
"creationTimeStamp": "2022-10-22T16:37:41.277398Z",
"createdBy": "anonymous",
"modifiedTimeStamp": "2022-10-22T16:37:41.277393Z",
"modifiedBy": "anonymous",
"revision": 0,
"version": 1,
"id": "17b95122-4d73-4cd7-9096-e9d7253051f0",
"name": "TEST",
"displayName": "TEST",
"state": "Developing",
"type": "cscp",
"messageSetId": "408a1b6d-97cf-4f90-bce3-bfff8762801c",
"semVersion": "1.0.0",
"committedSemVersion": "1.0.0"
}
New Message 400 Response Example
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"A3HtzlFDDdHYm_ 4RK6HU5GAmzuwb cY5DVl TLKwLiloRKHk3nQLirXo4Np7_w5H07gWIOtixEUXF8qPDdFkLiI7n2VsBVITwMMp Q6Npp_zBaMpknSxwRb92u42aZw\" for the field \"Name\" exceeds the maximum length of 127.",
"details": [
"field: Name",
"value: A3HtzlFDDdHYm_ 4RK6HU5GAmzuwb cY5DVl TLKwLiloRKHk3nQLirXo4Np7_w5H07gWIOtixEUXF8qPDdFkLiI7n2VsBVITwMMp Q6Npp_zBaMpknSxwRb92u42aZw",
"maximumLength: 127",
"messageID: detection-lib-api-icu.validation.invalid.value.too.long.msg",
"path: /detectionMessageSchema/messages",
"correlator: ab674f0f-52d5-48b2-8377-5d0ed69c29bd"
]
}
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"A3HtzlFDDdHYm_ 4RK6HU5GAmzuwb cY5DVl TLKwLiloRKHk3nQLirXo4Np7_w5H07gWIOtixEUXF8qPDdFkLiI7n2VsBVITwMMp Q6Npp_zBaMpknSxwRb92u42aZw\" for the field \"Name\" exceeds the maximum length of 127.",
"details": [
"field: Name",
"value: A3HtzlFDDdHYm_ 4RK6HU5GAmzuwb cY5DVl TLKwLiloRKHk3nQLirXo4Np7_w5H07gWIOtixEUXF8qPDdFkLiI7n2VsBVITwMMp Q6Npp_zBaMpknSxwRb92u42aZw",
"maximumLength: 127",
"messageID: detection-lib-api-icu.validation.invalid.value.too.long.msg",
"path: /detectionMessageSchema/messages",
"correlator: ab674f0f-52d5-48b2-8377-5d0ed69c29bd"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Created | message |
400 | Bad Request | The request was invalid | Inline |
Response Schema
Status Code 400
Error
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 | [#/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [messageSummaryCollection/allOf/0/properties/links/items] | false | none | The links that apply to the error. |
»» Link | messageSummaryCollection/allOf/0/properties/links/items | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Etag | string | An hash-code for the response resource. | |
201 | Last-Modified | string | Data and Time of last modification. | |
201 | Location | string | Location of URI for the endpoint. |
Create a new copy of a message
Code samples
# You can also use wget
curl -X POST http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/copied \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.sas.detection.message+json'
const inputBody = '{
"newname": "MyCards",
"ops": [
{
"id": "23743176-5fb9-44c9-b196-f66a91801a14",
"name": "System",
"state": "Deployed",
"op": "retain"
},
{
"id": "89fc12fa-c74e-4394-b605-10cd2b759c39",
"name": "CommonFinancial",
"state": "Deployed",
"newname": "MyCommonFinancial",
"op": "copy"
},
{
"id": "6dc4cdeb-aeb6-43bb-9058-49ab2ba71952",
"name": "SASExt",
"state": "Deployed",
"op": "ignore"
}
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/vnd.sas.detection.message+json'
};
fetch('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/copied',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/vnd.sas.detection.message+json'
}
r = requests.post('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/copied', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/vnd.sas.detection.message+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/copied", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /messages/{messageId}/copied
This endpoint creates a copy of the message with a new name.
Copy of all the sub-objects such as variables sets and variables is done.
If the message has message relationships to component schemas then you must
specify how each component schema is handled during the copy.
Each component schema can be copied, retained or ignored. If a component message is omitted entirely from
the ops
array then it is treated as if it was supplied with op=ignore
. The new message copy is created in the Developing
state.
Body parameter
Copy a Message Example
{
"newname": "MyCards",
"ops": [
{
"id": "23743176-5fb9-44c9-b196-f66a91801a14",
"name": "System",
"state": "Deployed",
"op": "retain"
},
{
"id": "89fc12fa-c74e-4394-b605-10cd2b759c39",
"name": "CommonFinancial",
"state": "Deployed",
"newname": "MyCommonFinancial",
"op": "copy"
},
{
"id": "6dc4cdeb-aeb6-43bb-9058-49ab2ba71952",
"name": "SASExt",
"state": "Deployed",
"op": "ignore"
}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
messageId | path | string | true | This is the message UUID identifier of the existing message schema instance. |
body | body | messageOps | false | none |
Example responses
New Message Response Example
{
"creationTimeStamp": "2022-10-22T16:37:41.277398Z",
"createdBy": "anonymous",
"modifiedTimeStamp": "2022-10-22T16:37:41.277393Z",
"modifiedBy": "anonymous",
"revision": 0,
"version": 1,
"id": "17b95122-4d73-4cd7-9096-e9d7253051f0",
"name": "TEST",
"displayName": "TEST",
"state": "Developing",
"type": "cscp",
"messageSetId": "408a1b6d-97cf-4f90-bce3-bfff8762801c",
"semVersion": "1.0.0",
"committedSemVersion": "1.0.0"
}
{
"creationTimeStamp": "2022-10-22T16:37:41.277398Z",
"createdBy": "anonymous",
"modifiedTimeStamp": "2022-10-22T16:37:41.277393Z",
"modifiedBy": "anonymous",
"revision": 0,
"version": 1,
"id": "17b95122-4d73-4cd7-9096-e9d7253051f0",
"name": "TEST",
"displayName": "TEST",
"state": "Developing",
"type": "cscp",
"messageSetId": "408a1b6d-97cf-4f90-bce3-bfff8762801c",
"semVersion": "1.0.0",
"committedSemVersion": "1.0.0"
}
New Message 400 Response Example
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"A3HtzlFDDdHYm_ 4RK6HU5GAmzuwb cY5DVl TLKwLiloRKHk3nQLirXo4Np7_w5H07gWIOtixEUXF8qPDdFkLiI7n2VsBVITwMMp Q6Npp_zBaMpknSxwRb92u42aZw\" for the field \"Name\" exceeds the maximum length of 127.",
"details": [
"field: Name",
"value: A3HtzlFDDdHYm_ 4RK6HU5GAmzuwb cY5DVl TLKwLiloRKHk3nQLirXo4Np7_w5H07gWIOtixEUXF8qPDdFkLiI7n2VsBVITwMMp Q6Npp_zBaMpknSxwRb92u42aZw",
"maximumLength: 127",
"messageID: detection-lib-api-icu.validation.invalid.value.too.long.msg",
"path: /detectionMessageSchema/messages",
"correlator: ab674f0f-52d5-48b2-8377-5d0ed69c29bd"
]
}
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"A3HtzlFDDdHYm_ 4RK6HU5GAmzuwb cY5DVl TLKwLiloRKHk3nQLirXo4Np7_w5H07gWIOtixEUXF8qPDdFkLiI7n2VsBVITwMMp Q6Npp_zBaMpknSxwRb92u42aZw\" for the field \"Name\" exceeds the maximum length of 127.",
"details": [
"field: Name",
"value: A3HtzlFDDdHYm_ 4RK6HU5GAmzuwb cY5DVl TLKwLiloRKHk3nQLirXo4Np7_w5H07gWIOtixEUXF8qPDdFkLiI7n2VsBVITwMMp Q6Npp_zBaMpknSxwRb92u42aZw",
"maximumLength: 127",
"messageID: detection-lib-api-icu.validation.invalid.value.too.long.msg",
"path: /detectionMessageSchema/messages",
"correlator: ab674f0f-52d5-48b2-8377-5d0ed69c29bd"
]
}
New Message 409 Response Example
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000017,
"message": "An existing message schema with name \"TEST\" already exists.",
"details": [
"Name: TEST",
"messageID: detection-message-schema-api-icu.message.already.exists.msg",
"path: /detectionMessageSchema/messages",
"correlator: 3545df53-bd35-4c35-be66-0c62c3ebf105"
]
}
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000017,
"message": "An existing message schema with name \"TEST\" already exists.",
"details": [
"Name: TEST",
"messageID: detection-message-schema-api-icu.message.already.exists.msg",
"path: /detectionMessageSchema/messages",
"correlator: 3545df53-bd35-4c35-be66-0c62c3ebf105"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Created | message |
400 | Bad Request | The request was invalid | Inline |
409 | Conflict | There is a conflict with an existing resource. Possible Reason(s): |
- A new named schema already exists
- The copied schema name cannot be the same|Inline|
Response Schema
Status Code 400
Error
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 | [#/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [messageSummaryCollection/allOf/0/properties/links/items] | false | none | The links that apply to the error. |
»» Link | messageSummaryCollection/allOf/0/properties/links/items | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 409
Error
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 | [#/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [messageSummaryCollection/allOf/0/properties/links/items] | false | none | The links that apply to the error. |
»» Link | messageSummaryCollection/allOf/0/properties/links/items | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Etag | string | An hash-code for the response resource. | |
201 | Last-Modified | string | Data and Time of last modification. | |
201 | Location | string | Location of URI for the endpoint. |
Create a new variable set
Code samples
# You can also use wget
curl -X POST http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/variableSets \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.detection.variables+json' \
-H 'Accept: application/vnd.sas.detection.variables+json'
const inputBody = '{
"name": "string",
"displayName": "string",
"type": "object",
"description": "string",
"private": false,
"required": false,
"deprecated": false,
"tags": [
{
"name": "string",
"value": "string"
}
],
"maxItems": 10,
"variableSets": [
{
"name": "string",
"displayName": "string",
"type": "object",
"description": "string",
"private": false,
"required": false,
"deprecated": false,
"tags": [
{
"name": "string",
"value": "string"
}
],
"maxItems": 10
}
]
}';
const headers = {
'Content-Type':'application/vnd.sas.detection.variables+json',
'Accept':'application/vnd.sas.detection.variables+json'
};
fetch('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/variableSets',
{
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.detection.variables+json',
'Accept': 'application/vnd.sas.detection.variables+json'
}
r = requests.post('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/variableSets', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.detection.variables+json"},
"Accept": []string{"application/vnd.sas.detection.variables+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/variableSets", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /messages/{messageId}/variableSets
This endpoint creates a new variable set using variable set representation.
The representation can include nested variable sets.
The query parameter parentId
should be used for creating nested variable set relative to the parentId.
By default it will create as a child of the root
variable set.
The name of the variable set MUST be unique among siblings.
Body parameter
{
"name": "string",
"displayName": "string",
"type": "object",
"description": "string",
"private": false,
"required": false,
"deprecated": false,
"tags": [
{
"name": "string",
"value": "string"
}
],
"maxItems": 10,
"variableSets": [
{
"name": "string",
"displayName": "string",
"type": "object",
"description": "string",
"private": false,
"required": false,
"deprecated": false,
"tags": [
{
"name": "string",
"value": "string"
}
],
"maxItems": 10
}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
messageId | path | string | true | This is the message UUID identifier of the existing message schema instance. |
parentId | query | integer | false | The id associated to a parent. It is used for creating nested variable sets or querying purposes. |
body | body | #/paths/~1messages~1%7BmessageId%7D~1variableSets/post/requestBody/content/application~1vnd.sas.detection.variables%2Bjson/schema | false | none |
Example responses
New Variable Set Response Example
{
"creationTimeStamp": "2022-10-22T17:04:55.276288Z",
"createdBy": "anonymous",
"modifiedTimeStamp": "2022-10-22T17:04:55.276284Z",
"modifiedBy": "anonymous",
"revision": 0,
"version": 1,
"id": "9637b676-15d6-430a-a049-b8637dd26de1",
"name": "TEST",
"displayName": "TEST",
"description": "",
"type": "object",
"required": false,
"deprecated": false,
"private": false,
"maxItems": 10,
"parentId": "d93c596e-e2c2-4319-a7ca-0a7cbd27cd02",
"messageId": "97672d19-424b-42da-b506-ae731911df49",
"childCount": 0,
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionMessageSchema/messages/97672d19-424b-42da-b506-ae731911df49/variableSets/9637b676-15d6-430a-a049-b8637dd26de1",
"uri": "/detectionMessageSchema/messages/97672d19-424b-42da-b506-ae731911df49/variableSets/9637b676-15d6-430a-a049-b8637dd26de1",
"type": "application/vnd.sas.detection.message.variables"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionMessageSchema/messages/97672d19-424b-42da-b506-ae731911df49/variableSets/9637b676-15d6-430a-a049-b8637dd26de1",
"uri": "/detectionMessageSchema/messages/97672d19-424b-42da-b506-ae731911df49/variableSets/9637b676-15d6-430a-a049-b8637dd26de1",
"type": "application/vnd.sas.detection.message.variables"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionMessageSchema/messages/97672d19-424b-42da-b506-ae731911df49/variableSets/9637b676-15d6-430a-a049-b8637dd26de1",
"uri": "/detectionMessageSchema/messages/97672d19-424b-42da-b506-ae731911df49/variableSets/9637b676-15d6-430a-a049-b8637dd26de1"
}
]
}
{
"creationTimeStamp": "2022-10-22T17:04:55.276288Z",
"createdBy": "anonymous",
"modifiedTimeStamp": "2022-10-22T17:04:55.276284Z",
"modifiedBy": "anonymous",
"revision": 0,
"version": 1,
"id": "9637b676-15d6-430a-a049-b8637dd26de1",
"name": "TEST",
"displayName": "TEST",
"description": "",
"type": "object",
"required": false,
"deprecated": false,
"private": false,
"maxItems": 10,
"parentId": "d93c596e-e2c2-4319-a7ca-0a7cbd27cd02",
"messageId": "97672d19-424b-42da-b506-ae731911df49",
"childCount": 0,
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionMessageSchema/messages/97672d19-424b-42da-b506-ae731911df49/variableSets/9637b676-15d6-430a-a049-b8637dd26de1",
"uri": "/detectionMessageSchema/messages/97672d19-424b-42da-b506-ae731911df49/variableSets/9637b676-15d6-430a-a049-b8637dd26de1",
"type": "application/vnd.sas.detection.message.variables"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionMessageSchema/messages/97672d19-424b-42da-b506-ae731911df49/variableSets/9637b676-15d6-430a-a049-b8637dd26de1",
"uri": "/detectionMessageSchema/messages/97672d19-424b-42da-b506-ae731911df49/variableSets/9637b676-15d6-430a-a049-b8637dd26de1",
"type": "application/vnd.sas.detection.message.variables"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionMessageSchema/messages/97672d19-424b-42da-b506-ae731911df49/variableSets/9637b676-15d6-430a-a049-b8637dd26de1",
"uri": "/detectionMessageSchema/messages/97672d19-424b-42da-b506-ae731911df49/variableSets/9637b676-15d6-430a-a049-b8637dd26de1"
}
]
}
New Variable Set 400 Response Example
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The required field \"Name\" is empty. Specify a valid value.",
"details": [
"field: Name",
"messageID: detection-lib-api-icu.validation.missing.required.value.msg",
"path: /detectionMessageSchema/messages/d099d592-bc01-4497-a2cf-a288398d4b5f/variableSets",
"correlator: 55d24df2-a771-4275-88c4-a9566a2a41f2"
]
}
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The required field \"Name\" is empty. Specify a valid value.",
"details": [
"field: Name",
"messageID: detection-lib-api-icu.validation.missing.required.value.msg",
"path: /detectionMessageSchema/messages/d099d592-bc01-4497-a2cf-a288398d4b5f/variableSets",
"correlator: 55d24df2-a771-4275-88c4-a9566a2a41f2"
]
}
New Variable Set 409 Response Example
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000017,
"message": "An existing variable set with name \"TEST\" already exists.",
"details": [
"Name: TEST",
"messageID: detection-message-schema-api-icu.variables.already.exists.msg",
"path: /detectionMessageSchema/messages/97672d19-424b-42da-b506-ae731911df49/variableSets",
"correlator: 3113871d-e9c9-4ff7-afc5-27782863575d"
]
}
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000017,
"message": "An existing variable set with name \"TEST\" already exists.",
"details": [
"Name: TEST",
"messageID: detection-message-schema-api-icu.variables.already.exists.msg",
"path: /detectionMessageSchema/messages/97672d19-424b-42da-b506-ae731911df49/variableSets",
"correlator: 3113871d-e9c9-4ff7-afc5-27782863575d"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Created | variableSet |
400 | Bad Request | 'The request was invalid. Reasons could be invalid data or structure in the request body. | Inline |
409 | Conflict | There is a conflict with an existing resource. Possible Reason(s): |
- The variable set already exists
- The message schema is in immutable (Deployed
) state|Inline|
Response Schema
Status Code 400
Error
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 | [#/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [messageSummaryCollection/allOf/0/properties/links/items] | false | none | The links that apply to the error. |
»» Link | messageSummaryCollection/allOf/0/properties/links/items | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 409
Error
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 | [#/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [messageSummaryCollection/allOf/0/properties/links/items] | false | none | The links that apply to the error. |
»» Link | messageSummaryCollection/allOf/0/properties/links/items | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Etag | string | An hash-code for the response resource. | |
201 | Last-Modified | string | Data and Time of last modification. | |
201 | Location | string | Location of URI for the endpoint. |
Return a list of variable sets
Code samples
# You can also use wget
curl -X GET http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/variableSets \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/variableSets',
{
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('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/variableSets', 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", "http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/variableSets", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /messages/{messageId}/variableSets
This endpoint returns a list of variable sets.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
messageId | path | string | true | This is the message UUID identifier of the existing message schema instance. |
start | query | integer | false | 0-based Offset of first resource to return. Defaults to 0. |
limit | query | integer | false | Maximum number of resources to return. Defaults to 100. |
filter | query | string(filter-criteria) | false | Filter criteria for returned resources. See Filtering in REST APIs. |
sortBy | query | string(sort-criteria) | false | Sort returned resources. See Sorting in REST APIs. |
parentId | query | integer | false | The id associated to a parent. It is used for creating nested variable sets or querying purposes. |
Example responses
List of Variable Sets Example
{
"version": 2,
"accept": "application/vnd.sas.detection.message.variables",
"count": 3,
"start": 0,
"limit": 100,
"name": "variableSets",
"items": [
{
"creationTimeStamp": "2022-10-22T17:05:07.04137Z",
"createdBy": "anonymous",
"modifiedTimeStamp": "2022-10-22T17:05:07.041363Z",
"modifiedBy": "anonymous",
"revision": 0,
"version": 1,
"id": "669a17bd-e234-4579-a775-71a786d6363d",
"name": "TESTSchema",
"displayName": "TESTSchema",
"description": "",
"type": "object",
"required": false,
"deprecated": false,
"private": false,
"maxItems": 10,
"messageId": "f0c317b6-5b57-48e9-a4fa-342247f2eccd",
"childCount": 2
},
{
"creationTimeStamp": "2022-10-22T17:05:07.201228Z",
"createdBy": "anonymous",
"modifiedTimeStamp": "2022-10-22T17:05:07.201225Z",
"modifiedBy": "anonymous",
"revision": 0,
"version": 1,
"id": "78d6c99c-e345-4d68-998e-01a610ea2fd3",
"name": "TESTA",
"displayName": "TESTA",
"description": "Description for TESTA",
"type": "object",
"required": false,
"deprecated": false,
"private": false,
"maxItems": 10,
"parentId": "669a17bd-e234-4579-a775-71a786d6363d",
"messageId": "f0c317b6-5b57-48e9-a4fa-342247f2eccd",
"childCount": 0
},
{
"creationTimeStamp": "2022-10-22T17:05:07.363533Z",
"createdBy": "anonymous",
"modifiedTimeStamp": "2022-10-22T17:05:07.363529Z",
"modifiedBy": "anonymous",
"revision": 0,
"version": 1,
"id": "370f9715-841f-4704-aebb-604cdff4bc17",
"name": "TESTB",
"displayName": "TESTB",
"description": "Description for TESTB",
"type": "object",
"required": false,
"deprecated": false,
"private": false,
"maxItems": 10,
"parentId": "669a17bd-e234-4579-a775-71a786d6363d",
"messageId": "f0c317b6-5b57-48e9-a4fa-342247f2eccd",
"childCount": 1
}
]
}
{
"version": 2,
"accept": "application/vnd.sas.detection.message.variables",
"count": 3,
"start": 0,
"limit": 100,
"name": "variableSets",
"items": [
{
"creationTimeStamp": "2022-10-22T17:05:07.04137Z",
"createdBy": "anonymous",
"modifiedTimeStamp": "2022-10-22T17:05:07.041363Z",
"modifiedBy": "anonymous",
"revision": 0,
"version": 1,
"id": "669a17bd-e234-4579-a775-71a786d6363d",
"name": "TESTSchema",
"displayName": "TESTSchema",
"description": "",
"type": "object",
"required": false,
"deprecated": false,
"private": false,
"maxItems": 10,
"messageId": "f0c317b6-5b57-48e9-a4fa-342247f2eccd",
"childCount": 2
},
{
"creationTimeStamp": "2022-10-22T17:05:07.201228Z",
"createdBy": "anonymous",
"modifiedTimeStamp": "2022-10-22T17:05:07.201225Z",
"modifiedBy": "anonymous",
"revision": 0,
"version": 1,
"id": "78d6c99c-e345-4d68-998e-01a610ea2fd3",
"name": "TESTA",
"displayName": "TESTA",
"description": "Description for TESTA",
"type": "object",
"required": false,
"deprecated": false,
"private": false,
"maxItems": 10,
"parentId": "669a17bd-e234-4579-a775-71a786d6363d",
"messageId": "f0c317b6-5b57-48e9-a4fa-342247f2eccd",
"childCount": 0
},
{
"creationTimeStamp": "2022-10-22T17:05:07.363533Z",
"createdBy": "anonymous",
"modifiedTimeStamp": "2022-10-22T17:05:07.363529Z",
"modifiedBy": "anonymous",
"revision": 0,
"version": 1,
"id": "370f9715-841f-4704-aebb-604cdff4bc17",
"name": "TESTB",
"displayName": "TESTB",
"description": "Description for TESTB",
"type": "object",
"required": false,
"deprecated": false,
"private": false,
"maxItems": 10,
"parentId": "669a17bd-e234-4579-a775-71a786d6363d",
"messageId": "f0c317b6-5b57-48e9-a4fa-342247f2eccd",
"childCount": 1
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | List of variable sets. | variableSetSummaryCollection |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | Data and Time of last modification. |
Delete a variable set and all its children
Code samples
# You can also use wget
curl -X DELETE http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/variableSets/{variableSetId}
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/variableSets/{variableSetId}',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.delete('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/variableSets/{variableSetId}')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/variableSets/{variableSetId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /messages/{messageId}/variableSets/{variableSetId}
Delete variable set for a "Developing" message schema only. Private/root variable set(s) are not allowed to be deleted.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
messageId | path | string | true | This is the message UUID identifier of the existing message schema instance. |
variableSetId | path | string | true | This is the variable set UUID identifier. |
force | query | boolean | false | Set to true allows deletion of this deprecated and optional variableset/variable. Use the force option when you want to delete a variable/variableset that has been deployed in a previous message schema revision. You must first set the variableset/variable to both deprecated and optional in the “Developing” revision. Private variables/variableset cannot not be deleted with the force setting. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | The variable set and its children were deleted. | None |
400 | Bad Request | The request is malformed | None |
409 | Conflict | Cannot delete a variable set. Possible Reason(s): |
- The message is in a immutable (Deployed
) state
- A private
variable set cannot be deleted
- A root
variable set cannot be deleted|None|
Return a variable set
Code samples
# You can also use wget
curl -X GET http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/variableSets/{variableSetId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.detection.variables.summary+json'
const headers = {
'Accept':'application/vnd.sas.detection.variables.summary+json'
};
fetch('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/variableSets/{variableSetId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.detection.variables.summary+json'
}
r = requests.get('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/variableSets/{variableSetId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.detection.variables.summary+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/variableSets/{variableSetId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /messages/{messageId}/variableSets/{variableSetId}
This endpoint returns a variable set.
The parameter depth
is optional. Any value greater than 0 will return nested variable sets.
Number of levels depends on the value of the parameter. It will return nothing if there are no variable sets.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
messageId | path | string | true | This is the message UUID identifier of the existing message schema instance. |
variableSetId | path | string | true | This is the variable set UUID identifier. |
depth | query | integer | false | The number of nested variable sets to return from an existing variable set. Default is 0. |
Example responses
Get a Variable Set Example
{
"creationTimeStamp": "2022-10-22T17:05:14.64464Z",
"createdBy": "anonymous",
"modifiedTimeStamp": "2022-10-22T17:05:14.64464Z",
"revision": 7,
"version": 1,
"id": "35f26118-1cc1-4370-9482-2680f2dfd104",
"name": "newname",
"displayName": "newname",
"description": "",
"type": "object",
"required": false,
"deprecated": false,
"private": false,
"maxItems": 0,
"messageId": "d2bc3ced-2494-4e97-9efd-88de740831a1",
"childCount": 0,
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionMessageSchema/messages/d2bc3ced-2494-4e97-9efd-88de740831a1/variableSets/35f26118-1cc1-4370-9482-2680f2dfd104",
"uri": "/detectionMessageSchema/messages/d2bc3ced-2494-4e97-9efd-88de740831a1/variableSets/35f26118-1cc1-4370-9482-2680f2dfd104",
"type": "application/vnd.sas.detection.message.variables"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionMessageSchema/messages/d2bc3ced-2494-4e97-9efd-88de740831a1/variableSets/35f26118-1cc1-4370-9482-2680f2dfd104",
"uri": "/detectionMessageSchema/messages/d2bc3ced-2494-4e97-9efd-88de740831a1/variableSets/35f26118-1cc1-4370-9482-2680f2dfd104",
"type": "application/vnd.sas.detection.message.variables"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionMessageSchema/messages/d2bc3ced-2494-4e97-9efd-88de740831a1/variableSets/35f26118-1cc1-4370-9482-2680f2dfd104",
"uri": "/detectionMessageSchema/messages/d2bc3ced-2494-4e97-9efd-88de740831a1/variableSets/35f26118-1cc1-4370-9482-2680f2dfd104"
}
]
}
{
"creationTimeStamp": "2022-10-22T17:05:14.64464Z",
"createdBy": "anonymous",
"modifiedTimeStamp": "2022-10-22T17:05:14.64464Z",
"revision": 7,
"version": 1,
"id": "35f26118-1cc1-4370-9482-2680f2dfd104",
"name": "newname",
"displayName": "newname",
"description": "",
"type": "object",
"required": false,
"deprecated": false,
"private": false,
"maxItems": 0,
"messageId": "d2bc3ced-2494-4e97-9efd-88de740831a1",
"childCount": 0,
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionMessageSchema/messages/d2bc3ced-2494-4e97-9efd-88de740831a1/variableSets/35f26118-1cc1-4370-9482-2680f2dfd104",
"uri": "/detectionMessageSchema/messages/d2bc3ced-2494-4e97-9efd-88de740831a1/variableSets/35f26118-1cc1-4370-9482-2680f2dfd104",
"type": "application/vnd.sas.detection.message.variables"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionMessageSchema/messages/d2bc3ced-2494-4e97-9efd-88de740831a1/variableSets/35f26118-1cc1-4370-9482-2680f2dfd104",
"uri": "/detectionMessageSchema/messages/d2bc3ced-2494-4e97-9efd-88de740831a1/variableSets/35f26118-1cc1-4370-9482-2680f2dfd104",
"type": "application/vnd.sas.detection.message.variables"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionMessageSchema/messages/d2bc3ced-2494-4e97-9efd-88de740831a1/variableSets/35f26118-1cc1-4370-9482-2680f2dfd104",
"uri": "/detectionMessageSchema/messages/d2bc3ced-2494-4e97-9efd-88de740831a1/variableSets/35f26118-1cc1-4370-9482-2680f2dfd104"
}
]
}
{
"creationTimeStamp": "2022-10-22T17:05:14.64464Z",
"createdBy": "anonymous",
"modifiedTimeStamp": "2022-10-22T17:05:14.64464Z",
"revision": 7,
"version": 1,
"id": "35f26118-1cc1-4370-9482-2680f2dfd104",
"name": "newname",
"displayName": "newname",
"description": "",
"type": "object",
"required": false,
"deprecated": false,
"private": false,
"maxItems": 0,
"messageId": "d2bc3ced-2494-4e97-9efd-88de740831a1",
"childCount": 0,
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionMessageSchema/messages/d2bc3ced-2494-4e97-9efd-88de740831a1/variableSets/35f26118-1cc1-4370-9482-2680f2dfd104",
"uri": "/detectionMessageSchema/messages/d2bc3ced-2494-4e97-9efd-88de740831a1/variableSets/35f26118-1cc1-4370-9482-2680f2dfd104",
"type": "application/vnd.sas.detection.message.variables"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionMessageSchema/messages/d2bc3ced-2494-4e97-9efd-88de740831a1/variableSets/35f26118-1cc1-4370-9482-2680f2dfd104",
"uri": "/detectionMessageSchema/messages/d2bc3ced-2494-4e97-9efd-88de740831a1/variableSets/35f26118-1cc1-4370-9482-2680f2dfd104",
"type": "application/vnd.sas.detection.message.variables"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionMessageSchema/messages/d2bc3ced-2494-4e97-9efd-88de740831a1/variableSets/35f26118-1cc1-4370-9482-2680f2dfd104",
"uri": "/detectionMessageSchema/messages/d2bc3ced-2494-4e97-9efd-88de740831a1/variableSets/35f26118-1cc1-4370-9482-2680f2dfd104"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Return a variable set. | variableSetSummary |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Etag | string | An hash-code for the response resource. | |
200 | Last-Modified | string | Data and Time of last modification. | |
200 | Location | string | Location of URI for the endpoint. |
Partial Update a variable set
Code samples
# You can also use wget
curl -X PATCH http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/variableSets/{variableSetId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.detection.variables+json' \
-H 'Accept: application/vnd.sas.detection.variables+json'
const inputBody = '{
"name": "string",
"displayName": "string",
"type": "object",
"description": "string",
"private": false,
"required": false,
"deprecated": false,
"tags": [
{
"name": "string",
"value": "string"
}
],
"maxItems": 10,
"revision": 0,
"parentId": "string"
}';
const headers = {
'Content-Type':'application/vnd.sas.detection.variables+json',
'Accept':'application/vnd.sas.detection.variables+json'
};
fetch('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/variableSets/{variableSetId}',
{
method: 'PATCH',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.detection.variables+json',
'Accept': 'application/vnd.sas.detection.variables+json'
}
r = requests.patch('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/variableSets/{variableSetId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.detection.variables+json"},
"Accept": []string{"application/vnd.sas.detection.variables+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PATCH", "http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/variableSets/{variableSetId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PATCH /messages/{messageId}/variableSets/{variableSetId}
Partially update the properties of a variable set.
Allows updates to description
, required
, and deprecated
if and only if message is in Deployment-Ready
state
or the variable set was previously Deployed
.
Additional properties can be modified only if the variable sets are not yet deployed.
Body parameter
{
"name": "string",
"displayName": "string",
"type": "object",
"description": "string",
"private": false,
"required": false,
"deprecated": false,
"tags": [
{
"name": "string",
"value": "string"
}
],
"maxItems": 10,
"revision": 0,
"parentId": "string"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
messageId | path | string | true | This is the message UUID identifier of the existing message schema instance. |
variableSetId | path | string | true | This is the variable set UUID identifier. |
body | body | #/paths/~1messages~1%7BmessageId%7D~1variableSets~1%7BvariableSetId%7D/patch/requestBody/content/application~1vnd.sas.detection.variables%2Bjson/schema | false | none |
Example responses
Get a Variable Set Example
{
"creationTimeStamp": "2022-10-22T17:05:14.64464Z",
"createdBy": "anonymous",
"modifiedTimeStamp": "2022-10-22T17:05:14.64464Z",
"revision": 7,
"version": 1,
"id": "35f26118-1cc1-4370-9482-2680f2dfd104",
"name": "newname",
"displayName": "newname",
"description": "",
"type": "object",
"required": false,
"deprecated": false,
"private": false,
"maxItems": 0,
"messageId": "d2bc3ced-2494-4e97-9efd-88de740831a1",
"childCount": 0,
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionMessageSchema/messages/d2bc3ced-2494-4e97-9efd-88de740831a1/variableSets/35f26118-1cc1-4370-9482-2680f2dfd104",
"uri": "/detectionMessageSchema/messages/d2bc3ced-2494-4e97-9efd-88de740831a1/variableSets/35f26118-1cc1-4370-9482-2680f2dfd104",
"type": "application/vnd.sas.detection.message.variables"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionMessageSchema/messages/d2bc3ced-2494-4e97-9efd-88de740831a1/variableSets/35f26118-1cc1-4370-9482-2680f2dfd104",
"uri": "/detectionMessageSchema/messages/d2bc3ced-2494-4e97-9efd-88de740831a1/variableSets/35f26118-1cc1-4370-9482-2680f2dfd104",
"type": "application/vnd.sas.detection.message.variables"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionMessageSchema/messages/d2bc3ced-2494-4e97-9efd-88de740831a1/variableSets/35f26118-1cc1-4370-9482-2680f2dfd104",
"uri": "/detectionMessageSchema/messages/d2bc3ced-2494-4e97-9efd-88de740831a1/variableSets/35f26118-1cc1-4370-9482-2680f2dfd104"
}
]
}
{
"creationTimeStamp": "2022-10-22T17:05:14.64464Z",
"createdBy": "anonymous",
"modifiedTimeStamp": "2022-10-22T17:05:14.64464Z",
"revision": 7,
"version": 1,
"id": "35f26118-1cc1-4370-9482-2680f2dfd104",
"name": "newname",
"displayName": "newname",
"description": "",
"type": "object",
"required": false,
"deprecated": false,
"private": false,
"maxItems": 0,
"messageId": "d2bc3ced-2494-4e97-9efd-88de740831a1",
"childCount": 0,
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionMessageSchema/messages/d2bc3ced-2494-4e97-9efd-88de740831a1/variableSets/35f26118-1cc1-4370-9482-2680f2dfd104",
"uri": "/detectionMessageSchema/messages/d2bc3ced-2494-4e97-9efd-88de740831a1/variableSets/35f26118-1cc1-4370-9482-2680f2dfd104",
"type": "application/vnd.sas.detection.message.variables"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionMessageSchema/messages/d2bc3ced-2494-4e97-9efd-88de740831a1/variableSets/35f26118-1cc1-4370-9482-2680f2dfd104",
"uri": "/detectionMessageSchema/messages/d2bc3ced-2494-4e97-9efd-88de740831a1/variableSets/35f26118-1cc1-4370-9482-2680f2dfd104",
"type": "application/vnd.sas.detection.message.variables"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionMessageSchema/messages/d2bc3ced-2494-4e97-9efd-88de740831a1/variableSets/35f26118-1cc1-4370-9482-2680f2dfd104",
"uri": "/detectionMessageSchema/messages/d2bc3ced-2494-4e97-9efd-88de740831a1/variableSets/35f26118-1cc1-4370-9482-2680f2dfd104"
}
]
}
Patch Variable Set 400 Response Example
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"0KhiaOruvmDVl5a_8UpbpxCNNqNVIvn8K0L5X0VjkUUUGSoksvwvnjWk2R7EKuU5mpiGB3TT7mde7TnBNVnfl3MaCgE8HdbRF4AecD5wl9dkLdzkAqUsvnSM4SyYxMb7\" for the field \"Name\" exceeds the maximum length of 127.",
"details": [
"value: 0KhiaOruvmDVl5a_8UpbpxCNNqNVIvn8K0L5X0VjkUUUGSoksvwvnjWk2R7EKuU5mpiGB3TT7mde7TnBNVnfl3MaCgE8HdbRF4AecD5wl9dkLdzkAqUsvnSM4SyYxMb7",
"maximumLength: 127",
"messageID: detection-lib-api-icu.validation.invalid.value.too.long.msg",
"field: Name",
"path: /detectionMessageSchema/messages/ceb5ca12-951d-4fa2-a533-4f5cd0422802/variableSets/46dfbd84-16dc-4520-9703-1b6e868ab640",
"correlator: 02f659f7-f874-40f3-a525-e58a937bb5e9"
]
}
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"0KhiaOruvmDVl5a_8UpbpxCNNqNVIvn8K0L5X0VjkUUUGSoksvwvnjWk2R7EKuU5mpiGB3TT7mde7TnBNVnfl3MaCgE8HdbRF4AecD5wl9dkLdzkAqUsvnSM4SyYxMb7\" for the field \"Name\" exceeds the maximum length of 127.",
"details": [
"value: 0KhiaOruvmDVl5a_8UpbpxCNNqNVIvn8K0L5X0VjkUUUGSoksvwvnjWk2R7EKuU5mpiGB3TT7mde7TnBNVnfl3MaCgE8HdbRF4AecD5wl9dkLdzkAqUsvnSM4SyYxMb7",
"maximumLength: 127",
"messageID: detection-lib-api-icu.validation.invalid.value.too.long.msg",
"field: Name",
"path: /detectionMessageSchema/messages/ceb5ca12-951d-4fa2-a533-4f5cd0422802/variableSets/46dfbd84-16dc-4520-9703-1b6e868ab640",
"correlator: 02f659f7-f874-40f3-a525-e58a937bb5e9"
]
}
Patch Variable Set 409 Response Example
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000022,
"message": "The resource \"varset_private\" that is private cannot be modified.",
"details": [
"Name: varset_private",
"messageID: detection-message-schema-api-icu.private.immutable.msg",
"path: /detectionMessageSchema/messages/ceb5ca12-951d-4fa2-a533-4f5cd0422802/variableSets/127182c3-e436-4d41-ada5-8de9af1fb49e",
"correlator: 3c022888-a92b-4b1f-84e4-f4ebccc24347"
]
}
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000022,
"message": "The resource \"varset_private\" that is private cannot be modified.",
"details": [
"Name: varset_private",
"messageID: detection-message-schema-api-icu.private.immutable.msg",
"path: /detectionMessageSchema/messages/ceb5ca12-951d-4fa2-a533-4f5cd0422802/variableSets/127182c3-e436-4d41-ada5-8de9af1fb49e",
"correlator: 3c022888-a92b-4b1f-84e4-f4ebccc24347"
]
}
Patch Variable Set 412 Response Example
{
"version": 2,
"httpStatusCode": 412,
"errorCode": 1000000,
"message": "The object 46dfbd84-16dc-4520-9703-1b6e868ab640 revision (0) updated since 2022-10-22T17:05:11Z [Code:1000000]",
"details": [
"Revision: 0",
"Type: variableSet",
"Time: 2022-10-22T17:05:11Z",
"Code: 1000000",
"messageID: detection-lib-api-icu.optimistic.locking2.msg",
"ID: 46dfbd84-16dc-4520-9703-1b6e868ab640",
"path: /detectionMessageSchema/messages/ceb5ca12-951d-4fa2-a533-4f5cd0422802/variableSets/46dfbd84-16dc-4520-9703-1b6e868ab640",
"correlator: f6340882-2323-4177-91c4-6a289cfce063"
]
}
{
"version": 2,
"httpStatusCode": 412,
"errorCode": 1000000,
"message": "The object 46dfbd84-16dc-4520-9703-1b6e868ab640 revision (0) updated since 2022-10-22T17:05:11Z [Code:1000000]",
"details": [
"Revision: 0",
"Type: variableSet",
"Time: 2022-10-22T17:05:11Z",
"Code: 1000000",
"messageID: detection-lib-api-icu.optimistic.locking2.msg",
"ID: 46dfbd84-16dc-4520-9703-1b6e868ab640",
"path: /detectionMessageSchema/messages/ceb5ca12-951d-4fa2-a533-4f5cd0422802/variableSets/46dfbd84-16dc-4520-9703-1b6e868ab640",
"correlator: f6340882-2323-4177-91c4-6a289cfce063"
]
}
Error 422 Response Example
{
"version": 2,
"httpStatusCode": 422,
"errorCode": 1000002,
"message": "Failed to process the request even though valid"
}
{
"version": 2,
"httpStatusCode": 422,
"errorCode": 1000002,
"message": "Failed to process the request even though valid"
}
Error 428 Response Example
{
"version": 2,
"httpStatusCode": 428,
"errorCode": 1000002,
"message": "Missing required pre-condition If-Match header"
}
{
"version": 2,
"httpStatusCode": 428,
"errorCode": 1000002,
"message": "Missing required pre-condition If-Match header"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successfully updated the variable set | variableSet |
400 | Bad Request | The request was invalid | Inline |
409 | Conflict | There is a conflict associated with this resource. Possible Reason(s): |
- A private
variable set cannot be updated
- A Deployed
message schema cannot be updated
- The requested change breaks the backward compatibility rule|Inline|
|412|Precondition Failed|The supplied pre-condition was not satisfactory, typically indicating stale data.|Inline|
|422|Unprocessable Entity|The request cannot be processed even though it is a valid request.
Possible Reason(s):
- The requested message state could not be persisted|Inline|
|428|Precondition Required|A required pre-condition (If-Match/If-Unmodified-Since) was not provided.|Inline|
Response Schema
Status Code 400
Error
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 | [#/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [messageSummaryCollection/allOf/0/properties/links/items] | false | none | The links that apply to the error. |
»» Link | messageSummaryCollection/allOf/0/properties/links/items | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 409
Error
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 | [#/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [messageSummaryCollection/allOf/0/properties/links/items] | false | none | The links that apply to the error. |
»» Link | messageSummaryCollection/allOf/0/properties/links/items | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 412
Error
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 | [#/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [messageSummaryCollection/allOf/0/properties/links/items] | false | none | The links that apply to the error. |
»» Link | messageSummaryCollection/allOf/0/properties/links/items | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 422
Error
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 | [#/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [messageSummaryCollection/allOf/0/properties/links/items] | false | none | The links that apply to the error. |
»» Link | messageSummaryCollection/allOf/0/properties/links/items | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 428
Error
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 | [#/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [messageSummaryCollection/allOf/0/properties/links/items] | false | none | The links that apply to the error. |
»» Link | messageSummaryCollection/allOf/0/properties/links/items | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Etag | string | An hash-code for the response resource. | |
200 | Last-Modified | string | Data and Time of last modification. | |
200 | Location | string | Location of URI for the endpoint. | |
409 | Location | string | Location of URI for the endpoint. | |
412 | Location | string | Location of URI for the endpoint. | |
422 | Location | string | Location of URI for the endpoint. | |
428 | Location | string | Location of URI for the endpoint. |
Return all variable(s) for a message
Code samples
# You can also use wget
curl -X GET http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/variables \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/variables',
{
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('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/variables', 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", "http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/variables", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /messages/{messageId}/variables
This endpoint returns a list of variables for a message schema. It will also return any variables from other message schema(s) if there are message relationships.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
messageId | path | string | true | This is the message UUID identifier of the existing message schema instance. |
start | query | integer | false | 0-based Offset of first resource to return. Defaults to 0. |
limit | query | integer | false | Maximum number of resources to return. Defaults to 100. |
filter | query | string(filter-criteria) | false | Filter criteria for returned resources. See Filtering in REST APIs. |
sortBy | query | string(sort-criteria) | false | Sort returned resources. See Sorting in REST APIs. |
Example responses
List of Variables Example
{
"version": 2,
"accept": "application/vnd.sas.detection.message.variable",
"count": 3,
"start": 0,
"limit": 1,
"name": "variables",
"items": [
{
"creationTimeStamp": "2022-10-22T17:05:31.411438Z",
"createdBy": "anonymous",
"modifiedTimeStamp": "2022-10-22T17:05:31.411412Z",
"modifiedBy": "anonymous",
"revision": 0,
"version": 1,
"id": "66064272-52f7-4623-bdd8-d4a4b8c2ba5d",
"name": "var0",
"displayName": "var0",
"description": "",
"type": "string",
"minLength": 0,
"maxLength": 0,
"enumValues": [],
"enumURI": "",
"minimum": 0,
"maximum": 0,
"inclusiveMinimum": false,
"exclusiveMaximum": false,
"arrayItem": "none",
"minItems": 0,
"maxItems": 0,
"required": false,
"deprecated": false,
"private": false,
"isMissing": false,
"locked": false,
"defaultValue": "",
"access": "rw",
"userGroup": "DMSDefault",
"jsonPath": ".TESTA",
"variableSetId": "ff099ad1-c02d-431e-ab8c-07c5906dda06",
"messageName": "cards"
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionMessageSchema/variableSets/ff099ad1-c02d-431e-ab8c-07c5906dda06/variables",
"uri": "/detectionMessageSchema/variableSets/ff099ad1-c02d-431e-ab8c-07c5906dda06/variables",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message.variable"
},
{
"method": "GET",
"rel": "next",
"href": "/detectionMessageSchema/variableSets/ff099ad1-c02d-431e-ab8c-07c5906dda06/variables?start=1&limit=1&filter=eq%28variableSetId%2C%27ff099ad1-c02d-431e-ab8c-07c5906dda06%27%29",
"uri": "/detectionMessageSchema/variableSets/ff099ad1-c02d-431e-ab8c-07c5906dda06/variables?start=1&limit=1&filter=eq%28variableSetId%2C%27ff099ad1-c02d-431e-ab8c-07c5906dda06%27%29",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message.variable"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionMessageSchema/variableSets/ff099ad1-c02d-431e-ab8c-07c5906dda06/variables?start=0&limit=1&filter=eq%28variableSetId%2C%27ff099ad1-c02d-431e-ab8c-07c5906dda06%27%29",
"uri": "/detectionMessageSchema/variableSets/ff099ad1-c02d-431e-ab8c-07c5906dda06/variables?start=0&limit=1&filter=eq%28variableSetId%2C%27ff099ad1-c02d-431e-ab8c-07c5906dda06%27%29",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message.variable"
}
]
}
{
"version": 2,
"accept": "application/vnd.sas.detection.message.variable",
"count": 3,
"start": 0,
"limit": 1,
"name": "variables",
"items": [
{
"creationTimeStamp": "2022-10-22T17:05:31.411438Z",
"createdBy": "anonymous",
"modifiedTimeStamp": "2022-10-22T17:05:31.411412Z",
"modifiedBy": "anonymous",
"revision": 0,
"version": 1,
"id": "66064272-52f7-4623-bdd8-d4a4b8c2ba5d",
"name": "var0",
"displayName": "var0",
"description": "",
"type": "string",
"minLength": 0,
"maxLength": 0,
"enumValues": [],
"enumURI": "",
"minimum": 0,
"maximum": 0,
"inclusiveMinimum": false,
"exclusiveMaximum": false,
"arrayItem": "none",
"minItems": 0,
"maxItems": 0,
"required": false,
"deprecated": false,
"private": false,
"isMissing": false,
"locked": false,
"defaultValue": "",
"access": "rw",
"userGroup": "DMSDefault",
"jsonPath": ".TESTA",
"variableSetId": "ff099ad1-c02d-431e-ab8c-07c5906dda06",
"messageName": "cards"
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionMessageSchema/variableSets/ff099ad1-c02d-431e-ab8c-07c5906dda06/variables",
"uri": "/detectionMessageSchema/variableSets/ff099ad1-c02d-431e-ab8c-07c5906dda06/variables",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message.variable"
},
{
"method": "GET",
"rel": "next",
"href": "/detectionMessageSchema/variableSets/ff099ad1-c02d-431e-ab8c-07c5906dda06/variables?start=1&limit=1&filter=eq%28variableSetId%2C%27ff099ad1-c02d-431e-ab8c-07c5906dda06%27%29",
"uri": "/detectionMessageSchema/variableSets/ff099ad1-c02d-431e-ab8c-07c5906dda06/variables?start=1&limit=1&filter=eq%28variableSetId%2C%27ff099ad1-c02d-431e-ab8c-07c5906dda06%27%29",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message.variable"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionMessageSchema/variableSets/ff099ad1-c02d-431e-ab8c-07c5906dda06/variables?start=0&limit=1&filter=eq%28variableSetId%2C%27ff099ad1-c02d-431e-ab8c-07c5906dda06%27%29",
"uri": "/detectionMessageSchema/variableSets/ff099ad1-c02d-431e-ab8c-07c5906dda06/variables?start=0&limit=1&filter=eq%28variableSetId%2C%27ff099ad1-c02d-431e-ab8c-07c5906dda06%27%29",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message.variable"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | List of variables | variableSummaryCollection |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | Data and Time of last modification. |
Create a new variable
Code samples
# You can also use wget
curl -X POST http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/variableSets/{variableSetId}/variables \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.detection.variable+json' \
-H 'Accept: application/vnd.sas.detection.variable+json'
const inputBody = '{
"name": "var1",
"type": "string",
"revision": 0
}';
const headers = {
'Content-Type':'application/vnd.sas.detection.variable+json',
'Accept':'application/vnd.sas.detection.variable+json'
};
fetch('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/variableSets/{variableSetId}/variables',
{
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.detection.variable+json',
'Accept': 'application/vnd.sas.detection.variable+json'
}
r = requests.post('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/variableSets/{variableSetId}/variables', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.detection.variable+json"},
"Accept": []string{"application/vnd.sas.detection.variable+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/variableSets/{variableSetId}/variables", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /variableSets/{variableSetId}/variables
Create a variable for a variable set. The messageId
is inferred from the variableSet Id. The name of the variable must be unique for a given variable set.
Body parameter
Create a New Variable Example
{
"name": "var1",
"type": "string",
"revision": 0
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
variableSetId | path | string | true | This is the variable set UUID identifier. |
body | body | #/paths/~1variableSets~1%7BvariableSetId%7D~1variables/post/requestBody/content/application~1vnd.sas.detection.variable%2Bjson/schema | false | none |
Example responses
New Variable Response Example
{
"creationTimeStamp": "2022-10-22T17:05:18.387491Z",
"createdBy": "anonymous",
"modifiedTimeStamp": "2022-10-22T17:05:18.387455Z",
"modifiedBy": "anonymous",
"revision": 0,
"version": 1,
"id": "f37aa7ed-ec8c-4769-a36f-d0169ba0524e",
"name": "var1",
"displayName": "var1",
"description": "",
"type": "string",
"minLength": 0,
"maxLength": 0,
"enumValues": [],
"enumURI": "",
"minimum": 0,
"maximum": 0,
"inclusiveMinimum": false,
"exclusiveMaximum": false,
"arrayItem": "none",
"minItems": 0,
"maxItems": 0,
"required": false,
"deprecated": false,
"private": false,
"isMissing": false,
"locked": false,
"defaultValue": "",
"access": "rw",
"userGroup": "DMSDefault",
"jsonPath": ".TESTA",
"variableSetId": "da496229-fa9b-44a1-9022-04b4ba98eaec",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionMessageSchema/variableSets/da496229-fa9b-44a1-9022-04b4ba98eaec/variables/f37aa7ed-ec8c-4769-a36f-d0169ba0524e",
"uri": "/detectionMessageSchema/variableSets/da496229-fa9b-44a1-9022-04b4ba98eaec/variables/f37aa7ed-ec8c-4769-a36f-d0169ba0524e",
"type": "application/vnd.sas.detection.message.variable"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionMessageSchema/variableSets/da496229-fa9b-44a1-9022-04b4ba98eaec/variables/f37aa7ed-ec8c-4769-a36f-d0169ba0524e",
"uri": "/detectionMessageSchema/variableSets/da496229-fa9b-44a1-9022-04b4ba98eaec/variables/f37aa7ed-ec8c-4769-a36f-d0169ba0524e",
"type": "application/vnd.sas.detection.message.variable"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionMessageSchema/variableSets/da496229-fa9b-44a1-9022-04b4ba98eaec/variables/f37aa7ed-ec8c-4769-a36f-d0169ba0524e",
"uri": "/detectionMessageSchema/variableSets/da496229-fa9b-44a1-9022-04b4ba98eaec/variables/f37aa7ed-ec8c-4769-a36f-d0169ba0524e"
}
]
}
{
"creationTimeStamp": "2022-10-22T17:05:18.387491Z",
"createdBy": "anonymous",
"modifiedTimeStamp": "2022-10-22T17:05:18.387455Z",
"modifiedBy": "anonymous",
"revision": 0,
"version": 1,
"id": "f37aa7ed-ec8c-4769-a36f-d0169ba0524e",
"name": "var1",
"displayName": "var1",
"description": "",
"type": "string",
"minLength": 0,
"maxLength": 0,
"enumValues": [],
"enumURI": "",
"minimum": 0,
"maximum": 0,
"inclusiveMinimum": false,
"exclusiveMaximum": false,
"arrayItem": "none",
"minItems": 0,
"maxItems": 0,
"required": false,
"deprecated": false,
"private": false,
"isMissing": false,
"locked": false,
"defaultValue": "",
"access": "rw",
"userGroup": "DMSDefault",
"jsonPath": ".TESTA",
"variableSetId": "da496229-fa9b-44a1-9022-04b4ba98eaec",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionMessageSchema/variableSets/da496229-fa9b-44a1-9022-04b4ba98eaec/variables/f37aa7ed-ec8c-4769-a36f-d0169ba0524e",
"uri": "/detectionMessageSchema/variableSets/da496229-fa9b-44a1-9022-04b4ba98eaec/variables/f37aa7ed-ec8c-4769-a36f-d0169ba0524e",
"type": "application/vnd.sas.detection.message.variable"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionMessageSchema/variableSets/da496229-fa9b-44a1-9022-04b4ba98eaec/variables/f37aa7ed-ec8c-4769-a36f-d0169ba0524e",
"uri": "/detectionMessageSchema/variableSets/da496229-fa9b-44a1-9022-04b4ba98eaec/variables/f37aa7ed-ec8c-4769-a36f-d0169ba0524e",
"type": "application/vnd.sas.detection.message.variable"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionMessageSchema/variableSets/da496229-fa9b-44a1-9022-04b4ba98eaec/variables/f37aa7ed-ec8c-4769-a36f-d0169ba0524e",
"uri": "/detectionMessageSchema/variableSets/da496229-fa9b-44a1-9022-04b4ba98eaec/variables/f37aa7ed-ec8c-4769-a36f-d0169ba0524e"
}
]
}
New Variable 400 Response Example
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"name with space is invalid\" for the field \"Name\" is invalid. Only the following characters are allowed: A-Z,a-z,0-9,_.",
"details": [
"field: Name",
"value: name with space is invalid",
"allowedCharacters: A-Z,a-z,0-9,_",
"messageID: detection-lib-api-icu.validation.invalid.value.with.allowed.chars.msg",
"path: /detectionMessageSchema/variableSets/995f3915-cd41-4c29-8347-35330714d131/variables",
"correlator: 7d6ffa4b-8570-44f9-9cd9-0fa83909d3a4"
]
}
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"name with space is invalid\" for the field \"Name\" is invalid. Only the following characters are allowed: A-Z,a-z,0-9,_.",
"details": [
"field: Name",
"value: name with space is invalid",
"allowedCharacters: A-Z,a-z,0-9,_",
"messageID: detection-lib-api-icu.validation.invalid.value.with.allowed.chars.msg",
"path: /detectionMessageSchema/variableSets/995f3915-cd41-4c29-8347-35330714d131/variables",
"correlator: 7d6ffa4b-8570-44f9-9cd9-0fa83909d3a4"
]
}
New Variable 409 Response Example
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000017,
"message": "An existing variable with name \"var1\" already exists.",
"details": [
"Name: var1",
"messageID: detection-message-schema-api-icu.variable.already.exists.msg",
"path: /detectionMessageSchema/variableSets/da496229-fa9b-44a1-9022-04b4ba98eaec/variables",
"correlator: 8aec2376-56ce-42c7-a067-edc936d840ab"
]
}
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000017,
"message": "An existing variable with name \"var1\" already exists.",
"details": [
"Name: var1",
"messageID: detection-message-schema-api-icu.variable.already.exists.msg",
"path: /detectionMessageSchema/variableSets/da496229-fa9b-44a1-9022-04b4ba98eaec/variables",
"correlator: 8aec2376-56ce-42c7-a067-edc936d840ab"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Created | variable |
400 | Bad Request | The request was invalid. Reasons may be invalid data or structure in the request body | Inline |
409 | Conflict | There is a conflict with an existing resource. Possible Reason(s): |
- The variable with the name already exists
- The message schema is in immutable (Deployed
) state|Inline|
Response Schema
Status Code 400
Error
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 | [#/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [messageSummaryCollection/allOf/0/properties/links/items] | false | none | The links that apply to the error. |
»» Link | messageSummaryCollection/allOf/0/properties/links/items | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 409
Error
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 | [#/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [messageSummaryCollection/allOf/0/properties/links/items] | false | none | The links that apply to the error. |
»» Link | messageSummaryCollection/allOf/0/properties/links/items | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Etag | string | An hash-code for the response resource. | |
201 | Last-Modified | string | Data and Time of last modification. | |
201 | Location | string | Location of URI for the endpoint. |
Return a list of variable(s)
Code samples
# You can also use wget
curl -X GET http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/variableSets/{variableSetId}/variables \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/variableSets/{variableSetId}/variables',
{
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('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/variableSets/{variableSetId}/variables', 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", "http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/variableSets/{variableSetId}/variables", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /variableSets/{variableSetId}/variables
This endpoint returns a list of variables.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
variableSetId | path | string | true | This is the variable set UUID identifier. |
start | query | integer | false | 0-based Offset of first resource to return. Defaults to 0. |
limit | query | integer | false | Maximum number of resources to return. Defaults to 100. |
filter | query | string(filter-criteria) | false | Filter criteria for returned resources. See Filtering in REST APIs. |
sortBy | query | string(sort-criteria) | false | Sort returned resources. See Sorting in REST APIs. |
Example responses
List of Variables Example
{
"version": 2,
"accept": "application/vnd.sas.detection.message.variable",
"count": 3,
"start": 0,
"limit": 1,
"name": "variables",
"items": [
{
"creationTimeStamp": "2022-10-22T17:05:31.411438Z",
"createdBy": "anonymous",
"modifiedTimeStamp": "2022-10-22T17:05:31.411412Z",
"modifiedBy": "anonymous",
"revision": 0,
"version": 1,
"id": "66064272-52f7-4623-bdd8-d4a4b8c2ba5d",
"name": "var0",
"displayName": "var0",
"description": "",
"type": "string",
"minLength": 0,
"maxLength": 0,
"enumValues": [],
"enumURI": "",
"minimum": 0,
"maximum": 0,
"inclusiveMinimum": false,
"exclusiveMaximum": false,
"arrayItem": "none",
"minItems": 0,
"maxItems": 0,
"required": false,
"deprecated": false,
"private": false,
"isMissing": false,
"locked": false,
"defaultValue": "",
"access": "rw",
"userGroup": "DMSDefault",
"jsonPath": ".TESTA",
"variableSetId": "ff099ad1-c02d-431e-ab8c-07c5906dda06",
"messageName": "cards"
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionMessageSchema/variableSets/ff099ad1-c02d-431e-ab8c-07c5906dda06/variables",
"uri": "/detectionMessageSchema/variableSets/ff099ad1-c02d-431e-ab8c-07c5906dda06/variables",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message.variable"
},
{
"method": "GET",
"rel": "next",
"href": "/detectionMessageSchema/variableSets/ff099ad1-c02d-431e-ab8c-07c5906dda06/variables?start=1&limit=1&filter=eq%28variableSetId%2C%27ff099ad1-c02d-431e-ab8c-07c5906dda06%27%29",
"uri": "/detectionMessageSchema/variableSets/ff099ad1-c02d-431e-ab8c-07c5906dda06/variables?start=1&limit=1&filter=eq%28variableSetId%2C%27ff099ad1-c02d-431e-ab8c-07c5906dda06%27%29",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message.variable"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionMessageSchema/variableSets/ff099ad1-c02d-431e-ab8c-07c5906dda06/variables?start=0&limit=1&filter=eq%28variableSetId%2C%27ff099ad1-c02d-431e-ab8c-07c5906dda06%27%29",
"uri": "/detectionMessageSchema/variableSets/ff099ad1-c02d-431e-ab8c-07c5906dda06/variables?start=0&limit=1&filter=eq%28variableSetId%2C%27ff099ad1-c02d-431e-ab8c-07c5906dda06%27%29",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message.variable"
}
]
}
{
"version": 2,
"accept": "application/vnd.sas.detection.message.variable",
"count": 3,
"start": 0,
"limit": 1,
"name": "variables",
"items": [
{
"creationTimeStamp": "2022-10-22T17:05:31.411438Z",
"createdBy": "anonymous",
"modifiedTimeStamp": "2022-10-22T17:05:31.411412Z",
"modifiedBy": "anonymous",
"revision": 0,
"version": 1,
"id": "66064272-52f7-4623-bdd8-d4a4b8c2ba5d",
"name": "var0",
"displayName": "var0",
"description": "",
"type": "string",
"minLength": 0,
"maxLength": 0,
"enumValues": [],
"enumURI": "",
"minimum": 0,
"maximum": 0,
"inclusiveMinimum": false,
"exclusiveMaximum": false,
"arrayItem": "none",
"minItems": 0,
"maxItems": 0,
"required": false,
"deprecated": false,
"private": false,
"isMissing": false,
"locked": false,
"defaultValue": "",
"access": "rw",
"userGroup": "DMSDefault",
"jsonPath": ".TESTA",
"variableSetId": "ff099ad1-c02d-431e-ab8c-07c5906dda06",
"messageName": "cards"
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionMessageSchema/variableSets/ff099ad1-c02d-431e-ab8c-07c5906dda06/variables",
"uri": "/detectionMessageSchema/variableSets/ff099ad1-c02d-431e-ab8c-07c5906dda06/variables",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message.variable"
},
{
"method": "GET",
"rel": "next",
"href": "/detectionMessageSchema/variableSets/ff099ad1-c02d-431e-ab8c-07c5906dda06/variables?start=1&limit=1&filter=eq%28variableSetId%2C%27ff099ad1-c02d-431e-ab8c-07c5906dda06%27%29",
"uri": "/detectionMessageSchema/variableSets/ff099ad1-c02d-431e-ab8c-07c5906dda06/variables?start=1&limit=1&filter=eq%28variableSetId%2C%27ff099ad1-c02d-431e-ab8c-07c5906dda06%27%29",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message.variable"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionMessageSchema/variableSets/ff099ad1-c02d-431e-ab8c-07c5906dda06/variables?start=0&limit=1&filter=eq%28variableSetId%2C%27ff099ad1-c02d-431e-ab8c-07c5906dda06%27%29",
"uri": "/detectionMessageSchema/variableSets/ff099ad1-c02d-431e-ab8c-07c5906dda06/variables?start=0&limit=1&filter=eq%28variableSetId%2C%27ff099ad1-c02d-431e-ab8c-07c5906dda06%27%29",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message.variable"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | List of variables | variableSummaryCollection |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | Data and Time of last modification. |
Delete a variable
Code samples
# You can also use wget
curl -X DELETE http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/variableSets/{variableSetId}/variables/{variableId}
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/variableSets/{variableSetId}/variables/{variableId}',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.delete('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/variableSets/{variableSetId}/variables/{variableId}')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/variableSets/{variableSetId}/variables/{variableId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /variableSets/{variableSetId}/variables/{variableId}
Delete variable for a "Developing" message schema only. Private variable(s) are not allowed to be deleted.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
variableSetId | path | string | true | This is the variable set UUID identifier. |
variableId | path | string | true | This is the variable UUID identifier. |
force | query | boolean | false | Set to true allows deletion of this deprecated and optional variableset/variable. Use the force option when you want to delete a variable/variableset that has been deployed in a previous message schema revision. You must first set the variableset/variable to both deprecated and optional in the “Developing” revision. Private variables/variableset cannot not be deleted with the force setting. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | The variable were deleted. | None |
400 | Bad Request | The request is malformed | None |
409 | Conflict | Cannot delete a variable. Possible Reason(s): |
- The message is in a immutable (Deployed
) state
- A private
variable cannot be deleted.|None|
Return a variable
Code samples
# You can also use wget
curl -X GET http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/variableSets/{variableSetId}/variables/{variableId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.detection.variable.summary+json'
const headers = {
'Accept':'application/vnd.sas.detection.variable.summary+json'
};
fetch('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/variableSets/{variableSetId}/variables/{variableId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.detection.variable.summary+json'
}
r = requests.get('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/variableSets/{variableSetId}/variables/{variableId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.detection.variable.summary+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/variableSets/{variableSetId}/variables/{variableId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /variableSets/{variableSetId}/variables/{variableId}
This endpoint returns details of a variable.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
variableSetId | path | string | true | This is the variable set UUID identifier. |
variableId | path | string | true | This is the variable UUID identifier. |
Example responses
Get a Variable Example
{
"creationTimeStamp": "2022-10-22T17:05:34.223778Z",
"createdBy": "anonymous",
"modifiedTimeStamp": "2022-10-22T17:05:34.223748Z",
"modifiedBy": "anonymous",
"revision": 0,
"version": 1,
"id": "362b719e-2d07-4ea6-8b0b-c39c533fdd8c",
"name": "var1",
"displayName": "var1",
"description": "",
"type": "string",
"tags": [
{
"name": "tag_name",
"value": "tag_value"
}
],
"minLength": 0,
"maxLength": 0,
"enumValues": [],
"enumURI": "",
"minimum": 0,
"maximum": 0,
"inclusiveMinimum": false,
"exclusiveMaximum": false,
"arrayItem": "none",
"minItems": 0,
"maxItems": 0,
"required": false,
"deprecated": false,
"private": false,
"isMissing": false,
"locked": false,
"defaultValue": "",
"access": "rw",
"userGroup": "DMSDefault",
"jsonPath": ".TESTA",
"variableSetId": "71e8fefc-009a-4602-b4a3-039bd34e0874",
"messageName": "cards",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionMessageSchema/variableSets/71e8fefc-009a-4602-b4a3-039bd34e0874/variables/362b719e-2d07-4ea6-8b0b-c39c533fdd8c",
"uri": "/detectionMessageSchema/variableSets/71e8fefc-009a-4602-b4a3-039bd34e0874/variables/362b719e-2d07-4ea6-8b0b-c39c533fdd8c",
"type": "application/vnd.sas.detection.message.variable"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionMessageSchema/variableSets/71e8fefc-009a-4602-b4a3-039bd34e0874/variables/362b719e-2d07-4ea6-8b0b-c39c533fdd8c",
"uri": "/detectionMessageSchema/variableSets/71e8fefc-009a-4602-b4a3-039bd34e0874/variables/362b719e-2d07-4ea6-8b0b-c39c533fdd8c",
"type": "application/vnd.sas.detection.message.variable"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionMessageSchema/variableSets/71e8fefc-009a-4602-b4a3-039bd34e0874/variables/362b719e-2d07-4ea6-8b0b-c39c533fdd8c",
"uri": "/detectionMessageSchema/variableSets/71e8fefc-009a-4602-b4a3-039bd34e0874/variables/362b719e-2d07-4ea6-8b0b-c39c533fdd8c"
}
]
}
{
"creationTimeStamp": "2022-10-22T17:05:34.223778Z",
"createdBy": "anonymous",
"modifiedTimeStamp": "2022-10-22T17:05:34.223748Z",
"modifiedBy": "anonymous",
"revision": 0,
"version": 1,
"id": "362b719e-2d07-4ea6-8b0b-c39c533fdd8c",
"name": "var1",
"displayName": "var1",
"description": "",
"type": "string",
"tags": [
{
"name": "tag_name",
"value": "tag_value"
}
],
"minLength": 0,
"maxLength": 0,
"enumValues": [],
"enumURI": "",
"minimum": 0,
"maximum": 0,
"inclusiveMinimum": false,
"exclusiveMaximum": false,
"arrayItem": "none",
"minItems": 0,
"maxItems": 0,
"required": false,
"deprecated": false,
"private": false,
"isMissing": false,
"locked": false,
"defaultValue": "",
"access": "rw",
"userGroup": "DMSDefault",
"jsonPath": ".TESTA",
"variableSetId": "71e8fefc-009a-4602-b4a3-039bd34e0874",
"messageName": "cards",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionMessageSchema/variableSets/71e8fefc-009a-4602-b4a3-039bd34e0874/variables/362b719e-2d07-4ea6-8b0b-c39c533fdd8c",
"uri": "/detectionMessageSchema/variableSets/71e8fefc-009a-4602-b4a3-039bd34e0874/variables/362b719e-2d07-4ea6-8b0b-c39c533fdd8c",
"type": "application/vnd.sas.detection.message.variable"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionMessageSchema/variableSets/71e8fefc-009a-4602-b4a3-039bd34e0874/variables/362b719e-2d07-4ea6-8b0b-c39c533fdd8c",
"uri": "/detectionMessageSchema/variableSets/71e8fefc-009a-4602-b4a3-039bd34e0874/variables/362b719e-2d07-4ea6-8b0b-c39c533fdd8c",
"type": "application/vnd.sas.detection.message.variable"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionMessageSchema/variableSets/71e8fefc-009a-4602-b4a3-039bd34e0874/variables/362b719e-2d07-4ea6-8b0b-c39c533fdd8c",
"uri": "/detectionMessageSchema/variableSets/71e8fefc-009a-4602-b4a3-039bd34e0874/variables/362b719e-2d07-4ea6-8b0b-c39c533fdd8c"
}
]
}
{
"creationTimeStamp": "2022-10-22T17:05:34.223778Z",
"createdBy": "anonymous",
"modifiedTimeStamp": "2022-10-22T17:05:34.223748Z",
"modifiedBy": "anonymous",
"revision": 0,
"version": 1,
"id": "362b719e-2d07-4ea6-8b0b-c39c533fdd8c",
"name": "var1",
"displayName": "var1",
"description": "",
"type": "string",
"tags": [
{
"name": "tag_name",
"value": "tag_value"
}
],
"minLength": 0,
"maxLength": 0,
"enumValues": [],
"enumURI": "",
"minimum": 0,
"maximum": 0,
"inclusiveMinimum": false,
"exclusiveMaximum": false,
"arrayItem": "none",
"minItems": 0,
"maxItems": 0,
"required": false,
"deprecated": false,
"private": false,
"isMissing": false,
"locked": false,
"defaultValue": "",
"access": "rw",
"userGroup": "DMSDefault",
"jsonPath": ".TESTA",
"variableSetId": "71e8fefc-009a-4602-b4a3-039bd34e0874",
"messageName": "cards",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionMessageSchema/variableSets/71e8fefc-009a-4602-b4a3-039bd34e0874/variables/362b719e-2d07-4ea6-8b0b-c39c533fdd8c",
"uri": "/detectionMessageSchema/variableSets/71e8fefc-009a-4602-b4a3-039bd34e0874/variables/362b719e-2d07-4ea6-8b0b-c39c533fdd8c",
"type": "application/vnd.sas.detection.message.variable"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionMessageSchema/variableSets/71e8fefc-009a-4602-b4a3-039bd34e0874/variables/362b719e-2d07-4ea6-8b0b-c39c533fdd8c",
"uri": "/detectionMessageSchema/variableSets/71e8fefc-009a-4602-b4a3-039bd34e0874/variables/362b719e-2d07-4ea6-8b0b-c39c533fdd8c",
"type": "application/vnd.sas.detection.message.variable"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionMessageSchema/variableSets/71e8fefc-009a-4602-b4a3-039bd34e0874/variables/362b719e-2d07-4ea6-8b0b-c39c533fdd8c",
"uri": "/detectionMessageSchema/variableSets/71e8fefc-009a-4602-b4a3-039bd34e0874/variables/362b719e-2d07-4ea6-8b0b-c39c533fdd8c"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Return a variable. | variableSummary |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Etag | string | An hash-code for the response resource. | |
200 | Last-Modified | string | Data and Time of last modification. | |
200 | Location | string | Location of URI for the endpoint. |
Partial Update a variable
Code samples
# You can also use wget
curl -X PATCH http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/variableSets/{variableSetId}/variables/{variableId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.detection.variable+json' \
-H 'Accept: application/vnd.sas.detection.variable+json'
const inputBody = '{
"name": "string",
"displayName": "string",
"type": "array",
"description": "string",
"tags": [
{
"name": "string",
"value": "string"
}
],
"version": 1,
"minLength": 0,
"maxLength": 0,
"enumValues": [
"string"
],
"enumURI": "string",
"minimum": 0,
"maximum": 0,
"inclusiveMinimum": true,
"exclusiveMaximum": true,
"arrayItem": "none",
"minItems": 0,
"maxItems": 0,
"required": false,
"deprecated": false,
"private": false,
"access": "rw",
"isMissing": false,
"defaultValue": "",
"locked": true,
"userGroup": "DMSDefault",
"featureExpr": {
"window": {
"type": "array",
"length": 0,
"timeISOPeriod": "string",
"timeVarFQName": "string",
"timeVarSchemaName": "string"
},
"aggregator": {
"funcName": "none",
"varFQName": "string",
"varSchemaName": "string"
},
"filter": {
"expression": []
}
},
"revision": 0
}';
const headers = {
'Content-Type':'application/vnd.sas.detection.variable+json',
'Accept':'application/vnd.sas.detection.variable+json'
};
fetch('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/variableSets/{variableSetId}/variables/{variableId}',
{
method: 'PATCH',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/vnd.sas.detection.variable+json',
'Accept': 'application/vnd.sas.detection.variable+json'
}
r = requests.patch('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/variableSets/{variableSetId}/variables/{variableId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.detection.variable+json"},
"Accept": []string{"application/vnd.sas.detection.variable+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PATCH", "http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/variableSets/{variableSetId}/variables/{variableId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PATCH /variableSets/{variableSetId}/variables/{variableId}
Partially update the properties of a variable.
Allows updates to description
, required
, and deprecated
if and only if message is in Deployment-Ready
state
or the variable was previously Deployed
.
Additional properties can be modified only if the variable are not yet deployed.
Body parameter
{
"name": "string",
"displayName": "string",
"type": "array",
"description": "string",
"tags": [
{
"name": "string",
"value": "string"
}
],
"version": 1,
"minLength": 0,
"maxLength": 0,
"enumValues": [
"string"
],
"enumURI": "string",
"minimum": 0,
"maximum": 0,
"inclusiveMinimum": true,
"exclusiveMaximum": true,
"arrayItem": "none",
"minItems": 0,
"maxItems": 0,
"required": false,
"deprecated": false,
"private": false,
"access": "rw",
"isMissing": false,
"defaultValue": "",
"locked": true,
"userGroup": "DMSDefault",
"featureExpr": {
"window": {
"type": "array",
"length": 0,
"timeISOPeriod": "string",
"timeVarFQName": "string",
"timeVarSchemaName": "string"
},
"aggregator": {
"funcName": "none",
"varFQName": "string",
"varSchemaName": "string"
},
"filter": {
"expression": []
}
},
"revision": 0
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
variableSetId | path | string | true | This is the variable set UUID identifier. |
variableId | path | string | true | This is the variable UUID identifier. |
body | body | #/paths/~1variableSets~1%7BvariableSetId%7D~1variables~1%7BvariableId%7D/patch/requestBody/content/application~1vnd.sas.detection.variable%2Bjson/schema | false | none |
Example responses
Get a Variable Example
{
"creationTimeStamp": "2022-10-22T17:05:34.223778Z",
"createdBy": "anonymous",
"modifiedTimeStamp": "2022-10-22T17:05:34.223748Z",
"modifiedBy": "anonymous",
"revision": 0,
"version": 1,
"id": "362b719e-2d07-4ea6-8b0b-c39c533fdd8c",
"name": "var1",
"displayName": "var1",
"description": "",
"type": "string",
"tags": [
{
"name": "tag_name",
"value": "tag_value"
}
],
"minLength": 0,
"maxLength": 0,
"enumValues": [],
"enumURI": "",
"minimum": 0,
"maximum": 0,
"inclusiveMinimum": false,
"exclusiveMaximum": false,
"arrayItem": "none",
"minItems": 0,
"maxItems": 0,
"required": false,
"deprecated": false,
"private": false,
"isMissing": false,
"locked": false,
"defaultValue": "",
"access": "rw",
"userGroup": "DMSDefault",
"jsonPath": ".TESTA",
"variableSetId": "71e8fefc-009a-4602-b4a3-039bd34e0874",
"messageName": "cards",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionMessageSchema/variableSets/71e8fefc-009a-4602-b4a3-039bd34e0874/variables/362b719e-2d07-4ea6-8b0b-c39c533fdd8c",
"uri": "/detectionMessageSchema/variableSets/71e8fefc-009a-4602-b4a3-039bd34e0874/variables/362b719e-2d07-4ea6-8b0b-c39c533fdd8c",
"type": "application/vnd.sas.detection.message.variable"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionMessageSchema/variableSets/71e8fefc-009a-4602-b4a3-039bd34e0874/variables/362b719e-2d07-4ea6-8b0b-c39c533fdd8c",
"uri": "/detectionMessageSchema/variableSets/71e8fefc-009a-4602-b4a3-039bd34e0874/variables/362b719e-2d07-4ea6-8b0b-c39c533fdd8c",
"type": "application/vnd.sas.detection.message.variable"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionMessageSchema/variableSets/71e8fefc-009a-4602-b4a3-039bd34e0874/variables/362b719e-2d07-4ea6-8b0b-c39c533fdd8c",
"uri": "/detectionMessageSchema/variableSets/71e8fefc-009a-4602-b4a3-039bd34e0874/variables/362b719e-2d07-4ea6-8b0b-c39c533fdd8c"
}
]
}
{
"creationTimeStamp": "2022-10-22T17:05:34.223778Z",
"createdBy": "anonymous",
"modifiedTimeStamp": "2022-10-22T17:05:34.223748Z",
"modifiedBy": "anonymous",
"revision": 0,
"version": 1,
"id": "362b719e-2d07-4ea6-8b0b-c39c533fdd8c",
"name": "var1",
"displayName": "var1",
"description": "",
"type": "string",
"tags": [
{
"name": "tag_name",
"value": "tag_value"
}
],
"minLength": 0,
"maxLength": 0,
"enumValues": [],
"enumURI": "",
"minimum": 0,
"maximum": 0,
"inclusiveMinimum": false,
"exclusiveMaximum": false,
"arrayItem": "none",
"minItems": 0,
"maxItems": 0,
"required": false,
"deprecated": false,
"private": false,
"isMissing": false,
"locked": false,
"defaultValue": "",
"access": "rw",
"userGroup": "DMSDefault",
"jsonPath": ".TESTA",
"variableSetId": "71e8fefc-009a-4602-b4a3-039bd34e0874",
"messageName": "cards",
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionMessageSchema/variableSets/71e8fefc-009a-4602-b4a3-039bd34e0874/variables/362b719e-2d07-4ea6-8b0b-c39c533fdd8c",
"uri": "/detectionMessageSchema/variableSets/71e8fefc-009a-4602-b4a3-039bd34e0874/variables/362b719e-2d07-4ea6-8b0b-c39c533fdd8c",
"type": "application/vnd.sas.detection.message.variable"
},
{
"method": "PATCH",
"rel": "patch",
"href": "/detectionMessageSchema/variableSets/71e8fefc-009a-4602-b4a3-039bd34e0874/variables/362b719e-2d07-4ea6-8b0b-c39c533fdd8c",
"uri": "/detectionMessageSchema/variableSets/71e8fefc-009a-4602-b4a3-039bd34e0874/variables/362b719e-2d07-4ea6-8b0b-c39c533fdd8c",
"type": "application/vnd.sas.detection.message.variable"
},
{
"method": "DELETE",
"rel": "delete",
"href": "/detectionMessageSchema/variableSets/71e8fefc-009a-4602-b4a3-039bd34e0874/variables/362b719e-2d07-4ea6-8b0b-c39c533fdd8c",
"uri": "/detectionMessageSchema/variableSets/71e8fefc-009a-4602-b4a3-039bd34e0874/variables/362b719e-2d07-4ea6-8b0b-c39c533fdd8c"
}
]
}
Patch Variable 400 Response Example
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"0KhiaOruvmDVl5a_8UpbpxCNNqNVIvn8K0L5X0VjkUUUGSoksvwvnjWk2R7EKuU5mpiGB3TT7mde7TnBNVnfl3MaCgE8HdbRF4AecD5wl9dkLdzkAqUsvnSM4SyYxMb7\" for the field \"Name\" exceeds the maximum length of 127.",
"details": [
"value: 0KhiaOruvmDVl5a_8UpbpxCNNqNVIvn8K0L5X0VjkUUUGSoksvwvnjWk2R7EKuU5mpiGB3TT7mde7TnBNVnfl3MaCgE8HdbRF4AecD5wl9dkLdzkAqUsvnSM4SyYxMb7",
"maximumLength: 127",
"messageID: detection-lib-api-icu.validation.invalid.value.too.long.msg",
"field: Name",
"path: /detectionMessageSchema/messages/ceb5ca12-951d-4fa2-a533-4f5cd0422802/variableSets/46dfbd84-16dc-4520-9703-1b6e868ab640",
"correlator: 02f659f7-f874-40f3-a525-e58a937bb5e9"
]
}
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"0KhiaOruvmDVl5a_8UpbpxCNNqNVIvn8K0L5X0VjkUUUGSoksvwvnjWk2R7EKuU5mpiGB3TT7mde7TnBNVnfl3MaCgE8HdbRF4AecD5wl9dkLdzkAqUsvnSM4SyYxMb7\" for the field \"Name\" exceeds the maximum length of 127.",
"details": [
"value: 0KhiaOruvmDVl5a_8UpbpxCNNqNVIvn8K0L5X0VjkUUUGSoksvwvnjWk2R7EKuU5mpiGB3TT7mde7TnBNVnfl3MaCgE8HdbRF4AecD5wl9dkLdzkAqUsvnSM4SyYxMb7",
"maximumLength: 127",
"messageID: detection-lib-api-icu.validation.invalid.value.too.long.msg",
"field: Name",
"path: /detectionMessageSchema/messages/ceb5ca12-951d-4fa2-a533-4f5cd0422802/variableSets/46dfbd84-16dc-4520-9703-1b6e868ab640",
"correlator: 02f659f7-f874-40f3-a525-e58a937bb5e9"
]
}
Patch Variable 409 Response Example
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000022,
"message": "The resource \"var_private\" that is private cannot be modified.",
"details": [
"messageID: detection-message-schema-api-icu.private.immutable.msg",
"Name: var_private",
"path: /detectionMessageSchema/variableSets/71e8fefc-009a-4602-b4a3-039bd34e0874/variables/fff21a9b-9bab-492e-8d05-5af992cd5501",
"correlator: b3a66973-d6a9-4050-9cee-fc2a34036864"
]
}
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000022,
"message": "The resource \"var_private\" that is private cannot be modified.",
"details": [
"messageID: detection-message-schema-api-icu.private.immutable.msg",
"Name: var_private",
"path: /detectionMessageSchema/variableSets/71e8fefc-009a-4602-b4a3-039bd34e0874/variables/fff21a9b-9bab-492e-8d05-5af992cd5501",
"correlator: b3a66973-d6a9-4050-9cee-fc2a34036864"
]
}
Patch Variable 412 Response Example
{
"version": 2,
"httpStatusCode": 412,
"errorCode": 1000000,
"message": "The object 46dfbd84-16dc-4520-9703-1b6e868ab640 revision (0) updated since 2022-10-22T17:05:11Z [Code:1000000]",
"details": [
"Revision: 0",
"Type: variableSet",
"Time: 2022-10-22T17:05:11Z",
"Code: 1000000",
"messageID: detection-lib-api-icu.optimistic.locking2.msg",
"ID: 46dfbd84-16dc-4520-9703-1b6e868ab640",
"path: /detectionMessageSchema/variableSets/ceb5ca12-951d-4fa2-a533-4f5cd0422802/variables/46dfbd84-16dc-4520-9703-1b6e868ab640",
"correlator: f6340882-2323-4177-91c4-6a289cfce063"
]
}
{
"version": 2,
"httpStatusCode": 412,
"errorCode": 1000000,
"message": "The object 46dfbd84-16dc-4520-9703-1b6e868ab640 revision (0) updated since 2022-10-22T17:05:11Z [Code:1000000]",
"details": [
"Revision: 0",
"Type: variableSet",
"Time: 2022-10-22T17:05:11Z",
"Code: 1000000",
"messageID: detection-lib-api-icu.optimistic.locking2.msg",
"ID: 46dfbd84-16dc-4520-9703-1b6e868ab640",
"path: /detectionMessageSchema/variableSets/ceb5ca12-951d-4fa2-a533-4f5cd0422802/variables/46dfbd84-16dc-4520-9703-1b6e868ab640",
"correlator: f6340882-2323-4177-91c4-6a289cfce063"
]
}
Error 422 Response Example
{
"version": 2,
"httpStatusCode": 422,
"errorCode": 1000002,
"message": "Failed to process the request even though valid"
}
{
"version": 2,
"httpStatusCode": 422,
"errorCode": 1000002,
"message": "Failed to process the request even though valid"
}
Error 428 Response Example
{
"version": 2,
"httpStatusCode": 428,
"errorCode": 1000002,
"message": "Missing required pre-condition If-Match header"
}
{
"version": 2,
"httpStatusCode": 428,
"errorCode": 1000002,
"message": "Missing required pre-condition If-Match header"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successfully updated the variable | variable |
400 | Bad Request | The request was invalid | Inline |
409 | Conflict | There is a conflict associated with this resource. Possible Reason(s): |
- A private
variable cannot be updated
- The message is in a immutable (Deployed
) state
- The requested change breaks the backward compatibility rule|Inline|
|412|Precondition Failed|The supplied pre-condition was not satisfactory, typically indicating stale data.|Inline|
|422|Unprocessable Entity|The request cannot be processed even though it is a valid request.
Possible Reason(s):
- The requested message state could not be persisted|Inline|
|428|Precondition Required|A required pre-condition (If-Match/If-Unmodified-Since) was not provided.|Inline|
Response Schema
Status Code 400
Error
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 | [#/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [messageSummaryCollection/allOf/0/properties/links/items] | false | none | The links that apply to the error. |
»» Link | messageSummaryCollection/allOf/0/properties/links/items | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 409
Error
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 | [#/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [messageSummaryCollection/allOf/0/properties/links/items] | false | none | The links that apply to the error. |
»» Link | messageSummaryCollection/allOf/0/properties/links/items | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 412
Error
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 | [#/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [messageSummaryCollection/allOf/0/properties/links/items] | false | none | The links that apply to the error. |
»» Link | messageSummaryCollection/allOf/0/properties/links/items | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 422
Error
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 | [#/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [messageSummaryCollection/allOf/0/properties/links/items] | false | none | The links that apply to the error. |
»» Link | messageSummaryCollection/allOf/0/properties/links/items | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 428
Error
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 | [#/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [messageSummaryCollection/allOf/0/properties/links/items] | false | none | The links that apply to the error. |
»» Link | messageSummaryCollection/allOf/0/properties/links/items | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Etag | string | An hash-code for the response resource. | |
200 | Last-Modified | string | Data and Time of last modification. | |
200 | Location | string | Location of URI for the endpoint. | |
409 | Location | string | Location of URI for the endpoint. | |
412 | Location | string | Location of URI for the endpoint. | |
422 | Location | string | Location of URI for the endpoint. | |
428 | Location | string | Location of URI for the endpoint. |
Return masking types
Code samples
# You can also use wget
curl -X GET http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/maskingTypes \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/maskingTypes',
{
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('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/maskingTypes', 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", "http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/maskingTypes", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /maskingTypes
This endpoint returns a unique list of masking types.
Example responses
List of Masking Types Example
{
"version": 2,
"accept": "application/vnd.sas.detection.message.masking.type",
"count": 4,
"start": 0,
"limit": 100,
"name": "maskingTypes",
"items": [
{
"id": "maskEmailDomain",
"name": "MaskEmailDomain",
"example": "user@•••••.•••"
},
{
"id": "maskEmailUser",
"name": "MaskEmailUser",
"example": "••••••••@domain.com"
},
{
"id": "maskEnd",
"name": "MaskEnd",
"example": "1234••••••••"
},
{
"id": "maskMiddle",
"name": "MaskMiddle",
"example": "1234••••7890"
}
],
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionMessageSchema/maskingTypes",
"uri": "/detectionMessageSchema/maskingTypes",
"type": "application/vnd.sas.detection.message.masking.type"
}
]
}
{
"version": 2,
"accept": "application/vnd.sas.detection.message.masking.type",
"count": 4,
"start": 0,
"limit": 100,
"name": "maskingTypes",
"items": [
{
"id": "maskEmailDomain",
"name": "MaskEmailDomain",
"example": "user@•••••.•••"
},
{
"id": "maskEmailUser",
"name": "MaskEmailUser",
"example": "••••••••@domain.com"
},
{
"id": "maskEnd",
"name": "MaskEnd",
"example": "1234••••••••"
},
{
"id": "maskMiddle",
"name": "MaskMiddle",
"example": "1234••••7890"
}
],
"links": [
{
"method": "GET",
"rel": "self",
"href": "/detectionMessageSchema/maskingTypes",
"uri": "/detectionMessageSchema/maskingTypes",
"type": "application/vnd.sas.detection.message.masking.type"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | List of masking types. | maskingTypeCollection |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | Data and Time of last modification. |
Associations
The operations for message schema relationships.
Create message relationships
Code samples
# You can also use wget
curl -X POST http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/messageRelations \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.detection.message.relations+json' \
-H 'Accept: application/json'
const inputBody = '{
"version": 1,
"messageRelations": [
{
"version": 1,
"messageName": "commonFinancial"
},
{
"messageName": "cardExtensions"
},
{
"messageName": "sda"
}
]
}';
const headers = {
'Content-Type':'application/vnd.sas.detection.message.relations+json',
'Accept':'application/json'
};
fetch('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/messageRelations',
{
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.detection.message.relations+json',
'Accept': 'application/json'
}
r = requests.post('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/messageRelations', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.detection.message.relations+json"},
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/messageRelations", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /messages/{messageId}/messageRelations
Create message relationships of a message schema
Body parameter
Message Relationships Creation Example
{
"version": 1,
"messageRelations": [
{
"version": 1,
"messageName": "commonFinancial"
},
{
"messageName": "cardExtensions"
},
{
"messageName": "sda"
}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
messageId | path | string | true | This is the message UUID identifier of the existing message schema instance. |
body | body | messageRelationSet | false | none |
Example responses
Create New Message Relationships Response Example
{
"version": 1,
"messageRelations": [
{
"version": 1,
"id": "7d12d39f-7f1b-4f82-a746-f1bf0731833c",
"messageName": "SchemaA"
},
{
"version": 1,
"id": "50786e2b-b2f6-4168-b4cc-ebff83cf6066",
"messageName": "SchemaB"
}
]
}
{
"version": 1,
"messageRelations": [
{
"version": 1,
"id": "7d12d39f-7f1b-4f82-a746-f1bf0731833c",
"messageName": "SchemaA"
},
{
"version": 1,
"id": "50786e2b-b2f6-4168-b4cc-ebff83cf6066",
"messageName": "SchemaB"
}
]
}
Create New Message Relationships 400 Response Example
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The required field \"MessageRelations\" is empty. Specify a valid value.",
"details": [
"field: MessageRelations",
"messageID: detection-lib-api-icu.validation.missing.required.value.msg",
"path: /detectionMessageSchema/messages/c8cd1204-c526-44db-9b96-f89e1639ddbf/messageRelations",
"correlator: 1f8fbde8-4791-4d1d-88a9-e31a19688810"
]
}
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The required field \"MessageRelations\" is empty. Specify a valid value.",
"details": [
"field: MessageRelations",
"messageID: detection-lib-api-icu.validation.missing.required.value.msg",
"path: /detectionMessageSchema/messages/c8cd1204-c526-44db-9b96-f89e1639ddbf/messageRelations",
"correlator: 1f8fbde8-4791-4d1d-88a9-e31a19688810"
]
}
Create New Message Relationships 409 Response Example
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000017,
"message": "A deployed message schema with name \"CardSchema\" cannot be modified.",
"details": [
"Name: CardSchema",
"messageID: detection-message-schema-api-icu.message.deployed.immutable.msg",
"path: /detectionMessageSchema/messages/c8cd1204-c526-44db-9b96-f89e1639ddbf/messageRelations",
"correlator: e6462e86-1d18-4831-8fe3-5c0aae75aff4"
]
}
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000017,
"message": "A deployed message schema with name \"CardSchema\" cannot be modified.",
"details": [
"Name: CardSchema",
"messageID: detection-message-schema-api-icu.message.deployed.immutable.msg",
"path: /detectionMessageSchema/messages/c8cd1204-c526-44db-9b96-f89e1639ddbf/messageRelations",
"correlator: e6462e86-1d18-4831-8fe3-5c0aae75aff4"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Created | messageRelationSet |
400 | Bad Request | The request was invalid. Reasons may be invalid data or structure in the request body | Inline |
409 | Conflict | There is a conflict with an existing resource. Possible Reason(s): |
- The message schema is in immutable (Deployed
) state
- The message schema cannot reference itself
- The message schema is already a composite message schema|Inline|
Response Schema
Status Code 400
Error
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 | [#/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [messageSummaryCollection/allOf/0/properties/links/items] | false | none | The links that apply to the error. |
»» Link | messageSummaryCollection/allOf/0/properties/links/items | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 409
Error
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 | [#/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [messageSummaryCollection/allOf/0/properties/links/items] | false | none | The links that apply to the error. |
»» Link | messageSummaryCollection/allOf/0/properties/links/items | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Etag | string | An hash-code for the response resource. | |
201 | Last-Modified | string | Data and Time of last modification. | |
201 | Location | string | Location of URI for the endpoint. |
Return all message relationships of a message schema
Code samples
# You can also use wget
curl -X GET http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/messageRelations \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.detection.message.relations+json'
const headers = {
'Accept':'application/vnd.sas.detection.message.relations+json'
};
fetch('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/messageRelations',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.detection.message.relations+json'
}
r = requests.get('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/messageRelations', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.detection.message.relations+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/messageRelations", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /messages/{messageId}/messageRelations
This endpoint returns message relationships of a composite message.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
messageId | path | string | true | This is the message UUID identifier of the existing message schema instance. |
filter | query | string(filter-criteria) | false | Filter criteria for returned resources. See Filtering in REST APIs. |
usedBy | query | boolean | false | The default value is false . The default returns a list of message schemas that are members of the requested schema. A value of true returns the list of message schemas used by the requested schema. |
Example responses
List Message Relationships Response Example
{
"version": 1,
"messageRelations": [
{
"version": 1,
"id": "53faec0a-1793-43c1-8c36-21994c29cffd",
"messageName": "SchemaA"
},
{
"version": 1,
"id": "18763eb9-4a33-4dcd-8efc-fea70878c957",
"messageName": "SchemaB"
},
{
"version": 1,
"id": "377d3c75-23db-4d9a-86e6-ec0aa5792d20",
"messageName": "SchemaC"
}
]
}
{
"version": 1,
"messageRelations": [
{
"version": 1,
"id": "53faec0a-1793-43c1-8c36-21994c29cffd",
"messageName": "SchemaA"
},
{
"version": 1,
"id": "18763eb9-4a33-4dcd-8efc-fea70878c957",
"messageName": "SchemaB"
},
{
"version": 1,
"id": "377d3c75-23db-4d9a-86e6-ec0aa5792d20",
"messageName": "SchemaC"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Return message relationships | messageRelationSet |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Etag | string | An hash-code for the response resource. | |
200 | Last-Modified | string | Data and Time of last modification. | |
200 | Location | string | Location of URI for the endpoint. |
Create variable relationships of a variable set
Code samples
# You can also use wget
curl -X POST http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/variableSets/{variableSetId}/variableRelations \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.detection.variable.relations+json' \
-H 'Accept: application/vnd.sas.detection.variable.relations+json'
const inputBody = '{
"version": 1,
"variableRelations": [
{
"version": 1,
"messageName": "savings",
"name": "aqo_acct_num",
"pathName": "AQO"
},
{
"version": 1,
"messageName": "savings",
"name": "xqo_cust_num",
"pathName": "XQO"
}
]
}';
const headers = {
'Content-Type':'application/vnd.sas.detection.variable.relations+json',
'Accept':'application/vnd.sas.detection.variable.relations+json'
};
fetch('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/variableSets/{variableSetId}/variableRelations',
{
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.detection.variable.relations+json',
'Accept': 'application/vnd.sas.detection.variable.relations+json'
}
r = requests.post('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/variableSets/{variableSetId}/variableRelations', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.detection.variable.relations+json"},
"Accept": []string{"application/vnd.sas.detection.variable.relations+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/variableSets/{variableSetId}/variableRelations", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /variableSets/{variableSetId}/variableRelations
Create variable relationships of a variable set. The variables are added in order as each new relation is added to the end of the variableRelations array
Body parameter
Variable Relationships Creation Example
{
"version": 1,
"variableRelations": [
{
"version": 1,
"messageName": "savings",
"name": "aqo_acct_num",
"pathName": "AQO"
},
{
"version": 1,
"messageName": "savings",
"name": "xqo_cust_num",
"pathName": "XQO"
}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
variableSetId | path | string | true | This is the variable set UUID identifier. |
body | body | variableSetRelation | false | none |
Example responses
Create New Variable Relationships Response Example
{
"version": 1,
"id": "c1fa7c59-4968-46fb-91ff-c30be11a4060",
"messageName": "ProfileSchema",
"pathName": "ProfileA",
"variableRelations": [
{
"version": 1,
"id": "3dcb2d95-41f1-489c-b780-5c9706f48f90",
"name": "var1",
"messageName": "CheckingSchema",
"pathName": ".CheckingA.CheckingA1"
},
{
"version": 1,
"id": "ca6d6a12-601a-4544-939c-0e33481fe328",
"name": "var2",
"messageName": "CheckingSchema",
"pathName": ".CheckingA.CheckingA1"
}
]
}
{
"version": 1,
"id": "c1fa7c59-4968-46fb-91ff-c30be11a4060",
"messageName": "ProfileSchema",
"pathName": "ProfileA",
"variableRelations": [
{
"version": 1,
"id": "3dcb2d95-41f1-489c-b780-5c9706f48f90",
"name": "var1",
"messageName": "CheckingSchema",
"pathName": ".CheckingA.CheckingA1"
},
{
"version": 1,
"id": "ca6d6a12-601a-4544-939c-0e33481fe328",
"name": "var2",
"messageName": "CheckingSchema",
"pathName": ".CheckingA.CheckingA1"
}
]
}
Create New Variable Relationships 400 Response Example
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000004,
"message": "The request body has empty variable associations.",
"details": [
"messageID: detection-message-schema-api-icu.variable.relations.empty.msg",
"path: /detectionMessageSchema/variableSets/c92ec2f6-c73a-4b05-9b21-5afc716616a9/variableRelations",
"correlator: 7abac23d-abfb-430a-8fbc-81c4e97eced5"
]
}
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000004,
"message": "The request body has empty variable associations.",
"details": [
"messageID: detection-message-schema-api-icu.variable.relations.empty.msg",
"path: /detectionMessageSchema/variableSets/c92ec2f6-c73a-4b05-9b21-5afc716616a9/variableRelations",
"correlator: 7abac23d-abfb-430a-8fbc-81c4e97eced5"
]
}
Create New Variable Relationships 409 Response Example
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000017,
"message": "A deployed message schema with name \"ProfileSchema\" cannot be modified.",
"details": [
"Name: ProfileSchema",
"messageID: detection-message-schema-api-icu.message.deployed.immutable.msg",
"path: /detectionMessageSchema/variableSets/3658b23e-7f67-488f-9d4a-9ce375e28601/variableRelations",
"correlator: dc2ad428-27f3-4c3e-97c7-9db109a508be"
]
}
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000017,
"message": "A deployed message schema with name \"ProfileSchema\" cannot be modified.",
"details": [
"Name: ProfileSchema",
"messageID: detection-message-schema-api-icu.message.deployed.immutable.msg",
"path: /detectionMessageSchema/variableSets/3658b23e-7f67-488f-9d4a-9ce375e28601/variableRelations",
"correlator: dc2ad428-27f3-4c3e-97c7-9db109a508be"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Created | variableSetRelation |
400 | Bad Request | The request was invalid. Reasons may be invalid data or structure in the request body | Inline |
409 | Conflict | There is a conflict with an existing resource. Possible Reason(s): |
|
- The message schema is in immutable ( Deployed or Deployment-Ready ) state |
Inline |
Response Schema
Status Code 400
Error
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 | [#/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [messageSummaryCollection/allOf/0/properties/links/items] | false | none | The links that apply to the error. |
»» Link | messageSummaryCollection/allOf/0/properties/links/items | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 409
Error
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 | [#/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [messageSummaryCollection/allOf/0/properties/links/items] | false | none | The links that apply to the error. |
»» Link | messageSummaryCollection/allOf/0/properties/links/items | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Etag | string | An hash-code for the response resource. | |
201 | Last-Modified | string | Data and Time of last modification. | |
201 | Location | string | Location of URI for the endpoint. |
Return all variable relationships of a variable set
Code samples
# You can also use wget
curl -X GET http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/variableSets/{variableSetId}/variableRelations \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.detection.variable.relations+json'
const headers = {
'Accept':'application/vnd.sas.detection.variable.relations+json'
};
fetch('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/variableSets/{variableSetId}/variableRelations',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.detection.variable.relations+json'
}
r = requests.get('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/variableSets/{variableSetId}/variableRelations', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.detection.variable.relations+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/variableSets/{variableSetId}/variableRelations", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /variableSets/{variableSetId}/variableRelations
This endpoint returns variable relationships of a variable set.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
variableSetId | path | string | true | This is the variable set UUID identifier. |
filter | query | string(filter-criteria) | false | Filter criteria for returned resources. See Filtering in REST APIs. |
Example responses
List Variable Relationships Response Example
{
"version": 1,
"variableRelations": [
{
"version": 1,
"id": "b7740dba-410b-433b-ac2b-4fa5f20dcfcd",
"name": "var1",
"messageName": "CheckingSchema",
"pathName": ".CheckingA.CheckingA1"
},
{
"version": 1,
"id": "7531db77-0f0a-4ff2-8541-3740e1ed850f",
"name": "var2",
"messageName": "CheckingSchema",
"pathName": ".CheckingA.CheckingA1"
},
{
"version": 1,
"id": "afa84704-6b5b-45c0-82d7-8072f3b7de78",
"name": "var1",
"messageName": "CheckingSchema",
"pathName": ".CheckingA"
}
]
}
{
"version": 1,
"variableRelations": [
{
"version": 1,
"id": "b7740dba-410b-433b-ac2b-4fa5f20dcfcd",
"name": "var1",
"messageName": "CheckingSchema",
"pathName": ".CheckingA.CheckingA1"
},
{
"version": 1,
"id": "7531db77-0f0a-4ff2-8541-3740e1ed850f",
"name": "var2",
"messageName": "CheckingSchema",
"pathName": ".CheckingA.CheckingA1"
},
{
"version": 1,
"id": "afa84704-6b5b-45c0-82d7-8072f3b7de78",
"name": "var1",
"messageName": "CheckingSchema",
"pathName": ".CheckingA"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Return variable relationships | variableSetRelation |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Etag | string | An hash-code for the response resource. | |
200 | Last-Modified | string | Data and Time of last modification. | |
200 | Location | string | Location of URI for the endpoint. |
Delete a list of associated variable relationships
Code samples
# You can also use wget
curl -X POST http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/variableSets/{variableSetId}/variableRelations/deletions \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.selection+json'
const inputBody = '{
"version": 1,
"type": "id",
"resources": [
"9c75d8e2-d28f-4abe-b17e-0b155676c928",
"11e20129-2c9e-4ef5-98c3-74e7b8793b23"
]
}';
const headers = {
'Content-Type':'application/vnd.sas.selection+json'
};
fetch('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/variableSets/{variableSetId}/variableRelations/deletions',
{
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.selection+json'
}
r = requests.post('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/variableSets/{variableSetId}/variableRelations/deletions', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.selection+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/variableSets/{variableSetId}/variableRelations/deletions", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /variableSets/{variableSetId}/variableRelations/deletions
Delete a list of variable relationships with id
of a variable set.
Body parameter
Variable Relationships Deletion Example
{
"version": 1,
"type": "id",
"resources": [
"9c75d8e2-d28f-4abe-b17e-0b155676c928",
"11e20129-2c9e-4ef5-98c3-74e7b8793b23"
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
variableSetId | path | string | true | This is the variable set UUID identifier. |
body | body | #/paths/~1variableSets~1%7BvariableSetId%7D~1variableRelations~1deletions/post/requestBody/content/application~1vnd.sas.selection%2Bjson/schema | false | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The variable relationships are deleted. | None |
204 | No Content | The variable relationships are deleted. | None |
400 | Bad Request | The request is malformed | None |
409 | Conflict | Cannot delete variable relationships. Possible Reason(s): |
|
- The message is in a immutable ( Deployed or Deployment-Ready ) state |
None |
Delete a list of message relationships
Code samples
# You can also use wget
curl -X POST http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/messageRelations/deletions \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.selection+json'
const inputBody = '{
"version": 1,
"type": "id",
"resources": [
"9c75d8e2-d28f-4abe-b17e-0b155676c928",
"11e20129-2c9e-4ef5-98c3-74e7b8793b23"
]
}';
const headers = {
'Content-Type':'application/vnd.sas.selection+json'
};
fetch('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/messageRelations/deletions',
{
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.selection+json'
}
r = requests.post('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/messageRelations/deletions', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.selection+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/messageRelations/deletions", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /messages/{messageId}/messageRelations/deletions
Delete a list of message relationships with id
of a composite message.
Body parameter
Message Relationships Deletion Example
{
"version": 1,
"type": "id",
"resources": [
"9c75d8e2-d28f-4abe-b17e-0b155676c928",
"11e20129-2c9e-4ef5-98c3-74e7b8793b23"
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
messageId | path | string | true | This is the message UUID identifier of the existing message schema instance. |
body | body | #/paths/~1variableSets~1%7BvariableSetId%7D~1variableRelations~1deletions/post/requestBody/content/application~1vnd.sas.selection%2Bjson/schema | false | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The message relationships are deleted. | None |
204 | No Content | The message relationships are deleted. | None |
400 | Bad Request | The request is malformed | None |
409 | Conflict | Cannot delete message relationships. Possible Reason(s): |
|
- The message is in a immutable ( Deployed ) state |
None |
Delete a variable relationship of a variable set
Code samples
# You can also use wget
curl -X DELETE http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/variableSets/{variableSetId}/variableRelations/{variableRelationId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.error+json'
const headers = {
'Accept':'application/vnd.sas.error+json'
};
fetch('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/variableSets/{variableSetId}/variableRelations/{variableRelationId}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.error+json'
}
r = requests.delete('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/variableSets/{variableSetId}/variableRelations/{variableRelationId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.error+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/variableSets/{variableSetId}/variableRelations/{variableRelationId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /variableSets/{variableSetId}/variableRelations/{variableRelationId}
Delete a variable relationship of the variable set.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
variableSetId | path | string | true | This is the variable set UUID identifier. |
variableRelationId | path | string | true | This is the variable relation association UUID identifier |
Example responses
Delete Variable Relationship(s) 409 Response Example
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000017,
"message": "A deployed message schema with name \"ProfileSchema\" cannot be modified.",
"details": [
"Name: ProfileSchema",
"messageID: detection-message-schema-api-icu.message.deployed.immutable.msg",
"path: /detectionMessageSchema/variableSets/abbc8a91-0942-40a1-9b8f-ece0f703cc69/variableRelations/945a383b-2a62-4658-9723-9fc35b859ccb",
"correlator: 4904e56d-5ab7-423a-ac48-1ce9a39f4d5a"
]
}
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000017,
"message": "A deployed message schema with name \"ProfileSchema\" cannot be modified.",
"details": [
"Name: ProfileSchema",
"messageID: detection-message-schema-api-icu.message.deployed.immutable.msg",
"path: /detectionMessageSchema/variableSets/abbc8a91-0942-40a1-9b8f-ece0f703cc69/variableRelations/945a383b-2a62-4658-9723-9fc35b859ccb",
"correlator: 4904e56d-5ab7-423a-ac48-1ce9a39f4d5a"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | The variable relationship is deleted. | None |
400 | Bad Request | The request is malformed | None |
409 | Conflict | The variable relationship cannot be deleted/modified. | Inline |
Response Schema
Status Code 409
Error
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 | [#/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [messageSummaryCollection/allOf/0/properties/links/items] | false | none | The links that apply to the error. |
»» Link | messageSummaryCollection/allOf/0/properties/links/items | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Delete a message relationship
Code samples
# You can also use wget
curl -X DELETE http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/messageRelations/{messageRelationId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.error+json'
const headers = {
'Accept':'application/vnd.sas.error+json'
};
fetch('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/messageRelations/{messageRelationId}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.error+json'
}
r = requests.delete('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/messageRelations/{messageRelationId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.error+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/messages/{messageId}/messageRelations/{messageRelationId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /messages/{messageId}/messageRelations/{messageRelationId}
Delete a message relationship of the composite message
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
messageId | path | string | true | This is the message UUID identifier of the existing message schema instance. |
messageRelationId | path | string | true | The is the message relation association UUID identifier |
Example responses
Delete Message Relationship(s) 409 Response Example
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000017,
"message": "A deployed message schema with name \"CardSchema\" cannot be modified.",
"details": [
"messageID: detection-message-schema-api-icu.message.deployed.immutable.msg",
"Name: CardSchema",
"path: /detectionMessageSchema/messages/d5584fc8-7244-4dde-827a-8cf7470832e2/messageRelations/a1fb2d73-f1cb-4cae-9b26-151006b791e4",
"correlator: 052c0878-235a-4923-a3ac-67fb818247f2"
]
}
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000017,
"message": "A deployed message schema with name \"CardSchema\" cannot be modified.",
"details": [
"messageID: detection-message-schema-api-icu.message.deployed.immutable.msg",
"Name: CardSchema",
"path: /detectionMessageSchema/messages/d5584fc8-7244-4dde-827a-8cf7470832e2/messageRelations/a1fb2d73-f1cb-4cae-9b26-151006b791e4",
"correlator: 052c0878-235a-4923-a3ac-67fb818247f2"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | The message relationship is deleted or may not exist. | None |
409 | Conflict | The message relationship cannot be deleted/modified. Possible Reason(s): |
|
- The message is in a immutable ( Deployed or Deployment-Ready ) state |
Inline |
Response Schema
Status Code 409
Error
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 | [#/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [messageSummaryCollection/allOf/0/properties/links/items] | false | none | The links that apply to the error. |
»» Link | messageSummaryCollection/allOf/0/properties/links/items | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Templates
These endpoints are used to create, apply, retrieve, and delete templates. Templates represent change sets that can be applied to messages, variable sets, variables, and message relations. The 'operation' field within a template determines whether the change applied is a create, put, patch, or delete. Templates are immutable, so a new template must be created if a template requires a change.
Create a new template
Code samples
# You can also use wget
curl -X POST http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/templates \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/vnd.sas.detection.message.schema.template+yaml' \
-H 'Accept: application/vnd.sas.detection.message.schema.template.summary+json' \
-H 'Content-Encoding: string'
const inputBody = 'name: createM060100
type: Prescribed_by_SAS
description: This describes the template
operation: create
tenant: tenant1
product: sda
message:
name: M060100
type: fraud
description: example message instance
operation: create
messageRelations:
- messageName: relationMsg1
operation: create
- messageName: relationMsg2
operation: create
variables:
- name: M060100_Top_Level_Var
type: string
minLength: 0
maxLength: 3
operation: create
variableSets:
- name: SMH
displayName: System Message Header
type: object
operation: create
variables:
- name: smh_foo
type: string
minLength: 0
maxLength: 16
access: na
description: "Multi-org name passed in from the client"
operation: create
- name: smh_client_tran_type
type: string
minLength: 0
maxLength: 10
access: rw
description: "Client-defined transaction type (10 bytes)."
operation: create
- name: smh_info2_code
type: string
minLength: 0
maxLength: 4
access: na
description: "Additional error information. (Returned by SAS OnDemand Decision Engine.)"
operation: create
- name: smh_reason_code
type: string
minLength: 0
maxLength: 4
access: na
description: "Reason code for the error. (Returned by SAS OnDemand Decision Engine.)"
operation: create
';
const headers = {
'Content-Type':'application/vnd.sas.detection.message.schema.template+yaml',
'Accept':'application/vnd.sas.detection.message.schema.template.summary+json',
'Content-Encoding':'string'
};
fetch('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/templates',
{
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.detection.message.schema.template+yaml',
'Accept': 'application/vnd.sas.detection.message.schema.template.summary+json',
'Content-Encoding': 'string'
}
r = requests.post('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/templates', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/vnd.sas.detection.message.schema.template+yaml"},
"Accept": []string{"application/vnd.sas.detection.message.schema.template.summary+json"},
"Content-Encoding": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/templates", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /templates
This endpoint is used to create a new template, which can be later applied to an instance. Setting autoapply=true can be used to apply the template directly after creation.
Body parameter
An input template described as a YAML
"name: createM060100\ntype: Prescribed_by_SAS\ndescription: This describes the template\noperation: create\ntenant: tenant1\nproduct: sda\nmessage:\n name: M060100\n type: fraud\n description: example message instance\n operation: create\n messageRelations:\n - messageName: relationMsg1\n operation: create\n - messageName: relationMsg2\n operation: create\n variables:\n - name: M060100_Top_Level_Var\n type: string\n minLength: 0\n maxLength: 3\n operation: create\n variableSets:\n - name: SMH\n displayName: System Message Header\n type: object\n operation: create\n variables:\n - name: smh_foo\n type: string\n minLength: 0\n maxLength: 16\n access: na\n description: \"Multi-org name passed in from the client\"\n operation: create\n - name: smh_client_tran_type\n type: string\n minLength: 0\n maxLength: 10\n access: rw\n description: \"Client-defined transaction type (10 bytes).\"\n operation: create\n - name: smh_info2_code\n type: string\n minLength: 0\n maxLength: 4\n access: na\n description: \"Additional error information. (Returned by SAS OnDemand Decision Engine.)\"\n operation: create\n - name: smh_reason_code\n type: string\n minLength: 0\n maxLength: 4\n access: na\n description: \"Reason code for the error. (Returned by SAS OnDemand Decision Engine.)\"\n operation: create\n"
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
autoapply | query | boolean | false | If true, the endpoint will create the template and also apply it to the template specified instance |
Content-Encoding | header | string | true | The Encoding Type of the request body content. This must be set to base64. |
body | body | createTemplate | false | none |
Example responses
Template Summary Example
{
"id": "55555555-5555-5555-5555-555555555555",
"fileId": "44444444-4444-4444-4444-444444444444",
"creationTimeStamp": "2019-08-24T14:15:22.000Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22.000Z",
"modifiedBy": "string",
"version": 1,
"name": "string",
"description": "string",
"tenant": "default",
"product": "default",
"operation": "create",
"status": "pending",
"data": "VGhpcyBpcyBub3QgYSB2YWxpZCB0ZW1wbGF0ZSwganVzdCBzYW1wbGUgYmFzZTY0IGVuY29kZWQgZGF0YQo="
}
{
"id": "55555555-5555-5555-5555-555555555555",
"fileId": "44444444-4444-4444-4444-444444444444",
"creationTimeStamp": "2019-08-24T14:15:22.000Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22.000Z",
"modifiedBy": "string",
"version": 1,
"name": "string",
"description": "string",
"tenant": "default",
"product": "default",
"operation": "create",
"status": "pending",
"data": "VGhpcyBpcyBub3QgYSB2YWxpZCB0ZW1wbGF0ZSwganVzdCBzYW1wbGUgYmFzZTY0IGVuY29kZWQgZGF0YQo="
}
New Template 400 Response Example
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"NameWith!_IsInvalid\" for the field \"Name\" is invalid. Only the following characters are allowed: A-Z,a-z,0-9,_,space.",
"details": [
"value: NameWith!_IsInvalid",
"allowedCharacters: A-Z,a-z,0-9,_,space",
"messageID: detection-lib-api-icu.validation.invalid.value.with.allowed.chars.msg",
"field: Name",
"path: /detectionMessageSchema/templates",
"correlator: c8be69b7-c0b5-470e-9265-f588086021ed"
]
}
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"NameWith!_IsInvalid\" for the field \"Name\" is invalid. Only the following characters are allowed: A-Z,a-z,0-9,_,space.",
"details": [
"value: NameWith!_IsInvalid",
"allowedCharacters: A-Z,a-z,0-9,_,space",
"messageID: detection-lib-api-icu.validation.invalid.value.with.allowed.chars.msg",
"field: Name",
"path: /detectionMessageSchema/templates",
"correlator: c8be69b7-c0b5-470e-9265-f588086021ed"
]
}
New Template 409 Response Example
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000017,
"message": "An identical template already exists.",
"details": [
"Name: createmsg",
"messageID: detection-message-schema-api-icu.template.already.exists.msg",
"path: /detectionMessageSchema/templates",
"correlator: d637c80a-86f6-468b-b06c-b15c7936b8ce"
]
}
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000017,
"message": "An identical template already exists.",
"details": [
"Name: createmsg",
"messageID: detection-message-schema-api-icu.template.already.exists.msg",
"path: /detectionMessageSchema/templates",
"correlator: d637c80a-86f6-468b-b06c-b15c7936b8ce"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Created | templateSummary |
400 | Bad Request | The request was invalid. Reasons may be invalid data or structure in the request body. | Inline |
409 | Conflict | There is a conflict with an existing resource. Possible Reason(s): |
- The template already exists and is applied
- A Developing
message schema revision already exists
- A message schema wth the same name
already exists|Inline|
Response Schema
Status Code 400
Error
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 | [#/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [messageSummaryCollection/allOf/0/properties/links/items] | false | none | The links that apply to the error. |
»» Link | messageSummaryCollection/allOf/0/properties/links/items | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 409
Error
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 | [#/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [messageSummaryCollection/allOf/0/properties/links/items] | false | none | The links that apply to the error. |
»» Link | messageSummaryCollection/allOf/0/properties/links/items | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Etag | string | An hash-code for the response resource. | |
201 | Last-Modified | string | Data and Time of last modification. | |
201 | Location | string | Location of URI for the endpoint. |
Return a list of templates
Code samples
# You can also use wget
curl -X GET http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/templates \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection+json'
const headers = {
'Accept':'application/vnd.sas.collection+json'
};
fetch('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/templates',
{
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('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/templates', 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", "http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/templates", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /templates
This endpoint returns a list of templates.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
start | query | integer | false | 0-based Offset of first resource to return. Defaults to 0. |
limit | query | integer | false | Maximum number of resources to return. Defaults to 100. |
filter | query | string(filter-criteria) | false | Filter criteria for returned resources. See Filtering in REST APIs. |
sortBy | query | string(sort-criteria) | false | Sort returned resources. See Sorting in REST APIs. |
Example responses
Template Summary Collection Example
{
"version": 2,
"accept": "application/vnd.sas.detection.message.schema.template",
"count": 2,
"start": 0,
"limit": 100,
"name": "templates",
"items": [
{
"creationTimeStamp": "2019-08-24T14:15:22.000Z",
"createdBy": "sasboot",
"modifiedTimeStamp": "2019-08-24T14:15:22.000Z",
"modifiedBy": "sasboot",
"id": "11111111-1111-1111-1111-111111111111",
"name": "template1",
"description": "delete msgfromtemplate message",
"product": "default",
"tenant": "default",
"data": "YmFzZTY0IGVuY29kZWQgdGVtcGxhdGUgZGF0YSwgdGhpcyBpcyBub3QgYSB2YWxpZCB0ZW1wbGF0ZQo=",
"fileID": "11111111-1111-1111-1111-111111111111",
"operation": "delete",
"status": "applied"
},
{
"creationTimeStamp": "2019-08-24T14:15:22.000Z",
"createdBy": "sasboot",
"modifiedTimeStamp": "2019-08-24T14:15:22.000Z",
"modifiedBy": "anonymous",
"id": "22222222-2222-2222-2222-222222222222",
"name": "template2",
"description": "Description for template",
"product": "default",
"tenant": "default",
"data": "YmFzZTY0IGVuY29kZWQgdGVtcGxhdGUgZGF0YSwgdGhpcyBpcyBub3QgYSB2YWxpZCB0ZW1wbGF0ZQo=",
"fileID": "22222222-2222-2222-2222-222222222222",
"operation": "create",
"status": "pending"
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionMessageSchema/templates",
"uri": "/detectionMessageSchema/templates",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message.schema.template"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionMessageSchema/templates?start=0&limit=100",
"uri": "/detectionMessageSchema/templates?start=0&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message.schema.template"
}
]
}
{
"version": 2,
"accept": "application/vnd.sas.detection.message.schema.template",
"count": 2,
"start": 0,
"limit": 100,
"name": "templates",
"items": [
{
"creationTimeStamp": "2019-08-24T14:15:22.000Z",
"createdBy": "sasboot",
"modifiedTimeStamp": "2019-08-24T14:15:22.000Z",
"modifiedBy": "sasboot",
"id": "11111111-1111-1111-1111-111111111111",
"name": "template1",
"description": "delete msgfromtemplate message",
"product": "default",
"tenant": "default",
"data": "YmFzZTY0IGVuY29kZWQgdGVtcGxhdGUgZGF0YSwgdGhpcyBpcyBub3QgYSB2YWxpZCB0ZW1wbGF0ZQo=",
"fileID": "11111111-1111-1111-1111-111111111111",
"operation": "delete",
"status": "applied"
},
{
"creationTimeStamp": "2019-08-24T14:15:22.000Z",
"createdBy": "sasboot",
"modifiedTimeStamp": "2019-08-24T14:15:22.000Z",
"modifiedBy": "anonymous",
"id": "22222222-2222-2222-2222-222222222222",
"name": "template2",
"description": "Description for template",
"product": "default",
"tenant": "default",
"data": "YmFzZTY0IGVuY29kZWQgdGVtcGxhdGUgZGF0YSwgdGhpcyBpcyBub3QgYSB2YWxpZCB0ZW1wbGF0ZQo=",
"fileID": "22222222-2222-2222-2222-222222222222",
"operation": "create",
"status": "pending"
}
],
"links": [
{
"method": "GET",
"rel": "collection",
"href": "/detectionMessageSchema/templates",
"uri": "/detectionMessageSchema/templates",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message.schema.template"
},
{
"method": "GET",
"rel": "self",
"href": "/detectionMessageSchema/templates?start=0&limit=100",
"uri": "/detectionMessageSchema/templates?start=0&limit=100",
"type": "application/vnd.sas.collection",
"itemType": "application/vnd.sas.detection.message.schema.template"
}
]
}
Get All error 400 Response Example
{
"httpStatusCode": 400,
"errorCode": 1125,
"message": "The start parameter must be greater or equal to zero.",
"details": [
"path: /detectionMessageSchema/templates",
"correlator: 4af977bb-eb45-42ff-b8c1-0438e7af050a"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | List of templates. | templateSummaryCollection |
400 | Bad Request | Bad request. | Inline |
Response Schema
Status Code 400
Error
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 | [#/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [messageSummaryCollection/allOf/0/properties/links/items] | false | none | The links that apply to the error. |
»» Link | messageSummaryCollection/allOf/0/properties/links/items | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Last-Modified | string | Data and Time of last modification. | |
400 | Last-Modified | string | Data and Time of last modification. |
Apply an existing template change to an instance
Code samples
# You can also use wget
curl -X POST http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/templates/{templateId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.sas.detection.message.schema.template.summary+json'
const inputBody = '{}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/vnd.sas.detection.message.schema.template.summary+json'
};
fetch('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/templates/{templateId}',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/vnd.sas.detection.message.schema.template.summary+json'
}
r = requests.post('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/templates/{templateId}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/vnd.sas.detection.message.schema.template.summary+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/templates/{templateId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /templates/{templateId}
This endpoint applies the template with given templateId and applies the changes specified to the instances named in the template. Changes will only be applied to message schemas in 'Developing' state.
Body parameter
{}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
templateId | path | string | true | This is the UUID identifier of the existing template |
Example responses
Template Summary Example
{
"id": "55555555-5555-5555-5555-555555555555",
"fileId": "44444444-4444-4444-4444-444444444444",
"creationTimeStamp": "2019-08-24T14:15:22.000Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22.000Z",
"modifiedBy": "string",
"version": 1,
"name": "string",
"description": "string",
"tenant": "default",
"product": "default",
"operation": "create",
"status": "pending",
"data": "VGhpcyBpcyBub3QgYSB2YWxpZCB0ZW1wbGF0ZSwganVzdCBzYW1wbGUgYmFzZTY0IGVuY29kZWQgZGF0YQo="
}
{
"id": "55555555-5555-5555-5555-555555555555",
"fileId": "44444444-4444-4444-4444-444444444444",
"creationTimeStamp": "2019-08-24T14:15:22.000Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22.000Z",
"modifiedBy": "string",
"version": 1,
"name": "string",
"description": "string",
"tenant": "default",
"product": "default",
"operation": "create",
"status": "pending",
"data": "VGhpcyBpcyBub3QgYSB2YWxpZCB0ZW1wbGF0ZSwganVzdCBzYW1wbGUgYmFzZTY0IGVuY29kZWQgZGF0YQo="
}
{
"id": "55555555-5555-5555-5555-555555555555",
"fileId": "44444444-4444-4444-4444-444444444444",
"creationTimeStamp": "2019-08-24T14:15:22.000Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22.000Z",
"modifiedBy": "string",
"version": 1,
"name": "string",
"description": "string",
"tenant": "default",
"product": "default",
"operation": "create",
"status": "pending",
"data": "VGhpcyBpcyBub3QgYSB2YWxpZCB0ZW1wbGF0ZSwganVzdCBzYW1wbGUgYmFzZTY0IGVuY29kZWQgZGF0YQo="
}
{
"id": "55555555-5555-5555-5555-555555555555",
"fileId": "44444444-4444-4444-4444-444444444444",
"creationTimeStamp": "2019-08-24T14:15:22.000Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22.000Z",
"modifiedBy": "string",
"version": 1,
"name": "string",
"description": "string",
"tenant": "default",
"product": "default",
"operation": "create",
"status": "pending",
"data": "VGhpcyBpcyBub3QgYSB2YWxpZCB0ZW1wbGF0ZSwganVzdCBzYW1wbGUgYmFzZTY0IGVuY29kZWQgZGF0YQo="
}
Apply Template 400 Response Example
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"NameWith!_IsInvalid\" for the field \"Name\" is invalid. Only the following characters are allowed: A-Z,a-z,0-9,_,space.",
"details": [
"value: NameWith!_IsInvalid",
"allowedCharacters: A-Z,a-z,0-9,_,space",
"messageID: detection-lib-api-icu.validation.invalid.value.with.allowed.chars.msg",
"field: Name",
"path: /detectionMessageSchema/templates",
"correlator: c8be69b7-c0b5-470e-9265-f588086021ed"
]
}
{
"version": 2,
"httpStatusCode": 400,
"errorCode": 1000002,
"message": "The value \"NameWith!_IsInvalid\" for the field \"Name\" is invalid. Only the following characters are allowed: A-Z,a-z,0-9,_,space.",
"details": [
"value: NameWith!_IsInvalid",
"allowedCharacters: A-Z,a-z,0-9,_,space",
"messageID: detection-lib-api-icu.validation.invalid.value.with.allowed.chars.msg",
"field: Name",
"path: /detectionMessageSchema/templates",
"correlator: c8be69b7-c0b5-470e-9265-f588086021ed"
]
}
Apply Template 409 Response Example
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000017,
"message": "An identical template already exists.",
"details": [
"Name: createmsg",
"messageID: detection-message-schema-api-icu.template.already.exists.msg",
"path: /detectionMessageSchema/templates",
"correlator: d637c80a-86f6-468b-b06c-b15c7936b8ce"
]
}
{
"version": 2,
"httpStatusCode": 409,
"errorCode": 1000017,
"message": "An identical template already exists.",
"details": [
"Name: createmsg",
"messageID: detection-message-schema-api-icu.template.already.exists.msg",
"path: /detectionMessageSchema/templates",
"correlator: d637c80a-86f6-468b-b06c-b15c7936b8ce"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Applied | templateSummary |
201 | Created | Applied | templateSummary |
400 | Bad Request | The request was invalid. Reasons may be invalid data or structure in the request body`. | Inline |
409 | Conflict | There is a conflict with an existing resource. Possible Reason(s): |
- The template already exists and is applied
- A Developing
message schema revision already exists
- A message schema wth the same name
already exists|Inline|
Response Schema
Status Code 400
Error
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 | [#/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [messageSummaryCollection/allOf/0/properties/links/items] | false | none | The links that apply to the error. |
»» Link | messageSummaryCollection/allOf/0/properties/links/items | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Status Code 409
Error
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 | [#/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema] | false | none | Any additional errors that occurred. |
»» Error | #/paths/~1/get/responses/404/content/application~1vnd.sas.error%2Bjson/schema | false | none | The representation of an error. |
» links | [messageSummaryCollection/allOf/0/properties/links/items] | false | none | The links that apply to the error. |
»» Link | messageSummaryCollection/allOf/0/properties/links/items | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | true | none | The version number of the error representation. This representation is version 2. |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Etag | string | An hash-code for the response resource. | |
200 | Last-Modified | string | Data and Time of last modification. | |
200 | Location | string | Location of URI for the endpoint. | |
201 | Etag | string | An hash-code for the response resource. | |
201 | Last-Modified | string | Data and Time of last modification. | |
201 | Location | string | Location of URI for the endpoint. |
Delete a template
Code samples
# You can also use wget
curl -X DELETE http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/templates/{templateId}
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/templates/{templateId}',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.delete('http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/templates/{templateId}')
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "http://mock-detectionMessageSchema.apifirst.unx.sas.com/detectionMessageSchema/templates/{templateId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /templates/{templateId}
Delete a template. Deleting an applied template has no effect on any instances that have been created or updated by the applied template.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
templateId | path | string | true | This is the UUID identifier of the existing template |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | The template was deleted. | None |
400 | Bad Request | The request is malformed. | None |
Schemas
tag
{
"name": "string",
"value": "string"
}
Tag
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | true | none | The property name of the tag. |
value | string | false | none | The property value of the tag |
message
{
"tags": [
{
"name": "string",
"value": "string"
}
],
"name": "string",
"displayName": "string",
"description": "string",
"type": "financial",
"state": "Developing",
"revision": 0,
"id": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"parentMsgCnt": 0,
"memberMsgCnt": 0,
"semVersion": "string",
"committedSemVersion": "string",
"version": 1
}
Message
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
tags | [object] | false | none | An array of message tags. |
» Tag | object | false | none | A property associated to a message, variable set or variable. |
»» name | string | true | none | The property name of the tag. |
»» value | string | false | none | The property value of the tag |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | any | false | none | An update request representation for a message. |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» anonymous | object | false | none | A create request representation for a message. |
»» name | string | true | none | Name of the message schema. The name of the message cannot be modified once assigned. Allowed characters are letters, numbers, underscores, and whitespaces. |
»» displayName | string | false | none | This is a general purpose name for the message that can be modified. Defaults to the name if not provided. |
»» description | string | false | none | The purpose of the message schema |
»» type | string | true | none | The kind of message schema defined that can be used for categorization. Potential values could be:banking , insurance , payments , or healthcare The subtype allows only lowercase alphanumeric characters. It will be automatically converted to lowercase. |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» anonymous | object | false | none | none |
»» state | string | false | none | The state reflects the capabilities that are allowed on the message schema. The supplied value is case-insensitive.Deployed is a state that represents the message schema has been published successfully and is immutable.Developing is a state that represents the message schema is undergoing modifications. There can only be one "developing" version active.Deployment-Ready is a state that represents the message schema allows limited changes and intended to be deployed. |
»» revision | integer | true | none | The last revision update to the message. This a number that is used for database optimistic locking during concurrent requests. Each time an update occurs the value is incremented. It must be provided for performing PATCH updates only. This number is independent of the multiple revisions of a schema. |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | any | false | none | A summary representation of a message |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» anonymous | message/allOf/0 | false | none | An update request representation for a message. |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» anonymous | object | false | none | none |
»» id | string | false | none | The identifier of the message. |
»» creationTimeStamp | string(date-time) | false | none | The creation timestamp of a message |
»» createdBy | string | false | none | The user who created the message |
»» modifiedTimeStamp | string(date-time) | false | none | The last modified timestamp of the message |
»» modifiedBy | string | false | none | The last user who modified the message |
»» parentMsgCnt | integer | false | none | The number of message schemas that owns this message schema |
»» memberMsgCnt | integer | false | none | The number of message schemas owned by this message schema |
»» semVersion | string | false | none | The semantic version of the schema representing pending changes in developing state |
»» committedSemVersion | string | false | none | The semantic version of the schema with committed changes in deployed state |
»» version | integer | false | none | The representation version of a message |
Enumerated Values
Property | Value |
---|---|
state | Developing |
state | Deployed |
state | Deployment-Ready |
messageType
{
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"type": "financial"
}
Message Type
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
creationTimeStamp | string(date-time) | false | none | The creation timestamp of a message |
modifiedTimeStamp | string(date-time) | false | none | The last modified timestamp of the message |
type | string | false | none | The kind of message schema defined that can be used for categorization. Potential values could be:banking , insurance , payments , or healthcare The subtype allows only lowercase alphanumeric characters. It will be automatically converted to lowercase. |
maskingType
{
"id": "string",
"name": "string",
"example": "string"
}
Masking Type
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | ID of masking type. |
name | string | false | none | Name of masking type. |
example | string | false | none | Example for the masking type. |
variableSet
{
"name": "string",
"displayName": "string",
"type": "object",
"description": "string",
"private": false,
"required": false,
"deprecated": false,
"tags": [
{
"name": "string",
"value": "string"
}
],
"maxItems": 10,
"variableSets": [
{
"name": "string",
"displayName": "string",
"type": "object",
"description": "string",
"private": false,
"required": false,
"deprecated": false,
"tags": [
{
"name": "string",
"value": "string"
}
],
"maxItems": 10
}
],
"revision": 0,
"parentId": "string",
"id": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"version": 1,
"childCount": 0,
"messageId": "string"
}
VariableSet
Properties
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | A Variable Set represents a container of other Variable Sets or Variables within a message schema. |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» anonymous | object | false | none | A Variable Set represents a container of other Variable Sets or Variables within a message schema. |
»» name | string | false | none | The name of the variable set. Letters, numbers, and underscores are allowed only. |
»» displayName | string | false | none | This is a general purpose name for the variable set. Defaults to the name if not provided. |
»» type | string | false | none | The type represents if the variable set is an object or an array of objects. |
»» description | string | false | none | The purpose of the variable set |
»» private | boolean | false | none | A private variable set can only be modified or deleted by prescribed templates. All dependents of the variable sets including variables are private. |
»» required | boolean | false | none | This variable set is required if set to true |
»» deprecated | boolean | false | none | This variable set should not be used as it may be removed in the future. |
»» tags | [object] | false | none | An array of variable tags. |
»»» Tag | object | false | none | A property associated to a message, variable set or variable. |
»»»» name | string | true | none | The property name of the tag. |
»»»» value | string | false | none | The property value of the tag |
»» maxItems | integer | false | none | The maximum number of items that are allowed for type array . A value of 0 signifies unbounded. |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» anonymous | object | false | none | none |
»» variableSets | [variableSet/allOf/0/allOf/0] | false | none | An array of nested variable sets. |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | any | false | none | A summary representation of a variable set |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» anonymous | object | false | none | An update request representation for a variable set. |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»» anonymous | variableSet/allOf/0/allOf/0 | false | none | A Variable Set represents a container of other Variable Sets or Variables within a message schema. |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»» anonymous | object | false | none | none |
»»» revision | integer | false | none | The last revision update to the variable set. This a number that is used for database optimistic locking during concurrent requests. Each time an update occurs the value is incremented. It must be provided for performing PATCH updates only. This number is independent of the multiple revisions of a schema. |
»»» parentId | string | false | none | This is an identifier (in uuid) for the parent variable set. This parameter is ignored on a POST since it is a parameter on the URL. |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» anonymous | object | false | none | none |
»» id | string | false | none | The identifier of the variable set. |
»» creationTimeStamp | string(date-time) | false | none | The creation timestamp of a variable set |
»» createdBy | string | false | none | The user who created the variable set |
»» modifiedTimeStamp | string(date-time) | false | none | The last modified timestamp of the variable set |
»» modifiedBy | string | false | none | The last user who modified the variable set |
»» version | integer | false | none | The representation version of a variable set |
»» childCount | integer | false | none | The number of child variable sets |
»» messageId | string | false | none | This is an identifier (in uuid) for the related message schema. If the property is provided in the request body it will be ignored on updates. |
Enumerated Values
Property | Value |
---|---|
type | object |
type | array |
variableSetProperties
{
"name": "string",
"displayName": "string",
"type": "object",
"description": "string",
"private": false,
"required": false,
"deprecated": false,
"tags": [
{
"name": "string",
"value": "string"
}
],
"maxItems": 10
}
VariableSetProperties
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | false | none | The name of the variable set. Letters, numbers, and underscores are allowed only. |
displayName | string | false | none | This is a general purpose name for the variable set. Defaults to the name if not provided. |
type | string | false | none | The type represents if the variable set is an object or an array of objects. |
description | string | false | none | The purpose of the variable set |
private | boolean | false | none | A private variable set can only be modified or deleted by prescribed templates. All dependents of the variable sets including variables are private. |
required | boolean | false | none | This variable set is required if set to true |
deprecated | boolean | false | none | This variable set should not be used as it may be removed in the future. |
tags | [object] | false | none | An array of variable tags. |
» Tag | object | false | none | A property associated to a message, variable set or variable. |
»» name | string | true | none | The property name of the tag. |
»» value | string | false | none | The property value of the tag |
maxItems | integer | false | none | The maximum number of items that are allowed for type array . A value of 0 signifies unbounded. |
Enumerated Values
Property | Value |
---|---|
type | object |
type | array |
variable
{
"name": "string",
"displayName": "string",
"type": "array",
"description": "string",
"tags": [
{
"name": "string",
"value": "string"
}
],
"version": 1,
"minLength": 0,
"maxLength": 0,
"enumValues": [
"string"
],
"enumURI": "string",
"minimum": 0,
"maximum": 0,
"inclusiveMinimum": true,
"exclusiveMaximum": true,
"arrayItem": "none",
"minItems": 0,
"maxItems": 0,
"required": false,
"deprecated": false,
"private": false,
"access": "rw",
"isMissing": false,
"defaultValue": "",
"locked": true,
"userGroup": "DMSDefault",
"featureExpr": {
"window": {
"type": "array",
"length": 0,
"timeISOPeriod": "string",
"timeVarFQName": "string",
"timeVarSchemaName": "string"
},
"aggregator": {
"funcName": "none",
"varFQName": "string",
"varSchemaName": "string"
},
"filter": {
"expression": []
}
},
"revision": 0,
"id": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"variableSetId": "string",
"jsonPath": "string",
"messageName": "string"
}
Variable
Properties
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | A create request representation for a variable. |
» name | string | true | none | The name of the variable. Letters, numbers and underscores are allowed only. |
» displayName | string | false | none | This is a general purpose name for the variable. Defaults to the name if not provided. |
» type | string | true | none | The primitive data type of the variable. Please refer to Data Types section for limits. |
» description | string | false | none | The purpose of the variable |
» tags | [object] | false | none | An array of variable tags. |
»» Tag | object | false | none | A property associated to a message, variable set or variable. |
»»» name | string | true | none | The property name of the tag. |
»»» value | string | false | none | The property value of the tag |
» version | integer | false | none | The minimum and maximum version supported. Enables future version support such as version 1 and 2 |
» minLength | integer | false | none | The minimum length of a string |
» maxLength | integer | false | none | The maximum length of a string |
» enumValues | [string] | false | none | A pre-defined set of valid values. Use it for enumerations no more than 20. |
» enumURI | string | false | none | An external reference URI of a large set of enumerated values. |
» minimum | number | false | none | A minimum value for a number. |
» maximum | number | false | none | A maximum value for a number. |
» inclusiveMinimum | boolean | false | none | A value of true represents the minimum value is inclusive. |
» exclusiveMaximum | boolean | false | none | A value of true represents the maximum value is exclusive. |
» arrayItem | string | false | none | The type for an array. |
» minItems | integer | false | none | The minimum number of items in the array |
» maxItems | integer | false | none | The maximum number of items in the array |
» required | boolean | false | none | This variable is required if set to true |
» deprecated | boolean | false | none | This variable is should not be used as it may be removed in the future when true . |
» private | boolean | false | none | This variable neither can be modified nor deleted when true .They can only be modified by prescribed templates. |
» access | string | false | none | The read-write access allowed on the variable's value.na - Not-Applicable. This variable is a blackbox whose value cannot be read nor modified by SAS.rw - Read-Write. This variable's value can be read and modified.ro - Read-Only. This variable's value cannot be modified. |
» isMissing | boolean | false | none | This signifies missing value. Only applies to numeric types. |
» defaultValue | string | false | none | This is the default or initial value of the variable. Only applies to string and numeric types. |
» locked | boolean | false | none | That flag provides external clients with more control to disallow any modification until unlocked. This is managed primarily by an external client. |
» userGroup | string | false | none | The users in the user group can only operate on this variable. The custom group DMSDefault implicitlyapplies to all users. Other specialization are users in the DMSViewer can view all variables in any group.Users in the DMSAdmin can read and update any variable. |
» featureExpr | object | false | none | This object represents the calculation used to determine the value of the variable. |
»» window | object | false | none | A time-based or an array-based windowing calculation |
»»» type | string | false | none | A type of windowing to be used |
»»» length | integer | false | none | The length of the array window |
»»» timeISOPeriod | string | false | none | The time span and unit of the time-based window specified in |
»»» timeVarFQName | string | false | none | A fully qualified variable name that is of Timestamp type. |
»»» timeVarSchemaName | string | false | none | The name of the schema that the variable defined in timeVarFQName |
»» aggregator | object | false | none | This object defines the aggregation used for calculating the variable. |
»»» funcName | string | false | none | An aggregation function name used for this calculated variable. |
»»» varFQName | string | false | none | A fully qualified variable name that is used by the aggregation function. |
»»» varSchemaName | string | false | none | The name of the schema that the variable defined in varFQName |
»» filter | object | false | none | This object defines the expression used for pre-filtering. |
»»» expression | array | false | none | A list of expressions |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | any | false | none | A summary representation of a variable. |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» anonymous | object | false | none | An update request representation for a variable. |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»» anonymous | variable/allOf/0 | false | none | A create request representation for a variable. |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»» anonymous | object | false | none | none |
»»» revision | integer | false | none | The last revision update to the variable. This a number that is used for database optimistic locking during concurrent requests. Each time an update occurs the value is incremented. It must be provided for performing PATCH updates only. This number is independent of the multiple revisions of a schema. |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» anonymous | object | false | none | none |
»» id | string | false | none | The identifier of the variable. |
»» creationTimeStamp | string(date-time) | false | none | The creation timestamp of a variable |
»» createdBy | string | false | none | The user who created the variable |
»» modifiedTimeStamp | string(date-time) | false | none | The last modified timestamp of the variable |
»» modifiedBy | string | false | none | The last user who modified the variable. |
»» variableSetId | string | false | none | This is an identifier (in uuid) for the variable set. |
»» jsonPath | string | false | none | This represents the jsonpath expression to uniquely identify the variable. |
»» messageName | string | false | none | The name of the message for this variable. |
Enumerated Values
Property | Value |
---|---|
type | array |
type | string |
type | number |
type | integer |
type | bigint |
type | currency |
type | boolean |
type | timestamp |
type | epochMillis |
type | sasdatetime |
arrayItem | none |
arrayItem | string |
arrayItem | integer |
arrayItem | number |
arrayItem | boolean |
arrayItem | byte |
arrayItem | epochMillis |
arrayItem | timestamp |
arrayItem | currency |
arrayItem | bigint |
arrayItem | sasdatetime |
access | na |
access | rw |
access | ro |
type | array |
type | time |
funcName | none |
funcName | sum |
funcName | min |
funcName | max |
funcName | count |
variableRelation
{
"id": "string",
"version": 1,
"name": "string",
"pathName": "string",
"messageName": "string"
}
Variable Relation
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | The identifier of a variable relation |
version | integer | false | none | The representation version of a message |
name | string | true | none | The property name of the variable |
pathName | string | true | none | The json path to a variable |
messageName | string | true | none | The message schema name |
variableSetRelation
{
"version": 1,
"variableRelations": [
{
"id": "string",
"version": 1,
"name": "string",
"pathName": "string",
"messageName": "string"
}
]
}
VariableSet Relation
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
version | integer | false | none | The representation version of a message |
variableRelations | [object] | false | none | An array of variable relations |
» Variable Relation | object | false | none | Relationships associated to a Variable Set to a set of Variables. |
»» id | string | false | none | The identifier of a variable relation |
»» version | integer | false | none | The representation version of a message |
»» name | string | true | none | The property name of the variable |
»» pathName | string | true | none | The json path to a variable |
»» messageName | string | true | none | The message schema name |
messageRelationSet
{
"version": 1,
"messageRelations": [
{
"id": "string",
"messageId": "string",
"version": 1,
"messageName": "string"
}
]
}
Message Relation Set
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
version | integer | false | none | The representation version of a message relation set |
messageRelations | [allOf] | false | none | An array of message relations |
» Message Relation | object | false | none | A single message relationship |
»» id | string | false | none | The identifier of a message relation |
»» messageId | string | false | none | The component message schema id |
messageRelation
{
"id": "string",
"messageId": "string",
"version": 1,
"messageName": "string"
}
A single message relationship
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | The identifier of a message relation |
messageId | string | false | none | The component message schema id |
messageSummary
{
"name": "string",
"displayName": "string",
"description": "string",
"type": "financial",
"state": "Developing",
"revision": 0,
"id": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"parentMsgCnt": 0,
"memberMsgCnt": 0,
"semVersion": "string",
"committedSemVersion": "string",
"version": 1
}
MessageSummary
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
MessageSummary | any | false | none | A summary representation of a message |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | any | false | none | An update request representation for a message. |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» anonymous | object | false | none | A create request representation for a message. |
»» name | string | true | none | Name of the message schema. The name of the message cannot be modified once assigned. Allowed characters are letters, numbers, underscores, and whitespaces. |
»» displayName | string | false | none | This is a general purpose name for the message that can be modified. Defaults to the name if not provided. |
»» description | string | false | none | The purpose of the message schema |
»» type | string | true | none | The kind of message schema defined that can be used for categorization. Potential values could be:banking , insurance , payments , or healthcare The subtype allows only lowercase alphanumeric characters. It will be automatically converted to lowercase. |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» anonymous | object | false | none | none |
»» state | string | false | none | The state reflects the capabilities that are allowed on the message schema. The supplied value is case-insensitive.Deployed is a state that represents the message schema has been published successfully and is immutable.Developing is a state that represents the message schema is undergoing modifications. There can only be one "developing" version active.Deployment-Ready is a state that represents the message schema allows limited changes and intended to be deployed. |
»» revision | integer | true | none | The last revision update to the message. This a number that is used for database optimistic locking during concurrent requests. Each time an update occurs the value is incremented. It must be provided for performing PATCH updates only. This number is independent of the multiple revisions of a schema. |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» id | string | false | none | The identifier of the message. |
» creationTimeStamp | string(date-time) | false | none | The creation timestamp of a message |
» createdBy | string | false | none | The user who created the message |
» modifiedTimeStamp | string(date-time) | false | none | The last modified timestamp of the message |
» modifiedBy | string | false | none | The last user who modified the message |
» parentMsgCnt | integer | false | none | The number of message schemas that owns this message schema |
» memberMsgCnt | integer | false | none | The number of message schemas owned by this message schema |
» semVersion | string | false | none | The semantic version of the schema representing pending changes in developing state |
» committedSemVersion | string | false | none | The semantic version of the schema with committed changes in deployed state |
» version | integer | false | none | The representation version of a message |
Enumerated Values
Property | Value |
---|---|
state | Developing |
state | Deployed |
state | Deployment-Ready |
variableSetSummary
{
"name": "string",
"displayName": "string",
"type": "object",
"description": "string",
"private": false,
"required": false,
"deprecated": false,
"tags": [
{
"name": "string",
"value": "string"
}
],
"maxItems": 10,
"revision": 0,
"parentId": "string",
"id": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"version": 1,
"childCount": 0,
"messageId": "string"
}
VariableSetSummary
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
VariableSetSummary | any | false | none | A summary representation of a variable set |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | An update request representation for a variable set. |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» anonymous | object | false | none | A Variable Set represents a container of other Variable Sets or Variables within a message schema. |
»» name | string | false | none | The name of the variable set. Letters, numbers, and underscores are allowed only. |
»» displayName | string | false | none | This is a general purpose name for the variable set. Defaults to the name if not provided. |
»» type | string | false | none | The type represents if the variable set is an object or an array of objects. |
»» description | string | false | none | The purpose of the variable set |
»» private | boolean | false | none | A private variable set can only be modified or deleted by prescribed templates. All dependents of the variable sets including variables are private. |
»» required | boolean | false | none | This variable set is required if set to true |
»» deprecated | boolean | false | none | This variable set should not be used as it may be removed in the future. |
»» tags | [object] | false | none | An array of variable tags. |
»»» Tag | object | false | none | A property associated to a message, variable set or variable. |
»»»» name | string | true | none | The property name of the tag. |
»»»» value | string | false | none | The property value of the tag |
»» maxItems | integer | false | none | The maximum number of items that are allowed for type array . A value of 0 signifies unbounded. |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» anonymous | object | false | none | none |
»» revision | integer | false | none | The last revision update to the variable set. This a number that is used for database optimistic locking during concurrent requests. Each time an update occurs the value is incremented. It must be provided for performing PATCH updates only. This number is independent of the multiple revisions of a schema. |
»» parentId | string | false | none | This is an identifier (in uuid) for the parent variable set. This parameter is ignored on a POST since it is a parameter on the URL. |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» id | string | false | none | The identifier of the variable set. |
» creationTimeStamp | string(date-time) | false | none | The creation timestamp of a variable set |
» createdBy | string | false | none | The user who created the variable set |
» modifiedTimeStamp | string(date-time) | false | none | The last modified timestamp of the variable set |
» modifiedBy | string | false | none | The last user who modified the variable set |
» version | integer | false | none | The representation version of a variable set |
» childCount | integer | false | none | The number of child variable sets |
» messageId | string | false | none | This is an identifier (in uuid) for the related message schema. If the property is provided in the request body it will be ignored on updates. |
Enumerated Values
Property | Value |
---|---|
type | object |
type | array |
variableSummary
{
"name": "string",
"displayName": "string",
"type": "array",
"description": "string",
"tags": [
{
"name": "string",
"value": "string"
}
],
"version": 1,
"minLength": 0,
"maxLength": 0,
"enumValues": [
"string"
],
"enumURI": "string",
"minimum": 0,
"maximum": 0,
"inclusiveMinimum": true,
"exclusiveMaximum": true,
"arrayItem": "none",
"minItems": 0,
"maxItems": 0,
"required": false,
"deprecated": false,
"private": false,
"access": "rw",
"isMissing": false,
"defaultValue": "",
"locked": true,
"userGroup": "DMSDefault",
"featureExpr": {
"window": {
"type": "array",
"length": 0,
"timeISOPeriod": "string",
"timeVarFQName": "string",
"timeVarSchemaName": "string"
},
"aggregator": {
"funcName": "none",
"varFQName": "string",
"varSchemaName": "string"
},
"filter": {
"expression": []
}
},
"revision": 0,
"id": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"variableSetId": "string",
"jsonPath": "string",
"messageName": "string"
}
VariableSummary
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
VariableSummary | any | false | none | A summary representation of a variable. |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | An update request representation for a variable. |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» anonymous | object | false | none | A create request representation for a variable. |
»» name | string | true | none | The name of the variable. Letters, numbers and underscores are allowed only. |
»» displayName | string | false | none | This is a general purpose name for the variable. Defaults to the name if not provided. |
»» type | string | true | none | The primitive data type of the variable. Please refer to Data Types section for limits. |
»» description | string | false | none | The purpose of the variable |
»» tags | [object] | false | none | An array of variable tags. |
»»» Tag | object | false | none | A property associated to a message, variable set or variable. |
»»»» name | string | true | none | The property name of the tag. |
»»»» value | string | false | none | The property value of the tag |
»» version | integer | false | none | The minimum and maximum version supported. Enables future version support such as version 1 and 2 |
»» minLength | integer | false | none | The minimum length of a string |
»» maxLength | integer | false | none | The maximum length of a string |
»» enumValues | [string] | false | none | A pre-defined set of valid values. Use it for enumerations no more than 20. |
»» enumURI | string | false | none | An external reference URI of a large set of enumerated values. |
»» minimum | number | false | none | A minimum value for a number. |
»» maximum | number | false | none | A maximum value for a number. |
»» inclusiveMinimum | boolean | false | none | A value of true represents the minimum value is inclusive. |
»» exclusiveMaximum | boolean | false | none | A value of true represents the maximum value is exclusive. |
»» arrayItem | string | false | none | The type for an array. |
»» minItems | integer | false | none | The minimum number of items in the array |
»» maxItems | integer | false | none | The maximum number of items in the array |
»» required | boolean | false | none | This variable is required if set to true |
»» deprecated | boolean | false | none | This variable is should not be used as it may be removed in the future when true . |
»» private | boolean | false | none | This variable neither can be modified nor deleted when true .They can only be modified by prescribed templates. |
»» access | string | false | none | The read-write access allowed on the variable's value.na - Not-Applicable. This variable is a blackbox whose value cannot be read nor modified by SAS.rw - Read-Write. This variable's value can be read and modified.ro - Read-Only. This variable's value cannot be modified. |
»» isMissing | boolean | false | none | This signifies missing value. Only applies to numeric types. |
»» defaultValue | string | false | none | This is the default or initial value of the variable. Only applies to string and numeric types. |
»» locked | boolean | false | none | That flag provides external clients with more control to disallow any modification until unlocked. This is managed primarily by an external client. |
»» userGroup | string | false | none | The users in the user group can only operate on this variable. The custom group DMSDefault implicitlyapplies to all users. Other specialization are users in the DMSViewer can view all variables in any group.Users in the DMSAdmin can read and update any variable. |
»» featureExpr | object | false | none | This object represents the calculation used to determine the value of the variable. |
»»» window | object | false | none | A time-based or an array-based windowing calculation |
»»»» type | string | false | none | A type of windowing to be used |
»»»» length | integer | false | none | The length of the array window |
»»»» timeISOPeriod | string | false | none | The time span and unit of the time-based window specified in |
»»»» timeVarFQName | string | false | none | A fully qualified variable name that is of Timestamp type. |
»»»» timeVarSchemaName | string | false | none | The name of the schema that the variable defined in timeVarFQName |
»»» aggregator | object | false | none | This object defines the aggregation used for calculating the variable. |
»»»» funcName | string | false | none | An aggregation function name used for this calculated variable. |
»»»» varFQName | string | false | none | A fully qualified variable name that is used by the aggregation function. |
»»»» varSchemaName | string | false | none | The name of the schema that the variable defined in varFQName |
»»» filter | object | false | none | This object defines the expression used for pre-filtering. |
»»»» expression | array | false | none | A list of expressions |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» anonymous | object | false | none | none |
»» revision | integer | false | none | The last revision update to the variable. This a number that is used for database optimistic locking during concurrent requests. Each time an update occurs the value is incremented. It must be provided for performing PATCH updates only. This number is independent of the multiple revisions of a schema. |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» id | string | false | none | The identifier of the variable. |
» creationTimeStamp | string(date-time) | false | none | The creation timestamp of a variable |
» createdBy | string | false | none | The user who created the variable |
» modifiedTimeStamp | string(date-time) | false | none | The last modified timestamp of the variable |
» modifiedBy | string | false | none | The last user who modified the variable. |
» variableSetId | string | false | none | This is an identifier (in uuid) for the variable set. |
» jsonPath | string | false | none | This represents the jsonpath expression to uniquely identify the variable. |
» messageName | string | false | none | The name of the message for this variable. |
Enumerated Values
Property | Value |
---|---|
type | array |
type | string |
type | number |
type | integer |
type | bigint |
type | currency |
type | boolean |
type | timestamp |
type | epochMillis |
type | sasdatetime |
arrayItem | none |
arrayItem | string |
arrayItem | integer |
arrayItem | number |
arrayItem | boolean |
arrayItem | byte |
arrayItem | epochMillis |
arrayItem | timestamp |
arrayItem | currency |
arrayItem | bigint |
arrayItem | sasdatetime |
access | na |
access | rw |
access | ro |
type | array |
type | time |
funcName | none |
funcName | sum |
funcName | min |
funcName | max |
funcName | count |
messageOps
{
"ops": [
{
"id": "string",
"op": "copy",
"name": "string",
"state": "Developing",
"newname": "string"
}
],
"newname": "string"
}
A set of operators for copying a message
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
ops | [allOf] | false | none | none |
» id | string | false | none | The identifier for the component schema to operate. If id is not provided then name and state is used |
createTemplate
{
"message": {
"operation": "create",
"variables": [
{
"operation": "create",
"name": "string",
"displayName": "string",
"type": "array",
"description": "string",
"tags": [
{
"name": "string",
"value": "string"
}
],
"version": 1,
"minLength": 0,
"maxLength": 0,
"enumValues": [
"string"
],
"enumURI": "string",
"minimum": 0,
"maximum": 0,
"inclusiveMinimum": true,
"exclusiveMaximum": true,
"arrayItem": "none",
"minItems": 0,
"maxItems": 0,
"required": false,
"deprecated": false,
"private": false,
"access": "rw",
"isMissing": false,
"defaultValue": "",
"locked": true,
"userGroup": "DMSDefault",
"featureExpr": {
"window": {
"type": "array",
"length": 0,
"timeISOPeriod": "string",
"timeVarFQName": "string",
"timeVarSchemaName": "string"
},
"aggregator": {
"funcName": "none",
"varFQName": "string",
"varSchemaName": "string"
},
"filter": {
"expression": []
}
}
}
],
"variableSets": [
{
"operation": "create",
"variables": [
{
"operation": "create",
"name": "string",
"displayName": "string",
"type": "array",
"description": "string",
"tags": [
{
"name": "string",
"value": "string"
}
],
"version": 1,
"minLength": 0,
"maxLength": 0,
"enumValues": [
"string"
],
"enumURI": "string",
"minimum": 0,
"maximum": 0,
"inclusiveMinimum": true,
"exclusiveMaximum": true,
"arrayItem": "none",
"minItems": 0,
"maxItems": 0,
"required": false,
"deprecated": false,
"private": false,
"access": "rw",
"isMissing": false,
"defaultValue": "",
"locked": true,
"userGroup": "DMSDefault",
"featureExpr": {
"window": {
"type": "array",
"length": 0,
"timeISOPeriod": "string",
"timeVarFQName": "string",
"timeVarSchemaName": "string"
},
"aggregator": {
"funcName": "none",
"varFQName": "string",
"varSchemaName": "string"
},
"filter": {
"expression": []
}
}
}
],
"name": "string",
"displayName": "string",
"type": "object",
"description": "string",
"private": false,
"required": false,
"deprecated": false,
"tags": [
{
"name": "string",
"value": "string"
}
],
"maxItems": 10,
"variableSets": [
{
"name": "string",
"displayName": "string",
"type": "object",
"description": "string",
"private": false,
"required": false,
"deprecated": false,
"tags": [
{
"name": "string",
"value": "string"
}
],
"maxItems": 10
}
]
}
],
"messageRelations": [
{
"operation": "create",
"version": 1,
"messageName": "string"
}
],
"copyOp": {
"ops": [
{
"op": "copy",
"id": "string",
"name": "string",
"state": "Developing",
"newname": "string"
}
],
"state": "Developing",
"newname": "string"
},
"name": "string",
"displayName": "string",
"description": "string",
"type": "financial"
},
"name": "string",
"type": "Custom",
"description": "string",
"tenant": "default",
"product": "default",
"operation": "create"
}
CreateTemplate
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
message | object | true | none | Message Template |
» operation | string | true | none | This indicates which operation a template will perform when applied |
» variables | [allOf] | false | none | none |
»» variableChange | object | false | none | Variable Template |
»»» operation | string | true | none | This indicates which operation a template will perform when applied |
» variableSets | [allOf] | false | none | none |
»» VariableSetChange | object | false | none | Variable Set Template |
»»» operation | string | true | none | This indicates which operation a template will perform when applied |
»»» variables | [allOf] | false | none | none |
» messageRelations | [allOf] | false | none | none |
»» MessageRelationChange | object | false | none | Message Relation Template |
»»» operation | string | true | none | This indicates which operation a template will perform when applied |
» copyOp | messageOps/allOf/0 | false | none | This contains information indicating the message copy's name, as well as how to handle the copying of message relationships. |
»» ops | [allOf] | false | none | none |
»» state | string | true | none | The state of the copy target message. It used for locating the schema along with the name. |
Enumerated Values
Property | Value |
---|---|
operation | create |
operation | put |
operation | patch |
operation | revise |
operation | delete |
operation | copy |
operation | create |
operation | put |
operation | patch |
operation | delete |
operation | create |
operation | put |
operation | patch |
operation | delete |
operation | create |
operation | put |
operation | delete |
state | Developing |
state | Deployed |
state | Deployment-Ready |
templateSummary
{
"id": "string",
"fileId": "string",
"data": "string",
"status": "pending",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"revision": 0,
"version": 1,
"name": "string",
"type": "Custom",
"description": "string",
"tenant": "default",
"product": "default",
"operation": "create"
}
TemplateSummary
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
TemplateSummary | createTemplate/allOf/0 | false | none | A summary representation of a template |
id | string | false | none | The identifier of the template. |
fileId | string | false | none | The identifier of the Viya file resource created upon template creation. |
data | string | false | none | base64 encode string containing all of the template data |
status | string | false | none | indicates whether a template is applied, pending, or an error occurred while applying the template |
creationTimeStamp | string(date-time) | false | none | The creation timestamp of a template |
createdBy | string | false | none | The user who created the template |
modifiedTimeStamp | string(date-time) | false | none | The last modified timestamp of the template |
modifiedBy | string | false | none | The last user who modified the template |
revision | integer | false | none | The last revision update to the template. This a number that is used for database optimistic locking during concurrent requests. The templates themselves are immutable, but when a template apply is attempted, the revision is checked and the template status is updated. |
version | integer | false | none | The representation version of a template |
Enumerated Values
Property | Value |
---|---|
status | pending |
status | applied |
status | error |
template
{
"message": {
"operation": "create",
"variables": [
{
"operation": "create",
"name": "string",
"displayName": "string",
"type": "array",
"description": "string",
"tags": [
{
"name": "string",
"value": "string"
}
],
"version": 1,
"minLength": 0,
"maxLength": 0,
"enumValues": [
"string"
],
"enumURI": "string",
"minimum": 0,
"maximum": 0,
"inclusiveMinimum": true,
"exclusiveMaximum": true,
"arrayItem": "none",
"minItems": 0,
"maxItems": 0,
"required": false,
"deprecated": false,
"private": false,
"access": "rw",
"isMissing": false,
"defaultValue": "",
"locked": true,
"userGroup": "DMSDefault",
"featureExpr": {
"window": {
"type": "array",
"length": 0,
"timeISOPeriod": "string",
"timeVarFQName": "string",
"timeVarSchemaName": "string"
},
"aggregator": {
"funcName": "none",
"varFQName": "string",
"varSchemaName": "string"
},
"filter": {
"expression": []
}
}
}
],
"variableSets": [
{
"operation": "create",
"variables": [
{
"operation": "create",
"name": "string",
"displayName": "string",
"type": "array",
"description": "string",
"tags": [
{
"name": "string",
"value": "string"
}
],
"version": 1,
"minLength": 0,
"maxLength": 0,
"enumValues": [
"string"
],
"enumURI": "string",
"minimum": 0,
"maximum": 0,
"inclusiveMinimum": true,
"exclusiveMaximum": true,
"arrayItem": "none",
"minItems": 0,
"maxItems": 0,
"required": false,
"deprecated": false,
"private": false,
"access": "rw",
"isMissing": false,
"defaultValue": "",
"locked": true,
"userGroup": "DMSDefault",
"featureExpr": {
"window": {
"type": "array",
"length": 0,
"timeISOPeriod": "string",
"timeVarFQName": "string",
"timeVarSchemaName": "string"
},
"aggregator": {
"funcName": "none",
"varFQName": "string",
"varSchemaName": "string"
},
"filter": {
"expression": []
}
}
}
],
"name": "string",
"displayName": "string",
"type": "object",
"description": "string",
"private": false,
"required": false,
"deprecated": false,
"tags": [
{
"name": "string",
"value": "string"
}
],
"maxItems": 10,
"variableSets": [
{
"name": "string",
"displayName": "string",
"type": "object",
"description": "string",
"private": false,
"required": false,
"deprecated": false,
"tags": [
{
"name": "string",
"value": "string"
}
],
"maxItems": 10
}
]
}
],
"messageRelations": [
{
"operation": "create",
"version": 1,
"messageName": "string"
}
],
"copyOp": {
"ops": [
{
"op": "copy",
"id": "string",
"name": "string",
"state": "Developing",
"newname": "string"
}
],
"state": "Developing",
"newname": "string"
},
"name": "string",
"displayName": "string",
"description": "string",
"type": "financial"
},
"name": "string",
"type": "Custom",
"description": "string",
"tenant": "default",
"product": "default",
"operation": "create",
"id": "string",
"fileId": "string",
"data": "string",
"status": "pending",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"revision": 0,
"version": 1
}
Template
Properties
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | createTemplate/allOf/0 | false | none | A request representation for a template. Used to create templates. |
» message | createTemplate/properties/message | true | none | Message Template |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | createTemplate/allOf/0 | false | none | A summary representation of a template |
» id | string | false | none | The identifier of the template. |
» fileId | string | false | none | The identifier of the Viya file resource created upon template creation. |
» data | string | false | none | base64 encode string containing all of the template data |
» status | string | false | none | indicates whether a template is applied, pending, or an error occurred while applying the template |
» creationTimeStamp | string(date-time) | false | none | The creation timestamp of a template |
» createdBy | string | false | none | The user who created the template |
» modifiedTimeStamp | string(date-time) | false | none | The last modified timestamp of the template |
» modifiedBy | string | false | none | The last user who modified the template |
» revision | integer | false | none | The last revision update to the template. This a number that is used for database optimistic locking during concurrent requests. The templates themselves are immutable, but when a template apply is attempted, the revision is checked and the template status is updated. |
» version | integer | false | none | The representation version of a template |
Enumerated Values
Property | Value |
---|---|
status | pending |
status | applied |
status | error |
messageSummaryCollection
{
"name": "string",
"start": 0,
"limit": 0,
"count": 0,
"accept": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0,
"items": [
{
"name": "string",
"displayName": "string",
"description": "string",
"type": "financial",
"state": "Developing",
"revision": 0,
"id": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"parentMsgCnt": 0,
"memberMsgCnt": 0,
"semVersion": "string",
"committedSemVersion": "string",
"version": 1
}
]
}
MessageSummaryCollection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
MessageSummaryCollection | any | false | none | This is a collection of message summary. |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | 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) |
» 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 | [object] | false | none | The links that apply to the collection. |
»» Link | object | false | none | A link to a related operation or resource. |
»»» 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. |
» version | integer | false | none | The version number of the collection representation. This representation is version 2. |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | object | false | none | none |
» items | [messageSummary] | false | none | The actual results of a query |
messageTypeCollection
{
"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": [
{
"creationTimeStamp": "2019-08-24T14:15:22Z",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"type": "financial"
}
]
}
MessageTypeCollection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
MessageTypeCollection | any | false | none | This is a collection of message types |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | messageSummaryCollection/allOf/0 | 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 | [messageType] | false | none | The actual results of a query |
maskingTypeCollection
{
"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": [
{
"id": "string",
"name": "string",
"example": "string"
}
]
}
MaskingTypeCollection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
MaskingTypeCollection | any | false | none | This is a collection of masking types |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | messageSummaryCollection/allOf/0 | 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 | [maskingType] | false | none | The actual results of a query |
variableSetSummaryCollection
{
"name": "string",
"start": 0,
"limit": 0,
"count": 0,
"accept": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0,
"items": [
{
"name": "string",
"displayName": "string",
"type": "object",
"description": "string",
"private": false,
"required": false,
"deprecated": false,
"tags": [
{
"name": "string",
"value": "string"
}
],
"maxItems": 10,
"revision": 0,
"parentId": "string",
"id": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"version": 1,
"childCount": 0,
"messageId": "string"
}
]
}
VariableSetSummaryCollection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
VariableSetSummaryCollection | any | false | none | This is a collection of variable set summary. |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | messageSummaryCollection/allOf/0 | 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 | [variableSetSummary] | false | none | The actual results of a query |
variableSummaryCollection
{
"name": "string",
"start": 0,
"limit": 0,
"count": 0,
"accept": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0,
"items": [
{
"name": "string",
"displayName": "string",
"type": "array",
"description": "string",
"tags": [
{
"name": "string",
"value": "string"
}
],
"version": 1,
"minLength": 0,
"maxLength": 0,
"enumValues": [
"string"
],
"enumURI": "string",
"minimum": 0,
"maximum": 0,
"inclusiveMinimum": true,
"exclusiveMaximum": true,
"arrayItem": "none",
"minItems": 0,
"maxItems": 0,
"required": false,
"deprecated": false,
"private": false,
"access": "rw",
"isMissing": false,
"defaultValue": "",
"locked": true,
"userGroup": "DMSDefault",
"featureExpr": {
"window": {
"type": "array",
"length": 0,
"timeISOPeriod": "string",
"timeVarFQName": "string",
"timeVarSchemaName": "string"
},
"aggregator": {
"funcName": "none",
"varFQName": "string",
"varSchemaName": "string"
},
"filter": {
"expression": []
}
},
"revision": 0,
"id": "string",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"variableSetId": "string",
"jsonPath": "string",
"messageName": "string"
}
]
}
VariableSummaryCollection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
VariableSummaryCollection | any | false | none | This is a collection of variable summary. |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | messageSummaryCollection/allOf/0 | 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 | [variableSummary] | false | none | The actual results of a query |
templateSummaryCollection
{
"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": [
{
"id": "string",
"fileId": "string",
"data": "string",
"status": "pending",
"creationTimeStamp": "2019-08-24T14:15:22Z",
"createdBy": "string",
"modifiedTimeStamp": "2019-08-24T14:15:22Z",
"modifiedBy": "string",
"revision": 0,
"version": 1,
"name": "string",
"type": "Custom",
"description": "string",
"tenant": "default",
"product": "default",
"operation": "create"
}
]
}
templateSummaryCollection
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
templateSummaryCollection | any | false | none | This is a collection of template summary. |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | messageSummaryCollection/allOf/0 | 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 | [templateSummary] | false | none | The actual results of a query |