Querying Schema Structure
Function
This API is used to query the structure of the generated schema (obtained from OBS).
URI
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details about how to obtain the project ID, 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. |
Response Parameters
Parameter |
Type |
Description |
---|---|---|
errorMessage |
String |
System prompt.
|
errorCode |
String |
System prompt code.
|
schema |
Object |
Schema structure. For details about the parameters, see Table 3. |
Parameter |
Type |
Description |
---|---|---|
vertices |
String |
Vertex result set. If the graph is empty, the return value is empty. For details about the parameters, see Table 4. |
edges |
String |
Edge result set. If the graph is empty, the return value is empty. For details about the parameters, see Table 5. |
Example Request
Query a generated schema (obtained from OBS).
GET http://{SERVER_URL}/ges/v1.0/{project_id}/graphs/{graph_name}/schema/structure?detail=SIMPLE
Example Response
Status code: 200
Example response (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" } ] } }
Status code: 400
Example response (failed request)
Http Status Code: 400 { "errorMessage": "Bad Request, parameter [detail] cannot be null.", "errorCode": "GES.8813" }
Status Code
Return Value |
Description |
---|---|
400 Bad Request |
Request error. |
401 Unauthorized |
Authentication failed. |
403 Forbidden |
No operation permission. |
404 Not Found |
No resources found. |
500 Internal Server Error |
Internal service error. |
503 Service Unavailable |
Service unavailable. |
Error Code
See Error Code.
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