Skip to content

Instantly share code, notes, and snippets.

@bradhe
Created February 10, 2025 16:24
Show Gist options
  • Save bradhe/c9d2faa97502647c931719fdaeab5645 to your computer and use it in GitHub Desktop.
Save bradhe/c9d2faa97502647c931719fdaeab5645 to your computer and use it in GitHub Desktop.
Tower's OpenAPI spec as of Feb 10, 2025
components:
schemas:
APIKey:
additionalProperties: false
properties:
created_at:
format: date-time
type: string
identifier:
type: string
last_used_at:
format: date-time
nullable: true
type: string
name:
type: string
required:
- name
- identifier
- last_used_at
- created_at
type: object
AcceptInvitationParams:
additionalProperties: false
properties:
$schema:
description: A URL to the JSON Schema for this object.
example: http://localhost:8081/v1/schemas/AcceptInvitationParams.json
format: uri
readOnly: true
type: string
code:
description: The invitation code to accept
type: string
required:
- code
type: object
AcceptInvitationResponse:
additionalProperties: false
properties:
$schema:
description: A URL to the JSON Schema for this object.
example: http://localhost:8081/v1/schemas/AcceptInvitationResponse.json
format: uri
readOnly: true
type: string
user:
$ref: "#/components/schemas/User"
required:
- user
type: object
App:
additionalProperties: false
properties:
created_at:
format: date-time
type: string
last_run_at:
format: date-time
type: string
name:
type: string
owner:
type: string
short_description:
type: string
version:
type: string
required:
- name
- owner
- short_description
- version
- created_at
- last_run_at
type: object
AppSummary:
additionalProperties: false
properties:
app:
$ref: "#/components/schemas/App"
runs:
items:
$ref: "#/components/schemas/Run"
type: array
required:
- app
- runs
type: object
AppVersion:
additionalProperties: false
properties:
parameters:
items:
$ref: "#/components/schemas/Parameter"
type: array
version:
type: string
required:
- version
- parameters
type: object
CreateAPIKeyParams:
additionalProperties: false
properties:
$schema:
description: A URL to the JSON Schema for this object.
example: http://localhost:8081/v1/schemas/CreateAPIKeyParams.json
format: uri
readOnly: true
type: string
name:
type: string
required:
- name
type: object
CreateAPIKeyResponse:
additionalProperties: false
properties:
$schema:
description: A URL to the JSON Schema for this object.
example: http://localhost:8081/v1/schemas/CreateAPIKeyResponse.json
format: uri
readOnly: true
type: string
api_key:
$ref: "#/components/schemas/APIKey"
description: Created API key
required:
- api_key
type: object
CreateAccountParams:
additionalProperties: false
properties:
$schema:
description: A URL to the JSON Schema for this object.
example: http://localhost:8081/v1/schemas/CreateAccountParams.json
format: uri
readOnly: true
type: string
company:
type: string
country:
type: string
email:
type: string
first_name:
type: string
invite:
type: string
last_name:
type: string
password:
type: string
required:
- first_name
- last_name
- company
- country
- email
- password
- invite
type: object
CreateAccountParamsFlagsStruct:
additionalProperties: false
properties:
is_test_account:
type: boolean
required:
- is_test_account
type: object
CreateAccountResponse:
additionalProperties: false
properties:
$schema:
description: A URL to the JSON Schema for this object.
example: http://localhost:8081/v1/schemas/CreateAccountResponse.json
format: uri
readOnly: true
type: string
session:
$ref: "#/components/schemas/Session"
required:
- session
type: object
CreateAppParams:
additionalProperties: false
properties:
$schema:
description: A URL to the JSON Schema for this object.
example: http://localhost:8081/v1/schemas/CreateAppParams.json
format: uri
readOnly: true
type: string
name:
description: The name of the app.
format: regex
pattern: ^[a-zA-Z0-9-]+$
type: string
short_description:
description: A description of the app.
type: string
required:
- name
type: object
CreateAppResponse:
additionalProperties: false
properties:
$schema:
description: A URL to the JSON Schema for this object.
example: http://localhost:8081/v1/schemas/CreateAppResponse.json
format: uri
readOnly: true
type: string
app:
$ref: "#/components/schemas/App"
required:
- app
type: object
CreateDeviceLoginClaimParams:
additionalProperties: false
properties:
$schema:
description: A URL to the JSON Schema for this object.
example: http://localhost:8081/v1/schemas/CreateDeviceLoginClaimParams.json
format: uri
readOnly: true
type: string
user_code:
description: The user code to claim.
type: string
required:
- user_code
type: object
CreateDeviceLoginClaimResponse:
additionalProperties: false
properties:
$schema:
description: A URL to the JSON Schema for this object.
example: http://localhost:8081/v1/schemas/CreateDeviceLoginClaimResponse.json
format: uri
readOnly: true
type: string
claimed:
description: Whether the code was successfully claimed.
type: boolean
required:
- claimed
type: object
CreateSecretParams:
additionalProperties: false
properties:
$schema:
description: A URL to the JSON Schema for this object.
example: http://localhost:8081/v1/schemas/CreateSecretParams.json
format: uri
readOnly: true
type: string
encrypted_value:
type: string
environment:
type: string
name:
type: string
preview:
type: string
required:
- name
- environment
- encrypted_value
- preview
type: object
CreateSecretResponse:
additionalProperties: false
properties:
$schema:
description: A URL to the JSON Schema for this object.
example: http://localhost:8081/v1/schemas/CreateSecretResponse.json
format: uri
readOnly: true
type: string
secret:
$ref: "#/components/schemas/Secret"
required:
- secret
type: object
CreateSessionParams:
additionalProperties: false
properties:
$schema:
description: A URL to the JSON Schema for this object.
example: http://localhost:8081/v1/schemas/CreateSessionParams.json
format: uri
readOnly: true
type: string
password:
type: string
username:
type: string
required:
- username
- password
type: object
CreateSessionResponse:
additionalProperties: false
properties:
$schema:
description: A URL to the JSON Schema for this object.
example: http://localhost:8081/v1/schemas/CreateSessionResponse.json
format: uri
readOnly: true
type: string
session:
$ref: "#/components/schemas/Session"
description: The new session information.
required:
- session
type: object
DeleteAPIKeyParams:
additionalProperties: false
properties:
$schema:
description: A URL to the JSON Schema for this object.
example: http://localhost:8081/v1/schemas/DeleteAPIKeyParams.json
format: uri
readOnly: true
type: string
identifier:
type: string
required:
- identifier
type: object
DeleteAPIKeyResponse:
additionalProperties: false
properties:
$schema:
description: A URL to the JSON Schema for this object.
example: http://localhost:8081/v1/schemas/DeleteAPIKeyResponse.json
format: uri
readOnly: true
type: string
api_key:
$ref: "#/components/schemas/APIKey"
description: Created API key
required:
- api_key
type: object
DeleteAppResponse:
additionalProperties: false
properties:
$schema:
description: A URL to the JSON Schema for this object.
example: http://localhost:8081/v1/schemas/DeleteAppResponse.json
format: uri
readOnly: true
type: string
app:
$ref: "#/components/schemas/App"
required:
- app
type: object
DeployAppResponse:
additionalProperties: false
properties:
$schema:
description: A URL to the JSON Schema for this object.
example: http://localhost:8081/v1/schemas/DeployAppResponse.json
format: uri
readOnly: true
type: string
version:
$ref: "#/components/schemas/AppVersion"
required:
- version
type: object
DescribeAppResponse:
additionalProperties: false
properties:
$schema:
description: A URL to the JSON Schema for this object.
example: http://localhost:8081/v1/schemas/DescribeAppResponse.json
format: uri
readOnly: true
type: string
app:
$ref: "#/components/schemas/App"
runs:
items:
$ref: "#/components/schemas/Run"
type: array
required:
- app
- runs
type: object
DescribeAppVersionResponse:
additionalProperties: false
properties:
$schema:
description: A URL to the JSON Schema for this object.
example: http://localhost:8081/v1/schemas/DescribeAppVersionResponse.json
format: uri
readOnly: true
type: string
version:
$ref: "#/components/schemas/AppVersion"
required:
- version
type: object
DescribeDeviceLoginClaimResponse:
additionalProperties: false
properties:
$schema:
description: A URL to the JSON Schema for this object.
example: http://localhost:8081/v1/schemas/DescribeDeviceLoginClaimResponse.json
format: uri
readOnly: true
type: string
token:
description: The JWT token.
type: string
user:
$ref: "#/components/schemas/User"
description: The user information.
required:
- user
- token
type: object
DescribeRunResponse:
additionalProperties: false
properties:
$schema:
description: A URL to the JSON Schema for this object.
example: http://localhost:8081/v1/schemas/DescribeRunResponse.json
format: uri
readOnly: true
type: string
run:
$ref: "#/components/schemas/Run"
required:
- run
type: object
DescribeSecretsKeyResponse:
additionalProperties: false
properties:
$schema:
description: A URL to the JSON Schema for this object.
example: http://localhost:8081/v1/schemas/DescribeSecretsKeyResponse.json
format: uri
readOnly: true
type: string
public_key:
type: string
required:
- public_key
type: object
DescribeSessionResponse:
additionalProperties: false
properties:
$schema:
description: A URL to the JSON Schema for this object.
example: http://localhost:8081/v1/schemas/DescribeSessionResponse.json
format: uri
readOnly: true
type: string
session:
$ref: "#/components/schemas/Session"
description: The current session associated with your authentication method.
required:
- session
type: object
ErrorDetail:
additionalProperties: false
properties:
location:
description: Where the error occurred, e.g. 'body.items[3].tags' or 'path.thing-id'
type: string
message:
description: Error message text
type: string
value:
description: The value at the given location
type: object
ErrorModel:
additionalProperties: false
properties:
$schema:
description: A URL to the JSON Schema for this object.
example: http://localhost:8081/v1/schemas/ErrorModel.json
format: uri
readOnly: true
type: string
detail:
description: A human-readable explanation specific to this occurrence of the problem.
example: Property foo is required but is missing.
type: string
errors:
description: Optional list of individual error details
items:
$ref: "#/components/schemas/ErrorDetail"
type: array
instance:
description: A URI reference that identifies the specific occurrence of the problem.
example: https://example.com/error-log/abc123
format: uri
type: string
status:
description: HTTP status code
example: 400
format: int64
type: integer
title:
description: A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
example: Bad Request
type: string
type:
default: about:blank
description: A URI reference to human-readable documentation for the error.
example: https://example.com/errors/example
format: uri
type: string
type: object
GetRunLogLine:
additionalProperties: false
properties:
message:
type: string
timestamp:
format: date-time
type: string
required:
- timestamp
- message
type: object
GetRunLogsOutputBody:
additionalProperties: false
properties:
$schema:
description: A URL to the JSON Schema for this object.
example: http://localhost:8081/v1/schemas/GetRunLogsOutputBody.json
format: uri
readOnly: true
type: string
log_lines:
items:
$ref: "#/components/schemas/GetRunLogLine"
type: array
required:
- log_lines
type: object
ListAPIKeysResponse:
additionalProperties: false
properties:
$schema:
description: A URL to the JSON Schema for this object.
example: http://localhost:8081/v1/schemas/ListAPIKeysResponse.json
format: uri
readOnly: true
type: string
api_keys:
description: List of API keys
items:
$ref: "#/components/schemas/APIKey"
type: array
required:
- api_keys
type: object
ListAppEnvironmentsResponse:
additionalProperties: false
properties:
$schema:
description: A URL to the JSON Schema for this object.
example: http://localhost:8081/v1/schemas/ListAppEnvironmentsResponse.json
format: uri
readOnly: true
type: string
environments:
items:
type: string
type: array
required:
- environments
type: object
ListAppsResponse:
additionalProperties: false
properties:
$schema:
description: A URL to the JSON Schema for this object.
example: http://localhost:8081/v1/schemas/ListAppsResponse.json
format: uri
readOnly: true
type: string
apps:
items:
$ref: "#/components/schemas/AppSummary"
type: array
pages:
$ref: "#/components/schemas/Pagination"
required:
- pages
- apps
type: object
ListRunsResponse:
additionalProperties: false
properties:
$schema:
description: A URL to the JSON Schema for this object.
example: http://localhost:8081/v1/schemas/ListRunsResponse.json
format: uri
readOnly: true
type: string
pages:
$ref: "#/components/schemas/Pagination"
runs:
items:
$ref: "#/components/schemas/Run"
type: array
required:
- pages
- runs
type: object
ListSecretEnvironmentsResponse:
additionalProperties: false
properties:
$schema:
description: A URL to the JSON Schema for this object.
example: http://localhost:8081/v1/schemas/ListSecretEnvironmentsResponse.json
format: uri
readOnly: true
type: string
environments:
items:
type: string
type: array
required:
- environments
type: object
ListSecretsResponse:
additionalProperties: false
properties:
$schema:
description: A URL to the JSON Schema for this object.
example: http://localhost:8081/v1/schemas/ListSecretsResponse.json
format: uri
readOnly: true
type: string
pages:
$ref: "#/components/schemas/Pagination"
secrets:
items:
$ref: "#/components/schemas/Secret"
type: array
required:
- pages
- secrets
type: object
LogLine:
additionalProperties: false
properties:
content:
description: Contents of the log message.
type: string
line_num:
description: Line number.
format: int64
type: integer
reported_at:
description: Timestamp of the log line.
format: date-time
type: string
run_id:
description: The uuid of the Run.
type: string
required:
- run_id
- reported_at
- line_num
- content
type: object
Pagination:
additionalProperties: false
properties:
num_pages:
format: int64
type: integer
page:
format: int64
type: integer
page_size:
format: int64
type: integer
total:
format: int64
type: integer
required:
- page
- total
- num_pages
- page_size
type: object
Parameter:
additionalProperties: false
properties:
default:
type: string
description:
type: string
name:
type: string
required:
- name
- default
- description
type: object
Run:
additionalProperties: false
properties:
app_name:
type: string
cancelled_at:
format: date-time
nullable: true
type: string
created_at:
format: date-time
type: string
ended_at:
format: date-time
nullable: true
type: string
number:
format: int64
type: integer
run_id:
type: string
scheduled_at:
format: date-time
type: string
started_at:
format: date-time
nullable: true
type: string
status:
type: string
required:
- run_id
- number
- app_name
- status
- created_at
- scheduled_at
- cancelled_at
- started_at
- ended_at
type: object
RunAppParams:
additionalProperties: false
properties:
$schema:
description: A URL to the JSON Schema for this object.
example: http://localhost:8081/v1/schemas/RunAppParams.json
format: uri
readOnly: true
type: string
environment:
type: string
parameters:
additionalProperties:
type: string
type: object
required:
- environment
- parameters
type: object
RunAppResponse:
additionalProperties: false
properties:
$schema:
description: A URL to the JSON Schema for this object.
example: http://localhost:8081/v1/schemas/RunAppResponse.json
format: uri
readOnly: true
type: string
run:
$ref: "#/components/schemas/Run"
required:
- run
type: object
Secret:
additionalProperties: false
properties:
created_at:
format: date-time
type: string
environment:
type: string
name:
type: string
preview:
type: string
required:
- name
- environment
- preview
- created_at
type: object
Session:
additionalProperties: false
properties:
token:
$ref: "#/components/schemas/Token"
user:
$ref: "#/components/schemas/User"
required:
- user
- token
type: object
Token:
additionalProperties: false
properties:
jwt:
type: string
required:
- jwt
type: object
UpdateUserParams:
additionalProperties: false
properties:
$schema:
description: A URL to the JSON Schema for this object.
example: http://localhost:8081/v1/schemas/UpdateUserParams.json
format: uri
readOnly: true
type: string
company:
nullable: true
type: string
country:
nullable: true
type: string
first_name:
nullable: true
type: string
last_name:
nullable: true
type: string
type: object
UpdateUserResponse:
additionalProperties: false
properties:
$schema:
description: A URL to the JSON Schema for this object.
example: http://localhost:8081/v1/schemas/UpdateUserResponse.json
format: uri
readOnly: true
type: string
user:
$ref: "#/components/schemas/User"
required:
- user
type: object
User:
additionalProperties: false
properties:
company:
type: string
country:
type: string
created_at:
format: date-time
type: string
email:
type: string
first_name:
type: string
is_invitation_claimed:
type: boolean
last_name:
type: string
profile_photo_url:
type: string
required:
- first_name
- last_name
- company
- country
- email
- profile_photo_url
- is_invitation_claimed
- created_at
type: object
securitySchemes:
APIKeyAuth:
description: API key created by a Tower user or Tower service account to authenticate an API request.
in: header
name: X-Tower-API-Key
type: apiKey
BearerAuth:
description: Bearer token authentication scheme which uses a JWT provided by the Tower API as part of a Tower session (see documentation about creating sessions).
in: header
name: Authorization
scheme: bearer
type: http
info:
title: Tower API
version: v0.2.43
openapi: 3.0.3
paths:
/accounts:
post:
description: This is the primary way that users register new accounts with Tower.
operationId: create-account
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/CreateAccountParams"
required: true
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/CreateAccountResponse"
description: OK
default:
content:
application/problem+json:
schema:
$ref: "#/components/schemas/ErrorModel"
description: Error
summary: Create account
/accounts/invite:
post:
description: Accept an invitation code to join an account
operationId: accept-invitation
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/AcceptInvitationParams"
required: true
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/AcceptInvitationResponse"
description: OK
default:
content:
application/problem+json:
schema:
$ref: "#/components/schemas/ErrorModel"
description: Error
security:
- BearerAuth: []
summary: Accept an invitation code
/api-keys:
delete:
operationId: delete-api-key
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/DeleteAPIKeyParams"
required: true
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/DeleteAPIKeyResponse"
description: OK
default:
content:
application/problem+json:
schema:
$ref: "#/components/schemas/ErrorModel"
description: Error
security:
- BearerAuth: []
summary: Delete API Key
get:
description: List all the API keys associated with your current account.
operationId: list-api-keys
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/ListAPIKeysResponse"
description: OK
default:
content:
application/problem+json:
schema:
$ref: "#/components/schemas/ErrorModel"
description: Error
security:
- BearerAuth: []
summary: List API Keys
post:
operationId: create-api-key
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/CreateAPIKeyParams"
required: true
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/CreateAPIKeyResponse"
description: OK
default:
content:
application/problem+json:
schema:
$ref: "#/components/schemas/ErrorModel"
description: Error
security:
- BearerAuth: []
summary: Create API Key
/apps:
get:
description: Get all the apps for the current account.
operationId: list-apps
parameters:
- description: The search query to filter apps by.
explode: false
in: query
name: query
schema:
description: The search query to filter apps by.
type: string
- description: The page number to fetch.
explode: false
in: query
name: page
schema:
description: The page number to fetch.
format: int64
type: integer
- description: The number of records to fetch on each page.
explode: false
in: query
name: page_size
schema:
description: The number of records to fetch on each page.
format: int64
type: integer
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/ListAppsResponse"
description: OK
default:
content:
application/problem+json:
schema:
$ref: "#/components/schemas/ErrorModel"
description: Error
security:
- BearerAuth: []
summary: List apps
post:
description: Create a new app in the current account.
operationId: create-apps
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/CreateAppParams"
required: true
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/CreateAppResponse"
description: OK
default:
content:
application/problem+json:
schema:
$ref: "#/components/schemas/ErrorModel"
description: Error
security:
- BearerAuth: []
summary: Create app
/apps/{name}:
delete:
description: Delete one of your apps, the associated code, and all the runs as well.
operationId: delete-app
parameters:
- description: The name of the app to delete.
in: path
name: name
required: true
schema:
description: The name of the app to delete.
type: string
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/DeleteAppResponse"
description: OK
default:
content:
application/problem+json:
schema:
$ref: "#/components/schemas/ErrorModel"
description: Error
security:
- BearerAuth: []
summary: Delete app
get:
description: Get all the apps for the current account.
operationId: describe-app
parameters:
- description: The number of recent runs to fetch for the app.
explode: false
in: query
name: runs
schema:
description: The number of recent runs to fetch for the app.
format: int64
type: integer
- description: The name of the app to fetch.
in: path
name: name
required: true
schema:
description: The name of the app to fetch.
type: string
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/DescribeAppResponse"
description: OK
default:
content:
application/problem+json:
schema:
$ref: "#/components/schemas/ErrorModel"
description: Error
security:
- BearerAuth: []
summary: Describe app
/apps/{name}/deploy:
post:
description: Deploy a new version of an app. Reads the request body, which is a TAR file (or a GZipped TAR file) and creates a new deployment for an app based on that file.
operationId: deploy-app
parameters:
- description: The name of the app to deploy.
in: path
name: name
required: true
schema:
description: The name of the app to deploy.
type: string
- description: The encoding of the content.
in: header
name: Content-Encoding
schema:
description: The encoding of the content.
type: string
requestBody:
content:
application/x-tar: {}
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/DeployAppResponse"
description: OK
"400":
content:
application/problem+json:
schema:
$ref: "#/components/schemas/ErrorModel"
description: Bad Request
"422":
content:
application/problem+json:
schema:
$ref: "#/components/schemas/ErrorModel"
description: Unprocessable Entity
"500":
content:
application/problem+json:
schema:
$ref: "#/components/schemas/ErrorModel"
description: Internal Server Error
security:
- BearerAuth: []
summary: Deploy app
/apps/{name}/environments:
get:
description: Generates a list of all the known environments for a given app in the current account.
operationId: list-app-environments
parameters:
- description: The name of the app to get the version for.
in: path
name: name
required: true
schema:
description: The name of the app to get the version for.
type: string
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/ListAppEnvironmentsResponse"
description: OK
default:
content:
application/problem+json:
schema:
$ref: "#/components/schemas/ErrorModel"
description: Error
security:
- BearerAuth: []
summary: List app environments
/apps/{name}/runs:
get:
description: Generates a list of all the runs for a given app. The list is paginated based on the query string parameters passed in.
operationId: list-runs
parameters:
- description: The page number to fetch.
explode: false
in: query
name: page
schema:
description: The page number to fetch.
format: int64
type: integer
- description: The number of records to fetch on each page.
explode: false
in: query
name: page_size
schema:
description: The number of records to fetch on each page.
format: int64
type: integer
- description: The name of the app to fetch runs for.
in: path
name: name
required: true
schema:
description: The name of the app to fetch runs for.
type: string
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/ListRunsResponse"
description: OK
default:
content:
application/problem+json:
schema:
$ref: "#/components/schemas/ErrorModel"
description: Error
security:
- BearerAuth: []
summary: List runs
post:
description: Runs an app with the supplied parameters.
operationId: run-app
parameters:
- description: The name of the app to fetch runs for.
in: path
name: name
required: true
schema:
description: The name of the app to fetch runs for.
type: string
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/RunAppParams"
required: true
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/RunAppResponse"
description: OK
default:
content:
application/problem+json:
schema:
$ref: "#/components/schemas/ErrorModel"
description: Error
security:
- BearerAuth: []
summary: Run app
/apps/{name}/runs/{seq}:
get:
description: Describe a run of an app.
operationId: describe-run
parameters:
- description: The name of the app to fetch runs for.
in: path
name: name
required: true
schema:
description: The name of the app to fetch runs for.
type: string
- description: The number of the run to fetch.
in: path
name: seq
required: true
schema:
description: The number of the run to fetch.
format: int64
type: integer
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/DescribeRunResponse"
description: OK
default:
content:
application/problem+json:
schema:
$ref: "#/components/schemas/ErrorModel"
description: Error
security:
- BearerAuth: []
summary: Describe run
/apps/{name}/runs/{seq}/logs:
get:
description: Retrieves the logs associated with a particular run of an app.
operationId: get-app-run-logs
parameters:
- description: The name of the app to get logs for.
in: path
name: name
required: true
schema:
description: The name of the app to get logs for.
type: string
- description: The sequence number of the run to get logs for.
in: path
name: seq
required: true
schema:
description: The sequence number of the run to get logs for.
format: int64
type: integer
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/GetRunLogsOutputBody"
description: OK
headers:
ContentType:
schema:
type: string
default:
content:
application/problem+json:
schema:
$ref: "#/components/schemas/ErrorModel"
description: Error
security:
- BearerAuth: []
summary: Get logs for a specific app run.
/apps/{name}/runs/{seq}/logs/stream:
get:
description: Streams the logs associated with a particular run of an app in real-time.
operationId: stream-app-run-logs
parameters:
- description: The name of the app to get logs for.
in: path
name: name
required: true
schema:
description: The name of the app to get logs for.
type: string
- description: The sequence number of the run to get logs for.
in: path
name: seq
required: true
schema:
description: The sequence number of the run to get logs for.
format: int64
type: integer
responses:
"200":
content:
text/event-stream:
schema:
description: Each oneOf object in the array represents one possible Server Sent Events (SSE) message, serialized as UTF-8 text according to the SSE specification.
items:
oneOf:
- properties:
data:
$ref: "#/components/schemas/LogLine"
event:
const: message
description: The event name.
type: string
id:
description: The event ID.
type: integer
retry:
description: The retry time in milliseconds.
type: integer
required:
- data
title: Event message
type: object
title: Server Sent Events
type: array
description: OK
default:
content:
application/problem+json:
schema:
$ref: "#/components/schemas/ErrorModel"
description: Error
security:
- BearerAuth: []
summary: Stream logs for a specific app run
/apps/{name}/versions/{num}:
get:
description: Describe an app version for an app in the current account.
operationId: describe-app-version
parameters:
- description: The name of the app to get the version for.
in: path
name: name
required: true
schema:
description: The name of the app to get the version for.
type: string
- description: The version string to get the version for.
in: path
name: num
required: true
schema:
description: The version string to get the version for.
type: string
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/DescribeAppVersionResponse"
description: OK
default:
content:
application/problem+json:
schema:
$ref: "#/components/schemas/ErrorModel"
description: Error
security:
- BearerAuth: []
summary: Describe app version
/login/device/claim:
post:
description: Claims a device login code for the authenticated user.
operationId: create-device-login-claim
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/CreateDeviceLoginClaimParams"
required: true
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/CreateDeviceLoginClaimResponse"
description: OK
default:
content:
application/problem+json:
schema:
$ref: "#/components/schemas/ErrorModel"
description: Error
security:
- BearerAuth: []
summary: Create device login claim
/login/device/{device_code}:
get:
description: Checks if a device login code has been claimed and returns the user session if so.
operationId: describe-device-login-claim
parameters:
- description: The device code to check.
in: path
name: device_code
required: true
schema:
description: The device code to check.
type: string
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/DescribeDeviceLoginClaimResponse"
description: OK
default:
content:
application/problem+json:
schema:
$ref: "#/components/schemas/ErrorModel"
description: Error
summary: Describe device login claim
/secrets:
get:
description: Lists all the secrets associated with your current account.
operationId: list-secrets
parameters:
- description: The environment to filter by.
explode: false
in: query
name: environment
schema:
description: The environment to filter by.
type: string
- description: Whether to fetch all secrets or only the ones that are not marked as deleted.
explode: false
in: query
name: all
schema:
description: Whether to fetch all secrets or only the ones that are not marked as deleted.
type: boolean
- description: The page number to fetch.
explode: false
in: query
name: page
schema:
description: The page number to fetch.
format: int64
type: integer
- description: The number of records to fetch on each page.
explode: false
in: query
name: page_size
schema:
description: The number of records to fetch on each page.
format: int64
type: integer
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/ListSecretsResponse"
description: OK
default:
content:
application/problem+json:
schema:
$ref: "#/components/schemas/ErrorModel"
description: Error
security:
- BearerAuth: []
summary: List secrets
post:
description: Creates a new secret and associates it with the current account.
operationId: create-secret
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/CreateSecretParams"
required: true
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/CreateSecretResponse"
description: OK
default:
content:
application/problem+json:
schema:
$ref: "#/components/schemas/ErrorModel"
description: Error
security:
- BearerAuth: []
summary: Create secret
/secrets/environments:
get:
description: Lists all the environments associated with secrets.
operationId: list-secret-environments
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/ListSecretEnvironmentsResponse"
description: OK
default:
content:
application/problem+json:
schema:
$ref: "#/components/schemas/ErrorModel"
description: Error
security:
- BearerAuth: []
summary: List secret environments
/secrets/key:
get:
description: Gets the encryption key used for encrypting secrets that you want to create in Tower.
operationId: describe-secrets-key
parameters:
- description: The format to return the key in. Options are 'pkcs1' and 'spki'.
explode: false
in: query
name: format
schema:
description: The format to return the key in. Options are 'pkcs1' and 'spki'.
type: string
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/DescribeSecretsKeyResponse"
description: OK
default:
content:
application/problem+json:
schema:
$ref: "#/components/schemas/ErrorModel"
description: Error
security:
- BearerAuth: []
summary: Describe encryption key
/secrets/{name}:
delete:
description: Delete a secret by name.
operationId: delete-secret
parameters:
- description: The name of the secret to delete.
in: path
name: name
required: true
schema:
description: The name of the secret to delete.
type: string
- description: The environment of the secret to delete.
explode: false
in: query
name: environment
schema:
description: The environment of the secret to delete.
type: string
responses:
"204":
description: No Content
default:
content:
application/problem+json:
schema:
$ref: "#/components/schemas/ErrorModel"
description: Error
security:
- BearerAuth: []
summary: Delete a secret.
/session:
get:
description: Validate your current session and return the user information associated with the session.
operationId: describe-session
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/DescribeSessionResponse"
description: OK
default:
content:
application/problem+json:
schema:
$ref: "#/components/schemas/ErrorModel"
description: Error
security:
- BearerAuth: []
summary: Describe session
post:
description: Create a new session and return it.
operationId: create-session
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/CreateSessionParams"
required: true
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/CreateSessionResponse"
description: OK
default:
content:
application/problem+json:
schema:
$ref: "#/components/schemas/ErrorModel"
description: Error
summary: Create session
/user:
put:
description: Updates your current user profile.
operationId: update-user
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/UpdateUserParams"
required: true
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/UpdateUserResponse"
description: OK
default:
content:
application/problem+json:
schema:
$ref: "#/components/schemas/ErrorModel"
description: Error
security:
- BearerAuth: []
summary: Update user profile
servers:
- url: http://api.tower.dev/v1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment