TigerGraph文档
2.4
Search…
⌃K

系统预制函数请求格式(JSON)

下面这个请求:
curl -X GET "http://server_ip:9000/endpoints?builtin=true"
会生成如下输出结果。该输出在调整完格式后大约为400行。除了列出所有端点之外,该JSON格式的输出结果还会列出每一个端点必须的参数和可选的参数。对应每个参数,还会列举出对应的属性名。
  • default
  • max_count
  • min_count
  • type
  • max_length
  • is_id
  • id_type
由于这些内容本身并不足以让我们完全理解每一个端点,所以额外的描述性参数名和属性值则起到了补充说明的作用。
{
"DELETE /graph/{graph_name}/delete_by_type/vertices/{vertex_type}" : {
"parameters" : {
"ack" : {
"default" : "all",
"max_count" : 1,
"min_count" : 1,
"options" : [ "all", "none" ],
"type" : "STRING"
},
"permanent" : {
"default" : "false",
"max_count" : 1,
"min_count" : 1,
"type" : "BOOL"
},
"vertex_type" : {
"type" : "TYPENAME"
}
}
},
"DELETE /graph/{graph_name}/edges/{source_vertex_type}/{source_vertex_id}/{edge_type}/{target_vertex_type}/{target_vertex_id}" : {
"parameters" : {
"edge_type" : {
"max_count" : 1,
"min_count" : 0,
"type" : "STRING"
},
"filter" : {
"max_count" : 1,
"max_length" : 2560,
"min_count" : 0,
"type" : "STRING"
},
"limit" : {
"max_count" : 1,
"min_count" : 0,
"type" : "UINT64"
},
"not_wildcard" : {
"max_count" : 1,
"min_count" : 0,
"type" : "BOOL"
},
"permanent" : {
"default" : "false",
"max_count" : 1,
"min_count" : 1,
"type" : "BOOL"
},
"select" : {
"max_count" : 1,
"max_length" : 2560,
"min_count" : 0,
"type" : "STRING"
},
"sort" : {
"max_count" : 1,
"max_length" : 2560,
"min_count" : 0,
"type" : "STRING"
},
"source_vertex_id" : {
"id_type" : "$source_vertex_type",
"is_id" : true,
"max_count" : 1,
"max_length" : 256,
"min_count" : 1,
"type" : "STRING"
},
"source_vertex_type" : {
"max_count" : 1,
"min_count" : 1,
"type" : "TYPENAME"
},
"target_vertex_id" : {
"id_type" : "$target_vertex_type",
"is_id" : true,
"max_count" : 1,
"max_length" : 256,
"min_count" : 0,
"type" : "STRING"
},
"target_vertex_type" : {
"max_count" : 1,
"min_count" : 0,
"type" : "TYPENAME"
},
"timeout" : {
"default" : "0",
"max_count" : 1,
"min_count" : 0,
"type" : "UINT32"
}
}
},
"DELETE /graph/{graph_name}/vertices/{vertex_type}/{vertex_id}" : {
"parameters" : {
"filter" : {
"max_count" : 1,
"max_length" : 2560,
"min_count" : 0,
"type" : "STRING"
},
"limit" : {
"max_count" : 1,
"min_count" : 0,
"type" : "UINT64"
},
"permanent" : {
"default" : "false",
"max_count" : 1,
"min_count" : 1,
"type" : "BOOL"
},
"sort" : {
"max_count" : 1,
"max_length" : 2560,
"min_count" : 0,
"type" : "STRING"
},
"timeout" : {
"default" : "0",
"max_count" : 1,
"min_count" : 0,
"type" : "UINT32"
},
"vertex_id" : {
"id_type" : "$vertex_type",
"is_id" : true,
"max_count" : 1,
"max_length" : 2560,
"min_count" : 0,
"type" : "STRING"
},
"vertex_type" : {
"type" : "TYPENAME"
}
}
},
"GET /echo" : {
"parameters" : {
"sleep" : {
"default" : "0",
"type" : "INT32"
}
}
},
"GET /endpoints" : {
"parameters" : {
"builtin" : {
"default" : "false",
"max_count" : 1,
"min_count" : 0,
"type" : "BOOL"
},
"dynamic" : {
"default" : "false",
"max_count" : 1,
"min_count" : 0,
"type" : "BOOL"
},
"static" : {
"default" : "false",
"max_count" : 1,
"min_count" : 0,
"type" : "BOOL"
}
}
},
"GET /graph/{graph_name}/edges/{source_vertex_type}/{source_vertex_id}/{edge_type}/{target_vertex_type}/{target_vertex_id}" : {
"parameters" : {
"count_only" : {
"default" : "false",
"max_count" : 1,
"min_count" : 0,
"type" : "BOOL"
},
"edge_type" : {
"max_count" : 1,
"min_count" : 0,
"type" : "STRING"
},
"filter" : {
"max_count" : 1,
"max_length" : 2560,
"min_count" : 0,
"type" : "STRING"
},
"limit" : {
"max_count" : 1,
"min_count" : 0,
"type" : "UINT64"
},
"not_wildcard" : {
"max_count" : 1,
"min_count" : 0,
"type" : "BOOL"
},
"select" : {
"max_count" : 1,
"max_length" : 2560,
"min_count" : 0,
"type" : "STRING"
},
"sort" : {
"max_count" : 1,
"max_length" : 2560,
"min_count" : 0,
"type" : "STRING"
},
"source_vertex_id" : {
"id_type" : "$source_vertex_type",
"is_id" : true,
"max_count" : 1,
"max_length" : 256,
"min_count" : 1,
"type" : "STRING"
},
"source_vertex_type" : {
"max_count" : 1,
"min_count" : 1,
"type" : "TYPENAME"
},
"target_vertex_id" : {
"id_type" : "$target_vertex_type",
"is_id" : true,
"max_count" : 1,
"max_length" : 256,
"min_count" : 0,
"type" : "STRING"
},
"target_vertex_type" : {
"max_count" : 1,
"min_count" : 0,
"type" : "TYPENAME"
},
"timeout" : {
"default" : "0",
"max_count" : 1,
"min_count" : 0,
"type" : "UINT32"
}
}
},
"GET /graph/{graph_name}/vertices/{vertex_type}/{vertex_id}" : {
"parameters" : {
"count_only" : {
"default" : "false",
"max_count" : 1,
"min_count" : 0,
"type" : "BOOL"
},
"filter" : {
"max_count" : 1,
"max_length" : 2560,
"min_count" : 0,
"type" : "STRING"
},
"limit" : {
"max_count" : 1,
"min_count" : 0,
"type" : "UINT64"
},
"select" : {
"max_count" : 1,
"max_length" : 2560,
"min_count" : 0,
"type" : "STRING"
},
"sort" : {
"max_count" : 1,
"max_length" : 2560,
"min_count" : 0,
"type" : "STRING"
},
"timeout" : {
"default" : "0",
"max_count" : 1,
"min_count" : 0,
"type" : "UINT32"
},
"vertex_id" : {
"id_type" : "$vertex_type",
"is_id" : true,
"max_count" : 1,
"max_length" : 2560,
"min_count" : 0,
"type" : "STRING"
},
"vertex_type" : {
"type" : "TYPENAME"
}
}
},
"GET /statistics" : {
"parameters" : {
"seconds" : {
"default" : "10",
"type" : "UINT32"
},
"segments" : {
"default" : "10",
"max" : "100",
"min" : "1",
"type" : "UINT32"
}
}
},
"GET /version" : null,
"POST /builtins" : null,
"POST /ddl/{graph_name}" : {
"parameters" : {
"ack" : {
"default" : "all",
"max_count" : 1,
"min_count" : 1,
"options" : [ "all", "none" ],
"type" : "STRING"
},
"concise" : {
"default" : "false",
"max_count" : 1,
"min_count" : 1,
"type" : "BOOL"
},
"eol" : {
"default" : "\n",
"max_count" : 1,
"max_length" : 4,
"min_count" : 0,
"min_length" : 1,
"type" : "STRING"
},
"filename" : {
"default" : "__GSQL_FILENAME__",
"max_count" : 1,
"min_count" : 0,
"type" : "STRING"
},
"sep" : {
"default" : ",",
"max_count" : 1,
"max_length" : 4,
"min_count" : 0,
"min_length" : 1,
"type" : "STRING"
},
"tag" : {
"max_count" : 1,
"min_count" : 1,
"type" : "STRING"
},
"timeout" : {
"default" : "0",
"max_count" : 1,
"min_count" : 0,
"type" : "UINT32"
}
}
},
"POST /echo" : {
"parameters" : {
"sleep" : {
"default" : "0",
"type" : "INT32"
}
}
},
"POST /graph/{graph_name}" : {
"parameters" : {
"ack" : {
"default" : "all",
"max_count" : 1,
"min_count" : 1,
"options" : [ "all", "none" ],
"type" : "STRING"
}
}
}
}