openapi: 3.1.0
info:
title: DTZ Containers
version: 2.1.3
description: a generated client for the DTZ Containers API
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0.html
contact:
name: Jens Walter
email: jens@apimeister.com
servers:
- url: https://containers.dtz.rocks/api/{version}
variables:
version:
default: "2021-02-21"
enum:
- "2021-02-21"
paths:
/enable:
post:
summary: enable the containers service
operationId: enable
responses:
"200":
description: service enabled
"401":
description: unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
"500":
description: error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/disable:
post:
summary: disable the containers service
operationId: disable
responses:
"200":
description: service disabled
/domain:
get:
summary: get all domains
operationId: getDomains
responses:
"200":
description: success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Domain'
post:
summary: create a new domain
operationId: createDomain
requestBody:
description: register a new domain within dtz
content:
application/json:
schema:
$ref: '#/components/schemas/CreateDomainRequest'
responses:
"200":
description: success
content:
application/json:
schema:
$ref: '#/components/schemas/Domain'
"409":
description: domain already registered
/domain/{domainName}:
get:
summary: get single domain
operationId: getDomain
parameters:
- in: path
name: domainName
schema:
type: string
required: true
description: name of the domain
responses:
"200":
description: success
content:
application/json:
schema:
$ref: '#/components/schemas/Domain'
"404":
description: not found
delete:
summary: delete single domain
operationId: deleteDomain
parameters:
- in: path
name: domainName
schema:
type: string
required: true
description: name of the domain
responses:
"200":
description: success
patch:
summary: trigger domain verification
operationId: verifyDomain
parameters:
- in: path
name: domainName
schema:
type: string
required: true
description: name of the domain
responses:
"200":
description: success
"401":
description: unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
"409":
description: conflict
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
"500":
description: error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/service:
get:
summary: get current container services
operationId: getServices
responses:
"200":
description: status
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Service'
post:
summary: create a new service hosting
operationId: createService
requestBody:
description: creation request
content:
application/json:
schema:
$ref: '#/components/schemas/CreateServiceRequest'
examples:
basic_service:
summary: Basic web service
description: Deploy a simple nginx service accessible at the root path
value:
prefix: "/"
containerImage: "nginx:latest"
authenticated_service:
summary: Service with DTZ authentication
description: Deploy a web application with DTZ authentication enabled
value:
prefix: "/app"
containerImage: "myregistry/webapp:v2.1.0"
login:
providerName: "dtz"
envVariables:
DATABASE_URL: "postgresql://localhost:5432/myapp"
API_KEY: "secret-api-key"
service_with_digest:
summary: Service with specific image digest
description: Deploy using a specific SHA256 digest instead of a tag
value:
prefix: "/secure-app"
containerImage: "myregistry/secure-app"
containerImageVersion: "@sha256:b5b2b2c507a0944348e0303114d8d93aaaa081732b86451d9bce1f432a537bc7"
login:
providerName: "dtz"
private_registry_service:
summary: Service from private registry
description: Deploy a service from a private container registry
value:
prefix: "/private-app"
containerImage: "private.registry.com/myapp:production"
containerPullUser: "username"
containerPullPwd: "password"
envVariables:
ENV: "production"
LOG_LEVEL: "info"
responses:
"200":
description: success
content:
application/json:
schema:
$ref: '#/components/schemas/Service'
/service/{serviceId}:
get:
summary: get service
operationId: getService
parameters:
- in: path
name: serviceId
schema:
type: string
format: ServiceId
required: true
description: service id
responses:
"200":
description: success
content:
application/json:
schema:
$ref: '#/components/schemas/Service'
"404":
description: not found
post:
summary: update service
operationId: updateService
parameters:
- in: path
name: serviceId
schema:
type: string
format: ServiceId
required: true
description: service id
requestBody:
description: update request
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateServiceRequest'
responses:
"200":
description: success
content:
application/json:
schema:
$ref: '#/components/schemas/Service'
"404":
description: not found
delete:
summary: delete service
operationId: deleteService
parameters:
- in: path
name: serviceId
schema:
type: string
format: ServiceId
required: true
description: service id
responses:
"200":
description: success
/job:
get:
summary: list all jobs
operationId: getJobs
responses:
"200":
description: success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/JobResponse'
post:
summary: create new job
operationId: createJob
requestBody:
description: update existing hosting
content:
application/json:
schema:
$ref: '#/components/schemas/CreateJobRequest'
responses:
"200":
description: success
content:
application/json:
schema:
$ref: '#/components/schemas/JobResponse'
"400":
description: request data was invalid
content:
application/json:
schema:
type: object
properties:
msg:
type: string
/job/{jobId}:
get:
summary: get single job
operationId: getJob
parameters:
- in: path
name: jobId
schema:
type: string
format: JobId
required: true
description: uuid of the job
responses:
"200":
description: success
content:
application/json:
schema:
$ref: '#/components/schemas/JobResponse'
"401":
description: unauthorized
post:
summary: update single job
operationId: updateJob
parameters:
- in: path
name: jobId
schema:
type: string
format: JobId
required: true
description: uuid of the job
responses:
"200":
description: success
content:
application/json:
schema:
$ref: '#/components/schemas/JobResponse'
patch:
summary: trigger single job
operationId: triggerJob
parameters:
- in: path
name: jobId
schema:
type: string
format: JobId
required: true
description: uuid of the job
responses:
"200":
description: success
"401":
description: unauthorized
"404":
description: job not found
delete:
summary: delete single job
operationId: deleteJob
parameters:
- in: path
name: jobId
schema:
type: string
format: JobId
required: true
description: uuid of the job
responses:
"200":
description: success
components:
schemas:
ErrorResponse:
type: object
properties:
msg:
type: string
CreateJobRequest:
type: object
properties:
name:
type: string
containerImage:
type: string
containerPullUser:
type: string
containerPullPwd:
type: string
scheduleType:
type: string
enum:
- relaxed
- precise
- none
scheduleCron:
type: string
scheduleRepeat:
type: string
description: "ecoMode repetition bounds in the format 'min(<freq>) max(<freq>)'. Allowed frequencies: hourly, daily, weekly, monthly. See docs/scheduling.md."
pattern: "^min\\((hourly|daily|weekly|monthly)\\)\\s+max\\((hourly|daily|weekly|monthly)\\)$"
envVariables:
type: object
additionalProperties:
oneOf:
- type: string
- $ref: '#/components/schemas/EncryptedValue'
- $ref: '#/components/schemas/PlainValue'
required:
- name
- containerImage
- scheduleType
JobResponse:
type: object
properties:
id:
type: string
format: JobId
name:
type: string
containerImage:
type: string
containerPullUser:
type: string
containerPullPwd:
type: string
scheduleType:
type: string
enum:
- relaxed
- precise
- none
scheduleRepeat:
type: string
description: "ecoMode repetition bounds in the format 'min(<freq>) max(<freq>)'. Allowed frequencies: hourly, daily, weekly, monthly. See docs/scheduling.md."
pattern: "^min\\((hourly|daily|weekly|monthly)\\)\\s+max\\((hourly|daily|weekly|monthly)\\)$"
scheduleCron:
type: string
envVariables:
type: object
additionalProperties:
oneOf:
- type: string
- $ref: '#/components/schemas/EncryptedValue'
required:
- id
- name
- containerImage
- scheduleType
Domain:
type: object
properties:
contextId:
type: string
format: ContextId
name:
type: string
verified:
type: boolean
created:
type: string
format: date-time
required:
- contextId
- name
- verified
- created
CreateDomainRequest:
type: object
properties:
name:
type: string
required:
- name
Service:
type: object
properties:
contextId:
type: string
format: ContextId
enabled:
type: boolean
description: whether this service is active and should be propagated to ingress
domain:
description: by default this property is empty, this property is only populated if it was part of the service creation.
type: array
items:
type: string
serviceId:
type: string
format: ServiceId
created:
type: string
format: date-time
updated:
type: string
format: date-time
prefix:
type: string
containerImage:
type: string
containerImageVersion:
type: string
containerPullUser:
type: string
containerPullPwd:
type: string
envVariables:
type: object
additionalProperties:
oneOf:
- type: string
- $ref: '#/components/schemas/EncryptedValue'
rewrite:
description: provids url rewriting capabilities
type: object
properties:
source:
type: string
description: regex to match the incoming uri
target:
description: replacement value
type: string
required:
- source
- target
login:
type: object
properties:
providerName:
type: string
required:
- providerName
required:
- contextId
- serviceId
- created
- enabled
- prefix
- containerImage
CreateServiceRequest:
type: object
properties:
enabled:
type: boolean
description: whether this service is active and should be propagated to ingress
domain:
description: by default this property is empty and represents that all verified domains will be added. I a domain is added through a service, this service will only be served through that domain, und new domain als also no longer added automatically.
type: array
items:
type: string
prefix:
type: string
containerImage:
type: string
containerImageVersion:
description: the version of the container image; either empty string to reset or a sha256 digest in the form of "sha256:digest"
type: string
pattern: "^(|sha256:[a-f0-9]{64})$"
containerPullUser:
type: string
containerPullPwd:
type: string
envVariables:
type: object
additionalProperties:
oneOf:
- type: string
- $ref: '#/components/schemas/EncryptedValue'
- $ref: '#/components/schemas/PlainValue'
rewrite:
description: provids url rewriting capabilities
type: object
properties:
source:
type: string
description: regex to match the incoming uri
target:
description: replacement value
type: string
required:
- source
- target
login:
type: object
properties:
providerName:
type: string
required:
- providerName
required:
- enabled
- prefix
- containerImage
UpdateServiceRequest:
type: object
description: Full update for a service; all fields are required and will overwrite existing values
properties:
enabled:
type: boolean
description: whether this service is active and should be propagated to ingress
domain:
description: by default this property is empty and represents that all verified domains will be added. I a domain is added through a service, this service will only be served through that domain, und new domain als also no longer added automatically.
type: array
items:
type: string
prefix:
type: string
containerImage:
type: string
containerImageVersion:
description: the version of the container image; either empty string to reset or a sha256 digest in the form of "sha256:digest"
type: string
pattern: "^(|sha256:[a-f0-9]{64})$"
containerPullUser:
type: string
containerPullPwd:
type: string
envVariables:
type: object
additionalProperties:
oneOf:
- type: string
- $ref: '#/components/schemas/EncryptedValue'
- $ref: '#/components/schemas/PlainValue'
rewrite:
description: provids url rewriting capabilities
type: object
properties:
source:
type: string
description: regex to match the incoming uri
target:
description: replacement value
type: string
required:
- source
- target
login:
type: object
description: a login can only be added, to remove the login functionality,
either set the providerName to an empty string or recreate the service without the login property
properties:
providerName:
type: string
required:
- providerName
required:
- enabled
- prefix
- containerImage
- envVariables
EncryptedValue:
type: object
properties:
encryptionKey:
type: string
description: "Encryption algorithm or key reference, e.g. 'AES256:KEY1'."
encryptedValue:
type: string
description: "The base-64 encoded ciphertext."
PlainValue:
type: object
properties:
plainValue:
type: string
description: "the plain text value for server side encryption"
securitySchemes:
dtz_oauth:
type: oauth2
flows:
authorizationCode:
authorizationUrl: https://identity.dtz.rocks/api/2021-02-21/oauth/authorize
tokenUrl: https://identity.dtz.rocks/api/2021-02-21/oauth/token
scopes:
openid: "default profile"
dtz_apikey:
type: apiKey
in: header
name: X-API-KEY
dtz-cookie:
type: apiKey
in: cookie
name: dtz_auth
security:
- dtz_apikey: []
- dtz_oauth: []
- dtz-cookie: []
Core Services
Container Registry
Containers
Identity
Objectstore
Observability
Logs
Sources
RSS to Email
Terraform
Data Sources
Resources