Saltar al contenido
NimbusNexus

Almacenamiento de objetos

El almacenamiento de objetos de NimbusNexus guarda archivos como objetos en contenedores que pertenecen a tu proyecto. Gestionas ambos a través de /api/v1/object_storage/, con las mismas credenciales que el resto de la API.

Contenedores

POST /api/v1/object_storage/ crea un contenedor. Pon public_read: true para que cualquiera pueda leer los objetos individuales cuya URL conozca, y añade public_listing: true para que cualquiera pueda listar también el contenido del contenedor; public_listing sin public_read responde 400. Un nombre que ya existe responde 409.

GET /api/v1/object_storage/ lista tus contenedores con sus bytes y su count. PATCH /api/v1/object_storage/{container_name} actualiza los metadatos de un contenedor, y DELETE /api/v1/object_storage/{container_name} borra uno vacío; un contenedor que todavía tiene objetos responde 409.

Nombres de los contenedores

El nombre de un contenedor tiene 3–63 caracteres entre letras minúsculas, dígitos y guiones, y empieza y termina con una letra o un dígito. No se permiten guiones bajos, puntos ni espacios, ni tampoco un nombre con formato de dirección IP.

Objetos

  • POST /api/v1/object_storage/{container_name}/objects sube un objeto nuevo como file en multipart, con el nombre object_name o, si no lo indicas, con el nombre del archivo. Un nombre que ya existe responde 409.
  • PUT /api/v1/object_storage/{container_name}/objects/{object_name}/content sustituye el contenido de un objeto.
  • GET /api/v1/object_storage/{container_name}/objects/{object_name}/content lo descarga: el texto como UTF-8 y el contenido binario codificado en base64.
  • GET y PATCH /api/v1/object_storage/{container_name}/objects/{object_name} leen y actualizan sus metadatos, y DELETE en la misma ruta lo borra.
  • POST /api/v1/object_storage/{container_name}/objects/{object_name}/copy y /move lo copian o lo mueven a un nombre nuevo o a otro contenedor.

El nombre de un objeto puede contener /, que se interpreta como una ruta de carpetas.

Listado y paginación

GET /api/v1/object_storage/{container_name}/objects lista los objetos de un contenedor. Pagina con limit y marker (el último nombre que has visto), o pon full_listing=true para obtenerlos todos en una sola respuesta. prefix deja solo los nombres que empiezan por él.

Pasa delimiter=/ para obtener un listado tipo carpeta: los objetos de este nivel vuelven en objects, y los prefijos del nivel inferior, en subdirs.

Credenciales de corta duración

POST /api/v1/object_storage/credentials genera una credencial de corta duración con el alcance del proyecto de tu sesión, y devuelve su trust_id y su expires_at. Puedes pedir una duración con ttl_seconds; el servidor le pone un tope. Un editor independiente envía el trust_id en una cabecera X-Trust-Id en las llamadas posteriores al almacenamiento de objetos, y así llega al almacenamiento del proyecto sin tener tu token completo ni ningún secreto duradero; cada llamada se sigue autenticando como siempre. DELETE /api/v1/object_storage/credentials/{trust_id} la revoca.

Próximos pasos

  • Autenticación — las claves de API van en la cabecera X-API-Key.
  • Almacenamiento en bloques — cuando quieres un sistema de archivos en lugar de un almacén clave-valor, o necesitas semántica POSIX.
  • Editor Mosaic — editor en el navegador para archivos YAML/JSON/Markdown dentro de tus contenedores.

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 →