Deleting objects

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

Dry run:

Our delete API has the option to perform a dryRun. This dry run reports back to what statements would be deleted and if the delete operation is safe.

Incoming links:

Deleting an object with incoming links is an unsafe operation. To perform an unsafe deletion, you must add the query parameters ?dryRun=false and force=true.

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 that no longer exists.

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'

Example call with an 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'