更新时间:2025-03-05 GMT+08:00
查询Schema结构
功能介绍
查询生成的schema结构(从OBS上读取)。
URI
GET /ges/v1.0/{project_id}/graphs/{graph_name}/schema/structure?detail={details}
| 参数 | 是否必选 | 类型 | 说明 |
|---|---|---|---|
| project_id | 是 | String | 项目ID。获取方法请参见获取项目ID。 |
| graph_name | 是 | String | 图名称。 |
| details | 否 | String | 可为SIMPLE或FULL,SIMPLE模式表示只返回点或边的label,FULL模式表示除点或边的label外,还有点或边的数量。若该字段不填,则默认为SIMPLE。 |
响应参数
| 参数 | 类型 | 说明 |
|---|---|---|
| errorMessage | String | 系统提示信息。
|
| errorCode | String | 系统提示信息。
|
| schema | Object | schema结构查询结果。详情请参见表3。 |
请求示例
查询生成的schema结构(从OBS上读取)。
GET http://{SERVER_URL}/ges/v1.0/{project_id}/graphs/{graph_name}/schema/structure?detail=SIMPLE 响应示例
状态码: 200
成功响应示例
{
"schema": {
"vertices": [
{
"vertex": "user",
"weight": 100
},
{
"vertex": "movie",
"weight": 46
}
],
"edges": [
{
"weight": 1209,
"source": "user",
"target": "movie",
"relation": "rate"
},
{
"weight": 450,
"source": "user",
"target": "user",
"relation": "default"
}
]
}
} 状态码: 400
失败响应示例
Http Status Code: 400
{
"errorMessage": "Bad Request, parameter [detail] cannot be null.",
"errorCode": "GES.8813"
} 状态码
| 返回值 | 说明 |
|---|---|
| 400 Bad Request | 请求错误。 |
| 401 Unauthorized | 鉴权失败。 |
| 403 Forbidden | 没有操作权限。 |
| 404 Not Found | 找不到资源。 |
| 500 Internal Server Error | 服务内部错误。 |
| 503 Service Unavailable | 服务不可用。 |
错误码
请参见错误码。
父主题: 元数据操作API