Skip to content
This repository was archived by the owner on Dec 7, 2021. It is now read-only.

API documentation

Nikita Korshunov edited this page Mar 24, 2019 · 2 revisions

Web file manager API

Specification Value
API Version v0.1.0

Operations

Resource Path Operation Description
/api/directory /api/directory-get Gets directory information.
/api/directory /api/directory-delete Deletes directory.
/api/directory/search /api/directory/search-get Searches directory.
/api/directory/rename /api/directory/rename-put Renames directory.
/services/download/directory /services/download/directory-get Downloads the contents of the directory as a zip archive.
/services/download/file /services/download/file-get Downloads a file.
/api/drives /api/drives-get Gets a list of drives.
/api/file /api/file-get Gets file information.
/api/file /api/file-delete Deletes file.
/api/file/rename /api/file/rename-put Renames file.
/api/host /api/host-get Gets host information.

/api/directory (get)

Parameters

Param Name Param Type Data Type Description Required?
directoryPath query string The directory path. yes

Responses

Code Type Description
200 DirectoryModel Success

/api/directory (delete)

Parameters

Param Name Param Type Data Type Description Required?
directoryPath query string The directory path. yes

Responses

Code Type Description
200 Success

/api/directory/search (get)

Parameters

Param Name Param Type Data Type Description Required?
query query string The query with directory path.

Responses

Code Type Description
200 array Success

/api/directory/rename (put)

Parameters

Param Name Param Type Data Type Description Required?
directoryPath query string The directory path. yes
body body RenameParams These are the parameters for renaming.

Responses

Code Type Description
200 DirectoryModel Success

/services/download/directory (get)

Parameters

Param Name Param Type Data Type Description Required?
directoryPath query string The directory path. yes

Responses

Code Type Description
200 Success

/services/download/file (get)

Parameters

Param Name Param Type Data Type Description Required?
filePath query string The file path. yes

Responses

Code Type Description
200 Success

/api/drives (get)

Responses

Code Type Description
200 array Success

/api/file (get)

Parameters

Param Name Param Type Data Type Description Required?
filePath query string The file path. yes

Responses

Code Type Description
200 FileModel Success

/api/file (delete)

Parameters

Param Name Param Type Data Type Description Required?
filePath query string The file path. yes

Responses

Code Type Description
200 Success

/api/file/rename (put)

Parameters

Param Name Param Type Data Type Description Required?
filePath query string The file path. yes
body body RenameParams These are the parameters for renaming.

Responses

Code Type Description
200 FileModel Success

/api/host (get)

Responses

Code Type Description
200 HostModel Success

Definitions

DirectoryModel

Field Name Field Type Description Required? Read Only?
id string Gets the directory ID. yes
name string Gets the directory name. yes
path string Gets the directory path. yes
content Gets the directory content.

DirectoryContent

Field Name Field Type Description Required? Read Only?
directories array The directories. yes
- Item DirectoryModel
files array The files. yes
- Item FileModel

FileModel

Field Name Field Type Description Required? Read Only?
id string Gets the file ID. yes
name string Gets the file name. yes
ext string Gets the file extension. yes
path string Gets the file path. yes
size integer Gets the file size, in bytes. yes

RenameParams

Field Name Field Type Description Required? Read Only?
name string Gets or sets a new name. yes

DriveModel

Field Name Field Type Description Required? Read Only?
id string Gets the drive ID. yes
label string Gets the drive label. yes
name string Gets the drive name. yes
type integer Gets the drive type. yes
format string Gets the drive format. yes
isReady boolean Gets a value that indicates whether a drive is ready. yes
available integer Gets the amount of available free space on a drive, in bytes. yes
total integer Gets the total size of the drive, in bytes. yes

HostModel

Field Name Field Type Description Required? Read Only?
name string Gets the host name. yes
platform string Gets the host platform. yes
time string Gets the system time of the host. yes

Clone this wiki locally