导出图
- 不要启用“启用动态数据交换服务器启动(不推荐)”配置。
- 打开CSV文件弹窗提醒安全问题时,不要选择“启用”或者“是”。
URI
|
参数 |
是否必选 |
类型 |
说明 |
|---|---|---|---|
|
project_id |
是 |
String |
项目ID。获取方法请参见获取项目ID。 |
|
graph_name |
是 |
String |
图名称。 |
请求参数
|
参数 |
是否必选 |
类型 |
说明 |
|---|---|---|---|
|
graphExportPath |
是 |
String |
图的导出OBS路径。 |
|
edgeSetName |
是 |
String |
导出边数据集名称。 |
|
vertexSetName |
是 |
String |
导出点数据集名称。 |
|
schemaName |
是 |
String |
导出元数据文件名。 |
|
paginate |
否 |
Object |
分页相关参数,详情请参见paginate参数说明。 |
|
obsParameters |
是 |
String |
Obs相关参数,详情请参见obsParameters参数说明。 |
|
accessKey |
是 |
String |
用户的accessKey。 |
|
secretKey |
是 |
String |
用户的secretKey。 |
响应参数
|
参数 |
类型 |
说明 |
|---|---|---|
|
errorMessage |
String |
系统提示信息。
|
|
errorCode |
String |
系统提示信息。
|
|
jobId |
String |
执行该异步任务的jobId。 可以查询jobId查看任务执行状态、获取返回结果,详情参考Job管理API。 |
请求示例
进行导出图操作,图的导出OBS路径为demo_movie/,导出边数据集名称为set_edge,导出点数据集名称为set_vertex,导出元数据文件名为set_schema.xml
POST http://{SERVER_URL}/ges/v1.0/{project_id}/graphs/{graph_name}/action?action_id=export-graph
{
"graphExportPath": "demo_movie/",
"edgeSetName": "set_edge",
"vertexSetName": "set_vertex",
"schemaName": "set_schema.xml",
"paginate":{
"numThread":8,
"rowCountPerFile":1000000
},
"obsParameters": {
"accessKey": "xxxxxx",
"secretKey": "xxxxxx"
}
}
请求示例2
POST http://{SERVER_URL}/ges/v1.0/{project_id}/graphs/{graph_name}/action?action_id=export-graph
{
"graphExportPath": "demo_movie/",
"edgeSetName": "set_edge",
"vertexSetName": "set_vertex",
"schemaName": "set_schema.xml",
"obsParameters": {
"accessKey": "xxxxxx",
"secretKey": "xxxxxx"
}
}
响应示例
状态码: 200
成功响应示例
Http Status Code: 200
{
"jobId": "b4f2e9a0-0439-4edd-a3ad-199bb523b613"
}
状态码: 400
失败响应示例
Http Status Code: 400
{
"errorMessage": "Parameter error!",
"errorCode": "GES.8005"
}
状态码
|
返回值 |
说明 |
|---|---|
|
400 Bad Request |
请求错误。 |
|
401 Unauthorized |
鉴权失败。 |
|
403 Forbidden |
没有操作权限。 |
|
404 Not Found |
找不到资源。 |
|
500 Internal Server Error |
服务内部错误。 |
|
503 Service Unavailable |
服务不可用。 |
错误码
请参见错误码。