Querying Schema Structure
Function
This API is used to query the structure of the generated schema (obtained from OBS).
URI
- URI format
GET /ges/v1.0/{project_id}/graphs/{graph_name}/schema/structure/structure?detail={details}
- Parameters
Table 1 URI parameter description Parameter
Mandatory
Type
Description
project_id
Yes
String
Project ID, which is used for resource isolation. For details, see Obtaining a Project ID.
graph_name
Yes
String
Graph name
details
No
String
Detailed information of the schema structure. The value can be SIMPLE or FULL. If you set this parameter to SIMPLE, only the labels of vertices or edges are returned. If you set it to FULL, the number of vertices or edges is returned in addition to the labels. If this parameter is left empty, the default value SIMPLE is used.
Request
- Example
GET http://{SERVER_URL}/ges/v1.0/{project_id}/graphs/{graph_name}/schema/structure?detail=SIMPLE
Response
- Parameters
Table 2 property parameter description 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.
schema
JSON
Schema structure. For details, see schema parameter description.
Table 3 schema parameter description Parameter
Type
Description
vertices
JSONArray
Vertex result set. If the graph is empty, the return value is empty. For details, see vertices parameter description.
edges
JSONArray
Edge result set. If the graph is empty, the return value is empty. For details, see edges parameter description.
- Response example (successful request)
{ "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" } ] } }
- Response example (failed request)
Http Status Code: 400 { "errorMessage": "Bad Request, parameter [detail] cannot be null.", "errorCode": "GES.8813" }
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot