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

การค้นหาและวิเคราะห์

ค้นหาระเบียน รวมกลุ่ม และดูสถิติของฟิลด์

รัน aggregation บนระเบียน

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

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

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

The stages of the pipeline.

[index: integer]?

Body ของคำตอบ

The result of the pipeline.

application/json
  1. response
@meta?

The name and version of the service that answered.

data?array<>
curl -X POST "https://platform.example.com/api/item/$ITEM_ID/actions/aggregate" \  -H "Authorization: Bearer $TOKEN" \  -H "Content-Type: application/json" \  -d '[  {    "$match": {      "status": "open"    }  },  {    "$group": {      "_id": "$district",      "count": {        "$sum": 1      }    }  }]'
{  "@meta": {},  "data": [    {}  ]}

คำนวณสถิติของฟิลด์

POST
/api/item/{id}/actions/field-stats

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

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
fields?array<string>

The ids of the fields.

sampleLimit?integer

How many Records to look at.

Body ของคำตอบ

The statistics, by field.

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/field-stats" \  -H "Authorization: Bearer $TOKEN" \  -H "Content-Type: application/json" \  -d '{  "fields": [],  "sampleLimit": 0}'
{  "@meta": {},  "data": {}}
GET
/api/item/{id}/actions/find

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

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"
ค่าที่รับ"json""geojson""csv"
formatOptions?string

Options of the format, as a JSON object.

Body ของคำตอบ

The Records on this page, 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/find" \  -H "Authorization: Bearer $TOKEN"
{  "@meta": {},  "total": 0,  "data": [    {}  ]}
POST
/api/item/{id}/actions/find

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

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"
ค่าที่รับ"json""geojson""csv"
formatOptions?

Options of the format, as a JSON object.

Body ของคำตอบ

The Records on this page, 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/find" \  -H "Authorization: Bearer $TOKEN" \  -H "Content-Type: application/json" \  -d '{  "keyword": "string",  "query": {},  "select": {}}'
{  "@meta": {},  "total": 0,  "data": [    {}  ]}

แสดงค่าที่ฟิลด์ lookup เลือกได้ (GET)

GET
/api/item/{id}/actions/getLookupData/{fieldId}

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

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

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

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

id*string

The id of the Item.

fieldId*string

The id of the field, as in the Item's schema.

พารามิเตอร์ใน 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 values.

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<>
curl -X GET "https://platform.example.com/api/item/$ITEM_ID/actions/getLookupData/$FIELD_ID" \  -H "Authorization: Bearer $TOKEN"
{  "@meta": {},  "total": 0,  "data": [    {}  ]}

แสดงค่าที่ฟิลด์ lookup เลือกได้ (POST)

POST
/api/item/{id}/actions/getLookupData/{fieldId}

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

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

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

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

id*string

The id of the Item.

fieldId*string

The id of the field, as in the Item's schema.

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 values.

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<>
curl -X POST "https://platform.example.com/api/item/$ITEM_ID/actions/getLookupData/$FIELD_ID" \  -H "Authorization: Bearer $TOKEN" \  -H "Content-Type: application/json" \  -d '{  "keyword": "string",  "query": {},  "select": {}}'
{  "@meta": {},  "total": 0,  "data": [    {}  ]}

ค้นหาระเบียนด้วย query (GET)

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

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

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"
ค่าที่รับ"json""geojson""csv"
formatOptions?string

Options of the format, as a JSON object.

Body ของคำตอบ

The Records on this page, 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/query" \  -H "Authorization: Bearer $TOKEN"
{  "@meta": {},  "total": 0,  "data": [    {}  ]}

ค้นหาระเบียนด้วย query (POST)

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

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

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"
ค่าที่รับ"json""geojson""csv"
formatOptions?

Options of the format, as a JSON object.

Body ของคำตอบ

The Records on this page, 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/query" \  -H "Authorization: Bearer $TOKEN" \  -H "Content-Type: application/json" \  -d '{  "keyword": "string",  "query": {},  "select": {}}'
{  "@meta": {},  "total": 0,  "data": [    {}  ]}