GET /docker/api/v2/containers
List all containers

GET /docker/api/v2/compute_resources/:compute_resource_id/containers
List all containers in a compute resource

Params

Param name Description
compute_resource_id
optional

Value:

Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

search
optional

filter results


Value:

Must be String

order
optional

sort results


Value:

Must be String

page
optional

paginate results


Value:

Must be String

per_page
optional

number of entries per request


Value:

Must be String


GET /docker/api/v2/containers/:id
Show a container

GET /docker/api/v2/compute_resources/:compute_resource_id/containers/:id
Show container in a compute resource

Params

Param name Description
id
required

Value:

Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

compute_resource_id
optional

Value:

Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.


POST /docker/api/v2/containers
Create a container

POST /docker/api/v2/compute_resources/:compute_resource_id/containers
Create container in a compute resource

Params

Param name Description
container
required

Value:

Must be a Hash

container[name]
optional , nil allowed

Value:

Must be String

container[location_ids]
optional , nil allowed

REPLACE locations with given ids


Value:

Must be an array of any type

container[organization_ids]
optional , nil allowed

REPLACE organizations with given ids.


Value:

Must be an array of any type

container[compute_resource_id]
required

Value:

Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

container[registry_id]
optional , nil allowed

Registry this container will have to

use to get the image

Value:

Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

container[repository_name]
required

Name of the repository to use

to create the container. e.g: centos

Value:

Must be String

container[tag]
required

Tag to use to create the container. e.g: latest


Value:

Must be String

container[tty]
optional , nil allowed

Value:

Must be 'true' or 'false'

container[entrypoint]
optional , nil allowed

Value:

Must be String

container[command]
required

Value:

Must be String

container[memory]
optional , nil allowed

Value:

Must be String

container[cpu_shares]
optional , nil allowed

Value:

Must be a number.

container[cpu_set]
optional , nil allowed

Value:

Must be String

container[environment_variables]
optional , nil allowed

Value:

Must be Hash

container[attach_stdout]
optional , nil allowed

Value:

Must be 'true' or 'false'

container[attach_stdin]
optional , nil allowed

Value:

Must be 'true' or 'false'

container[attach_stderr]
optional , nil allowed

Value:

Must be 'true' or 'false'

container[capsule_id]
optional , nil allowed

The capsule this container will have to use

to get the image. Relevant for images
retrieved from katello registry.

Value:

Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.


DELETE /docker/api/v2/containers/:id
Delete a container

DELETE /docker/api/v2/compute_resources/:compute_resource_id/containers/:id
Delete container in a compute resource

Params

Param name Description
id
required

Value:

Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

compute_resource_id
optional

Value:

Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.


GET /docker/api/v2/containers/:id/logs
Show container logs

GET /docker/api/v2/compute_resources/:compute_resource_id/containers/:id/logs
Show logs from a container in a compute resource

Params

Param name Description
id
required

Value:

Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

compute_resource_id
optional

Value:

Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

stdout
optional

Value:

Must be 'true' or 'false'

stderr
optional

Value:

Must be 'true' or 'false'

tail
optional

Number of lines to tail. Default: 100


Value:

Must be Fixnum


PUT /docker/api/v2/containers/:id/power
Run power operation on a container

PUT /docker/api/v2/compute_resources/:compute_resource_id/containers/:id/power
Run power operation on a container in a compute resource

Params

Param name Description
id
required

Value:

Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

compute_resource_id
optional

Value:

Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

power_action
required

power action, valid actions are (start), (stop), (status)


Value:

Must be String