Hi, I am trying to use the Data Modeling API (https://pr-ark-codegen-1646.specs.preview.cogniteapp.com/v1.json.html#tag/Instances-(New)/operation/applyNodeAndEdges) to create instances of Views I have defined, including a reference property from one view to another. The reference property in the view looks like this:
"facility": {
"type": {
"space": "jca-domain",
"externalId": "EquipmentFacility"
},
"source": {
"type": "view",
"space": "jca-domain",
"externalId": "Facility",
"version": "0_1"
},
"direction": "outwards"
}
I’m not including the whole definition as it is kind of lengthy, but basically there is a Facility view and an Equipment view, and the above property is on the Equipment so I can link it to a Facility. I am able to create an instance of the Facility, and an instance of Equipment (without the link), but I can’t figure out how to set the facility property. It seems I need to create an edge instance, but I can’t get that to work (more specifically I don’t know what to put in the “sources” property as it seems to be looking for a node view type?).
Thanks for the help!