> For the complete documentation index, see [llms.txt](https://docs.mylinkconnect.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mylinkconnect.com/database/database-api-access/query-collection-1/open-query.md).

# Open Query

This endpoint can will open a query cursor to a collection and return a cursor id that can be used to later move trough all records.

### Requirements

To successfully invoke this endpoint :

1. A [Bot Level Authorization Token](/connect-api/globa-platform-api/authorization.md#bot-level-token-request) must be created and sent in the header.
2. An active Database package must be active on the target account.
3. The desired [collection ](/database/collections.md)must exist and must be flagged as [accessible through API](/database/collections.md#enable-api-access).

### Request

The following request will create a cursor for the supplied collection applying [filters and sort](/database/database-api-access/url-filtering-syntax.md).

```batch
curl --location --request GET 'https://<API ROUTE>/data/<COLLECTIONNAME>/<FILTER>/<ORDERBY>' \
--header 'Authorization: Bearer <BOT AUTH TOKEN>' \
```

### Response

If successful, the unique id of the opened cursor will be returned

```bash
{
    "Result":"<cursor id>"
}
```

### Response Codes

This endpoint will reply with the following standard HTTP codes.

| Code | Meaning                                                                   |
| ---- | ------------------------------------------------------------------------- |
| 200  | Ok. The request has been successfully fulfilled.                          |
| 400  | Bad Request. The call does not contain the data required to be fulfilled. |
| 404  | Not Found. The specified collection has not been found.                   |
| 403  | Unauthorized. The specified collection cannot be access through API       |
