Aller au contenu
NimbusNexus

Stockage objet

Le stockage objet NimbusNexus conserve les fichiers sous forme d’objets dans des conteneurs qui appartiennent à votre projet. Vous gérez les uns et les autres via /api/v1/object_storage/, avec les mêmes identifiants que pour le reste de l’API.

Conteneurs

POST /api/v1/object_storage/ crée un conteneur. Définissez public_read: true pour permettre à quiconque de lire individuellement les objets dont il connaît l’URL, et ajoutez public_listing: true pour permettre aussi à quiconque de lister le contenu du conteneur ; avec public_listing sans public_read, l’API répond 400. Pour un nom qui existe déjà, elle répond 409.

GET /api/v1/object_storage/ liste vos conteneurs avec leurs bytes et count. PATCH /api/v1/object_storage/{container_name} met à jour les métadonnées d’un conteneur, et DELETE /api/v1/object_storage/{container_name} supprime un conteneur vide ; pour un conteneur qui contient encore des objets, l’API répond 409.

Nommage des conteneurs

Un nom de conteneur compte 3–63 caractères parmi les lettres minuscules, les chiffres et les tirets, et commence et se termine par une lettre ou un chiffre. Les tirets bas, les points et les espaces ne sont pas autorisés, pas plus qu’un nom au format d’une adresse IP.

Objets

  • POST /api/v1/object_storage/{container_name}/objects téléverse un nouvel objet en multipart dans file, sous le nom object_name ou, à défaut, sous le nom du fichier. Pour un nom qui existe déjà, l’API répond 409.
  • PUT /api/v1/object_storage/{container_name}/objects/{object_name}/content remplace le contenu d’un objet.
  • GET /api/v1/object_storage/{container_name}/objects/{object_name}/content le télécharge : le texte en UTF-8, le contenu binaire encodé en base64.
  • GET et PATCH /api/v1/object_storage/{container_name}/objects/{object_name} lisent et mettent à jour ses métadonnées, et DELETE sur le même chemin le supprime.
  • POST /api/v1/object_storage/{container_name}/objects/{object_name}/copy et /move le copient ou le déplacent sous un nouveau nom ou dans un autre conteneur.

Un nom d’objet peut contenir /, qui se lit comme un chemin de dossier.

Listage et pagination

GET /api/v1/object_storage/{container_name}/objects liste les objets d’un conteneur. Paginez avec limit et marker (le dernier nom que vous avez vu), ou définissez full_listing=true pour tous les obtenir en une seule réponse. prefix ne garde que les noms qui commencent par cette valeur.

Passez delimiter=/ pour un listage de type dossier : les objets de ce niveau sont renvoyés dans objects, et les préfixes du niveau inférieur dans subdirs.

Identifiants de courte durée

POST /api/v1/object_storage/credentials émet un identifiant de courte durée, propre au projet, pour le projet sur lequel porte votre session, et renvoie son trust_id et son expires_at. Vous pouvez demander une durée de vie avec ttl_seconds ; le serveur la plafonne. Un éditeur autonome envoie le trust_id dans un header X-Trust-Id lors des appels suivants au stockage objet : il accède ainsi au stockage du projet sans détenir votre token complet ni aucun secret durable ; chaque appel s’authentifie tout de même comme d’habitude. DELETE /api/v1/object_storage/credentials/{trust_id} le révoque.

Étapes suivantes

  • Authentification — les clés API se placent dans le header X-API-Key.
  • Stockage en bloc — quand vous voulez un système de fichiers plutôt qu’un stockage clé-valeur, ou que vous avez besoin de la sémantique POSIX.
  • Éditeur Mosaic — éditeur dans le navigateur pour les fichiers YAML/JSON/Markdown de vos conteneurs.

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 →