customcontainer API

Read your container definitions, their pull references and build history, and detect the PHP extensions a composer.lock needs.

Quickstart

  1. Create an API key in your profile (a free account is enough).
  2. Put the base URL and your key into two shell variables — every example on this page uses them.
  3. List your containers:
export CC_BASE="https://customcontainer.io/api/v1"
export CC_TOKEN="<your-api-key>"

curl -H "Authorization: Bearer $CC_TOKEN" "$CC_BASE/containers"

Prefer a client? Import openapi.json into Postman, Insomnia or Bruno.

Authentication & limits

The API is JSON over HTTPS. Every request needs your API key, all answers are JSON and every response is limited to your own containers.

Authentication

Create an API key in your profile and send it as a bearer token:

Authorization: Bearer <your-api-key>

A missing, unknown or replaced key, as well as a locked account, is answered with 401. Generating a new key in the profile invalidates the old one immediately.

Rate limits

Each API key may send 120 requests per minute and 2000 per hour. Every response carries X-RateLimit-Limit and X-RateLimit-Remaining. Above the limit the API answers 429 with a Retry-After header (seconds).

Errors

Errors come with a matching HTTP status and a JSON body of the form {"error": "<message>"}. A container that does not exist and one that belongs to another account are both answered with 404.

Values

PHP version, distribution and CPU are returned in their machine form: PHP84, rocky9, x86_64 / aarch64. Build numbers count from 1 (the oldest build) upwards.

Versioning

This is version 1, reachable under /api/v1. Within v1, fields are only ever added, never renamed or removed — ignore fields you do not know. Breaking changes get a new version prefix.

Endpoints

Base URL: https://customcontainer.io/api/v1

GET /containers #

List your containers

All container definitions of your account. A container that inherits from another one (a child) names its master in parent.

Example request

curl -H "Authorization: Bearer $CC_TOKEN" "$CC_BASE/containers"

Example response · 200

[
    {
        "uuid": "3e82594b-f3e1-4040-9fbe-372f9a50973c",
        "name": "My App",
        "php": "PHP84",
        "distro": "rocky9",
        "cpu": "x86_64",
        "parent": null
    },
    {
        "uuid": "9a1c7d02-5b6e-4f3a-8c21-0d4e6f7a8b90",
        "name": "my-app-dev",
        "php": "PHP84",
        "distro": "rocky9",
        "cpu": "x86_64",
        "parent": "3e82594b-f3e1-4040-9fbe-372f9a50973c"
    }
]

Responses

StatusBodyMeaning
200 array of ContainerSummary Your containers. An empty list if you have none.
401 Error No API key, an unknown or replaced key, or a locked account.
429 Error Rate limit exceeded. Wait the number of seconds given in Retry-After.
GET /containers/{containerUuid} #

Get one container

The current definition of a container and the image reference to pull. reference always points at the newest build; it is null until the container has been built once.

For a child container, PHP version, distribution, CPU, flags and locales come from its master, and extensions contains the inherited ones plus its own.

Parameters

NameInTypeDescription
containerUuidrequired path string (uuid) The container's uuid, as returned by the list.

Example request

curl -H "Authorization: Bearer $CC_TOKEN" "$CC_BASE/containers/<containerUuid>"

# pull exactly the version the API reports
podman pull "$(curl -s -H "Authorization: Bearer $CC_TOKEN" "$CC_BASE/containers/<containerUuid>" | jq -r .reference)"

Example response · 200

{
    "uuid": "3e82594b-f3e1-4040-9fbe-372f9a50973c",
    "name": "My App",
    "php": "PHP84",
    "distro": "rocky9",
    "cpu": "x86_64",
    "parent": null,
    "cli": true,
    "fpm": true,
    "shell": false,
    "timezone": true,
    "extensions": [
        "gd",
        "intl",
        "pdo_mysql"
    ],
    "locales": [
        "de"
    ],
    "description": "Production image of the shop",
    "webEntryPath": "/app/public",
    "image": "a1b2c3d.registry.customcontainer.io/my-app",
    "version": "2.3.1",
    "reference": "a1b2c3d.registry.customcontainer.io/my-app:2.3.1"
}

Responses

StatusBodyMeaning
200 ContainerDetail The container.
401 Error No API key, an unknown or replaced key, or a locked account.
404 Error The container does not exist or belongs to another account.
429 Error Rate limit exceeded. Wait the number of seconds given in Retry-After.
GET /containers/{containerUuid}/history #

Get the build history

Every build of the container, newest first. Each build records its release tag, the installed packages and the layers it consists of. Builds made before mid-2026 did not record the selection, so cli, fpm, extensions and locales are null there.

Parameters

NameInTypeDescription
containerUuidrequired path string (uuid) The container's uuid, as returned by the list.

Example request

curl -H "Authorization: Bearer $CC_TOKEN" "$CC_BASE/containers/<containerUuid>/history"

Example response · 200

[
    {
        "number": 7,
        "tag": "2.3.1",
        "created": "2026-11-18 09:12:44",
        "architecture": "amd64",
        "layerCount": 14,
        "totalSize": 48210944,
        "packages": {
            "php84-php-common": "8.4.23-1.el9.remi",
            "php84-php-intl": "8.4.23-1.el9.remi"
        },
        "layers": [
            {
                "name": "php84-php-intl",
                "size": 412160,
                "digest": "sha256:5f2d…"
            }
        ],
        "cli": true,
        "fpm": true,
        "extensions": [
            "gd",
            "intl",
            "pdo_mysql"
        ],
        "locales": [
            "de"
        ]
    }
]

Responses

StatusBodyMeaning
200 array of Build The builds, newest first. An empty list if the container was never built.
401 Error No API key, an unknown or replaced key, or a locked account.
404 Error The container does not exist or belongs to another account.
429 Error Rate limit exceeded. Wait the number of seconds given in Retry-After.
GET /containers/{containerUuid}/diff #

Compare two builds

What changed between two builds of the same container: extensions, locales, packages (added, removed, new version), layers and size. Take the build numbers from the history.

Parameters

NameInTypeDescription
containerUuidrequired path string (uuid) The container's uuid, as returned by the list.
fromrequired query integer Build number to compare from (usually the older one).
torequired query integer Build number to compare to.

Example request

curl -H "Authorization: Bearer $CC_TOKEN" "$CC_BASE/containers/<containerUuid>/diff?from=6&to=7"

Example response · 200

{
    "from": 6,
    "to": 7,
    "extensions": {
        "added": [
            "intl"
        ],
        "removed": []
    },
    "locales": {
        "added": [],
        "removed": []
    },
    "packages": {
        "added": [
            {
                "name": "php84-php-intl",
                "version": "8.4.23-1.el9.remi"
            }
        ],
        "removed": [],
        "changed": [
            {
                "name": "php84-php-common",
                "from": "8.4.22-1.el9.remi",
                "to": "8.4.23-1.el9.remi"
            }
        ]
    },
    "layers": {
        "added": [
            {
                "name": "php84-php-intl",
                "size": 412160,
                "digest": "sha256:5f2d…"
            }
        ],
        "removed": []
    },
    "size": {
        "from": 47798784,
        "to": 48210944,
        "delta": 412160
    }
}

Responses

StatusBodyMeaning
200 BuildDiff The differences from from to to.
400 Error from or to is missing or not a number.
401 Error No API key, an unknown or replaced key, or a locked account.
404 Error The container is not yours or does not exist (container not found), or one of the build numbers is not in its history (build number not found).
429 Error Rate limit exceeded. Wait the number of seconds given in Retry-After.
POST /why #

Detect required PHP extensions

Reads a composer.lock and returns every PHP extension it asks for, together with the reason: the packages that require or suggest it, or platform / platform-dev for requirements of your own composer.json. Nothing is stored.

Request body · WhyRequest

{
    "lock": {
        "packages": [
            {
                "name": "symfony/intl",
                "require": {
                    "php": ">=8.2",
                    "ext-intl": "*"
                }
            }
        ],
        "packages-dev": [],
        "platform": {
            "ext-pdo": "*"
        }
    },
    "no-dev": true
}

Example request

jq '{lock: ., "no-dev": true}' composer.lock \
  | curl -H "Authorization: Bearer $CC_TOKEN" -H "Content-Type: application/json" \
         --data-binary @- "$CC_BASE/why"

Example response · 200

{
    "intl": [
        "symfony/intl"
    ],
    "pdo": [
        "platform"
    ]
}

Responses

StatusBodyMeaning
200 WhyResult The extensions and why each one is needed. An empty list if the lock file asks for none.
401 Error No API key, an unknown or replaced key, or a locked account.
406 Error The body has no lock.
429 Error Rate limit exceeded. Wait the number of seconds given in Retry-After.

Schemas

The objects the endpoints return. Fields marked required are always present (possibly null where the type allows it).

ContainerSummary #

A container as it appears in the list.

FieldTypeDescription
uuidrequired string (uuid) Identifies the container in every other endpoint.
namerequired string The name you gave the container. Its slug is the image name in the registry.
phprequired string PHP version, e.g. PHP84.
distrorequired string Base distribution, e.g. rocky9.
cpurequired string CPU architecture: x86_64 or aarch64.
parentrequired string (uuid) | null uuid of the master this container inherits from, null for a standalone container or a master.
ContainerDetail #

The full definition of a container, plus where to pull it.

FieldTypeDescription
uuidrequired string (uuid) Identifies the container in every other endpoint.
namerequired string The name you gave the container. Its slug is the image name in the registry.
phprequired string PHP version, e.g. PHP84.
distrorequired string Base distribution, e.g. rocky9.
cpurequired string CPU architecture: x86_64 or aarch64.
parentrequired string (uuid) | null uuid of the master this container inherits from, null for a standalone container or a master.
clirequired boolean The image contains the PHP CLI.
fpmrequired boolean The image contains PHP-FPM.
shellrequired boolean The image contains a minimal shell (busybox).
timezonerequired boolean The image contains timezone data.
extensionsrequired array of string Selected PHP extensions and components, without the ones cli, fpm, shell and timezone stand for.
localesrequired array of string Selected locales as short codes, e.g. de.
descriptionrequired string Your free-text description, may be empty.
webEntryPathrequired string Working directory of the image (OCI WorkingDir).
imagerequired string | null Image name in your registry, without a tag.
versionrequired string | null Release tag (semantic version) of the newest build, null if the container was never built.
referencerequired string | null image:version, ready for docker pull / podman pull. null if the container was never built.
Build #

One build of a container.

FieldTypeDescription
numberrequired integer Build number; the oldest build is 1.
tagrequired string Release tag (semantic version) of this build. Empty for very old builds that did not record it.
createdrequired string Build time, YYYY-MM-DD HH:MM:SS (UTC).
architecturerequired string OCI architecture of the image: amd64 or arm64.
layerCountrequired integer Number of layers in the image.
totalSizerequired integer Compressed size of all layers in bytes.
packagesrequired map of string Installed packages, name → version-release.
layersrequired array of Layer The layers this build consists of.
clirequired boolean | null PHP CLI was selected; null if not recorded.
fpmrequired boolean | null PHP-FPM was selected; null if not recorded.
extensionsrequired array of string | null Selected extensions and components; null if not recorded.
localesrequired array of string | null Selected locales; null if not recorded.
Layer #

One image layer.

FieldTypeDescription
namerequired string What the layer contains, usually a package name.
sizerequired integer Size in bytes.
digestrequired string Content digest, sha256:….
BuildDiff #

Differences between two builds.

FieldTypeDescription
fromrequired integer Build number compared from.
torequired integer Build number compared to.
extensionsrequired ListChange | null Extensions added and removed; null if one of the builds did not record its selection.
localesrequired ListChange | null Locales added and removed; null if one of the builds did not record its selection.
packagesrequired PackageChange
layersrequired object Layers added and removed, compared by digest.
sizerequired object Total size in bytes before and after, and the difference.
ListChange #

Values added and removed.

FieldTypeDescription
addedrequired array of string
removedrequired array of string
PackageChange #

Packages added, removed and updated between two builds.

FieldTypeDescription
addedrequired array of object New packages with their version.
removedrequired array of object Packages that are gone, with their last version.
changedrequired array of object Packages in both builds with a different version.
WhyRequest #

The lock file to analyse.

FieldTypeDescription
lockrequired object The complete content of your composer.lock, as JSON (not as a string).
no-dev boolean Ignore packages-dev and platform-dev, like composer install --no-dev.
WhyResult #

Map of PHP extension name → where the requirement comes from (package names, or platform / platform-dev). Extensions that packages merely suggest are included.

Type: map of array of string

Error #

Every error response.

FieldTypeDescription
errorrequired string What went wrong, in English.

OpenAPI document

Everything on this page comes from one OpenAPI 3.1.0 document. Import it into Postman, Insomnia or Bruno, generate a client from it, or hand it to your AI assistant.

curl -O https://customcontainer.io/openapi.json