Skip to main content

Create Image

https://infrahub-api.nexgencloud.com/v1/core/snapshots/{id}/image

Creates a image from a specified snapshot. For more information about images, click here. For more information about snapshots, click here.


Body parameters


name string   Required

Name of the image.
A string with a maximum length of 50 characters.


labels array of strings  optional

An optional array of labels can be applied to the image for organizational and identification purposes.


Attributes


status boolean

Indicates the result of the request to create the image. true signifies success, while false indicates an error.


message string

A description of the status of the request.


image object

An object containing details about the created image.

Example request
curl -X POST "https://infrahub-api.nexgencloud.com/v1/core/snapshots/{id}/image" \
-H "accept: application/json"\
-H "api_key: YOUR API KEY"\
-H "content-type: application/json" \
-d '{
"name": "my-image",
}'
Response
{
"status": true,
"message": "Image added successfully.",
"image": {
"id": 0,
"name": "my-image",
"region_id": 0,
"region_name": "string",
"type": "Snapshot",
"version": "string",
"size": 0,
"is_public": false,
"description": "string",
"labels": [],
"created_at": "1970-01-01T00:00:00.000Z",
"organizations": [1]
}
}

Back to top