myJson
HomeApp
myJson
myJson
  • Get Started
  • Terminology
    • Record
    • Collection
  • Endpoints
    • Records
    • Collections
Powered by GitBook
On this page

Was this helpful?

  1. Endpoints

Collections

The route is designed to be resource-oriented and follows standard HTTP verbs.

PreviousRecords

Last updated 11 days ago

Was this helpful?

Get all records in a collection

get

Retrieve all records belonging to a specific collection

Authorizations
Path parameters
collectionIdstring ยท uuidRequired

Unique identifier of the collection

Responses
200
Records retrieved successfully
application/json
401
Unauthorized
application/json
403
Insufficient credit or access denied
application/json
404
Collection not found
application/json
get
GET /v2/collections/{collectionId}/records HTTP/1.1
Host: api.myjson.com
x-collection-access-token: YOUR_API_KEY
Accept: */*
{
  "records": [
    {
      "data": {
        "users": [
          {
            "id": 1,
            "email": "charles@myjson.online"
          }
        ]
      },
      "id": "fc36fa9a-3b43-407b-afbd-34916a5c45c7",
      "version": 1
    },
    {
      "data": {
        "users": [
          {
            "id": 2,
            "email": "olivier@myjson.online"
          }
        ]
      },
      "id": "68428999-ba18-47d1-8bb5-ebcbba1b2395",
      "version": 1
    }
  ]
}