Delete entities with an HQL DELETE statement
POST /Platform/query/hql/delete
Delete entities with an HQL DELETE statement.
Only DELETE <Type> [@ branch] | <filter> [| hard] is accepted, and
the filter is required. Reads go through the query service's hql
operation. Writes to a protected main are refused like every other
entity write: work on a branch and open a changeset.
Body parameters
hql: str. A DELETE statement, e.g.DELETE Call | status = "test".params: optional dict. Named parameter dict for parameterised statements.branch: optional str. Branch to delete on when the statement names none (default:main).timeout: optional int. Statement timeout in seconds (default 5, clamped to 1..60).
Returns
QueryDeletion
rows: List[Dict[str, JsonValue]]. Empty for a DELETE statement.deleted_count: int. Number of deleted entities.entity_type: str. Deleted entity class name.branch: str. Affected branch, or * for all branches.hard: bool. Whether deletion was permanent.ids_deleted: List[str]. Identifiers of deleted entities.sql: str. SQL used to locate matching entities.params: Union[List[JsonValue], Dict[str, JsonValue]]. Parameters used by the statement.execution_time_ms: float. Execution duration in milliseconds.
Example request
curl -X POST "https://api.hilus.ai/Platform/query/hql/delete" \
-H "Authorization: Bearer $HILUS_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'