> For the complete documentation index, see [llms.txt](https://developer.collibra.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.collibra.com/api/guides/knowledge-graph/pagination.md).

# Pagination

You can use the following arguments for every collection field to page the results:

| Name   | Default value | Description                 |
| ------ | ------------- | --------------------------- |
| limit  | 10            | The maximum items to return |
| offset | 0             | The number of items to skip |

To select communities from 5th to 10th, each with a maximum of two child domains, use the following query:

```graphql
query {
  communities(limit: 5, offset: 5) {
    subDomains(limit: 2) {
      name
    }
  }
}
```

Offset-based pagination works well for the first pages, but using a very large offset will have a negative impact on performance. If you need to select many assets in small chunks it's better to achieve pagination using a `where` argument. For example, to fetch the first page, use:

{% code title="Query" %}

```graphql
query {
  assets(
    order: { id: asc }
    where: { id: { gt: "00000000-0000-0000-0000-000000000000" } }
  ) {
    id
    fullName
  }
}
```

{% endcode %}

{% code title="Response" %}

```json
{
  "data": {
    "assets": [
      {
        "id": "00000000-0000-0000-0000-000000008001",
        "fullName": "Data Quality Issue"
      },
      {
        "id": "00000000-0000-0000-0000-000000008002",
        "fullName": "Data Policy Issue"
      },
      {
        "id": "00000000-0000-0000-0000-000000008003",
        "fullName": "Data Definition Issue"
      },
      {
        "id": "00000000-0000-0000-0000-000000008004",
        "fullName": "Completeness Issue"
      },
      {
        "id": "00000000-0000-0000-0000-000000008005",
        "fullName": "Conformity Issue"
      },
      {
        "id": "00000000-0000-0000-0000-000000008006",
        "fullName": "Consistency Issue"
      },
      {
        "id": "00000000-0000-0000-0000-000000008007",
        "fullName": "Accuracy Issue"
      },
      {
        "id": "00000000-0000-0000-0000-000000008008",
        "fullName": "Duplication Issue"
      },
      {
        "id": "00000000-0000-0000-0000-000000008009",
        "fullName": "Integrity Issue"
      },
      {
        "id": "00000000-0000-0000-0000-000000008010",
        "fullName": "Policy non Compliance Issue"
      }
    ]
  }
}
```

{% endcode %}

For each of the next pages, use the ID of the last item in the where clause. In this example, with the default limit of 10 elements it's going to be `00000000-0000-0000-0000-000000008010`.

{% code title="Query" %}

```graphql
query {
  assets(
    order: { id: asc }
    where: { id: { gt: "00000000-0000-0000-0000-000000008010" } }
  ) {
    id
    fullName
  }
}
```

{% endcode %}

{% code title="Response" %}

```json
{
  "data": {
    "assets": [
      {
        "id": "00000000-0000-0000-0000-000000008011",
        "fullName": "Policy Is Missing"
      },
      {
        "id": "00000000-0000-0000-0000-000000008012",
        "fullName": "Definition not Clear"
      },
      {
        "id": "00000000-0000-0000-0000-000000008013",
        "fullName": "Definition not Correct"
      },
      {
        "id": "00000000-0000-0000-0000-000000008014",
        "fullName": "Definition Is Missing"
      },
      {
        "id": "00000000-0000-0000-0000-000000008041",
        "fullName": "Completeness"
      },
      {
        "id": "00000000-0000-0000-0000-000000008042",
        "fullName": "Conformity"
      },
      {
        "id": "00000000-0000-0000-0000-000000008043",
        "fullName": "Consistency"
      },
      {
        "id": "00000000-0000-0000-0000-000000008044",
        "fullName": "Accuracy"
      },
      {
        "id": "00000000-0000-0000-0000-000000008045",
        "fullName": "Duplication"
      },
      {
        "id": "00000000-0000-0000-0000-000000008046",
        "fullName": "Integrity"
      }
    ]
  }
}
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developer.collibra.com/api/guides/knowledge-graph/pagination.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
