Exporting Filtered Vertices
Function
This API is used to export the vertex set that meets the filter criteria.
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 |
Example Request
Export vertices that meet filter criteria (only the asynchronous mode is supported). The export path is demo_movie/, and the export file name is export_movie_and_user.csv.
POST https://{SERVER_URL}/ges/v1.0/{project_id}/graphs/{graph_name}/vertices/action?action_id=export { "labels": [ "movies", "user" ], "vertexFilters": [ { "propertyName": "Age", "predicate": "=", "values": [ "18-24" ] } ], "exportPath": "demo_movie/", "fileName": "export_movie_and_user.csv", "obsParameters": { "accessKey": "XXXX", "secretKey": "XXXX" } }
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
labels |
Either labels or vertexFilters is mandatory. |
String |
Filter criteria of the vertex type |
vertexFilters |
Either labels or vertexFilters is mandatory. |
Json |
Filter criteria, in JSONArray format. Vertices are filtered by property. For details, see vertexFilters parameters. |
exportPath |
Yes |
String |
Export path |
fileName |
No |
String |
Name of the exported file |
obsParameters |
Yes |
String |
OBS authentication parameters. For details, see obsParameters. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
propertyName |
Yes |
String |
Property name |
predicate |
Yes |
String |
Predicate. Available values are =, <, >, <=, >=, range, has, hasNot. |
values |
No |
String |
Property value. |
type |
No |
String |
Logical operator of the filter criteria. Possible values are and and or. The default value is and. |
Response Parameters
Parameter |
Type |
Description |
---|---|---|
errorMessage |
String |
System prompt.
|
errorCode |
String |
System prompt code.
|
jobId |
String |
ID of the edge query job
NOTE:
You can view the job execution status and obtain the return result by querying the job ID. For details, see Job Management APIs. |
Example Response
Status code: 200
Http Status Code: 200 { "jobId": "03e774f5-29ea-4187-9508-5435f3892ead016886200", "jobType": 1 }
Status code: 400
Example response for a failed request
Http Status Code: 400 { "errorMessage": "Bad Request, parameter labels and vertexFilters cannot all be null", "errorCode": "GES.8203" }
Status Codes
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 Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.