Querying the Graph List (2.1.18)
Function
This API is used to query all graphs owned by the current tenant.
URI
- URI format
GET /v1.0/{project_id}/graphs?offset={offset}&limit={limit}
- Parameter description
Table 1 URI parameter description Parameter
Mandatory
Type
Description
project_id
Yes
String
Project ID, which is used for resource isolation. For details, see Obtaining a Project ID.
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
- Request example
GET https://Endpoint/v1.0/{project_id}/graphs?offset=0&limit=10
Response
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| errorMessage | No | 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 | No | String | System prompt. If execution succeeds, this parameter may be left blank. If execution fails, this parameter is used to display the error code. |
| graphCount | No | Integer | Total number of graphs. This parameter is left blank when the request fails. |
| graphs | No | List structure. For details, see the data structure description of the graph type. | Graph type list. This parameter is left blank when the request fails. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| id | Yes | String | Graph ID |
| name | Yes | String | Graph name |
| createdBy | Yes | String | Account of the graph creator |
| isMultiAz | No | Boolean | Whether to enable cross-AZ HA |
| regionCode | Yes | String | Region code |
| azCode | Yes | String | AZ code |
| schemaPath | No | JSONArray | OBS path for storing metadata files |
| edgesetPath | No | JSONArray | OBS path for storing the edge data set |
| edgesetFormat | No | String | Format of the edge data file |
| edgesetDefaultLabel | No | String | Default label of the edge data file |
| vertexsetPath | No | JSONArray | OBS path for storing the vertex data set |
| vertexsetFormat | No | String | Format of the vertex data file |
| vertexsetDefaultLabel | No | String | Default label of the vertex data file |
| dataStoreVersion | Yes | String | Graph version |
| status | Yes | String | Status code of a graph:
|
| actionProgress | No | String | Progress of graph creation NOTE: This field is returned only when status is 100. |
| graphSizeTypeIndex | Yes | String | Graph size type index:
|
| vpcId | Yes | String | VPC ID |
| subnetId | Yes | String | Network ID in the specified VPC |
| securityGroupId | Yes | String | Security group ID |
| created | No | String | Time when a graph is created |
| updated | No | String | Time when a graph is updated |
| privateIp | No | 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. |
| publicIp | No | String | Public network access address of a graph instance. Users can access the instance using the IP address from the Internet. |
| arch | No | String | Graph CPU architecture. The value can be x86_64 or aarch64. |
| encrypted | No | Boolean | Whether to encrypt the data. The default value is false, indicating that the data is not encrypted. |
| masterKeyId | No | String | User master key ID |
| masterKeyName | No | String | User master key name |
| enableRBAC | No | Boolean | Whether to enable granular permission control |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| path | Yes | String | OBS storage path, excluding OBS endpoint |
| job_id | Yes | String | Job ID corresponding to OBS file import |
| status | Yes | String | OBS file import status:
|
- Response example (successful request)
Http Status Code: 200 { "graphCount": 2, "graphs": [ { "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", "updated": "2018-07-23T04:09:44", "privateIp": "192.168.0.4", "publicIp": "49.4.81.183", "dataStoreVersion": "1.0.5", "arch": "x86_64", "enableFullTextIndex" : false }, { "id": "53205529-026b-455a-9e07-228fae4b12b9", "name": "ges_c5de", "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": "2", "vpcId": "2d8af840-fd57-4e3b-a8f1-cda0f55ccd99", "subnetId": "dc018ec3-67d1-46c9-b2fc-19d83367f4e2", "securityGroupId": "11d27338-8649-4076-8579-5ebc1a60f79e", "created": "2018-07-18T13:30:16", "updated": "2018-07-18T13:30:16", "privateIp": "192.168.0.168", "dataStoreVersion": "1.0.5", "arch": "aarch64", "enableFullTextIndex" : false } ] } - Response example (failed request)
Http Status: 400 { "errorCode": "GES.7006", "errorMessage": "The underlying graph engine has internal error." }
Return Value
- Normal
- Abnormal
Table 5 Return code for failed requests Return Value
Description
400 Bad Request
Request error.
401 Unauthorized
Authentication failed.
403 Forbidden
No operation permission.
404 Not Found
The requested resource was not found.
500 Internal Server Error
Internal service error.
503 Service Unavailable
Service unavailable.
Last Article: Graph Management APIs
Next Article: Querying Graph Details (1.0.0)
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.