Querying Metadata (1.0.2)
Function
This API is used to query the metadata of a graph.
URI
GET /v2/{project_id}/graphs/metadatas/{metadata_id}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details about how to obtain the project ID, see Obtaining a Project ID. |
metadata_id |
Yes |
String |
Metadata ID |
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 |
---|---|---|
encrypted |
Boolean |
Whether metadata is encrypted |
master_key_name |
String |
KMS Key Name |
master_key_id |
String |
Key ID |
ges_metadata |
ges_metadata object |
Object for storing metadata message information. |
Parameter |
Type |
Description |
---|---|---|
labels |
Array of labels objects |
Label data structure set |
Parameter |
Type |
Description |
---|---|---|
name |
String |
Label name |
properties |
Array of Map<String,String> objects |
Property map |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
System prompt code.
|
error_msg |
String |
System prompt code.
|
Example Request
Query metadata of a graph.
GET https://Endpoint/v2/{project_id}/graphs/metadatas/{metadata_id}
Example Response
Status code: 200
Example response for a successful request
{ "encrypted" : false, "ges_metadata" : { "labels" : [ { "name" : "friends" }, { "name" : "movie", "properties" : [ { "data_type" : "string", "name" : "ChineseTitle", "cardinality" : "single" }, { "data_type" : "int", "name" : "Year", "cardinality" : "single" }, { "data_type" : "string", "name" : "Genres", "cardinality" : "set" } ] }, { "name" : "user", "properties" : [ { "data_type" : "string", "name" : "ChineseName", "cardinality" : "single" }, { "type_name1" : "F", "type_name2" : "M", "data_type" : "enum", "name" : "Gender", "type_name_count" : "2", "cardinality" : "single" }, { "type_name1" : "Under 18", "type_name2" : "18-24", "type_name3" : "25-34", "type_name4" : "35-44", "type_name5" : "45-49", "type_name6" : "50-55", "type_name7" : "56+", "data_type" : "enum", "name" : "Age", "type_name_count" : "7", "cardinality" : "single" }, { "data_type" : "string", "name" : "Occupation", "cardinality" : "single" }, { "data_type" : "char array", "name" : "Zip-code", "max_data_size" : "12", "cardinality" : "single" } ] }, { "name" : "rate", "properties" : [ { "data_type" : "int", "name" : "Score", "cardinality" : "single" }, { "data_type" : "date", "name" : "Datetime", "cardinality" : "single" } ] } ] } }
Status code: 400
Example response for a failed request
{ "error_msg" : "6b74069d-3cf3-4cc0-9118-2478e23b87a does not exist.", "error_code" : "GES.2067" }
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.
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