Skip to content
Luna
Esc
↑↓navigate↵open⌘Jpreview

Delete a file

Deletes one file from a bucket of one luna.

DELETE/_luna/tenants/{tenant}/files/{type}/{bucket}
Authorization
AuthorizationBearer token · headerrequired

An account key (la_…), an API key (lt_…) or a session token (ls_…). The scopes listed are the permissions the operation needs.

Scopes:data:write
Path parameters
tenantstringrequired

The tenant, by its name.

typestringrequired

The luna type, by its name.

bucketstringrequired

The bucket, by its name.

Query parameters
keystringrequired

The luna's key as JSON, such as {"id":"a"}. For a type keyed by one field, the value of that field alone also works.

pathstringrequired

The file's path in the bucket.

Responses
200

Whether there was a file to delete.

deletedbooleanrequired

False when it was already gone.

default

The request failed. The status says how and error.message says why.

errorErrorDetailrequired
Show properties
codestring | null

A code for programs to branch on, when the error has one.

messagestringrequired

What went wrong, in a sentence a person can read.

Try it
Server
Authorization
Parameters
Request
curl -X DELETE 'https://luna.example.com/_luna/tenants/string/files/string/string?key=string&path=string' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
Response
{
  "deleted": true
}

Was this page helpful?