Querying the Metadata List
Function
Query the metadata list.
URI
GET /v2/{project_id}/graphs/metadatas
Parameter | Mandatory | Type | Description |
---|---|---|---|
project_id | Yes | String | Project ID. For details about how to obtain the project ID, see Obtaining a Project ID. |
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
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
Parameter | Type | Description |
---|---|---|
schema_count | Integer | Number of returned metadata files. This parameter is left blank when the request fails. |
schema_list | Array of schema_list objects | List of all metadata files under the current project ID. This parameter is left blank when the request fails. |
Parameter | Type | Description |
---|---|---|
id | String | Metadata ID |
name | String | Metadata name |
start_time | String | Metadata creation time |
last_update_time | String | Last update time of the metadata |
encrypted | Boolean | Whether metadata is encrypted |
description | String | Metadata description |
metadata_path | String | Metadata path |
status | String | Whether the metadata is available |
Status code: 500
Parameter | Type | Description |
---|---|---|
error_code | String | System prompt code.
|
error_msg | String | System prompt code.
|
Example Request
Query the metadata list.
GET https://Endpoint/v2/{project_id}/graphs/metadatas?offset=0&limit=2
Example Response
Status code: 200
Example response for a successful request
{"schema_count" : 2,"schema_list" : [ {"start_time" : "2022-01-21T10:13:31","last_update_time" : "2022-01-21T10:13:31","encrypted" : true,"name" : "schema_748e","master_key_id" : "106be30a-733d-45d0-84f3-1c5439381313","description" : "xxxxx","id" : "6634c50e-13aa-4395-8088-6b327f7da694","metadata_path" : "devdata/schema_748e.xml","status" : "200"}, {"start_time" : "2022-04-12T03:15:17","last_update_time" : "2022-11-16T08:18:32","encrypted" : false,"name" : "unionsdk_schema","id" : "6b74069d-3cf3-4cc0-9118-2478e23b87aa","metadata_path" : "devdata/unionsdk/unionsdk_schema.xml","status" : "200"} ]}
Status code: 500
Example response for a failed request
{"error_code" : "GES.7006","error_msg" : "The underlying graph engine has internal error."}
Status Code
Return Value | Description |
---|---|
400 Bad Request | Request error |
401 Unauthorized | Authorization failed |
403 Forbidden | No operation permissions |
404 Not Found | No resources found |
500 Internal Server Error | Internal server error |
503 Service Unavailable | Service unavailable |
Error Code
See Error Code.
- Function
- URI
- Request Parameters
- Response Parameters
- Example Request
- Example Response
- Status Code
- Error Code