Skip to content
Start here

Get a single application by id

GET/accounts/{account_id}/containers/applications/{application_id}

Returns a single application by id.

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
Accepted Permissions (at least one required)
Workers Containers WriteWorkers Containers Read
Path ParametersExpand Collapse
account_id: string
application_id: string

An Application ID represents an identifier of an application.

ReturnsExpand Collapse
errors: array of object { code, message, documentation_url, source }
code: number
minimum1000
message: string
documentation_url: optional string
source: optional object { pointer }
pointer: optional string
messages: array of object { code, message, documentation_url, source }
code: number
minimum1000
message: string
documentation_url: optional string
source: optional object { pointer }
pointer: optional string
result: object { id, account_id, configuration, 13 more } or object { id, account_id, created_at, 7 more }

The public Containers API returns an application.

One of the following:
CcScheduledApplication object { id, account_id, configuration, 13 more }

Describes an application and the parameters that govern how it places its instances.

id: string

An Application ID represents an identifier of an application.

account_id: string

A unique identifier for the user’s account.

configuration: object { image, authorized_keys, command, 4 more }

User-specified container configuration.

image: string

Image url.

authorized_keys: optional array of object { public_key, name }
public_key: string

An SSH public key.

name: optional string

Optional human readable name for this key.

command: optional array of string

The command that runs when the container starts, passed to the entrypoint. You can override this at run-time. If you override only the command, it gets passed to the default entrypoint specified in the image.

entrypoint: optional array of string

The entry point for the container, specifying the executable to run when the container starts. You can override this at run-time. If you do, the default command from the image is ignored. Specify both entrypoint and command at run-time to completely replace the image defaults.

environment_variables: optional array of object { name, value }

Container environment variables.

name: string

An environment variable name.

value: string

An environment variable value.

instance_type: optional "lite" or "basic" or "standard-1" or 3 more

The instance type configures vCPU, memory, and disk.

  • “lite”: 1/16 vCPU, 256 MiB memory, 2 GB disk
  • “basic”: 1/4 vCPU, 1 GiB memory, 4 GB disk
  • “standard-1”: 1/2 vCPU, 4 GiB memory, 8 GB disk
  • “standard-2”: 1 vCPU, 6 GiB memory, 12 GB disk
  • “standard-3”: 2 vCPU, 8 GiB memory, 16 GB disk
  • “standard-4”: 4 vCPU, 12 GiB memory, 20 GB disk
One of the following:
"lite"
"basic"
"standard-1"
"standard-2"
"standard-3"
"standard-4"
observability: optional object { logs }

Settings for deployment observability such as logging.

logs: optional object { enabled }

Observability logging settings.

enabled: optional boolean
created_at: string

UTC timestamp string in ISO 8601 format.

instances: number

Number of deployments to create.

name: string

The application name.

scheduling_policy: "default" or "durable_object"

The scheduling policy to use for an application.

One of the following:
"default"
"durable_object"
updated_at: string

UTC timestamp string in ISO 8601 format.

version: number
active_rollout_id: optional string

An identifier for a specific rollout within an application.

constraints: optional object { jurisdiction, regions }
jurisdiction: optional string

Restricts placement to datacenters in the selected jurisdiction. Choose “eu”, “fedramp”, or “us”. When combined with regions, EU supports EEUR and WEUR while FedRAMP and US support ENAM and WNAM.

regions: optional array of string
durable_objects: optional object { namespace_id }

Durable object configuration stored on and returned from a Cloudchamber application.

namespace_id: string

The namespace ID of the durable object namespace to use for this application.

health: optional object { errors, instances, summary }
errors: array of object { event, instance_id }
event: object { id, details, message, 4 more }

An event within a Placement or a Job.

id: string
details: map[unknown]
message: string
name: "SchedulerPlaced" or "NetworkingIPAssigned" or "VMStarted" or 14 more

Name of the event that describes the kind event that happened.

  • SchedulerPlaced: It’s the first event that creates a container placement. It happens when the Containers runtime was able to retrieve deployment resources and start verifying everything is correct.
  • NetworkingIPAssigned: It’s sent when the Containers runtime maps the IP to the container.
  • VMStarted: It’s sent when the Containers runtime starts the VM. The container might remain unhealthy at this point.
  • ImagePulled: It’s sent when the Containers runtime pulls the image successfully.
  • ImagePullError: It’s sent when the Containers runtime is having issues pulling the image. The message and details have more information on what happened for debugging.
  • VMFailedToStart: It’s sent when the Containers runtime was unable to boot the VM.
  • VMStopping: It’s sent when the scheduler is stopping the VM.
  • VMStopped: It’s sent when the VM finally exits.
  • VMFailed: It’s sent when the scheduling of the VM failed in the current location.
  • RuntimeStartFailed: It’s sent when the runtime hits an internal error.
  • SSHStarted: It’s sent when the container gains network connectivity and opens the SSH port. Containers only send this event when SSH keys exist.
  • CheckUpdate: Sent when the status of a health or readiness check changes. This may also affect the health status of the placement.
  • DurableObjectConnected: Sent when a durable object instance connects and gains control of the deployment. This event is only sent for durable object deployments. It is sent after VMStarted.
  • ContainerStarted: It’s sent when the container starts running.
One of the following:
"SchedulerPlaced"
"NetworkingIPAssigned"
"VMStarted"
"ImagePulled"
"ImagePullError"
"VMFailedToStart"
"NetworkingIPAssignmentFailed"
"VMRunning"
"VMStopping"
"VMStopped"
"VMFailed"
"RuntimeStartFailed"
"SSHStarted"
"ServiceHealthUpdates"
"CheckUpdate"
"DurableObjectConnected"
"ContainerStarted"
statusChange: map[unknown]
time: string

UTC timestamp string in ISO 8601 format.

type: "Info" or "Error" or "Warn" or 2 more
One of the following:
"Info"
"Error"
"Warn"
"UserError"
"SystemError"
instance_id: string

An instance ID represents an identifier of an instance configuration that maintains an underlying placement.

instances: object { active, assigned }

Shows a count of application instance states.

active: number

Number of instances whose runtime reports the container as running (container_status = “running”). This is a subset of the placements that remain up: an instance that is already bound to a Durable Object and serving traffic is counted under “assigned” until its container_status catches up to “running”, so container_status can briefly lag Durable Object attachment under churn. To estimate running, Durable-Object-bound instances, sum “active” + “assigned” rather than reading “active” alone.

assigned: number

Number of instances bound to a Durable Object with a running placement whose container_status remains behind “running”. These count as live, serving instances; “active” + “assigned” approximates the running, Durable-Object-bound count.

summary: optional "healthy" or "degraded" or "unhealthy" or "pending"

High-level health assessment. Only populated for “new_instances” strategy. Based on a sample of target-version instances rather than a full count.

  • “pending”: Zero target-version instances exist yet.
  • “healthy”: Every sampled target-version instance reports running or active.
  • “degraded”: Some sampled instances remain starting or scheduling.
  • “unhealthy”: One or more sampled instances have failed.
One of the following:
"healthy"
"degraded"
"unhealthy"
"pending"
max_instances: optional number

Maximum number of instances the application allows. This is relevant for applications that auto-scale.

observability: optional object { logs }

Top-level observability settings for the application. This field is mutually exclusive with configuration.observability.

logs: optional object { enabled }

Observability logging settings.

enabled: optional boolean
rollout_active_grace_period: optional number

Grace period for active instances to stay alive before becoming eligible for shutdown signal due to a rollout, in seconds. Defaults to 0.

maximum604800
minimum0
CcDurableObjectApplication object { id, account_id, created_at, 7 more }

Each Durable Object creates and manages the lifecycle of its container instance.

id: string

An Application ID represents an identifier of an application.

account_id: string

A unique identifier for the user’s account.

created_at: string

UTC timestamp string in ISO 8601 format.

durable_objects: object { namespace_id }

Durable object configuration using a namespace ID.

namespace_id: string

The namespace ID of the durable object namespace to use for this application.

name: string

The application name.

scheduling_policy: "durable_object"

Selects a Durable Object-managed application. Each Durable Object creates and manages the lifecycle of its container instance. Configure application-wide observability settings here. Deployment configuration, scaling, placement constraints, versions, and rollouts do not apply.

updated_at: string

UTC timestamp string in ISO 8601 format.

configuration: optional object { authorized_keys, wrangler_ssh }

Application-wide settings for a Durable Object-managed application.

authorized_keys: optional array of object { public_key, name }
public_key: string

An SSH public key.

name: optional string

Optional human readable name for this key.

wrangler_ssh: optional object { enabled, port }

Configuration properties for connecting with SSH to a container using Wrangler.

enabled: optional boolean
port: optional number
maximum65535
minimum1
health: optional object { instances, summary }

Aggregate current activity for the latest observed placement of each instance. Runtime snapshots feed periodic background sweeps. Counts refresh after each complete sweep. Instance listings retain their separate three-month history for failure discovery.

instances: object { active, starting }

Counts of observed non-terminal instances.

active: number

Number of instances whose runtime reports running or stopping.

minimum0
starting: number

Number of instances whose runtime reports starting.

minimum0
summary: optional "pending"

Present as pending until the first activity sweep completes; omitted afterward.

observability: optional object { logs }

Application-wide logging settings for a Durable Object-managed application. The application publishes these settings to its runtime metadata. Updating them does not create a deployment or rollout.

logs: optional object { enabled }

Application-wide logging settings.

enabled: optional boolean
success: boolean

Whether the API call was successful.

Get a single application by id

curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/containers/applications/$APPLICATION_ID \
    -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": {
    "id": "id",
    "account_id": "account_id",
    "configuration": {
      "image": "image",
      "authorized_keys": [
        {
          "public_key": "public_key",
          "name": "name"
        }
      ],
      "command": [
        "myapp",
        "--default-option"
      ],
      "entrypoint": [
        "/bin/bash"
      ],
      "environment_variables": [
        {
          "name": "name",
          "value": "value"
        }
      ],
      "instance_type": "lite",
      "observability": {
        "logs": {
          "enabled": true
        }
      }
    },
    "created_at": "2021-04-01T12:32:41.488Z",
    "instances": 0,
    "name": "name",
    "scheduling_policy": "default",
    "updated_at": "2021-04-01T12:32:41.488Z",
    "version": 0,
    "active_rollout_id": "active_rollout_id",
    "constraints": {
      "jurisdiction": "jurisdiction",
      "regions": [
        "WNAM"
      ]
    },
    "durable_objects": {
      "namespace_id": "14758f1afd44c09b7992073ccf00b43d"
    },
    "health": {
      "errors": [
        {
          "event": {
            "id": "id",
            "details": {
              "foo": "bar"
            },
            "message": "message",
            "name": "SchedulerPlaced",
            "statusChange": {
              "foo": "bar"
            },
            "time": "2021-04-01T12:32:41.488Z",
            "type": "Info"
          },
          "instance_id": "instance_id"
        }
      ],
      "instances": {
        "active": 0,
        "assigned": 0
      },
      "summary": "healthy"
    },
    "max_instances": 0,
    "observability": {
      "logs": {
        "enabled": true
      }
    },
    "rollout_active_grace_period": 0
  },
  "success": true
}
Returns Examples
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": {
    "id": "id",
    "account_id": "account_id",
    "configuration": {
      "image": "image",
      "authorized_keys": [
        {
          "public_key": "public_key",
          "name": "name"
        }
      ],
      "command": [
        "myapp",
        "--default-option"
      ],
      "entrypoint": [
        "/bin/bash"
      ],
      "environment_variables": [
        {
          "name": "name",
          "value": "value"
        }
      ],
      "instance_type": "lite",
      "observability": {
        "logs": {
          "enabled": true
        }
      }
    },
    "created_at": "2021-04-01T12:32:41.488Z",
    "instances": 0,
    "name": "name",
    "scheduling_policy": "default",
    "updated_at": "2021-04-01T12:32:41.488Z",
    "version": 0,
    "active_rollout_id": "active_rollout_id",
    "constraints": {
      "jurisdiction": "jurisdiction",
      "regions": [
        "WNAM"
      ]
    },
    "durable_objects": {
      "namespace_id": "14758f1afd44c09b7992073ccf00b43d"
    },
    "health": {
      "errors": [
        {
          "event": {
            "id": "id",
            "details": {
              "foo": "bar"
            },
            "message": "message",
            "name": "SchedulerPlaced",
            "statusChange": {
              "foo": "bar"
            },
            "time": "2021-04-01T12:32:41.488Z",
            "type": "Info"
          },
          "instance_id": "instance_id"
        }
      ],
      "instances": {
        "active": 0,
        "assigned": 0
      },
      "summary": "healthy"
    },
    "max_instances": 0,
    "observability": {
      "logs": {
        "enabled": true
      }
    },
    "rollout_active_grace_period": 0
  },
  "success": true
}