aWhere Manual
DevelopAPIcore-services

Drive

The Items of Drive: list, create, upload, copy, move, share, trash and erase.

Copy Items

PUT
/api/drive/copy

Authorization

headerAuthorizationBearer <token>

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

Request Body

application/json
  1. body
id*unknown

Response Body

The answer.

response?stringapplication/json

The id.

curl -X PUT "https://platform.example.com/api/drive/copy" \  -H "Authorization: Bearer $TOKEN" \  -H "Content-Type: application/json" \  -d '{  "id": "..."}'
"string"

Create an Item

PUT
/api/drive/create-item

Authorization

headerAuthorizationBearer <token>

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

Request Body

application/json
  1. body
name?string

The name.

description?string

A description.

organization?string

The organization.

hidden?unknown
type?string

The kind of Item.

subtype?string

The subtype of the Item.

parent?string

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

Response Body

The answer.

response?stringapplication/json

The 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"

Move Items to the trash

PUT
/api/drive/delete

Authorization

headerAuthorizationBearer <token>

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

Request Body

application/json
  1. body
ids*array<unknown>

The ids of the Items, as an array.

Response Body

The answer.

application/json
  1. response

The ids.

[index: integer]?string
curl -X PUT "https://platform.example.com/api/drive/delete" \  -H "Authorization: Bearer $TOKEN" \  -H "Content-Type: application/json" \  -d '{  "ids": []}'
[  "string"]
PUT
/api/drive/erase

Authorization

headerAuthorizationBearer <token>

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

Request Body

application/json
  1. body
ids*array<unknown>

The ids of the Items, as an array.

Response Body

The answer.

application/json
  1. response

The ids.

[index: integer]?string
curl -X PUT "https://platform.example.com/api/drive/erase" \  -H "Authorization: Bearer $TOKEN" \  -H "Content-Type: application/json" \  -d '{  "ids": []}'
[  "string"]
GET
/api/drive/explore

Authorization

headerAuthorizationBearer <token>

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

Query Parameters

keyword?unknown

Words to look for.

type?string

Kinds of Item, separated by commas.

subtype?string

Subtypes of Item, separated by commas.

parent?string

The id of the folder. Without it, the top of Drive.

owner?string

me, notme, any or system, or the id of a user.

hidden?boolean

Include hidden Items.

Defaultfalse
trashed?boolean

Only the Items in the trash.

Defaultfalse
recursive?boolean

Search the folders inside the folder too.

Defaultfalse
importable?boolean

Only the Items that can take an import.

exportable?boolean

Only the Items that can be exported.

executable?boolean

Only the Items that can be run.

skip?integer

How many to skip.

limit?integer

How many to return.

sortBy?string

relevant only with a keyword.

Value in"name""lastModified""relevant"
sortOrder?string
Value in"ascending""descending"

Response Body

The answer.

application/json
  1. response
total?integer
data?array<unknown>
curl -X GET "https://platform.example.com/api/drive/explore" \  -H "Authorization: Bearer $TOKEN"
{  "total": 0,  "data": [    null  ]}
POST
/api/drive/explore

Authorization

headerAuthorizationBearer <token>

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

Request Body

application/json
  1. body
keyword?unknown

Words to look for.

type?string

Kinds of Item, separated by commas.

subtype?string

Subtypes of Item, separated by commas.

parent?string

The id of the folder. Without it, the top of Drive.

owner?string

me, notme, any or system, or the id of a user.

hidden?boolean

Include hidden Items.

Defaultfalse
trashed?boolean

Only the Items in the trash.

Defaultfalse
recursive?boolean

Search the folders inside the folder too.

Defaultfalse
importable?boolean

Only the Items that can take an import.

exportable?boolean

Only the Items that can be exported.

executable?boolean

Only the Items that can be run.

skip?integer

How many to skip.

limit?integer

How many to return.

sortBy?string

relevant only with a keyword.

Value in"name""lastModified""relevant"
sortOrder?string
Value in"ascending""descending"

Response Body

The answer.

application/json
  1. response
total?integer
data?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  ]}
PUT
/api/drive/import-data

Authorization

headerAuthorizationBearer <token>

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

Request Body

application/json
  1. body
source?unknown
fileIndex?unknown
collectionIndex?unknown
createOptions?unknown
appendOptions?unknown
updateOptions?unknown

Response Body

The 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": "..."}'
Empty
PUT
/api/drive/move

Authorization

headerAuthorizationBearer <token>

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

Request Body

application/json
  1. body
ids?array<unknown>

The ids of the Items, as an array.

parent?string

The id of the folder.

Response Body

The answer.

application/json
  1. response

The ids.

[index: integer]?string
curl -X PUT "https://platform.example.com/api/drive/move" \  -H "Authorization: Bearer $TOKEN" \  -H "Content-Type: application/json" \  -d '{  "ids": [],  "parent": "string"}'
[  "string"]
PUT
/api/drive/restore

Authorization

headerAuthorizationBearer <token>

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

Request Body

application/json
  1. body
ids*array<unknown>

The ids of the Items, as an array.

Response Body

The answer.

application/json
  1. response

The ids.

[index: integer]?string
curl -X PUT "https://platform.example.com/api/drive/restore" \  -H "Authorization: Bearer $TOKEN" \  -H "Content-Type: application/json" \  -d '{  "ids": []}'
[  "string"]
GET
/api/drive/share

Authorization

headerAuthorizationBearer <token>

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

Query Parameters

permission*string

The permission, as a JSON object.

ids*string

The ids of the Items, as a JSON array.

recursive?string

true to set it on everything inside the folders too.

Defaultfalse

Response Body

The answer.

application/json
  1. response

The ids.

[index: integer]?string
curl -X GET "https://platform.example.com/api/drive/share?permission=VALUE&ids=VALUE" \  -H "Authorization: Bearer $TOKEN"
[  "string"]
GET
/api/drive/statistic

Authorization

headerAuthorizationBearer <token>

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

Response Body

One entry per kind of Item.

application/json
  1. response
[index: integer]?
curl -X GET "https://platform.example.com/api/drive/statistic" \  -H "Authorization: Bearer $TOKEN"
[  {    "_id": "string",    "total": 0,    "size": 0  }]

Empty the trash

DELETE
/api/drive/trash

Authorization

headerAuthorizationBearer <token>

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

Response Body

The answer.

curl -X DELETE "https://platform.example.com/api/drive/trash" \  -H "Authorization: Bearer $TOKEN"
Empty

Change an Item

PUT
/api/drive/update-item/{id}

Authorization

headerAuthorizationBearer <token>

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

Path Parameters

id*string

The id of the Item.

Request Body

application/json
  1. body
owner?unknown
parent?string

The id of the folder.

[key: string]?any

Response Body

The answer.

response?stringapplication/json

The 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"
PUT
/api/drive/upload

Authorization

headerAuthorizationBearer <token>

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

Request Body

  1. body
file?file

A file.

Formatbinary
parent?string

The id of the folder.

forceUpdate?string
Default"0"

Response Body

The answer.

response?stringapplication/json

The 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"
PUT
/api/drive/upload/{id}

Authorization

headerAuthorizationBearer <token>

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

Path Parameters

id*string

The id of the Item.

Request Body

  1. body
file?file

A file.

Formatbinary
parent?string

The id of the folder.

forceUpdate?string
Default"0"

Response Body

The answer.

response?stringapplication/json

The 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"