คู่มือ aWhere
พัฒนาAPIitem-services

ข้อมูลเชิงพื้นที่

ค้นหาระเบียนตามที่ตั้ง: ในกรอบ ใกล้จุด หรือตัดกับรูปทรง

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

การยืนยันตัวตน

headerการยืนยันตัวตนBearer <token>

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

พารามิเตอร์ใน Path

id*string

The id of the Item.

bbox*string

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

พารามิเตอร์ใน Query

geometryInfo?string

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

ค่าเริ่มต้น"{}"
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.

ค่าเริ่มต้น"json"
ค่าที่รับ"json""geojson"

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}

การยืนยันตัวตน

headerการยืนยันตัวตนBearer <token>

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

พารามิเตอร์ใน Path

id*string

The id of the Item.

bbox*string

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

Body ของคำขอ

application/json
  1. body
geometryInfo?

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

ค่าเริ่มต้น"{}"
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.

ค่าเริ่มต้น"json"
ค่าที่รับ"json""geojson"

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)

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

การยืนยันตัวตน

headerการยืนยันตัวตนBearer <token>

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

พารามิเตอร์ใน Path

id*string

The id of the Item.

พารามิเตอร์ใน Query

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.

ค่าเริ่มต้น10
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.

ค่าเริ่มต้นfalse
rawField?boolean

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

ค่าเริ่มต้นfalse
format?string

The format of the answer.

ค่าเริ่มต้น"json"
formatOptions?string

Options of the format, as a JSON object.

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

การยืนยันตัวตน

headerการยืนยันตัวตนBearer <token>

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

พารามิเตอร์ใน Path

id*string

The id of the Item.

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.

ค่าเริ่มต้น10
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.

ค่าเริ่มต้นfalse
rawField?boolean

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

ค่าเริ่มต้นfalse
format?string

The format of the answer.

ค่าเริ่มต้น"json"
formatOptions?

Options of the format, as a JSON object.

[key: string]?any

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": {}}

ค้นหาระเบียนที่ตัดกับ geometry

POST
/api/item/{id}/actions/intersects

การยืนยันตัวตน

headerการยืนยันตัวตนBearer <token>

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

พารามิเตอร์ใน Path

id*string

The id of the Item.

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.

ค่าเริ่มต้น"json"
ค่าที่รับ"json""geojson"

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

การยืนยันตัวตน

headerการยืนยันตัวตนBearer <token>

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

พารามิเตอร์ใน Path

id*string

The id of the Item.

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.

ค่าเริ่มต้น"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.

ค่าเริ่มต้น"json"
ค่าที่รับ"json""geojson"

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": [    {}  ]}