Deleting objects

To delete your existing data you need to use again the local name (id).

Our delete API has the default option to do a so called dryRun.
This dry run reports back if what statements would be deleted and if the delete operation is safe.
An unsafe operation would be a deletion of an object that has incoming links.

For example: We have an event that has an organizer. Deleting the event would be considered safe. However, deleting the organizer would be unsafe since the Event would now link to an entity which no longer would exists.

To actually perform the delete you need to add the query parameter ?dryRun=false.

Example call with internal identifier

curl --location --request DELETE 'https://proxy.opendatagermany.io/api/ts/v1/kg/things/$LOCAL_NAME?dryRun=false' \
--header 'X-PUBLISHER: $PUBLISHER_UUID' \
--header 'Content-Type: application/ld+json' \
--header 'X-DATASOURCE: $DATASOURCE_UUID' \
--header 'x-api-key: $API_KEY'

Use the flag ?force=true to perform an unsafe delete.

Example call with external identifier

curl --location --request DELETE 'https://proxy.opendatagermany.io/api/ts/v1/kg/things/LB1?ns=http://example.com/entity&dryRun=false' \
--header 'X-PUBLISHER: $PUBLISHER_UUID' \
--header 'Content-Type: application/ld+json' \
--header 'X-DATASOURCE: $DATASOURCE_UUID' \
--header 'x-api-key: $API_KEY'