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

Querying the Metadata List

Function

This API is used to query the metadata list.

URI

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

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.

Table 2 Query parameters

Parameter

Mandatory

Type

Description

limit

No

Integer

Maximum number of resources displayed on a single page. The default value is 10.

offset

No

Integer

Start position of the request. The default value is 0.

Request Parameters

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

Parameter

Type

Description

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.

schemaCount

Integer

Number of returned metadata files. This parameter is left blank if the request fails.

schemaList

Array of metadata objects

List of all metadata files under the current project ID. This parameter is left blank if the request fails.

Table 5 metadata

Parameter

Type

Description

id

String

Metadata ID

name

String

Metadata name

description

String

Metadata description

status

String

Whether the metadata is available

metadataPath

String

Metadata path.

createTimestamp

String

Metadata creation timestamp

lastUpdateTimestamp

String

Last timestamp when the metadata is upgraded

Example Request

GET https://Endpoint/v1.0/{project_id}/graphs/metadatas?offset=10&limit=100

Example Response

Status code: 200

OK

{
  "schemaCount " : 1,
  "schemaList" : [ {
    "id" : "ff7dddc4-6402-43d7-9aed-c5ec677b47fa",
    "name" : "schema_demo",
    "description" : "",
    "status" : "200",
    "metadataPath" : "ges-graphs/demo_movie/schema.xml",
    "startTime" : "2018-07-23T02:59:41",
    "lastUpdateTime" : "2018-07-23T02:59:41"
  } ]
}

Status code: 500

Internal Server Error

{
  "errorCode" : "GES.7006",
  "errorMessage" : "The underlying graph engine has internal error."
}

Status Code

Status Code

Description

200

OK

500

Internal Server Error