Skip to content

Validate a compose file

POST
/api/v3/organizations/{organisation}/compose/validate
curl --request POST \
--url 'https://dashboard.quantcdn.io/api/v3/organizations/test-org/compose/validate?imageSuffix=pr-456' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "compose": "example", "imageSuffix": "example", "application": "example" }'

Accepts a docker-compose.yml file content, translates it into the internal compose definition format, and validates it. Quant Cloud provides comprehensive support for standard Docker Compose features including commands, entrypoints, health checks, dependencies, volume mounts, resource limits, and more. For detailed documentation on supported features and examples, see: https://docs.quantcdn.io/introduction-to-quant-cloud/importing-docker-compose/. Supports image tag suffixing via the imageSuffix query parameter or by sending a JSON wrapper with yamlContent and imageSuffix fields. When provided, internal image tags are transformed to {containerName}-{suffix} format (e.g., ‘nginx-feature-xyz’).

organisation
required
string

The organisation ID

Example
test-org
imageSuffix
string
/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/

Optional. Image tag suffix to apply during translation. Transforms internal image tags to consistent ‘{containerName}-{suffix}’ format (e.g., ‘nginx-pr-456’). External images are left unchanged. Useful for feature branch deployments.

Example
pr-456

The docker-compose.yml file content. Can be sent as raw YAML string or as a JSON wrapper containing both yamlContent (string) and imageSuffix (string) fields. Query parameter imageSuffix takes precedence if both are provided.

Media typeapplication/json
One of:
object
compose
required

The docker-compose.yml file content as a string

string
imageSuffix

Optional image tag suffix (query parameter takes precedence)

string
/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/
application

Optional application name for context

string
Examplegenerated
{
"compose": "example",
"imageSuffix": "example",
"application": "example"
}

Validation successful. Body contains the translated compose definition and any warnings.

Media typeapplication/json
object
message
required
string
translatedComposeDefinition
required

The translated internal compose definition format

object
translationWarnings

Optional warnings encountered during translation

Array<string>
nullable
Example
{
"message": "Docker-compose YAML translated and validated successfully.",
"translationWarnings": [
"Service 'db' uses 'build' directive, image will be internal with a generated tag.",
"Volume 'cache' uses a relative path source, interpreted as logical volume name."
]
}

Invalid YAML input or validation failed

Media typeapplication/json
object
error
string
Example
{
"error": "Invalid YAML"
}