v1

latestOpenAPI 3.0.0(C) Copyright IBM Corp. 2016 All Rights Reserved.2026-07-144737155.4 KB
Single containers

List single containers in a space.

This endpoint returns a list of all single containers in a space that are currently in a running state (corresponding IBM Containers command: cf ic ps). To list all single containers independent of their current state, set the all query parameter to true.

get/containers/json

Query parameters

allstring

By default, the GET /containers/json endpoint returns a list of all single containers in a space that are in a running state. To request a list of all containers independent of their current state, set the all query parameter to true. Allowed values are: all=true, all=True, and all=1.

filtersstring

You can filter your containers by any environment variable key or value that is listed in the Env section of your CLI/ API response when you run the cf ic inspect <container> command, or call the GET /containers/{id}/json endpoint. Your search criteria does not need to be an exact match. It can also be a part of the key or value you are looking for. For example, to filter all containers with an environment variable that contains id in one of their environment variables, use filter=id.

Headers

X-Auth-Tokenstring required

The Bluemix JSON web token that you receive when logging into Bluemix. Run cf oauth-token to retrieve your access token.

X-Auth-Project-Idstring required

The unique ID of your organization space where you want to create or work with your containers. Run cf space <space_name> --guid, where <space_name> is the name of your space, to retrieve your space ID.

Response

OK. A list of single containers that match the search criteria is returned.

Commandstring

The command and arguments that were passed to the container during container creation. This command is executed when the container is started.

ContainerStatestring

The current status of the container. The status can either be a transient state, such as BUILDING, and NETWORKING or a non-transient state, such as RUNNING, SHUTDOWN, CRASHED, PAUSED, or SUSPENDED.

Creatednumber float

The time when the container was created.

Envstring[]

A list of all the environment variables of the container.

Idstring

Unique identifier representing a container.

Imagestring

Full path to the container image in your private Bluemix registry.

ImageIdstring

Unique identifier representing a container image.

Labelsobject

List of custom metadata that was added to the container. Labels serve a wide range of uses, such as adding notes to a container. Every label is a key/ value pair.

Memoryinteger

The amount of container memory in Megabyte that was assigned to your container. The memory is counted towards the quota that is allocated for the space.

Namestring

The name of the container.

Namesstring[]

The name of the container.

SizeRootFsinteger

Total size of all the files in the container, in bytes.

SizeRwinteger

The size of the files which have been created or changed, if you compare the container to its base image. Just after creation, this should be zero. Ass you modify (or create) files, this size will increase.

Startednumber float

Time when the container was started.

Statusstring

The current status of the container. The status can either be a transient state, such as BUILDING, and NETWORKING or a non-transient state, such as RUNNING, SHUTDOWN, CRASHED, PAUSED, or SUSPENDED

VCPUinteger

Number of virtual CPUs that are assigned to the container.