Updated on 2022-02-22 GMT+08:00

Querying Graph Details

Function

This API is used to query the details about a graph based on the graph ID.

URI

GET /v1.0/{project_id}/graphs/{graph_id}

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID, which is used for resource isolation. For details, see Obtaining a Project ID.

graph_id

Yes

String

Graph ID

Request Parameters

Table 2 Parameters in the request header

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token. The token can be obtained by calling the IAM API. (The token is the value of X-Subject-Token in the response header.)

Response Parameters

Status code: 200

Table 3 Response body parameter

Parameter

Type

Description

graph

graph_1 object

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

errorMessage

String

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

errorCode

String

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

Table 4 graph_1

Parameter

Type

Description

id

String

Graph ID

name

String

Graph name

createdBy

String

Account of the graph creator

isMultiAz

String

Whether to enable cross-AZ HA

regionCode

String

Region code

azCode

String

AZ code

schemaPath

Array of schemaPath_1 objects

Path for storing the metadata file

edgesetPath

Array of edgesetPath_1 objects

OBS path for storing the edge data set

edgesetFormat

String

Format of the edge data file

edgesetDefaultLabel

String

Default label of the edge data file

vertexsetPath

Array of vertexsetPath_1 objects

OBS path for storing the vertex data set

vertexsetFormat

String

Format of the vertex data file

vertexsetDefaultLabel

String

Default label of the vertex data file

dataStoreVersion

String

Graph version

sys_tags

Array of SysTagsRes objects

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 system is preparing for resize.
  • 207: indicates that the resize is in progress.
  • 208: Indicates that the resize is being rolled back.
  • 300: indicates that a graph is faulty.
  • 303: indicates that a graph fails to be created.
  • 400: indicates that a graph is deleted.
  • 900: indicates that a graph is stopped.
  • 901: indicates that a graph is being stopped.
  • 920: indicates that a graph is being started.

actionProgress

String

Progress of graph creation

NOTE:

This field is returned only when status is 100.

graphSizeTypeIndex

String

Graph size type index:

  • 0: indicates 10 thousand edges.
  • 1: indicates 1 million edges.
  • 2: indicates 10 million edges.
  • 3: indicates 100 million edges.
  • 4: indicates 1 billion edges.
  • 5: indicates 10 billion edges.

vpcId

String

VPC ID

subnetId

String

Subnet ID in the VPC

securityGroupId

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

privateIp

String

Private network access address of a graph instance. Users can access the instance using the IP address through the ECS deployed on the private network.

enableHyG

Boolean

Whether to enable HyG. This parameter is available for 100-billion-edge graphs only.

Table 5 schemaPath_1

Parameter

Type

Description

jobId

String

Job ID corresponding to OBS file import

path

String

OBS storage path, excluding OBS endpoint

status

String

OBS file import status:

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

Parameter

Type

Description

jobId

String

Job ID corresponding to OBS file import

path

String

OBS storage path, excluding OBS endpoint

status

String

OBS file import status:

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

Parameter

Type

Description

jobId

String

Job ID corresponding to OBS file import

path

String

OBS storage path, excluding OBS endpoint

status

String

OBS file import status:

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

Parameter

Type

Description

key

String

Key of the enterprise project. The value is _sys_enterprise_project_id.

value

String

Enterprise project ID. You can obtain it from the enterprise project.

Example Request

GET https://Endpoint/v1.0/{project_id}/graphs/{graph_id} 

Example Response

Status code: 200

OK

{
    "graph": {
        "id": "f1529b88-c958-493e-8452-fccfe932cde1",
        "name": "demo",
        "regionCode": "az1-dc1",
        "azCode": "az1-dc1a",
             "schemaPath": [
              {
              "path": "ges-graphs/demo_movie/schema.xml",
              "jobId": "ff80808167bb90340167bc7445670428",
               "status": "success"
              }
             ],
             "edgesetPath": [
              {
               "path": "ges-graphs/demo_movie/edge.csv",
               "jobId": "ff80808167bb90340167bc7445670428",
               "status": "success"
              }
            ],
             "vertexsetPath": [
             {
              "path": "",
              "jobId": "ff80808167bb90340167bc7445670428",
              "status": "success"
             }
           ],
        "status": "200",
        "graphSizeTypeIndex": "1",
        "vpcId": "2d8af840-fd57-4e3b-a8f1-cda0f55ccd99",
        "subnetId": "dc018ec3-67d1-46c9-b2fc-19d83367f4e2",
        "securityGroupId": "11d27338-8649-4076-8579-5ebc1a60f79e",
        "created": "2018-07-23T04:09:44",
        "privateIp": "192.168.0.4",
        
        "dataStoreVersion": "1.0.5",
        "arch": "x86_64"
    }
}
{
  "graph" : {
    "id" : "f1529b88-c958-493e-8452-fccfe932cde1",
    "name" : "demo",
    "regionCode" : "cn-north-1",
    "azCode" : "cn-north-1a",
    "schemaPath" : [ {
      "path" : "ges-graphs/demo_movie/schema.xml",
      "jobId" : "ff80808167bb90340167bc7445670428",
      "status" : "success"
    } ],
    "edgesetPath" : [ {
      "path" : "ges-graphs/demo_movie/edge.csv",
      "jobId" : "ff80808167bb90340167bc7445670428",
      "status" : "success"
    } ],
    "vertexsetPath" : [ {
      "path" : "",
      "jobId" : "ff80808167bb90340167bc7445670428",
      "status" : "success"
    } ],
    "status" : "200",
    "graphSizeTypeIndex" : "1",
    "vpcId" : "2d8af840-fd57-4e3b-a8f1-cda0f55ccd99",
    "subnetId" : "dc018ec3-67d1-46c9-b2fc-19d83367f4e2",
    "securityGroupId" : "11d27338-8649-4076-8579-5ebc1a60f79e",
    "created" : "2018-07-23T04:09:44",
    "privateIp" : "192.168.0.4",
    "publicIp" : "49.4.81.183",
    "dataStoreVersion" : "1.0.5"
  }
}

Status Code

Status Code

Description

200

OK