查询元数据列表
功能介绍
查询元数据列表。
URI
GET /v2/{project_id}/graphs/metadatas
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| project_id | 是 | String | 项目ID。获取方法请参见获取项目ID。 |
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| limit | 否 | Integer | 每页资源数量的最大值,默认为10。 |
| offset | 否 | Integer | 本次请求的起始位置,默认为0。 |
请求参数
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| X-Auth-Token | 是 | String | 用户Token。 用于获取操作API的权限。获取方法请参见获取Token接口,响应消息头中X-Subject-Token的值即为Token。 |
响应参数
状态码: 200
| 参数 | 参数类型 | 描述 |
|---|---|---|
| schema_count | Integer | 元数据返回个数。请求失败时,字段为空。 |
| schema_list | Array of schema_list objects | 当前projectId下的所有元数据列表。请求失败时,字段为空。 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| id | String | 元数据 ID。 |
| name | String | 元数据名称。 |
| start_time | String | 元数据创建时间。 |
| last_update_time | String | 元数据最后更新时间。 |
| description | String | 元数据 描述。 |
| metadata_path | String | 元数据对应路径。 |
| status | String | 元数据是否可用。 |
状态码: 500
| 参数 | 参数类型 | 描述 |
|---|---|---|
| error_code | String | 系统提示信息。
|
| error_msg | String | 系统提示信息。
|
请求示例
查询元数据列表。
GET https://Endpoint/v2/{project_id}/graphs/metadatas?offset=0&limit=2 响应示例
状态码: 200
成功响应示例
{
"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",
"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"
} ]
} 状态码: 500
失败响应示例
{
"error_code" : "GES.7006",
"error_msg" : "The underlying graph engine has internal error."
} 状态码
| 返回值 | 说明 |
|---|---|
| 400 Bad Request | 请求错误 |
| 401 Unauthorized | 鉴权失败 |
| 403 Forbidden | 没有操作权限 |
| 404 Not Found | 找不到资源 |
| 500 Internal Server Error | 服务内部错误 |
| 503 Service Unavailable | 服务不可用 |
错误码
请参见错误码。