I have been working with the ARIS REST API to keep our ARIS databases up to date with some external information. I am now pulling some data out of ARIS and one of the things I'm doing is dumping our models into a tabular format. Part of the request is to get all the attributes of the connection objects, but I see no way via the REST API to retrieve the Connection Definition Object ID... I can only get some information about the connection occurence on a model using the API endpoint to retrieve a model by ID with content, but there's no guid pointing me back to the Connection Definition Object.
Can anyone show me how to maybe use the generic query endpoints to get this information or point out another endpoint/parameters that I am missing?
Thank you
Hello,
connections are no objects in the ARIS sense. You need to get hold of a model with /api/models/{dbName}/{modelID} and request withcontent=true. This should contain all "modelconnections" including source and target object and "attributes" for each modelconnection.
Hello and thanks! I have done that but the connection occurences that come back to not give me any way to get all the attributes on the connection object itself. I've seen in the JavaScript API/ArisScript that the connection occurrences and connection objects are both exposed as methods or something (I'm not a JS guy so idk the nomenclature to refer to but it's basically `aris.connections` and `aris.connection_occurences` (I'm from python if that wasn't obvious :p)
Here is a sample request I made with the Entire method filter and the modelconnections section comes with attributes. The requested model only contains two objects connected by 1 connection having 1 extra attribute maintained.
Alternatively to attributes=all you could specify a comma-separated list of attribute TypeNums you are interested in:
/abs/api/models/Test-DB/e98f1920-a31a-11ed-0843-546cebf3eda0?methodfilter=dd838074-ac29-11d4-85b8-00005a4053ff&attributes=all&withcontent=true&withparentgroup=false&withpath=false&withportallinks=false&changelist=-1&withstyledtext=false
Response is
{
"kind": "RESULT",
"request": "abs#getModelByID",
"status": "OK",
"item_count": 1,
"items": [
{
"kind": "MODEL",
"guid": "e98f1920-a31a-11ed-0843-546cebf3eda0",
"link": {
"kind": "LINK",
"method": "GET",
"href": "http://<snip>/abs/api/models/Test-DB/e98f1920-a31a-11ed-0843-546cebf3eda0?language=en_US&methodfilter=dd838074-ac29-11d4-85b8-00005a4053ff&methodlanguage=en_US",
"rel": "SELF"
},
"type": 12,
"typename": "Value-added chain diagram",
"apiname": "MT_VAL_ADD_CHN_DGM",
"attributes": [
{
"kind": "ATTRIBUTE",
"id": "-4K5ay3Vhm4:u:L=1=1033:1:s",
"typename": "Name",
"type": 1,
"apiname": "AT_NAME",
"language": "en_US",
"value": "VACD"
},
{
"kind": "ATTRIBUTE",
"id": "virtual:45;8;-4K5ay3Vhm4:u:L",
"typename": "Type",
"type": 389,
"apiname": "AT_TYPE_6",
"value": "12"
},
{
"kind": "ATTRIBUTE",
"id": "virtual:46;4;-4K5ay3Vhm4:u:L",
"typename": "Time of generation",
"type": 1008,
"apiname": "AT_CREAT_TIME_STMP",
"value": "2023-02-02T16:59:10Z"
},
{
"kind": "ATTRIBUTE",
"id": "virtual:47;1;-4K5ay3Vhm4:u:L",
"typename": "Creator",
"type": 1009,
"apiname": "AT_CREATOR",
"value": "<snip>"
},
{
"kind": "ATTRIBUTE",
"id": "virtual:33;4;-4K5ay3Vhm4:u:L",
"typename": "Last change",
"type": 1175,
"apiname": "AT_LAST_CHNG_2",
"value": "2023-03-31T06:49:35Z"
},
{
"kind": "ATTRIBUTE",
"id": "virtual:48;1;-4K5ay3Vhm4:u:L",
"typename": "Last user",
"type": 1290,
"apiname": "AT_LUSER",
"value": "<snip>"
}
],
"modelobjects": [
{
"kind": "MODELOBJECT",
"occid": "(-4K5ay3Vhm4:u:L+7aNKPVEHMhN:x:L+33+c)",
"guid": "ef40c530-a31a-11ed-0843-546cebf3eda0",
"link": {
"kind": "LINK",
"method": "GET",
"href": "http://<snip>/abs/api/objects/Test-DB/ef40c530-a31a-11ed-0843-546cebf3eda0?language=en_US&methodfilter=dd838074-ac29-11d4-85b8-00005a4053ff&methodlanguage=en_US",
"rel": "OBJECT"
},
"type": 22,
"typename": "Function",
"apiname": "OT_FUNC",
"symbol": 141,
"symbolname": "Value-added chain",
"symbol_apiname": "ST_VAL_ADD_CHN_SML_2",
"attributes": [
{
"kind": "ATTRIBUTE",
"id": "4DHbrzwP503:p:L=1=1033:1:s",
"typename": "Name",
"type": 1,
"apiname": "AT_NAME",
"language": "en_US",
"value": "VAC1"
},
{
"kind": "ATTRIBUTE",
"id": "virtual:35;8;4DHbrzwP503:p:L",
"typename": "Type",
"type": 389,
"apiname": "AT_TYPE_6",
"value": "22"
},
{
"kind": "ATTRIBUTE",
"id": "virtual:36;4;4DHbrzwP503:p:L",
"typename": "Time of generation",
"type": 1008,
"apiname": "AT_CREAT_TIME_STMP",
"value": "2023-02-02T16:59:39Z"
},
{
"kind": "ATTRIBUTE",
"id": "virtual:37;1;4DHbrzwP503:p:L",
"typename": "Creator",
"type": 1009,
"apiname": "AT_CREATOR",
"value": "<snip>"
},
{
"kind": "ATTRIBUTE",
"id": "virtual:34;4;4DHbrzwP503:p:L",
"typename": "Last change",
"type": 1175,
"apiname": "AT_LAST_CHNG_2",
"value": "2023-02-02T16:59:39Z"
},
{
"kind": "ATTRIBUTE",
"id": "virtual:38;1;4DHbrzwP503:p:L",
"typename": "Last user",
"type": 1290,
"apiname": "AT_LUSER",
"value": "<snip>"
}
]
},
{
"kind": "MODELOBJECT",
"occid": "(-4K5ay3Vhm4:u:L+-dWTtg01IRu:x:L+33+c)",
"guid": "ef40c532-a31a-11ed-0843-546cebf3eda0",
"link": {
"kind": "LINK",
"method": "GET",
"href": "http://<snip>/abs/api/objects/Test-DB/ef40c532-a31a-11ed-0843-546cebf3eda0?language=en_US&methodfilter=dd838074-ac29-11d4-85b8-00005a4053ff&methodlanguage=en_US",
"rel": "OBJECT"
},
"type": 22,
"typename": "Function",
"apiname": "OT_FUNC",
"symbol": 141,
"symbolname": "Value-added chain",
"symbol_apiname": "ST_VAL_ADD_CHN_SML_2",
"attributes": [
{
"kind": "ATTRIBUTE",
"id": "-3ZQ0sHLWWsz:p:L=1=1033:1:s",
"typename": "Name",
"type": 1,
"apiname": "AT_NAME",
"language": "en_US",
"value": "VAC2"
},
{
"kind": "ATTRIBUTE",
"id": "virtual:40;8;-3ZQ0sHLWWsz:p:L",
"typename": "Type",
"type": 389,
"apiname": "AT_TYPE_6",
"value": "22"
},
{
"kind": "ATTRIBUTE",
"id": "virtual:41;4;-3ZQ0sHLWWsz:p:L",
"typename": "Time of generation",
"type": 1008,
"apiname": "AT_CREAT_TIME_STMP",
"value": "2023-02-02T16:59:39Z"
},
{
"kind": "ATTRIBUTE",
"id": "virtual:42;1;-3ZQ0sHLWWsz:p:L",
"typename": "Creator",
"type": 1009,
"apiname": "AT_CREATOR",
"value": "<snip>"
},
{
"kind": "ATTRIBUTE",
"id": "virtual:39;4;-3ZQ0sHLWWsz:p:L",
"typename": "Last change",
"type": 1175,
"apiname": "AT_LAST_CHNG_2",
"value": "2023-02-02T16:59:39Z"
},
{
"kind": "ATTRIBUTE",
"id": "virtual:43;1;-3ZQ0sHLWWsz:p:L",
"typename": "Last user",
"type": 1290,
"apiname": "AT_LUSER",
"value": "<snip>"
}
]
}
],
"modelconnections": [
{
"kind": "MODELCONNECTION",
"occid": "(-4K5ay3Vhm4:u:L+3gynotpktBf:y:L+34+c)",
"type": 118,
"typename": "triggers",
"apiname": "CT_IS_PREDEC_OF_1",
"source_guid": "ef40c530-a31a-11ed-0843-546cebf3eda0",
"target_guid": "ef40c532-a31a-11ed-0843-546cebf3eda0",
"source_link": {
"kind": "LINK",
"method": "GET",
"href": "http://<snip>/abs/api/objects/Test-DB/ef40c530-a31a-11ed-0843-546cebf3eda0?language=en_US&methodfilter=dd838074-ac29-11d4-85b8-00005a4053ff&methodlanguage=en_US",
"rel": "OBJECT"
},
"target_link": {
"kind": "LINK",
"method": "GET",
"href": "http://<snip>/abs/api/objects/Test-DB/ef40c532-a31a-11ed-0843-546cebf3eda0?language=en_US&methodfilter=dd838074-ac29-11d4-85b8-00005a4053ff&methodlanguage=en_US",
"rel": "OBJECT"
},
"source_occid": "(-4K5ay3Vhm4:u:L+7aNKPVEHMhN:x:L+33+c)",
"target_occid": "(-4K5ay3Vhm4:u:L+-dWTtg01IRu:x:L+33+c)",
"attributes": [
{
"kind": "ATTRIBUTE",
"id": "virtual:44;8;7fED#teiOze:q:L",
"typename": "Type",
"type": 389,
"apiname": "AT_TYPE_6",
"value": "118"
},
{
"kind": "ATTRIBUTE",
"id": "7fED#teiOze:q:L=2175=1033:1:s",
"typename": "Condition expression",
"type": 2175,
"apiname": "AT_BPMN_CONDITION_EXPRESSION",
"language": "en_US",
"value": "VAC1 is finished"
}
]
}
]
}
]
}
Ok maybe we have something misconfigured on our end then because I only have been getting 1 attribute back on any of the modelconnections, but it's not an attribute we see in the UI so I assumed it was something that wasn't relevant to me as a user... I will circle back with our admin on any custom configuration that I am not accounting for.
Thanks!
AT_TYPE_6 is the connection type (or object type/model type) you see on the UI with a human readable value like "triggers" or "carries out", that is coming from the method. The numeric value is the TypeNum you use in the APIs.
You may want to check, which "methodfilter" you provide as a parameter and which attributes that contains for the connection types that interest you.