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

รายการ

ตัวรายการ: คืออะไร อยู่ที่ไหน ใครเปิดได้ และทำอะไรได้บ้าง

ตอบว่าบริการทำงานอยู่

GET
/api/item

Body ของคำตอบ

The service.

application/json
  1. response
@meta?

The name and version of the service that answered.

curl -X GET "https://platform.example.com/api/item"
{  "@meta": {}}
GET
/api/item/{id}

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

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

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

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

id*string

The id of the Item.

Body ของคำตอบ

The Item and its routes.

application/json
  1. response
@meta?

The name and version of the service that answered.

type?string

The kind of Item.

routes?array<string>

The endpoints that the Item has.

data?

The Item.

curl -X GET "https://platform.example.com/api/item/$ITEM_ID" \  -H "Authorization: Bearer $TOKEN"
{  "@meta": {},  "type": "string",  "routes": [    "string"  ],  "data": {}}
GET
/api/item/{id}/actions

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

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

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

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

id*string

The id of the Item.

Body ของคำตอบ

The answer.

application/json
  1. response
@meta?

The name and version of the service that answered.

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

อ่านรายละเอียดของรายการ

GET
/api/item/{id}/details

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

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

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

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

id*string

The id of the Item.

Body ของคำตอบ

The Item.

application/json
  1. response
@meta?

The name and version of the service that answered.

data?

The Item, with children for a folder.

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

แสดงโฟลเดอร์ที่รายการอยู่

GET
/api/item/{id}/location

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

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

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

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

id*string

The id of the Item.

Body ของคำตอบ

The path.

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/location" \  -H "Authorization: Bearer $TOKEN"
{  "@meta": {},  "data": [    {}  ]}

อ่านว่าใครเปิดรายการได้

GET
/api/item/{id}/permission

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

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

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

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

id*string

The id of the Item.

Body ของคำตอบ

The answer.

application/json
  1. response
@meta?

The name and version of the service that answered.

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

แก้ว่าใครเปิดรายการได้

PUT
/api/item/{id}/permission

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

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

The permission to set: who can open the Item and with which role.

recursive?boolean

Set it on everything inside a folder too.

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/permission" \  -H "Authorization: Bearer $TOKEN" \  -H "Content-Type: application/json" \  -d '{  "permission": {},  "recursive": false}'
{  "@meta": {},  "data": "string"}
GET
/api/item/{id}/sharing/targets

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

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.

excludeUsers?string
excludeGroups?string
skip?integer

How many to skip.

ค่าเริ่มต้น0
limit?integer

How many to return.

ค่าเริ่มต้น100

Body ของคำตอบ

The answer.

application/json
  1. response
@meta?

The name and version of the service that answered.

data?unknown
curl -X GET "https://platform.example.com/api/item/$ITEM_ID/sharing/targets" \  -H "Authorization: Bearer $TOKEN"
{  "@meta": {},  "data": null}