Updated on 2024-05-20 GMT+08:00

Obtaining Data Assets

Function

This API is used to obtain data assets.

URI

GET /ges/v1.0/{project_id}/graphs/{graph_name}/schema/data-assets
Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

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

graph_name

Yes

String

Graph name

Request Parameters

None

Response Parameters

Table 2 Response body parameters

Parameter

Type

Description

generating

Boolean

Whether data assets are being generated

progress

String

Progress of generating data assets

last_generate_time

String

Last time when a data asset is generated

data_assets

Object

Number of vertices and edges under different labels

errorCode

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.

errorMessage

String

System prompt code

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

Parameter

Type

Description

vertex

Object

Number of vertices under different labels

edge

Object

Number of edges under different labels

Example Request

Obtain data assets.

GET /ges/v1.0/{project_id}/graphs/{graph_name}/schema/data-assets

Example Response

Status code: 200

There are several scenarios for example response for successful requests, including:

  • A data asset has never been generated.
    Http Status Code: 200
    { }
  • A data asset has never been generated and is being generated.
    Http Status Code: 200
    {
        "progress":"10.05%",
        "generating": true
    }
  • A data asset has been generated and a latest one is being generated.
    Http Status Code: 200
    {
         "last_generate_time": "2022-1-3 12:34:12",
        "data_assets": {
           "vertex": {
               "label1": 3,
               "label2": 14
            },
           "edge": {
                "label3":123,
                "label4":435
            }
         },
         "progress":"10.05%",
         "generating": true
    }

Status code: 400

Example response for a failed request

Http Status Code: 400
{
   "errorCode": "GES.8818",
   "errorMessage": "graph [demo] is not found"
}