Knox (1.0.0)

Download OpenAPI specification:Download

This is the Knox API specification. Knox is a service that manages Terraform environments and snapshots.

There is an available Helm chart for Knox.

helm repo add knox https://zeiss.github.io/knox/helm/charts
helm repo update
helm search repo knox

Liveness

Get system health status

Responses

Response samples

Content type
application/json
{
  • "status": "string",
  • "errorMessage": "string"
}

Readiness

Get system readiness

Responses

Response samples

Content type
application/json
{
  • "status": "string",
  • "errorMessage": "string"
}

Environments

Lock the state of Terraform environment

Authorizations:
basicAuth
path Parameters
teamName
required
string
projectName
required
string
environmentName
required
string
Request Body schema: application/json
id
string <uuid>
operation
string
info
string
who
string
version
string
created
string <date-time>
path
string

Responses

Request samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "operation": "string",
  • "info": "string",
  • "who": "string",
  • "version": "string",
  • "created": "2019-08-24T14:15:22Z",
  • "path": "string"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "operation": "string",
  • "info": "string",
  • "who": "string",
  • "version": "string",
  • "created": "2019-08-24T14:15:22Z",
  • "path": "string"
}

Unlock the state of Terraform environment

Authorizations:
basicAuth
path Parameters
teamName
required
string
projectName
required
string
environmentName
required
string
Request Body schema: application/json
id
string <uuid>
operation
string
info
string
who
string
version
string
created
string <date-time>
path
string

Responses

Request samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "operation": "string",
  • "info": "string",
  • "who": "string",
  • "version": "string",
  • "created": "2019-08-24T14:15:22Z",
  • "path": "string"
}

Response samples

Content type
application/json
{
  • "errorMessage": "string"
}

Get the state of Terraform environment

Authorizations:
basicAuth
path Parameters
teamName
required
string
projectName
required
string
environmentName
required
string

Responses

Response samples

Content type
application/json
{ }

Update the state of Terraform environment

Authorizations:
basicAuth
path Parameters
teamName
required
string
projectName
required
string
environmentName
required
string
Request Body schema: application/json
object <binary> (Payload)

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{ }

Create a new environment

Authorizations:
openId
path Parameters
teamName
required
string
projectName
required
string
Request Body schema: application/json
name
string
username
string
secret
string

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "username": "string",
  • "secret": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "username": "string",
  • "isLocked": true,
  • "stateVersion": 0,
  • "project": {
    },
  • "secret": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Get a list of environments

Authorizations:
openId
path Parameters
teamName
required
string
projectName
required
string
query Parameters
limit
integer
offset
integer

Responses

Response samples

Content type
application/json
{
  • "environments": [
    ],
  • "metadata": {
    }
}

Get an environment

Authorizations:
openId
path Parameters
teamName
required
string
projectName
required
string
environmentName
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "username": "string",
  • "isLocked": true,
  • "stateVersion": 0,
  • "project": {
    },
  • "secret": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Update an environment

Authorizations:
openId
path Parameters
teamName
required
string
projectName
required
string
environmentName
required
string
Request Body schema: application/json
name
string
username
string
secret
string

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "username": "string",
  • "secret": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "username": "string",
  • "isLocked": true,
  • "stateVersion": 0,
  • "project": {
    },
  • "secret": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Delete an environment

Authorizations:
openId
path Parameters
teamName
required
string
projectName
required
string
environmentName
required
string

Responses

Response samples

Content type
application/json
{
  • "errorMessage": "string"
}

Teams

Create a new team

Authorizations:
openId
Request Body schema: application/json
name
string
description
string
members
Array of strings

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "members": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "usersCount": 0,
  • "projectsCount": 0,
  • "description": "string",
  • "members": [
    ],
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Get a list of teams

Authorizations:
openId
query Parameters
limit
integer
offset
integer

Responses

Response samples

Content type
application/json
{
  • "teams": [
    ],
  • "metadata": {
    }
}

Get a team

Authorizations:
openId
path Parameters
teamName
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "usersCount": 0,
  • "projectsCount": 0,
  • "description": "string",
  • "members": [
    ],
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Update a team

Authorizations:
openId
path Parameters
teamName
required
string
Request Body schema: application/json
name
string
description
string
members
Array of strings

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "members": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "usersCount": 0,
  • "projectsCount": 0,
  • "description": "string",
  • "members": [
    ],
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Delete a team

Authorizations:
openId
path Parameters
teamName
required
string

Responses

Response samples

Content type
application/json
{
  • "errorMessage": "string"
}

Projects

Create a new project

Authorizations:
openId
path Parameters
teamName
required
string
Request Body schema: application/json
name
string
description
string

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "team": {
    },
  • "envCount": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Get a list of projects

Authorizations:
openId
path Parameters
teamName
required
string
query Parameters
limit
integer
Default: 10
offset
integer
Default: 0

Responses

Response samples

Content type
application/json
{
  • "projects": [
    ],
  • "metadata": {
    }
}

Get a project

Authorizations:
openId
path Parameters
teamName
required
string
projectName
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "team": {
    },
  • "envCount": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Update a project

Authorizations:
openId
path Parameters
teamName
required
string
projectName
required
string
Request Body schema: application/json
name
string
description
string
team_id
integer

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "team_id": 0
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "team": {
    },
  • "envCount": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Delete a project

Authorizations:
openId
path Parameters
teamName
required
string
projectName
required
string

Responses

Response samples

Content type
application/json
{
  • "errorMessage": "string"
}

States

Get the state of Terraform environment

Authorizations:
openId
path Parameters
teamName
required
string
projectName
required
string
environmentName
required
string
query Parameters
limit
integer
offset
integer

Responses

Response samples

Content type
application/json
{
  • "states": [
    ]
}

Snapshots

Get a list of snapshots

path Parameters
teamName
required
string
projectName
required
string
environmentName
required
string
query Parameters
limit
integer
offset
integer

Responses

Response samples

Content type
application/json
{
  • "snapshots": [
    ],
  • "metadata": {
    }
}

Create a new snapshot

Authorizations:
openId
path Parameters
teamName
required
string
projectName
required
string
environmentName
required
string
Request Body schema: application/json
title
string
description
string
state_id
string <uuid>

Responses

Request samples

Content type
application/json
{
  • "title": "string",
  • "description": "string",
  • "state_id": "66648741-ea8b-4d02-902d-821b4000589e"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "title": "string",
  • "description": "string",
  • "version": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "deletedAt": "2019-08-24T14:15:22Z"
}

Get a snapshot

Authorizations:
openId
path Parameters
teamName
required
string
projectName
required
string
environmentName
required
string
snapshotId
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "title": "string",
  • "description": "string",
  • "version": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "deletedAt": "2019-08-24T14:15:22Z"
}

Delete a snapshot

Authorizations:
openId
path Parameters
teamName
required
string
projectName
required
string
environmentName
required
string
snapshotId
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "errorMessage": "string"
}