Items
#
The Item objectItem structure depends on the itemsType
and properties
defined for the collection.
A collection set with an itemsType
to Contact will store "@type": "Contact"
items.
#
PropertiesProperty | Type | Description |
---|---|---|
@context | object | Optional |
@id | string | Unique identifier for the object |
@type | string | Value comes from collection itemsType property |
createdAt | string | Timestamp of object creation, expressed according to ISO 8601. |
updatedAt | string | Timestamp of object last update, expressed according to ISO 8601. |
#
ExampleA collection with 2 properties with key
: firstName
and lastName
will have items with the structure below:
#
Create an itemThe 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).
#
Retrieve an itemGET https://data.datablist.com/:workspace_id/collections/:collection_id/items/:item_id
#
Update an item#
PartialOn success, returns an empty HTTP 204 No Content.
#
Full updateOn success, returns an empty HTTP 204 No Content.
#
List all itemsGET https://data.datablist.com/:workspace_id/collections/:collecton_id/items?count=10
To paginate:
GET https://data.datablist.com/:workspace_id/collections/:collecton_id/items?count=10&start_after_document_id=XX
info
There is no pagination by default. A call without the count
parameter will return all the items in the collection. To paginate your items, use count
and the start_after_document_id
GET parameters.
#
Delete an itemDELETE https://data.datablist.com/:workspace_id/collections/:collection_id/items/:item_id
On success, returns an empty HTTP 204 No Content.
#
Bulk create itemsThe createdAt
and @id
value can be set. 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, return a 201 response with a listing of created @ids
Bulk operations work like a transaction. Any error during the creation lead to no item being created.
#
Bulk update itemsBulk update operations take a list of ["item_id", {...}]
tuples.
#
Bulk partial updateBulk operations work like a transaction. Any error during the update leads to no item being updated.
info
If one of the item ids provided doesn't exist, the request will be cancelled.
#
Bulk full updateBulk operations work like a transaction. Any error during the update leads to no item being updated.
info
If one of the item ids provided doesn't exist, the request will be cancelled.
#
Bulk delete itemsBulk operations work like a transaction. Any error during the update leads to no item being deleted.
info
If one of the item ids provided doesn't exist, the request will be cancelled.