Querying the Graph List
Function
This API is used to query all graphs of the current tenant.
URI
GET /v2/{project_id}/graphs
Parameter | Mandatory | Type | Description |
---|---|---|---|
project_id | Yes | String | Project ID. For details about how to obtain the project ID, see Obtaining a Project ID. |
Parameter | Mandatory | Type | Description |
---|---|---|---|
offset | No | Integer | Start position of the request. The default value is 0. |
limit | No | Integer | Maximum number of resources displayed on a single page. The default value is 10. |
Request Parameters
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
Parameter | Type | Description |
---|---|---|
graph_count | Integer | Total number of graphs. Graph object. If the request fails, this parameter is left empty. |
graphs | Array of graphs objects | Graph list. Graph object. If the request fails, this parameter is left empty. |
Parameter | Type | Description |
---|---|---|
id | String | Graph ID |
name | String | Graph name |
created_by | String | IAM username |
is_multi_az | String | Whether cross-AZ HA will be enabled |
region_code | String | Region code |
az_code | String | AZ code |
schema_path | Array of schema_path objects | Path for storing the metadata file |
edgeset_path | Array of edgeset_path objects | OBS path for storing the edge data set |
vertexset_path | Array of vertexset_path objects | OBS path for storing the vertex data set |
edgeset_format | String | Format of the edge data file |
edgeset_default_label | String | Default label of the edge data file |
vertexset_format | String | Format of the vertex data file |
vertexset_default_label | String | Default label of the vertex data file |
data_store_version | String | Graph version |
sys_tags | Array of strings | Enterprise project information. If this parameter is not specified, this function is disabled (default). |
status | String | Status code of a graph
|
action_progress | String | Progress of graph creation NOTE: This field is returned only when status is 100. |
graph_size_type_index | String | Graph size type index
|
vpc_id | String | VPC ID |
subnet_id | String | Subnet ID in the VPC |
security_group_id | String | Security group ID |
replication | Integer | Number of replicas. The default value is 1. |
created | String | Time when a graph is created |
updated | String | Time when a graph is updated |
private_ip | String | Floating IP address of a graph instance. Users can access the instance using the IP address through the ECS deployed on a private network. |
public_ip | String | Public network access address of a graph instance. Users can access the instance using the IP address from the Internet. |
arch | String | Graph instance's CPU architecture type. The value can be x86_64 or aarch64. |
encrypted | Boolean | Whether to encrypt backup data. The default value is false, indicating that the backup data is not encrypted. |
master_key_id | String | User master key ID |
master_key_name | String | User master key name |
enable_rbac | Boolean | Whether to enable granular permission control |
enable_full_text_index | Boolean | Whether to enable full-text indexes |
enable_hyg | Boolean | Whether to enable HyG. This parameter is available only for database edition graphs. |
traffic_ip_list | Array of strings | Physical addresses of a graph instance for access from private networks. To prevent service interruption caused by floating IP address switchover, poll the physical IP addresses to access the graph instance. |
crypt_algorithm | String | Graph instance cryptography algorithm. Available values are as follows:
|
enable_https | Boolean | Whether to enable the security mode. This mode may damage GES performance greatly. |
tags | Array of tags objects | Tag list. Each tag is in <key,value> format. |
product_type | String | Graph type. The value can be InMemory (default value) or Persistence. If graph_size_type_index is 6, the value must be Persistence.
|
vertex_id_type | vertex_id_type object | ID type of vertices. This parameter is mandatory only for database edition graphs. NOTE: The vertex ID type cannot be changed once set. Exercise caution when setting this parameter. |
origin_graph_size_type_index | String | Initial size of a graph. This parameter is returned in versions later than 2.3.15. |
expand_time | String | Time when a graph is expanded. |
resize_time | String | Time when a graph is resized. |
enable_multi_label | Boolean | Whether multi-labeling is enabled. |
Parameter | Type | Description |
---|---|---|
job_id | String | Job ID corresponding to OBS file import |
path | String | OBS storage path, excluding OBS endpoint |
status | String | OBS file status
|
Parameter | Type | Description |
---|---|---|
job_id | String | Job ID corresponding to OBS file import |
path | String | OBS storage path, excluding OBS endpoint |
status | String | OBS file status
|
Parameter | Type | Description |
---|---|---|
job_id | String | Job ID corresponding to OBS file import |
path | String | OBS storage path, excluding OBS endpoint |
status | String | OBS file status
|
Parameter | Type | Description |
---|---|---|
key | String | Tag key |
value | String | Tag value |
Parameter | Type | Description |
---|---|---|
id_type | String | Vertex ID type. The value can be fixedLengthString or hash.
|
id_length | Integer | This parameter is mandatory if id_type is fixedLengthString. The value ranges from 1 to 128. |
Status code: 400
Parameter | Type | Description |
---|---|---|
error_msg | String | System prompt code.
|
error_code | String | System prompt code.
|
Example Request
Query all 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" : "xxxx","az_code" : "xxxx","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","encrypted" : false,"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" : "xxxx","az_code" : "xxxx","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","encrypted" : false,"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. |
Error Codes
See Error Codes.
- Function
- URI
- Request Parameters
- Response Parameters
- Example Request
- Example Response
- Status Codes
- Error Codes