Перейти до вмісту
NimbusNexus

Обʼєктне сховище

Обʼєктне сховище NimbusNexus зберігає файли як обʼєкти в контейнерах, що належать вашому проєкту. Контейнерами й обʼєктами ви керуєте через /api/v1/object_storage/ з тими самими обліковими даними, що й у решті API.

Контейнери

POST /api/v1/object_storage/ створює контейнер. Задайте public_read: true, щоб будь-хто міг читати окремі обʼєкти, URL яких знає, і додайте public_listing: true, щоб будь-хто міг ще й переглядати список вмісту контейнера; на public_listing без public_read API відповідає 400. На назву, яка вже існує, API відповідає 409.

GET /api/v1/object_storage/ перелічує ваші контейнери з їхніми bytes і count. PATCH /api/v1/object_storage/{container_name} оновлює метадані контейнера, а DELETE /api/v1/object_storage/{container_name} видаляє порожній контейнер; якщо в контейнері ще є обʼєкти, API відповідає 409.

Назви контейнерів

Назва контейнера — це 3–63 символи: малі літери, цифри й дефіси, причому починатися й закінчуватися вона має літерою або цифрою. Підкреслення, крапки й пробіли не дозволені, як і назва у форматі IP-адреси.

Обʼєкти

  • POST /api/v1/object_storage/{container_name}/objects завантажує новий обʼєкт як multipart-поле file; обʼєкт отримує назву з object_name, а без нього — назву файлу. На назву, яка вже існує, API відповідає 409.
  • PUT /api/v1/object_storage/{container_name}/objects/{object_name}/content замінює вміст обʼєкта.
  • GET /api/v1/object_storage/{container_name}/objects/{object_name}/content повертає його вміст: текст — у UTF-8, двійковий вміст — у кодуванні base64.
  • GET і PATCH /api/v1/object_storage/{container_name}/objects/{object_name} читають і оновлюють його метадані, а DELETE за тим самим шляхом його видаляє.
  • POST /api/v1/object_storage/{container_name}/objects/{object_name}/copy і /move копіюють або переміщують його під нову назву чи в інший контейнер.

Назва обʼєкта може містити /, що читається як шлях до папки.

Списки й пагінація

GET /api/v1/object_storage/{container_name}/objects перелічує обʼєкти контейнера. Гортайте сторінки за допомогою limit і marker (остання назва, яку ви бачили) або задайте full_listing=true, щоб отримати всі обʼєкти в одній відповіді. prefix залишає лише назви, що з нього починаються.

Передайте delimiter=/, щоб отримати список у стилі папок: обʼєкти цього рівня повертаються в objects, а префікси на рівень нижче — у subdirs.

Короткочасні облікові дані

POST /api/v1/object_storage/credentials випускає короткочасні облікові дані, привʼязані до проєкту, до якого привʼязана ваша сесія, і повертає їхні trust_id та expires_at. Бажаний строк дії можна вказати в ttl_seconds; сервер обмежує його зверху. Окремий редактор надсилає trust_id у заголовку X-Trust-Id у наступних викликах обʼєктного сховища й так дістається до сховища проєкту, не маючи ні вашого повного токена, ні будь-якого довготривалого секрету; кожен виклик при цьому, як завжди, проходить автентифікацію. DELETE /api/v1/object_storage/credentials/{trust_id} відкликає їх.

Що далі

  • Автентифікація — API-ключі передаються в заголовку X-API-Key.
  • Блокове сховище — коли вам потрібна файлова система, а не сховище «ключ — значення», або потрібна семантика POSIX.
  • Редактор Mosaic — браузерний редактор файлів YAML/JSON/Markdown у ваших контейнерах.

Reference

GET/api/v1/object_storage/

List Containers

Lists the containers owned by the calling project together with their size and object counts.

Parameters

NameInTypeDescription
limitqueryinteger | nullMaximum number of containers to return
markerquerystring | nullMarker for pagination
end_markerquerystring | nullEnd marker for pagination
prefixquerystring | nullFilter containers by prefix

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/object_storage/" \
  -H "Authorization: Bearer $NIMBUS_KEY"
POST/api/v1/object_storage/

Create Container

Creates a new object storage container, optionally marking it publicly readable.

Request body

FieldTypeDescription
name*stringContainer name. Lowercase letters, numbers, and hyphens only.
public_readbooleanAllow anyone to read individual objects whose URL they know. Maps to Swift's `X-Container-Read: .r:*`.
public_listingbooleanAllow anyone to list the contents of the container (enumerate object names). Adds `.rlistings` to `X-Container-Read`. Requires `public_read=True` — the API rejects `public_listing` without `public_read` to match the UX convention that listing is a permission you grant on top of read.

Responses

  • 201Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X POST "https://api.nimbusnexus.net/api/v1/object_storage/" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Example"
  }'
POST/api/v1/object_storage/credentials

Mint Storage Credential

Mints a short-lived, project-scoped object-storage credential (a Keystone trust) for the caller's current project and returns its trust_id. A standalone editor presents that id via the X-Trust-Id header on subsequent object-storage calls, reaching this project's storage without holding the user's full token or any durable secret.

Request body

JSON body required.

Responses

  • 201Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X POST "https://api.nimbusnexus.net/api/v1/object_storage/credentials" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
DELETE/api/v1/object_storage/credentials/{trust_id}

Revoke Storage Credential

Revokes a previously minted object-storage credential (trust).

Parameters

NameInTypeDescription
trust_id*pathstring—

Responses

  • 204Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X DELETE "https://api.nimbusnexus.net/api/v1/object_storage/credentials/<trust_id>" \
  -H "Authorization: Bearer $NIMBUS_KEY"
GET/api/v1/object_storage/{container_name}

Get Container Metadata

Returns the metadata headers describing the given container.

Parameters

NameInTypeDescription
container_name*pathstring—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/object_storage/<container_name>" \
  -H "Authorization: Bearer $NIMBUS_KEY"
PATCH/api/v1/object_storage/{container_name}

Update Container Metadata

Updates the metadata headers attached to the given container.

Parameters

NameInTypeDescription
container_name*pathstring—

Request body

FieldTypeDescription
admin_domainstring | null—
admin_projectstring | null—
headers*objectMetadata keys (auto-prefixed with X-Container-Meta- if needed).

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X PATCH "https://api.nimbusnexus.net/api/v1/object_storage/<container_name>" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "headers": {
      "environment": "production",
      "owner": "team-a"
    }
  }'
DELETE/api/v1/object_storage/{container_name}

Delete Container

Deletes the named container, rejecting the request if it still holds objects.

Parameters

NameInTypeDescription
container_name*pathstring—

Responses

  • 204Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X DELETE "https://api.nimbusnexus.net/api/v1/object_storage/<container_name>" \
  -H "Authorization: Bearer $NIMBUS_KEY"
GET/api/v1/object_storage/{container_name}/objects

List Objects

Lists the objects stored within the given container.

Parameters

NameInTypeDescription
container_name*pathstring—
limitqueryinteger | nullMaximum number of objects to return
markerquerystring | nullMarker for pagination
end_markerquerystring | nullEnd marker for pagination
prefixquerystring | nullFilter objects by prefix
delimiterquerystring | nullDelimiter for hierarchical listing
version_markerquerystring | nullVersion marker for versioned objects
pathquerystring | nullPath within container
full_listingquerybooleanReturn all objects, paginating automatically
query_stringquerystring | nullAdditional query parameters

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/object_storage/<container_name>/objects" \
  -H "Authorization: Bearer $NIMBUS_KEY"
POST/api/v1/object_storage/{container_name}/objects

Upload Object

Uploads a new object into the given container from a multipart file upload.

Parameters

NameInTypeDescription
container_name*pathstring—

Request body

JSON body required.

Responses

  • 201Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X POST "https://api.nimbusnexus.net/api/v1/object_storage/<container_name>/objects" \
  -H "Authorization: Bearer $NIMBUS_KEY"
GET/api/v1/object_storage/{container_name}/objects/{object_name}

Get Object Metadata

Returns the metadata headers describing the named object.

Parameters

NameInTypeDescription
container_name*pathstring—
object_name*pathstring—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/object_storage/<container_name>/objects/<object_name>" \
  -H "Authorization: Bearer $NIMBUS_KEY"
PATCH/api/v1/object_storage/{container_name}/objects/{object_name}

Update Object Metadata

Updates the metadata headers attached to the named object.

Parameters

NameInTypeDescription
container_name*pathstring—
object_name*pathstring—

Request body

FieldTypeDescription
admin_domainstring | null—
admin_projectstring | null—
headers*objectMetadata keys (auto-prefixed with X-Object-Meta- if needed).

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X PATCH "https://api.nimbusnexus.net/api/v1/object_storage/<container_name>/objects/<object_name>" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "headers": {
      "author": "user",
      "version": "1.0"
    }
  }'
DELETE/api/v1/object_storage/{container_name}/objects/{object_name}

Delete Object

Deletes the named object from its container.

Parameters

NameInTypeDescription
container_name*pathstring—
object_name*pathstring—

Responses

  • 204Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X DELETE "https://api.nimbusnexus.net/api/v1/object_storage/<container_name>/objects/<object_name>" \
  -H "Authorization: Bearer $NIMBUS_KEY"
GET/api/v1/object_storage/{container_name}/objects/{object_name}/content

Get Object Content

Downloads the body of an object, decoding it as UTF-8 text or base64 when binary.

Parameters

NameInTypeDescription
container_name*pathstring—
object_name*pathstring—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/object_storage/<container_name>/objects/<object_name>/content" \
  -H "Authorization: Bearer $NIMBUS_KEY"
PUT/api/v1/object_storage/{container_name}/objects/{object_name}/content

Put Object Content

Replaces the body of an existing object at the given path with the uploaded content.

Parameters

NameInTypeDescription
container_name*pathstring—
object_name*pathstring—

Request body

JSON body required.

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X PUT "https://api.nimbusnexus.net/api/v1/object_storage/<container_name>/objects/<object_name>/content" \
  -H "Authorization: Bearer $NIMBUS_KEY"
POST/api/v1/object_storage/{container_name}/objects/{object_name}/copy

Copy Object

Copies an object to a new name or path and returns where the copy landed. destination is relative to the source container; prefix it with '/' to name another container, which alone keeps the source object's name.

Parameters

NameInTypeDescription
container_name*pathstring—
object_name*pathstring—

Request body

FieldTypeDescription
admin_domainstring | null—
admin_projectstring | null—
destination*stringTarget object name/path in the source container; '/container/object_name' targets another container, and '/container' alone keeps the source name.
overwritebooleanWhether to overwrite the destination if it already exists.
fresh_metadatabooleanStart with fresh metadata
headersobject | null—

Responses

  • 201Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X POST "https://api.nimbusnexus.net/api/v1/object_storage/<container_name>/objects/<object_name>/copy" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "destination": "copy.jpg"
  }'
POST/api/v1/object_storage/{container_name}/objects/{object_name}/move

Move Object

Moves an object to a new container or name by copying it and deleting the source, and returns where it ended up.

Parameters

NameInTypeDescription
container_name*pathstring—
object_name*pathstring—

Request body

FieldTypeDescription
admin_domainstring | null—
admin_projectstring | null—
destination_containerstring | nullTarget container, without slashes. If omitted, uses the source container.
destination_object_name*stringTarget object name/path. Outer slashes are stripped; inner ones are folders.
overwritebooleanWhether to overwrite the destination if it already exists.

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X POST "https://api.nimbusnexus.net/api/v1/object_storage/<container_name>/objects/<object_name>/move" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "destination_object_name": "picture1"
  }'

Need to make a real call? Try these endpoints in the live Swagger UI →