Skip to content

Delete a node permanently

DELETE
/drives/{drive}/nodes/{node}/{permanent}
curl --request DELETE \
--url https://work.optidata.cloud/api/drives/1/nodes/300754/1 \
--header 'Authorization: Bearer <token>'

Erases the node and its descendants, bypassing the trash. This cannot be undone. Requires edit on the node.

Pass 1 as the {permanent} segment. Note that the segment is read as a flag, not as a strict boolean: the string 0 means “use the trash”, and any other non-empty value — including false — is treated as permanent. Send 1.

drive
required
integer format: int64

Numeric id of the drive. Read it from GET /drives/config.json.

node
required
integer format: int64

Numeric id of the node (file or folder).

permanent
required
string
Allowed values: 0 1

Send 1 to erase the node permanently.

Example
1

The node was erased.

Media typeapplication/json
object
key
additional properties
any
Examplegenerated
{}

Missing, malformed or expired authentication key.

Media typeapplication/json

Authentication failures use an error key rather than message.

object
error
required
string
Examples
Examplemissing

No bearer token sent

{
"error": "JWT passport exception: Missing bearer token in request"
}

The caller lacks the permission level the operation requires.

Media typeapplication/json

Generic error envelope used by policy, binding and framework failures.

object
message
required

Human-readable description of the failure.

string
Examples
Exampledenied
{
"message": "This action is unauthorized."
}

The resource does not exist, or does not belong to the given drive.

Media typeapplication/json

Generic error envelope used by policy, binding and framework failures.

object
message
required

Human-readable description of the failure.

string
Examples
Examplemissing
{
"message": "No query results for model [App\\Models\\Node] 99999999"
}

Rate limit exceeded. Retry after the window resets.

Media typeapplication/json

Generic error envelope used by policy, binding and framework failures.

object
message
required

Human-readable description of the failure.

string
Examples
Examplethrottled
{
"message": "Too Many Attempts."
}