# Limit and Skip

This parameter allows you to control the number of objects that are retrieved in a request.

<table><thead><tr><th width="518">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?limit=</code><em><code>x</code></em></td><td>GET</td></tr><tr><td><code>/api/v4/</code><em><code>backend-deployment-id</code></em><code>/objects/</code><em><code>model</code></em><code>.json?limit=</code><em><code>x</code></em><code>&#x26;skip=</code><em><code>y</code></em></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`.
* Replace *`x`* and *`y`* with integers.
  {% endhint %}

### Parameters

`skip` and `limit` parameters are specified as non-negative integer values.

### Response

The response will contain a list of objects numbering no more than the `limit`, and offset by the value of `skip`. For example, `limit=10&skip=10` will skip the first ten objects and return no more than ten objects, i.e. the eleventh through the twentieth.

### Examples

{% 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 %}

#### Retrieve the 5th page of 10 objects:

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

```http
GET BASE-URL/api/v4/533bda53027894f69b001055/objects/tasks.json?limit=10&skip=40
```

{% endtab %}

{% tab title="curl" %}

```shell
curl "BASE-URL/api/v4/533bda53027894f69b001055/objects/tasks.json?limit=10&skip=40" \
    -u "533bda53027894f69b001055:7Ajj5htRY1uzw7b4w23V"
```

{% endtab %}

{% tab title="ruby" %}

```ruby
require 'rest-client'
journey = RestClient::Resource.new "BASE-URL/api/v4", "533bda53027894f69b001055", "7Ajj5htRY1uzw7b4w23V"
journey["533bda53027894f69b001055/objects/tasks.json"].get :params => {:limit=>10, :skip=>40}
```

{% endtab %}
{% endtabs %}

#### Retrieve the five most recently modified objects:

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

```http
GET BASE-URL/api/v4/533bda53027894f69b001055/objects/tasks.json?limit=5&sort[updated_at]=desc
```

{% endtab %}

{% tab title="curl" %}

<pre class="language-shell"><code class="lang-shell"><strong>curl "BASE-URL/api/v4/533bda53027894f69b001055/objects/tasks.json?limit=5&#x26;sort[updated_at]=desc" \
</strong>    -g -u "533bda53027894f69b001055:7Ajj5htRY1uzw7b4w23V"
</code></pre>

{% endtab %}

{% tab title="ruby" %}

```ruby
require 'rest-client'
journey = RestClient::Resource.new "BASE-URL/api/v4", "533bda53027894f69b001055", "7Ajj5htRY1uzw7b4w23V"
journey["533bda53027894f69b001055/objects/tasks.json"].get :params => {:sort=>{:updated_at=>"desc"}, :limit=>5}
```

{% endtab %}
{% endtabs %}
