openapi: 3.1.0
info:
title: DTZ Core Api
version: 2.2.3
description: a generated client for the DTZ Core 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://dtz.rocks/api/2021-12-09
paths:
/context:
get:
summary: get current context
description: get current context
operationId: getCurrentContext
responses:
"200":
description: status
content:
application/json:
schema:
$ref: '#/components/schemas/ContextResponse'
"404":
description: context not found
post:
summary: create new context
description: create new context
operationId: createContext
x-openai-isConsequential: true
requestBody:
description: create a new context
content:
application/json:
schema:
type: object
properties:
alias:
type: string
responses:
"200":
description: status
content:
application/json:
schema:
$ref: '#/components/schemas/ContextResponse'
/context/{context_id}:
get:
summary: get context information
operationId: getContext
parameters:
- in: path
name: context_id
schema:
type: string
format: ContextId
required: true
description: context id
responses:
"200":
description: context information
content:
application/json:
schema:
$ref: '#/components/schemas/ContextResponse'
"404":
description: context not found
post:
summary: update context
description: update context
operationId: updateContext
parameters:
- in: path
name: context_id
schema:
type: string
format: ContextId
required: true
description: context id
requestBody:
description: update context
content:
application/json:
schema:
type: object
properties:
alias:
type: string
responses:
"200":
description: status
content:
application/json:
schema:
$ref: '#/components/schemas/ContextResponse'
delete:
summary: delete context
operationId: deleteContext
x-openai-isConsequential: true
parameters:
- in: path
name: context_id
schema:
type: string
format: ContextId
required: true
description: context id
responses:
"200":
description: returns the deleted context
content:
application/json:
schema:
$ref: '#/components/schemas/ContextResponse'
"500":
description: internal server error
/chat:
get:
summary: list all chat threads for the current context
operationId: listChat
responses:
"200":
description: thread listing
content:
application/json:
schema:
type: array
items:
type: object
properties:
name:
type: string
id:
type: string
format: ChatId
lastUpdate:
type: string
format: date-time
post:
summary: create a new chat by posting a message
operationId: createChat
requestBody:
description: chat request request
content:
application/json:
schema:
type: object
properties:
content:
type: string
responses:
"200":
description: single response for the request
content:
application/json:
schema:
$ref: '#/components/schemas/ChatResponseMessage'
/chat/{chat_id}:
get:
summary: get the full chat timeline
operationId: getChat
parameters:
- in: path
name: chat_id
schema:
type: string
format: ChatId
required: true
description: chat id
examples:
chatId1:
description: sample chat id
value: chat-r3e2m4sa
responses:
"200":
description: returns the full chat
content:
application/json:
schema:
$ref: '#/components/schemas/Chat'
post:
summary: add a new message to the chat
operationId: updateChat
parameters:
- in: path
name: chat_id
schema:
type: string
format: ChatId
required: true
description: chat id
requestBody:
description: chat post
content:
application/json:
schema:
type: object
properties:
content:
type: string
responses:
"200":
description: single response for the request
content:
application/json:
schema:
$ref: '#/components/schemas/ChatResponseMessage'
/certificate:
post:
summary: issue a certificate
description: |
issue a certificate -
if no certificate exists a new one is issued, if a certificate exists
a new one will only be issued 3 days before its expiration
operationId: issueCertificate
requestBody:
description: issue a new certificate
content:
application/json:
schema:
type: object
properties:
domain:
type: string
responses:
"200":
description: issue certificate response
"429":
description: too many certificates already issued
/task:
post:
summary: pull one task from the async task queue
operationId: pullTaskFromQueue
x-dtz-all-responses: true
requestBody:
description: pulls the next task
content:
application/json:
schema:
type: object
properties:
nodeId:
type: string
description: declares the node id
instanceId:
type: string
description: declares the instance id
cpuCapacity:
description: declares the cpu capacity of the node
type: integer
format: int64
memCapacity:
description: declares the memory capacity of the node
type: integer
format: int64
ecoMode:
description: declares if the node is running in eco mode
type: boolean
required:
- nodeId
- instanceId
- cpuCapacity
- memCapacity
- ecoMode
responses:
"200":
description: success
content:
application/json:
schema:
$ref: '#/components/schemas/PullTaskResponse'
"204":
description: nothing found
/task/{task_id}:
post:
summary: create task for async execution
operationId: createTask
parameters:
- in: path
name: task_id
schema:
type: string
format: TaskId
required: true
description: task id
requestBody:
description: create a new task
content:
application/json:
schema:
$ref: '#/components/schemas/CreateTaskRequest'
responses:
"200":
description: success
content:
application/json:
schema:
$ref: '#/components/schemas/CreateTaskResponse'
"302":
description: job already exists
content:
application/json:
schema:
$ref: '#/components/schemas/CreateTaskResponse'
get:
summary: get execution history
operationId: getTaskHistory
parameters:
- in: path
name: task_id
schema:
type: string
format: TaskId
required: true
description: task id
responses:
"200":
description: success
/ingress:
get:
summary: list all ingress
operationId: listIngress
parameters:
- name: X-DTZ-REALM
in: header
description: see docs https://downtozero.cloud/docs e.g. dtz-objectstore, dtz-containerregistry, dtz-containers
required: false
schema:
type: string
style: simple
responses:
"200":
description: success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/IngressResponse'
/ingress/{domain}/:
get:
summary: get ingress for '/' path
operationId: getRootIngress
parameters:
- in: path
name: domain
schema:
type: string
required: true
description: domain name
- name: X-DTZ-REALM
in: header
description: see docs https://downtozero.cloud/docs e.g. dtz-objectstore, dtz-containerregistry, dtz-containers
required: false
schema:
type: string
style: simple
responses:
"200":
description: success
content:
application/json:
schema:
$ref: '#/components/schemas/IngressResponse'
"404":
description: ingress not found
post:
summary: create or update ingress
operationId: createRootIngress
parameters:
- in: path
name: domain
schema:
type: string
required: true
description: domain name
- name: X-DTZ-REALM
in: header
description: see docs https://downtozero.cloud/docs e.g. dtz-objectstore, dtz-containerregistry, dtz-containers
required: false
schema:
type: string
style: simple
requestBody:
description: create or update ingress
content:
application/json:
schema:
$ref: '#/components/schemas/CreateIngressRequest'
responses:
"200":
description: success
content:
application/json:
schema:
$ref: '#/components/schemas/IngressResponse'
delete:
summary: delete ingress
operationId: deleteRootIngress
x-openai-isConsequential: true
parameters:
- in: path
name: domain
schema:
type: string
required: true
description: domain name
- name: X-DTZ-REALM
in: header
description: see docs https://downtozero.cloud/docs e.g. dtz-objectstore, dtz-containerregistry, dtz-containers
required: false
schema:
type: string
style: simple
responses:
"200":
description: status
/ingress/{domain}/{uri}:
get:
summary: get ingress for '/' path
operationId: getIngress
parameters:
- in: path
name: domain
schema:
type: string
required: true
description: domain name
- in: path
name: uri
schema:
type: string
required: true
description: uri
- name: X-DTZ-REALM
in: header
description: see docs https://downtozero.cloud/docs e.g. dtz-objectstore, dtz-containerregistry, dtz-containers
required: false
schema:
type: string
style: simple
responses:
"200":
description: success
content:
application/json:
schema:
$ref: '#/components/schemas/IngressResponse'
"404":
description: ingress not found
post:
summary: create static content for ingress
operationId: createIngress
parameters:
- in: path
name: domain
schema:
type: string
required: true
description: domain name
- in: path
name: uri
schema:
type: string
required: true
description: uri
- name: X-DTZ-REALM
in: header
description: see docs https://downtozero.cloud/docs e.g. dtz-objectstore, dtz-containerregistry, dtz-containers
required: false
schema:
type: string
style: simple
requestBody:
description: serve static content for ingress
content:
application/json:
schema:
$ref: '#/components/schemas/CreateIngressRequest'
responses:
"200":
description: success
content:
application/json:
schema:
$ref: '#/components/schemas/IngressResponse'
delete:
summary: delete ingress
operationId: deleteIngress
x-openai-isConsequential: true
parameters:
- in: path
name: domain
schema:
type: string
required: true
description: domain name
- in: path
name: uri
schema:
type: string
required: true
description: uri
- name: X-DTZ-REALM
in: header
description: see docs https://downtozero.cloud/docs e.g. dtz-objectstore, dtz-containerregistry, dtz-containers
required: false
schema:
type: string
style: simple
responses:
"200":
description: status
/identity/availableContexts:
get:
summary: list all avaiable contexts
operationId: listAvailableContexts
responses:
"200":
description: context listing
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ContextResponse'
components:
schemas:
PullTaskResponse:
type: object
properties:
contextId:
type: string
format: ContextId
executionId:
type: string
format: ExecutionId
taskId:
type: string
format: TaskId
taskName:
type: string
containerImage:
type: string
containerPullUser:
type: string
containerPullPwd:
type: string
envVariables:
$ref: '#/components/schemas/EnvironmentVariables'
required:
- contextId
- executionId
- taskId
- taskName
- containerImage
ContextResponse:
type: object
properties:
contextId:
type: string
format: ContextId
owner:
type: string
format: IdentityId
created:
type: string
format: date-time
alias:
type: string
required:
- contextId
- owner
- created
CreateIngressRequest:
type: object
properties:
validity:
$ref: '#/components/schemas/Validity'
login:
$ref: '#/components/schemas/Login'
rewrite:
$ref: '#/components/schemas/Rewrite'
container:
$ref: '#/components/schemas/Container'
staticContent:
$ref: '#/components/schemas/StaticContent'
singletonProcessor:
type: boolean
Login:
type: object
properties:
providerName:
type: string
required:
- providerName
Validity:
type: object
properties:
validFrom:
description: if not present, ingress is immediately available
type: string
format: date-time
validTo:
description: if not present, ingress is available forwever
type: string
format: date-time
Rewrite:
type: object
properties:
source:
description: URI source as Regex (re2 syntax)
type: string
target:
description: replacement string
type: string
required:
- source
- target
IngressResponse:
type: object
properties:
domain:
type: string
pathPrefix:
type: string
realm:
description: owning realm, changes can only be performed within the realm
type: string
validity:
$ref: '#/components/schemas/Validity'
login:
$ref: '#/components/schemas/Login'
rewrite:
$ref: '#/components/schemas/Rewrite'
container:
$ref: '#/components/schemas/Container'
staticContent:
$ref: '#/components/schemas/StaticContent'
singletonProcessor:
type: boolean
required:
- domain
- pathPrefix
StaticContent:
type: object
properties:
http:
type: object
properties:
header:
type: array
items:
type: object
properties:
name:
type: string
value:
type: string
content:
description: base64 encoded content
type: string
format: byte
required:
- content
https:
type: object
properties:
header:
type: array
items:
type: object
properties:
name:
type: string
value:
type: string
content:
description: base64 encoded content
type: string
format: byte
required:
- content
Container:
type: object
properties:
containerImage:
type: string
containerIdentity:
type: string
containerPullUser:
type: string
containerPullPwd:
type: string
envVariables:
$ref: '#/components/schemas/EnvironmentVariables'
required:
- containerImage
Chat:
type: object
properties:
chatId:
type: string
format: ChatId
created:
type: string
format: date-time
owner:
type: string
format: IdentityId
privileges:
type: object
properties:
allContextMembers:
type: boolean
nullBotRead:
type: boolean
nullBotWrite:
type: boolean
supportEmployee:
type: boolean
timeline:
type: array
items:
type: object
properties:
created:
type: string
format: date-time
content:
type: string
identityId:
type: string
format: IdentityId
ChatResponseMessage:
type: object
properties:
chatId:
type: string
format: ChatId
created:
description: when the message was created
type: string
format: date-time
content:
type: string
identityId:
type: string
format: IdentityId
description: who the answer is from
EnvironmentVariables:
type: object
additionalProperties:
oneOf:
- type: string
- $ref: '#/components/schemas/EncryptedValue'
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."
CreateTaskRequest:
type: object
properties:
taskName:
type: string
service:
description: origin service, like dtz-flows, dtz-containers
type: string
earliestStart:
type: string
format: date-time
latestStart:
type: string
format: date-time
requireEcoMode:
type: boolean
taskDefinition:
type: object
properties:
containerImage:
type: string
containerPullUser:
type: string
containerPullPwd:
type: string
envVariables:
$ref: '#/components/schemas/EnvironmentVariables'
required:
- containerImage
required:
- taskName
- service
- earliestStart
- latestStart
- requireEcoMode
- taskDefinition
CreateTaskResponse:
type: object
properties:
taskId:
type: string
format: TaskId
service:
type: string
executionId:
type: string
format: ExecutionId
required:
- taskId
- service
- executionId
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: general scope
dtz_apikey:
type: apiKey
in: header
name: X-API-KEY
dtz-cookie:
type: apiKey
in: cookie
name: dtz_auth
security:
- dtz_oauth: []
- dtz_apikey: []
- dtz-cookie: []
Core Services
Container Registry
Containers
Identity
Objectstore
Observability
Logs
Sources
RSS to Email
Terraform
Data Sources
Resources