Read or Export a Decision Model Snapshot
get
/ic/api/process/v1/dmn/spaces/{spaceId}/decision-models/{decisionModelName}/versions/{decisionModelVersion}
Reads a decision model snapshot. The response body if saved, may be used for import later. When using this API for export, the query parameters listed below MUST be set. Authorization header MUST be set to type Bearer and an access token must be provided.
Request
Path Parameters
-
decisionModelName(required): string
Name of the Decision Model
-
decisionModelVersion(required): string
Decision model version ID, this is usually the snapshot nameDefault Value:
LATEST
-
spaceId(required): string
Identifies the Process space in which the decision model was created.
Query Parameters
-
levels(required): string
Maximum resource depth to expand. Set to all for this requestDefault Value:
all
-
omitFields(required): string
A list of comma-seperated fields to be omittied from the response. MUST includes the following fields when making request to export a snapshot :lastChangedBy,lastChangedTime,createdBy,createdTime,links,interpretation,problems,references. When used for other purposes, it can be set to references,links.Default Value:
lastChangedBy,lastChangedTime,createdBy,createdTime,links,interpretation,problems,references
Header Parameters
-
Authorization(required): string
Authorization header MUST be set to type Bearer and an access token must be provided i.e. 'Bearer
' Default Value:Bearer XXXXX.XXXXX.XXXXX
Response
Supported Media Types
- application/json
- text/plain
200 Response
Successful Response
Nested Schema : DecisionModelVersion-allOf[1]
Type:
Show Source
object
-
class:
string
Default Value:
.DecisonModelVersion
-
definition:
Definition
-
permissions:
RestCollection
-
testCases:
RestCollection
Nested Schema : Definition-allOf[1]
Type:
Show Source
object
-
class:
string
Default Value:
.Definition
-
decisions:
RestCollection
-
decisionServices:
RestCollection
-
inputData:
RestCollection
-
itemDefinitions:
RestCollection
-
requirementsModel:
string
Allowed Values:
[ "list", "graph" ]
Example Response (application/json)
{
"@class":".DecisionModelVersion",
"name":"TestSnapshot1",
"description":"Initial version",
"contentLastChangedTime":"2017/02/04T17:24:12",
"testCases":{
"@class":".RestCollection",
"name":"test-cases",
"items":[
{
"@class":".TestCase",
"testCaseData":{
"@class":".TestCaseData",
"data":{
"inp":{
"@class":".Script",
"lines":[
"1"
],
"scriptNode":{
"@class":".ScriptNode",
"interpretation":1,
"kind":"Literal",
"data":1
}
}
},
"name":"data"
},
"result":{
"@class":".Definition",
"requirementsModel":"list",
"inputData":{
"@class":".RestCollection",
"name":"input-data",
"items":[
{
"@class":".InputData",
"typeRef":{
"@class":".TypeRef",
"name":"number"
},
"name":"inp"
}
]
},
"decisions":{
"@class":".RestCollection",
"name":"decisions",
"items":[
{
"@class":".Decision",
"listIndex":1,
"logic":{
"@class":".Interpretable",
"expression":{
"@class":".Script",
"lines":[
"sum(inp)"
],
"scriptNode":{
"@class":".ScriptNode",
"interpretation":1,
"references":[
{
"$class":"path",
"components":[
"spaces",
"3d070270-6252-4c8e-af84-15058ca2b297",
"decision-models",
"Decision Model With List",
"versions",
"LATEST",
"test-cases",
"DefaultTestCase",
"result",
"input-data",
"inp"
]
}
],
"kind":"Invocation",
"children":[
{
"@class":".ScriptNode",
"interpretation":{
"$class":"function",
"arguments":{
"$schema":"http://json-schema.org/draft-04/schema#",
"type":"object",
"properties":{
"list of numbers":{
"$schema":"http://json-schema.org/draft-04/schema#",
"type":"array",
"items":{
"type":"number"
}
}
}
},
"returns":{
"$schema":"http://json-schema.org/draft-04/schema#",
"type":"number"
},
"closureScope":{
"$class":"path",
"components":[
"sum"
]
}
},
"kind":"Qname",
"data":[
"sum"
]
},
{
"@class":".ScriptNode",
"kind":"Args",
"children":[
{
"@class":".ScriptNode",
"interpretation":1,
"references":[
{
"$class":"path",
"components":[
"spaces",
"3d070270-6252-4c8e-af84-15058ca2b297",
"decision-models",
"Decision Model With List",
"versions",
"LATEST",
"test-cases",
"DefaultTestCase",
"result",
"input-data",
"inp"
]
}
],
"kind":"Qname",
"data":[
"inp"
]
}
]
}
]
}
},
"name":"logic"
},
"name":"Decision With List"
}
]
},
"decisionServices":{
"@class":".RestCollection",
"name":"decision-services",
"items":[
{
"@class":".DecisionService",
"outputDecisions":{
"@class":".DecisionService$DecisionReferenceCollection"
},
"inputData":{
"@class":".DecisionService$InputDataReferenceCollection"
},
"inputDecisions":{
"@class":".DecisionService$DecisionReferenceCollection"
},
"name":"Test Service"
}
]
},
"itemDefinitions":{
"@class":".RestCollection",
"name":"item-definitions"
},
"name":"result"
},
"name":"DefaultTestCase"
}
]
},
"definition":{
"@class":".Definition",
"requirementsModel":"list",
"inputData":{
"@class":".RestCollection",
"name":"input-data",
"items":[
{
"@class":".InputData",
"typeRef":{
"@class":".TypeRef",
"name":"number"
},
"name":"inp"
}
]
},
"decisions":{
"@class":".RestCollection",
"name":"decisions",
"items":[
{
"@class":".Decision",
"listIndex":1,
"links":[
{
"rel":"self",
"href":"http://example.com:7001/ic/api/process/v1/spaces/3d070270-6252-4c8e-af84-15058ca2b297/decision-models/Decision%20Model%20With%20List/versions/LATEST/definition/decisions/Decision%20With%20List/"
}
],
"logic":{
"@class":".Interpretable",
"expression":{
"@class":".Script",
"lines":[
"sum(inp)"
],
"scriptNode":{
"@class":".ScriptNode",
"interpretation":{
"$schema":"http://json-schema.org/draft-04/schema#",
"type":"number"
},
"references":[
{
"$class":"path",
"components":[
"spaces",
"3d070270-6252-4c8e-af84-15058ca2b297",
"decision-models",
"Decision Model With List",
"versions",
"LATEST",
"definition",
"input-data",
"inp"
]
}
],
"kind":"Invocation",
"children":[
{
"@class":".ScriptNode",
"interpretation":{
"$class":"function",
"arguments":{
"$schema":"http://json-schema.org/draft-04/schema#",
"type":"object",
"properties":{
"list of numbers":{
"$schema":"http://json-schema.org/draft-04/schema#",
"type":"array",
"items":{
"type":"number"
}
}
}
},
"returns":{
"$schema":"http://json-schema.org/draft-04/schema#",
"type":"number"
},
"closureScope":{
"$class":"path",
"components":[
"sum"
]
}
},
"kind":"Qname",
"data":[
"sum"
]
},
{
"@class":".ScriptNode",
"kind":"Args",
"children":[
{
"@class":".ScriptNode",
"interpretation":{
"$schema":"http://json-schema.org/draft-04/schema#",
"type":"number"
},
"references":[
{
"$class":"path",
"components":[
"spaces",
"3d070270-6252-4c8e-af84-15058ca2b297",
"decision-models",
"Decision Model With List",
"versions",
"LATEST",
"definition",
"input-data",
"inp"
]
}
],
"kind":"Qname",
"data":[
"inp"
]
}
]
}
]
}
},
"name":"logic"
},
"name":"Decision With List"
}
]
},
"decisionServices":{
"@class":".RestCollection",
"name":"decision-services",
"items":[
{
"@class":".DecisionService",
"outputDecisions":{
"@class":".DecisionService$DecisionReferenceCollection"
},
"inputData":{
"@class":".DecisionService$InputDataReferenceCollection"
},
"inputDecisions":{
"@class":".DecisionService$DecisionReferenceCollection"
},
"name":"Test Service"
}
]
},
"itemDefinitions":{
"@class":".RestCollection",
"name":"item-definitions"
},
"name":"definition"
},
"permissions":{
"@class":".RestCollection",
"name":"permissions"
}
}
401 Response
Unauthorized
403 Response
Forbidden (Expired or invalid token)
404 Response
Not Found
500 Response
Internal Server Error