Drive
รายการใน Drive: แสดง สร้าง อัปโหลด คัดลอก ย้าย แชร์ ลบ และลบถาวร
การยืนยันตัวตนBearer <token>An access token of an OAuth client: Authorization: Bearer <token>.
application/json- body
id*unknownThe answer.
response?stringapplication/jsonThe id.
curl -X PUT "https://platform.example.com/api/drive/copy" \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "id": "..."}'"string"การยืนยันตัวตนBearer <token>An access token of an OAuth client: Authorization: Bearer <token>.
application/json- body
name?stringThe name.
description?stringA description.
organization?stringThe organization.
hidden?unknowntype?stringThe kind of Item.
subtype?stringThe subtype of the Item.
parent?stringThe id of the folder to put it in.
props?The properties of the thing, by kind.
extendedProps?Properties that Apps add, kept as they are.
The answer.
response?stringapplication/jsonThe id.
curl -X PUT "https://platform.example.com/api/drive/create-item" \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "description": "string", "organization": "string"}'"string"การยืนยันตัวตนBearer <token>An access token of an OAuth client: Authorization: Bearer <token>.
application/json- body
ids*array<unknown>The ids of the Items, as an array.
The answer.
application/json- response
The ids.
[index: integer]?stringcurl -X PUT "https://platform.example.com/api/drive/delete" \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "ids": []}'[ "string"]การยืนยันตัวตนBearer <token>An access token of an OAuth client: Authorization: Bearer <token>.
application/json- body
ids*array<unknown>The ids of the Items, as an array.
The answer.
application/json- response
The ids.
[index: integer]?stringcurl -X PUT "https://platform.example.com/api/drive/erase" \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "ids": []}'[ "string"]การยืนยันตัวตนBearer <token>An access token of an OAuth client: Authorization: Bearer <token>.
keyword?unknownWords to look for.
type?stringKinds of Item, separated by commas.
subtype?stringSubtypes of Item, separated by commas.
parent?stringThe id of the folder. Without it, the top of Drive.
owner?stringme, notme, any or system, or the id of a user.
trashed?booleanOnly the Items in the trash.
falserecursive?booleanSearch the folders inside the folder too.
falseimportable?booleanOnly the Items that can take an import.
exportable?booleanOnly the Items that can be exported.
executable?booleanOnly the Items that can be run.
skip?integerHow many to skip.
limit?integerHow many to return.
sortBy?stringrelevant only with a keyword.
"name""lastModified""relevant"sortOrder?string"ascending""descending"The answer.
application/json- response
total?integerdata?array<unknown>curl -X GET "https://platform.example.com/api/drive/explore" \ -H "Authorization: Bearer $TOKEN"{ "total": 0, "data": [ null ]}การยืนยันตัวตนBearer <token>An access token of an OAuth client: Authorization: Bearer <token>.
application/json- body
keyword?unknownWords to look for.
type?stringKinds of Item, separated by commas.
subtype?stringSubtypes of Item, separated by commas.
parent?stringThe id of the folder. Without it, the top of Drive.
owner?stringme, notme, any or system, or the id of a user.
hidden?booleanInclude hidden Items.
falsetrashed?booleanOnly the Items in the trash.
falserecursive?booleanSearch the folders inside the folder too.
falseimportable?booleanOnly the Items that can take an import.
exportable?booleanOnly the Items that can be exported.
executable?booleanOnly the Items that can be run.
skip?integerHow many to skip.
limit?integerHow many to return.
sortBy?stringrelevant only with a keyword.
"name""lastModified""relevant"sortOrder?string"ascending""descending"The answer.
application/json- response
total?integerdata?array<unknown>curl -X POST "https://platform.example.com/api/drive/explore" \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "keyword": "...", "type": "string", "subtype": "string"}'{ "total": 0, "data": [ null ]}การยืนยันตัวตนBearer <token>An access token of an OAuth client: Authorization: Bearer <token>.
application/json- body
source?unknownfileIndex?unknowncollectionIndex?unknowncreateOptions?unknownappendOptions?unknownupdateOptions?unknownThe answer.
curl -X PUT "https://platform.example.com/api/drive/import-data" \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "source": "...", "fileIndex": "...", "collectionIndex": "..."}'การยืนยันตัวตนBearer <token>An access token of an OAuth client: Authorization: Bearer <token>.
application/json- body
ids?array<unknown>The ids of the Items, as an array.
parent?stringThe id of the folder.
The answer.
application/json- response
The ids.
[index: integer]?stringcurl -X PUT "https://platform.example.com/api/drive/move" \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "ids": [], "parent": "string"}'[ "string"]การยืนยันตัวตนBearer <token>An access token of an OAuth client: Authorization: Bearer <token>.
application/json- body
ids*array<unknown>The ids of the Items, as an array.
The answer.
application/json- response
The ids.
[index: integer]?stringcurl -X PUT "https://platform.example.com/api/drive/restore" \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "ids": []}'[ "string"]การยืนยันตัวตนBearer <token>An access token of an OAuth client: Authorization: Bearer <token>.
permission*stringThe permission, as a JSON object.
ids*stringThe ids of the Items, as a JSON array.
recursive?stringtrue to set it on everything inside the folders too.
falseThe answer.
application/json- response
The ids.
[index: integer]?stringcurl -X GET "https://platform.example.com/api/drive/share?permission=VALUE&ids=VALUE" \ -H "Authorization: Bearer $TOKEN"[ "string"]การยืนยันตัวตนBearer <token>An access token of an OAuth client: Authorization: Bearer <token>.
One entry per kind of Item.
application/json- response
[index: integer]?curl -X GET "https://platform.example.com/api/drive/statistic" \ -H "Authorization: Bearer $TOKEN"[ { "_id": "string", "total": 0, "size": 0 }]การยืนยันตัวตนBearer <token>An access token of an OAuth client: Authorization: Bearer <token>.
The answer.
curl -X DELETE "https://platform.example.com/api/drive/trash" \ -H "Authorization: Bearer $TOKEN"การยืนยันตัวตนBearer <token>An access token of an OAuth client: Authorization: Bearer <token>.
id*stringThe id of the Item.
application/json- body
owner?unknownparent?stringThe id of the folder.
[key: string]?anyThe answer.
response?stringapplication/jsonThe id.
curl -X PUT "https://platform.example.com/api/drive/update-item/$ID" \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "owner": "...", "parent": "string"}'"string"การยืนยันตัวตนBearer <token>An access token of an OAuth client: Authorization: Bearer <token>.
- body
file?fileA file.
binaryparent?stringThe id of the folder.
forceUpdate?string"0"The answer.
response?stringapplication/jsonThe id.
curl -X PUT "https://platform.example.com/api/drive/upload" \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "file": "@file", "parent": "string", "forceUpdate": "0"}'"string"การยืนยันตัวตนBearer <token>An access token of an OAuth client: Authorization: Bearer <token>.
id*stringThe id of the Item.
- body
file?fileA file.
binaryparent?stringThe id of the folder.
forceUpdate?string"0"The answer.
response?stringapplication/jsonThe id.
curl -X PUT "https://platform.example.com/api/drive/upload/$ID" \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "file": "@file", "parent": "string", "forceUpdate": "0"}'"string"