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

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

Params

Param name Description
compute_resource_id
optional

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, ‘‘, ‘-’ with no leading or trailing space..

search
optional

filter results

Validations:

  • String

order
optional

sort results

Validations:

  • String

page
optional

paginate results

Validations:

  • String

per_page
optional

number of entries per request

Validations:

  • String


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

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

Params

Param name Description
id
required

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, ‘‘, ‘-’ with no leading or trailing space..

compute_resource_id
optional

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, ‘‘, ‘-’ 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 on a compute resource

Params

Param name Description
container
required

Validations:

  • Hash

container[name]
optional , nil allowed

Validations:

  • String

container[location_ids]
optional , nil allowed

REPLACE locations with given ids

Validations:

  • Must be an array of any type

container[organization_ids]
optional , nil allowed

REPLACE organizations with given ids.

Validations:

  • Must be an array of any type

container[compute_resource_id]
required

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, ‘‘, ‘-’ with no leading or trailing space..

container[registry_id]
optional , nil allowed

Registry this container will have to use to get the image

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, ‘‘, ‘-’ with no leading or trailing space..

container[repository_name]
required

Name of the repository to use to create the container. e.g. centos

Validations:

  • String

container[tag]
required

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

Validations:

  • String

container[tty]
optional , nil allowed

Validations:

  • boolean

container[entrypoint]
optional , nil allowed

Validations:

  • String

container[command]
required

Validations:

  • String

container[memory]
optional , nil allowed

Validations:

  • String

container[cpu_shares]
optional , nil allowed

Validations:

  • number.

container[cpu_set]
optional , nil allowed

Validations:

  • String

container[environment_variables]
optional , nil allowed

Optional array of environment variables hashes. e.g. ‘environment_variables’: [{name => example, value => 123}]

Validations:

  • Must be an array of any type

container[attach_stdout]
optional , nil allowed

Validations:

  • boolean

container[attach_stdin]
optional , nil allowed

Validations:

  • boolean

container[attach_stderr]
optional , nil allowed

Validations:

  • boolean

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.

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, ‘‘, ‘-’ 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 on a compute resource

Params

Param name Description
id
required

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, ‘‘, ‘-’ with no leading or trailing space..

compute_resource_id
optional

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, ‘‘, ‘-’ 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 on a compute resource

Params

Param name Description
id
required

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, ‘‘, ‘-’ with no leading or trailing space..

compute_resource_id
optional

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, ‘‘, ‘-’ with no leading or trailing space..

stdout
optional

Validations:

  • boolean

stderr
optional

Validations:

  • boolean

tail
optional

Number of lines to tail. Default: 100

Validations:

  • Integer


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 on a compute resource

Params

Param name Description
id
required

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, ‘‘, ‘-’ with no leading or trailing space..

compute_resource_id
optional

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, ‘‘, ‘-’ with no leading or trailing space..

power_action
required

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

Validations:

  • String