# /extent

## the extent of geometries in a PostGIS table.

<mark style="color:blue;">`GET`</mark> `geolytix.xyz/api/layer/extent`

Queries the extent of the PostGIS geometry field in a layer table or the topmost table in a layer tables array.

#### Query Parameters

| Name   | Type   | Description                     |
| ------ | ------ | ------------------------------- |
| locale | string | The layers locale.              |
| layer  | string | The layer key.                  |
| token  | string | Required for private endpoints. |

{% tabs %}
{% tab title="200 Returns comma separated min longitude, min latitude, max longitude, max latitude." %}
```javascript
-6.69424629211426,49.1409187316895,1.79668128490448,57.7356452941895
```
{% endtab %}

{% tab title="204 " %}
```
'No bounds.'
```
{% endtab %}

{% tab title="401 Returned when trying to access a private endpoint with an invalid or missing token." %}
```
'Invalid token'
```
{% endtab %}

{% tab title="406 Returned when a parameter is missing or does not match the loaded workspace." %}
```
'Invalid locale.'

'Invalid layer.'

'Invalid parameter.'
```
{% endtab %}

{% tab title="500 The node postgres module fails to perform query." %}
```
'Failed to query PostGIS table.'
```
{% endtab %}
{% endtabs %}

