Images

Endpoints related to managing container images.

List Images

Requires the images-view capability.

SecuritybearerAuth and hubAuth
Request
query Parameters
meta
Array of strings

A comma separated list of meta values. Meta values will show up under a resource's meta field. In the case of applying a meta to a collection of resources, each resource will have it's own relevant meta data. In some rare cases, meta may not apply to individual resources, and may appear in the root document. These will be clearly labeled.

Items Value: "containers_count"
include
Array of strings

A comma separated list of include values. Included resources will show up under the root document's include field, with the key being the id of the included resource. In the case of applying an include to a collection of resources, if two resources share the same include, it will only appear once in the return.

Items Enum: "creators" "stack_builds" "stacks" "sources" "integrations"
object

Filter Field

The filter field is a key-value object, where the key is what you would like to filter, and the value is the value you're filtering for.

sort
Array of strings

An array of sort values. To sort descending, put a - in front of the value, e.g. -id.

object

In a list return, the data associated with the page number and size returned. 20 results per page, page 2 would be page[size]=20&page[number]=2

Responses
200

Returns a list of Images.

default

General error response from the platform

get/v1/images
Response samples
application/json
{
  • "data": [
    ],
  • "includes": {
    }
}

Create Image

Requires the images-manage capability.

SecuritybearerAuth and hubAuth
Request
Request Body schema: application/json

Parameters for creating a new Image.

name
string

A name for the Image.

source_id
required
string

The ID for the Image source to be used.

object

A build object, holding information important to the Image build.

object

An override object to be used for a single Image create request.

Responses
201

Returns an Image.

default

General error response from the platform

post/v1/images
Request samples
application/json
{
  • "name": "string",
  • "source_id": "string",
  • "build": {
    },
  • "override": {
    }
}
Response samples
application/json
{
  • "data": {
    }
}

Get Image

Requires the images-view capability.

SecuritybearerAuth and hubAuth
Request
path Parameters
imageId
required
string

The ID of the image.

query Parameters
meta
Array of strings

A comma separated list of meta values. Meta values will show up under a resource's meta field. In the case of applying a meta to a collection of resources, each resource will have it's own relevant meta data. In some rare cases, meta may not apply to individual resources, and may appear in the root document. These will be clearly labeled.

Items Value: "containers_count"
include
Array of strings

A comma separated list of include values. Included resources will show up under the root document's include field, with the key being the id of the included resource. In the case of applying an include to a collection of resources, if two resources share the same include, it will only appear once in the return.

Items Enum: "creators" "stack_builds" "stacks" "sources" "integrations"
sort
Array of strings

An array of sort values. To sort descending, put a - in front of the value, e.g. -id.

object

In a list return, the data associated with the page number and size returned. 20 results per page, page 2 would be page[size]=20&page[number]=2

Responses
200

Returns a Image.

default

General error response from the platform

get/v1/images/{imageId}
Response samples
application/json
{
  • "data": {
    },
  • "includes": {
    }
}

Update Image

Requires the images-manage capability.

SecuritybearerAuth and hubAuth
Request
path Parameters
imageId
required
string

The ID of the image.

Request Body schema: application/json

Parameters for creating a new image.

name
string

A name for the image.

Responses
200

Returns an Image.

default

General error response from the platform

patch/v1/images/{imageId}
Request samples
application/json
{
  • "name": "string"
}
Response samples
application/json
{
  • "data": {
    }
}

Delete Image

Requires the images-manage capability.

SecuritybearerAuth and hubAuth
Request
path Parameters
imageId
required
string

The ID of the image.

Responses
200

Returns a Job Descriptor.

default

General error response from the platform

delete/v1/images/{imageId}
Response samples
application/json
{
  • "data": {
    }
}

Get Image Build Log

Requires the images-view capability.

SecuritybearerAuth and hubAuth
Request
path Parameters
imageId
required
string

The ID of the Image.

Responses
200

Returns an Image's build log.

default

General error response from the platform

get/v1/images/{imageId}/build-log
Response samples
application/json
{
  • "data": {
    }
}

Prune Images

Used to perform different actions on a given image.

Requires the images-manage capability.

SecuritybearerAuth and hubAuth
Request
Request Body schema: application/json

Parameters for creating a new Images Job.

action
required
string

The action is the Job type to create.

Value: "prune"
required
object

Additional contents needed by the platform to create the Job.

Responses
202

Returns a Job Descriptor.

default

General error response from the platform

post/v1/images/tasks
Request samples
application/json
{
  • "action": "prune",
  • "contents": {
    }
}
Response samples
application/json
{
  • "data": {
    }
}

Create Image Job

Used to perform different actions on a given Image.

Requires the images-import capability.

SecuritybearerAuth and hubAuth
Request
path Parameters
imageId
required
string

The ID of the requested Image.

Request Body schema: application/json

Parameters for creating a new Image job.

action
required
string
Value: "import"
Responses
200

Returns a Job Descriptor.

default

General error response from the platform

post/v1/images/{imageId}/tasks
Request samples
application/json
{
  • "action": "import"
}
Response samples
application/json
{
  • "data": {
    }
}