Querying Details About VBS Backups (Native OpenStack V3 API)

Function

This API is used to query the details about VBS backups.

URI

  • URI format

    GET /v3/{project_id}/backups/detail

  • Parameter description

    Parameter

    Mandatory

    Description

    project_id

    Yes

    Project ID

  • Request filter parameter description

    Parameter

    Mandatory

    Type

    Description

    name

    No

    string

    Name of the backups to be queried. This parameter is used to query the backups whose names are specified character strings.

    status

    No

    string

    Status of the backups to be queried. This parameter is used to query the backups in a specified state. The value can be available, error, restoring, creating, deleting, or error_restoring.

    offset

    No

    int

    Offset of the queried information

    limit

    No

    int

    Maximum number of query results that can be returned

    volume_id

    No

    string

    Disk ID of the backups to be queried. It is used to query the backups for specific disks.

    with_count

    No

    boolean

    The query result contains the count field whose default value is False. This field is first available in version 3.45.

    name~

    No

    string

    Fuzzy query by backup name. This parameter is added in version 3.31.

    status~

    No

    string

    Fuzzy query by backup status. This parameter is added in version 3.31.

    volume_id~

    No

    string

    Fuzzy query by disk ID. This parameter is added in version 3.31.

    Note

    If the version features such as with_count, name~, status~, and volume_id~ are used, add Openstack-Api-Version": volume 3.45 (3.45 is the version number) to the header when requesting the URL.

  • Example request

    GET /v3/{project_id}/backups/detail?name=backup&status=error&limit=10&volume_id=7d7c6fbe-d7ee-4b4d-8bae-bdd08b5604bb
    

Request

None

Response

  • Parameter description

    Parameter

    Type

    Description

    backups

    list<dict>

    List of queried backups

    status

    string

    Backup status

    description

    string

    Backup description

    links

    list<link>

    Backup URL

    availability_zone

    string

    AZ where the backup resides

    volume_id

    string

    Source disk ID of the backup

    fail_reason

    string

    Cause of the backup failure

    id

    string

    Backup ID

    size

    int

    Backup size

    object_count

    int

    Number of objects on OBS for the disk data

    container

    string

    Container of the backup

    name

    string

    Backup name

    created_at

    string

    Backup creation time

    os-backup-project-attr:project_id

    string

    ID of the project that owns the VBS backup

    updated_at

    string

    Time when the backup was updated

    data_timestamp

    string

    Current time

    has_dependent_backups

    boolean

    Whether a dependent backup exists

    snapshot_id

    string

    ID of the snapshot associated with the backup

    is_incremental

    boolean

    Whether the backup is an incremental backup. VBS generates a full backup for the initial backup operation and incremental backups for subsequent backup operations. Therefore, this parameter will be skipped.

    count

    int

    Number of returned items. This parameter is first available in the 3.45 version.

  • description parameter description

    Parameter

    Type

    Description

    DESC

    string

    Backup description

    INC

    int

    Whether the backup request was an incremental backup call. 1: incremental backup; 0: full backup

  • link parameter description

    Parameter

    Type

    Description

    href

    string

    URL of the last backup queried

    rel

    string

    Relationship between the query result and href. The value next indicates that some backups are not obtained.

  • Example response

    {
    "backups": [
    {
    "status": "error",
    "description": null,
    "links": [
    {
    "href": "http://192.168.82.222:8776/v2/b23b579f08c84228b9b4673c46f0c442/backups/1d1139d8-8989-49d3-8aa1-83eb691e6db2",
    "rel": "self"
    },
    {
    "href": "http://192.168.82.222:8776/b23b579f08c84228b9b4673c46f0c442/backups/1d1139d8-8989-49d3-8aa1-83eb691e6db2",
    "rel": "bookmark"
    }
    ],
    "availability_zone": null,
    "volume_id": "2748f2f2-4394-4e6e-af8d-8dd34496c024",
    "fail_reason": "Connection to swift failed: [Errno 111] ECONNREFUSED",
    "id": "1d1139d8-8989-49d3-8aa1-83eb691e6db2",
    "size": 1,
    "object_count": null,
    "container": "volumebackups",
    "name": null,
    "created_at": "2013-06-27T08:48:03.000000",
    "os-backup-project-attr:project_id": "b23b579f08c84228b9b4673c46f0c442",
    "snapshot_id": "66a574c0-4415-499e-b0b1-3f340d7f7932",
    "updated_at": "2019-03-27T12:36:17.596602",
    "data_timestamp": "2019-03-16T11:56:00.917245",
    "has_dependent_backups": false,
    "is_incremental": false
    },
    {
    "status": "error",
    "description": null,
    "links": [
    {
    "href": "http://192.168.82.222:8776/v2/b23b579f08c84228b9b4673c46f0c442/backups/80e17946-6e56-46e0-9547-e9ba4f1619bd",
    "rel": "self"
    },
    {
    "href": "http://192.168.82.222:8776/b23b579f08c84228b9b4673c46f0c442/backups/80e17946-6e56-46e0-9547-e9ba4f1619bd",
    "rel": "bookmark"
    }
    ],
    "availability_zone": null,
    "volume_id": "2748f2f2-4394-4e6e-af8d-8dd34496c024",
    "fail_reason": "Connection to swift failed: [Errno 111] ECONNREFUSED",
    "id": "80e17946-6e56-46e0-9547-e9ba4f1619bd",
    "size": 1,
    "object_count": null,
    "container": "volumebackups",
    "name": null,
    "created_at": "2013-06-27T08:56:58.000000",
    "os-backup-project-attr:project_id": "b23b579f08c84228b9b4673c46f0c442",
    "snapshot_id": "66a574c0-4415-499e-b0b1-3f340d7f7932",
    "updated_at": "2019-03-27T12:36:17.596602",
    "data_timestamp": "2019-03-16T11:56:00.917245",
    "has_dependent_backups": false,
    "is_incremental": false
    },
    {
    "status": "error",
    "description": null,
    "links": [
    {
    "href": "http://192.168.82.222:8776/v2/b23b579f08c84228b9b4673c46f0c442/backups/b3cf7a16-decc-4beb-8077-682737d94a58",
    "rel": "self"
    },
    {
    "href": "http://192.168.82.222:8776/b23b579f08c84228b9b4673c46f0c442/backups/b3cf7a16-decc-4beb-8077-682737d94a58",
    "rel": "bookmark"
    }
    ],
    "availability_zone": null,
    "volume_id": "2748f2f2-4394-4e6e-af8d-8dd34496c024",
    "fail_reason": "Connection to swift failed: [Errno 111] ECONNREFUSED",
    "id": "b3cf7a16-decc-4beb-8077-682737d94a58",
    "size": 1,
    "object_count": null,
    "container": "volumebackups",
    "name": null,
    "created_at": "2013-06-27T08:46:31.000000",
    "snapshot_id": "66a574c0-4415-499e-b0b1-3f340d7f7932",
    "updated_at": "2019-03-27T12:36:17.596602",
    "data_timestamp": "2019-03-16T11:56:00.917245",
    "has_dependent_backups": false,
    "is_incremental": false
    }
    ]
    }
    

Status Codes

  • Normal

    200

  • Abnormal

    Status Code

    Description

    400 Bad Request

    The server failed to process the request.

    401 Unauthorized

    You must enter the username and password to access the requested page.

    403 Forbidden

    You are forbidden to access the requested page.

    404 Not Found

    The server could not find the requested page.

    405 Method Not Allowed

    You are not allowed to use the method specified in the request.

    406 Not Acceptable

    The response generated by the server could not be accepted by the client.

    407 Proxy Authentication Required

    You must use the proxy server for authentication so that the request can be processed.

    408 Request Timeout

    The request timed out.

    409 Conflict

    The request could not be processed due to a conflict.

    500 Internal Server Error

    Failed to complete the request because of an internal service error.

    501 Not Implemented

    Failed to complete the request because the server does not support the requested function.

    502 Bad Gateway

    Failed to complete the request because the request is invalid.

    503 Service Unavailable

    Failed to complete the request because the service is unavailable.

    504 Gateway Timeout

    A gateway timeout error occurred.