Zum Inhalt springen
NimbusNexus

VM-Images

Ein VM-Image ist die OS-Vorlage, von der die Root-Disk einer neuen VM bootet. NimbusNexus liefert öffentliche Images, und Sie können eigene Custom-Images hochladen, die Sie mit Tools wie Packer bauen.

Öffentliche Images

GET /api/v1/image/ listet die Images auf, die Sie verwenden können; visibility=public grenzt die Liste auf die öffentlichen ein. Ein Image wird über seine id identifiziert, eine UUID, und genau die übergeben Sie als image, wenn Sie eine VM erstellen. Namen sind Bezeichnungen, keine versionierten Slugs; schlagen Sie deshalb die id nach, statt einen Namen fest im Code zu hinterlegen.

Beim Booten erhält eine VM den SSH-Key, den Sie in sshs angegeben haben (siehe SSH-Keys), und die user_data, die Sie übergeben haben; ein Image mit cloud-init wendet sie beim ersten Boot an.

Custom-Images

Ein Custom-Image braucht zwei Aufrufe:

  1. POST /api/v1/image/ legt den Image-Datensatz aus einem name (mindestens 5 Zeichen), einem disk_format und einem container_format an und gibt seine id zurück. Optional setzen Sie visibility (Standard private: nur Ihr Projekt) und subscription, den Abrechnungsplan (Standard Hourly).
  2. POST /api/v1/image/file lädt die Datei hoch, als Multipart mit file und image_id. Alternativ holt POST /api/v1/image/import mit {"id": "…", "url": "…"} das Image von einer URL.

Akzeptierte Dateiendungen sind .img, .qcow2, .vmdk, .vhd, .vhdx, .raw, .iso, .ami, .ari, .aki und .vdi; auf jede andere Endung antwortet die API mit 400.

Custom-Images werden pro GB abgerechnet, auf ganze GB aufgerundet, als eigenes Produkt nach dem Plan in subscription; siehe Preisdaten.

Regionen

Image-Aufrufe wirken in der Region Ihrer Sitzung. Einen Aufruf, der ein Image in eine andere Region kopiert, gibt es nicht.

Nächste Schritte

  • Virtuelle Maschinen — eine VM mit einem dieser Images bereitstellen.
  • VM-Größen — die Compute-Größe, in der das Image bootet.
  • Backups — Snapshots und Backups der Volumes einer 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 →