# Retrieve All Objects

<table><thead><tr><th width="443">Relative URL</th><th>HTTP Request Method</th></tr></thead><tbody><tr><td><code>/api/v4/</code><em><code>backend-deployment-id</code></em><code>/objects/</code><em><code>model</code></em><code>.json</code></td><td>GET</td></tr></tbody></table>

{% hint style="info" %}
Replace *`model`* with the type of object that you wish to retrieve (as defined in your app's Data Model), for example `person`, `job` or `asset`
{% endhint %}

### Parameters

This function does not take any parameters.

### Response

The response includes a list of up to 1000 objects of the given type, as well as pagination data. Each item in the list represents a single object. Each item contains:

| Key             | Description                                                                                                                                                                                                                                                                                                   |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`            | This is a globally unique [UUID](http://en.wikipedia.org/wiki/Universally_unique_identifier) that is automatically assigned by JourneyApps to each object.                                                                                                                                                    |
| `type`          | The name of the model for the object.                                                                                                                                                                                                                                                                         |
| `updated_at`    | A timestamp indicating when last the object on the server was updated by any means (e.g. from mobile device, API, data browser, etc.).                                                                                                                                                                        |
| `display`       | The display label for the object, as defined in the data model.                                                                                                                                                                                                                                               |
| `Fields`        | All the fields included in the object, including attachments. For the format of all the different field types, see the [Field Representation](https://docs.journeyapps.com/reference/backend-api/api-reference/field-representation) section.                                                                 |
| `Relationships` | <p>The IDs of related objects that the object belongs to (for your <a href="../../build/data-model-configuration/model/belongs-to">belongs-to</a> relationships).</p><p>You can optionally embed the related objects directly — refer to <a href="retrieve-a-single-object">Retrieve a Single Object</a>.</p> |

Pagination data (see the [Counting](https://docs.journeyapps.com/reference/backend-api/api-reference/counting-objects) and [Limiting and Skipping](https://docs.journeyapps.com/reference/backend-api/api-reference/limiting-and-skipping) section for more details):

| Key     | Description                                       |
| ------- | ------------------------------------------------- |
| `count` | The number of objects in the response.            |
| `total` | The total number of objects matched by the query. |
| `more`  | `true` if there are more remaining objects.       |

{% hint style="info" %}
By default the `total` key is excluded from `fetch` calls made from CloudCode or OnlineDB. Specify `total=true` as a URL parameter to include it.
{% endhint %}

Also, take a look at the example below.

### Example

{% hint style="info" %}
**BASE-URL**

The below examples contain a `BASE-URL` placeholder. Please refer to the [HTTP Endpoints](https://docs.journeyapps.com/reference/introduction#http-endpoints) section to get the base URL relevant to your deployment.
{% endhint %}

{% hint style="info" %}
curl is a command-line tool that allows you to make HTTP requests easily, which is useful for playing around with an API. It usually comes standard on Linux and OS X, and for Windows you can download it [here](http://curl.haxx.se/download.html) from the official website (choose \*Win32\*). The `-u` parameter in the examples below specify the username and password for authentication (refer to the [Enabling the API](https://docs.journeyapps.com/reference/introduction#enabling-the-api) section).
{% endhint %}

Sample request:

{% tabs %}
{% tab title="HTTP" %}

```http
GET BASE-URL/api/v4/533bda53027894f69b001055/objects/task.json
```

{% endtab %}

{% tab title="curl" %}

```shell
curl "BASE-URL/api/v4/533bda53027894f69b001055/objects/task.json" \
    -u "533bda53027894f69b001055:7Ajj5htRY1uzw7b4w23V"
```

{% endtab %}

{% tab title="ruby" %}

```ruby
require 'rest-client'
journey = RestClient::Resource.new "BASE-URL/api/v4", "533bda53027894f69b001055", "7Ajj5htRY1uzw7b4w23V"
journey["533bda53027894f69b001055/objects/task.json"].get
```

{% endtab %}
{% endtabs %}

Sample response:

{% code title="json" %}

```json
{
  "objects": [
    {
      "id": "42059e2e-d2a2-11e3-a9f3-001e6733fe3c",
      "type": "task",
      "updated_at": "2015-02-05T08:17:01Z",
      "display": "Wash Dishes",
      "name": "Wash Dishes",
      "instructions": "",
      "status": {
        "key": 0,
        "display": "Open"
      },
      "category_id": "71fafc16-ba4f-11e3-8de0-001e6733fe3c"
    },
    {
      "id": "c3d3db52-ba4a-11e3-a567-001e6733fe3c",
      "type": "task",
      "updated_at": "2015-02-05T08:17:41Z",
      "display": "Do Laundry",
      "name": "Do Laundry",
      "instructions": "Separate light and dark colors",
      "status": {
        "key": 1,
        "display": "Closed"
      },
      "category_id": "71fafc16-ba4f-11e3-8de0-001e6733fe3c"
    },
    {
      "id": "c3d59ff0-ba4a-11e3-a567-001e6733fe3c",
      "type": "task",
      "updated_at": "2015-02-05T08:17:58Z",
      "display": "Buy Groceries",
      "name": "Buy Groceries",
      "instructions": "Not too much",
      "status": {
        "key": 1,
        "display": "Closed"
      },
      "category_id": "71fafc16-ba4f-11e3-8de0-001e6733fe3c"
    }
  ],
  "count": 3,
  "total": 3,
  "more": false
}
```

{% endcode %}

### FAQs

#### How do I filter these objects?

To filter the objects that you are retrieving, see the Querying Objects section.

#### How do I count the number of objects?

See the Counting, Limiting and Skipping section.
