# Collections

## Get all records in a collection

> Retrieve all records belonging to a specific collection

```json
{"openapi":"3.1.0","info":{"title":"myJson API V2","version":"2.0.0"},"servers":[{"url":"https://api.myjson.online/v2","description":"Production server"}],"security":[{"CollectionAccessToken":[]}],"components":{"securitySchemes":{"CollectionAccessToken":{"type":"apiKey","in":"header","name":"x-collection-access-token","description":"Access token required for private collections (available on the specific collection's page)"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/collections/{collectionId}/records":{"get":{"summary":"Get all records in a collection","description":"Retrieve all records belonging to a specific collection","responses":{"200":{"description":"Records retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"records":{"type":"array","items":{"type":"object","properties":{"data":{"type":"object","description":"The JSON data stored in the record"},"id":{"type":"string","format":"uuid","description":"Unique identifier of the record"},"version":{"type":"integer","description":"Version number of the record"}}}}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient credit or access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Collection not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```
