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
Query Parameters
  • Maximum resource depth to expand. Set to all for this request
    Default Value: all
  • 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 header MUST be set to type Bearer and an access token must be provided i.e. 'Bearer '
    Default Value: Bearer XXXXX.XXXXX.XXXXX
Back to Top

Response

Supported Media Types

200 Response

Successful Response
Body ()
Root Schema : DecisionModelVersion
Match All
Show Source
Nested Schema : RestObject
Type: object
Show Source
Nested Schema : DecisionModelVersion-allOf[1]
Type: object
Show Source
Nested Schema : Definition
Match All
Show Source
Nested Schema : RestCollection
Match All
Show Source
Nested Schema : Definition-allOf[1]
Type: object
Show Source
Nested Schema : RestCollection-allOf[1]
Type: object
Show Source
Nested Schema : items
Type: array
Show Source
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
Back to Top