Deleting Filtered Edges
Function
This API is used to delete the edge set that meets the filter criteria.
URI
POST /ges/v1.0/{project_id}/graphs/{graph_name}/edges/action?action_id=delete
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| labels | Either labels or edgeFilters is mandatory. | String | Filter criteria of the relationship type |
| edgeFilters | Either labels or edgeFilters is mandatory. | String | Filter criteria, in JSONArray format. Vertices are filtered by property. For details, see Table 4. |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| errorMessage | String | System prompt.
|
| errorCode | String | System prompt code.
|
| job_id | 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. |
| jobType | String | Type of an asynchronous job |
Example Request
POST https://{SERVER_URL}/ges/v1.0/{project_id}/graphs/{graph_name}/edges/action?action_id=delete
{
"labels": [
"rate"
],
"edgeFilters": [
{
"propertyName": "Score",
"predicate": ">=",
"values": [
"2"
]
},
{
"propertyName": "Datetime",
"predicate": "range",
"values": [
"1998-12-27 01:00:00",
"2000-12-31 00:12:38"
],
"type": "or"
}
]
} POST https://{SERVER_URL}/ges/v1.0/{project_id}/graphs/{graph_name}/edges/action?action_id=delete
{
"labels": [
"rate"
],
"edgeFilters": [
{
"propertyName": "Score",
"predicate": ">=",
"values": [
"2"
]
},
{
"propertyName": "Datetime",
"predicate": "range",
"values": [
"1998-12-27 01:00:00",
"2000-12-31 00:12:38"
],
"type": "or"
}
]
} Example Response
Status code: 200
Http Status Code: 200
{
"jobId": "f9987cab-64d3-4b3d-ac43-e91ae0c21bef168127124",
"jobType": 0
} Status code: 400
Http Status Code: 400
{
"errorMessage": "Bad Request, parameter labels and edgeFilters cannot all be null",
"errorCode": "GES.8103"
} Status Code
| 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 Code
See Error Code.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.