Updated on 2025-12-25 GMT+08:00

Listing Graphs (2.1.18)

Function

This API is used to query all graphs of the current tenant.

URI

GET /v2/{project_id}/graphs

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

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

Constraints

N/A

Range

The value can contain up to 64 characters. Only letters and digits are allowed.

Default Value

N/A

Table 2 Query parameters

Parameter

Mandatory

Type

Description

offset

No

Integer

Definition

Starting position of the request.

Constraints

N/A

Range

N/A

Default Value

0

limit

No

Integer

Definition

Maximum number of resources per page.

Constraints

N/A

Range

N/A

Default Value

10

Request Parameters

Table 3 Request header parameter

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

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

Constraints

N/A

Range

N/A

Default Value

N/A

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

graph_count

Integer

Definition

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

Range

N/A

graphs

Array of graphs objects

Definition

Graph list. This parameter is left blank when the request fails.

Range

N/A

Table 5 graphs

Parameter

Type

Description

id

String

Definition

Graph ID.

Range

N/A

name

String

Definition

Graph name.

Range

N/A

created_by

String

Definition

IAM username.

Range

N/A

is_multi_az

String

Definition

Whether cross-AZ HA is supported.

Range

N/A

region_code

String

Definition

Region code.

Range

N/A

az_code

String

Definition

AZ code.

Range

N/A

schema_path

Array of schema_path objects

Definition

Metadata file path.

Range

N/A

edgeset_path

Array of edgeset_path objects

Definition

Path for storing edge datasets in OBS.

Range

N/A

vertexset_path

Array of vertexset_path objects

Definition

Path for storing vertex datasets in OBS.

Range

N/A

edgeset_format

String

Definition

Format of edge dataset files.

Range

N/A

edgeset_default_label

String

Definition

Default label of edge data files.

Range

N/A

vertexset_format

String

Definition

Format of vertex dataset files.

Range

N/A

vertexset_default_label

String

Definition

Default label of vertex dataset files.

Range

N/A

data_store_version

String

Definition

Graph version.

Range

N/A

sys_tags

Array of strings

Definition

Enterprise project. If unspecified, this function is not enabled by default.

Range

N/A

status

String

Definition

Graph status code.

Range

  • 100: A graph is being prepared.
  • 200: A graph is running.
  • 201: A graph is upgrading.
  • 202: A graph is being imported.
  • 203: A graph is being rolled back.
  • 204: A graph is being exported.
  • 205: A graph is being cleared.
  • 206: A graph is being prepared for a resize.
  • 207: A graph is being resized.
  • 208: A graph is being rolled back from a resize.
  • 210: The system is preparing for expansion.
  • 211: The system is expanding the graph.
  • 300: A graph is faulty.
  • 303: A graph fails to be created.
  • 400: A graph is deleted.
  • 800: A graph is frozen.
  • 900: A graph is stopped.
  • 901: A graph is being stopped.
  • 920: A graph is being started.

action_progress

String

Definition

Graph creation progress, in percentage.

This parameter is returned only when status is 100.

Range

N/A

graph_size_type_index

String

Definition

Graph size type.

Range

  • 0: Ten-thousand-edge.
  • 1: Million-edge.
  • 2: Ten-million-edge.
  • 3: Hundred-million-edge.
  • 4: Billion-edge.
  • 5: Ten-billion-edge.
  • 6: Hundred-billion-edge.
  • 401: Billion-edge-pro.

vpc_id

String

Definition

VPC ID.

Range

N/A

subnet_id

String

Definition

Subnet ID in the VPC.

Range

N/A

security_group_id

String

Definition

Security group ID.

Range

N/A

replication

Integer

Definition

Number of replicas. The default value is 1.

Range

N/A

created

String

Definition

Graph creation time (UTC).

Range

N/A

updated

String

Definition

Graph update time (UTC).

Range

N/A

private_ip

String

Definition

Floating IP address that allows you to access a graph instance through an ECS deployed within a private network.

Range

N/A

public_ip

String

Definition

Public IP address of a graph instance allows you to access the graph instance from the Internet.

Range

N/A

arch

String

Definition

CPU architecture of a graph instance.

Range

  • x86_64: x86.
  • aarch64: Arm.

master_key_id

String

Definition

User master key ID.

Range

N/A

master_key_name

String

Definition

User master key name.

Range

N/A

enable_rbac

Boolean

Definition

Whether fine-grained permission control is enabled.

Range

  • true: enabled.
  • false: disabled.

enable_full_text_index

Boolean

Definition

Whether full-text indexing is enabled.

Range

  • true: enabled.
  • false: disabled.

enable_hyg

Boolean

Definition

Whether HyG is enabled. This parameter is returned only for database edition graphs.

Range

  • true: enabled.
  • false: disabled.

traffic_ip_list

Array of strings

Definition

List of physical addresses for private network access to a graph instance. To prevent service interruptions caused by floating IP switching, you are advised to use physical IP addresses in a round-robin manner when accessing the graph instance.

Range

N/A

crypt_algorithm

String

Definition

Cryptographic algorithm of a graph instance.

Range

  • generalCipher: Chinese cryptographic algorithm.
  • SMcompatible: Commercial cryptographic algorithm (compatible with international ones).

enable_https

Boolean

Definition

Whether the security mode is enabled. Enabling the security mode will have a significant impact on performance.

Range

  • true: enabled.
  • false: disabled.

tags

Array of tags objects

Definition

A list of tags, where each tag is represented as a <key, value> pair.

Range

N/A

product_type

String

Definition

Graph product type.

Range

  • InMemory: memory edition.
  • Persistence: database edition.

vertex_id_type

vertex_id_type object

Definition

ID type of a vertex.

This parameter is returned only for database edition graphs.

Range

N/A

origin_graph_size_type_index

String

Definition

Initial size of a graph. This parameter is returned since version 2.3.15.

Range

N/A

expand_time

String

Definition

Graph expansion time (UTC).

Range

N/A

resize_time

String

Definition

Graph resize time (UTC).

Range

N/A

capacity_ratio

Integer

Definition

Capacity rate of a graph. This parameter is only available for Ten-billion-edge graphs of the database edition since version 2.3.18.

Range

N/A

sort_key_type

String

Definition

Type of the sort key for a database edition graph.

Range

N/A

enable_lts

Boolean

Definition

Whether the interconnection with LTS is enabled.

Range

  • true: enabled.
  • false: disabled.
Table 6 schema_path

Parameter

Type

Description

job_id

String

Definition

Job ID corresponding to OBS file import.

Range

N/A

path

String

Definition

OBS storage path, excluding OBS endpoints.

Range

N/A

status

String

Definition

OBS file status.

Range

  • success
  • partiallyFailed
  • failed
Table 7 edgeset_path

Parameter

Type

Description

job_id

String

Definition

Job ID corresponding to OBS file import.

Range

N/A

path

String

Definition

OBS storage path, excluding OBS endpoints.

Range

N/A

status

String

Definition

OBS file import status.

Range

  • success
  • partiallyFailed
  • failed
Table 8 vertexset_path

Parameter

Type

Description

job_id

String

Definition

Job ID corresponding to OBS file import.

Range

N/A

path

String

Definition

OBS storage path, excluding OBS endpoints.

Range

N/A

status

String

Definition

OBS file import status.

Range

  • success
  • partiallyFailed
  • failed
Table 9 tags

Parameter

Type

Description

key

String

Definition

Tag key.

Range

N/A

value

String

Definition

Tag value.

Range

N/A

Table 10 vertex_id_type

Parameter

Type

Description

id_type

String

Definition

ID type.

Range

  • fixedLengthString: In the variable length string format, vertex IDs are used for internal storage and compute. Specify the length limit. If the IDs are too long, the query performance can be reduced. Specify the length limit based on your dataset vertex IDs. If you cannot determine the maximum length, set the ID type to hash.
  • hash: Vertex IDs are converted into hash code for storage and compute. There is no limit on the ID length. However, there is an extremely low probability, approximately 10^(-43), that the vertex IDs will conflict. If you cannot determine the maximum length of a vertex ID, set this parameter to Hash.

id_length

Integer

Definition

ID length. This parameter is returned when id_type is fixedLengthString.

Range

1 to 128 characters.

Status code: 400

Table 11 Response body parameters

Parameter

Type

Description

error_msg

String

Definition

System prompt.

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

Range

N/A

error_code

String

Definition

System prompt.

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

Range

N/A

Example Request

View the first 10 graphs of the current tenant.

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

Example Response

Status code: 200

Example response for a successful request
{
  "graph_count" : 2,
  "graphs" : [ {
    "id" : "146227d2-bfac-499a-97df-df475349e43d",
    "name" : "TenThousand_Charging",
    "created_by" : "ei_ges_j00356469_01",
    "is_multi_az" : "false",
    "region_code" : "cn-north-7",
    "az_code" : "cn-north-7c",
    "edgeset_format" : "",
    "edgeset_default_label" : "",
    "vertexset_format" : "",
    "vertexset_default_label" : "",
    "data_store_version" : "2.3.2",
    "sys_tags" : [ "0" ],
    "status" : "200",
    "graph_size_type_index" : "0",
    "vpc_id" : "0ac6e3c3-2c9b-4296-84f7-6883cebc7b41",
    "subnet_id" : "2b1755eb-d6d4-421f-88c0-cf6f0bc16801",
    "security_group_id" : "7aa7c8c9-7443-4a01-abf5-8064b586f8f5",
    "replication" : 1,
    "created" : "2022-04-26T02:19:54",
    "private_ip" : "192.168.0.228",
    "arch" : "x86_64",
    "master_key_id" : "",
    "master_key_name" : "",
    "enable_rbac" : false,
    "enable_full_text_index" : false,
    "enable_hyg" : false,
    "traffic_ip_list" : [ "192.168.0.228" ],
    "crypt_algorithm" : "generalCipher",
    "enable_https" : false,
    "origin_graph_size_type_index": "1",
    "expand_time": "2023-08-03T02:10:52",
    "resize_time": "2023-08-02T02:10:52"
  }, {
    "id" : "1172f16c-63c7-4746-89b0-78972eddf706",
    "name" : "GES_UI_2_0_1",
    "created_by" : "ei_ges_j00356469_01",
    "is_multi_az" : "false",
    "region_code" : "cn-north-7",
    "az_code" : "cn-north-7c",
    "edgeset_format" : "",
    "edgeset_default_label" : "",
    "vertexset_format" : "",
    "vertexset_default_label" : "",
    "data_store_version" : "2.0.1",
    "sys_tags" : [ "0" ],
    "status" : "900",
    "graph_size_type_index" : "0",
    "vpc_id" : "0ac6e3c3-2c9b-4296-84f7-6883cebc7b41",
    "subnet_id" : "2b1755eb-d6d4-421f-88c0-cf6f0bc16801",
    "security_group_id" : "7aa7c8c9-7443-4a01-abf5-8064b586f8f5",
    "replication" : 1,
    "created" : "2022-04-26T02:10:52",
    "private_ip" : "192.168.0.123",
    "enable_rbac" : false,
    "enable_full_text_index" : false,
    "enable_hyg" : false,
    "traffic_ip_list" : [ "192.168.0.123" ],
    "crypt_algorithm" : "generalCipher",
    "enable_https" : false,
    "origin_graph_size_type_index": "1",
    "expand_time": "2023-08-03T02:10:52",
    "resize_time": "2023-08-02T02:10:52"
  } ]
}

Status code: 400

Example response for a failed request

{
  "error_code" : "GES.7006",
  "error_msg" : "An internal error occurs in the underlying service of the graph engine."
}

Status Codes

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.