Saltar al contenido
NimbusNexus

Imágenes de VM

Una imagen de VM es la plantilla de SO con la que se arranca el disco raíz de una VM nueva. NimbusNexus ofrece imágenes públicas, y puedes subir tus propias imágenes personalizadas, creadas con herramientas como Packer.

Imágenes públicas

GET /api/v1/image/ lista las imágenes que puedes usar; visibility=public acota la lista a las públicas. Una imagen se identifica por su id, un UUID, y eso es lo que pasas como image al crear una VM. Los nombres son etiquetas, no slugs con versión, así que busca el id en lugar de fijar un nombre en el código.

Cuando una VM arranca, recibe la clave SSH que indicaste en sshs (consulta Claves SSH) y los user_data que hayas pasado; una imagen con cloud-init los aplica en el primer arranque.

Imágenes personalizadas

Una imagen personalizada requiere dos llamadas:

  1. POST /api/v1/image/ crea el registro de la imagen a partir de un name (de al menos 5 caracteres), un disk_format y un container_format, y devuelve su id. De forma opcional, fija visibility (por defecto, private: solo tu proyecto) y subscription, el plan de facturación (por defecto, Hourly).
  2. POST /api/v1/image/file sube el archivo, con los campos multipart file e image_id. O bien POST /api/v1/image/import con {"id": "…", "url": "…"} descarga la imagen desde una URL.

Las extensiones de archivo admitidas son .img, .qcow2, .vmdk, .vhd, .vhdx, .raw, .iso, .ami, .ari, .aki y .vdi; cualquier otra extensión responde 400.

Las imágenes personalizadas se facturan por GB, redondeando hacia arriba al GB entero, como un producto propio, con el plan de subscription; consulta Datos de precios.

Regiones

Las llamadas de imágenes funcionan en la región de tu sesión. No hay ninguna llamada para copiar una imagen a otra región.

Próximos pasos

  • Máquinas virtuales — provisiona una VM con una de estas imágenes.
  • Tamaños de VM — la configuración de cómputo en la que arranca la imagen.
  • Backups — snapshots y backups de los volúmenes de una VM.

Reference

GET/api/v1/image/

Images List

Lists images visible to the caller, applying the supplied filters and pagination.

Parameters

NameInTypeDescription
limitqueryinteger | null—
markerquerystring | null—
namequerystring | null—
ownerquerystring | null—
protectedqueryboolean | null—
statusquerystring | null—
tagquerystring | null—
visibilityquery"public" | "private" | "community" | "shared" | "all" | null—
os_hiddenqueryboolean | null—
member_statusquery"accepted" | "pending" | "rejected" | "all" | null—
size_maxquerystring | null—
size_minquerystring | null—
created_atquerystring | null—
updated_atquerystring | null—
sort_dirquerystring | null—
sort_keyquerystring | null—
sortquerystring | null—

Responses

  • 200Successful Response
  • 401Unauthorized
  • 403Forbidden
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

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

Image Create

Creates a new image record and resolves its billing product for the calling project.

Request body

FieldTypeDescription
name*string—
descriptionstring | null—
disk_format*string—
container_format*string—
visibilitystring—
product_categorystringProduct category for billing
subscriptionobjectSubscription plan type

Responses

  • 201Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 409Conflict
  • 422Validation error
  • 500Internal Server Error

Example

curl -X POST "https://api.nimbusnexus.net/api/v1/image/" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Example",
    "disk_format": "example",
    "container_format": "example"
  }'
DELETE/api/v1/image/

Images Delete

admin_domain, admin_project are only for admin

Request body

FieldTypeDescription
admin_domainstring | null—
admin_projectstring | null—
projectstring | null—
ids*array of string—

Responses

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

Example

curl -X DELETE "https://api.nimbusnexus.net/api/v1/image/" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "ids": [
      "example"
    ]
  }'
POST/api/v1/image/file

Image Upload

Uploads the binary contents of a previously created image from the supplied file.

Request body

JSON body required.

Responses

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

Example

curl -X POST "https://api.nimbusnexus.net/api/v1/image/file" \
  -H "Authorization: Bearer $NIMBUS_KEY"
POST/api/v1/image/import

Image Import

Imports an image into the catalog by fetching its contents from a remote URL.

Request body

FieldTypeDescription
id*string—
url*string—

Responses

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

Example

curl -X POST "https://api.nimbusnexus.net/api/v1/image/import" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "example",
    "url": "https://example.com/webhooks"
  }'
PATCH/api/v1/image/{image_id}

Image Update

Updates the editable fields of an image owned by the caller's project.

Parameters

NameInTypeDescription
image_id*pathstring—

Request body

FieldTypeDescription
namestring | null—
descriptionstring | null—
metadataobject | null—

Responses

  • 200Successful Response
  • 422Validation Error

Example

curl -X PATCH "https://api.nimbusnexus.net/api/v1/image/<image_id>" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

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