|
|
|
# REST API
|
|
|
|
|
|
|
|
Bob has an REST Api specified in
|
|
|
|
[config-examples/openapi.yaml](https://github.com/qoollo/bob/blob/master/config-examples/openapi.yaml).
|
|
|
|
|
|
|
|
## Methods
|
|
|
|
|
|
|
|
* [GET /status](#status)
|
|
|
|
* [GET /nodes](#nodes)
|
|
|
|
* [GET /metadata/distrfunc](#distrfunc)
|
|
|
|
* [GET /vdisks](#vdisks)
|
|
|
|
* [GET /vdisks/{VDiskId}](#vdisks_by_id)
|
|
|
|
* [GET /vdisks/{VDiskId}/records/count](#vdisks_records_count)
|
|
|
|
* [GET /vdisks/{VDiskId}/partitions](#toc)
|
|
|
|
* [GET /vdisks/{VDiskId}/partitions/{partitionId}](#toc)
|
|
|
|
* [DELETE /vdisks/{VDiskId}/partitions/by_timestamp/{timestamp}](#toc)
|
|
|
|
* [PUT /vdisks/{VDiskId}/partitions/by_timestamp/{timestamp}/{action}](#toc)
|
|
|
|
* [GET /disks/list](#toc)
|
|
|
|
* [POST /disks/{disk_name}/start](#toc)
|
|
|
|
* [POST /vdisks/{vdisk_id}/remount](#toc)
|
|
|
|
* [DELETE /blobs/outdated](#toc)
|
|
|
|
* [GET /alien](#toc)
|
|
|
|
* [GET /alien/dir](#toc)
|
|
|
|
* [GET /vdisks/{vdisk_id}/replicas/local/dirs](#toc)
|
|
|
|
|
|
|
|
### GET /status
|
|
|
|
Returns information about this node.
|
|
|
|
|
|
|
|
### GET /nodes
|
|
|
|
Returns a list of known nodes and vdisks on them.
|
|
|
|
|
|
|
|
### GET /metadata/distrfunc
|
|
|
|
Return information about key distribution function
|
|
|
|
|
|
|
|
### GET /vdisks
|
|
|
|
Returns a list of vdisks
|
|
|
|
|
|
|
|
### GET /vdisks/{VDiskId}
|
|
|
|
Returns a vdisk info by ID
|
|
|
|
|
|
|
|
Arguments:
|
|
|
|
* VDiskId - unsigned 32bit integer
|
|
|
|
|
|
|
|
### GET /vdisks/{VDiskId}/records/count
|
|
|
|
Returns count of records of this on node
|
|
|
|
|
|
|
|
Arguments:
|
|
|
|
* VDiskId - unsigned 32bit integer
|
|
|
|
|
|
|
|
### GET /vdisks/{VDiskId}/partitions
|
|
|
|
Returns a list of partitions
|
|
|
|
|
|
|
|
Arguments:
|
|
|
|
* VDiskId - unsigned 32bit integer
|
|
|
|
|
|
|
|
### GET /vdisks/{VDiskId}/partitions/{partitionId}
|
|
|
|
Returns a partition info by ID
|
|
|
|
|
|
|
|
Arguments:
|
|
|
|
* VDiskId - unsigned 32bit integer
|
|
|
|
* partitionId - string
|
|
|
|
|
|
|
|
### DELETE /vdisks/{VDiskId}/partitions/by_timestamp/{timestamp}
|
|
|
|
Delete partitions by timestamp
|
|
|
|
|
|
|
|
Arguments:
|
|
|
|
* VDiskId - unsigned 32bit integer
|
|
|
|
* timestamp - unsigned 64bit integer
|
|
|
|
|
|
|
|
### PUT /vdisks/{VDiskId}/partitions/by_timestamp/{timestamp}/{action}
|
|
|
|
Attach/Detach a partition by timestamp
|
|
|
|
|
|
|
|
Arguments:
|
|
|
|
* VDiskId - unsigned 32bit integer
|
|
|
|
* timestamp - unsigned 64bit integer
|
|
|
|
* action - 'attach' or 'detach' string
|
|
|
|
|
|
|
|
### GET /disks/list
|
|
|
|
Returns the list of disks with their states
|
|
|
|
|
|
|
|
### POST /disks/{disk_name}/stop
|
|
|
|
Stops all disks controller for disk
|
|
|
|
|
|
|
|
Arguments:
|
|
|
|
* disk_name - string
|
|
|
|
|
|
|
|
### POST /disks/{disk_name}/start
|
|
|
|
Trying to start all disk controllers for disk
|
|
|
|
|
|
|
|
Arguments:
|
|
|
|
* disk_name - string
|
|
|
|
|
|
|
|
### POST /vdisks/{vdisk_id}/remount
|
|
|
|
Remount partitions on vdisk
|
|
|
|
|
|
|
|
Arguments:
|
|
|
|
* vdisk_id - unsigned 32bit integer
|
|
|
|
|
|
|
|
### DELETE /blobs/outdated
|
|
|
|
Close active blobs of holders not used recently
|
|
|
|
|
|
|
|
### GET /alien
|
|
|
|
Returns an alien dir info
|
|
|
|
|
|
|
|
### GET /alien/dir
|
|
|
|
Return directory of alien
|
|
|
|
|
|
|
|
### GET /vdisks/{vdisk_id}/replicas/local/dirs
|
|
|
|
Returns directories of local replicas of vdisk
|
|
|
|
|
|
|
|
Arguments:
|
|
|
|
* vdisk_id - unsigned 32bit integer |
|
|
|
\ No newline at end of file |