Skip to main content
Seasoned ⭐️⭐️
January 19, 2023
Closed

Upsert functionality in Rest APIs of Cognite

Related products:REST API
  • January 19, 2023
  • 14 replies
  • 491 views
  • Upsert functionality is available in the cognite  Java SDK but not in the rest API calls  

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

      

    2)Assets are going through asset hierarchy so they get automatically linked. 

    Events : there are two major concerns 

    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 

    In the event API as per the documentation available in  https://docs.cognite.com/api/v1/#tag/Events/operation/createEvents the request body schema assetIds is expecting internal ID . Asset IDs of equipment that this event relates to).  

     

      

    Due to the above cognite design there is duplicity of calls . 

     So, we are requesting the below requirements 

     

     

    Requirements 

    • Assets  

    •            Functional Location, Equipment. 

    • Events 

    •            Notifications, Work order 

    1. The challenge is SAP doesn’t have the Cognite internal id of the equipment to send it in the work order. 

    2. The event API doesn’t even have an event id to link.( i.e to link work order operations with work order header) 

Must Have  

  • 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. 

Good to Have  

  • 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 

14 replies

HarshaAuthor
Seasoned ⭐️⭐️
September 7, 2023

@Thomas Sjølshagen any decision made on this request. we are seeing a high volume of data interfaces and they can be reduced by half if we can have an upsert API 

Seasoned ⭐️⭐️⭐️
September 7, 2023

@Hunter Beck we need this item priority escalated on Cognite end and incorporation of this into roadmap and timeline for implementation on this functionality, as this limitation has come across several times over the past year. If you would like us to setup a call to discuss the details, I would be glad to setup a call with our Ingestion team members. Thanks

Hunter Beck
Expert ⭐️⭐️⭐️⭐️
Expert ⭐️⭐️⭐️⭐️
September 7, 2023

@Harsha could you explain what you mean by “we are seeing a high volume of data interfaces and they can be reduced by half”?

As @Thomas Sjølshagen mentioned above in the thread, this capability is already present in our new Data Modeling service. Ultimately, this will be the primary place for data like assets and events. I know Celanese still has a blend of classic and new data models, but you have much of your data in FDM or are moving that direction to my understanding. Therefore, I would expect this to not be a significant problem no (even though it may have been 6 - 12 months ago). As you know @rsiddha, we have many additional features we should add to FDM which I believe you would agree should take priority to what will become a legacy data model soon. 

Ibrahim Al-Syed
Practitioner ⭐️
Practitioner ⭐️
December 18, 2023

we still need this for classical assets, events, and time series