Storage

Preview — pending review

This reference is generated from the platform API contract and is still under review. Operations, fields, and descriptions can change before publication.

Delete several objects from the bucket

POST
/scopes/{scopeId}/storage/buckets/{bucketId}/objects/actions/delete

Deletes the selected objects, backing the "Delete selected" bulk action in the object browser. Same rules as storage.bucket.object.delete, applied to a selection of up to 1000 keys: every key is validated BEFORE anything is deleted, so an unknown key fails the whole request and no object is removed. Duplicate keys in the selection are deleted once. Validation: bucketId must reference an existing, non-deleted bucket in the scope (unknown → 404 NOT_FOUND); keys must hold 1–1000 non-empty object keys, none a folder prefix (→ 422 VALIDATION_FAILED); every key must be in the bucket's object inventory (otherwise → 404 NOT_FOUND with details.missingKeys, nothing deleted); a bucket that is creating, deleting or in error cannot be written (→ 409 CONFLICT); a legacy delete-protected bucket (objectLock: true) refuses object deletion on this API and the console (→ 409 LOCKED; direct OpenStack Swift access is not restricted); caller must hold owner|admin|contributor on the scope, otherwise 403 FORBIDDEN. Async & state: Synchronous — returns 200 with the BucketObjectsDeleteResult (the deleted keys and the recomputed counters). If the provider fails part-way, the inventory is left untouched and nothing is recorded against the Idempotency-Key; the provider delete is idempotent, so retrying the same request converges. Errors: 401 unauthenticated; 403 caller lacks write permission on the scope; 404 unknown scopeId, bucketId or any selected key; 409 CONFLICT bucket state does not permit the write; 409 LOCKED the bucket has object lock; 422 invalid selection; 503 object store unavailable; 500 unexpected backend failure. Idempotency/Concurrency: Idempotency-Key is optional; replaying the same key and body returns the original 200 result without a second delete; the same key with a different selection → 409 CONFLICT.

Authorization

bearerToken
headerAuthorizationBearer <token>

An API token (pc_live_…) or a service-account key (sak_live_…), created in Identity & Access Management and sent as Authorization: Bearer <token>. Requests are rate limited per credential and per tenant: every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset, and a refused request gets 429 RATE_LIMITED with Retry-After.

Path Parameters

scopeId*string

Opaque ownership+authorization scope resolving to tenant + subscription + project.

bucketId*string

Identifier of the bucket.

Header Parameters

Idempotency-Key?string

Optional; recommended for safe retries. When sent, the same key+body within 24h replays the original result and the same key with a different body is 409 CONFLICT; keys are unique per tenant. When an API token or service-account (bearer) caller omits it, the request is applied once with no replay protection (a retry may apply it again). A console session gets one from the edge.

Formatuuid

Request Body

application/json
  1. body

Selection for the object browser's bulk "Delete selected" action.

keys*array<string>

Object keys to delete (files, not folder prefixes).

Items1 <= items <= 1000

Response Body

The deleted keys and the bucket's recomputed counters.

application/json
  1. response

Outcome of a bulk object delete.

bucketId*string
deletedKeys*array<string>

The keys deleted, de-duplicated, in request order.

objectCount*integer

Objects left in the bucket's inventory after the delete.

sizeBytes*integer

Total size of the objects left in the inventory, in bytes.

curl -X POST "https://example.com/scopes/string/storage/buckets/string/objects/actions/delete" \  -H "Content-Type: application/json" \  -d '{    "keys": [      "string"    ]  }'
{  "bucketId": "string",  "deletedKeys": [    "string"  ],  "objectCount": 0,  "sizeBytes": 0}