Validate a compose file
const url = 'https://dashboard.quantcdn.io/api/v3/organizations/test-org/compose/validate?imageSuffix=pr-456';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"compose":"example","imageSuffix":"example","application":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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’).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The organisation ID
Example
test-orgQuery Parameters
Section titled “Query Parameters”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-456Request Bodyrequired
Section titled “Request Bodyrequired”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.
object
The docker-compose.yml file content as a string
Optional image tag suffix (query parameter takes precedence)
Optional application name for context
Examplegenerated
{ "compose": "example", "imageSuffix": "example", "application": "example"}Responses
Section titled “Responses”Validation successful. Body contains the translated compose definition and any warnings.
object
The translated internal compose definition format
object
Optional warnings encountered during translation
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
object
Example
{ "error": "Invalid YAML"}