Deleting Vertices and Edges by Files (2.2.15)
Function
This API is used to delete vertices and edges by reading the files.
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 |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
vertexsetPath |
Either vertexsetPath or edgesetPath is mandatory. |
String |
Vertex file directory or name |
vertexsetFormat |
No |
String |
Vertex dataset format. Currently, the options are csv and txt. The CSV format is used by default. |
edgesetPath |
Either vertexsetPath or edgesetPath is mandatory. |
String |
Edge file directory or name |
edgesetFormat |
No |
String |
Edge dataset format. Currently, the options are csv and txt. The CSV format is used by default. |
targetProperties |
No |
Object |
Indicates property information used to distinguish duplicate edges in the edge file, in JSONArray format. For details, see Table 3. |
delimiter |
No |
Character |
Field separator in a CSV file. The default value is comma (,). The default element separator in a field of the list/set type is semicolon (;). |
trimQuote |
No |
Character |
Field quote character in a CSV file. The default value is double quotation marks ("). They are used to enclose a field if the field contains separators or line breaks. |
obsParameters |
Yes |
String |
OBS authentication parameters. For details, see Table 3. |
Response Parameters
Parameter |
Type |
Description |
---|---|---|
errorMessage |
String |
System prompt.
|
errorCode |
String |
System prompt code.
|
jobId |
String |
ID of an asynchronous job You can view the job execution status and obtain the return result by querying the job ID. For details, see Querying Job Status on the Service Plane (1.0.0). |
jobType |
Integer |
Job type. This parameter is left blank if the request fails. |
Example Request
Delete vertices and edges by reading files. The vertex file directory is datasets/movie/movie.csv, and the vertex data set format is CSV. The edge file directory is datasets/movie/ranking_edge.csv, and the edge data set format is CSV.
POST http://{Endpoint}/ges/v1.0/{project_id}/graphs/{graph_name}/action?action_id=delete-by-file { "vertexsetPath": "datasets/movie/movie.csv", "vertexsetFormat": "csv", "edgesetPath": "datasets/movie/ranking_edge.csv", "edgesetFormat": "csv", "targetProperties": [ { "label": "rate", "properties": [ "Rating" ] } ], "delimiter": ",", "trimQuote": "\"", "obsParameters": { "accessKey": "XXXXXXX", "secretKey": "XXXXXXX" } }
Example Response
Status code: 200
Example response for a successful request
Http Status Code: 200 { "jobId": "72b268f7-fdb6-467d-a41f-b1a09f26e593000003836", "jobType": 3 }
Status code: 400
Example response for a failed request
Http Status Code: 400 { "errorMessage": "Not found. Please check the input parameters.", "errorCode": "GES.8000" }
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.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot