Skip to main content

About

This api will return quota information about a storage to json data format. The output is typically used, free, and total contents.

About Api options

The options available in this api are described below:

Option nameTypeDefault ValueRequiredDescription
pathstringThis value indicates the address and path of a storage. The storage can be local or remote. For example, it can be local path like / which represents the root path in the Unix-based operating system or C:\ in Windows-based operating system.
fullboolfalseThis value display full numbers instead of human-readable

Calling About Api

For calling this api, the following details are required to apply:

note

The options and parameters introduced in the previous section must be included as json data in the request body part.

URLMethodContentTypeBody
http://localhost:5860/storage/aboutPOSTapplication/json
{
"path": <STRING VALUE>,
"full": <BOOLEAN VALUE>
}

Now, if we want to have these details in the form of an http api call, open a new terminal and enter the following command:

info

First of all make sure flowsynx is running.

curl -X POST -H "Content-Type: application/json" -d '{ "path": "/", "full": false }' http://localhost:5860/storage/about

Also you can use Http Api test clients to test this api. Anyway, after executing this api, a result like below will be obtained.

{
"data": {
"total": "1.03 TiB",
"free": "182.23 GiB",
"used": "870.26 GiB"
},
"messages": [],
"succeeded": true
}

The answer is divided into three data, messages, and succeeded parts. succeeded indicates the status of the execution of this api which is boolean value and can be true or false. messages also indicates the list of possible messages that are returned with the response. data contains the data to be returned.

info

data part will have a value only when succeeded is true. If succeeded is false, this field will be null.

The information including in the result for this api is described as follows:

total: Total size available.
free: Total space available to this user.
used: Total size used.

All sizes are in number of bytes unless you set the full option to the true.