NAV Navigation
Shell HTTP JavaScript Node.js Ruby Python Java Go PHP

Storages API v1.0.0

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

Storages API for upload and download

Base URLs:

Default

post__upload

Code samples

# You can also use wget
curl -X POST https://mail.example.com/zx/powerstore/v1/upload?accountId=bf6f895e-a8a7-462b-9aaa-ae50e4a9cbd9&type=files&node=a3a8d5d3-f236-4d00-9ba5-91f5a70d514f&version=1 \
  -H 'Content-Type: multipart/form-data'

POST /upload

Upload a new file - doesn't allow to override an already existent file

Body parameter

file: string

Parameters

Name In Type Required Description
accountId query string(uuid) true none
type query string true none
node query string true unique identifier of the uploaded file
version query integer true the file version
body body object false none
» file body string(binary) false none

Enumerated Values

Parameter Value
type files
type chats

Responses

Status Meaning Description Schema
200 OK File uploaded successfully None
400 Bad Request Invalid parameters None
403 Forbidden Access to the storage denied None
422 Unprocessable Entity The Storage is full for the provided account None
503 Service Unavailable The Storages Service is unavailable None

put__upload

Code samples

# You can also use wget
curl -X PUT https://mail.example.com/zx/powerstore/v1/upload?accountId=bf6f895e-a8a7-462b-9aaa-ae50e4a9cbd9&type=files&node=a3a8d5d3-f236-4d00-9ba5-91f5a70d514f&version=1 \
  -H 'Content-Type: multipart/form-data'

PUT /upload

Upload a file - allows to override an already existent file

Body parameter

file: string

Parameters

Name In Type Required Description
accountId query string(uuid) true none
type query string true none
node query string true unique identifier of the uploaded file
version query integer true the file version
body body object false none
» file body string(binary) false none

Enumerated Values

Parameter Value
type files
type chats

Responses

Status Meaning Description Schema
200 OK File uploaded successfully None
400 Bad Request Invalid parameters None
403 Forbidden Access to the storage denied None
422 Unprocessable Entity The Storage is full for the provided account None
503 Service Unavailable The Storages Service is unavailable None

get__download

Code samples

# You can also use wget
curl -X GET https://mail.example.com/zx/powerstore/v1/download?accountId=bf6f895e-a8a7-462b-9aaa-ae50e4a9cbd9&type=files&node=a3a8d5d3-f236-4d00-9ba5-91f5a70d514f&version=1 \
  -H 'Accept: application/octet-stream'

GET /download

Download a file

Parameters

Name In Type Required Description
accountId query string(uuid) true none
type query string true none
node query string true unique identifier of the uploaded file
version query integer true the file version

Enumerated Values

Parameter Value
type files
type chats

Example responses

200 Response

Responses

Status Meaning Description Schema
200 OK File downloaded successfully string
400 Bad Request Invalid parameters None
403 Forbidden Access to the storage denied None

delete__delete

Code samples

# You can also use wget
curl -X DELETE https://mail.example.com/zx/powerstore/v1/delete?accountId=bf6f895e-a8a7-462b-9aaa-ae50e4a9cbd9&type=files&node=a3a8d5d3-f236-4d00-9ba5-91f5a70d514f&version=1

DELETE /delete

Delete a file

Parameters

Name In Type Required Description
accountId query string(uuid) true none
type query string true none
node query string true unique identifier of the uploaded file
version query integer true the file version

Enumerated Values

Parameter Value
type files
type chats

Responses

Status Meaning Description Schema
200 OK File deleted successfully None
400 Bad Request Invalid parameters None
403 Forbidden Access to the storage denied None

post__bulk-delete

Code samples

# You can also use wget
curl -X POST https://mail.example.com/zx/powerstore/v1/bulk-delete?accountId=bf6f895e-a8a7-462b-9aaa-ae50e4a9cbd9&type=files \
  -H 'Content-Type: application/json'

POST /bulk-delete

Delete multiple files

Body parameter

{
  "ids": [
    {
      "node": "string",
      "version": "string"
    }
  ]
}

Parameters

Name In Type Required Description
accountId query string(uuid) true none
type query string true none
body body object true none
» ids body [object] false none
»» node body string false unique identifier of the uploaded file
»» version body string false the file version

Enumerated Values

Parameter Value
type files
type chats

Responses

Status Meaning Description Schema
200 OK File uploaded successfully None
400 Bad Request Invalid parameters None
403 Forbidden Access to the storage denied None

put__copy

Code samples

# You can also use wget
curl -X PUT https://mail.example.com/zx/powerstore/v1/copy?accountId=bf6f895e-a8a7-462b-9aaa-ae50e4a9cbd9&type=files&sourceNode=a3a8d5d3-f236-4d00-9ba5-91f5a70d514f&sourceVersion=1&destinationAccountId=bf6f895e-a8a7-462b-9aaa-ae50e4a9cbd9&destinationNode=a3a8d5d3-f236-4d00-9ba5-91f5a70d514f&destinationVersion=1&override=true

PUT /copy

Copy a file

Parameters

Name In Type Required Description
accountId query string(uuid) true account identifier of the source file
type query string true none
sourceNode query string true unique identifier of the source file
sourceVersion query integer true the source file version
destinationAccountId query string(uuid) true account identifier of the destination file
destinationNode query string true unique identifier of the destination file
destinationVersion query integer true the destination file version
override query boolean true if true, the destination file will be overridden

Enumerated Values

Parameter Value
type files
type chats

Responses

Status Meaning Description Schema
200 OK File uploaded successfully None
400 Bad Request Invalid parameters None
403 Forbidden Access to the storage denied None
422 Unprocessable Entity The Storage is full for the provided account None
503 Service Unavailable The Storages Service is unavailable None