> For the complete documentation index, see [llms.txt](https://api.dataloy.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api.dataloy.com/api-release-8.5/dataloy-rest-api/sorting.md).

# Sorting

It is possible sort the result of any search. The following type of sorting are supported:

* ASCENDING (ascending order,  case - or database sensitive)
* ASCENDING INSENSITIVE (ascending order, case-insensitive)
* DESCENDING (descending order, case - or database - sensitive)
* DESCENDING INSENSITIVE (descending order, case-insensitive)

ASCENDING

<http://localhost:8080/ws/rest/Vessel?sort=vesselName(AS)>

ASCENDING INSENSITIVE

<http://localhost:8080/ws/rest/Vessel?sort=vesselName(ASI)>

DESCENDING&#x20;

<http://localhost:8080/ws/rest/Vessel?sort=vesselName(DS)>

DESCENDING INSENSITIVE

<http://localhost:8080/ws/rest/Vessel?sort=vesselName(DSI>)

&#x20;

It is possible use sorting in combination with any filter and pagination:

<http://localhost:8080/ws/rest/Vessel?sort=vesselName(DSI)&filter=flag.countryCode(EQ)HK&pageNumber=4&limit=10>


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://api.dataloy.com/api-release-8.5/dataloy-rest-api/sorting.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
