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
location_id
Optional

Scope by locations

Validations:

  • Must be a Integer

organization_id
Optional

Scope by organizations

Validations:

  • Must be a Integer

compute_resource_id
Optional

Validations:

  • 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

Validations:

  • Must be a String

order
Optional

Sort field and order, eg. ‘id DESC’

Validations:

  • Must be a String

page
Optional

paginate results

Validations:

  • Must be a String

per_page
Optional

number of entries per request

Validations:

  • Must be a 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
location_id
Optional

Scope by locations

Validations:

  • Must be a Integer

organization_id
Optional

Scope by organizations

Validations:

  • Must be a Integer

id
Required

Validations:

  • 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

Validations:

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

Params

Param Name Description
location_id
Optional

Scope by locations

Validations:

  • Must be a Integer

organization_id
Optional

Scope by organizations

Validations:

  • Must be a Integer

container
Required

Validations:

  • Must be a Hash

container[name]
Optional , <span class="translation_missing" title="translation missing: gl.apipie.nil_allowed">Nil Allowed</span>

Validations:

  • Must be a String

container[location_ids]
Optional , <span class="translation_missing" title="translation missing: gl.apipie.nil_allowed">Nil Allowed</span>

REPLACE locations with given ids

Validations:

  • Must be an array of any type

container[organization_ids]
Optional , <span class="translation_missing" title="translation missing: gl.apipie.nil_allowed">Nil Allowed</span>

REPLACE organizations with given ids.

Validations:

  • Must be an array of any type

container[compute_resource_id]
Required

Validations:

  • 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 , <span class="translation_missing" title="translation missing: gl.apipie.nil_allowed">Nil Allowed</span>

Registry this container will have to use to get the image

Validations:

  • 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

Validations:

  • Must be a String

container[tag]
Required

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

Validations:

  • Must be a String

container[tty]
Optional , <span class="translation_missing" title="translation missing: gl.apipie.nil_allowed">Nil Allowed</span>

Validations:

  • Must be one of: true, false, 1, 0.

container[entrypoint]
Optional , <span class="translation_missing" title="translation missing: gl.apipie.nil_allowed">Nil Allowed</span>

Validations:

  • Must be a String

container[command]
Required

Validations:

  • Must be a String

container[memory]
Optional , <span class="translation_missing" title="translation missing: gl.apipie.nil_allowed">Nil Allowed</span>

Validations:

  • Must be a String

container[cpu_shares]
Optional , <span class="translation_missing" title="translation missing: gl.apipie.nil_allowed">Nil Allowed</span>

Validations:

  • Must be a number.

container[cpu_set]
Optional , <span class="translation_missing" title="translation missing: gl.apipie.nil_allowed">Nil Allowed</span>

Validations:

  • Must be a String

container[environment_variables]
Optional , <span class="translation_missing" title="translation missing: gl.apipie.nil_allowed">Nil Allowed</span>

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 , <span class="translation_missing" title="translation missing: gl.apipie.nil_allowed">Nil Allowed</span>

Validations:

  • Must be one of: true, false, 1, 0.

container[attach_stdin]
Optional , <span class="translation_missing" title="translation missing: gl.apipie.nil_allowed">Nil Allowed</span>

Validations:

  • Must be one of: true, false, 1, 0.

container[attach_stderr]
Optional , <span class="translation_missing" title="translation missing: gl.apipie.nil_allowed">Nil Allowed</span>

Validations:

  • Must be one of: true, false, 1, 0.

container[capsule_id]
Optional , <span class="translation_missing" title="translation missing: gl.apipie.nil_allowed">Nil Allowed</span>

The capsule this container will have to use to get the image. Relevant for images retrieved from katello registry.

Validations:

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

Params

Param Name Description
location_id
Optional

Scope by locations

Validations:

  • Must be a Integer

organization_id
Optional

Scope by organizations

Validations:

  • Must be a Integer

id
Required

Validations:

  • 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

Validations:

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

Params

Param Name Description
location_id
Optional

Scope by locations

Validations:

  • Must be a Integer

organization_id
Optional

Scope by organizations

Validations:

  • Must be a Integer

id
Required

Validations:

  • 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

Validations:

  • 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

Validations:

  • Must be one of: true, false, 1, 0.

stderr
Optional

Validations:

  • Must be one of: true, false, 1, 0.

tail
Optional

Number of lines to tail. Default: 100

Validations:

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

Params

Param Name Description
location_id
Optional

Scope by locations

Validations:

  • Must be a Integer

organization_id
Optional

Scope by organizations

Validations:

  • Must be a Integer

id
Required

Validations:

  • 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

Validations:

  • 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)

Validations:

  • Must be a String