# Path Sort Clause

> For the complete documentation index, see [llms.txt](https://doc.ibexa.co/en/saas/llms.txt).

Path Sort Clause

The `Location\Path` Sort Clause sorts search results by the pathString of the location.

> **Note: Note**
>
> The `Location/Path` Sort Clause uses dictionary sorting.

## Arguments

- (optional) sorting direction, either `ascending` (default) or `descending`

## Example

In the REST API, this Sort Clause is called `LocationPath`. Use it in the `SortClauses` element of the payload of the [`POST /views`](https://doc.ibexa.co/en/saas/api/rest_api/rest_api_reference/rest_api_reference.html#tag/Views/operation/ibexa.rest.views.create) request:

**XML**

```xml
<Query>
    <SortClauses>
        <LocationPath>ascending</LocationPath>
    </SortClauses>
</Query>
```

**JSON**

```json
"Query": {
    "SortClauses": {
        "LocationPath": "ascending"
    }
}
```
