Updated on 2024-12-03 GMT+08:00

Querying Graph Details (1.0.0)

Function

This API is used to query graph details by graph ID.

URI

GET /v2/{project_id}/graphs/{graph_id}

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.

graph_id

Yes

String

Graph ID

Request Parameters

Table 2 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 3 Response body parameters

Parameter

Type

Description

graph

graph object

Graph object. If the request fails, this parameter is left empty.

Table 4 graph

Parameter

Type

Description

id

String

Graph ID

name

String

Graph name

created_by

String

IAM username

is_multi_az

String

Whether to enable cross-AZ HA

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:

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

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:

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

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

Graph creation time (UTC).

updated

String

Graph update time (UTC).

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:

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

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.

  • InMemory: memory edition
  • Persistence: database version

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

Graph expansion time (UTC).

resize_time

String

Graph resize time (UTC).

enable_multi_label

Boolean

Whether multi-lableing is enabled.

capacity_ratio

Integer

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

sort_key_type

String

Type of the sort key for a database edition graph.

enable_lts

Boolean

Whether the interconnection with LTS is enabled. The options are:

  • true: The interconnection is enabled.
  • false: The interconnection is disabled.
Table 5 schema_path

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 import status. The options include:

  • success: Imported successfully.
  • partiallyFailed: Partially failed.
  • failed: Failed to import the file.
Table 6 edgeset_path

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 import status. The options include:

  • success: Imported successfully.
  • partiallyFailed: Partially failed.
  • failed: Failed to import the file.
Table 7 vertexset_path

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 import status. The options include:

  • success: Imported successfully.
  • partiallyFailed: Partially failed.
  • failed: Failed to import the file.
Table 8 tags

Parameter

Type

Description

key

String

Tag key

value

String

Tag value

Table 9 vertex_id_type

Parameter

Type

Description

id_type

String

Vertex ID type. The value can be fixedLengthString or hash.

  • fixedLengthString: 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.
  • 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

This parameter is mandatory if id_type is fixedLengthString. The value ranges from 1 to 128.

Status code: 400

Table 10 Response body parameters

Parameter

Type

Description

error_code

String

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.

error_msg

String

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.

Example Request

Query graph details by graph ID.

GET https://Endpoint/v2/{project_id}/graphs/{graph_id}

Example Response

Status code: 200

Example response for a successful request

{
  "graph" : {
    "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" : 0,
    "created" : "2022-04-26T02:10:52",
    "updated" : "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,
    "enable_multi_label":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.