Upsert of objects

Either create new objects if they do not yet exist or update existing objects in one call

The upsert endpoint has the same specification as the insert endpoint.
An upsert endpoint typically performs a create on new objects and updates existing objects in the payload.

The advantages of using this endpoint is that the client has a more convenient way to create or update his data.
However, a client looses the control, especially if there is a certain logic for existing objects.

The import API has the following mandatory headers:

  • x-api-key for authentication and authorisation

The following headers are optional - but we recommend to use them if they are available:

  • X-DATASOURCE' : the UUID of the data publisher
  • X-PUBLISHER: the UUID of the publisher the data should be inserted

To import your data send a HTTP PUT request to the API ts/v1/kg/things/imports

Upsert our running example

curl --location --request PUT '' \
--header 'Content-Type: application/ld+json' \
--header 'x-api-key: $API_KEY' \
--data-raw '{
  "@type": "",
  "":"This is the running example event description",
  "":"Running example",
  "": "2023-05-16T18:00:00+02:00",
  "": "",
  "": {
    "@id": ""

A payload without any @id information would be equivalent to a simple insert.

If there are @id information, then the system checks if such graph nodes already exists in the KG and perform an update if necessary.
!Note We do not allow for cross-graph data manipulations. That means, that all existing @id s must have been inserted into the same graph.

A successful started upsert should return the response code 202 ACCEPTED with the following response:

    "message": "IMPORT_PROCESS_ID"

What’s Next