openapi: 3.0.0 info: title: "Bob Node API" description: Bob HTTP Rest API version: 0.0.0 paths: /status: get: summary: Returns information about self operationId: getStatus responses: "200": description: "A JSON with node info" content: application/json: schema: $ref: "#/components/schemas/Node" /status/space: get: summary: Get space info operationId: getSpaceInfo responses: "200": description: "Space info" content: application/json: schema: $ref: "#/components/schemas/SpaceInfo" /metrics: get: summary: Get metrics operationId: getMetrics responses: "200": description: "Metrics" content: application/json: schema: $ref: "#/components/schemas/MetricsSnapshotModel" /version: get: summary: Returns server version operationId: getVersion responses: "200": description: "Version info" content: application/json: schema: $ref: "#/components/schemas/VersionInfo" /nodes: get: summary: Returns a list of known nodes operationId: getNodes responses: "200": description: "A JSON array of nodes info and vdisks on them" content: application/json: schema: type: array items: $ref: "#/components/schemas/Node" "403": description: "Permission denied" /metadata/distrfunc: get: summary: Returns information about key distribution function operationId: distributionFunction responses: "200": description: "Distribution function information" content: application/json: schema: $ref: "#/components/schemas/DistrFunc" "403": description: "Permission denied" /vdisks: get: summary: Returns a list of vdisks operationId: getVDisks responses: "200": description: "A JSON array of vdisks info" content: application/json: schema: type: array items: $ref: "#/components/schemas/VDisk" "403": description: "Permission denied" /vdisks/{VDiskId}: get: summary: Returns a vdisk info by ID operationId: getVDisk parameters: - $ref: "#/components/parameters/VDiskIdParam" responses: "200": description: "A JSON with vdisk info" content: application/json: schema: $ref: "#/components/schemas/VDisk" "403": description: "Permission denied" content: application/json: schema: $ref: "#/components/schemas/StatusExt" "404": description: "Not found" content: application/json: schema: $ref: "#/components/schemas/StatusExt" /vdisks/{VDiskId}/records/count: get: summary: Returns count of records of this on node operationId: getRecords parameters: - $ref: "#/components/parameters/VDiskIdParam" responses: "200": description: "Records count" content: application/json: schema: type: integer "403": description: "Permission denied" content: application/json: schema: $ref: "#/components/schemas/StatusExt" "404": description: "Not found" content: application/json: schema: $ref: "#/components/schemas/StatusExt" /vdisks/{VDiskId}/partitions: get: summary: Returns a list of partitions operationId: getPartitions parameters: - $ref: "#/components/parameters/VDiskIdParam" responses: "200": description: "Node info and JSON array with partitions info" content: application/json: schema: $ref: "#/components/schemas/VDiskPartitions" "403": description: "Permission denied" content: application/json: schema: $ref: "#/components/schemas/StatusExt" "404": description: "Not found" content: application/json: schema: $ref: "#/components/schemas/StatusExt" /vdisks/{VDiskId}/partitions/{partitionId}: get: summary: Returns a partition info by ID operationId: getPartition parameters: - $ref: "#/components/parameters/VDiskIdParam" - name: partitionId in: path required: true schema: type: string responses: "200": description: "A JSON with partition info" content: application/json: schema: $ref: "#/components/schemas/Partition" "403": description: "Permission denied" content: application/json: schema: $ref: "#/components/schemas/StatusExt" "404": description: "Not found" content: application/json: schema: $ref: "#/components/schemas/StatusExt" /vdisks/{VDiskId}/partitions/by_timestamp/{timestamp}: delete: summary: Delete partitions by timestamp parameters: - $ref: "#/components/parameters/VDiskIdParam" - name: timestamp in: path required: true schema: type: string responses: "200": description: Success content: application/json: schema: $ref: "#/components/schemas/StatusExt" "403": description: "Permission denied" content: application/json: schema: $ref: "#/components/schemas/StatusExt" "404": description: "Not found" content: application/json: schema: $ref: "#/components/schemas/StatusExt" "400": description: "Bad request (partitions with the timestamp not found on the vdisk or it is active)" content: application/json: schema: $ref: "#/components/schemas/StatusExt" /vdisks/{VDiskId}/partitions/by_timestamp/{timestamp}/{action}: post: summary: Attach/Detach a partition by timestamp parameters: - $ref: "#/components/parameters/VDiskIdParam" - name: timestamp in: path required: true schema: type: integer - in: path name: action schema: type: string enum: - attach - detach required: true responses: "200": description: Success content: application/json: schema: $ref: "#/components/schemas/StatusExt" "403": description: "Permission denied" content: application/json: schema: $ref: "#/components/schemas/StatusExt" "404": description: "Not found" content: application/json: schema: $ref: "#/components/schemas/StatusExt" /disks/list: get: summary: Returns the list of disks with their states operationId: getDisks responses: "200": description: "A JSON array with disks and their states" content: application/json: schema: type: array items: $ref: "#/components/schemas/DiskState" "403": description: "Permission denied" content: application/json: schema: $ref: "#/components/schemas/StatusExt" /disks/{DiskName}/stop: post: summary: Stops all disks controller for disk parameters: - $ref: "#/components/parameters/DiskNameParam" responses: "200": description: Success content: application/json: schema: $ref: "#/components/schemas/StatusExt" "403": description: "Permission denied" content: application/json: schema: $ref: "#/components/schemas/StatusExt" "406": description: "Not acceptable backend" content: application/json: schema: $ref: "#/components/schemas/StatusExt" /disks/{DiskName}/start: post: summary: Trying to start all disk controllers for disk parameters: - $ref: "#/components/parameters/DiskNameParam" responses: "200": description: Success content: application/json: schema: type: array items: $ref: "#/components/schemas/StatusExt" "403": description: "Permission denied" content: application/json: schema: $ref: "#/components/schemas/StatusExt" "406": description: "Not acceptable backend" content: application/json: schema: $ref: "#/components/schemas/StatusExt" /vdisks/{VDiskId}/remount: post: summary: Remount partitions on vdisk parameters: - $ref: "#/components/parameters/VDiskIdParam" responses: "200": description: Success content: application/json: schema: $ref: "#/components/schemas/StatusExt" "403": description: "Permission denied" content: application/json: schema: $ref: "#/components/schemas/StatusExt" "404": description: "Not found" content: application/json: schema: $ref: "#/components/schemas/StatusExt" /blobs/outdated: delete: summary: Close active blobs of holders not used recently operationId: finalizeOldBlobs responses: "200": description: Success content: application/json: schema: $ref: "#/components/schemas/StatusExt" "403": description: "Permission denied" /alien: get: summary: Returns an alien dir info operationId: getAlien responses: "200": description: "Alien Node name" content: application/json: schema: type: string /configuration: get: summary: Returns configuration of the node operationId: getConfiguration responses: "200": description: Configuration object content: application/json: schema: $ref: "#/components/schemas/NodeConfiguration" "403": description: "Permission denied" /alien/detach: post: summary: Detach alien partitions operationId: detachAlienPartitions responses: "200": description: Successfully deatched alien partitions content: application/json: schema: $ref: "#/components/schemas/StatusExt" "403": description: "Permission denied" content: application/json: schema: $ref: "#/components/schemas/StatusExt" "406": description: "Not acceptable backend" content: application/json: schema: $ref: "#/components/schemas/StatusExt" /alien/dir: get: summary: Return directory of alien operationId: getAlienDir responses: "200": description: "Directory" content: application/json: schema: $ref: "#/components/schemas/Dir" "403": description: "Permission denied" content: application/json: schema: $ref: "#/components/schemas/StatusExt" "406": description: "Not acceptable backend" content: application/json: schema: $ref: "#/components/schemas/StatusExt" /vdisks/{VDiskId}/replicas/local/dirs: get: summary: Returns directories of local replicas of vdisk operationId: getReplicasLocalDirs parameters: - $ref: "#/components/parameters/VDiskIdParam" responses: "200": description: "A JSON array with dirs" content: application/json: schema: type: array items: $ref: "#/components/schemas/Dir" "403": description: "Permission denied" content: application/json: schema: $ref: "#/components/schemas/StatusExt" "404": description: "Not found" content: application/json: schema: $ref: "#/components/schemas/StatusExt" /data/{DataKey}: get: summary: Returns data by key operationId: getDataByKey parameters: - $ref: "#/components/parameters/DataKeyParam" responses: "200": description: "Binary data with inferred content type" "400": description: "Bad request (invalid key)" content: application/json: schema: $ref: "#/components/schemas/StatusExt" "403": description: "Permission denied" content: application/json: schema: $ref: "#/components/schemas/StatusExt" "404": description: "Not found" content: application/json: schema: $ref: "#/components/schemas/StatusExt" "500": description: "Internal server error" content: application/json: schema: $ref: "#/components/schemas/StatusExt" head: summary: Checks data existance by key operationId: dataExistsByKey parameters: - $ref: "#/components/parameters/DataKeyParam" responses: "200": description: "Data is presented" "400": description: "Bad request (invalid key)" content: application/json: schema: $ref: "#/components/schemas/StatusExt" "403": description: "Permission denied" content: application/json: schema: $ref: "#/components/schemas/StatusExt" "404": description: "Not found" "500": description: "Internal server error" content: application/json: schema: $ref: "#/components/schemas/StatusExt" post: summary: Add data to storage by key operationId: postDataByKey parameters: - $ref: "#/components/parameters/DataKeyParam" requestBody: description: Binary data required: true content: application/octet-stream: schema: type: string format: binary responses: "200": description: "Data successfully added" content: application/json: schema: $ref: "#/components/schemas/StatusExt" "400": description: "Bad request (invalid key)" content: application/json: schema: $ref: "#/components/schemas/StatusExt" "403": description: "Permission denied" content: application/json: schema: $ref: "#/components/schemas/StatusExt" "500": description: "Internal server error" content: application/json: schema: $ref: "#/components/schemas/StatusExt" delete: summary: Delete data from storage by key operationId: deleteDataByKey parameters: - $ref: "#/components/parameters/DataKeyParam" responses: "200": description: "Successfully deleted" content: application/json: schema: $ref: "#/components/schemas/StatusExt" "400": description: "Bad request (invalid key)" content: application/json: schema: $ref: "#/components/schemas/StatusExt" "403": description: "Permission denied" content: application/json: schema: $ref: "#/components/schemas/StatusExt" "500": description: "Internal server error" content: application/json: schema: $ref: "#/components/schemas/StatusExt" components: responses: DefaultError: description: Unexpected error content: application/json: schema: $ref: "#/components/schemas/Error" parameters: DiskNameParam: name: DiskName in: path required: true schema: type: string VDiskIdParam: name: VDiskId in: path required: true schema: type: integer DataKeyParam: name: DataKey in: path required: true schema: type: string schemas: Node: properties: name: type: string address: type: string vdisks: type: array items: $ref: "#/components/schemas/VDisk" required: - name - address DiskState: properties: name: type: string path: type: string is_active: type: boolean required: - name - path - is_active VDisk: properties: id: type: integer replicas: type: array items: $ref: "#/components/schemas/Replica" required: - id Replica: properties: node: type: string disk: type: string path: type: string required: - type - disk - path VDiskPartitions: properties: vdisk: type: integer node: type: string disk: type: string partitions: type: array items: type: string Partition: properties: vdisk_id: type: integer node_name: type: string disk_name: type: string timestamp: type: integer records_count: type: integer Error: type: object properties: code: type: string message: type: string required: - code - message Dir: type: object properties: name: type: string path: type: string children: type: array items: $ref: "#/components/schemas/Dir" DistrFunc: type: object properties: func: type: string enum: - Mod Version: type: object properties: version: type: string build_time: type: string VersionInfo: type: object properties: bobversion: $ref: "#/components/schemas/Version" pearlversion: $ref: "#/components/schemas/Version" NodeConfiguration: type: object properties: blob_file_name_prefix: type: string root_dir_name: type: string SpaceInfo: type: object properties: total_disk_space_bytes: type: integer free_disk_space_bytes: type: integer used_disk_space_bytes: type: integer occupied_disk_space_bytes: type: integer occupied_disk_space_by_disk: type: object additionalProperties: type: integer MetricsEntryModel: type: object properties: value: type: integer timestamp: type: integer MetricsMap: type: object properties: metric1: $ref: "#/components/schemas/MetricsEntryModel" metric2: $ref: "#/components/schemas/MetricsEntryModel" MetricsSnapshotModel: type: object properties: metrics: $ref: "#/components/schemas/MetricsMap" StatusExt: type: object properties: status: type: integer ok: type: boolean msg: type: string