---
title: "List objects of a definition in a space"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.cloudraker.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List objects of a definition in a space

Path: CloudRaker Workspace API › Data Objects

`GET /spaces/{spaceId}/objects/{definitionId}`

Lists the objects (records) of a definition within a space. Authorization: requires `space:read` on `:spaceId` — a caller who lacks it gets **404** (leak-guard, not 403). Query params: `filter` — a JSON array of filter entries (`{ fieldKey, subField?, operand, value }`, 14 operands); `sort` — a JSON array of sort entries (`{ fieldKey, direction: asc|desc }`); `view` — a saved-view id whose stored filters/sorts are applied instead, **mutually exclusive with `filter`/`sort`** (400 `invalid_request`); `limit` (1–200, default 50) and `offset` (default 0) for pagination. Default sort is `createdAt` desc. Unknown/archived field or a `$`-injection in filter/sort → 422; an unknown/wrong-scope `view` → 404 `view_not_found`. Returns `{ objects, nextOffset }` — `nextOffset` is the offset of the next page or `null` when exhausted; each object carries inline `data`, `fieldMeta`, (when AI-imported) `provenance`/`review`, and (when produced by an action run) an `origin` `{ actionRunId?, playbookRunId? }`.

## Authentication

- `bearerAuth`, http, header `Authorization`

## Path parameters

- `spaceId` (`listObjects.path.spaceId`; string, required)
- `definitionId` (`listObjects.path.definitionId`; string, required)

## Query parameters

- `filter` (`listObjects.query.filter`; string, optional) — Ad-hoc filter: a JSON array of `{ fieldKey, subField?, operand, value }` entries.
- `sort` (`listObjects.query.sort`; string, optional) — Ad-hoc sort: a JSON array of `{ fieldKey, direction }` entries.
- `view` (`listObjects.query.view`; string, optional) — A saved-view id whose stored filters and sorts are applied instead. Mutually exclusive with `filter` and `sort`.
- `limit` (`listObjects.query.limit`; integer, optional) — Page size, 1–200.
  - min 1; max 200; default `50`
- `offset` (`listObjects.query.offset`; integer, optional) — Row offset.
  - min 0; default `0`

## Code samples

### cURL

```bash
curl --request GET \
  --url 'https://api.cloudraker.com/spaces/<spaceId>/objects/<definitionId>' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.cloudraker.com/spaces/<spaceId>/objects/<definitionId>';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.cloudraker.com/spaces/<spaceId>/objects/<definitionId>"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

A page of objects.

#### Example

```json
{
  "objects": [
    {
      "_id": "string",
      "spaceId": "string",
      "definitionId": "string",
      "definitionVersion": 0,
      "data": {
        "property1": null,
        "property2": null
      },
      "fieldMeta": {
        "property1": {
          "modifiedBy": "string",
          "modifiedAt": "2019-08-24T14:15:22Z",
          "source": "string",
          "locked": true
        },
        "property2": {
          "modifiedBy": "string",
          "modifiedAt": "2019-08-24T14:15:22Z",
          "source": "string",
          "locked": true
        }
      },
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z",
      "createdBy": "string",
      "updatedBy": "string",
      "deletedAt": "2019-08-24T14:15:22Z",
      "provenance": {
        "property1": [
          {
            "property1": null,
            "property2": null
          }
        ],
        "property2": [
          {
            "property1": null,
            "property2": null
          }
        ]
      },
      "review": {
        "property1": {
          "status": "pending",
          "by": "string",
          "at": "2019-08-24T14:15:22Z",
          "note": "string"
        },
        "property2": {
          "status": "pending",
          "by": "string",
          "at": "2019-08-24T14:15:22Z",
          "note": "string"
        }
      },
      "origin": {
        "actionRunId": "string",
        "playbookRunId": "string"
      }
    }
  ],
  "nextOffset": 0
}
```

- `objects` (`listObjects.response.200.objects`; array<object>, required)
  - `_id` (`listObjects.response.200.objects._id`; string, required)
  - `spaceId` (`listObjects.response.200.objects.spaceId`; string, required)
  - `definitionId` (`listObjects.response.200.objects.definitionId`; string, required)
  - `definitionVersion` (`listObjects.response.200.objects.definitionVersion`; number, required)
  - `data` (`listObjects.response.200.objects.data`; map<unknown>, required) — Field values keyed by field key.
  - `fieldMeta` (`listObjects.response.200.objects.fieldMeta`; map<object>, required)
  - `createdAt` (`listObjects.response.200.objects.createdAt`; string, required)
    - format `date-time`; pattern `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`
  - `updatedAt` (`listObjects.response.200.objects.updatedAt`; string, required)
    - format `date-time`; pattern `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$`
  - `createdBy` (`listObjects.response.200.objects.createdBy`; string, required)
  - `updatedBy` (`listObjects.response.200.objects.updatedBy`; string, required)
  - `deletedAt` (`listObjects.response.200.objects.deletedAt`; any of, required)
    - any of: `string`, `null`
  - `provenance` (`listObjects.response.200.objects.provenance`; map<array<map<unknown>>>, optional) — Per-field grounding: field key → citation pointers, imported verbatim from the extraction feed.
  - `review` (`listObjects.response.200.objects.review`; map<object>, optional) — Per-field review state. An approved or rejected field is locked against edits.
  - `origin` (`listObjects.response.200.objects.origin`; object, optional) — Set on create, never patchable.
    - `actionRunId` (`listObjects.response.200.objects.origin.actionRunId`; string, optional)
    - `playbookRunId` (`listObjects.response.200.objects.origin.playbookRunId`; string, optional) — Set only when a playbook dispatched the run; callers cannot claim it.
- `nextOffset` (`listObjects.response.200.nextOffset`; number | null, required) — Offset of the next page, or null when the list is exhausted.

### 400

`invalid_request` — `view` combined with `filter`/`sort`.

### 404

Missing `space:read`, or an unknown `view` id.

### 422

The `filter`/`sort` references an unknown/archived field or is malformed.


Source: https://docs.cloudraker.com/workspace/api/data-objects/list-objects/index.md
