aWhere Manual
DevelopAPIitem-services

Spatial

Find Records by where they are: inside a box, near a point, or crossing a geometry.

GET
/api/item/{id}/actions/bbox/{bbox}

Authorization

headerAuthorizationBearer <token>

An access token of an OAuth client: Authorization: Bearer <token>.

Path Parameters

id*string

The id of the Item.

bbox*string

The bounding box, as west,south,east,north in degrees.

Query Parameters

geometryInfo?string

How the Item keeps its location, as a JSON object, when it is not a geometry.

Default"{}"
query?string

A filter, as a JSON object.

limit?number

How many to return.

skip?number

How many to skip.

sort?string

The order, as a JSON object of field names to 1 or -1.

format?string

json for the Records, geojson for a FeatureCollection.

Default"json"
Value in"json""geojson"

Response Body

The Records, and how many match.

application/json
  1. response
@meta?

The name and version of the service that answered.

total?integer

How many match, before skip and limit.

data?array<>

The Records.

curl -X GET "https://platform.example.com/api/item/$ITEM_ID/actions/bbox/$BBOX" \  -H "Authorization: Bearer $TOKEN"
{  "@meta": {},  "total": 0,  "data": [    {}  ]}
POST
/api/item/{id}/actions/bbox/{bbox}

Authorization

headerAuthorizationBearer <token>

An access token of an OAuth client: Authorization: Bearer <token>.

Path Parameters

id*string

The id of the Item.

bbox*string

The bounding box, as west,south,east,north in degrees.

Request Body

application/json
  1. body
geometryInfo?

How the Item keeps its location, when it is not a geometry: { "type": "selectLatLonField", "latitudeField": "lat", "longitudeField": "lon" }.

Default"{}"
query?

A filter.

limit?integer

How many to return.

skip?integer

How many to skip.

sort?

The order, as a JSON object of field names to 1 or -1.

format?string

json for the Records, geojson for a FeatureCollection.

Default"json"
Value in"json""geojson"

Response Body

The Records, and how many match.

application/json
  1. response
@meta?

The name and version of the service that answered.

total?integer

How many match, before skip and limit.

data?array<>

The Records.

curl -X POST "https://platform.example.com/api/item/$ITEM_ID/actions/bbox/$BBOX" \  -H "Authorization: Bearer $TOKEN" \  -H "Content-Type: application/json" \  -d '{  "geometryInfo": "{}",  "query": {},  "limit": 0}'
{  "@meta": {},  "total": 0,  "data": [    {}  ]}
GET
/api/item/{id}/actions/getExtent

Authorization

headerAuthorizationBearer <token>

An access token of an OAuth client: Authorization: Bearer <token>.

Path Parameters

id*string

The id of the Item.

Query Parameters

keyword?string

Words to look for.

query?string

A filter, as a JSON object.

select?string

The fields to return, as a JSON object of field names to 1 or 0.

skip?integer

How many to skip.

limit?integer

How many to return; 10 when absent.

Default10
sort?string

The order, as a JSON object of field names to 1 or -1.

rawValue?boolean

Return the stored values, not the ones formatted for display.

Defaultfalse
rawField?boolean

Name the fields by their id, not by their display name.

Defaultfalse
format?string

The format of the answer.

Default"json"
formatOptions?string

Options of the format, as a JSON object.

Response Body

The extent.

application/json
  1. response
@meta?

The name and version of the service that answered.

data?
curl -X GET "https://platform.example.com/api/item/$ITEM_ID/actions/getExtent" \  -H "Authorization: Bearer $TOKEN"
{  "@meta": {},  "data": {}}
POST
/api/item/{id}/actions/getExtent

Authorization

headerAuthorizationBearer <token>

An access token of an OAuth client: Authorization: Bearer <token>.

Path Parameters

id*string

The id of the Item.

Request Body

application/json
  1. body
keyword?string

Words to look for.

query?

A filter, as a JSON object.

select?

The fields to return, as a JSON object of field names to 1 or 0.

skip?integer

How many to skip.

limit?integer

How many to return; 10 when absent.

Default10
sort?

The order, as a JSON object of field names to 1 or -1.

rawValue?boolean

Return the stored values, not the ones formatted for display.

Defaultfalse
rawField?boolean

Name the fields by their id, not by their display name.

Defaultfalse
format?string

The format of the answer.

Default"json"
formatOptions?

Options of the format, as a JSON object.

[key: string]?any

Response Body

The extent.

application/json
  1. response
@meta?

The name and version of the service that answered.

data?
curl -X POST "https://platform.example.com/api/item/$ITEM_ID/actions/getExtent" \  -H "Authorization: Bearer $TOKEN" \  -H "Content-Type: application/json" \  -d '{  "keyword": "string",  "query": {},  "select": {}}'
{  "@meta": {},  "data": {}}
POST
/api/item/{id}/actions/intersects

Authorization

headerAuthorizationBearer <token>

An access token of an OAuth client: Authorization: Bearer <token>.

Path Parameters

id*string

The id of the Item.

Request Body

application/json
  1. body
geometry*

A GeoJSON geometry.

query?

A filter.

skip?integer

How many to skip.

limit?integer

How many to return.

format?string

json for the Records, geojson for a FeatureCollection.

Default"json"
Value in"json""geojson"

Response Body

The Records, and how many match.

application/json
  1. response
@meta?

The name and version of the service that answered.

total?integer

How many match, before skip and limit.

data?array<>

The Records.

curl -X POST "https://platform.example.com/api/item/$ITEM_ID/actions/intersects" \  -H "Authorization: Bearer $TOKEN" \  -H "Content-Type: application/json" \  -d '{  "geometry": {    "type": "Polygon",    "coordinates": [      [        [          100.4,          13.7        ],        [          100.6,          13.7        ],        [          100.6,          13.8        ],        [          100.4,          13.7        ]      ]    ]  }}'
{  "@meta": {},  "total": 0,  "data": [    {}  ]}
POST
/api/item/{id}/actions/near

Authorization

headerAuthorizationBearer <token>

An access token of an OAuth client: Authorization: Bearer <token>.

Path Parameters

id*string

The id of the Item.

Request Body

application/json
  1. body
geometry*

A GeoJSON Point to measure from.

query?

A filter.

distanceField?string

The name of the field that gets the distance.

Default"distance"
maxDistance?number

The farthest, in metres.

minDistance?number

The nearest, in metres.

skip?integer

How many to skip.

limit?integer

How many to return.

format?string

json for the Records, geojson for a FeatureCollection.

Default"json"
Value in"json""geojson"

Response Body

The Records, and how many match.

application/json
  1. response
@meta?

The name and version of the service that answered.

total?integer

How many match, before skip and limit.

data?array<>

The Records, nearest first.

curl -X POST "https://platform.example.com/api/item/$ITEM_ID/actions/near" \  -H "Authorization: Bearer $TOKEN" \  -H "Content-Type: application/json" \  -d '{  "geometry": {    "type": "Point",    "coordinates": [      100.5,      13.75    ]  }}'
{  "@meta": {},  "total": 0,  "data": [    {}  ]}