Exporting a Graph
Function
This API is used to unbind an EIP.
The database edition 2.3.14 or later supports this function.
Debugging
- You can debug this API in API Explorer, which supports automatic authentication. API Explorer automatically generates sample SDK code and provides the debugging function.
URI
POST /v2/{project_id}/graphs/{graph_id}/export-graph
|
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_id |
Yes |
String |
Graph 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. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
graph_export_path |
Yes |
String |
OBS path to which a graph is exported |
|
edge_set_name |
Yes |
String |
Exported edge file name |
|
vertex_set_name |
Yes |
String |
Exported vertex file name |
|
schema_name |
Yes |
String |
Name of the exported metadata file |
|
paginate |
No |
paginate object |
Pagination-related parameters. In memory edition 2.3.11 or later, graphs are exported on multiple pages by default. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
enable |
No |
Boolean |
Whether to enable pagination. The default value is true. If pagination is not required, set this parameter to false.
NOTE:
This parameter is unavailable for database editions. |
|
row_count_per_file |
No |
Integer |
Maximum number of rows in each file when graphs are exported by page. The default value is 10000000. |
|
num_thread |
No |
Integer |
Number of concurrent threads when graphs are exported by page. The default value is 8. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
job_id |
String |
ID of an asynchronous job |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
System prompt.
|
|
error_msg |
String |
System prompt.
|
Example Request
Export a graph. The OBS path for exporting the graph is demo_movie/, the name of the exported edge file is set_edge.csv, the name of the exported vertex file is set_vertex.csv, and the name of the exported metadata file is set_schema.xml.
POST http://Endpoint/v2/{project_id}/graphs{graph_id}/export-graph
{
"graph_export_path" : "demo_movie/",
"edge_set_name" : "set_edge.csv",
"vertex_set_name" : "set_vertex.csv",
"schema_name" : "set_schema.xml"
}
Example Response
Status code: 200
Example response for a successful request
{
"job_id" : "f99f60f1-bba6-4cde-bd1a-ff4bdd1fd500000168232"
}
Status code: 400
Example response for a failed request
{
"error_msg" : "graph [demo] is not found",
"error_code" : "GES.8011"
}
Status Code
|
Return Value |
Description |
|---|---|
|
400 Bad Request |
Request error. |
|
401 Unauthorized |
Authentication 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 Codes
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.