Skip to content

Geo

GET/api/v1/geo
GET
/api/v1/geo

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Query Parameters

filter?

Conditions as filter[][]=. Conditions on different fields all apply. in (any of) and all (every one of, on fields holding several values) take a comma-separated list (\, for a literal comma). exists takes true or false. Datetimes are RFC 3339, now, or a time before now such as -30m, -6h or -7d.

q?string

Full-text search over this list's searchable fields.

Length1 <= length <= 200
sort?string

Comma-separated sort keys, - for descending, at most 1. Keys: entity_count, updated_at, created_at. Default: -created_at.

limit?integer

Rows per page, 1 to 100 (default 25).

Range1 <= value <= 100
cursor?string

The page.next_cursor of the previous page. Cannot be combined with page.

page?integer

A 1-based page number, for jumping. Cannot be combined with cursor.

Range1 <= value
total?boolean

Set to true to include the number of matching rows in page.total.

Response Body

application/json

curl -X GET "https://example.com/api/v1/geo"
{  "indexes": [    {      "active": true,      "config": {        "entity_ttl_seconds": 0,        "max_entities": 0,        "max_limit": 0,        "max_radius_meters": 0.1      },      "created_at": 0,      "description": "string",      "entity_count": 0,      "id": "string",      "name": "string",      "owner_id": "string",      "tags": {        "property1": "string",        "property2": "string"      },      "updated_at": 0    }  ],  "page": {    "has_more": true,    "next_cursor": "string",    "page": 0,    "total": 0  }}
POST/api/v1/geo
POST
/api/v1/geo

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/geo" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{  "created_at": 0,  "id": "string",  "name": "string"}
GET/api/v1/geo/{id}
GET
/api/v1/geo/{id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Geo index ID

Response Body

application/json

curl -X GET "https://example.com/api/v1/geo/string"
{  "active": true,  "config": {    "entity_ttl_seconds": 0,    "max_entities": 0,    "max_limit": 0,    "max_radius_meters": 0.1  },  "created_at": 0,  "description": "string",  "entity_count": 0,  "id": "string",  "name": "string",  "owner_id": "string",  "tags": {    "property1": "string",    "property2": "string"  },  "updated_at": 0}
PATCH/api/v1/geo/{id}
PATCH
/api/v1/geo/{id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Geo index ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PATCH "https://example.com/api/v1/geo/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "active": true,  "config": {    "entity_ttl_seconds": 0,    "max_entities": 0,    "max_limit": 0,    "max_radius_meters": 0.1  },  "created_at": 0,  "description": "string",  "entity_count": 0,  "id": "string",  "name": "string",  "owner_id": "string",  "tags": {    "property1": "string",    "property2": "string"  },  "updated_at": 0}
DELETE/api/v1/geo/{id}
DELETE
/api/v1/geo/{id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Geo index ID

Response Body

curl -X DELETE "https://example.com/api/v1/geo/string"
Empty
GET/api/v1/geo/{id}/distance
GET
/api/v1/geo/{id}/distance

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Geo index ID

Query Parameters

from_entity_id*string
to_entity_id*string
unit?string

Response Body

application/json

curl -X GET "https://example.com/api/v1/geo/string/distance?from_entity_id=string&to_entity_id=string"
{  "distance": 0.1,  "from_entity_id": "string",  "index_id": "string",  "to_entity_id": "string",  "unit": "string"}
GET/api/v1/geo/{id}/entities
GET
/api/v1/geo/{id}/entities

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Geo index ID

Query Parameters

limit?integer

Rows per page, 1 to 100 (default 25).

Range1 <= value <= 100
cursor?string

The page.next_cursor of the previous page. Cannot be combined with page.

page?integer

A 1-based page number, for jumping. Cannot be combined with cursor.

Range1 <= value
total?boolean

Set to true to include the number of matching rows in page.total.

Response Body

application/json

curl -X GET "https://example.com/api/v1/geo/string/entities"
{  "entities": [    {      "distance_meters": 0,      "entity_id": "string",      "last_updated": 0,      "latitude": 0.1,      "longitude": 0.1,      "metadata": null    }  ],  "index_id": "string",  "page": {    "has_more": true,    "next_cursor": "string",    "page": 0,    "total": 0  }}
POST/api/v1/geo/{id}/entities
POST
/api/v1/geo/{id}/entities

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Geo index ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/geo/string/entities" \  -H "Content-Type: application/json" \  -d '{    "entity_id": "string",    "latitude": 0.1,    "longitude": 0.1  }'
{  "entity_id": "string",  "index_id": "string",  "latitude": 0.1,  "longitude": 0.1,  "updated_at": 0}
POST/api/v1/geo/{id}/entities/batch
POST
/api/v1/geo/{id}/entities/batch

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Geo index ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/geo/string/entities/batch" \  -H "Content-Type: application/json" \  -d '{    "entities": [      {        "entity_id": "string",        "latitude": 0.1,        "longitude": 0.1      }    ]  }'
{  "index_id": "string",  "updated": 0}
GET/api/v1/geo/{id}/entities/{entity_id}
GET
/api/v1/geo/{id}/entities/{entity_id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Geo index ID

entity_id*string

Entity ID

Response Body

application/json

curl -X GET "https://example.com/api/v1/geo/string/entities/string"
{  "entity": {    "distance_meters": 0,    "entity_id": "string",    "last_updated": 0,    "latitude": 0.1,    "longitude": 0.1,    "metadata": null  },  "index_id": "string"}
DELETE/api/v1/geo/{id}/entities/{entity_id}
DELETE
/api/v1/geo/{id}/entities/{entity_id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Geo index ID

entity_id*string

Entity ID to delete

Response Body

application/json

curl -X DELETE "https://example.com/api/v1/geo/string/entities/string"
{  "deleted": true,  "entity_id": "string",  "index_id": "string"}
GET/api/v1/geo/{id}/fences
GET
/api/v1/geo/{id}/fences

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Geo index ID

Query Parameters

filter?

Conditions as filter[][]=. Conditions on different fields all apply. in (any of) and all (every one of, on fields holding several values) take a comma-separated list (\, for a literal comma). exists takes true or false. Datetimes are RFC 3339, now, or a time before now such as -30m, -6h or -7d.

q?string

Full-text search over this list's searchable fields.

Length1 <= length <= 200
sort?string

Comma-separated sort keys, - for descending, at most 1. Keys: updated_at, created_at. Default: -created_at.

limit?integer

Rows per page, 1 to 100 (default 25).

Range1 <= value <= 100
cursor?string

The page.next_cursor of the previous page. Cannot be combined with page.

page?integer

A 1-based page number, for jumping. Cannot be combined with cursor.

Range1 <= value
total?boolean

Set to true to include the number of matching rows in page.total.

Response Body

application/json

curl -X GET "https://example.com/api/v1/geo/string/fences"
{  "fences": [    {      "active": true,      "center_latitude": 0.1,      "center_longitude": 0.1,      "created_at": 0,      "description": "string",      "id": "string",      "index_id": "string",      "name": "string",      "owner_id": "string",      "radius_meters": 0.1,      "shape": "circle",      "tags": {        "property1": "string",        "property2": "string"      },      "updated_at": 0,      "vertices": [        {          "latitude": 0.1,          "longitude": 0.1        }      ]    }  ],  "page": {    "has_more": true,    "next_cursor": "string",    "page": 0,    "total": 0  }}
POST/api/v1/geo/{id}/fences
POST
/api/v1/geo/{id}/fences

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Geo index ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/geo/string/fences" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "shape": "circle"  }'
{  "active": true,  "center_latitude": 0.1,  "center_longitude": 0.1,  "created_at": 0,  "description": "string",  "id": "string",  "index_id": "string",  "name": "string",  "owner_id": "string",  "radius_meters": 0.1,  "shape": "circle",  "tags": {    "property1": "string",    "property2": "string"  },  "updated_at": 0,  "vertices": [    {      "latitude": 0.1,      "longitude": 0.1    }  ]}
GET/api/v1/geo/{id}/fences/{fence_id}
GET
/api/v1/geo/{id}/fences/{fence_id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Geo index ID

fence_id*string

Geo fence ID

Response Body

application/json

curl -X GET "https://example.com/api/v1/geo/string/fences/string"
{  "active": true,  "center_latitude": 0.1,  "center_longitude": 0.1,  "created_at": 0,  "description": "string",  "id": "string",  "index_id": "string",  "name": "string",  "owner_id": "string",  "radius_meters": 0.1,  "shape": "circle",  "tags": {    "property1": "string",    "property2": "string"  },  "updated_at": 0,  "vertices": [    {      "latitude": 0.1,      "longitude": 0.1    }  ]}
PATCH/api/v1/geo/{id}/fences/{fence_id}
PATCH
/api/v1/geo/{id}/fences/{fence_id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Geo index ID

fence_id*string

Geo fence ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PATCH "https://example.com/api/v1/geo/string/fences/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "active": true,  "center_latitude": 0.1,  "center_longitude": 0.1,  "created_at": 0,  "description": "string",  "id": "string",  "index_id": "string",  "name": "string",  "owner_id": "string",  "radius_meters": 0.1,  "shape": "circle",  "tags": {    "property1": "string",    "property2": "string"  },  "updated_at": 0,  "vertices": [    {      "latitude": 0.1,      "longitude": 0.1    }  ]}
DELETE/api/v1/geo/{id}/fences/{fence_id}
DELETE
/api/v1/geo/{id}/fences/{fence_id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Geo index ID

fence_id*string

Geo fence ID

Response Body

curl -X DELETE "https://example.com/api/v1/geo/string/fences/string"
Empty
GET/api/v1/geo/{id}/fences/{fence_id}/check
GET
/api/v1/geo/{id}/fences/{fence_id}/check

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Geo index ID

fence_id*string

Geo fence ID

Query Parameters

longitude*number
Formatdouble
latitude*number
Formatdouble

Response Body

application/json

curl -X GET "https://example.com/api/v1/geo/string/fences/string/check?longitude=0.1&latitude=0.1"
{  "distance_meters": 0.1,  "fence_id": "string",  "inside": true}
GET/api/v1/geo/{id}/query/bbox
GET
/api/v1/geo/{id}/query/bbox

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Geo index ID

Query Parameters

limit?integer

Rows per page, 1 to 100 (default 25).

Range1 <= value <= 100
cursor?string

The page.next_cursor of the previous page. Cannot be combined with page.

page?integer

A 1-based page number, for jumping. Cannot be combined with cursor.

Range1 <= value
min_longitude*number
Formatdouble
min_latitude*number
Formatdouble
max_longitude*number
Formatdouble
max_latitude*number
Formatdouble
with_coordinates?boolean

Response Body

application/json

curl -X GET "https://example.com/api/v1/geo/string/query/bbox?min_longitude=0.1&min_latitude=0.1&max_longitude=0.1&max_latitude=0.1"
{  "entities": [    {      "distance_meters": 0,      "entity_id": "string",      "last_updated": 0,      "latitude": 0.1,      "longitude": 0.1,      "metadata": null    }  ],  "page": {    "has_more": true,    "next_cursor": "string",    "page": 0,    "total": 0  },  "query_bounds": null,  "query_center": null,  "timestamp": 0}
GET/api/v1/geo/{id}/query/radius
GET
/api/v1/geo/{id}/query/radius

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Geo index ID

Query Parameters

limit?integer

Rows per page, 1 to 100 (default 25).

Range1 <= value <= 100
cursor?string

The page.next_cursor of the previous page. Cannot be combined with page.

page?integer

A 1-based page number, for jumping. Cannot be combined with cursor.

Range1 <= value
longitude*number
Formatdouble
latitude*number
Formatdouble
radius_meters*number
Formatdouble
unit?string
with_distance?boolean
with_coordinates?boolean

Response Body

application/json

curl -X GET "https://example.com/api/v1/geo/string/query/radius?longitude=0.1&latitude=0.1&radius_meters=0.1"
{  "entities": [    {      "distance_meters": 0,      "entity_id": "string",      "last_updated": 0,      "latitude": 0.1,      "longitude": 0.1,      "metadata": null    }  ],  "page": {    "has_more": true,    "next_cursor": "string",    "page": 0,    "total": 0  },  "query_bounds": null,  "query_center": null,  "timestamp": 0}
GET/api/v1/geo/{id}/stats
GET
/api/v1/geo/{id}/stats

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Geo index ID

Response Body

application/json

curl -X GET "https://example.com/api/v1/geo/string/stats"
{  "bounds": null,  "entity_count": 0,  "index_id": "string",  "index_name": "string",  "last_update": 0}