Collections
Endpoint shortcuts
#
The Collection object#
PropertiesProperty | Type | Info | Description |
---|---|---|---|
@context | object | Optional | JSON-LD context information. |
@id | string | Optional | Unique identifier for the object |
createdAt | string | Optional | Timestamp of object creation, expressed according to ISO 8601. |
updatedAt | string | Read only | Timestamp of object last update, expressed according to ISO 8601. |
label | string | Mandatory | Name of the Collection. |
@type | string | Mandatory | Value is "Collection" |
parents | list of strings | Mandatory | Collection URI for nested collections or Workspace URI for root collections. |
itemsType | string | Mandatory | DataType for the items. Must be a valid Class from the json-ld Datablist vocabulary. |
icon | string | Optional | Emoji Character |
Any extra field will return a bad request error.
#
Create a collectionPOST https://data.datablist.com/:workspace_id/collections
The createdAt
and @id
value can be set on a POST
request. If not provided, will be auto generated.
If an object already exist with the same @id
, an error will be raise (http_status 400 and IntegrityError code).
On success, returns a HTTP code 201 with {"@id": "COLLECTION_ID"}
and the resource URI in the Location
header.
#
Retrieve a collectionGET https://data.datablist.com/:workspace_id/collections/:collection_id
Response - HTTP 200
#
Update a collection#
PartialPATCH https://data.datablist.com/:workspace_id/collections/:collection_id
On success, returns an empty HTTP 204 No Content.
#
Full updatePUT https://data.datablist.com/:workspace_id/collections/:collection_id
On success, returns an empty HTTP 204 No Content.
#
List all collectionsGET https://data.datablist.com/:workspace_id/collections
Response - HTTP 200
#
Delete a collectionDELETE https://data.datablist.com/:workspace_id/collections/:collection_id
On success, returns an empty HTTP 204 No Content.