Skip to content

REST API

Vladimir Stepanenko edited this page Jun 25, 2021 · 4 revisions

Bob has an REST Api specified in config-examples/openapi.yaml.

Methods

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

GET /data/{key}

Returns data by key

Arguments:

  • key - can be GUID, hexadecimal or decimal number

Examples of keys:

  • GUID - {5cc66ef2-e35f-44ea-80df-edf9ce481075} or 5cc66ef2-e35f-44ea-80df-edf9ce481075
  • Hexadecimal - 0xFF12, 0xf
  • Decimal - 12

POST /data/{key}

Add data to bob by key

Arguments:

  • key - can be GUID, hexadecimal or decimal number. Same format as for GET method

Body is binary data to be stored in bob

Clone this wiki locally