top of page

Delete data

DELETE /<org_name>/<path>/<data_item_name>.data

Data Items


For data, Registry is a key-value store of registers (a.k.a., data items).  A client can write, delete, and read small blobs of 100 KB (configurable) or smaller.  Blobs can be overwritten or deleted, but not edited in other ways.  When a blob is written, its content type (specified by Content-Type header) is saved, and it is returned along with the blob when read.  The service only looks at the blob’s size but does not look into its contents, not even for checksumming.  If the client desires encryption, checksumming, or error-correcting of their data, they need to do those at the client side.


Delete works even when the org is flagged for deletion.  It can also be conditioned on the item’s update org time.

Request

Example

DELETE /<org_name>/<path>/<data_item_name>.data
Host: <service_address>
Authorization: <org_key>
x-dk-update-org-time: <u64>

DELETE /sample_org/nemmies/rolls/recipe.data
Host: beta.useast2.registry.dkplatform.io
Authorization: randomAlphaNumericString

Param
Meaning
Authorization
The credential showing the client's permission for the request. It is the `org_key` of the org.
Host
The service address, such as "useast2.registry.dkplatform.io".
x-dk-org-time
A response header that shows the org_time after the request is executed.
x-dk-update-org-time
An optional request header for conditional update and delete of data.
"update_org_time"
The org time right after a data item is updated.

Response

200 OK

x-dk-org-time: <u64>

The data item does not exist anymore, whether it was deleted by this request, had been deleted before, or never exists.

400 BAD REQUEST

Wrong format in org, path, data item name, or x-dk-update-org-time.  Missing Authorization header, or the Authorization header is empty.

404 NOT FOUND


There is no such org, the org has been flagged for deletion, or (for confidentiality concern) the Authorization token is invalid.

409 CONFLICT

x-dk-org-time: <u64>

{

  "update_org_time": <u64>,

}

A data item exists with the same name and different update org time.

500 INTERNAL SERVER ERROR

An unexpected error happened at the server. It is unsure if the request has been processed or not.


© 2024 by DK Lab.

bottom of page