curl --request POST \
--url https://{cluster}.cognitedata.com/api/v1/projects/{project}/streams/{streamId}/records/delete \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"space": "mySpace",
"externalId": "some_id"
}
]
}
'{}Required capabilities:
StreamRecordsAcl:WRITE
Note: This endpoint is only available for mutable streams.
To delete records, the user must have capabilities to access (write to) the referenced record space.
Batches of records are deleted from a stream with implicit ignoreUnknownIds=true semantic.
The record operations are eventually consistent, but under normal conditions deleted records stop being returned by other endpoints within a few seconds. Sync endpoint is returning a “tombstone” record (which only has a few top level fields and a deleted status) for at least 3 days since deleting the actual record.
curl --request POST \
--url https://{cluster}.cognitedata.com/api/v1/projects/{project}/streams/{streamId}/records/delete \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"space": "mySpace",
"externalId": "some_id"
}
]
}
'{}Access token issued by the CDF project's configured identity provider. Access token must be an OpenID Connect token, and the project must be configured to accept OpenID Connect tokens. Use a header key of 'Authorization' with a value of 'Bearer $accesstoken'. The token can be obtained through any flow supported by the identity provider.
An identifier of the stream where the records are stored.
1 - 100^[a-z]([a-z0-9_-]{0,98}[a-z0-9])?$"test1"
Records to delete from a stream.
List of records to delete.
1 - 1000 elementsShow child attributes
An empty response is returned if all records from the request are successfully deleted.
Empty JSON object indicates all records are successfully accepted to be deleted.
Was this page helpful?