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

ระเบียน

อ่าน สร้าง แก้ และลบระเบียนของตารางหรือฟอร์ม

เขียนหลายระเบียนในคำขอเดียว

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

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

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
data?array<>

The operations: insertOne, updateOne, deleteOne and so on.

option?

The options of bulkWrite.

Body ของคำตอบ

What the database reports.

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/bulkWrite" \  -H "Authorization: Bearer $TOKEN" \  -H "Content-Type: application/json" \  -d '{  "data": [],  "option": {}}'
{  "@meta": {},  "data": {}}

สร้างหลายระเบียน

PUT
/api/item/{id}/actions/createMany

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

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
data?array<>

The Records to create: each is the values of its fields.

Body ของคำตอบ

The ids of the new Records.

application/json
  1. response
@meta?

The name and version of the service that answered.

data?array<string>
curl -X PUT "https://platform.example.com/api/item/$ITEM_ID/actions/createMany" \  -H "Authorization: Bearer $TOKEN" \  -H "Content-Type: application/json" \  -d '{  "data": [    {      "name": "A"    },    {      "name": "B"    }  ]}'
{  "@meta": {},  "data": [    "string"  ]}

สร้างระเบียน

PUT
/api/item/{id}/actions/crud

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

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
[key: string]?any

Body ของคำตอบ

The id of the new Record.

application/json
  1. response
@meta?

The name and version of the service that answered.

data?string
curl -X PUT "https://platform.example.com/api/item/$ITEM_ID/actions/crud" \  -H "Authorization: Bearer $TOKEN" \  -H "Content-Type: application/json" \  -d '{  "name": "Pump station 4",  "status": "open",  "geometry": {    "type": "Point",    "coordinates": [      100.5,      13.75    ]  }}'
{  "@meta": {},  "data": "string"}

อ่านระเบียนหนึ่งระเบียน

GET
/api/item/{id}/actions/crud/{documentId}

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

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

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

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

id*string

The id of the Item.

documentId*string

The id of the Record.

Body ของคำตอบ

The Record.

application/json
  1. response
@meta?

The name and version of the service that answered.

data?

The values of the fields, by field id. A relation is { value, text }.

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

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

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

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

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

id*string

The id of the Item.

documentId*string

The id of the Record.

Body ของคำตอบ

The Record.

application/json
  1. response
@meta?

The name and version of the service that answered.

data?

The values of the fields, by field id. A relation is { value, text }.

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

ลบระเบียน

DELETE
/api/item/{id}/actions/crud/{documentId}

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

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

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

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

id*string

The id of the Item.

documentId*string

The id of the Record.

Body ของคำตอบ

The id of the Record.

application/json
  1. response
@meta?

The name and version of the service that answered.

data?string
curl -X DELETE "https://platform.example.com/api/item/$ITEM_ID/actions/crud/$RECORD_ID" \  -H "Authorization: Bearer $TOKEN"
{  "@meta": {},  "data": "string"}

แก้ระเบียน

PUT
/api/item/{id}/actions/crud/{documentId}

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

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

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

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

id*string

The id of the Item.

documentId*string

The id of the Record.

Body ของคำขอ

application/json
  1. body
[key: string]?any

Body ของคำตอบ

The id of the Record.

application/json
  1. response
@meta?

The name and version of the service that answered.

data?string
curl -X PUT "https://platform.example.com/api/item/$ITEM_ID/actions/crud/$RECORD_ID" \  -H "Authorization: Bearer $TOKEN" \  -H "Content-Type: application/json" \  -d '{  "status": "closed"}'
{  "@meta": {},  "data": "string"}

แสดงไฟล์แนบของระเบียน

GET
/api/item/{id}/actions/crud/{documentId}/attachments

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

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

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

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

id*string

The id of the Item.

documentId*string

The id of the Record.

Body ของคำตอบ

The attachments, by field id.

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/crud/$RECORD_ID/attachments" \  -H "Authorization: Bearer $TOKEN"
{  "@meta": {},  "data": {}}

อ่านไฟล์แนบหนึ่งไฟล์ของระเบียน

GET
/api/item/{id}/actions/crud/{documentId}/attachments/{attachmentId}

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

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

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

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

id*string

The id of the Item.

documentId*string

The id of the Record.

attachmentId*string

The id of the attachment.

Body ของคำตอบ

The bytes.

response?fileapplication/octet-stream
รูปแบบbinary
curl -X GET "https://platform.example.com/api/item/$ITEM_ID/actions/crud/$RECORD_ID/attachments/$ATTACHMENT_ID" \  -H "Authorization: Bearer $TOKEN"
"string"

แสดงเวอร์ชันของระเบียน

GET
/api/item/{id}/actions/crud/{documentId}/versions

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

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

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

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

id*string

The id of the Item.

documentId*string

The id of the Record.

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

limit?unknown

How many to return.

skip?unknown

How many to skip.

Body ของคำตอบ

The versions, newest first.

application/json
  1. response
@meta?

The name and version of the service that answered.

data?array<>
curl -X GET "https://platform.example.com/api/item/$ITEM_ID/actions/crud/$RECORD_ID/versions" \  -H "Authorization: Bearer $TOKEN"
{  "@meta": {},  "data": [    {}  ]}
PUT
/api/item/{id}/actions/deleteMany

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

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

The ids of the Records.

query?

A filter, used when there is no ids.

Body ของคำตอบ

The id of the Item.

application/json
  1. response
@meta?

The name and version of the service that answered.

data?string
curl -X PUT "https://platform.example.com/api/item/$ITEM_ID/actions/deleteMany" \  -H "Authorization: Bearer $TOKEN" \  -H "Content-Type: application/json" \  -d '{  "ids": [    "RECORD_ID"  ]}'
{  "@meta": {},  "data": "string"}

ลบทุกระเบียน

PUT
/api/item/{id}/actions/deleteMany/all

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

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

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

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

id*string

The id of the Item.

Body ของคำตอบ

The id of the Item.

application/json
  1. response
@meta?

The name and version of the service that answered.

data?string
curl -X PUT "https://platform.example.com/api/item/$ITEM_ID/actions/deleteMany/all" \  -H "Authorization: Bearer $TOKEN"
{  "@meta": {},  "data": "string"}

แก้หลายระเบียน

PUT
/api/item/{id}/actions/updateMany

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

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
query?

The filter.

data?

What to change, as a MongoDB update: { "$set": { "status": "closed" } }.

Body ของคำตอบ

What the database reports.

application/json
  1. response
@meta?

The name and version of the service that answered.

data?
curl -X PUT "https://platform.example.com/api/item/$ITEM_ID/actions/updateMany" \  -H "Authorization: Bearer $TOKEN" \  -H "Content-Type: application/json" \  -d '{  "query": {    "status": "open"  },  "data": {    "$set": {      "status": "closed"    }  }}'
{  "@meta": {},  "data": {}}