Updated on 2024-05-23 GMT+08:00

Viewing the List of All Backups (1.0.0)

Function

This API is used to query a backup list according to search criteria. Before using this API:

URI

GET /v2/{project_id}/graphs/backups

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details about how to obtain the project ID, see Obtaining a Project ID.

Table 2 Query parameters

Parameter

Mandatory

Type

Description

limit

No

Integer

Maximum number of resources displayed on a single page. The default value is 10.

offset

No

Integer

Start position of the request. The default value is 0.

Request Parameters

Table 3 Request header parameter

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

It is used to obtain the permission to call APIs. For details about how to obtain the token, see Authentication. The value of X-Subject-Token in the response header is the token.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

backup_count

Integer

Total number of backups. This parameter is left blank when the request fails.

backup_list

Array of backup_list objects

List of all backups under the current project ID. This parameter is left blank when the request fails.

Table 5 backup_list

Parameter

Type

Description

id

String

Indicates the backup ID.

name

String

Backup name

backup_method

String

Backup method. The value can be auto, manual, or import.

graph_id

String

ID of the graph associated with the backup

graph_name

String

Name of the graph associated with the backup

graph_status

String

Status of the graph associated with the backup

graph_size_type_index

String

Size of the graph associated with the backup

data_store_version

String

Version of the graph associated with the backup

arch

String

CPU architecture of the graph node associated with the backup

status

String

Backup status:

  • backing_up: indicates that a graph is being backed up.
  • success: indicates that a graph is successfully backed up.
  • failed: indicates that a graph fails to be backed up.

start_timestamp

Long

Start timestamp of a backup job

start_time

String

Start time of a backup job.

end_timestamp

Long

End timestamp of a backup job

end_time

String

Indicates the backup end time.

size

Long

Backup file size (MB)

duration

Long

Backup duration (seconds)

encrypted

Boolean

Whether to encrypt backup data. The default value is false.

  • true: The password will be encrypted.
  • false (default value): The password will not be encrypted.

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

System prompt code.

  • If execution succeeds, this parameter may be left blank.
  • If execution fails, this parameter is used to display the error code.

error_msg

String

System prompt code.

  • If execution succeeds, this parameter may be left blank.
  • If execution fails, this parameter is used to display the error message.

Example Request

Query the list of all backups.

GET https://Endpoint/v2/{project_id}/graphs/backups?offset=0&limit=3

Example Response

Status code: 200

Example response for a successful request

{
  "backup_count" : 3,
  "backup_list" : [ {
    "id" : "ada3e720-ab87-48cb-bff7-3ec5ae1a9652",
    "name" : "ges060803_nodelete-20210608135513",
    "backup_method" : "manual",
    "graph_id" : "4c5f882d-a813-4d78-a8e3-6d3212ddd121",
    "graph_name" : "ges060803_nodelete",
    "graph_status" : "200",
    "graph_size_type_index" : "1",
    "data_store_version" : "2.2.21",
    "arch" : "x86_64",
    "status" : "success",
    "start_timestamp" : 1623160513000,
    "start_time" : "2021-06-08T13:55:13",
    "end_timestamp" : 1623160568000,
    "end_time" : "2021-06-08T13:56:08",
    "size" : 1,
    "duration" : 54,
    "encrypted" : false
  }, {
    "id" : "7ed3f51d-816d-4651-9129-fe21b64b5c91",
    "name" : "ges060803_nodelete_20210609203323_auto",
    "backup_method" : "auto",
    "graph_id" : "4c5f882d-a813-4d78-a8e3-6d3212ddd121",
    "graph_name" : "ges060803_nodelete",
    "graph_status" : "200",
    "graph_size_type_index" : "1",
    "data_store_version" : "2.2.21",
    "arch" : "x86_64",
    "status" : "success",
    "start_timestamp" : 1623242004000,
    "start_time" : "2021-06-09T12:33:24",
    "end_timestamp" : 1623242004000,
    "end_time" : "2021-06-09T12:33:24",
    "size" : 1,
    "duration" : 0,
    "encrypted" : false
  }, {
    "id" : "604bfb46-04dd-45fc-a9ae-df24a0705b9d",
    "name" : "ges060802_nodelete-20210608135523",
    "backup_method" : "manual",
    "graph_id" : "9b9a05c2-0cdb-41ac-b55f-93caffb0519a",
    "graph_name" : "ges060802_nodelete",
    "graph_status" : "400",
    "graph_size_type_index" : "0",
    "data_store_version" : "2.2.23",
    "arch" : "x86_64",
    "status" : "success",
    "start_timestamp" : 1623160524000,
    "start_time" : "2021-06-08T13:55:24",
    "end_timestamp" : 1623160577000,
    "end_time" : "2021-06-08T13:56:17",
    "size" : 1,
    "duration" : 53,
    "encrypted" : false
  } ]
}

Status code: 400

Example response for a failed request

{
  "error_code" : "GES.7006",
  "error_msg" : "The underlying graph engine has internal error."
}

Status Code

Return Value

Description

400 Bad Request

Request error

401 Unauthorized

Authorization failed

403 Forbidden

No operation permissions

404 Not Found

No resources found

500 Internal Server Error

Internal server error

503 Service Unavailable

Service unavailable

Error Code

See Error Code.