Records

A record is an object you search for, every collection has a set of records. Records contain attributes which can also be referred as fields.

Attributes

Field Type Description
id string Every record in a collection has a unique identifier
data json Actual data objects you want to index in your searches


Endpoints


Add records

Create a record method enables you to add records to a collection by sending one or more objects.

Each record contains a set of attributes and values and are represented in a JSON format.

POST /collections/:collectionId/records

example bodyview raw
1
2
3
4
[
{"id": "some-unique-id-1", "fname": "john", "lname":"doe"},
{"id": "some-unique-id-2", "fname": "jane", "lname":"doe"}
]
responseview raw
1
2
3
{
"status": 201
}

Delete a record

This method lets you delete one or more records from a collection using their ids.

This is a destructive operation

DELETE /collections/:collectionId/records/recordId

responseview raw
1
2
3
{
"status" : 200
}

Delete Multiple Records or Clear records

DELETE /collections/:collectionId/records

This is a destructive operation

The end point allows you to delete multiple records at once. It is required to pass an array with ids to be deleted.

If passed a flag ?clear=true, the end point will clear all records in the collection.

Sample Request Data
1
['object-id-1','object-id-2','object-id-3']
responseview raw
1
2
3
{
"status" : 200
}