Invoke a Decision Service by Snapshot Name
post
/ic/api/process/v1/dmn/spaces/{spaceId}/decision-models/{decisionModelName}/versions/{decisionModelVersion}/definition/decision-services/{decisionServiceName}
Invokes a decision service by the snapshot name. The request body should contain a map of Interpretations representing input data. The response body returns a DecisionServiceResult containing the Interpretation of output and any Problems encountered. The snapshot name is identified by {decisionModelVersion}.
For example, if the arguments attribute of the response shows the following JSON schema:
```JSON
{"arguments":
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"emp": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"Emp_number": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "number"
},
"Emp_name": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string"
}
}
}
}
}
}
```
The request body of the post request should contain the JSON representation of emp object as shown:
```JSON
{
"emp" :
{
"Emp_name": "John Doe",
"Emp_number": 3
}
}
```
Request
Supported Media Types
- application/json
Path Parameters
-
decisionModelName: string
Name of the Decision Model
-
decisionModelVersion: string
Decision model version ID, this is usually the snapshot nameDefault Value:
LATEST
-
decisionServiceName: string
Name of the Decision Model
-
spaceId: string
Identifies the Process space in which the decision model was created.
Json representation of a map of interpretations representing the input data. Schema shows an sample object with 3 fields.
Response
Supported Media Types
- application/json
- text/plain
200 Response
Successful Response
401 Response
Unauthorized
403 Response
Forbidden (Expired or invalid token)
500 Response
Internal Server Error