Cognite CDF: Upsert APIs (VERY IMPORTANT)

Related products: API and SDKs

 Need to have an ‘Upsert API’ for Rest interfaces in Cognite, in similar lines as Cognite Java SDK ‘Upsert’. This is to minimize the load and code complexity, particularly in (SAP PO/PI scheduled/real-time) 

   

On a high level there are two types of Rest interfaces which are coming from SAP to CDF 

  • Assets  

  • Functional Location, Equipment 

  • Events 

  • Notifications, Work order 

  

In case of Events, there are two major concerns 

  1. As Cognite doesn’t have an Upsert API – we need to check every time whether the record exists from PI/PO, and then call create/ update API based on the response. This is doubling the calls from PI PO side. 

  1. In the event API, as per the documentation available (https://docs.cognite.com/api/v1/#tag/Events/operation/createEvents) the request body schema for assetIds, originating from PI/PO expects internal ID of Cognite.  

  1. SAP won’t have the Cognite internal id of the equipment (to create/update work order details) 

  1. The event API doesn’t even have event id to link other events ( eg. to link work order operations with work order header) 

 

Above leads to multiple calls from PI/PO loading the SAP middleware, increasing code complexity and maintainability. 

 

Requirement: 

  • Request to enable below as a part of Cognite Rest API for  

  1. assets and events: 

  • Assets API  

  • A single API should have the capability to update/create assets 

  • Same API should have the capability to use external ID to update assets 

  • Events API 

  • A single API should have the capability to update/create events 

  • Same API should have the capability to use external ID to update events 

  • Same API should have the capability to use external ID to link assets 

  • Same API should have parent external ID to link to a parent event. 

  1. other objects 

  • Single API which can do Upsert for other Cognite Objects. 

  • Same API should have the capability to use external ID to update other Cognite objects 

 

 

 

Idea merged into:

All the votes from this idea have been transferred.

NewClosed