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

Listing Metadata Files (1.0.2)

Function

This API is used to list metadata files.

URI

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

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.

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.

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 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 code.

  • 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

startTime

String

Metadata creation time

lastUpdateTime

String

Last update time of the metadata

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

Request sent.

400

Request error.

401

Authentication failed.

403

No operation permission.

404

No resources found.

500

Internal service error.

503

Service unavailable.