Records

The records route provides a flexible and powerful way to create, retrieve, update, and delete records within your app. The route is designed to be resource-oriented and follows standard HTTP verbs.

Create a new record

post

Create a new record in a collection

Authorizations
Body
collectionIdstring · uuidRequired

ID of the collection to create the record in

dataobjectRequired

JSON object data to store in the record

Example: {"users":[{"id":1,"email":"[email protected]"}]}
metadatabooleanOptional

Whether to include metadata in the response

Default: true
Responses
200
Record created successfully
application/json
post
POST /v2/records HTTP/1.1
Host: api.myjson.com
x-collection-access-token: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 131

{
  "collectionId": "556aaefb-7009-4c16-84de-aa89740131f1",
  "data": {
    "users": [
      {
        "id": 1,
        "email": "[email protected]"
      }
    ]
  },
  "metadata": true
}
{
  "data": {
    "users": [
      {
        "id": 1,
        "email": "[email protected]"
      }
    ]
  },
  "version": 1,
  "id": "123e4567-e89b-12d3-a456-426614174000"
}

Get a record

get

Retrieve a record by its ID

Authorizations
Path parameters
recordIdstring · uuidRequired

Unique identifier of the record

Query parameters
metadatabooleanOptional

Whether to include metadata in the response

Default: true
versionintegerOptional

Specific version of the record to retrieve

Responses
200
Record retrieved successfully
application/json
get
GET /v2/records/{recordId} HTTP/1.1
Host: api.myjson.com
x-collection-access-token: YOUR_API_KEY
Accept: */*
{
  "data": {
    "users": [
      {
        "id": 1,
        "email": "[email protected]"
      }
    ]
  },
  "version": 1,
  "id": "123e4567-e89b-12d3-a456-426614174000"
}

Update a record

put

Update an existing record

Authorizations
Path parameters
recordIdstring · uuidRequired

Unique identifier of the record

Body
dataobjectRequired

JSON object data to store in the record

Example: {"users":[{"id":2,"email":"[email protected]"}]}
metadatabooleanOptional

Whether to include metadata in the response

Responses
200
Record created/updated successfully
application/json
put
PUT /v2/records/{recordId} HTTP/1.1
Host: api.myjson.com
x-collection-access-token: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 77

{
  "data": {
    "users": [
      {
        "id": 2,
        "email": "[email protected]"
      }
    ]
  },
  "metadata": true
}
{
  "data": {
    "users": [
      {
        "id": 1,
        "email": "[email protected]"
      }
    ]
  },
  "version": 1,
  "id": "123e4567-e89b-12d3-a456-426614174000"
}

Delete a record

delete

Remove a record permanently

Authorizations
Path parameters
recordIdstring · uuidRequired

Unique identifier of the record

Responses
200
Record deleted successfully
delete
DELETE /v2/records/{recordId} HTTP/1.1
Host: api.myjson.com
x-collection-access-token: YOUR_API_KEY
Accept: */*

No content

Partially update a record

patch

Update specific fields of an existing record

Authorizations
Path parameters
recordIdstring · uuidRequired

Unique identifier of the record

Body
dataobjectRequired

JSON object data to update in the record

Example: {"users":[{"id":1,"email":"[email protected]","firstName":"Charles"}]}
metadatabooleanOptional

Whether to include metadata in the response

Responses
200
Record updated successfully
application/json
patch
PATCH /v2/records/{recordId} HTTP/1.1
Host: api.myjson.com
x-collection-access-token: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 100

{
  "data": {
    "users": [
      {
        "id": 1,
        "email": "[email protected]",
        "firstName": "Charles"
      }
    ]
  },
  "metadata": false
}
{
  "data": {
    "users": [
      {
        "id": 1,
        "email": "[email protected]"
      }
    ]
  },
  "version": 1,
  "id": "123e4567-e89b-12d3-a456-426614174000"
}

Last updated

Was this helpful?