Skip to content

armgit / qm

Public Imported from GitHub
0

Multiplayer agent harness for work.

Tighten Porter config validation, paginate sandbox listing, drop vendored OpenAPI spec

Gilad K427a5af18719
diff --git a/.prettierignore b/.prettierignore
index 5558b65d2..99e71e23e 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -6,3 +6,4 @@ data/
.ci-instance/
test/live-slack/out/
deploy/stacks/.generated/
+deploy/helm/templates/
diff --git a/porter-openapi.yaml b/porter-openapi.yaml
deleted file mode 100644
index 05bd46434..000000000
--- a/porter-openapi.yaml
+++ /dev/null
@@ -1,22535 +0,0 @@
-openapi: 3.0.0
-info:
- version: 1.0.0
- title: Porter API
- description: API for interfacing with porter.run
- contact:
- name: Porter
- url: https://porter.run
-servers:
- - url: https://dashboard.porter.run
- - url: http://localhost:7835
- - url: http://localhost:3000
-security:
- - cookieAuth: []
- - bearerAuth: []
-tags:
- - name: Applications
- description: Manage Porter applications and services.
- - name: Deployment Targets
- description: Manage Porter deployment targets.
- - name: Jobs
- description: Manage Porter jobs.
- - name: Environment Groups
- description: Manage environment variables, environment files, and secrets for Porter applications and services.
- - name: Clusters
- description: Manage Porter clusters.
- - name: Helm
- description: Manage Helm charts and default values.
- - name: GitHub
- description: Manage GitHub integrations and repository analysis.
- - name: Narvi
- description: Remote Docker builds powered by BuildKit.
- - name: Api Audit Logs
- description: Query the per-request audit log of API traffic.
- - name: Metadata
- description: Global Porter metadata, such as control plane egress IPs to allowlist.
-paths:
- /api/v2/auth/session:
- get:
- x-scalar-ignore: true
- summary: Get session
- description: Encodes the provided access token into a cookie to be used for OAuth flows.
- operationId: auth_session
- security:
- - bearerAuth:
- - viewer
- responses:
- '200':
- description: Session encoded successfully
- content:
- application/json:
- schema:
- type: object
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects:
- get:
- x-scalar-ignore: true
- summary: List projects
- description: Returns a list of all projects the user has access to
- operationId: list_projects
- security:
- - bearerAuth: []
- responses:
- '200':
- description: List of projects
- content:
- application/json:
- schema:
- type: object
- required:
- - projects
- properties:
- projects:
- type: array
- items:
- $ref: '#/components/schemas/Project'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/invites:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- get:
- x-scalar-ignore: true
- summary: List project invites
- description: Returns a list of all active invites for a project
- operationId: list_invites
- security:
- - bearerAuth:
- - viewer
- responses:
- '200':
- description: List of project invites
- content:
- application/json:
- schema:
- type: object
- required:
- - invites
- properties:
- invites:
- type: array
- items:
- $ref: '#/components/schemas/Invite'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- x-scalar-ignore: true
- summary: Create project invite
- description: Creates a new invite for a user to join a project
- operationId: create_invite
- security:
- - bearerAuth:
- - admin
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- required:
- - emails
- - kind
- properties:
- emails:
- type: array
- items:
- type: string
- format: email
- description: Email addresses of the users to invite
- minItems: 1
- maxItems: 50
- example:
- kind:
- $ref: '#/components/schemas/RolePermission'
- responses:
- '200':
- description: Invites created successfully
- content:
- application/json:
- schema:
- type: object
- required:
- - invites
- - failed_emails
- properties:
- invites:
- type: array
- items:
- $ref: '#/components/schemas/Invite'
- failed_emails:
- type: array
- items:
- type: string
- format: email
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/invites/{invite_id}:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- - name: invite_id
- in: path
- description: Invite ID
- required: true
- schema:
- type: integer
- delete:
- x-scalar-ignore: true
- summary: Delete project invite
- description: Deletes an existing project invite
- operationId: delete_invite
- security:
- - bearerAuth:
- - admin
- responses:
- '200':
- description: Invite deleted successfully
- default:
- description: Error response
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/members:
- parameters:
- - name: project_id
- in: path
- description: Project ID to list members for
- required: true
- schema:
- type: integer
- get:
- x-scalar-ignore: true
- summary: List project members
- description: Returns all members of a project with their roles and user information
- operationId: list_project_members
- security:
- - bearerAuth:
- - viewer
- responses:
- '200':
- description: List of project members
- content:
- application/json:
- schema:
- type: object
- required:
- - members
- properties:
- members:
- type: array
- items:
- $ref: '#/components/schemas/ProjectMember'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/roles/{role_id}:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- - name: role_id
- in: path
- description: Role ID of the member whose role should be updated
- required: true
- schema:
- type: integer
- put:
- x-scalar-ignore: true
- summary: Update project member role
- description: Updates the role of a project member
- operationId: update_project_member_role
- security:
- - bearerAuth:
- - admin
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- required:
- - role
- properties:
- role:
- $ref: '#/components/schemas/RolePermission'
- responses:
- '200':
- description: Member role updated successfully
- content:
- application/json:
- schema:
- type: object
- required:
- - member
- properties:
- member:
- $ref: '#/components/schemas/ProjectMember'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- delete:
- x-scalar-ignore: true
- summary: Delete project member
- description: Deletes a project member
- operationId: delete_project_member
- security:
- - bearerAuth:
- - admin
- responses:
- '204':
- description: Member deleted successfully
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/sessions:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- get:
- x-scalar-ignore: true
- summary: List active sessions for all members of a project
- description: |
- Returns the active sessions for every member of the project, each
- annotated with the member it belongs to. Caller must be a project admin.
- Porter staff sessions are included only when the caller is also Porter
- staff; otherwise they are filtered out.
- operationId: list_project_sessions
- security:
- - bearerAuth:
- - admin
- responses:
- '200':
- description: List of active sessions across all members
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ProjectSessionsResponse'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/sessions/revoke:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- post:
- x-scalar-ignore: true
- summary: Revoke multiple project member sessions
- description: |
- Bulk-revokes the listed sessions, potentially across multiple members.
- Caller must be a project admin. Each target's owning member must have a
- role in the project, and — critically — Porter staff sessions can only
- be revoked by other Porter staff, so customer admins cannot disrupt
- Porter support access. Targets that fail these checks (or are unknown)
- are counted as failed rather than aborting the whole request.
- operationId: revoke_project_sessions
- security:
- - bearerAuth:
- - admin
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/RevokeProjectSessionsRequest'
- responses:
- '200':
- description: Revocation summary
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/RevokeProjectSessionsResult'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/invite/{token}:
- parameters:
- - name: token
- in: path
- description: Invite token
- required: true
- schema:
- type: string
- post:
- x-scalar-ignore: true
- summary: Accept project invite
- description: Accepts a project invite using the invite token for authenticated users
- operationId: accept_invite
- security:
- - bearerAuth: []
- responses:
- '200':
- description: Invite accepted successfully
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- get:
- x-scalar-ignore: true
- summary: Get invite
- description: Returns project name and invitee email if invite is valid
- operationId: get_invite
- security:
- - bearerAuth: []
- responses:
- '200':
- description: Valid invite information
- content:
- application/json:
- schema:
- type: object
- required:
- - target_email
- - project_name
- properties:
- target_email:
- type: string
- format: email
- description: Email address the invite was sent to
- project_name:
- type: string
- description: Name of the project being invited to
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/user/invites:
- get:
- x-scalar-ignore: true
- summary: List current user's valid invites
- description: Returns valid invites for the authenticated user. Email is automatically determined from authentication context.
- operationId: list_user_invites
- security:
- - bearerAuth: []
- responses:
- '200':
- description: List of invites
- content:
- application/json:
- schema:
- type: object
- required:
- - invites
- properties:
- invites:
- type: array
- items:
- $ref: '#/components/schemas/Invite'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/user/logout:
- post:
- x-scalar-ignore: true
- summary: Logout user
- description: Revokes the current session for the authenticated user
- operationId: logout_user
- security:
- - bearerAuth: []
- responses:
- '200':
- description: User logged out successfully
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/user:
- delete:
- x-scalar-ignore: true
- summary: Delete user account
- description: Permanently deletes the authenticated user's account and all associated data. This action cannot be undone.
- operationId: delete_user
- security:
- - bearerAuth: []
- tags:
- - Users
- responses:
- '204':
- description: User account deleted successfully
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/user/sessions:
- get:
- x-scalar-ignore: true
- summary: List the authenticated user's active sessions
- description: |
- Returns the user's active Porter sessions (browser and CLI). The session
- the caller is currently using is flagged with `is_current=true` so the UI
- can warn before revoking it.
- operationId: list_user_sessions
- security:
- - bearerAuth: []
- responses:
- '200':
- description: List of active sessions
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UserSessionsResponse'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/user/sessions/{session_id}:
- parameters:
- - name: session_id
- in: path
- description: Session identifier returned by GET /api/v2/user/sessions
- required: true
- schema:
- type: string
- delete:
- x-scalar-ignore: true
- summary: Revoke one of the authenticated user's sessions
- description: |
- Revokes the named session for the authenticated user. The session is
- invalidated immediately, ending the bearer token's usefulness.
- operationId: revoke_user_session
- security:
- - bearerAuth: []
- responses:
- '204':
- description: Session revoked
- '404':
- description: Session does not belong to the caller
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/sleep:
- get:
- x-scalar-ignore: true
- summary: Sleep for testing
- description: Sleeps for the specified number of seconds and returns a confirmation message. Useful for verifying graceful shutdown of the server.
- operationId: sleep
- security:
- - bearerAuth: []
- parameters:
- - name: seconds
- in: query
- required: true
- description: Number of seconds to sleep (0-300)
- schema:
- type: integer
- minimum: 0
- maximum: 300
- responses:
- '200':
- description: Successfully completed sleep
- content:
- application/json:
- schema:
- type: object
- required:
- - message
- properties:
- message:
- type: string
- description: Confirmation message
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/metadata/control-plane-ips:
- get:
- summary: Get Porter control plane IPs
- description: Returns the Porter control plane egress CIDRs to allowlist for Kubernetes API (control plane) access.
- operationId: get_control_plane_ips
- security:
- - bearerAuth: []
- tags:
- - Metadata
- responses:
- '200':
- description: Porter control plane CIDRs
- content:
- application/json:
- schema:
- type: object
- required:
- - cidrs
- properties:
- cidrs:
- type: array
- description: Porter control plane egress CIDRs to allowlist for Kubernetes API access.
- items:
- type: string
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/github/repositories:
- get:
- parameters:
- - name: project_id
- in: path
- description: Project ID to list GitHub repositories for
- required: true
- schema:
- type: integer
- minimum: 0
- summary: List GitHub Repositories For Project
- description: Lists all GitHub repositories connected to a project
- operationId: list_project_github_repositories
- x-scalar-ignore: true
- tags:
- - GitHub
- security:
- - bearerAuth:
- - viewer
- responses:
- '200':
- description: GitHub repositories retrieved successfully
- content:
- application/json:
- schema:
- type: object
- required:
- - repositories
- properties:
- repositories:
- type: array
- items:
- $ref: '#/components/schemas/GitHubRepository'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- parameters:
- - name: project_id
- in: path
- description: Project ID to connect GitHub repository to
- required: true
- schema:
- type: integer
- minimum: 0
- summary: Connect GitHub Repository To Project
- description: Connects a GitHub repository to a project after validating that a user has access
- operationId: connect_github_repository
- x-scalar-ignore: true
- tags:
- - GitHub
- security:
- - bearerAuth:
- - developer
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- required:
- - github_repository_name
- - github_account_name
- properties:
- github_repository_name:
- type: string
- description: GitHub repository in format 'owner/repo'
- pattern: ^[a-zA-Z0-9._-]+/[a-zA-Z0-9._-]+$
- example: example/test
- github_account_name:
- type: string
- description: Name of the GitHub account to connect to
- example: example
- responses:
- '200':
- description: GitHub repository connected successfully
- content:
- application/json:
- schema:
- type: object
- required:
- - github_pr_url
- properties:
- github_pr_url:
- type: string
- description: URL for the pull request to create the build workflow file
- example: https://github.com/example/test/pull/123
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/github/repositories/{github_repository_name}/pull-requests:
- get:
- x-scalar-ignore: true
- summary: List pull requests in a GitHub repository
- description: Returns a list of pull requests in a GitHub repository
- operationId: list_github_repository_pull_requests
- tags:
- - GitHub
- security:
- - bearerAuth:
- - viewer
- parameters:
- - name: project_id
- in: path
- description: Project ID that the GitHub repository is connected to
- required: true
- schema:
- type: integer
- - name: github_repository_name
- in: path
- description: Name of the GitHub repository
- required: true
- schema:
- type: string
- responses:
- '200':
- description: List of pull requests in the GitHub repository
- content:
- application/json:
- schema:
- type: object
- required:
- - pull_requests
- properties:
- pull_requests:
- type: array
- items:
- $ref: '#/components/schemas/GitHubPullRequest'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/github/repositories/{github_repository_name}/build:
- post:
- parameters:
- - name: project_id
- in: path
- description: Project ID that GitHub repository is connected to
- required: true
- schema:
- type: integer
- minimum: 0
- example: 123
- - name: github_repository_name
- in: path
- description: Name of the GitHub repository to create a build for
- required: true
- schema:
- type: string
- example: repo-owner/repo-name
- summary: Create a build for a GitHub repository
- description: Creates a build for a GitHub repository
- operationId: build_github_repository
- x-scalar-ignore: true
- tags:
- - GitHub
- security:
- - bearerAuth:
- - developer
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- required:
- - commit_sha
- - build_settings_id
- - registry_urls
- properties:
- commit_sha:
- type: string
- description: Commit SHA to build
- example: fa9c6f358b792d214cff5c095f52eed4a70b7259
- build_settings_id:
- type: string
- format: uuid
- x-go-type: uuid.UUID
- description: ID of the build settings to use for the build
- example: 123e4567-e89b-12d3-a456-426614174000
- registry_urls:
- type: array
- description: URLs of the image repositories to push the built image to
- items:
- type: string
- example:
- - 012345678901.dkr.ecr.us-east-1.amazonaws.com
- responses:
- '200':
- description: Build created successfully
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/github/accounts/{github_account_name}/repositories/{github_repository_name}/stack-detect:
- post:
- x-scalar-ignore: true
- summary: Repository stack detection
- description: analyzes a Github repository to detect applications, frameworks, and deployment configuration
- operationId: stack_detect
- security:
- - bearerAuth: []
- parameters:
- - name: github_repository_name
- in: path
- required: true
- schema:
- type: string
- description: GitHub repository in format 'owner/repo'
- pattern: ^[a-zA-Z0-9._-]+/[a-zA-Z0-9._-]+$
- example: example/test
- - name: github_account_name
- in: path
- required: true
- schema:
- type: string
- description: Name of the GitHub account to connect to
- example: example
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- required:
- - branch
- properties:
- branch:
- type: string
- description: Git branch to analyze
- example: main
- project_id:
- type: integer
- format: int64
- description: Project ID to check for already-deployed apps (optional, enables deployment annotation)
- example: 123
- cluster_id:
- type: integer
- format: int64
- description: Cluster ID to check for already-deployed apps (optional, enables deployment annotation)
- example: 456
- responses:
- '200':
- description: Repository Stack Detection Results
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/StackDetectionResponse'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/services:
- parameters:
- - name: project_id
- in: path
- description: Project ID to filter services by
- required: true
- schema:
- type: integer
- get:
- x-scalar-ignore: true
- summary: List services
- description: Returns resources that Porter manages such as clusters, databases, applications, etc.
- operationId: list_services
- security:
- - bearerAuth:
- - viewer
- parameters:
- - name: type
- in: query
- description: Filter services by type
- required: false
- schema:
- $ref: '#/components/schemas/ServiceType'
- - name: id
- in: query
- description: Filter services by uid
- required: false
- schema:
- type: string
- - name: status
- in: query
- description: Filter services by status
- required: false
- schema:
- $ref: '#/components/schemas/ServiceStatus'
- - name: preview
- in: query
- description: Filter services by preview status. If true, only returns preview services. Otherwise returns non-preview services.
- required: false
- schema:
- type: boolean
- responses:
- '200':
- description: List of services
- content:
- application/json:
- schema:
- type: object
- required:
- - services
- properties:
- services:
- type: array
- items:
- $ref: '#/components/schemas/Service'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- x-scalar-ignore: true
- summary: Update service
- description: Updates an existing service in Porter
- tags:
- - experimental
- operationId: update_service
- security:
- - bearerAuth:
- - developer
- requestBody:
- description: Service update details
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UpdateServiceRequest'
- responses:
- '200':
- description: Service updated successfully
- content:
- application/json:
- schema:
- type: object
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- delete:
- x-scalar-ignore: true
- summary: Delete service
- description: Deletes an existing service in Porter
- tags:
- - experimental
- operationId: delete_service
- security:
- - bearerAuth:
- - developer
- parameters:
- - name: id
- in: query
- description: Filter services by uid
- required: true
- schema:
- type: string
- - name: type
- in: query
- description: Filter services by type
- required: true
- schema:
- $ref: '#/components/schemas/ServiceType'
- responses:
- '200':
- description: Service deleted successfully
- content:
- application/json:
- schema:
- type: object
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/services/validate:
- parameters:
- - name: project_id
- in: path
- description: Project ID to validate services for
- required: true
- schema:
- type: integer
- post:
- x-scalar-ignore: true
- summary: Validate the configuration of a service
- description: Validates the proposed update to a service
- tags:
- - experimental
- operationId: validate_service
- security:
- - bearerAuth:
- - developer
- requestBody:
- description: Service update details to validate
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ValidateServiceRequest'
- responses:
- '200':
- description: Service update validated successfully
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ServiceValidation'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/clusters:
- parameters:
- - name: project_id
- in: path
- description: Project ID to filter clusters by
- required: true
- schema:
- type: integer
- get:
- x-scalar-ignore: true
- summary: List clusters
- description: Returns all clusters in the project that the user has access to
- operationId: list_clusters
- security:
- - bearerAuth:
- - viewer
- responses:
- '200':
- description: List of clusters
- content:
- application/json:
- schema:
- type: object
- required:
- - clusters
- properties:
- clusters:
- type: array
- items:
- $ref: '#/components/schemas/Cluster'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/clusters:
- get:
- operationId: list_project_clusters
- x-scalar-ignore: true
- security:
- - bearerAuth:
- - viewer
- tags:
- - Clusters
- summary: List clusters for a project
- description: Retrieves cluster summaries for a project.
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- format: int64
- minimum: 1
- example: 123
- responses:
- '200':
- description: Clusters retrieved successfully
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ClustersListResponse'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- operationId: create_cluster
- x-scalar-ignore: true
- security:
- - bearerAuth:
- - admin
- tags:
- - Clusters
- summary: Create a cluster
- description: Provisions a cluster from a name, region, and cloud account. Porter selects the cloud provider, Kubernetes version, and node groups.
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- format: int64
- minimum: 1
- example: 123
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CreateClusterRequestBody'
- responses:
- '201':
- description: Cluster created and provisioning started
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CreateClusterResult'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/clusters/{cluster_id}:
- parameters:
- - name: project_id
- in: path
- description: Project ID that the cluster belongs to
- required: true
- schema:
- type: integer
- - name: cluster_id
- in: path
- description: Cluster ID
- required: true
- schema:
- type: integer
- patch:
- x-scalar-ignore: true
- summary: Partially update cluster configuration
- description: Partially updates the cluster contract.
- operationId: patch_cluster
- tags:
- - Clusters
- security:
- - bearerAuth:
- - admin
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/PatchClusterRequestBody'
- responses:
- '200':
- description: Cluster configuration partially updated successfully
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- delete:
- x-scalar-ignore: true
- summary: Delete a cluster
- description: |
- Initiates cluster deletion. The cluster must have no applications still
- running on it; otherwise the request is rejected with the blocking
- resources. On success Porter begins tearing the cluster down
- asynchronously and it moves to the deleting state.
- operationId: delete_cluster
- tags:
- - Clusters
- security:
- - bearerAuth:
- - admin
- responses:
- '202':
- description: |
- Teardown accepted. Also returned when teardown was already underway.
- '409':
- description: |
- The cluster still has active resources running on it and cannot be
- deleted until they are removed.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ClusterDependents'
- default:
- description: |
- Error. 404 if the cluster does not exist in the project, 500 otherwise.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/clouds/preflight:
- get:
- operationId: preflight_check_cloud_account
- x-scalar-ignore: true
- security:
- - bearerAuth:
- - viewer
- tags:
- - Cloud Accounts
- summary: Check if Porter is authorized to access a cloud account
- description: |
- Validates cloud credentials without registering the account. Returns whether Porter can successfully assume the necessary roles.
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- minimum: 1
- example: 123
- - name: cloud_provider
- in: query
- description: Cloud provider kind
- required: true
- schema:
- $ref: '#/components/schemas/CloudProvider'
- example: aws
- - name: account_id
- in: query
- description: Cloud provider account id (AWS account ID, GCP project ID, or Azure subscription ID)
- required: true
- schema:
- type: string
- example: '123456789012'
- responses:
- '200':
- description: Preflight check completed
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/PreflightCheckResponse'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/cloud-accounts:
- get:
- operationId: list_project_cloud_accounts
- x-scalar-ignore: true
- security:
- - bearerAuth:
- - viewer
- tags:
- - Cloud Accounts
- summary: List cloud accounts for a project
- description: Retrieves cloud account summaries for a project.
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- format: int64
- minimum: 1
- example: 123
- responses:
- '200':
- description: Cloud accounts retrieved successfully
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CloudAccountsListResponse'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/cloud-accounts/{cloud_account_id}/regions:
- get:
- operationId: list_cloud_account_regions
- x-scalar-ignore: true
- security:
- - bearerAuth:
- - viewer
- tags:
- - Cloud Accounts
- summary: List supported regions for a cloud account
- description: Regions a cluster can be provisioned into with this cloud account.
- parameters:
- - name: project_id
- in: path
- description: Project ID that the cloud account belongs to
- required: true
- schema:
- type: integer
- format: int64
- minimum: 1
- example: 123
- - name: cloud_account_id
- in: path
- description: Cloud account ID to list regions for
- required: true
- schema:
- type: string
- format: uuid
- example: 123e4567-e89b-12d3-a456-426614174000
- responses:
- '200':
- description: Regions retrieved successfully
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CloudAccountRegionsListResponse'
- default:
- description: |
- Error. 400 if the project or cloud account ID is invalid, 404 if the
- cloud account does not exist, 500 otherwise.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/clouds:
- post:
- operationId: create_cloud_account
- x-scalar-ignore: true
- security:
- - bearerAuth:
- - developer
- tags:
- - Cloud Accounts
- summary: Create a cloud account
- description: |
- Registers a cloud account with Porter. This will fail if the account has not been configured properly to support connection.
- parameters:
- - name: project_id
- in: path
- description: Project ID to create the cloud account for
- required: true
- schema:
- type: integer
- minimum: 1
- example: 123
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CreateCloudAccountRequest'
- responses:
- '200':
- description: Cloud account created successfully
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CreateCloudAccountResponseBody'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/clouds/{cloud_account_id}:
- get:
- operationId: get_cloud_account
- x-scalar-ignore: true
- security:
- - bearerAuth:
- - viewer
- tags:
- - Cloud Accounts
- summary: Get cloud account with IAM resource status
- description: |
- Retrieves a specific cloud account.
- parameters:
- - name: project_id
- in: path
- description: Project ID that the cloud account belongs to
- required: true
- schema:
- type: integer
- format: int64
- minimum: 1
- example: 123
- - name: cloud_account_id
- in: path
- description: Cloud account ID to retrieve
- required: true
- schema:
- type: string
- format: uuid
- example: 123e4567-e89b-12d3-a456-426614174000
- responses:
- '200':
- description: Cloud account retrieved successfully
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CloudAccountWithStatus'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- operationId: update_cloud_account
- x-scalar-ignore: true
- security:
- - bearerAuth:
- - developer
- tags:
- - Cloud Accounts
- summary: Update cloud account
- description: |
- Re-runs the role creation and syncing steps for an existing cloud account.
- parameters:
- - name: project_id
- in: path
- description: Project ID that the cloud account belongs to
- required: true
- schema:
- type: integer
- format: int64
- minimum: 1
- example: 123
- - name: cloud_account_id
- in: path
- description: Cloud account ID to reconnect
- required: true
- schema:
- type: string
- format: uuid
- example: 123e4567-e89b-12d3-a456-426614174000
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UpdateCloudAccountRequest'
- responses:
- '200':
- description: Update initiated successfully
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UpdateCloudAccountResponseBody'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/clouds/{cloud_account_id}/dependents:
- get:
- operationId: list_cloud_account_dependents
- x-scalar-ignore: true
- security:
- - bearerAuth:
- - viewer
- tags:
- - Cloud Accounts
- summary: List active resources referencing a cloud account
- description: |
- Returns the active clusters, object storage buckets, and environment
- groups that still reference the cloud account. Empty arrays mean the
- account has no dependents.
- parameters:
- - name: project_id
- in: path
- description: Project ID that the cloud account belongs to
- required: true
- schema:
- type: integer
- format: int64
- minimum: 1
- example: 123
- - name: cloud_account_id
- in: path
- description: Cloud account ID to check for dependents
- required: true
- schema:
- type: string
- format: uuid
- example: 123e4567-e89b-12d3-a456-426614174000
- responses:
- '200':
- description: Dependents retrieved successfully
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CloudAccountBlockedBy'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/clouds/{cloud_account_id}/rename:
- patch:
- operationId: rename_cloud_account
- summary: Rename cloud account
- description: Updates the vanity name of an existing cloud account
- x-scalar-ignore: true
- security:
- - bearerAuth:
- - developer
- tags:
- - Cloud Accounts
- parameters:
- - name: project_id
- in: path
- description: Project ID that the cloud account belongs to
- required: true
- schema:
- type: integer
- example: 123
- - name: cloud_account_id
- in: path
- description: Cloud account ID to rename
- required: true
- schema:
- type: string
- format: uuid
- x-go-type: uuid.UUID
- example: 123e4567-e89b-12d3-a456-426614174000
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- required:
- - name
- properties:
- name:
- type: string
- description: New display name for the cloud account
- example: my-aws-account
- minLength: 1
- maxLength: 63
- responses:
- '200':
- description: Cloud account renamed successfully
- content:
- application/json:
- schema:
- type: object
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/clouds/{cloud_account_id}/validate/quota:
- post:
- x-scalar-ignore: true
- summary: Validate AWS quota for cluster creation
- description: Checks if the AWS account has sufficient quota to deploy a new cluster based on the provided cluster contract
- operationId: validate_quota
- tags:
- - Clusters
- security:
- - bearerAuth:
- - developer
- parameters:
- - name: project_id
- in: path
- required: true
- schema:
- type: integer
- description: Project ID
- - name: cloud_account_id
- in: path
- description: Cloud account ID to retrieve
- required: true
- schema:
- type: string
- format: uuid
- example: 123e4567-e89b-12d3-a456-426614174000
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ClusterContract'
- responses:
- '200':
- description: Quota validation result
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ValidateQuotaResponseBody'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/clouds/{cloud_account_id}/quota-requests:
- get:
- x-scalar-ignore: true
- summary: List quota increase requests
- description: Lists pending and denied quota increase requests for a specific AWS cloud account in the specified region
- operationId: list_quota_requests
- security:
- - bearerAuth:
- - developer
- parameters:
- - name: project_id
- in: path
- required: true
- schema:
- type: integer
- description: Project ID
- - name: cloud_account_id
- in: path
- description: Cloud account ID
- required: true
- schema:
- type: string
- format: uuid
- x-go-type: uuid.UUID
- example: 123e4567-e89b-12d3-a456-426614174000
- - name: region
- in: query
- required: true
- schema:
- type: string
- description: AWS region to check quota requests in
- responses:
- '200':
- description: Quota requests list
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ListQuotaRequestsResponseBody'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/clouds/{cloud_account_id}/account-plan-state:
- get:
- x-scalar-ignore: true
- summary: Get cloud account plan state
- description: Gets the plan state for a given cloud account connected to Porter. This is useful for determining appropriate cluster configurations based on the account's plan. Note that this is currently implemented only for AWS.
- operationId: get_cloud_account_plan_state
- tags:
- - Cloud Accounts
- security:
- - bearerAuth:
- - viewer
- parameters:
- - name: project_id
- in: path
- required: true
- schema:
- type: integer
- description: Project ID
- - name: cloud_account_id
- in: path
- required: true
- schema:
- type: string
- format: uuid
- description: Cloud account ID
- example: 123e4567-e89b-12d3-a456-426614174000
- responses:
- '200':
- description: Cloud account plan state retrieved successfully
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/GetCloudAccountPlanStateResponseBody'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/clouds/validate/cidr:
- get:
- x-scalar-ignore: true
- summary: Validate CIDR ranges for cluster creation
- description: Checks if the provided VPC and service CIDR ranges are available and do not conflict with existing resources in the specified region. Returns suggestions if conflicts are detected.
- operationId: validate_cidr
- tags:
- - Clusters
- security:
- - bearerAuth:
- - developer
- parameters:
- - name: project_id
- in: path
- required: true
- schema:
- type: integer
- description: Project ID
- - name: vpc_cidr
- in: query
- required: true
- schema:
- type: string
- description: VPC CIDR range to validate (e.g., 10.78.0.0/16)
- - name: service_cidr
- in: query
- required: true
- schema:
- type: string
- description: Service CIDR range to validate (e.g., 172.20.0.0/16)
- responses:
- '200':
- description: CIDR validation result
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ValidateCidrResponseBody'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/clouds/azure/wif-setup-command:
- get:
- operationId: get_azure_wif_setup_command
- x-scalar-ignore: true
- security:
- - bearerAuth:
- - developer
- tags:
- - Cloud Accounts
- summary: Get Azure WIF setup script command
- description: Returns the shell command to run the Azure WIF setup script, pre-filled for this environment.
- parameters:
- - name: project_id
- in: path
- required: true
- schema:
- type: integer
- format: int64
- minimum: 1
- example: 123
- responses:
- '200':
- description: Setup command retrieved
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/GetAzureWifSetupCommandResponseBody'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/clouds/azure:
- post:
- operationId: connect_azure_cloud_account
- x-scalar-ignore: true
- security:
- - bearerAuth:
- - developer
- tags:
- - Cloud Accounts
- summary: Connect an Azure cloud account to your project
- description: |
- Connects an Azure cloud account to your project. Validates your Azure App
- Registration configuration and sets up the necessary trust relationship to
- enable secure, secretless authentication.
- parameters:
- - name: project_id
- in: path
- required: true
- schema:
- type: integer
- format: int64
- minimum: 1
- example: 123
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ConnectAzureCloudAccountRequest'
- responses:
- '200':
- description: Azure cloud account created successfully
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ConnectAzureCloudAccountResponseBody'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/clouds/gcp:
- post:
- operationId: create_gcp_cloud_account
- x-scalar-ignore: true
- security:
- - bearerAuth:
- - developer
- tags:
- - Cloud Accounts
- summary: Initiate GCP cloud account onboarding via Workload Identity Federation
- description: |
- Creates a new GCP cloud account in the initiated state and returns a
- Cloud Shell deeplink + one-line setup command the customer pastes
- into Cloud Shell. The setup command runs `bootstrap.sh` from the
- public porter-dev/gcp-onboarding repo, which calls back to Porter
- with the Terraform outputs to complete onboarding.
-
- Re-calling for a GCP project that already has an in-progress
- onboarding rotates the verification token while keeping the
- Terraform state path stable. Re-calling for a project that is
- already bootstrapped or onboarded via service-account JSON returns
- 409.
- parameters:
- - name: project_id
- in: path
- required: true
- schema:
- type: integer
- format: int64
- minimum: 1
- example: 123
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CreateGcpCloudAccountRequest'
- responses:
- '200':
- description: Onboarding initiated
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CreateGcpCloudAccountResponseBody'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/cloud-accounts/{cloud_account_id}:
- delete:
- operationId: delete_cloud_account
- x-scalar-ignore: true
- security:
- - bearerAuth:
- - admin
- tags:
- - Cloud Accounts
- summary: Delete a cloud account
- description: |
- Disconnects a cloud account from the project and revokes Porter's access
- to it. The account must have no clusters, datastores, or environment
- groups still referencing it.
- parameters:
- - name: project_id
- in: path
- description: Project ID that the cloud account belongs to
- required: true
- schema:
- type: integer
- format: int64
- minimum: 1
- example: 123
- - name: cloud_account_id
- in: path
- description: Cloud account ID to delete
- required: true
- schema:
- type: string
- format: uuid
- example: 123e4567-e89b-12d3-a456-426614174000
- responses:
- '204':
- description: Cloud account deleted
- '409':
- description: |
- The cloud account still has active resources referencing it and
- cannot be disconnected until they are removed.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CloudAccountDependents'
- default:
- description: |
- Error. 400 if the provider is not supported, 404 if it does not exist,
- 500 otherwise.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/cloud-accounts/aws:
- post:
- operationId: create_aws_cloud_account
- x-scalar-ignore: true
- security:
- - bearerAuth:
- - developer
- tags:
- - Cloud Accounts
- summary: Create an AWS cloud account
- description: |
- Verifies Porter can assume the customer's role (proof the CloudFormation
- stack was applied) and creates the cloud account. Returns 409 while the
- stack has not been applied yet, so the caller can retry.
- parameters:
- - name: project_id
- in: path
- description: Project ID to create the cloud account for
- required: true
- schema:
- type: integer
- minimum: 1
- example: 123
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CreateAwsCloudAccountRequest'
- responses:
- '200':
- description: AWS cloud account created successfully
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CreateAwsCloudAccountResponseBody'
- '409':
- description: |
- The CloudFormation stack has not been applied yet, so Porter cannot
- assume the customer's role. Retry once the stack is created.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/cloud-accounts/aws/cloudformation:
- post:
- operationId: create_aws_cloudformation
- x-scalar-ignore: true
- security:
- - bearerAuth:
- - developer
- tags:
- - Cloud Accounts
- summary: Get the CloudFormation URL for an AWS account
- description: |
- Returns the AWS console URL the customer applies to grant Porter access.
- Idempotent per account: repeated calls return the same URL.
- parameters:
- - name: project_id
- in: path
- description: Project ID to prepare the cloud account for
- required: true
- schema:
- type: integer
- minimum: 1
- example: 123
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CreateAwsCloudAccountRequest'
- responses:
- '200':
- description: CloudFormation URL returned successfully
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/AwsCloudFormationResponseBody'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/clouds/{cloud_account_id}/gcp-wif-status:
- get:
- operationId: get_gcp_wif_status
- x-scalar-ignore: true
- security:
- - bearerAuth:
- - developer
- tags:
- - Cloud Accounts
- summary: Get the Workload Identity Federation connection status for a GCP cloud account
- description: |
- Returns the current state of the GCP cloud account's Workload
- Identity Federation setup, composed from the wif row (while
- initiating) and the cloud_account row (after the bootstrap
- callback cutover). Read-only; the connect and migrate dialogs
- both poll this on ~2s intervals while open.
-
- `state` is one of:
- - `none` — no wif row; either an SA-JSON account or a fresh
- flow that hasn't started initiation yet.
- - `initiated` — wif row exists; awaiting bootstrap.sh callback.
- - `syncing` — cutover happened; SyncIam in progress.
- - `connected` — fully provisioned, cloud_account.status = connected.
- parameters:
- - name: project_id
- in: path
- required: true
- schema:
- type: integer
- format: int64
- minimum: 1
- example: 123
- - name: cloud_account_id
- in: path
- required: true
- schema:
- type: string
- format: uuid
- example: 4741dca9-ae17-417b-949e-1a18f91b77d9
- responses:
- '200':
- description: Current WIF connection state
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/GcpWifStatusResponseBody'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/clouds/{cloud_account_id}/migrate-to-wif:
- post:
- operationId: migrate_gcp_cloud_account_to_wif
- x-scalar-ignore: true
- security:
- - bearerAuth:
- - developer
- tags:
- - Cloud Accounts
- summary: Migrate an existing GCP cloud account from service-account JSON to Workload Identity Federation
- description: |
- Attaches a fresh Workload Identity Federation row to an existing
- GCP cloud account that is currently authenticated via service-account
- JSON. The response shape is identical to `create_gcp_cloud_account`:
- a Cloud Shell deeplink + setup command the customer pastes into
- Cloud Shell to drive the Terraform-based bootstrap.
-
- The customer's existing service-account JSON credential is preserved
- on the row throughout migration; their clusters keep working via
- the old path until the WIF bootstrap callback succeeds and Porter
- cuts over to the federated identity.
-
- Gated by the `gcp_wif_enabled` feature flag. Rejects when the
- target row is not GCP, already has a WIF integration, or has no
- service-account JSON credential to migrate from.
- parameters:
- - name: project_id
- in: path
- required: true
- schema:
- type: integer
- format: int64
- minimum: 1
- example: 123
- - name: cloud_account_id
- in: path
- required: true
- schema:
- type: string
- format: uuid
- example: 4741dca9-ae17-417b-949e-1a18f91b77d9
- responses:
- '200':
- description: Migration initiated
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CreateGcpCloudAccountResponseBody'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/clouds/{cloud_account_id}/migrate-to-fic:
- post:
- operationId: migrate_azure_cloud_account_to_fic
- x-scalar-ignore: true
- security:
- - bearerAuth:
- - developer
- tags:
- - Cloud Accounts
- summary: Migrate an existing Azure cloud account from a client secret to federated identity credentials
- description: |
- Kicks off the asynchronous migration of an Azure cloud account from a
- long-lived client secret to federated identity credentials.
- parameters:
- - name: project_id
- in: path
- required: true
- schema:
- type: integer
- format: int64
- minimum: 1
- example: 123
- - name: cloud_account_id
- in: path
- required: true
- schema:
- type: string
- format: uuid
- example: 4741dca9-ae17-417b-949e-1a18f91b77d9
- responses:
- '202':
- description: Migration enqueued
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/clouds/{cloud_account_id}/azure-fic-migration-status:
- get:
- operationId: get_azure_FIC_migration_status
- x-scalar-ignore: true
- security:
- - bearerAuth:
- - developer
- tags:
- - Cloud Accounts
- summary: Get the FIC migration status for an Azure cloud account
- description: |
- Read-only state of an Azure cloud account's federated identity
- credentials migration.
- parameters:
- - name: project_id
- in: path
- required: true
- schema:
- type: integer
- format: int64
- minimum: 1
- example: 123
- - name: cloud_account_id
- in: path
- required: true
- schema:
- type: string
- format: uuid
- example: 4741dca9-ae17-417b-949e-1a18f91b77d9
- responses:
- '200':
- description: Current migration state
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/AzureFICMigrationStatusResponseBody'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/clouds/{cloud_account_id}/dismiss-azure-secret-warning:
- post:
- operationId: dismiss_azure_secret_warning
- x-scalar-ignore: true
- security:
- - bearerAuth:
- - developer
- tags:
- - Cloud Accounts
- summary: Dismiss the post-migration Azure secret warning
- description: |
- Records that the customer dismissed the banner warning that their
- Azure-side client secret still exists after migrating to federated
- identity credentials.
- parameters:
- - name: project_id
- in: path
- required: true
- schema:
- type: integer
- format: int64
- minimum: 1
- example: 123
- - name: cloud_account_id
- in: path
- required: true
- schema:
- type: string
- format: uuid
- example: 4741dca9-ae17-417b-949e-1a18f91b77d9
- responses:
- '204':
- description: Warning dismissed
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/clouds/gcp/{cloud_account_id}/details:
- post:
- operationId: get_gcp_cloud_account_details
- x-scalar-ignore: true
- tags:
- - Cloud Accounts
- summary: Fetch per-tenant onboarding config for a GCP WIF integration
- description: |
- Read-only endpoint the customer's Cloud Shell session calls at the
- start of `bootstrap.sh` to fetch the per-tenant configuration the
- Terraform module needs (GCP project ID, tenant external ID,
- Porter AWS account / role).
-
- Authenticated by the per-integration verification_token in the
- request body, not by a Porter user session — the Cloud Shell
- session has no Porter identity. The token is NOT consumed by this
- endpoint; multiple calls before bootstrap completes are idempotent.
- parameters:
- - name: cloud_account_id
- in: path
- required: true
- schema:
- type: string
- format: uuid
- example: 123e4567-e89b-12d3-a456-426614174000
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/GetGcpCloudAccountDetailsRequest'
- responses:
- '200':
- description: Details retrieved
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/GetGcpCloudAccountDetailsResponseBody'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/clouds/gcp/{cloud_account_id}/bootstrap:
- post:
- operationId: bootstrap_gcp_cloud_account
- x-scalar-ignore: true
- tags:
- - Cloud Accounts
- summary: Complete GCP Workload Identity Federation onboarding
- description: |
- Called by the customer's Cloud Shell session at the end of
- `bootstrap.sh` after the Terraform apply succeeds. Carries the
- Terraform outputs (project number, service-account email, workload
- identity provider name) so Porter can resolve the federated
- credentials.
-
- Authenticated by the per-integration verification_token in the
- request body. The token is consumed on success — subsequent calls
- return 409.
- parameters:
- - name: cloud_account_id
- in: path
- required: true
- schema:
- type: string
- format: uuid
- example: 123e4567-e89b-12d3-a456-426614174000
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/BootstrapGcpCloudAccountRequest'
- responses:
- '204':
- description: Onboarding bootstrap accepted
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/clusters/{cluster_id}/status:
- get:
- x-scalar-ignore: true
- summary: Get cluster resource status
- description: Returns provisioning status for the cluster's underlying cloud resources and system components.
- operationId: get_cluster_status
- tags:
- - Clusters
- security:
- - bearerAuth:
- - viewer
- parameters:
- - name: project_id
- in: path
- required: true
- schema:
- type: integer
- description: Project ID
- - name: cluster_id
- in: path
- required: true
- schema:
- type: integer
- description: Cluster ID
- responses:
- '200':
- description: Cluster resource statuses
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ClusterResourceStatus'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/clusters/{cluster_id}/metadata:
- parameters:
- - name: project_id
- in: path
- description: Project ID that the cluster belongs to
- required: true
- schema:
- type: integer
- - name: cluster_id
- in: path
- description: Cluster ID to get metadata for
- required: true
- schema:
- type: integer
- get:
- summary: Get cluster metadata
- description: |
- Returns cluster metadata (e.g. cluster-scoped feature flags). Structure is extensible.
- operationId: get_cluster_metadata
- x-scalar-ignore: true
- security:
- - bearerAuth:
- - developer
- responses:
- '200':
- description: Cluster metadata
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ClusterMetadata'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/clusters/{cluster_id}/kubeconfig:
- parameters:
- - name: project_id
- in: path
- description: Project ID that the cluster belongs to
- required: true
- schema:
- type: integer
- - name: cluster_id
- in: path
- description: Cluster ID to get kubeconfig for
- required: true
- schema:
- type: integer
- - name: command
- in: query
- description: Command ran on the cluster. This is purely informational
- required: false
- schema:
- type: string
- get:
- summary: Gets the kubeconfig for a cluster identified by cluster_id
- description: |
- Returns a kubeconfig for the specified cluster. This endpoint does not support clusters in legacy projects.
- operationId: kube_config
- x-scalar-ignore: true
- security:
- - bearerAuth:
- - developer
- responses:
- '200':
- description: Kubeconfig
- content:
- application/json:
- schema:
- type: object
- required:
- - kubeconfig
- properties:
- kubeconfig:
- type: string
- description: Returns a kubeconfig that can be used to connect to the cluster.
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/migrations:
- parameters:
- - name: project_id
- in: path
- description: project id to filter by
- required: true
- schema:
- type: integer
- get:
- x-scalar-ignore: true
- summary: List migrations
- tags:
- - experimental
- description: Returns a list of all migrations and their current status.
- operationId: list_migrations
- security:
- - bearerAuth:
- - developer
- responses:
- '200':
- description: List of migrations retrieved successfully
- content:
- application/json:
- schema:
- type: object
- required:
- - migrations
- properties:
- migrations:
- type: array
- items:
- $ref: '#/components/schemas/Migration'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- x-scalar-ignore: true
- summary: Apply migration
- tags:
- - experimental
- description: Applies a new migration as specified by the provided migration plan. Returns a migration ID for tracking progress.
- operationId: apply_migration
- security:
- - bearerAuth:
- - developer
- requestBody:
- description: Migration plan details
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/MigrationPlan'
- responses:
- '200':
- description: Migration job created successfully
- content:
- application/json:
- schema:
- type: object
- required:
- - migration_id
- properties:
- migration_id:
- type: string
- description: Unique identifier of the created migration
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/apps:
- parameters:
- - name: project_id
- in: path
- description: Project ID to filter apps by
- required: true
- schema:
- type: integer
- - name: cluster_id
- in: query
- description: Optional cluster ID to filter apps by
- required: false
- schema:
- type: integer
- get:
- x-scalar-ignore: true
- summary: List applications
- description: Returns all applications in the project that the user has access to, optionally filtered by cluster
- operationId: list_apps
- security:
- - bearerAuth:
- - viewer
- responses:
- '200':
- description: List of applications
- content:
- application/json:
- schema:
- type: object
- required:
- - apps
- properties:
- apps:
- type: array
- items:
- $ref: '#/components/schemas/App'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/applications:
- get:
- parameters:
- - name: project_id
- in: path
- description: Project ID to filter applications by
- required: true
- schema:
- type: integer
- - name: deployment_target_id
- in: query
- description: Deployment target ID to filter applications by
- required: false
- schema:
- type: string
- example: 123e4567-e89b-12d3-a456-426614174000
- - name: name
- in: query
- description: Optional filter for application name, will attempt to match any part of the name (case insensitive)
- required: false
- schema:
- type: string
- example: my-app
- - name: created_before
- in: query
- description: Optional filter for application creation time, will return applications created before this time, defaults to now
- required: false
- schema:
- type: string
- format: date-time
- example: '2025-01-01T00:00:00Z'
- - name: limit
- in: query
- description: Optional limit for number of applications to return, defaults to 10, max is 100
- required: false
- schema:
- type: integer
- example: 15
- x-scalar-stability: experimental
- tags:
- - Applications
- summary: List applications
- description: Returns all applications in the project that the user has access to, with optional filters
- operationId: list_applications
- security:
- - bearerAuth:
- - viewer
- responses:
- '200':
- description: List of applications
- content:
- application/json:
- schema:
- type: object
- required:
- - applications
- properties:
- applications:
- type: array
- items:
- $ref: '#/components/schemas/ListApplicationsItem'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- parameters:
- - name: project_id
- in: path
- description: Project ID to create an application in
- required: true
- schema:
- type: integer
- format: int64
- summary: Create application
- description: Creates a new application in the project
- operationId: create_application
- security:
- - bearerAuth:
- - developer
- x-scalar-stability: experimental
- tags:
- - Applications
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CreateApplicationRequestBody'
- responses:
- '200':
- description: Application created
- content:
- application/json:
- schema:
- type: object
- required:
- - id
- properties:
- id:
- type: string
- format: uuid
- example: 123e4567-e89b-12d3-a456-426614174000
- description: Unique identifier of the created application
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/applications/{application_id}:
- get:
- parameters:
- - name: project_id
- in: path
- description: Project ID that the app belongs to
- required: true
- schema:
- type: integer
- - name: application_id
- in: path
- description: ID of the application
- required: true
- schema:
- type: string
- format: uuid
- summary: Get application
- description: Returns an application by its ID
- operationId: get_application
- security:
- - bearerAuth:
- - viewer
- x-scalar-stability: experimental
- tags:
- - Applications
- responses:
- '200':
- description: Application retrieved successfully
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/GetApplicationResponseBody'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- parameters:
- - name: project_id
- in: path
- description: Project ID that the app belongs to
- required: true
- schema:
- type: integer
- format: int64
- - name: application_id
- in: path
- description: ID of the application to update
- required: true
- schema:
- type: string
- format: uuid
- summary: Update application
- description: Updates an existing application
- operationId: update_application
- security:
- - bearerAuth:
- - developer
- x-scalar-stability: experimental
- tags:
- - Applications
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UpdateApplicationRequestBody'
- responses:
- '200':
- description: Application updated successfully
- content:
- application/json:
- schema:
- type: object
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- delete:
- parameters:
- - name: project_id
- in: path
- description: Project ID that the app belongs to
- required: true
- schema:
- type: integer
- example: 123
- - name: application_id
- in: path
- description: ID of the application
- required: true
- schema:
- type: string
- format: uuid
- example: 123e4567-e89b-12d3-a456-426614174000
- summary: Delete application
- description: Deletes an existing application
- operationId: delete_application
- security:
- - bearerAuth:
- - developer
- x-scalar-stability: experimental
- tags:
- - Applications
- responses:
- '200':
- description: Application successfully deleted
- content:
- application/json:
- schema:
- type: object
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- patch:
- parameters:
- - name: project_id
- in: path
- description: Project ID that the app belongs to
- required: true
- schema:
- type: integer
- format: int64
- - name: application_id
- in: path
- description: ID of the application to patch
- required: true
- schema:
- type: string
- format: uuid
- x-go-type: uuid.UUID
- - name: dry_run
- in: query
- description: When true, validates the patch request without applying changes. Useful for testing configuration changes before committing them.
- required: false
- schema:
- type: boolean
- summary: Patch application
- description: Partially updates an existing application's configuration. Only fields provided in the request body will be updated.
- operationId: patch_application
- security:
- - bearerAuth:
- - developer
- x-scalar-stability: experimental
- tags:
- - Applications
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/PatchApplicationRequestBody'
- responses:
- '200':
- description: Application patched successfully
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/GetApplicationResponseBody'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/applications/proto:
- post:
- parameters:
- - name: project_id
- in: path
- description: Project ID that the app belongs to
- required: true
- schema:
- type: integer
- x-scalar-ignore: true
- summary: Convert application to proto
- description: Converts the provided application to a base64-encoded PorterApp proto
- operationId: convert_application_to_proto
- security:
- - bearerAuth:
- - viewer
- x-scalar-stability: experimental
- tags:
- - Applications
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/GetApplicationResponseBody'
- responses:
- '200':
- description: Application proto generated successfully
- content:
- application/json:
- schema:
- type: object
- required:
- - b64_app_proto
- properties:
- b64_app_proto:
- type: string
- description: Base64-encoded PorterApp proto
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/applications/{application_id}/build-settings:
- get:
- parameters:
- - name: project_id
- in: path
- description: Project ID that the application belongs to
- required: true
- schema:
- type: integer
- format: int64
- example: 123
- - name: application_id
- in: path
- description: ID of the application
- required: true
- schema:
- type: string
- format: uuid
- x-go-type: uuid.UUID
- example: 123e4567-e89b-12d3-a456-426614174000
- - name: environment_groups
- in: query
- description: Environment groups the build should see, repeatable. Each must exist on the application's cluster. A key set by more than one group has no guaranteed winner, as at deploy time.
- required: false
- schema:
- type: array
- items:
- type: string
- style: form
- explode: true
- example:
- - shared-config
- summary: Get application build settings
- description: Returns the push repository, non-secret build environment variables, and build template eligibility for an application
- operationId: get_application_build_settings
- security:
- - bearerAuth:
- - developer
- x-scalar-ignore: true
- x-scalar-stability: experimental
- tags:
- - Applications
- responses:
- '200':
- description: Build settings retrieved successfully
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/GetApplicationBuildSettingsResponseBody'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/applications/{application_id}/redeploy:
- post:
- parameters:
- - name: project_id
- in: path
- description: Project ID that the application belongs to
- required: true
- schema:
- type: integer
- example: 123
- - name: application_id
- in: path
- description: ID of the application
- required: true
- schema:
- type: string
- format: uuid
- x-go-type: uuid.UUID
- example: 123e4567-e89b-12d3-a456-426614174000
- summary: Redeploy application
- description: Redeploys all the services of an existing application with no changes to configuration
- operationId: redeploy_application
- security:
- - bearerAuth:
- - developer
- x-scalar-stability: experimental
- tags:
- - Applications
- responses:
- '200':
- description: Application redeployed successfully
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/applications/{application_id}/rename:
- patch:
- parameters:
- - name: project_id
- in: path
- description: Project ID that the application belongs to
- required: true
- schema:
- type: integer
- example: 123
- - name: application_id
- in: path
- description: ID of the application to rename
- required: true
- schema:
- type: string
- format: uuid
- x-go-type: uuid.UUID
- example: 123e4567-e89b-12d3-a456-426614174000
- summary: Rename application
- description: Updates the display name of an existing application
- operationId: rename_application
- x-scalar-ignore: true
- security:
- - bearerAuth:
- - developer
- x-scalar-stability: experimental
- tags:
- - Applications
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- required:
- - name
- properties:
- name:
- type: string
- description: New display name for the application
- example: my-renamed-app
- minLength: 1
- maxLength: 31
- responses:
- '200':
- description: Application renamed successfully
- content:
- application/json:
- schema:
- type: object
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/applications/{application_id}/set-node-group:
- post:
- parameters:
- - name: project_id
- in: path
- description: Project ID that the application belongs to
- required: true
- schema:
- type: integer
- format: int64
- example: 123
- - name: application_id
- in: path
- description: ID of the application
- required: true
- schema:
- type: string
- format: uuid
- x-go-type: uuid.UUID
- example: 123e4567-e89b-12d3-a456-426614174000
- summary: Set node group for application
- description: Sets the node group for all services in the application
- operationId: set_application_node_group
- security:
- - bearerAuth:
- - developer
- x-scalar-stability: experimental
- tags:
- - Applications
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SetNodeGroupRequestBody'
- responses:
- '200':
- description: Node group set successfully
- content:
- application/json:
- schema:
- type: object
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/applications/{application_id}/services/{service_name}:
- patch:
- parameters:
- - name: project_id
- in: path
- description: Project ID that the application belongs to
- required: true
- schema:
- type: integer
- example: 123
- - name: application_id
- in: path
- description: ID of the application
- required: true
- schema:
- type: string
- format: uuid
- x-go-type: uuid.UUID
- example: 123e4567-e89b-12d3-a456-426614174000
- - name: service_name
- in: path
- description: Name of the service to patch
- required: true
- schema:
- type: string
- example: web-service
- summary: Patch application service
- description: |
- Updates specific fields of an application service
-
- The following fields are supported for the following service types:
- - web: instances, autoscaling
- - worker: instances, autoscaling
-
- Note:
- - If enabling autoscaling on a service where it was previously disabled, you must provide a type.
- - If enabling custom autoscaling, you must provide a metric name, query, and threshold.
- operationId: patch_application_services
- security:
- - bearerAuth:
- - developer
- x-scalar-stability: experimental
- tags:
- - Applications
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/PatchApplicationServiceRequestBody'
- responses:
- '200':
- description: Service patched successfully
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/applications/{application_id}/webhooks:
- get:
- parameters:
- - name: project_id
- in: path
- description: Project ID that the application belongs to
- required: true
- schema:
- type: integer
- example: 123
- - name: application_id
- in: path
- description: ID of the application
- required: true
- schema:
- type: string
- format: uuid
- x-go-type: uuid.UUID
- example: 123e4567-e89b-12d3-a456-426614174000
- x-scalar-ignore: true
- summary: Get application webhooks
- description: Returns all webhooks configured for the application that are triggered on deployment events
- operationId: get_application_webhooks
- security:
- - bearerAuth:
- - viewer
- tags:
- - Applications
- responses:
- '200':
- description: Webhooks retrieved successfully
- content:
- application/json:
- schema:
- type: object
- required:
- - webhooks
- properties:
- webhooks:
- type: array
- description: List of webhooks configured for the application
- items:
- $ref: '#/components/schemas/ApplicationWebhook'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- put:
- parameters:
- - name: project_id
- in: path
- description: Project ID that the application belongs to
- required: true
- schema:
- type: integer
- example: 123
- - name: application_id
- in: path
- description: ID of the application
- required: true
- schema:
- type: string
- format: uuid
- x-go-type: uuid.UUID
- example: 123e4567-e89b-12d3-a456-426614174000
- summary: Update application webhooks
- description: Updates the webhooks configured for the application. Replaces all existing webhooks with the provided list. To remove all webhooks, send an empty array.
- operationId: update_application_webhooks
- security:
- - bearerAuth:
- - developer
- x-scalar-ignore: true
- tags:
- - Applications
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UpdateApplicationWebhooksRequestBody'
- responses:
- '200':
- description: Webhooks updated successfully
- content:
- application/json:
- schema:
- type: object
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/applications/{application_id}/services/{service_name}/scale:
- post:
- parameters:
- - name: project_id
- in: path
- description: Project ID that the application belongs to
- required: true
- schema:
- type: integer
- example: 123
- - name: application_id
- in: path
- description: ID of the application
- required: true
- schema:
- type: string
- format: uuid
- x-go-type: uuid.UUID
- example: 123e4567-e89b-12d3-a456-426614174000
- - name: service_name
- in: path
- description: Name of the service to scale
- required: true
- schema:
- type: string
- example: web-service
- summary: Scale application service
- description: Updates the scaling configuration for a specific service, including replica count and autoscaling settings
- operationId: scale_application_service
- security:
- - bearerAuth:
- - developer
- x-scalar-stability: experimental
- tags:
- - Applications
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ScaleApplicationServiceRequestBody'
- responses:
- '200':
- description: Service scaled successfully
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/applications/{application_id}/change-github-source:
- post:
- parameters:
- - name: project_id
- in: path
- description: Project ID that the application belongs to
- required: true
- schema:
- type: integer
- format: int64
- example: 123
- - name: application_id
- in: path
- description: ID of the application
- required: true
- schema:
- type: string
- format: uuid
- x-go-type: uuid.UUID
- example: 123e4567-e89b-12d3-a456-426614174000
- summary: Change application GitHub source
- description: Changes the repository and/or branch an application deploys from.
- operationId: change_application_GitHub_source
- security:
- - bearerAuth:
- - developer
- x-scalar-stability: experimental
- x-scalar-ignore: true
- tags:
- - Applications
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ChangeApplicationGitHubSourceRequestBody'
- responses:
- '200':
- description: GitHub source changed successfully
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ChangeApplicationGitHubSourceResponseBody'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/applications/github-workflow:
- post:
- x-scalar-ignore: true
- summary: Create GitHub workflow files for applications
- description: Generates GitHub Action workflow YAML files for one or more applications and creates a pull request with GitHub secrets.
- operationId: create_github_workflows_pr
- security:
- - bearerAuth:
- - developer
- tags:
- - Applications
- parameters:
- - name: project_id
- in: path
- required: true
- schema:
- type: integer
- description: Project ID that the applications belong to
- minimum: 0
- example: 123
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- required:
- - application_ids
- properties:
- application_ids:
- type: array
- description: List of Porter application IDs to create workflow files for
- items:
- type: string
- format: uuid
- minItems: 1
- example:
- - 123e4567-e89b-12d3-a456-426614174000
- - 223e4567-e89b-12d3-a456-426614174001
- responses:
- '200':
- description: Workflow PR created successfully
- content:
- application/json:
- schema:
- type: object
- required:
- - github_pr_url
- properties:
- github_pr_url:
- type: string
- description: URL for the pull request containing the workflow files
- example: https://github.com/example/test/pull/123
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/applications/{application_id}/domains:
- get:
- parameters:
- - name: project_id
- in: path
- description: Project ID that the app belongs to
- required: true
- schema:
- type: integer
- - name: application_id
- in: path
- description: ID of the application
- required: true
- schema:
- type: string
- format: uuid
- x-go-type: uuid.UUID
- x-scalar-ignore: true
- x-scalar-stability: experimental
- tags:
- - Applications
- summary: List application domains with TLS status
- description: Returns TLS readiness for each domain on the application.
- operationId: list_application_domains
- security:
- - bearerAuth:
- - viewer
- responses:
- '200':
- description: Application domains retrieved successfully
- content:
- application/json:
- schema:
- type: object
- required:
- - domains
- properties:
- domains:
- type: array
- items:
- $ref: '#/components/schemas/DomainStatus'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/applications/{application_id}/domains/{domain}/retry-tls:
- post:
- parameters:
- - name: project_id
- in: path
- description: Project ID that the app belongs to
- required: true
- schema:
- type: integer
- - name: application_id
- in: path
- description: ID of the application
- required: true
- schema:
- type: string
- format: uuid
- x-go-type: uuid.UUID
- - name: domain
- in: path
- description: URL-encoded domain name on the application's latest revision
- required: true
- schema:
- type: string
- x-scalar-ignore: true
- x-scalar-stability: experimental
- tags:
- - Applications
- summary: Force cert-manager to retry TLS issuance for a domain
- description: Deletes the latest failing cert-manager CertificateRequest so a fresh attempt is made immediately, bypassing the exponential backoff.
- operationId: retry_application_domain_tls
- security:
- - bearerAuth:
- - developer
- responses:
- '204':
- description: Retry triggered
- '404':
- description: Domain is not on the application's latest revision or has no Certificate
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- '409':
- description: No failing CertificateRequest to retry
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/applications/{application_id}/secrets:
- get:
- parameters:
- - name: project_id
- in: path
- description: Project ID that the app belongs to
- required: true
- schema:
- type: integer
- - name: application_id
- in: path
- description: ID of the application
- required: true
- schema:
- type: string
- format: uuid
- summary: List application secrets
- description: Returns the environment secrets for an application. This does not include secrets that are set through syncing environment groups to the application.
- operationId: list_application_secrets
- security:
- - bearerAuth:
- - admin
- x-scalar-stability: experimental
- tags:
- - Applications
- responses:
- '200':
- description: Application secrets retrieved successfully
- content:
- application/json:
- schema:
- type: object
- required:
- - secrets
- properties:
- secrets:
- type: array
- description: List of secrets for the application
- items:
- $ref: '#/components/schemas/EnvironmentGroupKeyValue'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/applications/{application_id}/events:
- parameters:
- - name: project_id
- in: path
- description: Project ID that the app belongs to
- required: true
- schema:
- type: integer
- - name: application_id
- in: path
- description: Application ID to pull events for
- required: true
- schema:
- type: string
- - name: type
- in: query
- description: Optional type or list of types to filter events by.
- required: false
- schema:
- type: array
- items:
- $ref: '#/components/schemas/ApplicationEventType'
- - name: dismissed
- in: query
- description: Filter events by dismissed status. Default is none.
- required: false
- schema:
- type: boolean
- - name: status
- in: query
- description: Optional status or list of statuses to filter events by.
- required: false
- schema:
- type: array
- items:
- $ref: '#/components/schemas/ApplicationEventStatus'
- - $ref: '#/components/parameters/pagination'
- get:
- x-scalar-ignore: true
- tags:
- - experimental
- summary: List application events
- description: Returns events for an application
- operationId: list_application_events
- security:
- - bearerAuth:
- - viewer
- responses:
- '200':
- description: List of events
- content:
- application/json:
- schema:
- type: object
- required:
- - pagination
- - events
- properties:
- pagination:
- $ref: '#/components/schemas/PaginationResponse'
- events:
- type: array
- items:
- $ref: '#/components/schemas/ApplicationEvent'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/applications/{application_id}/notifications:
- parameters:
- - name: project_id
- in: path
- description: Project ID that the app belongs to
- required: true
- schema:
- type: integer
- - name: application_id
- in: path
- description: Application ID to pull notifications for
- required: true
- schema:
- type: string
- - $ref: '#/components/parameters/pagination'
- get:
- tags:
- - Applications
- summary: List application notifications
- description: Returns notification events for an application
- operationId: list_application_notifications
- security:
- - bearerAuth:
- - viewer
- responses:
- '200':
- description: List of notifications
- content:
- application/json:
- schema:
- type: object
- required:
- - pagination
- - notifications
- properties:
- pagination:
- $ref: '#/components/schemas/PaginationResponse'
- notifications:
- type: array
- items:
- $ref: '#/components/schemas/Notification'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/applications/{application_id}/events/{event_id}/dismiss:
- parameters:
- - name: project_id
- in: path
- description: Project ID that the app belongs to
- required: true
- schema:
- type: integer
- - name: application_id
- in: path
- description: Application ID to toggle dismissal
- required: true
- schema:
- type: string
- format: uuid
- - name: event_id
- in: path
- description: App Event ID to toggle dismissal
- required: true
- schema:
- type: string
- format: uuid
- post:
- x-scalar-ignore: true
- summary: Toggle whether a notification has been dismissed
- description: Toggle whether a notification has been dismissed
- operationId: dismiss_application_notification
- security:
- - bearerAuth:
- - developer
- responses:
- '200':
- description: Success
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/applications/notifications/counts:
- parameters:
- - name: project_id
- in: path
- description: Project ID to filter applications by
- required: true
- schema:
- type: integer
- - name: deployment_target_id
- in: query
- description: Deployment target ID to filter applications by
- required: true
- schema:
- type: string
- get:
- x-scalar-ignore: true
- tags:
- - experimental
- summary: List notification counts
- description: Returns notification counts for all applications in a project for a given deployment target
- operationId: list_notification_counts
- security:
- - bearerAuth:
- - viewer
- responses:
- '200':
- description: List of notification counts
- content:
- application/json:
- schema:
- type: object
- required:
- - notification_counts
- properties:
- notification_counts:
- type: array
- items:
- $ref: '#/components/schemas/NotificationCount'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/applications/ci-status:
- parameters:
- - name: project_id
- in: path
- description: Project ID to filter applications by
- required: true
- schema:
- type: integer
- - name: deployment_target_id
- in: query
- description: Deployment target ID to filter applications by
- required: true
- schema:
- type: string
- get:
- x-scalar-ignore: true
- tags:
- - experimental
- summary: List application CI statuses
- description: Returns CI status information for all applications in a project for a given deployment target
- operationId: list_application_ci_statuses
- security:
- - bearerAuth:
- - viewer
- responses:
- '200':
- description: List of application CI statuses
- content:
- application/json:
- schema:
- type: object
- required:
- - application_ci_statuses
- properties:
- application_ci_statuses:
- type: array
- items:
- $ref: '#/components/schemas/ApplicationCiStatus'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/applications/{application_id}/logs:
- get:
- parameters:
- - name: project_id
- in: path
- description: Project ID that the app belongs to
- required: true
- schema:
- type: integer
- example: 123
- - name: application_id
- in: path
- description: Application ID to pull logs for
- required: true
- schema:
- type: string
- example: 123e4567-e89b-12d3-a456-426614174000
- - name: service_name
- in: query
- description: Optional service name to filter logs by. If not provided, all services will be included.
- schema:
- type: string
- example: api
- - name: application_contract_revision_id
- in: query
- description: Optional application contract revision ID to filter logs by. If not provided, all revisions will be included.
- schema:
- type: string
- example: 123e4567-e89b-12d3-a456-426614174000
- - name: start_time_utc
- in: query
- description: Optional datetime to start the log search. Defaults to 24 hours ago.
- schema:
- type: string
- format: date-time
- - name: end_time_utc
- in: query
- description: Optional datetime to end the log search. Defaults to now.
- schema:
- type: string
- format: date-time
- example: '2021-01-01T00:00:00Z'
- - name: page_limit
- in: query
- description: Optional limit to the number of logs returned. Defaults to 100.
- schema:
- type: integer
- example: 150
- - name: newest_first
- in: query
- description: Optional flag to sort the logs by newest first. Defaults to true.
- schema:
- type: boolean
- example: true
- - name: search_param
- in: query
- description: Optional search parameter to filter logs by. Will attempt to match any part of the log line (case insensitive)
- schema:
- type: string
- example: error
- - name: job_run_name
- in: query
- description: Optional job run name to filter logs by.
- schema:
- type: string
- example: app-name-job-name-12312312
- - name: container_id
- in: query
- description: Optional container ID to filter logs by.
- schema:
- type: string
- example: 0e12943c8ab31fd455cf592498fe20e962e9a31e1f96c8f58dd5d467f3483787
- - name: pod_name
- in: query
- description: Optional pod name to filter logs by.
- schema:
- type: string
- example: my-app-7d8f9c5b6-xyz12
- tags:
- - Applications
- x-scalar-stability: experimental
- summary: List application logs
- description: Returns logs for an application
- operationId: list_application_logs_alpha
- security:
- - bearerAuth:
- - viewer
- responses:
- '200':
- description: List of logs
- content:
- application/json:
- schema:
- type: object
- required:
- - logs
- properties:
- logs:
- type: array
- items:
- $ref: '#/components/schemas/ApplicationLog'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/applications/{application_id}/logs:
- get:
- x-scalar-ignore: true
- parameters:
- - name: project_id
- in: path
- description: Project ID that the app belongs to
- required: true
- schema:
- type: integer
- example: 123
- - name: application_id
- in: path
- description: Application ID to pull logs for
- required: true
- schema:
- type: string
- example: 123e4567-e89b-12d3-a456-426614174000
- - name: service_name
- in: query
- description: Optional service name to filter logs by. If not provided, all services will be included.
- schema:
- type: string
- example: api
- - name: application_contract_revision_id
- in: query
- description: Optional application contract revision ID to filter logs by. If not provided, all revisions will be included.
- schema:
- type: string
- example: 123e4567-e89b-12d3-a456-426614174000
- - name: start_time_utc
- in: query
- description: Optional datetime to start the log search. Defaults to 24 hours ago.
- schema:
- type: string
- format: date-time
- - name: end_time_utc
- in: query
- description: Optional datetime to end the log search. Defaults to now.
- schema:
- type: string
- format: date-time
- example: '2021-01-01T00:00:00Z'
- - name: page_limit
- in: query
- description: Optional limit to the number of logs returned. Defaults to 100.
- schema:
- type: integer
- example: 150
- - name: newest_first
- in: query
- description: Optional flag to sort the logs by newest first. Defaults to true.
- schema:
- type: boolean
- example: true
- - name: search_param
- in: query
- description: Optional search parameter to filter logs by. Will attempt to match any part of the log line (case insensitive)
- schema:
- type: string
- example: error
- - name: job_run_name
- in: query
- description: Optional job run name to filter logs by.
- schema:
- type: string
- example: app-name-job-name-12312312
- - name: container_id
- in: query
- description: Optional container ID to filter logs by.
- schema:
- type: string
- example: 0e12943c8ab31fd455cf592498fe20e962e9a31e1f96c8f58dd5d467f3483787
- - name: pod_name
- in: query
- description: Optional pod name to filter logs by.
- schema:
- type: string
- example: my-app-7d8f9c5b6-xyz12
- tags:
- - Applications
- x-scalar-stability: experimental
- summary: List application logs
- description: Returns logs for an application
- operationId: list_application_logs
- security:
- - bearerAuth:
- - viewer
- responses:
- '200':
- description: List of logs
- content:
- application/json:
- schema:
- type: object
- required:
- - logs
- properties:
- logs:
- type: array
- items:
- $ref: '#/components/schemas/ApplicationLog'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/applications/{application_id}/logs/stream:
- parameters:
- - name: project_id
- in: path
- description: Project ID for the application
- required: true
- schema:
- type: integer
- - name: application_id
- in: path
- description: Application ID to pull logs for
- required: true
- schema:
- type: string
- - name: start_time_utc
- in: query
- description: Optional datetime to start streaming from. Defaults to the current time.
- schema:
- type: string
- format: date-time
- - name: service_name
- in: query
- description: Optional service name to filter logs by. If not provided, all services will be included.
- schema:
- type: string
- - name: application_contract_revision_id
- in: query
- description: Optional application contract revision ID to filter logs by. If not provided, all revisions will be included.
- schema:
- type: string
- - name: search_param
- in: query
- description: Optional search parameter to filter logs by.
- schema:
- type: string
- - name: job_run_name
- in: query
- description: Optional job run name to filter logs by.
- schema:
- type: string
- - name: container_id
- in: query
- description: Optional container ID to filter logs by.
- schema:
- type: string
- - name: pod_name
- in: query
- description: Optional pod name to filter logs by.
- schema:
- type: string
- get:
- x-scalar-ignore: true
- summary: Stream application logs
- description: Server-Sent Events endpoint for streaming real-time application logs
- tags:
- - experimental
- operationId: stream_application_logs
- security:
- - bearerAuth:
- - viewer
- responses:
- '200':
- description: log stream established
- content:
- text/event-stream:
- schema:
- type: string
- description: Real-time stream of application logs
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/applications/{application_id}/revisions:
- parameters:
- - name: project_id
- in: path
- description: Project ID that the app belongs to
- required: true
- schema:
- type: integer
- - name: application_id
- in: path
- description: Application ID to pull revisions for
- required: true
- schema:
- type: string
- - name: application_contract_revision_ids
- in: query
- description: Optional comma-separated list of application contract revision IDs to filter by. If not provided, all revisions will be included.
- schema:
- type: string
- - $ref: '#/components/parameters/pagination'
- get:
- x-scalar-ignore: true
- tags:
- - experimental
- summary: List application revisions
- description: Returns revisions for an application contract sorted by creation date (newest first)
- operationId: list_application_revisions
- security:
- - bearerAuth:
- - viewer
- responses:
- '200':
- description: List of revisions sorted by creation date (newest first)
- content:
- application/json:
- schema:
- type: object
- required:
- - pagination
- - revisions
- properties:
- pagination:
- $ref: '#/components/schemas/PaginationResponse'
- revisions:
- type: array
- items:
- $ref: '#/components/schemas/ApplicationContractRevision'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/applications/{application_id}/rollback:
- parameters:
- - name: project_id
- in: path
- description: Project ID that the app belongs to
- required: true
- schema:
- type: integer
- - name: application_id
- in: path
- description: Application ID to rollback
- required: true
- schema:
- type: string
- post:
- x-scalar-ignore: true
- tags:
- - experimental
- summary: Rollback application
- description: Rolls back an application to a previous version
- operationId: rollback_application
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- required:
- - application_contract_revision_id
- properties:
- application_contract_revision_id:
- type: string
- description: Application contract revision ID with the previous version to rollback to
- security:
- - bearerAuth:
- - developer
- responses:
- '200':
- description: Application successfully rolled back to previous version
- content:
- application/json:
- schema:
- type: object
- required:
- - application_contract_revision_id
- properties:
- application_contract_revision_id:
- type: string
- description: ID of the new revision that was created to rollback to the previous version
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/applications/{application_id}/freeze-deploys:
- parameters:
- - name: project_id
- in: path
- description: Project ID that the app belongs to
- required: true
- schema:
- type: integer
- - name: application_id
- in: path
- description: Application ID to freeze deploys for
- required: true
- schema:
- type: string
- post:
- x-scalar-ignore: true
- tags:
- - experimental
- summary: Freeze application deploys
- description: Freezes deploys for an application, preventing new deployments until unfrozen
- operationId: freeze_application_deploys
- security:
- - bearerAuth:
- - developer
- responses:
- '200':
- description: Application deploys successfully frozen
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/applications/{application_id}/unfreeze-deploys:
- parameters:
- - name: project_id
- in: path
- description: Project ID that the app belongs to
- required: true
- schema:
- type: integer
- - name: application_id
- in: path
- description: Application ID to unfreeze deploys for
- required: true
- schema:
- type: string
- post:
- x-scalar-ignore: true
- tags:
- - experimental
- summary: Unfreeze application deploys
- description: Unfreezes deploys for an application, allowing new deployments
- operationId: unfreeze_application_deploys
- security:
- - bearerAuth:
- - developer
- responses:
- '200':
- description: Application deploys successfully unfrozen
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/applications/{application_id}/status:
- get:
- parameters:
- - name: project_id
- in: path
- description: Project ID that the application belongs to
- required: true
- schema:
- type: integer
- format: int64
- - name: application_id
- in: path
- description: Application ID to get status for
- required: true
- schema:
- type: string
- format: uuid
- x-go-type: uuid.UUID
- x-scalar-stability: experimental
- tags:
- - Applications
- summary: Get application status
- description: Returns the status of an application. This operation will return the status of all application services for every revision/version of the application that is currently active. Multiple revisions can be active at the same time during deployments.
- operationId: get_application_status
- security:
- - bearerAuth:
- - viewer
- responses:
- '200':
- description: Application status fetched successfully
- content:
- application/json:
- schema:
- type: object
- required:
- - application_status
- properties:
- application_status:
- $ref: '#/components/schemas/ApplicationStatus'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/applications/{application_id}/shell-access:
- parameters:
- - name: project_id
- in: path
- description: Project ID that the app belongs to
- required: true
- schema:
- type: integer
- - name: application_id
- in: path
- description: The ID of the application
- required: true
- schema:
- type: string
- format: uuid
- get:
- x-scalar-ignore: true
- summary: Get shell access for an application
- description: Returns the shell access status for an application
- operationId: is_shell_access_enabled_for_application
- security:
- - bearerAuth:
- - viewer
- responses:
- '200':
- description: Shell access status
- content:
- application/json:
- schema:
- type: object
- required:
- - shell_access_enabled
- properties:
- shell_access_enabled:
- type: boolean
- description: Whether shell access is enabled for the application
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- x-scalar-ignore: true
- tags:
- - experimental
- summary: Update shell access for an application
- description: Updates the shell access status for an application
- operationId: update_shell_access_for_application
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- required:
- - shell_access_enabled
- properties:
- shell_access_enabled:
- type: boolean
- description: Whether to enable shell access for the application
- security:
- - bearerAuth:
- - admin
- responses:
- '200':
- description: Shell access successfully updated
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/custom-metrics:
- parameters:
- - name: project_id
- in: path
- description: Project ID to look up custom metrics in
- required: true
- schema:
- type: integer
- - name: deployment_target_id
- in: query
- description: Deployment target ID to look for custom metrics in
- required: true
- schema:
- type: string
- get:
- x-scalar-ignore: true
- summary: List custom metrics
- tags:
- - experimental
- description: Returns a list of all custom metrics from customer applications
- operationId: list_custom_metrics
- security:
- - bearerAuth:
- - viewer
- responses:
- '200':
- description: List of custom metrics from customer applications
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/Metric'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/audit-logs:
- get:
- x-scalar-ignore: true
- operationId: audit_logs_for_project
- summary: List audit logs for a project
- security:
- - bearerAuth:
- - admin
- parameters:
- - name: project_id
- in: path
- required: true
- schema:
- type: integer
- - name: start_date
- in: query
- required: false
- description: Start date for the audit logs in UTC. Defaults to the past 14 days.
- schema:
- type: string
- format: date-time
- - name: end_date
- in: query
- required: false
- description: End date for the audit logs in UTC. Defaults to the current date.
- schema:
- type: string
- format: date-time
- - $ref: '#/components/parameters/pagination'
- responses:
- '200':
- description: List of audit logs for the project
- content:
- application/json:
- schema:
- type: object
- required:
- - audit_logs
- properties:
- pagination:
- $ref: '#/components/schemas/PaginationResponse'
- audit_logs:
- type: array
- items:
- $ref: '#/components/schemas/AuditLog'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/compute-resources:
- get:
- x-scalar-ignore: true
- tags:
- - experimental
- operationId: compute_resources
- summary: List compute resources
- security:
- - bearerAuth:
- - viewer
- parameters:
- - name: project_id
- in: path
- required: true
- description: Unique identifier of the project
- schema:
- type: integer
- - name: cluster_id
- in: query
- required: true
- description: Unique identifier of the cluster
- schema:
- type: integer
- - name: porter_managed_node_groups
- in: query
- required: false
- description: When true, return only porter-managed (monitoring and system) node groups
- schema:
- type: boolean
- responses:
- '200':
- description: List of compute resources
- content:
- application/json:
- schema:
- type: object
- required:
- - compute_resources
- properties:
- compute_resources:
- type: array
- description: List of compute resource breakdowns for each node group
- items:
- $ref: '#/components/schemas/NodeGroupComputeResources'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/builds:
- parameters:
- - name: project_id
- in: path
- description: Project ID to register build for
- required: true
- schema:
- type: integer
- post:
- x-scalar-ignore: true
- summary: Register build
- tags:
- - experimental
- description: Registers a new build with metadata
- operationId: register_build
- security:
- - bearerAuth:
- - developer
- requestBody:
- description: Build registration details
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/BuildRegistration'
- responses:
- '200':
- description: Build registered successfully
- content:
- application/json:
- schema:
- type: object
- required:
- - id
- properties:
- id:
- type: string
- description: Unique identifier for the build run
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/builds/{id}:
- parameters:
- - name: project_id
- in: path
- description: Project ID the build belongs to
- required: true
- schema:
- type: integer
- - name: id
- in: path
- description: Unique identifier of the build
- required: true
- schema:
- type: string
- post:
- x-scalar-ignore: true
- summary: Update build status
- tags:
- - experimental
- description: Updates the status of a build to either success or failed
- operationId: update_build_status
- security:
- - bearerAuth:
- - developer
- requestBody:
- description: Build status update details
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/BuildStatusUpdate'
- responses:
- '200':
- description: Build status updated successfully
- content:
- application/json:
- schema:
- type: object
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/build-settings:
- get:
- x-scalar-ignore: true
- summary: List build settings
- description: Lists all build settings for a project
- operationId: list_build_settings
- tags:
- - Builds
- security:
- - bearerAuth:
- - developer
- parameters:
- - name: project_id
- in: path
- description: Project ID to list build settings for
- required: true
- schema:
- type: integer
- minimum: 0
- responses:
- '200':
- description: Build settings listed successfully
- content:
- application/json:
- schema:
- type: object
- required:
- - build_settings
- properties:
- build_settings:
- type: array
- items:
- $ref: '#/components/schemas/BuildSettings'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- x-scalar-ignore: true
- summary: Create build setting
- description: Creates a new build setting with metadata
- operationId: create_build_settings
- tags:
- - Builds
- security:
- - bearerAuth:
- - developer
- parameters:
- - name: project_id
- in: path
- description: Project ID to create build setting for
- required: true
- schema:
- type: integer
- minimum: 0
- requestBody:
- description: Build setting details
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CreateBuildSettingsRequestBody'
- responses:
- '200':
- description: Build setting created successfully
- content:
- application/json:
- schema:
- type: object
- required:
- - id
- properties:
- id:
- type: string
- description: Unique identifier for the build setting
- format: uuid
- x-go-type: uuid.UUID
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/build-settings/{build_settings_id}:
- get:
- x-scalar-ignore: true
- parameters:
- - name: project_id
- in: path
- description: Project ID the build setting belongs to
- required: true
- schema:
- type: integer
- minimum: 0
- - name: build_settings_id
- in: path
- description: Unique identifier of the build setting
- required: true
- schema:
- type: string
- format: uuid
- x-go-type: uuid.UUID
- summary: Get build information
- tags:
- - Builds
- description: Retrieves build configuration and settings for the specified build ID
- operationId: get_build_settings
- security:
- - bearerAuth:
- - developer
- responses:
- '200':
- description: Build setting retrieved successfully
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/BuildSettings'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/build-runs:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- get:
- x-scalar-ignore: true
- summary: List build runs
- description: List build runs for a project, filtered by build template
- operationId: list_builds
- security:
- - bearerAuth:
- - viewer
- tags:
- - Builds
- parameters:
- - name: build_template_id
- in: query
- description: Build template ID to filter by
- required: true
- schema:
- type: string
- format: uuid
- - $ref: '#/components/parameters/pagination'
- responses:
- '200':
- description: List of build runs
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ListBuildsResponseBody'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/build-templates:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- get:
- x-scalar-ignore: true
- summary: List build templates
- description: Returns the list of build templates for a project
- operationId: list_build_templates
- tags:
- - Builds
- security:
- - bearerAuth:
- - viewer
- responses:
- '200':
- description: Build templates listed successfully
- content:
- application/json:
- schema:
- type: object
- required:
- - build_templates
- properties:
- build_templates:
- type: array
- items:
- $ref: '#/components/schemas/BuildTemplate'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/build-templates/{build_template_id}:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- - name: build_template_id
- in: path
- description: Build template ID
- required: true
- schema:
- type: string
- format: uuid
- x-go-type: uuid.UUID
- post:
- x-scalar-ignore: true
- summary: Update build template
- description: Updates an existing build template
- operationId: update_build_template
- tags:
- - Builds
- security:
- - bearerAuth:
- - developer
- requestBody:
- description: Build template update details
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UpdateBuildTemplateRequestBody'
- responses:
- '200':
- description: Build template updated successfully
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/BuildTemplate'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/build-templates/{build_template_id}/build:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- - name: build_template_id
- in: path
- description: Build template ID
- required: true
- schema:
- type: string
- format: uuid
- x-go-type: uuid.UUID
- post:
- x-scalar-ignore: true
- summary: Create build
- description: Triggers a build for the given template. Creates a build record, initiates the build with the configured provider, and starts tracking the build status.
- operationId: build
- tags:
- - Builds
- security:
- - bearerAuth:
- - developer
- requestBody:
- description: Build creation details
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CreateBuildRequestBody'
- responses:
- '201':
- description: Build created successfully
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/BuildRun'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/build-templates/{build_template_id}/builds/{build_id}/logs:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- - name: build_template_id
- in: path
- description: Build template ID
- required: true
- schema:
- type: string
- format: uuid
- x-go-type: uuid.UUID
- - name: build_id
- in: path
- description: Build ID
- required: true
- schema:
- type: string
- format: uuid
- x-go-type: uuid.UUID
- get:
- x-scalar-ignore: true
- summary: Get build logs
- description: Returns logs for a build run
- operationId: get_build_template_logs
- tags:
- - Builds
- security:
- - bearerAuth:
- - viewer
- responses:
- '200':
- description: Build logs
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/GetBuildTemplateLogsResponseBody'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/build-templates/{build_template_id}/metrics:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- - name: build_template_id
- in: path
- description: Build template ID
- required: true
- schema:
- type: string
- format: uuid
- x-go-type: uuid.UUID
- get:
- x-scalar-ignore: true
- summary: Get builder metrics
- description: Returns resource usage metrics for a builder
- operationId: get_build_template_metrics
- tags:
- - Builds
- security:
- - bearerAuth:
- - viewer
- parameters:
- - name: start_time
- in: query
- description: Start of time range (RFC3339)
- required: true
- schema:
- type: string
- format: date-time
- - name: end_time
- in: query
- description: End of time range (RFC3339)
- required: true
- schema:
- type: string
- format: date-time
- responses:
- '200':
- description: Builder metrics
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/NarviBuilderMetricsResponse'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/build-templates/narvi/config:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- get:
- x-scalar-ignore: true
- summary: Get narvi builder config
- description: Returns the narvi builder configuration for a project
- operationId: get_narvi_config
- tags:
- - Builds
- security:
- - bearerAuth:
- - viewer
- responses:
- '200':
- description: Builder configuration
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/NarviBuilderConfig'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- put:
- x-scalar-ignore: true
- summary: Update narvi builder config
- description: Creates or updates the narvi builder configuration
- operationId: update_narvi_config
- tags:
- - Builds
- security:
- - bearerAuth:
- - developer
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/NarviUpdateBuilderConfigRequest'
- responses:
- '200':
- description: Updated builder configuration
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/NarviBuilderConfig'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/build-templates/narvi/connect-to-buildkit:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- get:
- x-scalar-ignore: true
- summary: Connect to BuildKit
- description: Upgrades to a WebSocket connection that proxies to the narvi BuildKit daemon for Docker builds.
- operationId: connect_to_buildkit
- tags:
- - Builds
- security:
- - bearerAuth:
- - developer
- parameters:
- - name: build_id
- in: query
- description: Build ID to connect for
- required: true
- schema:
- type: string
- format: uuid
- responses:
- '101':
- description: Switching protocols to WebSocket
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/build-templates/registry-auth:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- post:
- x-scalar-ignore: true
- summary: Get registry auth
- description: Returns temporary credentials for a container registry
- operationId: get_build_registry_auth
- tags:
- - Builds
- security:
- - bearerAuth:
- - developer
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/NarviRegistryAuthRequest'
- responses:
- '200':
- description: Registry credentials
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/NarviRegistryAuthResponse'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/deployment-targets:
- parameters:
- - name: project_id
- in: path
- description: Project ID to list deployment targets for
- required: true
- schema:
- type: integer
- get:
- x-scalar-ignore: true
- summary: List deployment targets
- description: Returns all deployment targets in the project that the user has access to
- operationId: list_deployment_targets
- security:
- - bearerAuth:
- - viewer
- responses:
- '200':
- description: List of deployment targets
- content:
- application/json:
- schema:
- type: object
- required:
- - deployment_targets
- properties:
- deployment_targets:
- type: array
- items:
- $ref: '#/components/schemas/DeploymentTarget'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/deployment-targets:
- get:
- parameters:
- - name: project_id
- in: path
- description: Project ID to list deployment targets for
- required: true
- schema:
- type: integer
- example: 123
- - name: cluster_id
- in: query
- description: Optional cluster ID to filter deployment targets by
- required: false
- schema:
- type: integer
- example: 123
- - name: is_preview
- in: query
- description: Optional boolean to filter deployment targets by whether they are preview environments
- required: false
- schema:
- type: boolean
- example: true
- x-scalar-stability: experimental
- tags:
- - Deployment Targets
- summary: List deployment targets
- description: Returns all deployment targets in the project that the user has access to
- operationId: list_deployment_targets_alpha
- security:
- - bearerAuth:
- - viewer
- responses:
- '200':
- description: List of deployment targets
- content:
- application/json:
- schema:
- type: object
- required:
- - deployment_targets
- properties:
- deployment_targets:
- type: array
- items:
- $ref: '#/components/schemas/DeploymentTarget'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/job_runs:
- parameters:
- - name: project_id
- in: path
- description: Project Id where the job run belongs to.
- required: true
- schema:
- type: integer
- - name: deployment_target_id
- in: query
- description: Deployment target Id to get job runs for.
- required: false
- schema:
- type: string
- - name: application_id
- in: query
- description: Application Id to get job runs for.
- required: false
- schema:
- type: string
- - name: application_contract_revision_id
- in: query
- description: Application contract revision Id to get job runs for.
- required: false
- schema:
- type: string
- - name: service_name
- in: query
- description: Service name to get job runs for.
- required: false
- schema:
- type: string
- - name: status
- in: query
- description: Status to filter job runs by.
- required: false
- schema:
- type: string
- enum:
- - RUNNING
- - SUCCESSFUL
- - FAILED
- - CANCELED
- - name: limit
- in: query
- description: Limit the number of job runs returned, default is 100.
- required: false
- schema:
- type: integer
- get:
- deprecated: true
- x-scalar-ignore: true
- summary: List job runs
- description: Returns the job runs for a project sorted by creation time, with optional filters.
- operationId: list_job_runs
- security:
- - bearerAuth:
- - viewer
- responses:
- '200':
- description: List of job runs sorted by creation time that match the provided filters
- content:
- application/json:
- schema:
- type: object
- required:
- - job_runs
- properties:
- job_runs:
- type: array
- items:
- $ref: '#/components/schemas/JobRun'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/job-runs/{job_id}:
- put:
- parameters:
- - name: project_id
- in: path
- description: Project ID the job run belongs to
- required: true
- schema:
- type: integer
- format: int64
- example: 123
- - name: job_id
- in: path
- description: Kubernetes Job UID, the natural key for the run
- required: true
- schema:
- type: string
- example: 123e4567-e89b-12d3-a456-426614174000
- x-scalar-ignore: true
- tags:
- - Jobs
- summary: Report job run
- description: Records a job run's identity and status. Called by the in-cluster agent.
- operationId: report_job_run
- security:
- - bearerAuth:
- - viewer
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ReportJobRunRequest'
- responses:
- '200':
- description: Job run recorded
- content:
- application/json:
- schema:
- type: object
- required:
- - job_id
- properties:
- job_id:
- type: string
- description: The Kubernetes Job UID of the recorded run
- example: 123e4567-e89b-12d3-a456-426614174000
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/job-runs:
- get:
- parameters:
- - name: project_id
- in: path
- description: Project ID to filter job runs by
- required: true
- schema:
- type: integer
- example: 123
- - name: job_name
- in: query
- description: Optional name of the job to get runs for
- required: false
- schema:
- type: string
- example: my-job
- - name: application_id
- in: query
- description: Optional application ID to filter job runs by
- required: false
- schema:
- type: string
- format: uuid
- example: 123e4567-e89b-12d3-a456-426614174000
- - name: application_contract_revision_id
- in: query
- description: Optional application contract revision ID to filter job runs by (application ID must be provided if using this filter)
- required: false
- schema:
- type: string
- format: uuid
- example: 123e4567-e89b-12d3-a456-426614174000
- - name: deployment_target_id
- in: query
- description: Optional deployment target ID to filter job runs by
- required: false
- schema:
- type: string
- format: uuid
- example: 123e4567-e89b-12d3-a456-426614174000
- - name: status
- in: query
- description: Optional status to filter job runs by
- required: false
- schema:
- $ref: '#/components/schemas/JobRunAlphaStatus'
- - name: limit
- in: query
- description: Limit the number of job runs returned, default is 100
- required: false
- schema:
- type: integer
- example: 150
- x-scalar-stability: experimental
- tags:
- - Jobs
- summary: List job runs
- description: Returns the job runs for a project sorted by creation time, with optional filters.
- operationId: list_job_runs_alpha
- security:
- - bearerAuth:
- - viewer
- responses:
- '200':
- description: List of job runs sorted by creation time that match the provided filters
- content:
- application/json:
- schema:
- type: object
- required:
- - job_runs
- properties:
- job_runs:
- type: array
- items:
- $ref: '#/components/schemas/JobRunAlpha'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- parameters:
- - name: project_id
- in: path
- description: Project ID that job belongs to
- required: true
- schema:
- type: integer
- example: 123
- summary: Trigger job run
- description: Trigger a job run for a job service on an application
- operationId: trigger_job_run
- security:
- - bearerAuth:
- - developer
- x-scalar-stability: experimental
- tags:
- - Jobs
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- required:
- - application_id
- - job_name
- properties:
- application_id:
- type: string
- format: uuid
- x-go-type: uuid.UUID
- description: The ID of the application to trigger the job run for
- example: 123e4567-e89b-12d3-a456-426614174000
- job_name:
- type: string
- description: The name of the job to trigger
- example: my-job
- allow_concurrent:
- type: boolean
- description: Setting this to true will allow triggering a concurrent job run, even if the job has concurrent execution disabled
- example: false
- overrides:
- $ref: '#/components/schemas/JobRunOverrides'
- responses:
- '200':
- description: Job run triggered successfully
- content:
- application/json:
- schema:
- type: object
- required:
- - job_run_name
- properties:
- job_run_name:
- type: string
- description: The name of the job run that was triggered
- example: my-app-my-job-123456ab
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/environment-groups:
- get:
- parameters:
- - name: project_id
- in: path
- description: Project ID to filter environment groups by
- required: true
- schema:
- type: integer
- - name: cluster_id
- in: query
- description: Cluster ID to filter environment groups by
- required: false
- schema:
- type: integer
- summary: List environment groups
- description: Returns a list of all environment groups for a project
- operationId: list_environment_groups
- security:
- - bearerAuth:
- - viewer
- x-scalar-stability: experimental
- tags:
- - Environment Groups
- responses:
- '200':
- description: List of environment groups
- content:
- application/json:
- schema:
- type: object
- required:
- - environment_groups
- properties:
- environment_groups:
- type: array
- items:
- $ref: '#/components/schemas/EnvironmentGroup'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- parameters:
- - name: project_id
- in: path
- description: Project ID to create environment group for
- required: true
- schema:
- type: integer
- summary: Create environment group
- description: Creates a new environment group with the specified name, cluster ID, variables, and secrets
- operationId: create_environment_group
- security:
- - bearerAuth:
- - developer
- x-scalar-stability: experimental
- tags:
- - Environment Groups
- requestBody:
- description: Environment group creation details
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CreateEnvironmentGroupRequest'
- responses:
- '200':
- description: Environment group created successfully
- content:
- application/json:
- schema:
- type: object
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/environment-groups/{environment_group_name}:
- get:
- parameters:
- - name: project_id
- in: path
- description: Project ID the environment group belongs to
- required: true
- schema:
- type: integer
- - name: environment_group_name
- in: path
- description: Name of the environment group
- required: true
- schema:
- type: string
- - name: cluster_id
- in: query
- description: Cluster ID the environment group belongs to
- required: true
- schema:
- type: integer
- - name: version
- in: query
- description: Version of the environment group. If not provided, the latest version will be returned.
- required: false
- schema:
- type: integer
- summary: Get environment group
- description: Returns the variables (key, value) and secrets (key only) for the specified environment group
- operationId: get_environment_group
- security:
- - bearerAuth:
- - viewer
- x-scalar-stability: experimental
- tags:
- - Environment Groups
- responses:
- '200':
- description: Environment group details
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/EnvironmentGroup'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- parameters:
- - name: project_id
- in: path
- description: Project ID the environment group belongs to
- required: true
- schema:
- type: integer
- - name: environment_group_name
- in: path
- description: Name of the environment group
- required: true
- schema:
- type: string
- - name: cluster_id
- in: query
- description: Cluster ID the environment group belongs to
- required: true
- schema:
- type: integer
- summary: Update environment group
- description: Updates an existing environment group with the specified variables and secrets. Calling this endpoint will replace the entire contents of the environment group with the values in the request body. This endpoint is not safe for concurrent use.
- operationId: update_environment_group
- security:
- - bearerAuth:
- - developer
- x-scalar-stability: experimental
- tags:
- - Environment Groups
- requestBody:
- description: Environment group update details
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UpdateEnvironmentGroupRequest'
- responses:
- '200':
- description: Environment group updated successfully
- content:
- application/json:
- schema:
- type: object
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- delete:
- parameters:
- - name: project_id
- in: path
- description: Project ID the environment group belongs to
- required: true
- schema:
- type: integer
- - name: environment_group_name
- in: path
- description: Name of the environment group
- required: true
- schema:
- type: string
- - name: cluster_id
- in: query
- description: Cluster ID the environment group belongs to
- required: true
- schema:
- type: integer
- summary: Delete environment group
- description: Deletes an existing environment group
- operationId: delete_environment_group
- security:
- - bearerAuth:
- - developer
- x-scalar-stability: experimental
- tags:
- - Environment Groups
- responses:
- '200':
- description: Environment group successfully deleted
- content:
- application/json:
- schema:
- type: object
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/infisical-environment-groups:
- get:
- parameters:
- - name: project_id
- in: path
- description: Project ID the environment groups belong to
- required: true
- schema:
- type: integer
- - name: cluster_id
- in: query
- description: Cluster ID the environment groups belong to
- required: true
- schema:
- type: integer
- summary: List infisical environment group metadata
- description: Returns stored non-sensitive Infisical config for environment groups in a cluster.
- operationId: list_infisical_environment_groups
- security:
- - bearerAuth:
- - viewer
- x-scalar-stability: experimental
- tags:
- - Environment Groups
- responses:
- '200':
- description: Infisical environment group metadata
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/InfisicalEnvironmentGroupList'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/environment-groups/{environment_group_name}/infisical-metadata:
- post:
- parameters:
- - name: project_id
- in: path
- description: Project ID the environment group belongs to
- required: true
- schema:
- type: integer
- - name: environment_group_name
- in: path
- description: Name of the environment group
- required: true
- schema:
- type: string
- - name: cluster_id
- in: query
- description: Cluster ID the environment group belongs to
- required: true
- schema:
- type: integer
- summary: Populate infisical environment group metadata
- description: Reads the non-sensitive Infisical config from the cluster and persists it for fast reads.
- operationId: backfill_infisical_environment_group_metadata
- security:
- - bearerAuth:
- - developer
- x-scalar-stability: experimental
- tags:
- - Environment Groups
- responses:
- '200':
- description: Metadata populated successfully
- content:
- application/json:
- schema:
- type: object
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/environment-groups/{environment_group_name}/versions:
- get:
- parameters:
- - name: project_id
- in: path
- description: Project ID the environment group belongs to
- required: true
- schema:
- type: integer
- - name: environment_group_name
- in: path
- description: Name of the environment group
- required: true
- schema:
- type: string
- - name: cluster_id
- in: query
- description: Cluster ID the environment group belongs to
- required: true
- schema:
- type: integer
- summary: List environment group versions
- description: Returns the (up to 10) latest versions of the environment group
- operationId: list_environment_group_versions
- security:
- - bearerAuth:
- - viewer
- x-scalar-stability: experimental
- tags:
- - Environment Groups
- responses:
- '200':
- description: List of environment group versions
- content:
- application/json:
- schema:
- type: object
- required:
- - versions
- properties:
- versions:
- type: array
- items:
- $ref: '#/components/schemas/EnvironmentGroup'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/environment-groups/{environment_group_name}/secrets:
- get:
- summary: List environment group secrets
- description: Returns a list of secrets with keys for the specified environment group
- operationId: list_environment_group_secrets
- security:
- - bearerAuth:
- - admin
- x-scalar-stability: experimental
- tags:
- - Environment Groups
- parameters:
- - name: project_id
- in: path
- description: Project ID the environment group belongs to
- required: true
- schema:
- type: integer
- - name: environment_group_name
- in: path
- description: Name of the environment group
- required: true
- schema:
- type: string
- - name: cluster_id
- in: query
- description: Cluster ID the environment group belongs to
- required: true
- schema:
- type: integer
- - name: version
- in: query
- description: Version of the environment group. If not provided, the latest version will be returned.
- required: false
- schema:
- type: integer
- responses:
- '200':
- description: List of environment group secrets
- content:
- application/json:
- schema:
- type: object
- required:
- - secrets
- properties:
- secrets:
- type: array
- items:
- $ref: '#/components/schemas/EnvironmentGroupKeyValue'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/clusters/{cluster_id}/pods:
- parameters:
- - name: project_id
- in: path
- description: Project ID the cluster belongs to
- required: true
- schema:
- type: integer
- - name: cluster_id
- in: path
- description: Unique identifier of the cluster
- required: true
- schema:
- type: integer
- - name: namespace
- in: query
- description: Namespace the pod belongs to
- required: false
- schema:
- type: string
- - name: pod_name
- in: query
- description: Pod name to get metrics for
- required: false
- schema:
- type: string
- get:
- x-scalar-ignore: true
- summary: List cluster pods
- description: Returns a list of pods running in the cluster, with their status and memory usage.
- tags:
- - experimental
- operationId: list_cluster_pods
- security:
- - bearerAuth:
- - viewer
- responses:
- '200':
- description: List of cluster pods
- content:
- application/json:
- schema:
- type: object
- required:
- - pods
- properties:
- pods:
- type: array
- items:
- $ref: '#/components/schemas/Pod'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/clusters/{cluster_id}/node-groups:
- parameters:
- - name: project_id
- in: path
- description: Project ID the cluster belongs to
- required: true
- schema:
- type: integer
- - name: cluster_id
- in: path
- description: Unique identifier of the cluster
- required: true
- schema:
- type: integer
- get:
- x-scalar-ignore: true
- summary: List node groups
- description: Returns a list of node groups in the cluster, with their min, max, and current instance amount
- tags:
- - experimental
- operationId: list_node_groups
- security:
- - bearerAuth:
- - viewer
- responses:
- '200':
- description: List of node groups
- content:
- application/json:
- schema:
- type: object
- required:
- - node_groups
- properties:
- node_groups:
- type: array
- items:
- $ref: '#/components/schemas/NodeGroup'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/clusters/{cluster_id}/system-applications-status:
- get:
- x-scalar-ignore: true
- summary: List system application statuses
- description: Returns status and version information for system applications
- operationId: list_system_applications_status
- tags:
- - Clusters
- security:
- - bearerAuth:
- - admin
- parameters:
- - name: project_id
- in: path
- required: true
- schema:
- type: integer
- description: Project ID
- - name: cluster_id
- in: path
- required: true
- schema:
- type: integer
- description: Cluster ID
- responses:
- '200':
- description: System application status and version information
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SystemApplicationsStatusResponse'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/clusters/{cluster_id}/node-metrics:
- get:
- x-scalar-ignore: true
- summary: Get node metrics by node group
- description: Returns node counts or cores grouped by workload kind for the specified node group
- operationId: cluster_node_metrics
- tags:
- - Clusters
- security:
- - bearerAuth:
- - viewer
- parameters:
- - name: project_id
- in: path
- required: true
- schema:
- type: integer
- description: Project ID
- - name: cluster_id
- in: path
- required: true
- schema:
- type: integer
- description: Cluster ID
- - name: node_group_id
- in: query
- required: false
- schema:
- type: string
- default: application
- description: Node group ID to query metrics for (defaults to 'application')
- - name: start_time_utc
- in: query
- required: false
- schema:
- type: string
- format: date-time
- description: Start time for metrics query (UTC)
- - name: end_time_utc
- in: query
- required: false
- schema:
- type: string
- format: date-time
- description: End time for metrics query (UTC)
- responses:
- '200':
- description: Node metrics data
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/NodeMetricsResponse'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/clusters/{cluster_id}/nodes:
- get:
- x-scalar-ignore: true
- summary: List cluster nodes
- description: Returns all nodes in the cluster with their resource capacity and usage metrics
- operationId: list_cluster_nodes
- tags:
- - Clusters
- security:
- - bearerAuth:
- - viewer
- parameters:
- - name: project_id
- in: path
- required: true
- schema:
- type: integer
- description: Project ID
- - name: cluster_id
- in: path
- required: true
- schema:
- type: integer
- description: Cluster ID
- responses:
- '200':
- description: List of cluster nodes with detailed metrics
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ClusterNodesResponse'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/clusters/{cluster_id}/load-balancers:
- get:
- x-scalar-ignore: true
- summary: List cluster load balancers
- description: Returns a list of load balancers attached to the cluster.
- operationId: list_cluster_load_balancers
- tags:
- - Clusters
- security:
- - bearerAuth:
- - viewer
- parameters:
- - name: project_id
- in: path
- required: true
- schema:
- type: integer
- description: Project ID
- - name: cluster_id
- in: path
- required: true
- schema:
- type: integer
- description: Cluster ID
- responses:
- '200':
- description: List of cluster load balancers
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ClusterLoadBalancersResponse'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/clusters/{cluster_id}/system-application-metrics:
- get:
- x-scalar-ignore: true
- summary: List system application metrics
- description: |
- Fetches time-series metrics for system applications running on the cluster
- operationId: list_system_application_metrics
- tags:
- - Clusters
- security:
- - bearerAuth:
- - viewer
- parameters:
- - name: project_id
- in: path
- description: Project ID that the cluster belongs to
- required: true
- schema:
- type: integer
- - name: cluster_id
- in: path
- description: Cluster ID to query system application metrics for
- required: true
- schema:
- type: integer
- - name: system_application_name
- in: query
- description: Name of the system application (e.g., ingress-nginx).
- required: true
- schema:
- $ref: '#/components/schemas/SystemApplicationName'
- - name: start_time
- in: query
- description: Start of the time range for the metrics query.
- required: true
- schema:
- type: string
- format: date-time
- - name: end_time
- in: query
- description: End of the time range for the metrics query.
- required: true
- schema:
- type: string
- format: date-time
- - name: metric
- in: query
- description: Type of metric to query
- required: true
- schema:
- $ref: '#/components/schemas/SystemApplicationMetricType'
- - name: sub_process
- in: query
- description: Secondary workload to query; omit for the system application's main workload
- required: false
- schema:
- $ref: '#/components/schemas/SystemApplicationSubProcess'
- responses:
- '200':
- description: Time-series metrics data
- content:
- application/json:
- schema:
- type: object
- required:
- - data
- properties:
- data:
- type: array
- items:
- $ref: '#/components/schemas/SystemApplicationTimeSeriesData'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/clusters/{cluster_id}/trigger-system-application-reconcile:
- post:
- x-scalar-ignore: true
- summary: Trigger system application reconciliation
- description: Triggers a reconciliation job for system applications on the cluster. Can be run in dry-run mode to generate diffs without applying changes.
- operationId: trigger_system_application_reconcile
- tags:
- - Clusters
- security:
- - bearerAuth:
- - admin
- parameters:
- - name: project_id
- in: path
- description: Project ID that the cluster belongs to
- required: true
- schema:
- type: integer
- - name: cluster_id
- in: path
- description: Cluster ID to trigger reconciliation for
- required: true
- schema:
- type: integer
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/TriggerSystemApplicationReconcileRequest'
- responses:
- '200':
- description: Reconciliation job triggered successfully
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/clusters/{cluster_id}/system-applications/{system_application_name}:
- get:
- x-scalar-ignore: true
- summary: Get system application configuration
- description: Returns the system application configuration for the specified system application. Currently only returns the fields that are editable by the user.
- operationId: get_system_application_configuration
- tags:
- - Clusters
- security:
- - bearerAuth:
- - viewer
- parameters:
- - name: project_id
- in: path
- description: Project ID that the cluster belongs to
- required: true
- schema:
- type: integer
- - name: cluster_id
- in: path
- description: Cluster ID to query system application configuration for
- required: true
- schema:
- type: integer
- - name: system_application_name
- in: path
- description: Name of the system application (e.g., ingress-nginx).
- required: true
- schema:
- $ref: '#/components/schemas/SystemApplicationName'
- responses:
- '200':
- description: System application configuration
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SystemApplicationConfiguration'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- patch:
- x-scalar-ignore: true
- summary: Partially update system application configuration
- description: Partially updates the user-editable configuration for the specified system application. Only the fields provided in the request body will be updated.
- operationId: patch_system_application_configuration
- tags:
- - Clusters
- security:
- - bearerAuth:
- - admin
- parameters:
- - name: project_id
- in: path
- description: Project ID that the cluster belongs to
- required: true
- schema:
- type: integer
- - name: cluster_id
- in: path
- description: Cluster ID to update system application configuration for
- required: true
- schema:
- type: integer
- - name: system_application_name
- in: path
- description: Name of the system application (e.g., ingress-nginx).
- required: true
- schema:
- $ref: '#/components/schemas/SystemApplicationName'
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/PatchSystemApplicationConfigurationRequestBody'
- responses:
- '200':
- description: System application configuration partially updated successfully
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/clusters/{cluster_id}/dns/credentials:
- parameters:
- - name: project_id
- in: path
- description: Project ID that the cluster belongs to
- required: true
- schema:
- type: integer
- - name: cluster_id
- in: path
- description: Cluster ID to manage DNS provider credentials for
- required: true
- schema:
- type: integer
- get:
- summary: Get the DNS provider credentials status of the cluster.
- description: Reports whether DNS provider credentials are stored for the cluster and which provider.
- operationId: get_dns_provider_credentials
- x-scalar-ignore: true
- tags:
- - Clusters
- security:
- - bearerAuth:
- - admin
- parameters:
- - in: query
- name: load_balancer_type
- description: Load balancer whose DNS provider credentials to report.
- required: true
- schema:
- $ref: '#/components/schemas/LoadBalancerType'
- responses:
- '200':
- description: Status of the credentials
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/DnsProviderCredentialsStatus'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- x-scalar-ignore: true
- summary: Create credentials for the DNS provider of the cluster.
- description: This will store the credentials of the DNS provider in the cluster.
- operationId: create_dns_provider_credentials
- tags:
- - Clusters
- security:
- - bearerAuth:
- - admin
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CreateDnsProviderCredentialsRequest'
- responses:
- '200':
- description: Credentials created successfully.
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- delete:
- x-scalar-ignore: true
- summary: Delete the DNS provider credentials of the cluster.
- description: Removes the stored DNS provider credentials from the cluster.
- operationId: delete_dns_provider_credentials
- tags:
- - Clusters
- security:
- - bearerAuth:
- - admin
- parameters:
- - in: query
- name: load_balancer_type
- description: Load balancer whose DNS provider credentials to remove.
- required: true
- schema:
- $ref: '#/components/schemas/LoadBalancerType'
- responses:
- '200':
- description: Credentials deleted successfully.
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/clusters/{cluster_id}/watchman/app-spec:
- get:
- x-scalar-ignore: true
- summary: Get watchman app spec
- description: List the per-application metric queries the porter agent watchman should run against the cluster. Called by the in-cluster porter agent.
- operationId: get_watchman_app_spec
- tags:
- - Clusters
- security:
- - bearerAuth:
- - developer
- parameters:
- - name: project_id
- in: path
- required: true
- schema:
- type: integer
- format: int64
- description: Project ID
- - name: cluster_id
- in: path
- required: true
- schema:
- type: integer
- format: int64
- description: Cluster ID
- responses:
- '200':
- description: Watchman app spec
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/WatchmanSpec'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/clusters/{cluster_id}/watchman/app-status:
- post:
- x-scalar-ignore: true
- summary: Report watchman app status
- description: Record per-application request metrics observed on the cluster. Called by the in-cluster porter agent.
- operationId: report_app_status
- tags:
- - Clusters
- security:
- - bearerAuth:
- - developer
- parameters:
- - name: project_id
- in: path
- required: true
- schema:
- type: integer
- format: int64
- description: Project ID
- - name: cluster_id
- in: path
- required: true
- schema:
- type: integer
- format: int64
- description: Cluster ID
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/WatchmanAppStatusRequest'
- responses:
- '200':
- description: Status recorded
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/clusters/{cluster_id}/watchman/spec:
- get:
- x-scalar-ignore: true
- summary: Get watchman spec
- description: List the metric queries the porter agent watchman should run against the cluster. Called by the in-cluster porter agent.
- operationId: get_watchman_spec
- tags:
- - Clusters
- security:
- - bearerAuth:
- - developer
- parameters:
- - name: project_id
- in: path
- required: true
- schema:
- type: integer
- format: int64
- description: Project ID
- - name: cluster_id
- in: path
- required: true
- schema:
- type: integer
- format: int64
- description: Cluster ID
- responses:
- '200':
- description: Watchman spec
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/WatchmanSpec'
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/clusters/{cluster_id}/watchman/status:
- post:
- x-scalar-ignore: true
- summary: Report watchman status
- description: Record system workload health metrics observed on the cluster. Called by the in-cluster porter agent.
- operationId: report_watchman_status
- tags:
- - Clusters
- security:
- - bearerAuth:
- - developer
- parameters:
- - name: project_id
- in: path
- required: true
- schema:
- type: integer
- format: int64
- description: Project ID
- - name: cluster_id
- in: path
- required: true
- schema:
- type: integer
- format: int64
- description: Cluster ID
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/WatchmanStatusRequest'
- responses:
- '200':
- description: Status recorded
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/templates/{template_id}:
- parameters:
- - name: project_id
- in: path
- description: Project ID the template belongs to
- required: true
- schema:
- type: integer
- - name: template_id
- in: path
- description: Unique identifier of the template
- required: true
- schema:
- type: string
- delete:
- x-scalar-ignore: true
- summary: Delete template
- description: Deletes a template from the project
- operationId: delete_template
- security:
- - bearerAuth:
- - developer
- responses:
- '200':
- description: Template deleted successfully
- content:
- application/json:
- schema:
- type: object
- required:
- - github_workflow_file_deletion_pr_url
- properties:
- github_workflow_file_deletion_pr_url:
- type: string
- description: The URL of the GitHub PR that deletes the workflow
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/blue-green/{group_name}/applications:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- - name: group_name
- in: path
- description: Name of the Blue-Green group
- required: true
- schema:
- type: string
- - name: deployment_target_id
- in: query
- description: Deployment Target ID to filter by.
- required: false
- schema:
- type: string
- format: uuid
- get:
- x-scalar-ignore: true
- summary: Blue-Green Group Member Applications
- description: Returns the names of all applications belonging to a specific Blue-Green group.
- operationId: blue_green_group_applications
- tags:
- - Blue-Green Deployments
- - Applications
- security:
- - bearerAuth:
- - viewer
- responses:
- '200':
- description: List of application names in the Blue-Green group
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/BlueGreenApplication'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/deployment-targets/{deployment_target_id}/blue-green-groups:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- - name: deployment_target_id
- in: path
- description: Deployment Target ID.
- required: true
- schema:
- type: string
- format: uuid
- get:
- x-scalar-ignore: true
- summary: List Blue-Green Groups
- description: Returns a list of all unique Blue-Green group names configured for applications within the specified deployment target.
- operationId: list_blue_green_groups
- tags:
- - Blue-Green Deployments
- - Applications
- security:
- - bearerAuth:
- - viewer
- responses:
- '200':
- description: A list of unique Blue-Green group names.
- content:
- application/json:
- schema:
- type: object
- required:
- - blue_green_groups
- properties:
- blue_green_groups:
- type: array
- items:
- $ref: '#/components/schemas/BlueGreenGroup'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/github/oauth/authorize:
- get:
- x-scalar-ignore: true
- summary: GitHub OAuth Authorize
- description: Initiates the GitHub OAuth flow for authorizing Porter to access the user's GitHub account
- operationId: github_oauth_authorize
- security:
- - bearerAuth:
- - viewer
- parameters:
- - name: redirect
- in: query
- description: Redirect URL to redirect to after successful authentication
- required: false
- schema:
- type: string
- responses:
- '302':
- description: Redirects to GitHub authorization page
- headers:
- Location:
- schema:
- type: string
- description: GitHub OAuth authorization URL
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/github/oauth/callback:
- get:
- x-scalar-ignore: true
- summary: GitHub OAuth Callback
- description: Callback endpoint for GitHub OAuth flow to exchange authorization code for access token
- operationId: github_oauth_callback
- security:
- - bearerAuth:
- - viewer
- parameters:
- - name: code
- in: query
- description: Authorization code from GitHub
- required: true
- schema:
- type: string
- - name: state
- in: query
- description: State parameter from GitHub
- required: true
- schema:
- type: string
- responses:
- '302':
- description: OAuth flow completed, redirects to dashboard or specified URI
- headers:
- Location:
- schema:
- type: string
- description: Redirect location after successful authentication
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/github/oauth/status:
- get:
- x-scalar-ignore: true
- summary: GitHub OAuth Status
- description: Returns the status of the user's GitHub account connection to Porter
- operationId: github_oauth_status
- security:
- - bearerAuth:
- - viewer
- responses:
- '200':
- description: GitHub OAuth status
- content:
- application/json:
- schema:
- type: object
- required:
- - valid_token_exists
- - username
- properties:
- valid_token_exists:
- type: boolean
- description: Whether a valid GitHub token exists
- example: true
- username:
- type: string
- description: GitHub username of the authenticated user
- example: kelseyhightower
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/github/oauth/unauthorize:
- delete:
- x-scalar-ignore: true
- summary: GitHub OAuth Unauthorize
- description: Unauthorizes Porter to access the user's GitHub account
- operationId: github_oauth_unauthorize
- security:
- - bearerAuth:
- - viewer
- responses:
- '200':
- description: User's GitHub account disconnected successfully
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/github/accounts:
- get:
- x-scalar-ignore: true
- summary: List GitHub accounts
- description: Returns a list of GitHub accounts connected to Porter that the user has access to
- operationId: list_github_accounts
- security:
- - bearerAuth:
- - viewer
- responses:
- '200':
- description: List of GitHub accounts
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/GitHubAccount'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/github/accounts/authorize:
- get:
- x-scalar-ignore: true
- summary: Authorize Porter to access a GitHub account
- description: Authorizes Porter to access a GitHub account
- operationId: authorize_github_account
- security:
- - bearerAuth:
- - developer
- responses:
- '302':
- description: Redirects to GitHub app installation page
- headers:
- Location:
- schema:
- type: string
- description: GitHub app installation URL
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/github/accounts/{github_account_name}/unauthorize:
- get:
- x-scalar-ignore: true
- summary: Remove Porter's access to a GitHub account
- description: Removes Porter's access to a GitHub account
- operationId: unauthorize_github_account
- security:
- - bearerAuth:
- - developer
- parameters:
- - name: github_account_name
- in: path
- description: Name of the GitHub account
- required: true
- schema:
- type: string
- responses:
- '200':
- description: GitHub account disconnected successfully
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/github/accounts/{github_account_name}/repositories:
- get:
- x-scalar-ignore: true
- summary: List repositories in a GitHub account
- description: Returns a list of repositories in a GitHub account that the user has access to
- operationId: list_github_account_repositories
- security:
- - bearerAuth:
- - viewer
- parameters:
- - name: github_account_name
- in: path
- description: Name of the GitHub account
- required: true
- schema:
- type: string
- responses:
- '200':
- description: List of repositories in the GitHub account
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/GitHubRepository'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/github/accounts/{github_account_name}/repositories/{github_repository_name}/branches:
- get:
- x-scalar-ignore: true
- summary: List branches in a GitHub repository
- description: Returns a list of branches in a GitHub repository
- operationId: list_github_repository_branches
- security:
- - bearerAuth:
- - viewer
- parameters:
- - name: github_account_name
- in: path
- description: Name of the GitHub account
- required: true
- schema:
- type: string
- - name: github_repository_name
- in: path
- description: Name of the GitHub repository
- required: true
- schema:
- type: string
- responses:
- '200':
- description: List of branches in the GitHub repository
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/GitHubBranch'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/github/accounts/{github_account_name}/repositories/{github_repository_name}/branches/{branch_name}/contents:
- get:
- x-scalar-ignore: true
- summary: List contents in a directory of a GitHub branch
- description: Returns a list of contents in a directory of a GitHub branch
- operationId: list_github_branch_contents
- security:
- - bearerAuth:
- - viewer
- parameters:
- - name: github_account_name
- in: path
- description: Name of the GitHub account
- required: true
- schema:
- type: string
- example: example
- - name: github_repository_name
- in: path
- description: Name of the GitHub repository
- required: true
- schema:
- type: string
- example: test
- - name: branch_name
- in: path
- description: Name of the GitHub branch
- required: true
- schema:
- type: string
- example: main
- - name: directory
- in: query
- description: Directory to list files in. If not provided, the root directory will be used.
- required: false
- schema:
- type: string
- example: ./
- - name: directories_only
- in: query
- description: Whether to only list directories. Defaults to false.
- required: false
- schema:
- type: boolean
- example: true
- responses:
- '200':
- description: List of contents in the directory of the GitHub repository branch
- content:
- application/json:
- schema:
- type: object
- required:
- - contents
- properties:
- contents:
- type: array
- items:
- $ref: '#/components/schemas/GitHubDirectoryItem'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/applications/{application_id}/metrics:
- parameters:
- - name: project_id
- in: path
- description: Project ID that the application belongs to
- required: true
- schema:
- type: integer
- - name: application_id
- in: path
- description: Application ID to query metrics for
- required: true
- schema:
- type: string
- get:
- x-scalar-ignore: true
- summary: Query application metrics
- description: Fetches time-series metrics for a specific application or its processes.
- operationId: application_metrics
- security:
- - bearerAuth:
- - viewer
- parameters:
- - name: process_name
- in: query
- description: Name of the specific process (e.g., server-web, celery-worker) within the application.
- required: true
- schema:
- type: string
- - name: start_time_utc
- in: query
- description: Start of the time range in UTC for the metrics query.
- required: true
- schema:
- type: string
- format: date-time
- - name: end_time_utc
- in: query
- description: End of the time range in UTC for the metrics query.
- required: true
- schema:
- type: string
- format: date-time
- - name: metric
- in: query
- description: Type of metric to query
- required: true
- schema:
- type: string
- enum:
- - cpu_usage
- - cpu_reserved
- - autoscaling_cpu_threshold
- - memory_usage
- - memory_reserved
- - autoscaling_memory_threshold
- - network_received_bytes_rate
- - network_transmitted_bytes_rate
- - application_process_instance_count
- - ingress_latency_p50
- - ingress_latency_p95
- - ingress_latency_p99
- - ingress_requests_by_status_code
- - ingress_latency_by_path
- - job_success_rate
- - job_duration_p50
- - job_duration_p90
- - job_duration_p99
- - job_duration
- - name: aggregate_function
- in: query
- description: Aggregation function for collapsing container-level series.
- required: false
- schema:
- type: string
- enum:
- - avg
- - sum
- - max
- - min
- - name: group_by
- in: query
- description: Labels to group by when separating time-series. Can be specified multiple times.
- required: false
- schema:
- type: array
- items:
- type: string
- enum:
- - application_contract_revision_id
- - application_process_instance_name
- - status_code
- - path
- - job_run_name
- style: form
- explode: true
- responses:
- '200':
- description: Time-series metrics data
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApplicationMetricsQueryResponse'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/applications/{application_id}/resource-optimization:
- parameters:
- - name: project_id
- in: path
- description: Project ID that the application belongs to
- required: true
- schema:
- type: integer
- - name: application_id
- in: path
- description: Application ID to query cost optimization for
- required: true
- schema:
- type: string
- - name: deployment_target_id
- in: query
- description: Deployment target ID to query cost optimization for
- required: true
- schema:
- type: string
- - name: start_time_utc
- in: query
- description: Start of the time range in UTC for the resource optimization analysis.
- required: true
- schema:
- type: string
- format: date-time
- - name: end_time_utc
- in: query
- description: End of the time range in UTC for the resource optimization analysis.
- required: true
- schema:
- type: string
- format: date-time
- get:
- x-scalar-ignore: true
- summary: Get resource optimization recommendations for applications
- description: Fetches resource optimization recommendations for a specific application.
- operationId: resource_optimization_analysis
- security:
- - bearerAuth:
- - viewer
- tags:
- - experimental
- responses:
- '200':
- description: Resource optimization recommendations
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ResourceOptimizationAnalysis'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/applications/{application_id}/cancel-predeploy-job:
- parameters:
- - name: project_id
- in: path
- description: Project ID that the application belongs to
- required: true
- schema:
- type: integer
- - name: application_id
- in: path
- description: Application ID to query cost optimization for
- required: true
- schema:
- type: string
- post:
- x-scalar-ignore: true
- summary: Cancel a predeploy job for an application
- description: Cancels a predeploy job for an application.
- operationId: application_cancel_predeploy_job
- security:
- - bearerAuth:
- - developer
- requestBody:
- content:
- application/json:
- schema:
- type: object
- properties:
- application_revision_id:
- type: string
- description: The ID of the application revision to cancel the predeploy job for
- required:
- - application_revision_id
- responses:
- '200':
- description: Predeploy job canceled successfully
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/clusters/{cluster_id}/vpn:
- parameters:
- - name: project_id
- in: path
- description: Project ID that the cluster belongs to
- required: true
- schema:
- type: integer
- - name: cluster_id
- in: path
- description: Cluster ID to query VPN configuration for
- required: true
- schema:
- type: integer
- get:
- x-scalar-ignore: true
- summary: Get VPN configuration for a cluster
- description: Fetches the VPN configuration for a specific cluster.
- operationId: vpn_config
- security:
- - bearerAuth:
- - viewer
- responses:
- '200':
- description: VPN configuration
- content:
- application/json:
- schema:
- type: object
- properties:
- oauth_client_id:
- type: string
- description: The OAuth client ID
- services:
- type: array
- description: List of VPN services
- items:
- $ref: '#/components/schemas/VpnService'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- x-scalar-ignore: true
- summary: Update VPN configuration for a project
- description: Updates the VPN configuration for a specific project.
- operationId: vpn_update
- security:
- - bearerAuth:
- - developer
- requestBody:
- content:
- application/json:
- schema:
- type: object
- properties:
- oauth_client_id:
- type: string
- oauth_client_secret:
- type: string
- required:
- - oauth_client_id
- - oauth_client_secret
- responses:
- '200':
- description: VPN configuration updated successfully
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- delete:
- x-scalar-ignore: true
- summary: Delete VPN credentials for a cluster
- description: Deletes the VPN OAuth credentials for a specific cluster.
- operationId: vpn_delete
- security:
- - bearerAuth:
- - developer
- responses:
- '200':
- description: VPN credentials deleted successfully
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/clusters/{cluster_id}/gcp-service-accounts:
- get:
- parameters:
- - name: project_id
- in: path
- description: Project ID that the cluster belongs to
- required: true
- schema:
- type: integer
- - name: cluster_id
- in: path
- description: Cluster ID to list GCP service accounts for
- required: true
- schema:
- type: integer
- tags:
- - Clusters
- x-scalar-stability: experimental
- summary: List GCP service accounts
- description: List GCP service accounts connected to a specific cluster.
- operationId: list_gcp_service_accounts
- security:
- - bearerAuth:
- - developer
- responses:
- '200':
- description: GCP service accounts retrieved successfully
- content:
- application/json:
- schema:
- type: object
- required:
- - service_accounts
- properties:
- service_accounts:
- type: array
- description: List of GCP service accounts connected to the cluster
- items:
- $ref: '#/components/schemas/ServiceAccountConnection'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- parameters:
- - name: project_id
- in: path
- description: Project ID that the cluster belongs to
- required: true
- schema:
- type: integer
- - name: cluster_id
- in: path
- description: Cluster ID to connect the GCP service account to
- required: true
- schema:
- type: integer
- tags:
- - Clusters
- x-scalar-stability: experimental
- summary: Connect GCP service account
- description: |
- Connect a GCP service account to a specific cluster by uploading the service account credentials.
- Note that uploading credentials for a service account name with existing credentials will overwrite those credentials.
- However, any applications using the existing service account must be manually redeployed to pick up the new credentials.
- operationId: connect_gcp_service_account
- security:
- - bearerAuth:
- - admin
- requestBody:
- content:
- application/json:
- schema:
- type: object
- properties:
- service_account_name:
- type: string
- description: Name to identify the service account within Porter. Must only contain alphanumeric characters and dashes and be a maximum of 30 characters.
- example: porter-service-account
- service_account_credentials:
- type: string
- description: Base64 encoded JSON string of the service account credentials
- example: ewogICJ0eXBlIjogInNlcnZpY2VfYWNjb3VudCIsCiAgInByb2plY3RfaWQiOiAicHJvamVjdC0xMjMiLAogICJwcml2YXRlX2tleV9pZCI6ICIxMjM0NTY3ODkwMTIzNDU2Nzg5MDEiLAogICJwcml2YXRlX2tleSI6ICItLS0tLUJFR0lOIFBSSVZBVEUgS0VZLS0tLS1cbi4uLnByaXZhdGUta2V5LWNvbnRlbnQuLi5cbi0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS1cbiIsCiAgImNsaWVudF9lbWFpbCI6ICJzZXJ2aWNlLWFjY291bnRAcHJvamVjdC0xMjMuaWFtLmdzZXJ2aWNlYWNjb3VudC5jb20iLAogICJjbGllbnRfaWQiOiAiMTIzNDU2Nzg5MDEyMzQ1Njc4OTAxIiwKICAiYXV0aF91cmkiOiAiaHR0cHM6Ly9hY2NvdW50cy5nb29nbGUuY29tL28vb2F1dGgyL2F1dGgiLAogICJ0b2tlbl91cmkiOiAiaHR0cHM6Ly9vYXV0aDIuZ29vZ2xlYXBpcy5jb20vdG9rZW4iLAogICJhdXRoX3Byb3ZpZGVyX3g1MDlfY2VydF91cmwiOiAiaHR0cHM6Ly93d3cuZ29vZ2xlYXBpcy5jb20vb2F1dGgyL3YxL2NlcnRzIiwKICAiY2xpZW50X3g1MDlfY2VydF91cmwiOiAiaHR0cHM6Ly93d3cuZ29vZ2xlYXBpcy5jb20vcm9ib3QvdjEvbWV0YWRhdGEveDUwOS9zZXJ2aWNlLWFjY291bnQlNDBwcm9qZWN0LTEyMy5pYW0uZ3NlcnZpY2VhY2NvdW50LmNvbSIsCiAgInVuaXZlcnNlX2RvbWFpbiI6ICJnb29nbGVhcGlzLmNvbSIKfQ==
- required:
- - service_account_name
- - service_account_credentials
- responses:
- '200':
- description: GCP service account credentials uploaded successfully
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/datastores:
- post:
- x-scalar-ignore: true
- operationId: create_datastore
- security:
- - bearerAuth:
- - developer
- tags:
- - Datastores
- summary: Create a datastore in a project
- description: |
- Creates a datastore in a specific project.
- parameters:
- - name: project_id
- in: path
- description: Project ID to fetch datastores for
- required: true
- schema:
- type: integer
- format: int64
- minimum: 1
- example: 123
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/DatastoreCreateRequest'
- responses:
- '200':
- description: Datastore created successfully
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Datastore'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- get:
- x-scalar-ignore: true
- operationId: list_datastores
- security:
- - bearerAuth:
- - viewer
- tags:
- - Datastores
- summary: Get datastores for a project
- description: |
- Retrieves datastores for a specific project. Can filter by name to find a specific datastore.
- When filtering by name, returns the datastore that matches the exact name.
- parameters:
- - name: project_id
- in: path
- description: Project ID to fetch datastores for
- required: true
- schema:
- type: integer
- format: int64
- minimum: 1
- example: 123
- - name: deployment_target_id
- in: query
- description: Deployment target ID to scope datastores to a preview environment
- required: false
- schema:
- type: string
- format: uuid
- x-go-type: uuid.UUID
- responses:
- '200':
- description: Datastores retrieved successfully
- content:
- application/json:
- schema:
- type: object
- required:
- - datastores
- properties:
- datastores:
- type: array
- items:
- $ref: '#/components/schemas/Datastore'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/datastores/snapshots:
- get:
- x-scalar-ignore: true
- operationId: list_datastore_snapshots
- security:
- - bearerAuth:
- - developer
- tags:
- - Datastores
- summary: List datastore snapshots
- description: |
- Retrieves snapshots for datastores in a specific project.
- Filters by datastore kind (RDS or Aurora) and region.
- parameters:
- - name: project_id
- in: path
- description: Project ID to fetch snapshots for
- required: true
- schema:
- type: integer
- format: uint
- minimum: 0
- example: 123
- - name: kind
- in: query
- description: Datastore kind to filter snapshots
- required: true
- schema:
- $ref: '#/components/schemas/DatastoreKind'
- example: rds
- - name: region
- in: query
- description: AWS region to list snapshots from
- required: true
- schema:
- type: string
- example: us-east-1
- - name: cloud_account_id
- in: query
- description: Cloud account ID to use for accessing snapshots
- required: true
- schema:
- type: string
- format: uuid
- x-go-type: uuid.UUID
- example: 550e8400-e29b-41d4-a716-446655440000
- responses:
- '200':
- description: Snapshots retrieved successfully
- content:
- application/json:
- schema:
- type: object
- required:
- - snapshots
- properties:
- snapshots:
- type: array
- items:
- $ref: '#/components/schemas/DatastoreSnapshot'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/datastores/existing:
- get:
- x-scalar-ignore: true
- operationId: list_existing_datastores
- security:
- - bearerAuth:
- - developer
- tags:
- - Datastores
- summary: List existing datastores in cloud provider
- description: |
- Retrieves existing RDS instances or Aurora clusters from the cloud provider.
- This is used to list clusters that can be cloned from.
- parameters:
- - name: project_id
- in: path
- description: Project ID to fetch existing datastores for
- required: true
- schema:
- type: integer
- format: uint
- minimum: 0
- example: 123
- - name: kind
- in: query
- description: Datastore kind to filter existing datastores
- required: true
- schema:
- $ref: '#/components/schemas/DatastoreKind'
- example: aurora
- - name: region
- in: query
- description: AWS region to list existing datastores from
- required: true
- schema:
- type: string
- example: us-east-1
- - name: cloud_account_id
- in: query
- description: Cloud account ID to use for accessing datastores
- required: true
- schema:
- type: string
- format: uuid
- x-go-type: uuid.UUID
- example: 550e8400-e29b-41d4-a716-446655440000
- responses:
- '200':
- description: Existing datastores retrieved successfully
- content:
- application/json:
- schema:
- type: object
- required:
- - datastores
- properties:
- datastores:
- type: array
- items:
- $ref: '#/components/schemas/ExistingDatastore'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/datastores/options:
- get:
- x-scalar-ignore: true
- operationId: datastores_options
- security:
- - bearerAuth:
- - viewer
- tags:
- - Datastores
- summary: Get datastore configuration options
- description: |
- Retrieves available version options for datastores
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- format: uint
- minimum: 0
- example: 123
- - name: kind
- in: query
- description: Datastore kind to get information for
- required: true
- schema:
- $ref: '#/components/schemas/DatastoreKind'
- example: rds
- - name: cloud_account_id
- in: query
- description: Cloud account ID to use for accessing datastore information
- required: true
- schema:
- type: string
- format: uuid
- x-go-type: uuid.UUID
- example: 550e8400-e29b-41d4-a716-446655440000
- - name: region
- in: query
- description: AWS region to query for datastore options. If not provided, defaults to us-east-1
- required: true
- schema:
- type: string
- example: us-east-1
- responses:
- '200':
- description: Datastore options retrieved successfully
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/DatastoreOptions'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/datastores/{datastore_id}:
- parameters:
- - name: project_id
- in: path
- description: Project ID that the datastore belongs to
- required: true
- schema:
- type: integer
- format: uint
- - name: datastore_id
- in: path
- description: Datastore ID
- required: true
- schema:
- type: string
- x-go-type: uuid.UUID
- patch:
- x-scalar-ignore: true
- summary: Patch configuration for a datastore
- description: Patches the configuration for a specific datastore. An empty body will trigger a try of the update.
- operationId: patch_datastore
- security:
- - bearerAuth:
- - developer
- tags:
- - Datastores
- - Alpha
- parameters:
- - name: dry_run
- in: query
- description: When true, returns the patched configuration without applying changes
- required: false
- schema:
- type: boolean
- default: false
- example: false
- requestBody:
- required: false
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/DatastoreContractPatch'
- responses:
- '200':
- description: Datastore configuration patched successfully
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Datastore'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- get:
- x-scalar-ignore: true
- summary: Get datastore configuration
- description: Retrieves detailed configuration information for a specific datastore.
- operationId: get_datastore
- security:
- - bearerAuth:
- - viewer
- tags:
- - Datastores
- - Alpha
- responses:
- '200':
- description: Datastore configuration retrieved successfully
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Datastore'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- delete:
- x-scalar-ignore: true
- summary: Delete a datastore
- description: Deletes a datastore.
- operationId: delete_datastore
- security:
- - bearerAuth:
- - admin
- tags:
- - Datastores
- responses:
- '200':
- description: Datastore deleted successfully
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/datastores/{datastore_id}/credentials:
- get:
- x-scalar-ignore: true
- summary: Get credentials for a datastore
- description: Retrieves connection credentials for a specific datastore. Requires developer or admin access.
- operationId: get_datastore_credentials
- security:
- - bearerAuth:
- - developer
- tags:
- - Datastores
- - Alpha
- parameters:
- - name: project_id
- in: path
- description: Project ID that the datastore belongs to
- required: true
- schema:
- type: integer
- format: uint
- - name: datastore_id
- in: path
- description: Datastore ID
- required: true
- schema:
- type: string
- x-go-type: uuid.UUID
- - name: reveal
- in: query
- description: When true, returns plaintext sensitive credentials. Omitting or false returns masked values.
- required: false
- schema:
- type: boolean
- responses:
- '200':
- description: Datastore credentials retrieved successfully
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/DatastoreCredential'
- '403':
- description: Insufficient permissions — developer or admin access is required
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/datastores/{datastore_id}/connected-apps:
- get:
- x-scalar-ignore: true
- summary: List apps connected to a datastore
- description: Returns the apps consuming this datastore via injected credentials, with their latest revision status.
- operationId: list_datastore_connected_apps
- security:
- - bearerAuth:
- - viewer
- tags:
- - Datastores
- - Alpha
- parameters:
- - name: project_id
- in: path
- description: Project ID that the datastore belongs to
- required: true
- schema:
- type: integer
- format: uint
- - name: datastore_id
- in: path
- description: Datastore ID
- required: true
- schema:
- type: string
- x-go-type: uuid.UUID
- responses:
- '200':
- description: Connected apps retrieved successfully
- content:
- application/json:
- schema:
- type: object
- required:
- - connected_apps
- properties:
- connected_apps:
- type: array
- items:
- $ref: '#/components/schemas/DatastoreConnectedApp'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/datastores/{datastore_id}/deletion-protection:
- put:
- x-scalar-ignore: true
- summary: Set deletion protection for a datastore
- description: Enables or disables deletion protection on the datastore's underlying cloud resource.
- operationId: set_datastore_deletion_protection
- security:
- - bearerAuth:
- - admin
- tags:
- - Datastores
- - Alpha
- parameters:
- - name: project_id
- in: path
- description: Project ID that the datastore belongs to
- required: true
- schema:
- type: integer
- format: uint
- - name: datastore_id
- in: path
- description: Datastore ID
- required: true
- schema:
- type: string
- x-go-type: uuid.UUID
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/DatastoreDeletionProtection'
- responses:
- '200':
- description: Deletion protection updated successfully
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/DatastoreDeletionProtection'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/datastores/{datastore_id}/metrics:
- get:
- x-scalar-ignore: true
- operationId: datastore_metrics
- security:
- - bearerAuth:
- - viewer
- tags:
- - Datastore Metrics
- summary: Get datastore performance metrics
- description: |
- Retrieves comprehensive performance metrics for a specific datastore including
- CPU utilization, memory usage, and disk usage over a specified time period.
-
- All metrics include average, maximum, and minimum values with 5-minute granularity.
- parameters:
- - name: project_id
- in: path
- description: Project ID that the datastore belongs to
- required: true
- schema:
- type: integer
- format: uint
- minimum: 0
- example: 123
- - name: datastore_id
- in: path
- description: RDS instance identifier
- required: true
- schema:
- type: string
- format: uuid
- - name: start_time
- in: query
- description: Start time for metrics collection in ISO 8601 format (UTC). If not provided, defaults to 1 hour ago.
- required: false
- schema:
- type: string
- format: date-time
- example: '2025-01-30T12:00:00Z'
- - name: end_time
- in: query
- description: End time for metrics collection in ISO 8601 format (UTC). If not provided, defaults to current time.
- required: false
- schema:
- type: string
- format: date-time
- example: '2025-01-30T12:00:00Z'
- responses:
- '200':
- description: Datastore metrics retrieved successfully
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/DatastoreMetrics'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/object-storage:
- get:
- operationId: list_object_storage
- security:
- - bearerAuth:
- - developer
- tags:
- - Storage
- summary: List object storage resources in a project
- description: |
- Lists all object storage resources in a specific project.
- parameters:
- - name: project_id
- in: path
- description: Project ID to list object storage from
- required: true
- schema:
- type: integer
- format: int64
- minimum: 1
- example: 123
- responses:
- '200':
- description: Object storage list retrieved successfully
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ObjectStorageListResponse'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- operationId: create_object_storage
- security:
- - bearerAuth:
- - developer
- tags:
- - Storage
- summary: Create an object storage resource in a project
- description: |
- Creates an object storage resource in a specific project.
- parameters:
- - name: project_id
- in: path
- description: Project ID to create object storage in
- required: true
- schema:
- type: integer
- format: int64
- minimum: 1
- example: 123
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ObjectStorageCreateRequest'
- responses:
- '200':
- description: Object storage created successfully
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ObjectStorage'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/object-storage/{storage_id}:
- patch:
- operationId: update_object_storage
- security:
- - bearerAuth:
- - developer
- tags:
- - Storage
- summary: Update an object storage resource
- description: |
- Updates an object storage resource in a specific project. Currently supports updating connected cluster IDs.
- parameters:
- - name: project_id
- in: path
- description: Project ID that the object storage belongs to
- required: true
- schema:
- type: integer
- format: int64
- minimum: 1
- example: 123
- - name: storage_id
- in: path
- description: ID of the object storage to update
- required: true
- schema:
- type: string
- format: uuid
- example: a7f8c2e1-9b4d-4c3a-8e2f-1d5a6b7c8d9e
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ObjectStorageUpdateRequest'
- responses:
- '200':
- description: Object storage updated successfully
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ObjectStorage'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- delete:
- operationId: delete_object_storage
- security:
- - bearerAuth:
- - developer
- tags:
- - Storage
- summary: Delete an object storage resource
- description: |
- Deletes an object storage resource from a specific project.
- parameters:
- - name: project_id
- in: path
- description: Project ID that the object storage belongs to
- required: true
- schema:
- type: integer
- format: int64
- minimum: 1
- example: 123
- - name: storage_id
- in: path
- description: ID of the object storage to delete
- required: true
- schema:
- type: string
- format: uuid
- example: a7f8c2e1-9b4d-4c3a-8e2f-1d5a6b7c8d9e
- responses:
- '204':
- description: Object storage deleted successfully
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/notifications/pagerduty:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- get:
- x-scalar-ignore: true
- summary: Get PagerDuty integration
- description: Returns the PagerDuty integration configuration for a project
- operationId: pager_duty_integration
- security:
- - bearerAuth:
- - developer
- tags:
- - Notifications
- parameters:
- - name: pagerduty_integration_id
- in: query
- description: Unique identifier for the PagerDuty integration
- required: true
- schema:
- type: string
- format: uuid
- x-go-type: uuid.UUID
- responses:
- '200':
- description: PagerDuty integration configuration
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/PagerDutyIntegration'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- patch:
- x-scalar-ignore: true
- summary: Update PagerDuty integration
- description: Updates the PagerDuty integration configuration for a project
- operationId: update_pager_duty_integration
- security:
- - bearerAuth:
- - developer
- tags:
- - Notifications
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- required:
- - routing_key
- - pagerduty_integration_id
- - name
- properties:
- routing_key:
- type: string
- description: Routing key secret for sending PagerDuty events
- example: secret_goes_here
- pagerduty_integration_id:
- type: string
- description: Unique identifier for the PagerDuty integration
- format: uuid
- x-go-type: uuid.UUID
- name:
- type: string
- description: The name of the integration
- example: Staging
- responses:
- '204':
- description: Integration updated successfully
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- x-scalar-ignore: true
- summary: Create project integration
- description: Creates a new integration for a project
- operationId: create_pager_duty_integration
- security:
- - bearerAuth:
- - developer
- tags:
- - Notifications
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/PagerDutyIntegration'
- responses:
- '204':
- description: Integration created successfully
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/notifications/email:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- post:
- x-scalar-ignore: true
- summary: Create email integration
- description: Creates a new email integration for a project
- operationId: create_email_integration
- security:
- - bearerAuth:
- - developer
- tags:
- - Notifications
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/EmailIntegration'
- responses:
- '204':
- description: Integration created successfully
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/notifications/email/{email_integration_id}:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- - name: email_integration_id
- in: path
- description: Unique identifier for the email integration
- required: true
- schema:
- type: string
- format: uuid
- x-go-type: uuid.UUID
- get:
- x-scalar-ignore: true
- summary: Get email integration
- description: Returns the email integration configuration for a project
- operationId: email_integration
- security:
- - bearerAuth:
- - developer
- tags:
- - Notifications
- responses:
- '200':
- description: Email integration configuration
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/EmailIntegration'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- patch:
- x-scalar-ignore: true
- summary: Update email integration
- description: Updates the email integration configuration for a project
- operationId: update_email_integration
- security:
- - bearerAuth:
- - developer
- tags:
- - Notifications
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- required:
- - email
- - name
- properties:
- email:
- type: string
- format: email
- description: The email address of the integration
- name:
- type: string
- description: The name of the integration
- example: Staging
- responses:
- '204':
- description: Integration updated successfully
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/notifications/emails/callback:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- get:
- x-scalar-ignore: true
- summary: Verify email integration
- description: Verifies email integration using secret and redirects to project settings
- operationId: verify_email_integration
- security:
- - bearerAuth:
- - developer
- tags:
- - Notifications
- parameters:
- - name: secret
- in: query
- description: Verification secret sent via email
- required: true
- schema:
- type: string
- example: a1b2c3d4e5f6789...
- responses:
- '302':
- description: Redirect to project settings on successful verification
- headers:
- Location:
- description: Redirect URL to project settings
- schema:
- type: string
- example: /project-settings
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/notifications/slack:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- post:
- x-scalar-ignore: true
- summary: Initiate Slack OAuth integration
- description: Generates and returns a Slack OAuth authorization URL to begin integration setup
- operationId: initiate_slack_integration
- security:
- - bearerAuth:
- - developer
- tags:
- - Notifications
- responses:
- '200':
- description: OAuth initiation successful, returns redirect URL
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SlackOAuthInitiateResponse'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/notifications/slack/{slack_integration_id}:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- - name: slack_integration_id
- in: path
- description: Unique identifier for the Slack integration
- required: true
- schema:
- type: string
- format: uuid
- x-go-type: uuid.UUID
- get:
- x-scalar-ignore: true
- summary: Get Slack integration
- description: Returns the Slack integration configuration for a project
- operationId: slack_integration
- security:
- - bearerAuth:
- - developer
- tags:
- - Notifications
- responses:
- '200':
- description: Slack integration configuration
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SlackIntegration'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- patch:
- x-scalar-ignore: true
- summary: Update Slack integration
- description: Updates the Slack integration configuration for a project
- operationId: update_slack_integration
- security:
- - bearerAuth:
- - developer
- tags:
- - Notifications
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SlackUpdateRequestBody'
- responses:
- '204':
- description: Integration updated successfully
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/notifications/slack/{slack_integration_id}/reconfigure:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- - name: slack_integration_id
- in: path
- description: Unique identifier for the Slack integration
- required: true
- schema:
- type: string
- format: uuid
- x-go-type: uuid.UUID
- post:
- x-scalar-ignore: true
- summary: Reconfigure Slack OAuth integration
- description: Generates a Slack OAuth authorization URL that, upon callback, updates the existing Slack integration instead of creating a new one
- operationId: reconfigure_slack_integration
- security:
- - bearerAuth:
- - developer
- tags:
- - Notifications
- responses:
- '200':
- description: OAuth initiation successful, returns redirect URL
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SlackOAuthInitiateResponse'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/slack/oauth/callback:
- get:
- x-scalar-ignore: true
- summary: Handle Slack OAuth callback
- description: Handles the OAuth callback from Slack and creates/updates the integration
- operationId: slack_o_auth_callback
- tags:
- - Notifications
- parameters:
- - name: code
- in: query
- description: OAuth authorization code from Slack
- required: true
- schema:
- type: string
- - name: state
- in: query
- description: CSRF protection state parameter
- required: true
- schema:
- type: string
- - name: error
- in: query
- description: OAuth error if authorization was denied
- required: false
- schema:
- type: string
- responses:
- '302':
- description: Redirect to project settings on successful OAuth completion
- headers:
- Location:
- description: Redirect URL to project settings
- schema:
- type: string
- example: /project-settings
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/notification-configs:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- get:
- x-scalar-ignore: true
- summary: Get notification configs
- description: Returns the notification configs for a project
- operationId: list_notification_configs
- security:
- - bearerAuth:
- - developer
- tags:
- - Notifications
- parameters:
- - name: application_id
- in: query
- description: Unique identifier for the application id to filter by
- schema:
- type: string
- format: uuid
- x-go-type: uuid.UUID
- responses:
- '200':
- description: Notification config details
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ListNotificationConfigsResponseBody'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/notification-config:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- post:
- x-scalar-ignore: true
- summary: Update notification config
- description: Updates the notification config for the provided id
- operationId: update_notification_config
- security:
- - bearerAuth:
- - developer
- tags:
- - Notifications
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UpdateNotificationConfigRequestBody'
- responses:
- '200':
- description: notification config details
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/NotificationConfig'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- delete:
- x-scalar-ignore: true
- summary: Delete notification config
- description: Deletes the notification config for the provided id
- operationId: delete_notification_config
- security:
- - bearerAuth:
- - developer
- tags:
- - Notifications
- parameters:
- - name: id
- in: query
- description: Unique identifier for the notification config
- required: true
- schema:
- type: integer
- responses:
- '204':
- description: Notification config deleted successfully
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/helm-default-values:
- get:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- example: 123
- - name: repository_url
- in: query
- description: Helm chart repository URL
- required: true
- schema:
- type: string
- format: uri
- example: https://charts.helm.sh/stable
- - name: chart_name
- in: query
- description: Name of the Helm chart
- required: true
- schema:
- type: string
- example: mysql
- - name: version
- in: query
- description: Version of the Helm chart
- required: true
- schema:
- type: string
- example: 9.4.6
- summary: Get Helm chart default values
- description: Retrieves the default values for a Helm chart from a repository and returns them as base64 encoded YAML
- operationId: get_helm_default_values
- x-scalar-stability: experimental
- x-scalar-ignore: true
- security:
- - bearerAuth:
- - viewer
- tags:
- - Helm
- responses:
- '200':
- description: Helm chart default values retrieved successfully
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/GetHelmDefaultValuesResponseBody'
- '404':
- description: Helm chart not found
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ChartNotFoundError'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/integrations/temporal:
- parameters:
- - name: project_id
- in: path
- description: Project ID to filter integrations by
- required: true
- schema:
- type: integer
- get:
- x-scalar-ignore: true
- summary: List temporal integrations
- description: Returns all temporal integrations for the project
- operationId: list_temporal_integrations
- security:
- - bearerAuth:
- - viewer
- tags:
- - Integrations
- responses:
- '200':
- description: List of temporal integrations
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ListTemporalIntegrationsResponseBody'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- x-scalar-ignore: true
- summary: Create temporal integration
- description: Creates a new temporal integration for the project
- operationId: create_temporal_integration
- security:
- - bearerAuth:
- - developer
- tags:
- - Integrations
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CreateTemporalIntegrationRequestBody'
- responses:
- '200':
- description: Temporal integration created successfully
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CreateTemporalIntegrationResponseBody'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/integrations/temporal/{temporal_integration_id}:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- - name: temporal_integration_id
- in: path
- description: Temporal integration ID
- required: true
- schema:
- type: string
- format: uuid
- delete:
- x-scalar-ignore: true
- summary: Delete temporal integration
- description: Deletes a temporal integration. Deletion is blocked if any apps still reference this integration.
- operationId: delete_temporal_integration
- security:
- - bearerAuth:
- - developer
- tags:
- - Integrations
- responses:
- '204':
- description: Temporal integration deleted successfully
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/integrations/temporal/{temporal_integration_id}/api-key:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- - name: temporal_integration_id
- in: path
- description: Temporal integration ID
- required: true
- schema:
- type: string
- format: uuid
- put:
- x-scalar-ignore: true
- summary: Update temporal integration API key
- description: Updates the API key for an existing temporal integration
- operationId: update_temporal_integration_api_key
- security:
- - bearerAuth:
- - developer
- tags:
- - Integrations
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UpdateTemporalIntegrationApiKeyRequestBody'
- responses:
- '204':
- description: API key updated successfully
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/integrations/workos/config:
- x-scalar-ignore: true
- post:
- summary: Update workos integration config
- description: Updates the workos integration config for the project
- operationId: update_workos_integration_config
- security:
- - bearerAuth:
- - admin
- tags:
- - Integrations
- parameters:
- - name: project_id
- in: path
- description: Project ID to filter integrations by
- required: true
- schema:
- type: integer
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UpdateWorkosIntegrationConfigRequestBody'
- responses:
- '204':
- description: Workos integration config updated successfully
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}:
- parameters:
- - name: project_id
- in: path
- description: Project ID to filter by
- required: true
- schema:
- type: integer
- get:
- x-scalar-ignore: true
- summary: Get project
- description: Returns a project by ID
- operationId: get_project
- security:
- - bearerAuth:
- - viewer
- tags:
- - Projects
- responses:
- '200':
- description: Project found
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/projects_Project'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/reject-user-jwt-tokens:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- put:
- x-scalar-ignore: true
- summary: Update user JWT token rejection
- description: Sets whether user-scoped JWT tokens are rejected for the project.
- operationId: update_reject_user_jwt_tokens
- security:
- - bearerAuth:
- - admin
- tags:
- - Projects
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- required:
- - reject_user_jwt_tokens
- properties:
- reject_user_jwt_tokens:
- type: boolean
- description: True to reject user-scoped JWT tokens for this project.
- responses:
- '200':
- description: Updated
- content:
- application/json:
- schema:
- type: object
- required:
- - reject_user_jwt_tokens
- properties:
- reject_user_jwt_tokens:
- type: boolean
- description: The updated value.
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/user-jwt-token-usage:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- get:
- x-scalar-ignore: true
- summary: List recent legacy JWT token usage
- description: |
- Returns project members who authenticated with a legacy user-scoped JWT token within the last week, so admins can see who would be affected before disabling them.
- operationId: list_user_jwt_token_usage
- security:
- - bearerAuth:
- - admin
- tags:
- - Projects
- responses:
- '200':
- description: Members with recent legacy JWT token usage
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UserJwtTokenUsageResponse'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/maintenance-windows:
- get:
- x-scalar-ignore: true
- operationId: get_maintenance_window
- security:
- - bearerAuth:
- - viewer
- summary: Get maintenance window for a project
- description: Retrieves the maintenance window configuration for a specific project.
- parameters:
- - name: project_id
- in: path
- description: Project ID to fetch the maintenance window for
- required: true
- schema:
- type: integer
- minimum: 1
- example: 123
- responses:
- '200':
- description: Maintenance window retrieved successfully
- content:
- application/json:
- schema:
- type: object
- properties:
- maintenance_window:
- $ref: '#/components/schemas/MaintenanceWindow'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- put:
- x-scalar-ignore: true
- operationId: upsert_maintenance_window
- security:
- - bearerAuth:
- - developer
- summary: Create or update maintenance window for a project
- description: |
- Creates or updates the maintenance window configuration for a specific project.
- Since a project can only have one maintenance window, this operation will create
- a new window if none exists, or update the existing one.
- parameters:
- - name: project_id
- in: path
- description: Project ID to create or update the maintenance window for
- required: true
- schema:
- type: integer
- minimum: 1
- example: 123
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- required:
- - day_of_week
- - start_time
- properties:
- day_of_week:
- $ref: '#/components/schemas/DayOfWeek'
- example: sunday
- start_time:
- type: string
- format: date-time
- description: |
- Start time for the maintenance window in RFC 3339 format.
- The date component is ignored; only the time and timezone are significant.
- example: '0000-01-01T02:00:00Z'
- responses:
- '200':
- description: Maintenance window created or updated successfully
- content:
- application/json:
- schema:
- type: object
- required:
- - maintenance_window
- properties:
- maintenance_window:
- $ref: '#/components/schemas/MaintenanceWindow'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- delete:
- x-scalar-ignore: true
- operationId: delete_maintenance_window
- security:
- - bearerAuth:
- - developer
- summary: Delete maintenance window for a project
- description: Deletes the maintenance window for a specific project
- parameters:
- - name: project_id
- in: path
- description: Project ID to delete the maintenance window for
- required: true
- schema:
- type: integer
- minimum: 1
- example: 123
- responses:
- '200':
- description: Maintenance window deleted successfully
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/clusters/{cluster_id}/addons/{addon_name}:
- get:
- x-scalar-ignore: true
- operationId: get_addon
- security:
- - bearerAuth:
- - viewer
- tags:
- - Addons
- - Alpha
- summary: Get an addon by name
- description: |
- Returns the configuration for a specific addon in a project.
- parameters:
- - name: project_id
- in: path
- required: true
- schema:
- type: integer
- format: int
- minimum: 1
- - name: cluster_id
- in: path
- required: true
- schema:
- type: integer
- format: int
- minimum: 1
- - name: addon_name
- in: path
- required: true
- schema:
- type: string
- minLength: 1
- responses:
- '200':
- description: Addon configuration
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Addon'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/addons:
- post:
- x-scalar-ignore: true
- operationId: update_addon
- security:
- - bearerAuth:
- - developer
- tags:
- - Addons
- - Alpha
- summary: Update an addon in a project
- description: |
- Updates an addon in a specific project. Supports both managed and custom addons.
- Custom addons are deployed using Helm charts with customizable values.
- parameters:
- - name: project_id
- in: path
- description: Project ID to update the addon for
- required: true
- schema:
- type: integer
- format: int64
- minimum: 1
- example: 123
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/AddonsUpdateRequest'
- responses:
- '200':
- description: Addon updated successfully
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Addon'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/addons/logs:
- get:
- x-scalar-ignore: true
- operationId: list_addon_logs
- security:
- - bearerAuth:
- - viewer
- tags:
- - Addons
- summary: List logs for addon workloads
- description: |
- Returns logs for addon pods within the specified time window.
- parameters:
- - name: project_id
- in: path
- required: true
- schema:
- type: integer
- format: int
- minimum: 1
- - name: cluster_id
- in: query
- required: true
- schema:
- type: integer
- format: int
- minimum: 1
- - name: namespace
- in: query
- required: true
- schema:
- type: string
- - name: pod_name_pattern
- in: query
- description: Regex pattern matching pod names (e.g. "helm-dashboard.*")
- schema:
- type: string
- - name: start_time_utc
- in: query
- schema:
- type: string
- format: date-time
- - name: end_time_utc
- in: query
- schema:
- type: string
- format: date-time
- - name: limit
- in: query
- schema:
- type: integer
- format: int
- minimum: 1
- maximum: 5000
- - name: search_param
- in: query
- schema:
- type: string
- - name: newest_first
- in: query
- schema:
- type: boolean
- responses:
- '200':
- description: Addon logs
- content:
- application/json:
- schema:
- type: object
- required:
- - logs
- properties:
- logs:
- type: array
- items:
- $ref: '#/components/schemas/AddonLog'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/clusters/{cluster_id}/namespaces/{namespace}/addons/{addon_name}/deployments:
- get:
- x-scalar-ignore: true
- operationId: list_addon_deployments
- security:
- - bearerAuth:
- - viewer
- tags:
- - Addons
- summary: List deployment history for an addon
- description: |
- Returns the revision history for an addon, showing every Helm chart revision deployed.
- parameters:
- - name: project_id
- in: path
- required: true
- schema:
- type: integer
- format: int
- minimum: 1
- - name: cluster_id
- in: path
- required: true
- schema:
- type: integer
- format: int
- minimum: 1
- - name: namespace
- in: path
- required: true
- schema:
- type: string
- minLength: 1
- - name: addon_name
- in: path
- required: true
- schema:
- type: string
- minLength: 1
- responses:
- '200':
- description: Deployment history
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/AddonDeploymentsResponse'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/images/repositories:
- get:
- parameters:
- - name: project_id
- in: path
- description: Project ID to filter images by
- required: true
- schema:
- type: integer
- example: 123
- - name: cloud_account_id
- in: query
- description: Cloud account ID (UUID) to filter registries by
- required: true
- schema:
- type: string
- format: uuid
- example: 123e4567-e89b-12d3-a456-426614174000
- - name: region
- in: query
- description: Region to filter registries by (e.g., us-east-1 for AWS, us-central1 for GCP, eastus for Azure)
- required: false
- schema:
- type: string
- example: us-east-1
- x-scalar-ignore: true
- tags:
- - Images
- summary: List image repositories for a specific cloud account and region
- description: Returns a list of image repositories from a specific cloud account filtered by region. All three cloud providers encode region in their registry URLs (AWS ECR format is account.dkr.ecr.region.amazonaws.com, GCP GAR is region-docker.pkg.dev, and Azure ACR is p{project}loc{region}sub{subscription}.azurecr.io).
- operationId: list_image_repositories
- security:
- - bearerAuth:
- - developer
- responses:
- '200':
- description: List of image repositories
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ImageRepositoriesList'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/images/repositories/{uri}/tags:
- get:
- parameters:
- - name: project_id
- in: path
- description: Project ID that the image belongs to
- required: true
- schema:
- type: integer
- example: 123
- - name: uri
- in: path
- description: URI of the image repository to get tags for (URL-encoded)
- required: true
- schema:
- type: string
- example: 123456789.dkr.ecr.us-east-1.amazonaws.com%2Fmy-app
- x-scalar-ignore: true
- tags:
- - Images
- summary: List tags for a specific image repository
- description: Returns a list of tags for a given image repository URI. The URI should be the full repository URI without the tag (e.g., 123456789.dkr.ecr.us-east-1.amazonaws.com/my-app) and should be URL-encoded.
- operationId: list_image_tags
- security:
- - bearerAuth:
- - developer
- responses:
- '200':
- description: List of image tags
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ImageTagsList'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/previews/environments:
- get:
- parameters:
- - name: project_id
- in: path
- description: Project ID to list preview environments for
- required: true
- schema:
- type: integer
- example: 123
- - name: cluster_id
- in: query
- description: Optional cluster ID to filter preview environments by
- required: false
- schema:
- type: integer
- example: 456
- x-scalar-ignore: true
- x-scalar-stability: experimental
- tags:
- - Previews
- summary: List preview environments
- description: Returns a lightweight list of preview deployment targets for the project
- operationId: list_preview_environments
- security:
- - bearerAuth:
- - viewer
- responses:
- '200':
- description: List of preview environments
- content:
- application/json:
- schema:
- type: object
- required:
- - preview_environments
- properties:
- preview_environments:
- type: array
- items:
- $ref: '#/components/schemas/PreviewEnvironmentListItem'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/previews/templates:
- get:
- parameters:
- - name: project_id
- in: path
- description: Project ID to list preview templates for
- required: true
- schema:
- type: integer
- example: 123
- - name: cluster_id
- in: query
- description: Optional cluster ID to filter preview templates by
- required: false
- schema:
- type: integer
- example: 456
- x-scalar-ignore: true
- x-scalar-stability: experimental
- tags:
- - Previews
- summary: List preview templates
- description: Returns a lightweight list of preview templates for the project
- operationId: list_preview_templates
- security:
- - bearerAuth:
- - viewer
- responses:
- '200':
- description: List of preview templates
- content:
- application/json:
- schema:
- type: object
- required:
- - preview_templates
- properties:
- preview_templates:
- type: array
- items:
- $ref: '#/components/schemas/PreviewTemplateListItem'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/cloud-environment-groups:
- get:
- x-scalar-ignore: true
- parameters:
- - name: project_id
- in: path
- description: Project ID to list cloud environment groups for
- required: true
- schema:
- type: integer
- summary: List cloud environment groups
- description: Returns a list of cloud environment group summaries for a project
- operationId: list_cloud_environment_groups
- security:
- - bearerAuth:
- - viewer
- tags:
- - Environment Groups
- responses:
- '200':
- description: List of cloud environment group summaries
- content:
- application/json:
- schema:
- type: object
- required:
- - environment_groups
- properties:
- environment_groups:
- type: array
- items:
- $ref: '#/components/schemas/CloudEnvironmentGroupSummary'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- x-scalar-ignore: true
- parameters:
- - name: project_id
- in: path
- description: Project ID to create the cloud environment group for
- required: true
- schema:
- type: integer
- summary: Create cloud environment group
- description: Creates a new cloud environment group with the specified name, type, variables, and secrets
- operationId: create_cloud_environment_group
- security:
- - bearerAuth:
- - developer
- tags:
- - Environment Groups
- requestBody:
- description: Cloud environment group creation details
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CreateCloudEnvironmentGroupRequest'
- responses:
- '200':
- description: Cloud environment group created successfully
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CloudEnvironmentGroup'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/cloud-environment-groups/{environment_group_name}:
- get:
- x-scalar-ignore: true
- parameters:
- - name: project_id
- in: path
- description: Project ID the environment group belongs to
- required: true
- schema:
- type: integer
- - name: environment_group_name
- in: path
- description: Name of the cloud environment group
- required: true
- schema:
- type: string
- - name: include_secret_values
- in: query
- description: When true, returns actual secret values instead of empty placeholders
- required: false
- schema:
- type: boolean
- summary: Get cloud environment group
- description: Returns full detail for a cloud environment group including variables and secrets
- operationId: get_cloud_environment_group
- security:
- - bearerAuth:
- - viewer
- tags:
- - Environment Groups
- responses:
- '200':
- description: Cloud environment group details
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CloudEnvironmentGroup'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- put:
- x-scalar-ignore: true
- parameters:
- - name: project_id
- in: path
- description: Project ID the environment group belongs to
- required: true
- schema:
- type: integer
- - name: environment_group_name
- in: path
- description: Name of the cloud environment group
- required: true
- schema:
- type: string
- summary: Update cloud environment group
- description: Updates variables and secrets for a cloud environment group and increments its version
- operationId: update_cloud_environment_group
- security:
- - bearerAuth:
- - developer
- tags:
- - Environment Groups
- requestBody:
- description: Cloud environment group update details
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UpdateCloudEnvironmentGroupRequest'
- responses:
- '200':
- description: Cloud environment group updated successfully
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CloudEnvironmentGroup'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- delete:
- x-scalar-ignore: true
- parameters:
- - name: project_id
- in: path
- description: Project ID the environment group belongs to
- required: true
- schema:
- type: integer
- - name: environment_group_name
- in: path
- description: Name of the cloud environment group
- required: true
- schema:
- type: string
- summary: Delete cloud environment group
- description: Deletes the environment group and related resources
- operationId: delete_cloud_environment_group
- security:
- - bearerAuth:
- - developer
- tags:
- - Environment Groups
- responses:
- '200':
- description: Cloud environment group deleted successfully
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/cloud-environment-groups/{environment_group_name}/sync-targets:
- put:
- x-scalar-ignore: true
- parameters:
- - name: project_id
- in: path
- description: Project ID the environment group belongs to
- required: true
- schema:
- type: integer
- - name: environment_group_name
- in: path
- description: Name of the cloud environment group
- required: true
- schema:
- type: string
- summary: Replace cloud environment group sync targets
- description: Replaces the set of clusters that an environment group syncs to. Does not change variables, files, or version.
- operationId: replace_cloud_environment_group_sync_targets
- security:
- - bearerAuth:
- - developer
- tags:
- - Environment Groups
- requestBody:
- description: Sync target cluster IDs
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ReplaceCloudEnvironmentGroupSyncTargetsRequest'
- responses:
- '200':
- description: Sync targets updated successfully
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ReplaceCloudEnvironmentGroupSyncTargetsResult'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/cloud-environment-groups/{environment_group_name}/versions:
- get:
- x-scalar-ignore: true
- parameters:
- - name: project_id
- in: path
- description: Project ID the environment group belongs to
- required: true
- schema:
- type: integer
- - name: environment_group_name
- in: path
- description: Name of the cloud environment group
- required: true
- schema:
- type: string
- summary: List cloud environment group versions
- description: Returns historical versions of a cloud environment group with resolved values
- operationId: list_cloud_environment_group_versions
- security:
- - bearerAuth:
- - viewer
- tags:
- - Environment Groups
- responses:
- '200':
- description: List of cloud environment group versions
- content:
- application/json:
- schema:
- type: object
- required:
- - versions
- properties:
- versions:
- type: array
- items:
- $ref: '#/components/schemas/CloudEnvironmentGroupVersion'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/cloud-environment-groups/{environment_group_name}/versions/{version}/revert:
- post:
- x-scalar-ignore: true
- parameters:
- - name: project_id
- in: path
- description: Project ID the environment group belongs to
- required: true
- schema:
- type: integer
- - name: environment_group_name
- in: path
- description: Name of the cloud environment group
- required: true
- schema:
- type: string
- - name: version
- in: path
- description: Version number to revert to
- required: true
- schema:
- type: integer
- summary: Revert cloud environment group to a version
- description: Re-applies a historical version's values as a new version
- operationId: revert_cloud_environment_group_version
- security:
- - bearerAuth:
- - admin
- tags:
- - Environment Groups
- responses:
- '200':
- description: Cloud environment group reverted successfully
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CloudEnvironmentGroup'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/clusters/{cluster_id}/rudder/config:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- - name: cluster_id
- in: path
- description: Cluster ID
- required: true
- schema:
- type: integer
- get:
- x-scalar-ignore: true
- summary: Get rudder config
- description: Get the rudder config for a cluster
- operationId: get_rudder_config
- security:
- - bearerAuth:
- - developer
- tags:
- - Rudder
- responses:
- '200':
- description: Rudder config
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/RudderConfig'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- put:
- x-scalar-ignore: true
- summary: Update rudder config
- description: Create or update the rudder config for a cluster
- operationId: update_rudder_config
- security:
- - bearerAuth:
- - developer
- tags:
- - Rudder
- requestBody:
- description: Updated config
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UpdateRudderConfigRequest'
- responses:
- '200':
- description: Rudder config updated
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/RudderConfig'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/clusters/{cluster_id}/rudder/sessions:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- - name: cluster_id
- in: path
- description: Cluster ID
- required: true
- schema:
- type: integer
- post:
- x-scalar-ignore: true
- summary: Create rudder session
- description: Start a new rudder debug session
- operationId: create_rudder_session
- security:
- - bearerAuth:
- - developer
- tags:
- - Rudder
- requestBody:
- description: Session context
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CreateRudderSessionRequest'
- responses:
- '200':
- description: Rudder session created
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/RudderSessionResult'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/clusters/{cluster_id}/rudder/sessions/{session_id}:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- - name: cluster_id
- in: path
- description: Cluster ID
- required: true
- schema:
- type: integer
- - name: session_id
- in: path
- description: Session ID
- required: true
- schema:
- type: string
- delete:
- x-scalar-ignore: true
- summary: Cancel rudder session
- description: Cancel a running debug session
- operationId: cancel_rudder_session
- security:
- - bearerAuth:
- - developer
- tags:
- - Rudder
- responses:
- '200':
- description: Rudder session cancelled
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/clusters/{cluster_id}/rudder/sessions/{session_id}/messages:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- - name: cluster_id
- in: path
- description: Cluster ID
- required: true
- schema:
- type: integer
- - name: session_id
- in: path
- description: Session ID
- required: true
- schema:
- type: string
- post:
- x-scalar-ignore: true
- summary: Send rudder message
- description: Send a follow-up message to a session
- operationId: send_rudder_message
- security:
- - bearerAuth:
- - developer
- tags:
- - Rudder
- requestBody:
- description: Message to send
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SendRudderMessageRequest'
- responses:
- '200':
- description: Message sent
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/clusters/{cluster_id}/rudder/sessions/{session_id}/interrupt:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- - name: cluster_id
- in: path
- description: Cluster ID
- required: true
- schema:
- type: integer
- - name: session_id
- in: path
- description: Session ID
- required: true
- schema:
- type: string
- post:
- x-scalar-ignore: true
- summary: Interrupt rudder session
- description: Cancel the current turn of a running debug session without ending it. Optionally queue a follow-up message so the agent resumes with extra context provided by the caller.
- operationId: interrupt_rudder_session
- security:
- - bearerAuth:
- - developer
- tags:
- - Rudder
- requestBody:
- description: Optional interrupt payload. Send `{}` to stop the current turn without supplying new input, or include a `message` to queue it as the next user turn.
- required: false
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/InterruptRudderSessionRequest'
- responses:
- '200':
- description: Session interrupted
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/clusters/{cluster_id}/rudder/sessions/{session_id}/logs:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- - name: cluster_id
- in: path
- description: Cluster ID
- required: true
- schema:
- type: integer
- - name: session_id
- in: path
- description: Session ID
- required: true
- schema:
- type: string
- - name: sequence_id
- in: query
- description: Optional sequence ID to resume streaming from. If provided, only events after this sequence ID will be streamed.
- required: false
- schema:
- type: string
- get:
- x-scalar-ignore: true
- summary: Stream rudder session logs
- description: Stream session logs via SSE
- operationId: stream_rudder_session_logs
- security:
- - bearerAuth:
- - developer
- tags:
- - Rudder
- responses:
- '200':
- description: SSE stream established
- content:
- text/event-stream:
- schema:
- type: string
- description: Log event stream
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/clusters/{cluster_id}/v1/sandbox:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- - name: cluster_id
- in: path
- description: Cluster ID
- required: true
- schema:
- type: integer
- get:
- x-scalar-ignore: true
- summary: List sandboxes
- description: List the sandboxes on a cluster, optionally filtered by name prefix, exact tag, phase, or image.
- operationId: list_sandboxes
- security:
- - bearerAuth:
- - developer
- tags:
- - Sandboxes
- parameters:
- - name: start_time
- in: query
- description: Filter to sandboxes created at or after this time.
- required: false
- schema:
- type: string
- format: date-time
- - name: end_time
- in: query
- description: Filter to sandboxes created before this time.
- required: false
- schema:
- type: string
- format: date-time
- - name: search
- in: query
- description: Filter by a prefix of the sandbox name.
- required: false
- schema:
- type: string
- - name: tag
- in: query
- description: Filter by tag, repeatable. Format key=value; results match all given tags.
- required: false
- schema:
- type: array
- items:
- type: string
- style: form
- explode: true
- example:
- - env=prod
- - owner=alice
- - name: phase
- in: query
- description: Filter by sandbox phase, repeatable; results match any provided phase.
- required: false
- schema:
- type: array
- items:
- type: string
- enum:
- - queued
- - creating
- - running
- - succeeded
- - failed
- - terminated
- x-go-type: sandboxapi.ListSandboxesParamsPhase
- x-go-type-import:
- name: sandboxapi
- path: github.com/porter-dev/code/sandbox/gen/sandboxapi
- style: form
- explode: true
- - name: image
- in: query
- description: Filter by exact image.
- required: false
- schema:
- type: string
- - name: include_filter_values
- in: query
- description: Include cluster-wide filter option values in the response.
- required: false
- schema:
- type: boolean
- default: false
- - $ref: '#/components/parameters/pagination'
- responses:
- '200':
- description: Matching sandboxes
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SandboxList'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/clusters/{cluster_id}/v1/sandbox/counts:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- - name: cluster_id
- in: path
- description: Cluster ID
- required: true
- schema:
- type: integer
- get:
- x-scalar-ignore: true
- summary: Count sandboxes over time
- description: Count the sandboxes on a cluster by creation time, bucketed over a window, using the same filters as the list endpoint.
- operationId: get_sandbox_counts
- security:
- - bearerAuth:
- - developer
- tags:
- - Sandboxes
- parameters:
- - name: start_time
- in: query
- description: Start of the window (inclusive). Defaults to 24h before end_time.
- required: false
- schema:
- type: string
- format: date-time
- - name: end_time
- in: query
- description: End of the window (exclusive). Defaults to now.
- required: false
- schema:
- type: string
- format: date-time
- - name: search
- in: query
- description: Filter by a prefix of the sandbox name.
- required: false
- schema:
- type: string
- - name: tag
- in: query
- description: Filter by tag, repeatable. Format key=value; results match all given tags.
- required: false
- schema:
- type: array
- items:
- type: string
- style: form
- explode: true
- example:
- - env=prod
- - owner=alice
- - name: phase
- in: query
- description: Filter by sandbox phase, repeatable; results match any provided phase.
- required: false
- schema:
- type: array
- items:
- type: string
- enum:
- - queued
- - creating
- - running
- - succeeded
- - failed
- - terminated
- x-go-type: sandboxapi.SandboxCountsParamsPhase
- x-go-type-import:
- name: sandboxapi
- path: github.com/porter-dev/code/sandbox/gen/sandboxapi
- style: form
- explode: true
- - name: image
- in: query
- description: Filter by exact image.
- required: false
- schema:
- type: string
- responses:
- '200':
- description: Sandbox creation counts over time
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SandboxCounts'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/clusters/{cluster_id}/v1/sandbox/run:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- - name: cluster_id
- in: path
- description: Cluster ID
- required: true
- schema:
- type: integer
- post:
- x-scalar-ignore: true
- summary: Create sandbox
- description: Create a sandbox on a cluster and queue it for execution.
- operationId: create_sandbox
- security:
- - bearerAuth:
- - developer
- tags:
- - Sandboxes
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SandboxCreateRequest'
- responses:
- '202':
- description: Sandbox created and queued
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SandboxCreateResult'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/clusters/{cluster_id}/v1/sandbox/usage:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- format: int64
- - name: cluster_id
- in: path
- description: Cluster ID
- required: true
- schema:
- type: integer
- format: int64
- post:
- x-scalar-ignore: true
- summary: Ingest sandbox usage
- description: Record the CPU and memory each running sandbox reserved over a measurement window, for billing. Called by the in-cluster sandbox control plane.
- operationId: ingest_sandbox_usage
- security:
- - bearerAuth:
- - developer
- tags:
- - Sandboxes
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SandboxUsageIngestRequest'
- responses:
- '202':
- description: Usage accepted
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/clusters/{cluster_id}/v1/sandbox/lookup:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- - name: cluster_id
- in: path
- description: Cluster ID
- required: true
- schema:
- type: integer
- get:
- x-scalar-ignore: true
- summary: Look up sandbox by name
- description: Resolve a sandbox name to its ID. Names are unique, so this returns at most one ID. All other sandbox operations address the sandbox by ID.
- operationId: lookup_sandbox
- security:
- - bearerAuth:
- - developer
- tags:
- - Sandboxes
- parameters:
- - name: name
- in: query
- description: Sandbox name to look up.
- required: true
- schema:
- type: string
- responses:
- '200':
- description: Resolved sandbox ID
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SandboxLookupResult'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/clusters/{cluster_id}/v1/sandbox/{sandbox_id}:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- - name: cluster_id
- in: path
- description: Cluster ID
- required: true
- schema:
- type: integer
- - name: sandbox_id
- in: path
- description: Sandbox ID
- required: true
- schema:
- type: string
- get:
- x-scalar-ignore: true
- summary: Get sandbox status
- description: Get the current status of a sandbox on a cluster.
- operationId: get_sandbox
- security:
- - bearerAuth:
- - developer
- tags:
- - Sandboxes
- responses:
- '200':
- description: Sandbox status
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Sandbox'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- delete:
- x-scalar-ignore: true
- summary: Terminate sandbox
- description: Terminate a sandbox on a cluster. The sandbox record is preserved as history.
- operationId: terminate_sandbox
- security:
- - bearerAuth:
- - developer
- tags:
- - Sandboxes
- responses:
- '204':
- description: Sandbox terminated
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/clusters/{cluster_id}/v1/sandbox/{sandbox_id}/logs:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- - name: cluster_id
- in: path
- description: Cluster ID
- required: true
- schema:
- type: integer
- - name: sandbox_id
- in: path
- description: Sandbox ID
- required: true
- schema:
- type: string
- get:
- x-scalar-ignore: true
- summary: Get sandbox logs
- description: Get logs from a sandbox. Logs persist after the sandbox is terminated.
- operationId: get_sandbox_logs
- security:
- - bearerAuth:
- - developer
- tags:
- - Sandboxes
- parameters:
- - name: limit
- in: query
- description: Maximum number of log lines to return
- required: false
- schema:
- type: integer
- default: 500
- maximum: 5000
- - name: since
- in: query
- description: Lookback duration (e.g. 1h, 30m, 6h)
- required: false
- schema:
- type: string
- default: 1h
- responses:
- '200':
- description: Sandbox logs
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SandboxLogs'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/clusters/{cluster_id}/v1/sandbox/{sandbox_id}/logs/stream:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- - name: cluster_id
- in: path
- description: Cluster ID
- required: true
- schema:
- type: integer
- - name: sandbox_id
- in: path
- description: Sandbox ID
- required: true
- schema:
- type: string
- get:
- x-scalar-ignore: true
- summary: Stream sandbox logs
- description: Server-Sent Events endpoint for streaming real-time sandbox logs.
- operationId: stream_sandbox_logs
- security:
- - bearerAuth:
- - developer
- tags:
- - Sandboxes
- parameters:
- - name: since
- in: query
- description: Lookback duration to backfill before tailing (e.g. 1h, 30m, 6h)
- required: false
- schema:
- type: string
- default: 1h
- responses:
- '200':
- description: log stream established
- content:
- text/event-stream:
- schema:
- type: string
- description: Real-time stream of sandbox logs
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/clusters/{cluster_id}/v1/sandbox/{sandbox_id}/exec:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- - name: cluster_id
- in: path
- description: Cluster ID
- required: true
- schema:
- type: integer
- - name: sandbox_id
- in: path
- description: Sandbox ID
- required: true
- schema:
- type: string
- post:
- x-scalar-ignore: true
- summary: Exec in sandbox
- description: Run a command in a running sandbox and return its output and exit code.
- operationId: exec_sandbox
- security:
- - bearerAuth:
- - developer
- tags:
- - Sandboxes
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SandboxExecRequest'
- responses:
- '200':
- description: Command result
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SandboxExecResult'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/clusters/{cluster_id}/v1/sandbox/{sandbox_id}/metrics-summary:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- - name: cluster_id
- in: path
- description: Cluster ID
- required: true
- schema:
- type: integer
- - name: sandbox_id
- in: path
- description: Sandbox ID
- required: true
- schema:
- type: string
- get:
- x-scalar-ignore: true
- summary: Get sandbox resource metrics
- description: p50/p90 CPU and memory usage for a running sandbox over a lookback window, with utilization percentages against the sandbox's limits.
- operationId: get_sandbox_metrics_summary
- security:
- - bearerAuth:
- - developer
- tags:
- - Sandboxes
- parameters:
- - name: since
- in: query
- description: Lookback duration for the summary (e.g. 1h, 30m, 6h). Minimum 3m, maximum 24h.
- required: false
- schema:
- type: string
- default: 1h
- responses:
- '200':
- description: Sandbox resource summary
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SandboxMetricsSummary'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/clusters/{cluster_id}/v1/sandbox/file-storage:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- - name: cluster_id
- in: path
- description: Cluster ID
- required: true
- schema:
- type: integer
- get:
- x-scalar-ignore: true
- summary: Get sandbox file storage
- description: Get the EFS-backed persistent disk shared by the cluster's sandboxes.
- operationId: get_sandbox_file_storage
- security:
- - bearerAuth:
- - developer
- tags:
- - Sandboxes
- responses:
- '200':
- description: Sandbox file storage
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SandboxFileStorage'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/clusters/{cluster_id}/v1/volume:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- - name: cluster_id
- in: path
- description: Cluster ID
- required: true
- schema:
- type: integer
- get:
- x-scalar-ignore: true
- summary: List sandbox volumes
- description: List the volumes on a cluster and the sandboxes they are attached to.
- operationId: list_sandbox_volumes
- security:
- - bearerAuth:
- - developer
- tags:
- - Sandboxes
- responses:
- '200':
- description: Volumes
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SandboxVolumeList'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- x-scalar-ignore: true
- summary: Create sandbox volume
- description: Create a persistent volume that sandboxes on the cluster can mount at launch.
- operationId: create_sandbox_volume
- security:
- - bearerAuth:
- - developer
- tags:
- - Sandboxes
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SandboxVolumeCreateRequest'
- responses:
- '201':
- description: Volume created
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SandboxVolume'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/clusters/{cluster_id}/v1/volume/lookup:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- - name: cluster_id
- in: path
- description: Cluster ID
- required: true
- schema:
- type: integer
- get:
- x-scalar-ignore: true
- summary: Look up sandbox volume by name
- description: Resolve a volume name to its ID. Names are unique, so this returns at most one ID. All other volume operations address the volume by ID.
- operationId: lookup_sandbox_volume
- security:
- - bearerAuth:
- - developer
- tags:
- - Sandboxes
- parameters:
- - name: name
- in: query
- description: Volume name to look up.
- required: true
- schema:
- type: string
- responses:
- '200':
- description: Resolved volume ID
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SandboxLookupResult'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/clusters/{cluster_id}/v1/volume/{volume_id}:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- - name: cluster_id
- in: path
- description: Cluster ID
- required: true
- schema:
- type: integer
- - name: volume_id
- in: path
- description: Volume ID
- required: true
- schema:
- type: string
- get:
- x-scalar-ignore: true
- summary: Get sandbox volume
- description: Get a volume and the sandboxes it is attached to.
- operationId: get_sandbox_volume
- security:
- - bearerAuth:
- - developer
- tags:
- - Sandboxes
- responses:
- '200':
- description: Volume
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SandboxVolume'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- delete:
- x-scalar-ignore: true
- summary: Delete sandbox volume
- description: Delete a volume. Fails while the volume is attached to a sandbox.
- operationId: delete_sandbox_volume
- security:
- - bearerAuth:
- - developer
- tags:
- - Sandboxes
- responses:
- '204':
- description: Volume deleted
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/clusters/{cluster_id}/v1/volume/{volume_id}/files:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- - name: cluster_id
- in: path
- description: Cluster ID
- required: true
- schema:
- type: integer
- - name: volume_id
- in: path
- description: Volume ID
- required: true
- schema:
- type: string
- get:
- x-scalar-ignore: true
- summary: List sandbox volume files
- description: |
- List the files and directories under a path inside a volume. The listing
- walks the tree breadth-first up to a server-side entry budget, marking
- directories it did not fully read as truncated.
- operationId: list_sandbox_volume_files
- security:
- - bearerAuth:
- - developer
- tags:
- - Sandboxes
- parameters:
- - name: path
- in: query
- description: Directory to walk, relative to the volume root, with or without a leading slash. Defaults to the root.
- required: false
- schema:
- type: string
- - name: search
- in: query
- description: |
- Case-insensitive substring to match against entry names. When set,
- the response contains only matching entries from the same
- budget-bounded walk.
- required: false
- schema:
- type: string
- responses:
- '200':
- description: Directory listing
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SandboxVolumeFileList'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/clusters/{cluster_id}/v1/volume/{volume_id}/files/content:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- - name: cluster_id
- in: path
- description: Cluster ID
- required: true
- schema:
- type: integer
- - name: volume_id
- in: path
- description: Volume ID
- required: true
- schema:
- type: string
- get:
- x-scalar-ignore: true
- summary: Read sandbox volume file
- description: Stream a file's raw bytes from a volume. A single byte range (e.g. bytes=0-1048575) reads part of the file; without one the whole file streams.
- operationId: read_sandbox_volume_file
- security:
- - bearerAuth:
- - developer
- tags:
- - Sandboxes
- parameters:
- - name: path
- in: query
- description: File to read, relative to the volume root, with or without a leading slash.
- required: true
- schema:
- type: string
- - name: Range
- in: header
- description: Single HTTP byte range to read instead of the whole file. A malformed range is ignored; a valid range outside the file is rejected with 416.
- required: false
- schema:
- type: string
- responses:
- '200':
- description: The file's bytes
- headers:
- Last-Modified:
- description: When the file was last modified, as an HTTP-date
- schema:
- type: string
- Accept-Ranges:
- description: Always bytes; single byte ranges are accepted
- schema:
- type: string
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- '206':
- description: The requested byte range of the file
- headers:
- Content-Range:
- description: The satisfied range, as bytes start-end/size
- schema:
- type: string
- Last-Modified:
- description: When the file was last modified, as an HTTP-date
- schema:
- type: string
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- '416':
- description: Requested range is outside the file
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- put:
- x-scalar-ignore: true
- summary: Write sandbox volume file
- description: Write a file to a volume from the request body, creating parent directories as needed, within 30 seconds
- operationId: write_sandbox_volume_file
- security:
- - bearerAuth:
- - developer
- tags:
- - Sandboxes
- parameters:
- - name: path
- in: query
- description: File to write, relative to the volume root, with or without a leading slash.
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- responses:
- '204':
- description: File written
- '413':
- description: File is larger than the write limit
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/clusters/{cluster_id}/v1/volume/{volume_id}/files/move:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- - name: cluster_id
- in: path
- description: Cluster ID
- required: true
- schema:
- type: integer
- - name: volume_id
- in: path
- description: Volume ID
- required: true
- schema:
- type: string
- post:
- x-scalar-ignore: true
- summary: Move sandbox volume file
- description: Move a file or directory in a volume to a full new path
- operationId: move_sandbox_volume_file
- security:
- - bearerAuth:
- - developer
- tags:
- - Sandboxes
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SandboxVolumeFileMove'
- responses:
- '204':
- description: File moved
- '409':
- description: Something is already at the destination
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/clusters/{cluster_id}/healthz:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- - name: cluster_id
- in: path
- description: Cluster ID
- required: true
- schema:
- type: integer
- get:
- x-scalar-ignore: true
- summary: Get sandbox-api health
- description: Get the health of the cluster's sandbox-api control plane.
- operationId: get_sandbox_api_health
- security:
- - bearerAuth:
- - developer
- tags:
- - Sandboxes
- responses:
- '200':
- description: Sandbox-api is healthy
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SandboxApiHealth'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/alpha/projects/{project_id}/clusters/{cluster_id}/readyz:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- - name: cluster_id
- in: path
- description: Cluster ID
- required: true
- schema:
- type: integer
- get:
- x-scalar-ignore: true
- summary: Get sandbox-api readiness
- description: Get the readiness of the cluster's sandbox-api control plane and its active sandbox count.
- operationId: get_sandbox_api_readiness
- security:
- - bearerAuth:
- - developer
- tags:
- - Sandboxes
- responses:
- '200':
- description: Sandbox-api is ready
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SandboxApiReadiness'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/telemetry/traces:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- post:
- x-scalar-ignore: true
- summary: Relay CLI traces
- description: Accepts OTLP trace payloads from the Porter CLI and forwards them to the internal OpenTelemetry collector. This allows CLI-originated traces to be linked with backend traces in Honeycomb without exposing the Honeycomb API key to CLI users. Traces are only forwarded if CLI tracing is enabled for the project.
- operationId: relay_cli_traces
- security:
- - bearerAuth:
- - viewer
- tags:
- - Telemetry
- requestBody:
- required: true
- content:
- application/x-protobuf:
- schema:
- type: string
- format: binary
- responses:
- '200':
- description: Traces accepted
- content:
- application/json:
- schema:
- type: object
- '502':
- description: Failed to forward traces to collector
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/api-tokens:
- get:
- operationId: list_api_tokens
- x-scalar-ignore: true
- security:
- - bearerAuth:
- - admin
- tags:
- - API Tokens
- summary: List API tokens for a project
- description: |
- Returns all active API tokens for the project. Deleted and revoked tokens are excluded.
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- format: int64
- minimum: 1
- example: 123
- responses:
- '200':
- description: API tokens retrieved successfully
- content:
- application/json:
- schema:
- type: object
- required:
- - api_tokens
- properties:
- api_tokens:
- type: array
- items:
- $ref: '#/components/schemas/ApiToken'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- post:
- operationId: create_api_token
- x-scalar-ignore: true
- security:
- - bearerAuth:
- - admin
- tags:
- - API Tokens
- summary: Create a new API token
- description: |
- Creates a new project-scoped API token and returns the signed JWT.
- The plaintext token is only returned in this response and cannot be
- retrieved again.
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- format: int64
- minimum: 1
- example: 123
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CreateApiTokenRequest'
- responses:
- '201':
- description: API token created successfully
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CreatedApiToken'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/api-audit-logs/query:
- post:
- x-scalar-ignore: true
- operationId: query_api_audit_logs
- x-scalar-stability: experimental
- security:
- - bearerAuth:
- - admin
- tags:
- - Api Audit Logs
- summary: Query API audit logs
- description: |
- Returns a paginated list of API audit log entries for the project,
- ordered by `started_at` descending. Filter set is the shared
- `ApiAuditLogQuery` body plus a `page` field for pagination. All
- filters are exact match.
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- format: int64
- minimum: 1
- example: 123
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/QueryApiAuditLogsRequestBody'
- responses:
- '200':
- description: Audit log entries retrieved successfully
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ListApiAuditLogsResponseBody'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/api-audit-logs/export:
- post:
- x-scalar-ignore: true
- operationId: export_api_audit_logs
- x-scalar-stability: experimental
- security:
- - bearerAuth:
- - admin
- tags:
- - Api Audit Logs
- summary: Export API audit logs as CSV or NDJSON
- description: Exports rows matching the filter as CSV or newline-delimited JSON (one entry per line), selected by the request `format`. Capped at 10,000 rows.
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- format: int64
- minimum: 1
- example: 123
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ExportApiAuditLogsRequestBody'
- responses:
- '200':
- description: Audit log rows exported successfully
- content:
- text/csv:
- schema:
- type: string
- format: binary
- description: RFC 4180 CSV body (returned when format=csv).
- application/x-ndjson:
- schema:
- type: string
- format: binary
- description: Newline-delimited JSON, one ApiAuditLogEntry per line (returned when format=json).
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/api-audit-log-counts/query:
- post:
- x-scalar-ignore: true
- operationId: query_api_audit_log_counts
- x-scalar-stability: experimental
- security:
- - bearerAuth:
- - admin
- tags:
- - Api Audit Logs
- summary: Query API audit log counts over time
- description: |
- Returns API audit log volume bucketed over time, suitable for charting.
- The server picks bucket granularity from the requested range, targeting
- ~60 buckets so the chart isn't too compressed at any zoom level. Empty
- buckets are zero-filled. Filter set is the shared `ApiAuditLogQuery`
- body.
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- format: int64
- minimum: 1
- example: 123
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiAuditLogQuery'
- responses:
- '200':
- description: Audit log counts retrieved successfully
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ListApiAuditLogCountsResponseBody'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/api-audit-log-filter-values/query:
- post:
- x-scalar-ignore: true
- operationId: query_api_audit_log_filter_values
- x-scalar-stability: experimental
- security:
- - bearerAuth:
- - admin
- tags:
- - Api Audit Logs
- summary: Query distinct filter values for API audit logs
- description: |
- Returns the distinct non-empty values of selected filter columns from
- the audit log rows matching the project and date window. This endpoint
- intentionally does not accept table filters; callers pass a project-wide
- or explicit date window to discover values independently from the active
- table filters.
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- format: int64
- minimum: 1
- example: 123
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiAuditLogFilterValuesQuery'
- responses:
- '200':
- description: Distinct filter values retrieved successfully
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/QueryApiAuditLogFilterValuesResponseBody'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/api-tokens/{token_id}:
- delete:
- operationId: delete_api_token
- x-scalar-ignore: true
- security:
- - bearerAuth:
- - admin
- tags:
- - API Tokens
- summary: Delete an API token
- description: |
- Soft-deletes an API token. Any non-deleted token can be deleted. Returns 404 if the token does not exist or was already deleted.
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- format: int64
- minimum: 1
- example: 123
- - name: token_id
- in: path
- description: Unique ID of the API token
- required: true
- schema:
- type: string
- example: 7c3f1e2a-4b8d-4a9e-9b2c-1f0e5a6d7c8b
- responses:
- '200':
- description: API token deleted successfully
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- /api/v2/projects/{project_id}/billing/sandbox-usage:
- parameters:
- - name: project_id
- in: path
- description: Project ID
- required: true
- schema:
- type: integer
- format: int64
- get:
- x-scalar-ignore: true
- summary: Get billed sandbox usage
- description: Returns the project's billed sandbox compute usage summed per day, for the usage graph.
- operationId: get_sandbox_billing_usage
- security:
- - bearerAuth:
- - viewer
- tags:
- - Billing
- parameters:
- - name: start_date
- in: query
- description: Inclusive start of the range
- required: true
- schema:
- type: string
- format: date-time
- - name: end_date
- in: query
- description: Exclusive end of the range
- required: true
- schema:
- type: string
- format: date-time
- responses:
- '200':
- description: Daily sandbox usage
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SandboxBillingUsage'
- default:
- description: unexpected error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
-components:
- parameters:
- pagination:
- name: page
- in: query
- description: Page number (1-based)
- required: false
- schema:
- type: integer
- minimum: 1
- default: 1
- securitySchemes:
- bearerAuth:
- type: http
- scheme: bearer
- cookieAuth:
- type: apiKey
- in: cookie
- name: porter
- schemas:
- Error:
- x-scalar-ignore: true
- required:
- - code
- - message
- properties:
- code:
- type: string
- enum:
- - INVALID_INPUT
- - INTERNAL_ERROR
- - PERMISSION_DENIED
- - NOT_FOUND
- - CONFLICT
- description: Error code that indicates the type of error that occurred. This is _not_ the HTTP status code.
- message:
- type: string
- description: Error message that can be displayed to the user
- Project:
- type: object
- x-scalar-ignore: true
- required:
- - id
- - name
- properties:
- id:
- type: integer
- description: Unique identifier of the project
- example: 1
- name:
- type: string
- description: Name of the project
- example: my-porter-project
- RolePermission:
- type: string
- x-scalar-ignore: true
- enum:
- - admin
- - developer
- - viewer
- description: Role/permission level
- Invite:
- type: object
- x-scalar-ignore: true
- required:
- - id
- - token
- - email
- - expired
- - accepted
- - kind
- properties:
- id:
- type: integer
- description: Unique identifier for the invite
- token:
- type: string
- description: Unique token for the invite
- email:
- type: string
- format: email
- description: Email address of the invited user
- expired:
- type: boolean
- description: Whether the invite has expired
- accepted:
- type: boolean
- description: Whether the invite has been accepted
- kind:
- $ref: '#/components/schemas/RolePermission'
- ProjectMember:
- type: object
- x-scalar-ignore: true
- required:
- - id
- - user_id
- - email
- - role
- - date_joined
- properties:
- id:
- type: integer
- description: Unique identifier for the role/membership record
- user_id:
- type: integer
- description: User ID of the member
- email:
- type: string
- format: email
- description: Email address of the member
- role:
- $ref: '#/components/schemas/RolePermission'
- date_joined:
- type: string
- format: date-time
- description: Date when the user joined the project (ISO 8601 format)
- ProjectSession:
- type: object
- description: |
- An active session belonging to a project member, annotated with which member
- it belongs to so the admin Sessions view can attribute and route each row.
- required:
- - id
- - user_id
- - user_email
- - status
- - created_at
- - expires_at
- properties:
- id:
- type: string
- description: Opaque session identifier
- user_id:
- type: integer
- description: ID of the member the session belongs to
- user_email:
- type: string
- description: Email of the member the session belongs to
- status:
- type: string
- description: Session status (typically "active")
- example: active
- created_at:
- type: string
- format: date-time
- description: When the session was created
- updated_at:
- type: string
- format: date-time
- description: When the session was last refreshed
- expires_at:
- type: string
- format: date-time
- description: When the session expires
- last_active_at:
- type: string
- format: date-time
- description: When the session last made a request, if known
- user_agent:
- type: string
- description: User agent recorded for the session, if known
- ProjectSessionsResponse:
- type: object
- required:
- - sessions
- properties:
- sessions:
- type: array
- items:
- $ref: '#/components/schemas/ProjectSession'
- RevokeProjectSessionsTarget:
- type: object
- description: A single session to revoke, identified by its owning member and id.
- required:
- - user_id
- - session_id
- properties:
- user_id:
- type: integer
- description: ID of the member the session belongs to
- session_id:
- type: string
- description: Session identifier to revoke
- RevokeProjectSessionsRequest:
- type: object
- required:
- - sessions
- properties:
- sessions:
- type: array
- items:
- $ref: '#/components/schemas/RevokeProjectSessionsTarget'
- RevokeProjectSessionsResult:
- type: object
- description: Summary of a bulk revocation; some targets may fail independently.
- required:
- - total
- - revoked
- - failed
- properties:
- total:
- type: integer
- description: Number of sessions requested for revocation
- revoked:
- type: integer
- description: Number of sessions successfully revoked
- failed:
- type: integer
- description: Number of sessions that could not be revoked
- UserSession:
- type: object
- description: |
- A single authenticated session belonging to a Porter user. Porter sessions
- can originate from either the dashboard (browser) or the Porter CLI. CLI
- sessions are identifiable by a `porter-cli/` prefix on `user_agent`.
- required:
- - id
- - status
- - created_at
- - expires_at
- properties:
- id:
- type: string
- description: Opaque session identifier
- status:
- type: string
- description: Session status (typically "active" — revoked sessions are filtered out before the list is returned)
- example: active
- created_at:
- type: string
- format: date-time
- description: When the session was created
- updated_at:
- type: string
- format: date-time
- description: When the session was last refreshed
- expires_at:
- type: string
- format: date-time
- description: When the session expires
- last_active_at:
- type: string
- format: date-time
- description: When the session last made a request, if known
- user_agent:
- type: string
- description: User agent recorded for the session, if known
- example: porter-cli/0.78.0 (darwin; arm64)
- is_current:
- type: boolean
- description: |
- True when this session is the one the caller is currently using. Set
- only on the self endpoint (`GET /api/v2/user/sessions`); always false
- for the admin endpoint, where the concept doesn't apply.
- default: false
- UserSessionsResponse:
- type: object
- required:
- - sessions
- properties:
- sessions:
- type: array
- items:
- $ref: '#/components/schemas/UserSession'
- GitHubRepository:
- type: object
- x-scalar-ignore: true
- required:
- - id
- - name
- - full_name
- properties:
- id:
- type: integer
- description: ID of the GitHub repository
- example: 1234567890
- name:
- type: string
- description: Name of the GitHub repository
- example: porter
- full_name:
- type: string
- description: Full name of the GitHub repository
- example: porter-dev/porter
- GitHubPullRequest:
- type: object
- x-scalar-ignore: true
- required:
- - title
- - id
- - created_at
- - commit_sha
- properties:
- title:
- type: string
- description: Title of the GitHub pull request
- example: Add new feature
- id:
- type: integer
- description: ID of the GitHub pull request
- example: 1234567890
- created_at:
- type: string
- description: Date and time the pull request was created
- example: '2021-01-01T00:00:00Z'
- commit_sha:
- type: string
- description: SHA of the commit that the pull request is based on
- example: fa9c6f358b792d214cff5c095f52eed4a70b7259
- Framework:
- type: string
- x-scalar-ignore: true
- description: Framework type detected for the application
- enum:
- - NEXTJS
- - NODEJS
- - FASTAPI
- - FLASK
- - DJANGO
- - RAILS
- - GO
- - UNKNOWN
- example: NEXTJS
- ServiceConfig:
- type: object
- x-scalar-ignore: true
- required:
- - name
- - start_command
- - port
- properties:
- name:
- type: string
- description: Name of the service
- example: web-service
- start_command:
- type: string
- description: Command to start the service
- example: npm start
- port:
- type: integer
- description: Port number the service runs on (0 when no port was detected)
- minimum: 0
- maximum: 65535
- example: 3000
- BuildConfig:
- type: object
- x-scalar-ignore: true
- required:
- - type
- - dockerfile_path
- - build_file
- - buildpacks
- - builder
- - build_method
- - build_context
- properties:
- type:
- type: string
- description: Type of build system
- enum:
- - docker
- - buildpack
- example: docker
- dockerfile_path:
- type: string
- description: Path to Dockerfile if applicable
- example: ./Dockerfile
- build_file:
- type: string
- description: Path to build configuration file
- example: package.json
- build_context:
- type: string
- description: Path to the build context directory (used as the root for COPY/ADD commands in Docker builds)
- example: ./
- buildpacks:
- type: array
- description: Framework-specific buildpacks for buildpack builds
- items:
- type: string
- example:
- - heroku/nodejs
- builder:
- type: string
- description: Recommended builder for buildpack builds
- example: heroku/builder:22
- build_method:
- type: string
- description: Build method for the application
- enum:
- - docker
- - buildpack
- example: buildpack
- StackDetectionResourceRecommendations:
- type: object
- x-scalar-ignore: true
- description: Framework-aware resource recommendations for stack detection
- required:
- - cpu_millicores
- - memory_mb
- properties:
- cpu_millicores:
- type: integer
- description: Recommended CPU allocation in millicores
- example: 100
- memory_mb:
- type: integer
- description: Recommended memory allocation in MB
- example: 512
- scaling_recommendations:
- type: object
- description: Scaling configuration recommendations
- properties:
- min_replicas:
- type: integer
- description: Minimum number of replicas
- example: 1
- max_replicas:
- type: integer
- description: Maximum number of replicas
- example: 10
- target_cpu_percent:
- type: integer
- description: Target CPU utilization percentage for scaling
- example: 70
- ApplicationConfig:
- type: object
- x-scalar-ignore: true
- required:
- - name
- - framework
- - path
- - service_config
- - build_config
- - requires_manual_config
- - resource_recommendations
- properties:
- name:
- type: string
- description: Name of the detected application
- example: my-app
- framework:
- $ref: '#/components/schemas/Framework'
- path:
- type: string
- description: Path to the application within the repository
- example: ./frontend
- service_config:
- $ref: '#/components/schemas/ServiceConfig'
- build_config:
- $ref: '#/components/schemas/BuildConfig'
- requires_manual_config:
- type: boolean
- description: Whether the application requires manual configuration
- example: false
- resource_recommendations:
- $ref: '#/components/schemas/StackDetectionResourceRecommendations'
- no_port_detected:
- type: boolean
- description: Whether the detected service had no port detected and may not be a web service
- example: false
- already_deployed:
- type: boolean
- description: Whether this application is already deployed in the target cluster
- example: false
- existing_app_name:
- type: string
- description: Name of the existing deployed application that matches this detected app
- example: my-api
- existing_app_id:
- type: integer
- description: ID of the existing deployed application that matches this detected app
- example: 12345
- additional_matches:
- type: integer
- description: Number of additional existing apps that match this detected app beyond the primary match
- example: 0
- RepositoryInfo:
- type: object
- x-scalar-ignore: true
- required:
- - name
- - branch
- properties:
- name:
- type: string
- description: Name of the repository
- example: my-repo
- branch:
- type: string
- description: Branch that was analyzed
- example: main
- StackDetectionResponse:
- type: object
- x-scalar-ignore: true
- required:
- - detected_apps
- - repository_info
- properties:
- detected_apps:
- type: array
- description: List of detected applications in the repository
- items:
- $ref: '#/components/schemas/ApplicationConfig'
- repository_info:
- $ref: '#/components/schemas/RepositoryInfo'
- ServiceType:
- type: string
- x-scalar-ignore: true
- enum:
- - application
- - cluster
- - addon
- - datastore
- description: Type of the service resource
- example: application
- ServiceStatus:
- type: string
- x-scalar-ignore: true
- enum:
- - healthy
- - updating
- - failed
- - deleting
- description: Status of the service
- example: healthy
- ApplicationContractImage:
- type: object
- x-scalar-ignore: true
- required:
- - repository
- - tag
- properties:
- repository:
- type: string
- description: Repository of the image
- example: my-registry/my-app
- tag:
- type: string
- description: Tag of the image
- example: latest
- ComputeResource:
- type: object
- x-scalar-ignore: true
- required:
- - id
- properties:
- id:
- type: string
- description: ID of the compute resource (e.g., node group)
- ComputeResourceList:
- type: object
- x-scalar-ignore: true
- required:
- - compute_resources
- properties:
- compute_resources:
- type: array
- description: List of compute resources
- items:
- $ref: '#/components/schemas/ComputeResource'
- GPU:
- type: object
- x-scalar-ignore: true
- required:
- - enabled
- properties:
- enabled:
- type: boolean
- description: Explicitly enables or disables GPU on a given workload
- example: true
- gpu_cores_nvidia:
- type: integer
- description: Number of NVIDIA GPU cores to allocate
- example: 1
- MetricsScraping:
- type: object
- x-scalar-ignore: true
- required:
- - enabled
- properties:
- enabled:
- type: boolean
- description: Explicitly enables or disables metrics scraping for the service
- example: true
- port:
- type: integer
- description: Port to scrape metrics from, defaults to the main container port
- example: 8080
- path:
- type: string
- description: Path to scrape metrics from, defaults to /metrics
- example: /metrics
- PathRoute:
- type: object
- x-scalar-ignore: true
- required:
- - path
- - port
- properties:
- path:
- type: string
- description: URL path to route
- example: /my-path
- port:
- type: integer
- description: Port number to route to
- example: 8080
- service_name:
- type: string
- description: Name of the service to route to. Required if application_name is provided.
- example: my-service
- application_name:
- type: string
- description: Name of the application to route to
- example: my-app
- PathRouting:
- type: object
- x-scalar-ignore: true
- required:
- - path_routing
- properties:
- path_routing:
- type: array
- description: List of path routes
- items:
- $ref: '#/components/schemas/PathRoute'
- DefaultAutoscaling:
- type: object
- x-scalar-ignore: true
- properties:
- gpu:
- type: boolean
- description: Determines if scaling is applied to a GPU workload
- example: false
- cpu_threshold_percent:
- type: integer
- description: CPU threshold percentage to trigger scaling
- example: 80
- memory_threshold_percent:
- type: integer
- description: Memory threshold percentage to trigger scaling
- example: 80
- gpu_threshold_percent:
- type: integer
- description: GPU utilization threshold to trigger scaling. Only used if gpu is true.
- example: 80
- vram_threshold_percent:
- type: integer
- description: GPU memory utilization threshold to trigger scaling. Only used if gpu is true.
- example: 80
- PrometheusAutoscaling:
- type: object
- x-scalar-ignore: true
- required:
- - metric_name
- - threshold
- - query
- properties:
- metric_name:
- type: string
- description: Name of the metric to use for autoscaling
- threshold:
- type: number
- format: float
- description: Threshold to trigger scaling
- query:
- type: string
- description: Prometheus query to use for autoscaling
- CustomAutoscaling:
- type: object
- x-scalar-ignore: true
- required:
- - prometheus
- properties:
- prometheus:
- $ref: '#/components/schemas/PrometheusAutoscaling'
- CustomAutoscalingList:
- type: object
- x-scalar-ignore: true
- required:
- - custom
- properties:
- custom:
- type: array
- description: List of custom autoscaling configurations
- items:
- $ref: '#/components/schemas/CustomAutoscaling'
- Autoscaling:
- type: object
- x-scalar-ignore: true
- properties:
- enabled:
- type: boolean
- description: Explicitly enables or disables autoscaling
- example: true
- min_instances:
- type: integer
- description: Minimum number of instances to run
- example: 1
- max_instances:
- type: integer
- description: Maximum number of instances to run
- example: 10
- kind:
- type: string
- enum:
- - default
- - custom
- description: Kind of autoscaling configuration
- default:
- $ref: '#/components/schemas/DefaultAutoscaling'
- custom:
- $ref: '#/components/schemas/CustomAutoscalingList'
- example:
- enabled: true
- min_instances: 1
- max_instances: 10
- kind: default
- default:
- gpu: true
- cpu_threshold_percent: 80
- memory_threshold_percent: 80
- gpu_threshold_percent: 80
- vram_threshold_percent: 80
- Domain:
- type: object
- x-scalar-ignore: true
- required:
- - name
- properties:
- name:
- type: string
- description: Domain name
- example: my-app.com
- HealthCheck:
- type: object
- description: Configures health checks for a service
- x-scalar-ignore: true
- required:
- - enabled
- properties:
- enabled:
- type: boolean
- description: Whether health checks are enabled
- http_path:
- type: string
- description: HTTP path to use for the health check
- command:
- type: string
- description: Command to run for the health check
- timeout_seconds:
- type: integer
- description: Number of seconds to wait before timing out the health check
- initial_delay_seconds:
- type: integer
- description: Number of seconds to wait before starting the health check
- period_seconds:
- type: integer
- description: How often (in seconds) to perform the health check. Must be greater than or equal to 1
- failure_threshold:
- type: integer
- description: Number of consecutive failures before the container is considered unhealthy. Must be greater than or equal to 1
- LoadBalancerConfig:
- type: object
- description: Configures one load balancer that fronts a web service.
- required:
- - mode
- properties:
- mode:
- type: string
- enum:
- - public_lb
- - private_lb
- - public_alb
- description: The mode of load balancer that fronts the service. Public is reachable from the public internet; private is reachable only from peered networks; public_alb routes through the cluster's application load balancer.
- WebProcessConfig:
- type: object
- x-scalar-ignore: true
- properties:
- autoscaling:
- $ref: '#/components/schemas/Autoscaling'
- domains:
- type: array
- description: List of custom domains for this service
- items:
- $ref: '#/components/schemas/Domain'
- health_check:
- $ref: '#/components/schemas/HealthCheck'
- private:
- type: boolean
- description: Indicates whether the web service should be private (not publicly accessible). Deprecated; use load_balancer_config instead.
- deprecated: true
- load_balancer_config:
- $ref: '#/components/schemas/LoadBalancerConfig'
- description: Configures the load balancer that fronts the service. Deprecated; use load_balancers instead.
- deprecated: true
- load_balancers:
- type: array
- description: The load balancers serving this service. An empty list means no load balancer.
- items:
- $ref: '#/components/schemas/LoadBalancerConfig'
- ingress_annotations:
- type: object
- description: Map of annotations to apply to the ingress resource
- additionalProperties:
- type: string
- disable_tls:
- type: boolean
- description: Indicates whether the web service has TLS certificates managed on the cluster
- forward_auth:
- type: boolean
- description: When true, nginx ingress annotations are added to route auth through the cluster's oauth2-proxy
- WorkerProcessConfig:
- type: object
- x-scalar-ignore: true
- properties:
- autoscaling:
- $ref: '#/components/schemas/Autoscaling'
- health_check:
- $ref: '#/components/schemas/HealthCheck'
- JobProcessConfig:
- type: object
- x-scalar-ignore: true
- properties:
- allow_concurrent_optional:
- type: boolean
- description: Indicates whether runs of the job can be processed concurrently
- cron:
- type: string
- description: Cron expression for the job
- suspend_cron:
- type: boolean
- description: Indicates whether the cron should be suspended
- timeout_seconds:
- type: integer
- description: Number of seconds to wait before timing out the job
- AppProcess:
- type: object
- x-scalar-ignore: true
- required:
- - name
- - type
- - run
- - instances
- - cpu_cores
- - ram_megabytes
- - port
- - termination_grace_period_seconds
- - sleep
- properties:
- name:
- type: string
- description: Name of the service
- example: api
- type:
- type: string
- enum:
- - web
- - worker
- - job
- description: Whether the service is a web, worker, or job service
- example: web
- run:
- type: string
- description: Command that will be run to start the service
- example: python main.py
- instances:
- type: integer
- description: Number of instances of the service
- example: 3
- cpu_cores:
- type: number
- description: Number of CPU cores the service requires
- example: 0.5
- ram_megabytes:
- type: integer
- description: Number of MB of RAM the service requires
- example: 1000
- port:
- type: integer
- description: Port that the service will run on. This is only applicable for web services
- example: 8080
- termination_grace_period_seconds:
- type: integer
- description: Number of seconds to wait before terminating the service
- example: 30
- sleep:
- type: boolean
- description: Flag to indicate that the service should be put to sleep, setting replicas to 0 and disabling autoscaling
- example: false
- compute_resources:
- $ref: '#/components/schemas/ComputeResourceList'
- gpu:
- $ref: '#/components/schemas/GPU'
- metrics_scraping:
- $ref: '#/components/schemas/MetricsScraping'
- path_routing:
- $ref: '#/components/schemas/PathRouting'
- service_mesh_enabled:
- type: boolean
- description: Indicates if this service should be added to the service mesh
- example: false
- nullable: true
- web:
- $ref: '#/components/schemas/WebProcessConfig'
- worker:
- $ref: '#/components/schemas/WorkerProcessConfig'
- job:
- $ref: '#/components/schemas/JobProcessConfig'
- EnvironmentGroupKeyValue:
- type: object
- x-scalar-ignore: true
- required:
- - key
- - value
- properties:
- key:
- type: string
- description: Name of the environment variable
- example: API_URL
- value:
- type: string
- description: Value of the environment variable
- example: https://api.example.com
- EnvironmentGroupKeyOptionalValue:
- type: object
- x-scalar-ignore: true
- required:
- - key
- properties:
- key:
- type: string
- description: Name of the environment variable
- example: API_URL
- value:
- type: string
- description: Value of the environment variable. Can be omitted if the secret already exists in the environment group.
- example: https://api.example.com
- ApplicationContractEnvironmentGroup:
- type: object
- x-scalar-ignore: true
- required:
- - name
- properties:
- name:
- type: string
- description: Name of the environment group
- example: my-env-group
- AutoRollback:
- type: object
- x-scalar-ignore: true
- required:
- - enabled
- properties:
- enabled:
- type: boolean
- description: Describes if automatic rollback is enabled
- CloudSQL:
- type: object
- x-scalar-ignore: true
- required:
- - enabled
- properties:
- enabled:
- type: boolean
- description: Enables CloudSQL proxying across all services in the app
- service_account_json_secret:
- type: string
- description: Name of the secret where the service account JSON for accessing the CloudSQL instance is stored
- connection_name:
- type: string
- description: Connection name for the CloudSQL instance
- db_port:
- type: integer
- description: Port for the CloudSQL instance
- EFSStorage:
- type: object
- x-scalar-ignore: true
- required:
- - enabled
- properties:
- enabled:
- type: boolean
- description: Enables shared storage across services
- file_system_id:
- type: string
- description: AWS EFS File System ID to mount
- RequiredApp:
- type: object
- x-scalar-ignore: true
- required:
- - name
- - from_target
- properties:
- name:
- type: string
- description: Name of the required app
- from_target:
- type: string
- description: Name of the deployment target to pull the app from
- BlueGreenStrategy:
- type: object
- description: Configuration for Blue-Green deployment strategy. Either 'group' or 'partner_apps' must be provided.
- x-scalar-ignore: true
- properties:
- group:
- type: string
- nullable: true
- description: Name of the Blue-Green group this app belongs to. All apps with the same group name in a deployment target will sync.
- example: shopify-frontend-backend-group
- partner_apps:
- type: array
- nullable: true
- deprecated: true
- description: (Deprecated) Explicit list of app names to sync with. Use 'group' instead if possible.
- items:
- type: string
- example: my-other-app
- DeploymentStrategy:
- type: object
- x-scalar-ignore: true
- required:
- - kind
- properties:
- kind:
- type: string
- enum:
- - rolling
- - blue_green
- default: rolling
- description: Determines which deployment rollout strategy is used
- example: rolling
- blue_green:
- $ref: '#/components/schemas/BlueGreenStrategy'
- Build:
- type: object
- x-scalar-ignore: true
- required:
- - method
- properties:
- context:
- type: string
- description: Context for the build
- example: ./root-of-my-app
- method:
- type: string
- description: Method of the build
- enum:
- - buildpack
- - docker
- example: docker
- builder:
- type: string
- description: Builder of the build
- example: heroku/builder:22
- buildpacks:
- type: array
- description: Buildpacks of the build
- items:
- type: string
- example:
- - heroku/python
- - heroku/node
- dockerfile:
- type: string
- description: Dockerfile of the build
- example: ./docker/Dockerfile
- repository:
- type: string
- description: Repository of the build
- example: my-repo
- example:
- context: .
- method: docker
- dockerfile: ./docker/Dockerfile
- repository: my-repo
- ApplicationContract:
- type: object
- x-scalar-ignore: true
- required:
- - name
- - services
- - image
- properties:
- name:
- type: string
- description: Name of the application
- example: my-app
- image:
- $ref: '#/components/schemas/ApplicationContractImage'
- services:
- type: array
- description: List of services in the application
- default: []
- items:
- $ref: '#/components/schemas/AppProcess'
- predeploy:
- nullable: true
- $ref: '#/components/schemas/AppProcess'
- variables:
- type: array
- description: List of variables
- items:
- $ref: '#/components/schemas/EnvironmentGroupKeyValue'
- secrets:
- type: array
- description: List of secrets
- items:
- $ref: '#/components/schemas/EnvironmentGroupKeyOptionalValue'
- environment_groups:
- type: array
- description: List of environment variable groups for the application
- items:
- $ref: '#/components/schemas/ApplicationContractEnvironmentGroup'
- helm_overrides:
- type: string
- description: Base64-encoded JSON of raw Helm overrides to use for the application. These will override any values generated by the contract.
- auto_rollback:
- $ref: '#/components/schemas/AutoRollback'
- cloud_sql:
- $ref: '#/components/schemas/CloudSQL'
- efs_storage:
- $ref: '#/components/schemas/EFSStorage'
- required_apps:
- type: array
- description: Other porter apps that this app expects to be deployed alongside it
- items:
- $ref: '#/components/schemas/RequiredApp'
- initial_deploy:
- nullable: true
- $ref: '#/components/schemas/AppProcess'
- deployment_strategy:
- $ref: '#/components/schemas/DeploymentStrategy'
- build:
- $ref: '#/components/schemas/Build'
- EksKindCloudwatchAlarm:
- type: object
- nullable: true
- x-scalar-ignore: true
- required:
- - enable
- - emails
- properties:
- enable:
- type: boolean
- description: Whether to enable CloudWatch alarms
- emails:
- type: array
- items:
- type: string
- description: List of email addresses for CloudWatch alarm notifications
- KvTag:
- type: object
- x-scalar-ignore: true
- required:
- - key
- - value
- properties:
- key:
- type: string
- value:
- type: string
- EksKindLoadBalancer:
- type: object
- nullable: true
- x-scalar-ignore: true
- required:
- - load_balancer_type
- properties:
- additional_certificate_arns:
- type: array
- items:
- type: string
- description: List of additional certificate ARNs
- allowlist_ip_ranges:
- type: array
- nullable: true
- default: []
- items:
- type: string
- example: 10.0.0.0/24
- description: IP ranges allowed to access the load balancer
- enable_s3_access_logs:
- type: boolean
- description: Whether to enable S3 access logs
- default: false
- nullable: true
- enable_wafv2:
- type: boolean
- description: Whether to enable WAFv2
- default: false
- nullable: true
- wafv2_arn:
- type: string
- description: ARN of the WAFv2 configuration
- nullable: true
- load_balancer_type:
- type: string
- enum:
- - alb
- - nlb
- description: Type of load balancer
- nullable: true
- default: nlb
- wildcard_domain:
- type: string
- description: Wildcard domain for the load balancer
- nullable: true
- tags:
- type: array
- nullable: true
- default: []
- items:
- $ref: '#/components/schemas/KvTag'
- EksKindLogging:
- type: object
- nullable: true
- x-scalar-ignore: true
- required:
- - enable_api_server_logs
- - enable_audit_logs
- - enable_authenticator_logs
- - enable_controller_manager_logs
- - enable_scheduler_logs
- properties:
- enable_api_server_logs:
- type: boolean
- description: Whether to enable API server logs
- default: false
- enable_audit_logs:
- type: boolean
- description: Whether to enable audit logs
- default: false
- enable_authenticator_logs:
- type: boolean
- description: Whether to enable authenticator logs
- default: false
- enable_controller_manager_logs:
- type: boolean
- description: Whether to enable controller manager logs
- default: false
- enable_scheduler_logs:
- type: boolean
- description: Whether to enable scheduler logs
- default: false
- EksKindNetwork:
- type: object
- x-scalar-ignore: true
- nullable: true
- required:
- - service_cidr
- - vpc_cidr
- properties:
- service_cidr:
- type: string
- vpc_cidr:
- type: string
- NodeGroupType:
- type: string
- x-scalar-ignore: true
- nullable: true
- enum:
- - application
- - system
- - user
- - monitoring
- description: Type of nodegroup
- EksKindNodeGroup:
- type: object
- x-scalar-ignore: true
- properties:
- instance_type:
- type: string
- description: Instance type for the node group
- nullable: true
- min_instances:
- type: integer
- description: Minimum number of instances for the node group
- nullable: true
- default: 1
- max_instances:
- type: integer
- description: Maximum number of instances for the node group
- nullable: true
- default: 5
- node_group_type:
- $ref: '#/components/schemas/NodeGroupType'
- additional_taints:
- type: array
- items:
- type: string
- description: Additional taints for the node group
- nullable: true
- disk_size_gb:
- type: integer
- description: Disk size for each node inthe node group
- nullable: true
- default: 50
- node_group_id:
- type: string
- description: Unique identifier for the node group
- nullable: true
- node_group_name:
- type: string
- description: Name of the node group
- nullable: true
- is_public:
- type: boolean
- description: Whether the node group is public in a public subnet
- nullable: true
- default: false
- is_spot_instance:
- type: boolean
- description: Whether the node group is a spot instance
- nullable: true
- default: false
- is_karpenter:
- type: boolean
- description: Whether the node group is using Karpenter
- nullable: true
- default: false
- max_cpu_cores:
- type: integer
- description: Maximum number of CPU cores for the node group. Required if is_karpenter is true
- nullable: true
- default: 20
- EksKind:
- nullable: true
- type: object
- x-scalar-ignore: true
- required:
- - cluster_name
- - cluster_version
- properties:
- cluster_name:
- type: string
- description: Name of the EKS cluster
- cluster_version:
- type: string
- description: Kubernetes version for the cluster
- region:
- type: string
- description: AWS region for the EKS cluster
- nullable: true
- control_plane_cidr_allowlist:
- type: array
- nullable: true
- default: []
- items:
- type: string
- description: List of CIDR ranges allowed to access the control plane
- enable_ecr_scanning:
- type: boolean
- description: Whether to enable ECR scanning
- default: false
- nullable: true
- enable_guard_duty:
- type: boolean
- description: Whether to enable Guard Duty
- default: false
- nullable: true
- enable_cloud_watch_agent:
- type: boolean
- description: Whether to enable CloudWatch Observability agent
- default: false
- nullable: true
- enable_kms_encryption:
- type: boolean
- description: Whether to enable KMS encryption
- default: false
- nullable: true
- cloudwatch_alarm:
- $ref: '#/components/schemas/EksKindCloudwatchAlarm'
- load_balancer:
- $ref: '#/components/schemas/EksKindLoadBalancer'
- logging:
- $ref: '#/components/schemas/EksKindLogging'
- network:
- $ref: '#/components/schemas/EksKindNetwork'
- node_groups:
- type: array
- nullable: true
- default: []
- items:
- $ref: '#/components/schemas/EksKindNodeGroup'
- ClusterContract:
- type: object
- x-scalar-ignore: true
- required:
- - cluster_id
- - project_id
- - cloud_provider
- - cloud_account_id
- - kind
- properties:
- cluster_id:
- type: integer
- description: Unique identifier of the cluster
- project_id:
- type: integer
- description: Unique identifier of the project
- cloud_provider:
- type: string
- enum:
- - aws
- - gcp
- - azure
- - ovh
- description: The cloud provider of the cluster
- cloud_account_id:
- type: string
- description: The ID of the cloud account that the cluster is provisioned in
- kind:
- type: string
- enum:
- - eks
- - gke
- - aks
- - ovh
- description: The type of cluster that's provisioned
- is_soc2_compliant:
- type: boolean
- description: Whether the cluster is SOC2 compliant
- eks_kind:
- $ref: '#/components/schemas/EksKind'
- DatadogContract:
- type: object
- x-scalar-ignore: true
- required:
- - api_key
- - site
- properties:
- api_key:
- type: string
- description: API key for Datadog
- example: '1234567890'
- site:
- type: string
- description: Datadog site URL
- example: https://us3.datadoghq.com
- logging_enabled:
- type: boolean
- description: Whether all container logs go to Datadog
- dogstatsd_enabled:
- type: boolean
- description: Whether DogStatsD is enabled
- apm_enabled:
- type: boolean
- description: Whether APM is enabled
- cpu_cores:
- type: number
- format: float
- description: Number of CPU cores to allocate to Datadog
- ram_megabytes:
- type: integer
- description: Amount of memory to allocate to Datadog in megabytes
- AddonContract:
- type: object
- x-scalar-ignore: true
- required:
- - name
- - type
- properties:
- name:
- type: string
- description: Name of the addon
- example: my-addon
- type:
- type: string
- enum:
- - datadog
- - postgres
- - redis
- - mezmo
- - metabase
- - newrelic
- - tailscale
- - quivr
- - deepgram
- - n8n
- - mistral_7b
- - llama_3_8b
- - langfuse
- - grafana
- - helm_chart
- - huggingface
- description: Type of the addon
- example: datadog
- datadog:
- description: Configuration for the Datadog addon. Required if type is datadog.
- nullable: true
- $ref: '#/components/schemas/DatadogContract'
- Service:
- type: object
- x-scalar-ignore: true
- required:
- - id
- - name
- - status
- - last_updated_at_utc
- - type
- - deployment_target_id
- properties:
- id:
- type: string
- description: Unique identifier of the service
- example: 123e4567-e89b-12d3-a456-426614174000
- name:
- type: string
- description: Name of the service
- example: my-porter-application
- status:
- $ref: '#/components/schemas/ServiceStatus'
- type:
- $ref: '#/components/schemas/ServiceType'
- deployment_target_id:
- type: string
- description: Unique identifier of the deployment target where the service will be deployed (e.g., a cluster ID)
- last_updated_at_utc:
- type: string
- format: date-time
- description: Timestamp when the service was last updated
- example: '2024-03-20T15:30:00Z'
- application_contract:
- $ref: '#/components/schemas/ApplicationContract'
- cluster_contract:
- $ref: '#/components/schemas/ClusterContract'
- addon_contract:
- $ref: '#/components/schemas/AddonContract'
- UpdateServiceRequest:
- type: object
- x-scalar-ignore: true
- required:
- - type
- - deployment_target_id
- properties:
- type:
- type: string
- enum:
- - application
- - addon
- - datastore
- description: Type of service to create
- example: application
- deployment_target_id:
- type: string
- description: Unique identifier of the deployment target where the service will be deployed (e.g., a cluster ID)
- example: 123e4567-e89b-12d3-a456-426614174000
- application_contract:
- $ref: '#/components/schemas/ApplicationContract'
- addon_contract:
- $ref: '#/components/schemas/AddonContract'
- ValidateServiceRequest:
- type: object
- x-scalar-ignore: true
- required:
- - type
- - deployment_target_id
- properties:
- type:
- type: string
- enum:
- - application
- description: Type of service to validate
- example: application
- deployment_target_id:
- type: string
- description: Unique identifier of the deployment target where the service is deployed
- example: 123e4567-e89b-12d3-a456-426614174000
- application_contract:
- $ref: '#/components/schemas/ApplicationContract'
- ValidateServiceError:
- type: object
- x-scalar-ignore: true
- required:
- - message
- - application_name
- - service_name
- properties:
- message:
- type: string
- description: Error message when status is failed
- application_id:
- type: string
- description: ID of the application that is invalid
- application_name:
- type: string
- description: Name of the application that is invalid
- service_name:
- type: string
- description: Name of the service that is invalid
- ServiceValidation:
- type: object
- x-scalar-ignore: true
- required:
- - valid
- properties:
- valid:
- type: boolean
- description: Whether the service is valid
- error:
- $ref: '#/components/schemas/ValidateServiceError'
- Cluster:
- x-scalar-ignore: true
- required:
- - id
- - name
- - vanity_name
- - status
- - region
- - cloud_provider
- - cloud_account_id
- - created_at
- - updated_at
- properties:
- id:
- type: integer
- description: Unique identifier of the cluster
- name:
- type: string
- description: Name of the cluster
- vanity_name:
- type: string
- description: Vanity name of the cluster
- region:
- type: string
- description: Region of the cluster
- status:
- type: string
- description: Status of the cluster
- created_at:
- type: string
- format: date-time
- description: Date and time when the cluster was created
- updated_at:
- type: string
- format: date-time
- description: Date and time when the cluster was updated
- cloud_provider:
- type: string
- description: Cloud provider of the cluster
- cloud_account_id:
- type: string
- format: uuid
- description: Unique identifier of the cloud account
- example: 123e4567-e89b-12d3-a456-426614174000
- ClusterProvider:
- type: string
- description: Cloud provider of the cluster; 'unknown' when unrecognized.
- enum:
- - aws
- - gcp
- - azure
- - unknown
- example: aws
- ClusterState:
- type: string
- description: Cluster lifecycle status.
- enum:
- - ready
- - updating
- - updating_unavailable
- - failed
- - deleting
- - deleted
- - unreachable
- - unknown
- example: ready
- ClusterListItem:
- type: object
- required:
- - id
- - name
- - vanity_name
- - provider
- - region
- - status
- - cloud_account_id
- - created_at
- properties:
- id:
- type: integer
- description: Cluster ID.
- name:
- type: string
- description: Internal cluster name.
- vanity_name:
- type: string
- description: Display name.
- provider:
- $ref: '#/components/schemas/ClusterProvider'
- region:
- type: string
- description: Cloud region.
- status:
- $ref: '#/components/schemas/ClusterState'
- cloud_account_id:
- type: string
- format: uuid
- description: Cloud account ID. Zero UUID when no cloud account is linked.
- created_at:
- type: string
- format: date-time
- description: When the cluster was created.
- ClustersListResponse:
- type: object
- required:
- - clusters
- properties:
- clusters:
- type: array
- items:
- $ref: '#/components/schemas/ClusterListItem'
- CreateClusterRequestBody:
- type: object
- description: Minimal input to create a cluster. Porter selects the cloud provider, Kubernetes version, and node groups.
- required:
- - name
- - region
- - cloud_account_id
- properties:
- name:
- type: string
- description: Name for the new cluster. Lowercase alphanumeric and hyphens.
- example: my-cluster
- region:
- type: string
- description: Cloud region to provision the cluster in.
- example: us-east-1
- cloud_account_id:
- type: string
- format: uuid
- description: Cloud account to provision into; determines the cloud provider.
- example: 123e4567-e89b-12d3-a456-426614174000
- CreateClusterResult:
- type: object
- required:
- - cluster_id
- - contract_revision_id
- properties:
- cluster_id:
- type: integer
- description: ID of the newly created cluster.
- example: 456
- contract_revision_id:
- type: string
- format: uuid
- description: ID of the contract revision that started provisioning.
- example: 123e4567-e89b-12d3-a456-426614174000
- ClusterDependent:
- type: object
- description: A resource running on the cluster that prevents its deletion.
- required:
- - type
- - id
- - name
- properties:
- type:
- type: string
- description: The kind of resource.
- enum:
- - application
- example: application
- id:
- type: string
- description: The resource's identifier, as a string.
- example: '42'
- name:
- type: string
- description: Name of the resource.
- example: my-app
- ClusterDependents:
- type: object
- description: Active resources on the cluster that block its deletion.
- required:
- - dependents
- properties:
- dependents:
- type: array
- description: Resources that must be removed before the cluster can be deleted.
- items:
- $ref: '#/components/schemas/ClusterDependent'
- NodeGroupTypeNotNullable:
- type: string
- x-scalar-ignore: true
- enum:
- - APPLICATION
- - SYSTEM
- - USER
- - MONITORING
- description: Type of nodegroup (non-nullable)
- PatchClusterNodeGroup:
- type: object
- required:
- - node_group_type
- description: A node group patch entry. For USER node groups, provide node_group_id. For non-USER node groups (application, system, monitoring), provide node_group_type instead. If multiple non-USER node groups of the same type exist, the request will fail.
- properties:
- node_group_id:
- type: string
- description: ID of the node group. Required for USER node groups.
- node_group_type:
- $ref: '#/components/schemas/NodeGroupTypeNotNullable'
- instance_type:
- type: string
- description: Instance type to set on the node group
- max_instances:
- type: integer
- description: Maximum number of instances for the node group
- PatchClusterRequestBody:
- type: object
- description: Request body for partially updating cluster configuration. Only provided fields will be updated.
- properties:
- kubernetes_version:
- type: string
- description: Kubernetes version to set on the cluster
- node_groups:
- type: array
- description: Node groups to update. Each entry must identify a node group and provide the fields to update.
- items:
- $ref: '#/components/schemas/PatchClusterNodeGroup'
- skip_preflight:
- type: boolean
- default: false
- description: If true, skip all preflight checks for this patch. Use with caution.
- CloudProvider:
- type: string
- description: Cloud provider type
- enum:
- - aws
- - gcp
- - azure
- example: aws
- PreflightCheckResponse:
- type: object
- required:
- - authorized
- properties:
- authorized:
- type: boolean
- description: Whether Porter is authorized to access the cloud account
- example: true
- CloudAccountProvider:
- type: string
- enum:
- - aws
- - gcp
- - azure
- description: Cloud provider kind.
- example: aws
- CloudAccountState:
- type: string
- description: Cloud account connection state.
- enum:
- - connected
- - not_connected
- - pending
- - finalizing_connection
- example: connected
- CloudAccountListItem:
- type: object
- required:
- - id
- - name
- - provider
- - provider_id
- - credential_identifier
- - status
- - created_at
- properties:
- id:
- type: string
- format: uuid
- description: Cloud account ID.
- name:
- type: string
- description: Display name.
- provider:
- $ref: '#/components/schemas/CloudAccountProvider'
- provider_id:
- type: string
- description: Cloud provider account ID.
- credential_identifier:
- type: string
- deprecated: true
- description: Deprecated; use id to reference the account. Empty when the account has no credential yet.
- status:
- $ref: '#/components/schemas/CloudAccountState'
- created_at:
- type: string
- format: date-time
- description: When the account was created.
- connected_at:
- type: string
- format: date-time
- description: When the account connected.
- CloudAccountsListResponse:
- type: object
- required:
- - cloud_accounts
- properties:
- cloud_accounts:
- type: array
- items:
- $ref: '#/components/schemas/CloudAccountListItem'
- CloudAccountRegion:
- type: object
- required:
- - name
- - display_name
- properties:
- name:
- type: string
- description: Region identifier to provision into.
- example: us-east-1
- display_name:
- type: string
- description: Human-readable region location.
- example: US East (N. Virginia)
- CloudAccountRegionsListResponse:
- type: object
- required:
- - regions
- properties:
- regions:
- type: array
- description: Supported regions, ordered for display.
- items:
- $ref: '#/components/schemas/CloudAccountRegion'
- CreateCloudAccountRequest:
- type: object
- required:
- - provider
- - account_id
- properties:
- provider:
- $ref: '#/components/schemas/CloudProvider'
- account_id:
- type: string
- description: Cloud provider account identifier (AWS account ID, GCP project ID, or Azure subscription ID)
- example: '123456789012'
- CreateCloudAccountResponseBody:
- type: object
- required:
- - id
- properties:
- id:
- type: string
- format: uuid
- description: Unique identifier of the created cloud account
- example: 123e4567-e89b-12d3-a456-426614174000
- CloudAccountGcp:
- type: object
- description: GCP-specific cloud account details
- properties:
- project_id:
- type: string
- description: GCP project ID
- example: my-gcp-project-123
- client_email:
- type: string
- description: GCP service account email
- client_id:
- type: string
- description: |
- Numeric GCP service account client ID. Only populated for legacy
- service-account-key integrations; empty for Workload Identity
- Federation integrations, which do not have a long-lived client
- ID.
- example: '123456789012345678901'
- workload_identity_provider:
- type: string
- description: |
- Full resource name of the GCP Workload Identity Provider that
- Porter federates against. Present only when the integration was
- onboarded via Workload Identity Federation; absent for legacy
- service-account-key integrations. Acts as the WIF-vs-SA-key
- discriminator on the dashboard.
- example: projects/551957868763/locations/global/workloadIdentityPools/porter-pool-1/providers/porter-aws
- CloudAccountAzure:
- type: object
- description: Azure-specific cloud account details
- properties:
- subscription_id:
- type: string
- description: Azure subscription ID
- example: 12345678-1234-1234-1234-123456789012
- tenant_id:
- type: string
- description: Azure tenant ID
- example: 87654321-4321-4321-4321-210987654321
- client_id:
- type: string
- description: Azure client ID (application ID)
- example: abcdef12-3456-7890-abcd-ef1234567890
- uses_federated_identity:
- type: boolean
- description: |
- True if the account is connected with federated identity
- credentials. False if it's connected with a client secret.
- CloudAccountAws:
- type: object
- description: AWS-specific cloud account details
- properties:
- cloudformation_url:
- type: string
- description: |
- AWS console URL that launches the Porter IAM CloudFormation
- stack, scoped to this account's external ID. Lets a customer
- resume the grant flow after a refresh.
- example: https://console.aws.amazon.com/cloudformation/home?#/stacks/create/review?templateURL=https://porter-role.s3.us-east-2.amazonaws.com/cloudformation-access-policy-external-id.json&stackName=PorterRole&param_ExternalIdParameter=c79fcf53-7163-4649-9881-a071bc64d923
- CloudAccount:
- type: object
- required:
- - id
- - name
- - provider
- - provider_id
- properties:
- id:
- type: string
- format: uuid
- description: Unique identifier of the cloud account
- example: 123e4567-e89b-12d3-a456-426614174000
- name:
- type: string
- description: Human-readable name for the cloud account
- example: production-aws
- provider:
- $ref: '#/components/schemas/CloudProvider'
- provider_id:
- type: string
- description: Cloud provider's unique identifier for this account
- example: '123456789012'
- credential_identifier:
- type: string
- deprecated: true
- description: (DEPRECATED) Legacy credential identifier for backwards compatibility
- gcp:
- $ref: '#/components/schemas/CloudAccountGcp'
- azure:
- $ref: '#/components/schemas/CloudAccountAzure'
- aws:
- $ref: '#/components/schemas/CloudAccountAws'
- CloudAccountStatus:
- type: object
- required:
- - state
- - connected
- - percent_complete
- properties:
- state:
- $ref: '#/components/schemas/CloudAccountState'
- connected:
- type: boolean
- deprecated: true
- description: Deprecated; true when state is connected. Prefer state.
- example: true
- percent_complete:
- type: integer
- description: Percentage of required cloud resources that exist (0-100)
- example: 60
- minimum: 0
- maximum: 100
- not_connected_reason:
- type: string
- description: Explanation of why the account is not connected; empty when connected
- example: Missing porter-aks-restricted role assignment
- CloudAccountWithStatus:
- allOf:
- - $ref: '#/components/schemas/CloudAccount'
- - type: object
- required:
- - status
- - created_at
- properties:
- status:
- $ref: '#/components/schemas/CloudAccountStatus'
- created_at:
- type: string
- format: date-time
- description: When the account was created.
- connected_at:
- type: string
- format: date-time
- description: When the account first connected; omitted if it never has.
- UpdateCloudAccountRequest:
- type: object
- required:
- - cloud_provider
- properties:
- cloud_provider:
- $ref: '#/components/schemas/CloudProvider'
- UpdateCloudAccountResponseBody:
- type: object
- required:
- - id
- properties:
- id:
- type: string
- format: uuid
- description: Cloud account ID
- example: 123e4567-e89b-12d3-a456-426614174000
- BlockedResource:
- type: object
- description: A resource still linked to a cloud account that prevents its deletion
- required:
- - id
- - name
- properties:
- id:
- type: string
- description: The resource's identifier, as a string
- example: '42'
- name:
- type: string
- description: Name of the resource
- example: prod-cluster
- CloudAccountBlockedBy:
- type: object
- description: Active resources still referencing the cloud account, grouped by type
- required:
- - clusters
- - object_storage
- - environment_groups
- properties:
- clusters:
- type: array
- description: Active clusters referencing the cloud account
- items:
- $ref: '#/components/schemas/BlockedResource'
- object_storage:
- type: array
- description: Active object storage buckets referencing the cloud account
- items:
- $ref: '#/components/schemas/BlockedResource'
- environment_groups:
- type: array
- description: Active environment groups synced to the cloud account
- items:
- $ref: '#/components/schemas/BlockedResource'
- QuotaCheckMetadata:
- type: object
- required:
- - error_message
- - name
- - increase_link
- - used
- - available
- - total_quota
- - required
- properties:
- error_message:
- type: string
- description: Error message if the check failed
- example: Your AWS account has reached the limit of vCPUs
- name:
- type: string
- description: Error name
- example: On-Demand Standard (A, C, D, H, I, M, R, T, Z) instances
- increase_link:
- type: string
- description: URL to send a request to AWS to increase the quota
- example: https://ap-southeast-1.console.aws.amazon.com/servicequotas/home/services/vpc/quotas/L-F678F1CE
- used:
- type: integer
- description: Number of resources used
- example: 32
- available:
- type: integer
- description: Number of resources available
- example: 0
- total_quota:
- type: integer
- description: Number of resources quota
- example: 32
- required:
- type: integer
- description: Number of resources required
- example: 32
- QuotaCheckResult:
- type: object
- required:
- - name
- - passed
- properties:
- name:
- type: string
- description: Name of the quota check
- example: vcpu
- passed:
- type: boolean
- description: Whether this quota check passed
- example: true
- metadata:
- $ref: '#/components/schemas/QuotaCheckMetadata'
- ValidateQuotaResponseBody:
- type: object
- required:
- - has_quota
- - quota_checks
- properties:
- has_quota:
- type: boolean
- description: Whether the AWS account has sufficient quota to deploy a cluster
- example: true
- quota_checks:
- type: array
- items:
- $ref: '#/components/schemas/QuotaCheckResult'
- description: Detailed results of each quota check
- QuotaRequest:
- type: object
- required:
- - region
- - status
- - desired_quota
- - name
- - created_at
- properties:
- region:
- type: string
- description: AWS region where the quota request was made
- example: us-east-1
- status:
- type: string
- enum:
- - pending
- - denied
- - approved
- description: Status of the quota request
- example: pending
- desired_quota:
- type: integer
- description: Desired quota value that was requested
- example: 64
- name:
- type: string
- description: Name of the quota
- example: Running On-Demand Standard (A, C, D, H, I, M, R, T, Z) instances
- created_at:
- type: string
- format: date-time
- description: Time when the quota request was created
- example: '2024-01-15T10:30:00Z'
- ListQuotaRequestsResponseBody:
- type: object
- required:
- - quota_requests
- properties:
- quota_requests:
- type: array
- items:
- $ref: '#/components/schemas/QuotaRequest'
- description: List of pending and denied quota requests
- CloudAccountPlanType:
- type: string
- description: Cloud account plan type indicating whether the account is on free tier or paid
- enum:
- - FREE
- - PAID
- example: PAID
- CloudAccountPlanState:
- type: object
- required:
- - plan_type
- properties:
- plan_type:
- $ref: '#/components/schemas/CloudAccountPlanType'
- GetCloudAccountPlanStateResponseBody:
- type: object
- required:
- - cloud_account_plan_state
- properties:
- cloud_account_plan_state:
- $ref: '#/components/schemas/CloudAccountPlanState'
- ValidateCidrResponseBody:
- type: object
- required:
- - passed
- properties:
- passed:
- type: boolean
- description: Whether the provided CIDR ranges passed the validation
- example: false
- suggested_vpc_cidr:
- type: string
- description: Suggested VPC CIDR range if a conflict is detected
- example: 10.2.0.0/16
- suggested_service_cidr:
- type: string
- description: Suggested service CIDR range if a conflict is detected
- example: 10.3.0.0/16
- conflict_message:
- type: string
- description: Message describing the conflict if one is detected
- example: The VPC CIDR range 10.0.0.0/16 overlaps with an existing VPC in this region
- GetAzureWifSetupCommandResponseBody:
- type: object
- required:
- - setup_command
- properties:
- setup_command:
- type: string
- description: Shell command to run the Azure WIF setup script.
- ConnectAzureCloudAccountRequest:
- type: object
- required:
- - client_id
- - subscription_id
- - tenant_id
- properties:
- client_id:
- type: string
- description: Azure app registration client ID (appId).
- example: 8b32a525-58e4-4d22-8368-098e11d7f4dc
- subscription_id:
- type: string
- description: Azure subscription ID.
- example: d3b9d70c-74c7-4d50-a2cc-579bf51dc763
- tenant_id:
- type: string
- description: Azure Active Directory tenant ID.
- example: 1a6cedd1-302d-48f9-b893-b1895b3d8a9f
- ConnectAzureCloudAccountResponseBody:
- type: object
- required:
- - cloud_account_id
- properties:
- cloud_account_id:
- type: string
- format: uuid
- description: ID of the connected Azure cloud account.
- example: 123e4567-e89b-12d3-a456-426614174000
- CreateGcpCloudAccountRequest:
- type: object
- required:
- - gcp_project_id
- properties:
- gcp_project_id:
- type: string
- description: |
- Customer's GCP project ID (e.g. "my-prod-project"), not the
- project number. Validated against the standard GCP project ID
- regex.
- pattern: ^[a-z][-a-z0-9]{4,28}[a-z0-9]$
- example: my-prod-project
- CreateGcpCloudAccountResponseBody:
- type: object
- required:
- - cloud_account_id
- - cloud_shell_url
- - setup_command
- - expires_at
- properties:
- cloud_account_id:
- type: string
- format: uuid
- description: ID of the cloud account row created or rotated by this call.
- example: 4741dca9-ae17-417b-949e-1a18f91b77d9
- cloud_shell_url:
- type: string
- description: |
- Google Cloud Shell deeplink that pre-loads the public
- porter-dev/gcp-onboarding repo into a fresh shell session.
- example: https://shell.cloud.google.com/cloudshell/editor?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fporter-dev%2Fgcp-onboarding
- setup_command:
- type: string
- description: |
- Single-line shell snippet the customer pastes into Cloud Shell to
- kick off bootstrap.sh with the three required env vars set.
- example: PORTER_API_URL="https://api.porter.run" PORTER_CLOUD_ACCOUNT_ID="4741dca9-..." PORTER_VERIFICATION_TOKEN="eyJhbGciOi..." ./bootstrap.sh
- expires_at:
- type: string
- format: date-time
- description: |
- Wall-clock time after which the embedded verification token is
- rejected by the /details and /bootstrap endpoints.
- example: '2026-05-12T15:44:43Z'
- CloudAccountDependent:
- type: object
- description: A resource still referencing the cloud account that prevents its disconnection
- required:
- - type
- - id
- - name
- properties:
- type:
- type: string
- description: The kind of resource
- enum:
- - cluster
- - object_storage
- - environment_group
- example: cluster
- id:
- type: string
- description: The resource's identifier, as a string
- example: '42'
- name:
- type: string
- description: Name of the resource
- example: prod-cluster
- CloudAccountDependents:
- type: object
- description: Active resources still referencing the cloud account
- required:
- - dependents
- properties:
- dependents:
- type: array
- description: Resources that must be removed before the cloud account can be disconnected
- items:
- $ref: '#/components/schemas/CloudAccountDependent'
- CreateAwsCloudAccountRequest:
- type: object
- required:
- - account_id
- properties:
- account_id:
- type: string
- description: AWS account ID to connect
- example: '123456789012'
- CreateAwsCloudAccountResponseBody:
- type: object
- required:
- - id
- properties:
- id:
- type: string
- format: uuid
- description: Unique identifier of the created cloud account
- example: 123e4567-e89b-12d3-a456-426614174000
- AwsCloudFormationResponseBody:
- type: object
- required:
- - cloudformation_url
- properties:
- cloudformation_url:
- type: string
- description: AWS console URL that launches the Porter IAM CloudFormation stack
- example: https://console.aws.amazon.com/cloudformation/home?#/stacks/create/review?templateURL=https://porter-role.s3.us-east-2.amazonaws.com/cloudformation-access-policy-external-id.json&stackName=PorterRole&param_ExternalIdParameter=c79fcf53-7163-4649-9881-a071bc64d923
- GcpWifStatusResponseBody:
- type: object
- required:
- - state
- - percent_complete
- properties:
- state:
- type: string
- enum:
- - none
- - initiated
- - syncing
- - connected
- description: |
- Current state of the GCP cloud account's Workload Identity
- Federation setup. Composed from the wif row (pre-cutover) and
- the cloud_account row (post-cutover). Same progression for
- fresh-connect and migrate flows. See the get_gcp_wif_status
- endpoint description for details.
- example: syncing
- percent_complete:
- type: integer
- minimum: 0
- maximum: 100
- description: |
- SyncIam progress. Meaningful when state is `syncing`; 100 when
- state is `connected`; 0 otherwise.
- example: 60
- AzureFICMigrationStatusResponseBody:
- type: object
- required:
- - state
- - error_message
- - can_connect_via_fic
- - clusters_updated
- - secret_delete_command
- - azure_secret_exists
- - secret_warning_dismissed
- properties:
- state:
- type: string
- enum:
- - none
- - pending
- - running
- - cutting_over
- - completed
- - failed
- description: |
- Migration state. `none` when no migration has been started;
- otherwise the current migration row status.
- example: running
- error_message:
- type: string
- description: Failure reason. Empty unless state is `failed`.
- example: ''
- can_connect_via_fic:
- type: boolean
- x-go-name: CanConnectViaFIC
- description: Whether the account is linked to a federated identity.
- example: false
- clusters_updated:
- type: boolean
- description: Whether all clusters have been cut over to workload identity.
- example: false
- secret_delete_command:
- type: string
- description: |
- `az` snippet the customer runs to remove the now-unused client
- secret. Populated only once the migration is complete.
- example: ''
- azure_secret_exists:
- type: boolean
- description: |
- Whether the customer's Azure-side client secret still exists.
- Meaningful only once the migration is complete.
- example: false
- secret_warning_dismissed:
- type: boolean
- description: Whether the customer dismissed the lingering-secret warning.
- example: false
- GetGcpCloudAccountDetailsRequest:
- type: object
- required:
- - verification_token
- properties:
- verification_token:
- type: string
- minLength: 32
- description: |
- Bearer token issued by the create_gcp_cloud_account response.
- Validated against the hashed JWT stored on the
- gcp_workload_identities row; not consumed by this endpoint.
- GetGcpCloudAccountDetailsResponseBody:
- type: object
- required:
- - cloud_account_id
- - porter_project_id
- - gcp_project_id
- - tenant_external_id
- - porter_aws_account_id
- - porter_aws_role_name
- properties:
- cloud_account_id:
- type: string
- format: uuid
- description: Echo of the path param for client convenience.
- example: 123e4567-e89b-12d3-a456-426614174000
- porter_project_id:
- type: integer
- format: int64
- description: Porter project that owns the integration.
- example: 123
- gcp_project_id:
- type: string
- description: |
- Customer's GCP project ID the Terraform module will provision
- into. Echo of the value the customer submitted at initiate time.
- example: my-prod-project
- tenant_external_id:
- type: string
- description: |
- Per-tenant UUID embedded in resource names + the WIF provider
- attribute condition. Same value across rotations so the Terraform
- state path remains stable for the customer.
- example: c79fcf53-7163-4649-9881-a071bc64d923
- porter_aws_account_id:
- type: string
- description: |
- AWS account that Porter's CCP runs in. The customer's WIF
- provider trusts assumed-role sessions originating from this
- account.
- example: '992382605253'
- porter_aws_role_name:
- type: string
- description: |
- IAM role Porter's CCP self-assumes for tenant-scoped sessions
- used as the WIF subject token.
- example: porter-ccp
- BootstrapGcpCloudAccountRequest:
- type: object
- required:
- - verification_token
- - gcp_project_number
- - gcp_service_account_email
- - workload_identity_provider
- properties:
- verification_token:
- type: string
- minLength: 32
- description: |
- Single-use bearer token issued by create_gcp_cloud_account.
- Validated against the hashed JWT stored on the
- gcp_workload_identities row and consumed on success.
- gcp_project_number:
- type: string
- pattern: ^[0-9]+$
- description: |
- Numeric GCP project number for the project being bootstrapped.
- bootstrap.sh obtains this via `gcloud projects describe`.
- example: '551957868763'
- gcp_service_account_email:
- type: string
- description: |
- Full email of the GCP service account Terraform created. Porter
- impersonates this exact identity at federation time — the email
- is not derived from a naming convention so the Terraform module
- can change resource naming freely.
- workload_identity_provider:
- type: string
- description: |
- Full resource name of the Workload Identity Provider Terraform
- created (the `workload_identity_provider` Terraform output).
- Used verbatim as the federation audience.
- example: projects/551957868763/locations/global/workloadIdentityPools/porter-pool-6269/providers/porter-aws
- ClusterProvisioningStatus:
- type: string
- description: Overall status of cluster provisioning
- enum:
- - queued
- - in_progress
- - completed
- - failed
- ClusterResourceProgress:
- type: object
- description: Progress indicator showing completed vs total items
- required:
- - completed
- - total
- properties:
- completed:
- type: integer
- description: Number of items that have completed
- example: 2
- total:
- type: integer
- description: Total number of items
- example: 3
- ClusterResourcePhaseErrorCode:
- type: string
- description: Provider-specific error code explaining why the phase failed
- enum:
- - AWS_QUOTA_DENIED
- ClusterResource:
- type: object
- description: An individual cloud or cluster resource being provisioned
- required:
- - id
- - display_name
- - status
- properties:
- id:
- type: string
- description: Provider resource identifier or cluster resource name
- example: nat-09ea8077aea377c24
- display_name:
- type: string
- description: Human-readable name for the resource
- example: NAT Gateway (us-east-1a)
- url:
- type: string
- description: URL or endpoint for the resource (e.g., load balancer DNS)
- example: k8s-xxx-xxxx-xxxxx-xxxxxxxx.elb.us-east-1.amazonaws.com
- status:
- $ref: '#/components/schemas/ClusterProvisioningStatus'
- ClusterResourceGroup:
- type: object
- description: A group of related provider resources (for example NAT gateways, Cloud NAT, VNets, or subnets)
- required:
- - id
- - display_name
- - status
- properties:
- id:
- type: string
- description: Unique identifier for the resource group. Values are provider-specific.
- example: nat_gateways
- display_name:
- type: string
- description: Human-readable display name for the resource group
- example: NAT Gateways
- external_provider_id:
- type: string
- description: The external provider resource ID
- example: L-0263D0A3
- increase_link:
- type: string
- description: URL to the provider console page where a quota increase can be requested
- status:
- $ref: '#/components/schemas/ClusterProvisioningStatus'
- progress:
- $ref: '#/components/schemas/ClusterResourceProgress'
- resources:
- type: array
- description: List of individual resources in this group
- items:
- $ref: '#/components/schemas/ClusterResource'
- ClusterResourcePhase:
- type: object
- description: A provisioning phase containing related provider-specific resource groups
- required:
- - id
- - display_name
- - status
- properties:
- id:
- type: string
- description: Unique identifier for the phase
- example: network
- enum:
- - quota
- - network
- - compute
- - system
- - finalizing
- display_name:
- type: string
- description: Human-readable display name of the phase
- example: Network
- status:
- $ref: '#/components/schemas/ClusterProvisioningStatus'
- progress:
- $ref: '#/components/schemas/ClusterResourceProgress'
- error_code:
- $ref: '#/components/schemas/ClusterResourcePhaseErrorCode'
- resource_groups:
- type: array
- description: List of resource groups within this phase
- items:
- $ref: '#/components/schemas/ClusterResourceGroup'
- ClusterResourceStatus:
- type: object
- description: Status of cluster provisioning with a detailed, provider-aware resource breakdown by phase
- required:
- - status
- - updated_at
- - phases
- properties:
- status:
- $ref: '#/components/schemas/ClusterProvisioningStatus'
- updated_at:
- type: string
- format: date-time
- description: Timestamp of the last status update
- example: '2026-01-05T12:16:00Z'
- phases:
- type: array
- description: List of provisioning phases. The quota and finalizing phases are optional and may appear only for certain providers or cluster states.
- items:
- $ref: '#/components/schemas/ClusterResourcePhase'
- ClusterMetadataFeatureFlags:
- type: object
- required:
- - enable_loki_s3
- - karpenter_spot_enabled
- - internal_nlb_enabled
- - gke_alb_ingress_enabled
- properties:
- enable_loki_s3:
- type: boolean
- description: True if S3-backed Loki storage is available for this cluster.
- karpenter_spot_enabled:
- type: boolean
- description: True if Karpenter spot instance configuration is enabled for this cluster.
- internal_nlb_enabled:
- type: boolean
- description: True if web services on this cluster may select the internal load-balancer mode.
- gke_alb_ingress_enabled:
- type: boolean
- description: True if the GKE application load balancer ingress option is available for this cluster.
- ClusterMetadata:
- type: object
- required:
- - feature_flags
- properties:
- feature_flags:
- $ref: '#/components/schemas/ClusterMetadataFeatureFlags'
- MigrationPlan:
- x-scalar-ignore: true
- required:
- - source_cluster_id
- - destination_cluster_id
- - apps
- properties:
- source_cluster_id:
- type: integer
- description: ID of the source cluster
- destination_cluster_id:
- type: integer
- description: ID of the destination cluster if it already exists
- apps:
- type: array
- description: List of applications to migrate
- items:
- type: object
- required:
- - instance_id
- properties:
- instance_id:
- type: string
- description: ID of the application instance to migrate
- Migration:
- type: object
- x-scalar-ignore: true
- required:
- - migration_id
- - migration_plan
- - status
- - created_at_utc
- properties:
- migration_id:
- type: string
- description: Unique identifier of the migration
- migration_plan:
- $ref: '#/components/schemas/MigrationPlan'
- status:
- type: string
- enum:
- - in_progress
- - completed
- - failed
- - canceled
- description: Current status of the migration
- created_at_utc:
- type: string
- format: date-time
- description: Timestamp when the migration was created
- completed_at_utc:
- type: string
- format: date-time
- description: Timestamp when the migration completed (if applicable)
- App:
- type: object
- required:
- - id
- - name
- - cluster_id
- - deployment_target_id
- - git_repository
- - image_repository
- - created_at_utc
- properties:
- id:
- type: string
- description: Unique identifier of the application
- name:
- type: string
- description: Name of the application
- cluster_id:
- type: integer
- description: ID of the cluster this application belongs to
- deployment_target_id:
- type: string
- description: ID of the deployment target this application belongs to
- git_repository:
- type: string
- description: Git repository URL for the application
- image_repository:
- type: string
- description: Image repository URL for the application
- created_at_utc:
- type: string
- format: date-time
- description: Date and time when the application was created
- ListApplicationsItem:
- type: object
- required:
- - id
- - name
- - display_name
- - deployment_target_id
- - created_at
- properties:
- id:
- type: string
- description: Unique identifier of the application
- example: 123e4567-e89b-12d3-a456-426614174000
- name:
- type: string
- description: Name of the application
- example: my-app
- display_name:
- type: string
- description: Display name of the application
- example: my-application
- deployment_target_id:
- type: string
- description: ID of the deployment target this application is deployed to
- example: 123e4567-e89b-12d3-a456-426614174000
- created_at:
- type: string
- format: date-time
- description: Date and time when the application was created
- example: '2021-01-01T00:00:00Z'
- Image:
- type: object
- required:
- - repository
- - tag
- properties:
- repository:
- type: string
- description: Repository of the image
- tag:
- type: string
- description: Tag of the image
- ApplicationBuildMethod:
- type: string
- description: Method to use for building the application
- enum:
- - buildpack
- - docker
- example: docker
- ApplicationBuildConfigPatch:
- type: object
- description: Build configuration for patching (all fields optional)
- properties:
- method:
- $ref: '#/components/schemas/ApplicationBuildMethod'
- context:
- type: string
- description: Context to use for building the application
- example: ./
- builder:
- type: string
- description: Builder to use for building the application (buildpack only)
- example: heroku/buildpacks:20
- buildpacks:
- type: array
- description: Buildpacks to use for building the application (buildpack only)
- items:
- type: string
- example:
- - heroku/nodejs
- dockerfile:
- type: string
- description: Path to the dockerfile to use for building the application (docker only)
- example: ./Dockerfile
- ApplicationBuildConfig:
- allOf:
- - $ref: '#/components/schemas/ApplicationBuildConfigPatch'
- - type: object
- required:
- - method
- - context
- ApplicationSource:
- type: object
- description: Configuration for the source that the application is deployed from
- required:
- - github_repository
- - branch
- properties:
- github_repository:
- type: string
- description: Name of the GitHub repository
- example: repo-owner/repo-name
- branch:
- type: string
- description: Branch of the GitHub repository
- example: main
- ApplicationServiceType:
- type: string
- enum:
- - web
- - worker
- - job
- ConnectionType:
- type: string
- description: Type of the connection
- enum:
- - awsRole
- - azureManagedIdentity
- - gcpServiceAccount
- - cloudSql
- - disk
- BaseConnection:
- type: object
- required:
- - type
- properties:
- type:
- $ref: '#/components/schemas/ConnectionType'
- description: Type of the connection
- example: awsRole
- AwsRoleConnection:
- type: object
- allOf:
- - $ref: '#/components/schemas/BaseConnection'
- - type: object
- required:
- - role
- properties:
- role:
- type: string
- description: Role of the connection
- example: iam-role-name
- AzureManagedIdentityConnection:
- type: object
- allOf:
- - $ref: '#/components/schemas/BaseConnection'
- - type: object
- required:
- - identityName
- - resourceGroup
- properties:
- identityName:
- type: string
- description: Name of the user-assigned managed identity
- example: my-managed-identity
- resourceGroup:
- type: string
- description: Azure resource group where the managed identity lives
- example: my-resource-group
- GcpServiceAccountConnection:
- type: object
- allOf:
- - $ref: '#/components/schemas/BaseConnection'
- - type: object
- required:
- - serviceAccountEmail
- properties:
- serviceAccountEmail:
- type: string
- description: Fully-qualified email of the GCP IAM service account to impersonate
- CloudSqlInstance:
- type: object
- required:
- - connectionName
- - databasePort
- properties:
- connectionName:
- type: string
- description: Instance connection name (e.g. project:region:instance)
- example: project-123456:us-east1:instance-name
- databasePort:
- type: integer
- description: TCP port the database listens on
- example: 5432
- CloudSqlConfig:
- type: object
- required:
- - connectionName
- - databasePort
- - serviceAccount
- properties:
- connectionName:
- type: string
- deprecated: true
- description: 'Deprecated: use instances instead. Name of the Cloud SQL connection'
- example: project-123456:us-east1:instance-name
- databasePort:
- type: integer
- deprecated: true
- description: 'Deprecated: use instances instead. Port of the Cloud SQL connection'
- example: 5432
- serviceAccount:
- type: string
- description: Service account of the Cloud SQL connection
- example: my-service-account
- instances:
- type: array
- description: List of Cloud SQL instances to connect to. When present, takes precedence over connectionName and databasePort.
- items:
- $ref: '#/components/schemas/CloudSqlInstance'
- CloudSqlConnection:
- type: object
- allOf:
- - $ref: '#/components/schemas/BaseConnection'
- - type: object
- required:
- - config
- properties:
- config:
- $ref: '#/components/schemas/CloudSqlConfig'
- DiskConfig:
- type: object
- required:
- - name
- properties:
- name:
- type: string
- description: Name of the disk connection
- example: my-disk
- DiskConnection:
- type: object
- allOf:
- - $ref: '#/components/schemas/BaseConnection'
- - type: object
- required:
- - config
- properties:
- config:
- $ref: '#/components/schemas/DiskConfig'
- Connection:
- oneOf:
- - $ref: '#/components/schemas/AwsRoleConnection'
- - $ref: '#/components/schemas/AzureManagedIdentityConnection'
- - $ref: '#/components/schemas/GcpServiceAccountConnection'
- - $ref: '#/components/schemas/CloudSqlConnection'
- - $ref: '#/components/schemas/DiskConnection'
- discriminator:
- propertyName: type
- mapping:
- awsRole: '#/components/schemas/AwsRoleConnection'
- azureManagedIdentity: '#/components/schemas/AzureManagedIdentityConnection'
- gcpServiceAccount: '#/components/schemas/GcpServiceAccountConnection'
- cloudSql: '#/components/schemas/CloudSqlConnection'
- disk: '#/components/schemas/DiskConnection'
- BaseService:
- type: object
- required:
- - name
- - run
- - type
- - cpu_cores
- - ram_megabytes
- - termination_grace_period_seconds
- properties:
- name:
- type: string
- description: Name of the service
- example: web-service
- run:
- type: string
- description: The command to run for the service
- example: python app.py
- type:
- $ref: '#/components/schemas/ApplicationServiceType'
- description: The type of the service
- cpu_cores:
- type: number
- format: float
- description: The number of CPU cores to allocate to the service
- example: 1
- ram_megabytes:
- type: integer
- description: The amount of memory to allocate to the service in megabytes
- example: 1024
- cpu_cores_limit:
- type: number
- format: float
- description: The CPU limit for the service (will default to not being set)
- example: 1
- ram_megabytes_limit:
- type: integer
- description: The memory limit for the service (will default to the requested memory - ram_megabytes)
- example: 1024
- gpu_cores:
- type: integer
- description: The number of GPU cores to allocate to the service
- example: 1
- node_group_id:
- type: string
- description: The ID of the user node group to run the service on. If not provided, the service will be run on the default node group
- example: 123e4567-e89b-12d3-a456-426614174000
- termination_grace_period_seconds:
- type: integer
- description: The number of seconds to wait before terminating the service
- example: 30
- service_mesh_enabled:
- type: boolean
- description: Boolean indicating if this service should be added to the service mesh
- example: false
- connections:
- type: array
- description: List of connections for the service
- items:
- $ref: '#/components/schemas/Connection'
- AutoscalingType:
- type: string
- description: Type of autoscaling configuration
- example: default
- enum:
- - default
- - custom
- - temporal
- AutoscalingBase:
- type: object
- required:
- - type
- - enabled
- - min_instances
- - max_instances
- properties:
- type:
- $ref: '#/components/schemas/AutoscalingType'
- description: Type of autoscaling configuration
- enabled:
- type: boolean
- description: Whether autoscaling is enabled
- example: true
- min_instances:
- type: integer
- description: Minimum number of instances to run
- example: 1
- max_instances:
- type: integer
- description: Maximum number of instances to run
- example: 10
- DefaultAutoscalingConfig:
- title: Default Autoscaling
- type: object
- description: Standard autoscaling based on CPU/Memory/GPU thresholds.
- allOf:
- - $ref: '#/components/schemas/AutoscalingBase'
- - type: object
- required:
- - cpu_threshold_percent
- - memory_threshold_percent
- properties:
- cpu_threshold_percent:
- type: integer
- description: CPU threshold percentage to trigger scaling
- example: 80
- memory_threshold_percent:
- type: integer
- description: Memory threshold percentage to trigger scaling
- example: 80
- gpu_threshold_percent:
- type: integer
- description: GPU threshold percentage to trigger scaling
- example: 80
- vram_threshold_percent:
- type: integer
- description: GPU memory threshold percentage to trigger scaling
- example: 80
- CustomAutoscalingConfig:
- title: Custom Autoscaling
- type: object
- description: Custom autoscaling based on a list of Prometheus queries.
- allOf:
- - $ref: '#/components/schemas/AutoscalingBase'
- - type: object
- required:
- - metric_name
- - threshold
- - query
- properties:
- metric_name:
- type: string
- description: Name of the metric to use for autoscaling
- example: container_memory_usage_bytes
- threshold:
- type: number
- format: double
- description: Threshold to trigger scaling
- example: 1000
- query:
- type: string
- description: Prometheus query to use for autoscaling
- example: avg(container_memory_usage_bytes) / 1000000
- TemporalAutoscalingConfig:
- title: Temporal Autoscaling
- type: object
- description: Autoscaling based on Temporal cloud triggers.
- allOf:
- - $ref: '#/components/schemas/AutoscalingBase'
- - type: object
- required:
- - integration_id
- - task_queue
- - target_queue_size
- properties:
- integration_id:
- type: string
- description: ID of the Temporal integration to use for autoscaling
- example: '123'
- task_queue:
- type: string
- description: Name of the Temporal task queue to monitor
- example: my-queue
- target_queue_size:
- type: integer
- description: Target number of tasks in the queue per replica
- example: 100
- AutoscalingConfig:
- description: Configures autoscaling for a service
- oneOf:
- - $ref: '#/components/schemas/DefaultAutoscalingConfig'
- - $ref: '#/components/schemas/CustomAutoscalingConfig'
- - $ref: '#/components/schemas/TemporalAutoscalingConfig'
- discriminator:
- propertyName: type
- mapping:
- default: '#/components/schemas/DefaultAutoscalingConfig'
- custom: '#/components/schemas/CustomAutoscalingConfig'
- temporal: '#/components/schemas/TemporalAutoscalingConfig'
- PathRoutingRewriteMode:
- type: string
- description: |
- Specifies how URL paths for path-based routing should be rewritten. Defaults to "all".
-
- If the path set in pathRouting is /api/v1, then api/v1/subpath will be rewritten as follows:
- - all - (default) rewrite the entire path to the root path —> /.
- - prefix - rewrite the path for the URL path prefix only —> /subpath.
- - off - disable path rewriting —> /api/v1/subpath.
- enum:
- - 'off'
- - all
- - prefix
- example: all
- applications_PathRoute:
- type: object
- required:
- - path
- - port
- properties:
- path:
- type: string
- description: The URL path to route
- example: /api
- port:
- type: integer
- description: The port number to route to
- example: 8080
- service_name:
- type: string
- description: The name of the service. Defaults to the owning service. Required if application_name is set
- example: api-service
- application_name:
- type: string
- description: The name of the application. Defaults to the application of the current service
- example: my-app
- applications_PathRouting:
- type: object
- description: Configuration for path-based routing
- properties:
- rewrite_mode:
- $ref: '#/components/schemas/PathRoutingRewriteMode'
- description: Specifies how URL paths for path-based routing should be rewritten. Defaults to all
- paths:
- type: array
- description: List of path routes for custom routing
- items:
- $ref: '#/components/schemas/applications_PathRoute'
- AdvancedHealthCheck:
- type: object
- description: Advanced configuration for individual health checks
- x-scalar-ignore: true
- required:
- - enabled
- - timeout_seconds
- properties:
- enabled:
- type: boolean
- description: Whether the health check is enabled
- http_path:
- type: string
- description: HTTP path to use for the health check (Required - web services only)
- command:
- type: string
- description: Command to run for the health check (Required - worker services only)
- timeout_seconds:
- type: integer
- description: Number of seconds to wait before timing out the health check. Must be greater than 0
- initial_delay_seconds:
- type: integer
- description: Number of seconds to wait before starting the health check. Must be greater than or equal to 0
- period_seconds:
- type: integer
- description: How often (in seconds) to perform the health check. Must be greater than or equal to 1
- failure_threshold:
- type: integer
- description: Number of consecutive failures before the container is considered unhealthy. Must be greater than or equal to 1
- applications_MetricsScraping:
- type: object
- required:
- - enabled
- - port
- - path
- - scrape_interval_seconds
- properties:
- enabled:
- type: boolean
- description: Explicitly enables or disables metrics scraping for the service
- example: true
- port:
- type: integer
- description: Port to scrape metrics from
- example: 9090
- path:
- type: string
- description: Path to scrape metrics from
- example: /metrics
- scrape_interval_seconds:
- type: integer
- description: Interval in seconds to scrape metrics from the service
- example: 60
- WebService:
- title: Web
- type: object
- description: A web-facing service
- allOf:
- - $ref: '#/components/schemas/BaseService'
- - type: object
- required:
- - instances
- - port
- - private
- properties:
- instances:
- type: integer
- description: The number of instances to run for the service
- example: 1
- sleep:
- type: boolean
- description: Whether the service should sleep
- example: false
- port:
- type: integer
- description: The port that the service will listen on
- example: 8080
- autoscaling:
- $ref: '#/components/schemas/AutoscalingConfig'
- domains:
- type: array
- description: List of domains for this service
- items:
- $ref: '#/components/schemas/Domain'
- health_check:
- $ref: '#/components/schemas/HealthCheck'
- private:
- type: boolean
- description: Whether the web service is private (not publicly accessible). Deprecated; use load_balancer_config instead. Retained for back-compat with older clients.
- example: false
- deprecated: true
- load_balancer_config:
- $ref: '#/components/schemas/LoadBalancerConfig'
- description: Configures the load balancer that fronts the service. Deprecated; use load_balancers instead.
- deprecated: true
- load_balancers:
- type: array
- description: The load balancers serving this service. An empty list means no load balancer.
- items:
- $ref: '#/components/schemas/LoadBalancerConfig'
- ingress_annotations:
- type: object
- description: Map of annotations to apply to the ingress resource
- additionalProperties:
- type: string
- example:
- nginx.ingress.kubernetes.io/proxy-body-size: 100m
- disable_tls:
- type: boolean
- description: Whether to disable TLS certificate management on the cluster. If true, exposed applications will not be protected by TLS unless managed elsewhere
- example: false
- path_routing:
- $ref: '#/components/schemas/applications_PathRouting'
- description: Custom routing configuration for different URL paths
- liveness_check:
- $ref: '#/components/schemas/AdvancedHealthCheck'
- description: Advanced configuration for the liveness probe
- readiness_check:
- $ref: '#/components/schemas/AdvancedHealthCheck'
- description: Advanced configuration for the readiness probe
- startup_check:
- $ref: '#/components/schemas/AdvancedHealthCheck'
- description: Advanced configuration for the startup probe
- metrics_scraping:
- $ref: '#/components/schemas/applications_MetricsScraping'
- description: Metrics scraping configuration for the service
- forward_auth:
- type: boolean
- description: When true, nginx ingress annotations are added to route auth through the cluster's oauth2-proxy
- example: false
- WorkerService:
- title: Worker
- type: object
- description: A background worker service
- allOf:
- - $ref: '#/components/schemas/BaseService'
- - type: object
- required:
- - instances
- properties:
- instances:
- type: integer
- description: The number of instances to run for the service
- example: 1
- sleep:
- type: boolean
- description: Whether the service should sleep
- example: false
- autoscaling:
- $ref: '#/components/schemas/AutoscalingConfig'
- health_check:
- $ref: '#/components/schemas/HealthCheck'
- liveness_check:
- $ref: '#/components/schemas/AdvancedHealthCheck'
- description: Advanced configuration for the liveness probe
- readiness_check:
- $ref: '#/components/schemas/AdvancedHealthCheck'
- description: Advanced configuration for the readiness probe
- startup_check:
- $ref: '#/components/schemas/AdvancedHealthCheck'
- description: Advanced configuration for the startup probe
- metrics_scraping:
- $ref: '#/components/schemas/applications_MetricsScraping'
- description: Metrics scraping configuration for the service
- JobService:
- title: Job
- type: object
- description: A service for scheduled jobs or one-off job runs
- allOf:
- - $ref: '#/components/schemas/BaseService'
- - type: object
- required:
- - allowConcurrent
- - cron
- - suspendCron
- - timeoutSeconds
- properties:
- allowConcurrent:
- type: boolean
- description: Whether to allow concurrent job runs
- example: false
- cron:
- type: string
- description: Cron expression for the job
- example: 0 0 * * *
- suspendCron:
- type: boolean
- description: Whether to suspend the job
- example: false
- timeoutSeconds:
- type: integer
- description: Timeout for the job in seconds
- example: 3600
- ApplicationService:
- oneOf:
- - $ref: '#/components/schemas/WebService'
- - $ref: '#/components/schemas/WorkerService'
- - $ref: '#/components/schemas/JobService'
- discriminator:
- propertyName: type
- mapping:
- web: '#/components/schemas/WebService'
- worker: '#/components/schemas/WorkerService'
- job: '#/components/schemas/JobService'
- PredeployJobServicePatch:
- description: Configuration for a predeploy job for patching (all fields optional)
- type: object
- properties:
- run:
- type: string
- description: The command to run for the job
- example: python app.py
- cpu_cores:
- type: number
- format: float
- description: The number of CPU cores to allocate to the job
- example: 1
- ram_megabytes:
- type: integer
- description: The amount of memory to allocate to the job in megabytes
- example: 1024
- timeout_seconds:
- type: integer
- description: Timeout for the job in seconds
- example: 3600
- connections:
- type: array
- description: List of connections for the job
- items:
- $ref: '#/components/schemas/Connection'
- PredeployJobService:
- description: Configuration for a job service that runs before each new deployment
- allOf:
- - $ref: '#/components/schemas/PredeployJobServicePatch'
- - type: object
- required:
- - run
- - cpu_cores
- - ram_megabytes
- - timeout_seconds
- DeploymentStrategyConfig:
- type: object
- description: Deployment strategy configuration (default strategy is rolling)
- required:
- - type
- properties:
- type:
- type: string
- description: Type of deployment strategy
- enum:
- - rolling
- - blue_green
- example: rolling
- group:
- type: string
- description: Group to use for blue-green deployment (Required for blue_green type only)
- example: frontend-backend-group
- BaseApplicationConfig:
- type: object
- required:
- - services
- properties:
- image:
- $ref: '#/components/schemas/Image'
- description: Image repository URL for the application
- build:
- $ref: '#/components/schemas/ApplicationBuildConfig'
- description: Build configuration for the application
- source:
- $ref: '#/components/schemas/ApplicationSource'
- description: Source configuration for the application
- services:
- type: array
- description: List of services in the application
- items:
- $ref: '#/components/schemas/ApplicationService'
- variables:
- type: array
- description: List of variables for the application
- items:
- $ref: '#/components/schemas/EnvironmentGroupKeyValue'
- environment_groups:
- type: array
- description: List of environment variable groups for the application
- items:
- $ref: '#/components/schemas/ApplicationContractEnvironmentGroup'
- predeploy:
- $ref: '#/components/schemas/PredeployJobService'
- description: Job that runs before each deployment
- helm_overrides:
- type: string
- description: Base64 encoded Helm values to override default chart values
- example: eyJvdmVycmlkZV9maWVsZCI6Im92ZXJyaWRlX3ZhbHVlIn0=
- auto_rollback:
- type: boolean
- description: Whether automatic rollback is enabled (disabled by default)
- example: true
- deployment_strategy:
- $ref: '#/components/schemas/DeploymentStrategyConfig'
- description: Deployment strategy configuration
- efs_storage:
- $ref: '#/components/schemas/EFSStorage'
- description: (Deprecated) EFS shared storage configuration across services
- deprecated: true
- cloud_sql:
- $ref: '#/components/schemas/CloudSQL'
- description: (Deprecated) CloudSQL proxy configuration for the application
- deprecated: true
- CreateApplicationRequestBody:
- type: object
- allOf:
- - $ref: '#/components/schemas/BaseApplicationConfig'
- - type: object
- required:
- - name
- - deployment_target_id
- properties:
- name:
- type: string
- description: Name of the application
- example: my-app
- deployment_target_id:
- type: string
- format: uuid
- x-go-type: uuid.UUID
- description: ID of the deployment target this application is deployed to
- example: 05fb5b78-baa2-4857-9b46-101240ade656
- secrets:
- type: array
- description: List of secrets for the application
- items:
- $ref: '#/components/schemas/EnvironmentGroupKeyOptionalValue'
- EnvironmentGroupKeyNoValue:
- type: object
- x-scalar-ignore: true
- required:
- - key
- properties:
- key:
- type: string
- description: Name of the environment variable
- example: API_URL
- GetApplicationResponseBody:
- type: object
- description: Application with extra fields for GET requests
- allOf:
- - $ref: '#/components/schemas/BaseApplicationConfig'
- - type: object
- required:
- - id
- - name
- - display_name
- - deployment_target_id
- - updated_at
- - created_at
- properties:
- id:
- type: string
- description: Unique identifier of the application
- example: 123e4567-e89b-12d3-a456-426614174000
- name:
- type: string
- description: Name of the application
- example: my-app
- display_name:
- type: string
- description: Display name of the application
- example: my-application
- deployment_target_id:
- type: string
- description: ID of the deployment target this application is deployed to
- example: 05fb5b78-baa2-4857-9b46-101240ade656
- updated_at:
- type: string
- format: date-time
- description: Date and time when the application was last updated
- created_at:
- type: string
- format: date-time
- description: Date and time when the application was created
- secrets:
- type: array
- description: List of secrets for the application
- items:
- $ref: '#/components/schemas/EnvironmentGroupKeyNoValue'
- deploy_frozen_at:
- type: string
- format: date-time
- nullable: true
- description: When deploys were frozen. Null means not frozen.
- deploy_freeze_enabled:
- type: boolean
- description: Whether the deploy freeze feature is enabled for this project (LaunchDarkly flag).
- UpdateApplicationRequestBody:
- type: object
- allOf:
- - $ref: '#/components/schemas/BaseApplicationConfig'
- - type: object
- properties:
- secrets:
- type: array
- description: List of secrets for the application
- items:
- $ref: '#/components/schemas/EnvironmentGroupKeyOptionalValue'
- ImagePatch:
- type: object
- description: Image configuration for patching. All fields are optional.
- properties:
- repository:
- type: string
- description: Repository of the image
- tag:
- type: string
- description: Tag of the image
- PredeployJobServicePatchOptional:
- description: Nullable wrapper for PredeployJobServicePatch. Set to null to delete the predeploy job.
- type: object
- properties:
- value:
- $ref: '#/components/schemas/PredeployJobServicePatch'
- PatchApplicationRequestBody:
- type: object
- description: Request body for partially updating an application's configuration. All fields are optional - only provided fields will be updated.
- properties:
- build:
- $ref: '#/components/schemas/ApplicationBuildConfigPatch'
- description: Build configuration for the application (all fields optional)
- image:
- $ref: '#/components/schemas/ImagePatch'
- description: Container image configuration for the application. Mutually exclusive with build - setting image will clear build configuration.
- predeploy:
- $ref: '#/components/schemas/PredeployJobServicePatchOptional'
- description: Job that runs before each deployment. Set to null to delete the predeploy job.
- variables:
- type: array
- description: List of environment variables for the application
- items:
- $ref: '#/components/schemas/EnvironmentGroupKeyValue'
- secrets:
- type: array
- description: List of secrets for the application (nil value preserves existing secret)
- items:
- $ref: '#/components/schemas/EnvironmentGroupKeyOptionalValue'
- environment_groups:
- type: array
- description: List of environment groups to sync with this application. If provided, replaces all existing synced env groups.
- items:
- $ref: '#/components/schemas/ApplicationContractEnvironmentGroup'
- helm_overrides:
- type: string
- description: Base64 encoded Helm values to override default chart values
- example: eyJvdmVycmlkZV9maWVsZCI6Im92ZXJyaWRlX3ZhbHVlIn0=
- auto_rollback:
- type: boolean
- description: Whether automatic rollback is enabled (disabled by default)
- example: true
- deployment_strategy:
- $ref: '#/components/schemas/DeploymentStrategyConfig'
- description: Deployment strategy configuration
- services:
- type: array
- description: List of services in the application. If provided, replaces all existing services.
- items:
- $ref: '#/components/schemas/ApplicationService'
- efs_storage:
- $ref: '#/components/schemas/EFSStorage'
- description: (Deprecated) EFS shared storage configuration - fully replaces existing if provided
- deprecated: true
- cloud_sql:
- $ref: '#/components/schemas/CloudSQL'
- description: (Deprecated) CloudSQL proxy configuration - fully replaces existing if provided
- deprecated: true
- GetApplicationBuildSettingsResponseBody:
- type: object
- description: Build configuration that must be resolved server-side
- required:
- - repository_url
- - variables
- - build_template_id
- - narvi_enabled
- properties:
- repository_url:
- type: string
- description: Repository the built image is pushed to
- example: registry.example.com/my-app
- variables:
- type: object
- description: Non-secret environment variables available to the build
- additionalProperties:
- type: string
- example:
- NODE_ENV: production
- build_template_id:
- type: string
- format: uuid
- x-go-type: uuid.UUID
- description: Build template applied to this application, or the nil UUID when none is set
- example: 123e4567-e89b-12d3-a456-426614174000
- narvi_enabled:
- type: boolean
- description: Whether the build template enables Narvi
- example: false
- SetNodeGroupRequestBody:
- type: object
- required:
- - node_group_id
- properties:
- node_group_id:
- type: string
- description: ID of the node group to assign to all services in the application. Passing "default" will set the node group to the default node group.
- example: 123e4567-e89b-12d3-a456-426614174000
- AutoscalingConfigOptional:
- description: Autoscaling configuration for patching services
- properties:
- type:
- $ref: '#/components/schemas/AutoscalingType'
- description: Type of autoscaling configuration
- enabled:
- type: boolean
- description: Whether autoscaling is enabled
- example: true
- min_instances:
- type: integer
- description: Minimum number of instances to run
- example: 1
- max_instances:
- type: integer
- description: Maximum number of instances to run
- example: 10
- cpu_threshold_percent:
- type: integer
- description: CPU threshold percentage to trigger scaling (Default autoscaling only)
- example: 80
- memory_threshold_percent:
- type: integer
- description: Memory threshold percentage to trigger scaling (Default autoscaling only)
- example: 80
- metric_name:
- type: string
- description: Name of the metric to use for autoscaling (Custom autoscaling only)
- example: container_memory_usage_bytes
- threshold:
- type: number
- format: double
- description: Threshold to trigger scaling (Custom autoscaling only)
- example: 1000
- query:
- type: string
- description: Prometheus query to use for autoscaling (Custom autoscaling only)
- example: avg(container_memory_usage_bytes) / 1000000
- PatchApplicationServiceRequestBody:
- type: object
- description: Request body for patching an application service
- properties:
- instances:
- type: integer
- description: Number of instances to run for the service - will be overwritten if autoscaling is enabled
- minimum: 0
- example: 3
- autoscaling:
- $ref: '#/components/schemas/AutoscalingConfigOptional'
- description: Autoscaling configuration for the service
- sleep:
- type: boolean
- description: Whether to enable sleep mode for the service, which pauses all instances
- example: false
- ApplicationWebhookEventType:
- type: string
- description: Type of application event that can trigger a webhook
- enum:
- - build
- - deploy
- - predeploy
- example: deploy
- ApplicationWebhookEventStatus:
- type: string
- description: Status of the application event that can trigger a webhook
- enum:
- - success
- - failed
- - canceled
- example: success
- ApplicationWebhook:
- type: object
- required:
- - url
- - app_event_type
- - app_event_status
- properties:
- url:
- type: string
- format: uri
- description: URL where the webhook will be sent
- example: https://example.com/webhook
- app_event_type:
- $ref: '#/components/schemas/ApplicationWebhookEventType'
- description: Type of application event that triggers this webhook
- app_event_status:
- $ref: '#/components/schemas/ApplicationWebhookEventStatus'
- description: Status of the application event that triggers this webhook
- payload_encryption_key:
- type: string
- description: Optional key used to encrypt the webhook payload. If not provided, payload will not be encrypted.
- example: my-secret-key
- UpdateApplicationWebhooksRequestBody:
- type: object
- required:
- - webhooks
- properties:
- webhooks:
- type: array
- description: List of webhooks to configure. Empty array removes all webhooks.
- items:
- $ref: '#/components/schemas/ApplicationWebhook'
- ScalingAutoscalingConfig:
- type: object
- x-scalar-ignore: true
- properties:
- min_instances:
- type: integer
- description: Minimum number of instances
- max_instances:
- type: integer
- description: Maximum number of instances
- ScaleApplicationServiceRequestBody:
- type: object
- description: |
- Request body for scaling an application service. The service must not be asleep. Only one of instances or autoscaling should be provided per request.
- properties:
- instances:
- type: integer
- description: |
- Number of instances to scale the service to. Must be non-negative. Cannot be set when default autoscaling is enabled on the service.
- minimum: 0
- example: 3
- autoscaling:
- $ref: '#/components/schemas/ScalingAutoscalingConfig'
- description: |
- Autoscaling configuration patch. Only supported for services with default autoscaling enabled (not custom or temporal). min_instances must not exceed max_instances when both are provided.
- ChangeApplicationGitHubSourceRequestBody:
- type: object
- required:
- - repo_name
- - branch
- - generate_workflow
- properties:
- repo_name:
- type: string
- description: The repository to deploy from, in owner/repo format
- example: porter-dev/porter
- minLength: 1
- branch:
- type: string
- description: The branch to deploy from
- example: main
- minLength: 1
- generate_workflow:
- type: boolean
- description: Whether to open a PR adding the Porter workflow to the repository
- default: false
- ChangeApplicationGitHubSourceResponseBody:
- type: object
- required:
- - add_workflow_pr_url
- - delete_workflow_pr_url
- - warnings
- - has_errors
- properties:
- add_workflow_pr_url:
- type: string
- description: URL for the PR that adds the workflow to the new source
- delete_workflow_pr_url:
- type: string
- description: URL for the PR that removes the old workflow
- warnings:
- type: array
- description: Any user-facing warnings about the source change
- items:
- type: string
- has_errors:
- type: boolean
- description: Whether any errors occurred during workflow migration
- DomainTLSStatus:
- type: string
- description: Readiness of the domain's TLS certificate.
- enum:
- - ready
- - pending
- - failed
- - unknown
- DomainStatus:
- type: object
- required:
- - name
- - tls_status
- properties:
- name:
- type: string
- description: Domain name.
- example: app.example.com
- tls_status:
- $ref: '#/components/schemas/DomainTLSStatus'
- ApplicationEventType:
- type: string
- x-scalar-ignore: true
- description: Type of application event
- enum:
- - DEPLOY
- - PRE_DEPLOY
- - INITIAL_DEPLOY
- - BUILD
- - NOTIFICATION
- - APPLY
- - SCALING
- example: DEPLOY
- ApplicationEventStatus:
- type: string
- x-scalar-ignore: true
- description: Status of the application event
- enum:
- - PROGRESSING
- - FAILED
- - CANCELED
- - SUCCESS
- PaginationResponse:
- type: object
- x-scalar-ignore: true
- required:
- - current_page
- - has_next_page
- - total_pages
- properties:
- current_page:
- type: integer
- description: Current page number (1-based)
- example: 1
- total_pages:
- type: integer
- description: Total number of pages
- example: 10
- has_next_page:
- type: boolean
- description: Whether there are more items after this page
- example: true
- BuildGitMetadata:
- type: object
- description: Git-related metadata
- x-scalar-ignore: true
- properties:
- commit_sha:
- type: string
- description: The unique identifier for a specific commit
- branch_name:
- type: string
- description: The name of the current Git branch
- BuildGithubMetadata:
- type: object
- description: GitHub-specific metadata
- x-scalar-ignore: true
- properties:
- account_id:
- type: string
- description: The unique ID of the GitHub account that owns the repository
- action_run_id:
- type: string
- description: The identifier for a GitHub Actions workflow run
- action_run_attempt:
- type: string
- description: The attempt number of the GitHub Actions workflow run
- job_id:
- type: string
- description: The unique identifier for the GitHub job
- repository_name:
- type: string
- description: The name of the GitHub repository
- owner_name:
- type: string
- description: The name of the GitHub account that owns the repository
- BuildOtherMetadata:
- type: object
- description: Additional build environment metadata
- x-scalar-ignore: true
- additionalProperties:
- type: string
- BuildMetadata:
- type: object
- description: Metadata for the build
- x-scalar-ignore: true
- properties:
- image_tag:
- type: string
- description: The tag of the image to be built
- example: 1.0.0
- origin:
- type: string
- enum:
- - github
- - other
- git:
- $ref: '#/components/schemas/BuildGitMetadata'
- github:
- $ref: '#/components/schemas/BuildGithubMetadata'
- other:
- $ref: '#/components/schemas/BuildOtherMetadata'
- ServiceDeploymentMetadata:
- type: object
- x-scalar-ignore: true
- required:
- - type
- - status
- - external_uri
- properties:
- type:
- type: string
- description: Type of the service
- status:
- description: Status of the service
- $ref: '#/components/schemas/ApplicationEventStatus'
- external_uri:
- type: string
- description: External URI of the service
- pod_name:
- type: string
- description: Name of the pod that was deployed (for logs filtering)
- error_summaries:
- type: array
- items:
- type: string
- description: Error summaries for the service (populated when status is FAILED)
- DeployEventMetadata:
- type: object
- x-scalar-ignore: true
- required:
- - start_time
- - application_contract_revision_id
- - image_tag
- - service_deployment_metadata
- - additional_metadata
- properties:
- start_time:
- type: string
- format: date-time
- description: Start time of the deploy
- application_contract_revision_id:
- type: string
- description: ID of the application contract revision
- image_tag:
- type: string
- description: Tag of the image that was deployed
- service_deployment_metadata:
- type: object
- description: Metadata for each service that was deployed
- additionalProperties:
- $ref: '#/components/schemas/ServiceDeploymentMetadata'
- additional_metadata:
- type: object
- description: Additional metadata for the deploy event
- additionalProperties: true
- DeploymentJobMetadata:
- type: object
- x-scalar-ignore: true
- required:
- - start_time
- - application_contract_revision_id
- - image_tag
- - description
- properties:
- start_time:
- type: string
- format: date-time
- description: Start time of the deployment job
- application_contract_revision_id:
- type: string
- description: ID of the application contract revision
- image_tag:
- type: string
- description: Tag of the image that was deployed
- description:
- type: string
- description: Description of the deployment job status
- NotificationEventMetadataError:
- type: object
- x-scalar-ignore: true
- required:
- - summary
- - code
- - detail
- - documentation
- - mitigation_steps
- - should_view_logs
- properties:
- summary:
- type: string
- description: A brief summary of the error.
- example: The service has an invalid start command
- code:
- type: integer
- description: An internal error code.
- example: 12
- detail:
- type: string
- description: A detailed description of the error.
- example: The start command "234312" was not found in $PATH
- documentation:
- type: array
- items:
- type: string
- description: A list of URLs to relevant documentation.
- example:
- - https://docs.porter.run/applications/debug/common-errors#application-issues-and-non-zero-exit-codes
- mitigation_steps:
- type: string
- description: Suggested steps to mitigate or resolve the error.
- example: Please consult our documentation for further guidance. If you need additional help, please reach out to us at [email protected].
- should_view_logs:
- type: boolean
- description: Indicates if viewing logs might be helpful for this error.
- example: true
- NotificationEventMetadata:
- type: object
- x-scalar-ignore: true
- required:
- - id
- - scope
- - timestamp
- - service_name
- - is_job_failure_notification
- - deployment_status
- - error
- - application_contract_revision_id
- - process_metadata
- properties:
- id:
- type: string
- description: ID of the notification
- scope:
- type: string
- description: Scope of the notification
- enum:
- - SERVICE
- - REVISION
- timestamp:
- type: string
- format: date-time
- description: Timestamp of the notification
- error:
- type: object
- description: Error information for the notification
- $ref: '#/components/schemas/NotificationEventMetadataError'
- service_name:
- type: string
- description: Name of the service that the notification is for
- is_job_failure_notification:
- type: boolean
- description: Whether the notification is a job failure notification
- example: true
- deployment_status:
- description: Status of the deployment
- $ref: '#/components/schemas/ApplicationEventStatus'
- application_contract_revision_id:
- type: string
- description: ID of the application contract revision that the notification is for
- process_metadata:
- type: object
- description: Metadata about the process that caused the error.
- additionalProperties:
- type: string
- ApplyMetadata:
- type: object
- x-scalar-ignore: true
- required:
- - commit_sha
- - image_tag
- - description
- properties:
- commit_sha:
- type: string
- description: Commit SHA of the update apply
- image_tag:
- type: string
- description: Image tag of the update apply
- description:
- type: string
- description: Description of the update apply status or error message
- ScalingEventMetadata:
- type: object
- x-scalar-ignore: true
- required:
- - service_name
- - service_type
- - application_contract_revision_id
- properties:
- service_name:
- type: string
- description: Name of the service being scaled
- service_type:
- type: string
- description: Type of the service (web, worker)
- previous_instances:
- type: integer
- description: Number of instances before scaling
- new_instances:
- type: integer
- description: Number of instances after scaling
- previous_autoscaling:
- $ref: '#/components/schemas/ScalingAutoscalingConfig'
- new_autoscaling:
- $ref: '#/components/schemas/ScalingAutoscalingConfig'
- application_contract_revision_id:
- type: string
- description: ID of the application contract revision
- ApplicationEvent:
- type: object
- x-scalar-ignore: true
- required:
- - id
- - created_at
- - application_id
- - deployment_target_id
- - type
- - status
- properties:
- id:
- type: string
- description: Unique identifier for the event
- created_at:
- type: string
- format: date-time
- description: Timestamp when the event was created
- end_time:
- type: string
- format: date-time
- description: Timestamp when the event ended
- application_id:
- type: string
- description: Unique identifier for the application
- deployment_target_id:
- type: string
- description: Unique identifier for the deployment target
- type:
- description: Type of the event
- $ref: '#/components/schemas/ApplicationEventType'
- status:
- description: Status of the event
- $ref: '#/components/schemas/ApplicationEventStatus'
- dismissed_at:
- type: string
- format: date-time
- description: Timestamp when the event was dismissed
- dismissed_by:
- type: integer
- description: User ID that dismissed the event
- build_event_metadata:
- $ref: '#/components/schemas/BuildMetadata'
- deploy_event_metadata:
- $ref: '#/components/schemas/DeployEventMetadata'
- deployment_job_metadata:
- $ref: '#/components/schemas/DeploymentJobMetadata'
- notification_event_metadata:
- $ref: '#/components/schemas/NotificationEventMetadata'
- apply_metadata:
- $ref: '#/components/schemas/ApplyMetadata'
- scaling_event_metadata:
- $ref: '#/components/schemas/ScalingEventMetadata'
- PorterErrorCodeName:
- type: string
- description: Human-readable name for a Porter error code
- enum:
- - NON_ZERO_EXIT_CODE
- - PROCESS_KILLED_BY_SIGKILL
- - INVALID_START_COMMAND
- - PROCESS_CRASHED
- - HEALTH_CHECK_FAILED
- - LIVENESS_PROBE_FAILED
- - READINESS_PROBE_FAILED
- - IMAGE_PULL_FAILED
- - OUT_OF_MEMORY
- - RESOURCE_LIMIT_EXCEEDED
- - MEMORY_LIMIT_EXCEEDED
- - MEMORY_LIMIT_EXCEEDED_DURING_SCALE
- - CPU_LIMIT_EXCEEDED
- - CPU_LIMIT_EXCEEDED_DURING_SCALE
- - SERVICE_UNSCHEDULABLE
- - POD_EVICTED
- NotificationError:
- type: object
- description: Error details for a notification
- required:
- - code
- - code_name
- - summary
- properties:
- code:
- type: integer
- description: Numeric error code.
- code_name:
- $ref: '#/components/schemas/PorterErrorCodeName'
- summary:
- type: string
- description: One-line description of the error.
- Notification:
- type: object
- description: A notification event for an application
- required:
- - id
- - created_at
- - application_id
- - deployment_target_id
- - service_name
- - pod_name
- - container_id
- - error
- properties:
- id:
- type: string
- format: uuid
- description: Notification ID. Use this to dismiss the notification.
- created_at:
- type: string
- format: date-time
- description: When the notification was created.
- application_id:
- type: string
- format: uuid
- description: The application this notification belongs to.
- deployment_target_id:
- type: string
- format: uuid
- description: The deployment target (environment) where the event occurred.
- service_name:
- type: string
- nullable: true
- description: The service that triggered the notification. Null for revision-level events (deploy failures, rollbacks).
- pod_name:
- type: string
- nullable: true
- description: The pod where the error occurred. Null for scheduling and revision-level events.
- container_id:
- type: string
- nullable: true
- description: The container ID where the error occurred. Null when the container never started.
- error:
- $ref: '#/components/schemas/NotificationError'
- NotificationCount:
- type: object
- x-scalar-ignore: true
- required:
- - application_id
- - notification_count
- properties:
- application_id:
- type: string
- description: Unique identifier for the application
- notification_count:
- type: integer
- description: Number of notifications for the latest revision of the application
- CiStep:
- type: object
- x-scalar-ignore: true
- required:
- - step_type
- - status
- - ci_index
- - started_at
- properties:
- step_type:
- type: string
- enum:
- - build
- - pre_deploy
- - deploy
- status:
- type: string
- enum:
- - success
- - progressing
- - failed
- commit_sha:
- type: string
- ci_index:
- type: integer
- description: Ordering index within a CI pipeline run (e.g. build=1, pre-deploy=2, deploy=3)
- image_tag:
- type: string
- started_at:
- type: string
- format: date-time
- completed_at:
- type: string
- format: date-time
- ApplicationCiStatus:
- type: object
- x-scalar-ignore: true
- required:
- - application_id
- - steps
- properties:
- application_id:
- type: string
- steps:
- type: array
- items:
- $ref: '#/components/schemas/CiStep'
- last_successfully_deployed_image_tag:
- type: string
- last_successful_deploy_at:
- type: string
- format: date-time
- ApplicationLog:
- type: object
- x-scalar-ignore: true
- required:
- - timestamp
- - application_id
- - application_contract_revision_id
- - line
- - service_name
- - container_id
- properties:
- timestamp:
- type: string
- format: date-time
- description: Timestamp when the log was generated
- example: '2021-01-01T00:00:00Z'
- application_id:
- type: string
- description: Unique identifier for the application
- example: 123e4567-e89b-12d3-a456-426614174000
- application_contract_revision_id:
- type: string
- description: Revision ID of the application
- example: 123e4567-e89b-12d3-a456-426614174000
- line:
- type: string
- description: Raw log line
- example: 'Error: Failed to connect to database'
- service_name:
- type: string
- description: Name of the service that generated the log
- example: api
- job_run_name:
- type: string
- description: Name of the job run that generated the log
- example: app-name-job-name-12312312
- container_id:
- type: string
- description: ID of the container that generated the log
- example: 123e4567-e89b-12d3-a456-426614174000
- pod_name:
- type: string
- description: Name of the pod that generated the log
- example: my-app-7d8f9c5b6-xyz12
- level:
- type: string
- description: Severity level of the log line. One of "error", "warning", or "info".
- enum:
- - error
- - warning
- - info
- example: error
- ApplicationContractRevision:
- type: object
- x-scalar-ignore: true
- required:
- - id
- - created_at
- - application_id
- - deployment_target_id
- - revision_number
- properties:
- id:
- type: string
- description: Unique identifier for the revision
- created_at:
- type: string
- format: date-time
- description: Timestamp when the revision was created
- application_id:
- type: string
- description: Unique identifier for the application
- deployment_target_id:
- type: string
- description: Unique identifier for the deployment target
- revision_number:
- type: integer
- description: Revision number of the application
- ApplicationStatusEnum:
- x-scalar-ignore: true
- type: string
- enum:
- - PENDING
- - RUNNING
- - ERROR
- - UNKNOWN
- example: RUNNING
- ProcessStatus:
- type: object
- x-scalar-ignore: true
- required:
- - name
- - status
- - restart_count
- - instances
- properties:
- name:
- type: string
- description: Name of the process
- example: web-service
- status:
- description: Status of the process
- $ref: '#/components/schemas/ApplicationStatusEnum'
- restart_count:
- type: integer
- description: Number of times the process has restarted summed across all instances
- example: 0
- instances:
- type: object
- description: Breakdown of the number of instances of the process by status
- required:
- - desired
- - running
- - pending
- - error
- properties:
- desired:
- type: integer
- description: Number of desired instances
- example: 3
- running:
- type: integer
- description: Number of running instances
- example: 2
- pending:
- type: integer
- description: Number of pending instances
- example: 1
- error:
- type: integer
- description: Number of errored instances
- example: 0
- RevisionStatus:
- type: object
- x-scalar-ignore: true
- required:
- - application_contract_revision_id
- - version
- - status
- - processes
- properties:
- application_contract_revision_id:
- type: string
- description: Unique identifier of the revision
- example: 123e4567-e89b-12d3-a456-426614174000
- version:
- type: integer
- description: Version number of the revision
- example: 5
- status:
- description: Status of the revision
- $ref: '#/components/schemas/ApplicationStatusEnum'
- processes:
- type: array
- description: List of processes and their statuses for the revision
- items:
- $ref: '#/components/schemas/ProcessStatus'
- ApplicationStatus:
- type: object
- x-scalar-ignore: true
- required:
- - name
- - revision_statuses
- properties:
- name:
- type: string
- description: Name of the application
- example: my-app
- revision_statuses:
- type: array
- description: List of statuses for active revisions of the application
- items:
- $ref: '#/components/schemas/RevisionStatus'
- Metric:
- type: object
- x-scalar-ignore: true
- required:
- - name
- properties:
- name:
- type: string
- description: Name of the metric
- AuditLog:
- type: object
- x-scalar-ignore: true
- required:
- - id
- - created_at
- - updated_at
- - project_id
- - action
- - action_metadata
- properties:
- id:
- type: string
- format: uuid
- created_at:
- type: string
- format: date-time
- updated_at:
- type: string
- format: date-time
- project_id:
- type: integer
- user_id:
- type: integer
- nullable: true
- user_email:
- type: string
- format: email
- nullable: true
- api_token_unique_id:
- type: string
- nullable: true
- api_token_name:
- type: string
- nullable: true
- action:
- type: string
- action_metadata:
- type: object
- additionalProperties: true
- NodeGroupComputeResources:
- type: object
- x-scalar-ignore: true
- required:
- - gpu_enabled
- - node_group_id
- - node_group_type
- - virtual_machine_type
- - total_cpu_cores
- - total_ram_mib
- - total_gpu_cores
- - allocatable_cpu_cores
- - allocatable_ram_mib
- - system_reserved_cpu_cores
- - system_reserved_ram_mib
- - user_reserved_cpu_cores
- - user_reserved_ram_mib
- - user_reserved_apps
- properties:
- gpu_enabled:
- type: boolean
- deprecated: true
- description: (DEPRECATED. Use num_gpu_cores instead) Indicates if the node group supports GPU workloads. Only applicable for the default node group (when node_group_id is empty)
- node_group_id:
- type: string
- description: Unique identifier of the node group. An empty value indicates this is the cluster's default node group
- node_group_type:
- $ref: '#/components/schemas/NodeGroupTypeNotNullable'
- virtual_machine_type:
- type: string
- description: The cloud provider's machine type/size used for nodes in this group
- total_cpu_cores:
- type: number
- description: Total number of CPU cores available in each node of this group
- total_ram_mib:
- type: integer
- description: Total RAM available in each node, measured in MiB
- total_gpu_cores:
- type: integer
- description: Total number of GPU cores available in each node of this group
- allocatable_cpu_cores:
- type: number
- description: Maximum CPU cores that can be requested by user workloads, after accounting for system and user reservations
- allocatable_ram_mib:
- type: integer
- description: Maximum RAM that can be requested by user workloads, measured in MiB, after accounting for system and user reservations
- system_reserved_cpu_cores:
- type: number
- description: CPU cores reserved for system components
- system_reserved_ram_mib:
- type: integer
- description: RAM reserved for system components, measured in MiB
- example: 1024
- user_reserved_cpu_cores:
- type: number
- description: CPU cores reserved for user-managed applications
- user_reserved_ram_mib:
- type: integer
- description: RAM reserved for user-managed applications, measured in MiB
- user_reserved_apps:
- type: array
- items:
- type: string
- description: List of user-managed applications that are consuming the user-reserved resources
- BuildRegistration:
- type: object
- x-scalar-ignore: true
- required:
- - app_name
- - deployment_target_id
- properties:
- app_name:
- type: string
- description: Name of the application the build is for
- deployment_target_id:
- type: string
- description: ID of the deployment target the application belongs to
- metadata:
- $ref: '#/components/schemas/BuildMetadata'
- BuildStatusUpdate:
- type: object
- x-scalar-ignore: true
- required:
- - status
- properties:
- status:
- type: string
- enum:
- - success
- - failed
- description: The new status of the build
- error_message:
- type: string
- description: Optional error message when status is failed
- BuildSettingsSpec:
- type: object
- x-scalar-ignore: true
- required:
- - dockerfile
- - context
- properties:
- dockerfile:
- type: string
- description: Path to the Dockerfile
- example: ./Dockerfile
- context:
- type: string
- description: Build context path
- example: ./
- BuildSettings:
- type: object
- x-scalar-ignore: true
- required:
- - id
- - name
- - spec
- properties:
- id:
- type: string
- description: Unique identifier for the build setting
- format: uuid
- x-go-type: uuid.UUID
- example: 123e4567-e89b-12d3-a456-426614174000
- name:
- type: string
- description: Name of the build
- example: my-build-settings
- spec:
- $ref: '#/components/schemas/BuildSettingsSpec'
- description: Build settings specification
- CreateBuildSettingsRequestBody:
- type: object
- x-scalar-ignore: true
- required:
- - name
- - spec
- properties:
- name:
- type: string
- description: Name of the build
- example: my-build-settings
- spec:
- $ref: '#/components/schemas/BuildSettingsSpec'
- description: Build settings specification
- BuildStatusMetadata:
- type: object
- properties:
- error_message:
- type: string
- description: Error message if build failed
- reason:
- type: string
- description: Human-readable reason for current status
- BuildBuildArgs:
- type: object
- properties:
- repo:
- type: string
- description: Container image repository to push to
- tag:
- type: string
- description: Image tag
- dockerfile:
- type: string
- description: Path to Dockerfile relative to build context
- build_args:
- type: object
- additionalProperties:
- type: string
- description: Docker build arguments
- BuildCommitMetadata:
- type: object
- properties:
- sha:
- type: string
- description: Git commit SHA
- message:
- type: string
- description: Git commit message
- BuildRunMetadata:
- type: object
- properties:
- workflow_run_id:
- type: string
- description: Workflow run ID
- workflow_run_attempt:
- type: integer
- description: Workflow run attempt number
- narvi_run_id:
- type: string
- description: Narvi run ID
- job_run_id:
- type: string
- description: Job run ID
- BuildRun:
- type: object
- required:
- - id
- - build_template_id
- - project_id
- - status
- - created_at
- properties:
- id:
- type: string
- format: uuid
- description: Build ID
- build_template_id:
- type: string
- format: uuid
- description: Build template ID
- project_id:
- type: integer
- description: Project ID
- status:
- type: string
- description: Build status
- enum:
- - pending
- - provisioning
- - building
- - succeeded
- - failed
- - cancelled
- status_metadata:
- $ref: '#/components/schemas/BuildStatusMetadata'
- build_args:
- $ref: '#/components/schemas/BuildBuildArgs'
- providers:
- type: array
- items:
- type: string
- enum:
- - narvi
- - gha
- - depot
- - blacksmith
- commit_metadata:
- $ref: '#/components/schemas/BuildCommitMetadata'
- run_metadata:
- $ref: '#/components/schemas/BuildRunMetadata'
- started_at:
- type: string
- format: date-time
- description: Build start timestamp
- completed_at:
- type: string
- format: date-time
- description: Build completion timestamp
- image_registry:
- type: string
- description: Container image registry
- image_tag:
- type: string
- description: Container image tag
- created_at:
- type: string
- format: date-time
- description: Creation timestamp
- updated_at:
- type: string
- format: date-time
- description: Last update timestamp
- ListBuildsResponseBody:
- type: object
- required:
- - builds
- - pagination
- properties:
- builds:
- type: array
- items:
- $ref: '#/components/schemas/BuildRun'
- pagination:
- $ref: '#/components/schemas/PaginationResponse'
- BuildToolEnabled:
- type: object
- x-scalar-ignore: true
- required:
- - enabled
- properties:
- enabled:
- type: boolean
- BuildNarviToolConfig:
- type: object
- x-scalar-ignore: true
- required:
- - enabled
- properties:
- enabled:
- type: boolean
- narvi_builder_id:
- type: string
- format: uuid
- x-go-type: uuid.UUID
- description: Narvi builder config ID backing this template. Populated by the server when narvi is enabled; clients may leave it unset on create.
- BuildGhaToolConfig:
- type: object
- x-scalar-ignore: true
- required:
- - enabled
- properties:
- enabled:
- type: boolean
- github_id:
- type: string
- workflow_id:
- type: string
- BuildTemplateTools:
- type: object
- x-scalar-ignore: true
- required:
- - depot
- - narvi
- - blacksmith
- - gha
- properties:
- depot:
- $ref: '#/components/schemas/BuildToolEnabled'
- narvi:
- $ref: '#/components/schemas/BuildNarviToolConfig'
- blacksmith:
- $ref: '#/components/schemas/BuildToolEnabled'
- gha:
- $ref: '#/components/schemas/BuildGhaToolConfig'
- BuildTemplateLastRun:
- type: object
- x-scalar-ignore: true
- required:
- - commit_sha
- - commit_message
- - status
- - timestamp
- properties:
- commit_sha:
- type: string
- description: Git commit SHA of the most recent build
- commit_message:
- type: string
- description: Git commit message of the most recent build
- status:
- type: string
- description: Status of the most recent build
- enum:
- - pending
- - provisioning
- - building
- - succeeded
- - failed
- - cancelled
- timestamp:
- type: string
- format: date-time
- description: Timestamp of the most recent build
- BuildTemplate:
- type: object
- x-scalar-ignore: true
- required:
- - id
- - repo
- - branch
- - build_method
- - build_path
- - tools
- properties:
- id:
- type: string
- format: uuid
- x-go-type: uuid.UUID
- description: Unique identifier for the build template
- repo:
- type: string
- description: Repository in org/repo format
- example: my-org/my-repo
- branch:
- type: string
- description: Git branch to build from
- build_method:
- type: string
- description: Build method
- enum:
- - dockerfile
- - buildpack
- build_path:
- type: string
- description: Build context path
- dockerfile:
- type: string
- description: Path to the Dockerfile; null if not using dockerfile method
- tools:
- $ref: '#/components/schemas/BuildTemplateTools'
- last_run:
- $ref: '#/components/schemas/BuildTemplateLastRun'
- avg_runtime_ms:
- type: integer
- description: Average build runtime in milliseconds across all succeeded builds. Null if no succeeded builds exist.
- UpdateBuildTemplateRequestBody:
- type: object
- x-scalar-ignore: true
- required:
- - repo
- - branch
- - build_method
- - build_path
- - tools
- properties:
- repo:
- type: string
- description: Repository in org/repo format
- example: my-org/my-repo
- branch:
- type: string
- description: Git branch to build from
- build_method:
- type: string
- description: Build method
- enum:
- - dockerfile
- - buildpack
- build_path:
- type: string
- description: Build context path
- dockerfile:
- type: string
- description: Path to the Dockerfile; null if not using dockerfile method
- tools:
- $ref: '#/components/schemas/BuildTemplateTools'
- CreateBuildRequestBody:
- type: object
- x-scalar-ignore: true
- properties:
- commit_sha:
- type: string
- description: Git commit SHA to build
- commit_message:
- type: string
- description: Git commit message
- BuildLogLine:
- type: object
- x-scalar-ignore: true
- required:
- - timestamp
- - line
- properties:
- timestamp:
- type: string
- format: date-time
- line:
- type: string
- GetBuildTemplateLogsResponseBody:
- type: object
- x-scalar-ignore: true
- required:
- - logs
- properties:
- logs:
- type: array
- items:
- $ref: '#/components/schemas/BuildLogLine'
- NarviMetricsDataPoint:
- type: object
- required:
- - timestamp
- - value
- properties:
- timestamp:
- type: string
- format: date-time
- value:
- type: number
- format: double
- NarviMetricsChunk:
- type: object
- required:
- - started_at
- - completed_at
- - build_ids
- - cpu_cores
- - memory_bytes
- - disk_bytes
- properties:
- started_at:
- type: string
- format: date-time
- completed_at:
- type: string
- format: date-time
- build_ids:
- type: array
- items:
- type: string
- format: uuid
- cpu_cores:
- type: array
- items:
- $ref: '#/components/schemas/NarviMetricsDataPoint'
- memory_bytes:
- type: array
- items:
- $ref: '#/components/schemas/NarviMetricsDataPoint'
- disk_bytes:
- type: array
- items:
- $ref: '#/components/schemas/NarviMetricsDataPoint'
- NarviBuilderMetricsResponse:
- type: object
- required:
- - chunks
- properties:
- chunks:
- type: array
- items:
- $ref: '#/components/schemas/NarviMetricsChunk'
- NarviBuilderConfigSpec:
- type: object
- description: Builder resource configuration. All fields are optional — omitted fields default to cpuCores=2, memoryGiB=4, cacheSizeGiB=10 when creating a new config.
- properties:
- cpuCores:
- type: integer
- description: CPU cores that will be allocated to the builder (default 2)
- memoryGiB:
- type: integer
- description: Memory in Gibibytes that will be allocated to the builder (default 4)
- cacheSizeGiB:
- type: integer
- description: Cache size in Gibibytes that will be allocated to the builder (default 10)
- NarviBuilderConfig:
- type: object
- required:
- - id
- - project_id
- - builder_config
- - created_at
- properties:
- id:
- type: string
- format: uuid
- description: Builder config ID
- project_id:
- type: integer
- description: Project ID
- builder_config:
- $ref: '#/components/schemas/NarviBuilderConfigSpec'
- created_at:
- type: string
- format: date-time
- description: Creation timestamp
- NarviUpdateBuilderConfigRequest:
- type: object
- required:
- - builder_config
- properties:
- builder_config:
- $ref: '#/components/schemas/NarviBuilderConfigSpec'
- NarviRegistryAuthRequest:
- type: object
- required:
- - registry_url
- properties:
- registry_url:
- type: string
- description: Container registry URL to authenticate against (e.g. 123456789.dkr.ecr.us-east-1.amazonaws.com)
- NarviRegistryAuthResponse:
- type: object
- required:
- - url
- - username
- - password
- - expires_at
- properties:
- url:
- type: string
- description: Registry host URL
- username:
- type: string
- description: Registry username
- password:
- type: string
- description: Registry password
- expires_at:
- type: string
- format: date-time
- description: When the credentials expire
- DeploymentTarget:
- type: object
- x-scalar-ignore: true
- required:
- - id
- - name
- - cloud_provider
- - is_preview
- - cluster_id
- - is_default
- - namespace
- properties:
- id:
- type: string
- description: Unique identifier of the deployment target
- example: 123e4567-e89b-12d3-a456-426614174000
- name:
- type: string
- description: Name of the deployment target
- example: my-deployment-target
- cloud_provider:
- type: string
- description: Cloud provider of the deployment target
- enum:
- - aws
- - azure
- - gcp
- - ovh
- example: aws
- is_preview:
- type: boolean
- description: Whether the deployment target is a preview environment
- example: false
- cluster_id:
- type: integer
- description: Unique identifier of the cluster
- example: 123
- is_default:
- type: boolean
- description: Whether this is the default deployment target for the cluster
- example: true
- namespace:
- type: string
- description: Namespace the deployment target is pointed at
- example: my-deployment-target
- JobRun:
- type: object
- x-scalar-ignore: true
- required:
- - id
- - name
- - status
- - created_at
- - application_id
- - application_contract_revision_id
- - service_name
- - deployment_target_id
- properties:
- id:
- type: string
- description: The UID of the job
- name:
- type: string
- description: The name of the job object
- status:
- type: string
- enum:
- - RUNNING
- - SUCCESSFUL
- - FAILED
- - CANCELED
- description: The status of the job run
- created_at:
- type: string
- format: date-time
- description: The time the job was created
- completed_at:
- type: string
- format: date-time
- description: The time the job finished, if applicable
- application_id:
- type: string
- description: The ID of the application associated with this job
- application_contract_revision_id:
- type: string
- description: The ID of the application contract revision associated with this run
- service_name:
- type: string
- description: The name of the job service on the app
- deployment_target_id:
- type: string
- description: The ID of the deployment target associated with this job
- JobRunAlphaStatus:
- type: string
- enum:
- - RUNNING
- - SUCCESSFUL
- - FAILED
- - CANCELED
- description: The status of the job run
- example: FAILED
- ReportJobRunRequest:
- type: object
- x-scalar-ignore: true
- required:
- - job_name
- - service_name
- - application_id
- - app_revision_id
- - deployment_target_id
- - status
- - started_at
- properties:
- job_name:
- type: string
- description: The name of the Kubernetes Job
- example: my-app-my-job-12345678
- service_name:
- type: string
- description: The name of the job service on the app
- example: my-job
- application_id:
- type: string
- format: uuid
- x-go-type: uuid.UUID
- description: The application the run belongs to
- example: 123e4567-e89b-12d3-a456-426614174000
- app_revision_id:
- type: string
- format: uuid
- x-go-type: uuid.UUID
- description: The app revision the run was launched from
- example: 123e4567-e89b-12d3-a456-426614174000
- deployment_target_id:
- type: string
- format: uuid
- x-go-type: uuid.UUID
- description: The deployment target the run belongs to
- example: 123e4567-e89b-12d3-a456-426614174000
- status:
- $ref: '#/components/schemas/JobRunAlphaStatus'
- started_at:
- type: string
- format: date-time
- description: When the run started
- example: '2021-01-01T00:00:00Z'
- finished_at:
- type: string
- format: date-time
- description: When the run reached a terminal status, if it has
- example: '2021-01-01T00:00:00Z'
- JobRunAlpha:
- type: object
- x-scalar-ignore: true
- required:
- - id
- - name
- - status
- - created_at
- - application_id
- - application_contract_revision_id
- - job_name
- - deployment_target_id
- properties:
- id:
- type: string
- description: The ID of the job run
- example: 123e4567-e89b-12d3-a456-426614174000
- name:
- type: string
- description: The name of the job run
- example: my-app-my-job-12345678
- status:
- $ref: '#/components/schemas/JobRunAlphaStatus'
- created_at:
- type: string
- format: date-time
- description: The time the job run was created
- example: '2021-01-01T00:00:00Z'
- completed_at:
- type: string
- format: date-time
- description: The time the job run finished, if completed
- example: '2021-01-01T00:00:00Z'
- application_id:
- type: string
- description: The ID of the application associated with this job run
- example: 123e4567-e89b-12d3-a456-426614174000
- application_contract_revision_id:
- type: string
- description: The ID of the application contract revision associated with this job run
- example: 123e4567-e89b-12d3-a456-426614174000
- job_name:
- type: string
- description: The name of the job that this run is for
- example: my-job
- deployment_target_id:
- type: string
- description: The ID of the deployment target associated with this job
- example: 123e4567-e89b-12d3-a456-426614174000
- JobRunOverrides:
- type: object
- description: Optional overrides for the job run configuration
- properties:
- run:
- type: string
- description: Override the run command for the job
- example: npm start
- entrypoint:
- type: array
- items:
- type: string
- description: |
- Specifically override the entrypoint for the job. Cannot be used with the run field. (You probably want to use the run field instead.)
- example:
- - /bin/sh
- - '-c'
- args:
- type: array
- items:
- type: string
- description: |
- Specifically override the arguments for the job. Cannot be used with the run field. (You probably want to use the run field instead.)
- example:
- - echo
- - hello world
- EnvironmentGroupType:
- type: string
- x-scalar-ignore: true
- description: Type of environment group
- enum:
- - porter
- - doppler
- - infisical
- - datastore
- example: porter
- EnvironmentGroupFile:
- type: object
- x-scalar-ignore: true
- required:
- - name
- - base64_contents
- properties:
- name:
- type: string
- description: Name of the file
- example: config.json
- base64_contents:
- type: string
- description: Contents of the file encoded in base64
- example: YWJzb2x1dGUgY29udGVudA==
- InfisicalEnvironmentGroupMetadata:
- type: object
- x-scalar-ignore: true
- description: Non-sensitive Infisical configuration shown in settings
- required:
- - project_slug
- - env_slug
- - env_path
- - service_url
- properties:
- project_slug:
- type: string
- description: Project slug for Infisical
- env_slug:
- type: string
- description: Environment slug for Infisical
- env_path:
- type: string
- description: Environment path for Infisical
- service_url:
- type: string
- description: Service URL for Infisical
- EnvironmentGroup:
- type: object
- x-scalar-ignore: true
- required:
- - name
- - version
- - cluster_id
- - last_updated
- - linked_applications
- - type
- - variables
- - secrets
- properties:
- name:
- type: string
- description: Name of the environment group
- example: production
- version:
- type: integer
- description: Version of the environment group
- example: 1
- cluster_id:
- type: integer
- description: ID of the cluster this environment group belongs to
- example: 123
- type:
- $ref: '#/components/schemas/EnvironmentGroupType'
- last_updated:
- type: string
- description: Last updated timestamp of the environment group
- example: '2021-01-01T00:00:00Z'
- linked_applications:
- type: array
- description: List of application ids linked to the environment group
- items:
- type: string
- variables:
- type: array
- description: List of environment variables
- items:
- $ref: '#/components/schemas/EnvironmentGroupKeyValue'
- secrets:
- type: array
- description: List of secrets
- items:
- $ref: '#/components/schemas/EnvironmentGroupKeyNoValue'
- files:
- type: array
- description: List of files to include in the environment group
- items:
- $ref: '#/components/schemas/EnvironmentGroupFile'
- infisical:
- $ref: '#/components/schemas/InfisicalEnvironmentGroupMetadata'
- PorterEnvironmentConfig:
- type: object
- x-scalar-ignore: true
- description: Configuration for Porter environment group
- required:
- - variables
- - secrets
- properties:
- variables:
- type: array
- description: List of variables
- items:
- $ref: '#/components/schemas/EnvironmentGroupKeyValue'
- secrets:
- type: array
- description: List of secrets
- items:
- $ref: '#/components/schemas/EnvironmentGroupKeyOptionalValue'
- files:
- type: array
- description: List of files to include in the environment group
- items:
- $ref: '#/components/schemas/EnvironmentGroupFile'
- DopplerEnvironmentConfig:
- type: object
- x-scalar-ignore: true
- description: Configuration for Doppler environment group
- required:
- - service_token
- properties:
- service_token:
- type: string
- description: Service token for Doppler
- InfisicalEnvironmentConfig:
- type: object
- x-scalar-ignore: true
- description: Configuration for Infisical environment group
- required:
- - project_slug
- - env_slug
- - env_path
- - service_url
- - client_id
- - client_secret
- properties:
- project_slug:
- type: string
- description: Project slug for Infisical
- env_slug:
- type: string
- description: Environment slug for Infisical
- env_path:
- type: string
- description: Environment path for Infisical
- service_url:
- type: string
- description: Service URL for Infisical
- client_id:
- type: string
- description: Client ID for Infisical
- client_secret:
- type: string
- description: Client secret for Infisical
- CreateEnvironmentGroupRequest:
- type: object
- x-scalar-ignore: true
- required:
- - name
- - cluster_id
- - type
- properties:
- name:
- type: string
- description: Name of the environment group
- example: production
- cluster_id:
- type: integer
- description: ID of the cluster this environment group belongs to
- example: 123
- type:
- $ref: '#/components/schemas/EnvironmentGroupType'
- porter:
- $ref: '#/components/schemas/PorterEnvironmentConfig'
- doppler:
- $ref: '#/components/schemas/DopplerEnvironmentConfig'
- infisical:
- $ref: '#/components/schemas/InfisicalEnvironmentConfig'
- EnvironmentGroupUpdateMode:
- type: string
- x-scalar-ignore: true
- description: |
- Mode of the environment group update. If save_and_deploy is specified, the environment group will be saved and all linked applications will be redeployed.
- If save is specified, the environment group will be saved but no applications will be redeployed. (Any application updates that occur independently will use the latest version of the environment group.)
-
- Default mode is save_and_deploy.
- enum:
- - save
- - save_and_deploy
- UpdateEnvironmentGroupRequest:
- type: object
- x-scalar-ignore: true
- required:
- - type
- properties:
- type:
- $ref: '#/components/schemas/EnvironmentGroupType'
- porter:
- $ref: '#/components/schemas/PorterEnvironmentConfig'
- doppler:
- $ref: '#/components/schemas/DopplerEnvironmentConfig'
- infisical:
- $ref: '#/components/schemas/InfisicalEnvironmentConfig'
- update_mode:
- $ref: '#/components/schemas/EnvironmentGroupUpdateMode'
- InfisicalEnvironmentGroupSummary:
- type: object
- x-scalar-ignore: true
- description: Name plus non-sensitive Infisical config for an environment group
- required:
- - name
- - project_slug
- - env_slug
- - env_path
- - service_url
- properties:
- name:
- type: string
- description: Name of the environment group
- project_slug:
- type: string
- description: Project slug for Infisical
- env_slug:
- type: string
- description: Environment slug for Infisical
- env_path:
- type: string
- description: Environment path for Infisical
- service_url:
- type: string
- description: Service URL for Infisical
- InfisicalEnvironmentGroupList:
- type: object
- x-scalar-ignore: true
- required:
- - environment_groups
- properties:
- environment_groups:
- type: array
- description: Infisical environment groups with stored metadata
- items:
- $ref: '#/components/schemas/InfisicalEnvironmentGroupSummary'
- ContainerReadiness:
- type: object
- x-scalar-ignore: true
- description: Container readiness status
- required:
- - ready
- - total
- properties:
- ready:
- type: integer
- description: Number of ready containers
- example: 1
- total:
- type: integer
- description: Total number of containers
- example: 1
- OwnerRef:
- type: object
- x-scalar-ignore: true
- description: Reference to the parent controller that manages this pod
- properties:
- name:
- type: string
- description: Name of the parent controller
- example: porter-agent-controller-manager
- uid:
- type: string
- description: Unique identifier of the parent controller
- example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
- ResourceUsage:
- type: object
- x-scalar-ignore: true
- description: Current CPU and memory consumption from metrics
- properties:
- cpu_usage_millicores:
- type: number
- format: float
- description: Current CPU usage in millicores
- example: 150.5
- cpu_request_millicores:
- type: number
- format: float
- description: CPU request in millicores
- example: 1000
- cpu_limit_millicores:
- type: number
- format: float
- description: CPU limit in millicores
- example: 2000
- memory_usage_mi:
- type: number
- format: float
- description: Current memory usage in MiB
- example: 256.7
- memory_request_mi:
- type: number
- format: float
- description: Memory request in MiB
- example: 512
- memory_limit_mi:
- type: number
- format: float
- description: Memory limit in MiB
- example: 1024
- PodEvent:
- type: object
- properties:
- type:
- type: string
- description: Normal or Warning
- reason:
- type: string
- message:
- type: string
- lastTimestamp:
- type: string
- format: date-time
- firstTimestamp:
- type: string
- format: date-time
- count:
- type: integer
- source:
- type: object
- properties:
- component:
- type: string
- host:
- type: string
- OwnerReference:
- type: object
- properties:
- apiVersion:
- type: string
- kind:
- type: string
- name:
- type: string
- uid:
- type: string
- controller:
- type: boolean
- blockOwnerDeletion:
- type: boolean
- ObjectMeta:
- type: object
- properties:
- name:
- type: string
- generateName:
- type: string
- namespace:
- type: string
- uid:
- type: string
- resourceVersion:
- type: string
- generation:
- type: integer
- format: int64
- creationTimestamp:
- type: string
- format: date-time
- deletionTimestamp:
- type: string
- format: date-time
- nullable: true
- deletionGracePeriodSeconds:
- type: integer
- format: int64
- nullable: true
- labels:
- type: object
- additionalProperties:
- type: string
- annotations:
- type: object
- additionalProperties:
- type: string
- ownerReferences:
- type: array
- items:
- $ref: '#/components/schemas/OwnerReference'
- finalizers:
- type: array
- items:
- type: string
- Volume:
- type: object
- properties:
- name:
- type: string
- hostPath:
- type: object
- nullable: true
- properties:
- path:
- type: string
- type:
- type: string
- configMap:
- type: object
- nullable: true
- properties:
- name:
- type: string
- secret:
- type: object
- nullable: true
- properties:
- secretName:
- type: string
- emptyDir:
- type: object
- nullable: true
- projected:
- type: object
- nullable: true
- persistentVolumeClaim:
- type: object
- nullable: true
- properties:
- claimName:
- type: string
- readOnly:
- type: boolean
- ContainerPort:
- type: object
- properties:
- name:
- type: string
- hostPort:
- type: integer
- containerPort:
- type: integer
- protocol:
- type: string
- enum:
- - TCP
- - UDP
- - SCTP
- EnvVarSource:
- type: object
- properties:
- fieldRef:
- type: object
- properties:
- apiVersion:
- type: string
- fieldPath:
- type: string
- resourceFieldRef:
- type: object
- nullable: true
- configMapKeyRef:
- type: object
- nullable: true
- secretKeyRef:
- type: object
- nullable: true
- EnvVar:
- type: object
- properties:
- name:
- type: string
- value:
- type: string
- valueFrom:
- $ref: '#/components/schemas/EnvVarSource'
- ResourceRequirements:
- type: object
- properties:
- limits:
- type: object
- additionalProperties:
- type: string
- requests:
- type: object
- additionalProperties:
- type: string
- VolumeMount:
- type: object
- properties:
- name:
- type: string
- readOnly:
- type: boolean
- mountPath:
- type: string
- subPath:
- type: string
- mountPropagation:
- type: string
- nullable: true
- Probe:
- type: object
- nullable: true
- properties:
- exec:
- type: object
- nullable: true
- properties:
- command:
- type: array
- items:
- type: string
- httpGet:
- type: object
- nullable: true
- properties:
- path:
- type: string
- port:
- oneOf:
- - type: integer
- - type: string
- scheme:
- type: string
- tcpSocket:
- type: object
- nullable: true
- properties:
- port:
- oneOf:
- - type: integer
- - type: string
- initialDelaySeconds:
- type: integer
- timeoutSeconds:
- type: integer
- periodSeconds:
- type: integer
- successThreshold:
- type: integer
- failureThreshold:
- type: integer
- SecurityContext:
- type: object
- nullable: true
- properties:
- capabilities:
- type: object
- nullable: true
- properties:
- add:
- type: array
- items:
- type: string
- drop:
- type: array
- items:
- type: string
- privileged:
- type: boolean
- nullable: true
- runAsUser:
- type: integer
- format: int64
- nullable: true
- runAsGroup:
- type: integer
- format: int64
- nullable: true
- runAsNonRoot:
- type: boolean
- nullable: true
- readOnlyRootFilesystem:
- type: boolean
- nullable: true
- Container:
- type: object
- properties:
- name:
- type: string
- image:
- type: string
- command:
- type: array
- items:
- type: string
- args:
- type: array
- items:
- type: string
- ports:
- type: array
- items:
- $ref: '#/components/schemas/ContainerPort'
- env:
- type: array
- items:
- $ref: '#/components/schemas/EnvVar'
- resources:
- $ref: '#/components/schemas/ResourceRequirements'
- volumeMounts:
- type: array
- items:
- $ref: '#/components/schemas/VolumeMount'
- livenessProbe:
- $ref: '#/components/schemas/Probe'
- readinessProbe:
- $ref: '#/components/schemas/Probe'
- startupProbe:
- $ref: '#/components/schemas/Probe'
- imagePullPolicy:
- type: string
- enum:
- - Always
- - Never
- - IfNotPresent
- securityContext:
- $ref: '#/components/schemas/SecurityContext'
- terminationMessagePath:
- type: string
- terminationMessagePolicy:
- type: string
- Toleration:
- type: object
- properties:
- key:
- type: string
- operator:
- type: string
- enum:
- - Exists
- - Equal
- value:
- type: string
- effect:
- type: string
- enum:
- - ''
- - NoSchedule
- - PreferNoSchedule
- - NoExecute
- tolerationSeconds:
- type: integer
- format: int64
- nullable: true
- PodSpec:
- type: object
- properties:
- volumes:
- type: array
- items:
- $ref: '#/components/schemas/Volume'
- initContainers:
- type: array
- items:
- $ref: '#/components/schemas/Container'
- containers:
- type: array
- items:
- $ref: '#/components/schemas/Container'
- restartPolicy:
- type: string
- enum:
- - Always
- - OnFailure
- - Never
- terminationGracePeriodSeconds:
- type: integer
- format: int64
- dnsPolicy:
- type: string
- nodeSelector:
- type: object
- additionalProperties:
- type: string
- serviceAccountName:
- type: string
- nodeName:
- type: string
- hostNetwork:
- type: boolean
- securityContext:
- type: object
- description: Pod-level security context
- tolerations:
- type: array
- items:
- $ref: '#/components/schemas/Toleration'
- priorityClassName:
- type: string
- priority:
- type: integer
- format: int32
- schedulerName:
- type: string
- affinity:
- type: object
- description: Pod scheduling affinity rules
- PodCondition:
- type: object
- properties:
- type:
- type: string
- status:
- type: string
- enum:
- - 'True'
- - 'False'
- - Unknown
- lastProbeTime:
- type: string
- format: date-time
- lastTransitionTime:
- type: string
- format: date-time
- reason:
- type: string
- message:
- type: string
- ContainerState:
- type: object
- properties:
- waiting:
- type: object
- nullable: true
- properties:
- reason:
- type: string
- message:
- type: string
- running:
- type: object
- nullable: true
- properties:
- startedAt:
- type: string
- format: date-time
- terminated:
- type: object
- nullable: true
- properties:
- exitCode:
- type: integer
- signal:
- type: integer
- reason:
- type: string
- message:
- type: string
- startedAt:
- type: string
- format: date-time
- finishedAt:
- type: string
- format: date-time
- containerID:
- type: string
- ContainerStatus:
- type: object
- properties:
- name:
- type: string
- state:
- $ref: '#/components/schemas/ContainerState'
- lastState:
- $ref: '#/components/schemas/ContainerState'
- ready:
- type: boolean
- restartCount:
- type: integer
- image:
- type: string
- imageID:
- type: string
- containerID:
- type: string
- started:
- type: boolean
- PodExtendedStatus:
- type: object
- properties:
- phase:
- type: string
- enum:
- - Pending
- - Running
- - Succeeded
- - Failed
- - Unknown
- conditions:
- type: array
- items:
- $ref: '#/components/schemas/PodCondition'
- message:
- type: string
- reason:
- type: string
- hostIP:
- type: string
- podIP:
- type: string
- podIPs:
- type: array
- items:
- type: object
- properties:
- ip:
- type: string
- startTime:
- type: string
- format: date-time
- initContainerStatuses:
- type: array
- items:
- $ref: '#/components/schemas/ContainerStatus'
- containerStatuses:
- type: array
- items:
- $ref: '#/components/schemas/ContainerStatus'
- qosClass:
- type: string
- enum:
- - Guaranteed
- - Burstable
- - BestEffort
- Pod:
- type: object
- x-scalar-ignore: true
- required:
- - name
- - namespace
- - status
- - ready
- - resource_usage
- - restart_count
- - created_at
- - node_name
- properties:
- name:
- type: string
- description: name of the pod
- example: porter-agent-controller-manager-6d856df6b8-9b96g
- namespace:
- type: string
- description: namespace of the pod
- example: porter-agent-system
- status:
- type: string
- enum:
- - Running
- - Pending
- - Failed
- - Unknown
- - ContainerCreating
- - Completed
- - CrashLoopBackOff
- - ImagePullBackOff
- description: Current pod status
- example: Running
- ready:
- $ref: '#/components/schemas/ContainerReadiness'
- owner:
- $ref: '#/components/schemas/OwnerRef'
- resource_usage:
- $ref: '#/components/schemas/ResourceUsage'
- restart_count:
- type: integer
- description: Total number of container restarts for this pod
- example: 3
- created_at:
- type: string
- format: date-time
- description: Timestamp when the pod was created
- example: '2024-01-15T10:30:00Z'
- node_name:
- type: string
- description: Name of the node that the pod is running on
- example: ip-10-78-111-198.ec2.internal
- events:
- type: array
- items:
- $ref: '#/components/schemas/PodEvent'
- metadata:
- $ref: '#/components/schemas/ObjectMeta'
- spec:
- $ref: '#/components/schemas/PodSpec'
- kind:
- type: string
- apiVersion:
- type: string
- extended_status:
- $ref: '#/components/schemas/PodExtendedStatus'
- NodeGroup:
- type: object
- x-scalar-ignore: true
- required:
- - name
- - current_instances
- - current_cores
- - is_karpenter_enabled
- properties:
- name:
- type: string
- description: name of the node group
- example: default
- id:
- type: string
- description: id of the node group
- example: 123e4567-e89b-12d3-a456-426614174000
- min_instances:
- type: integer
- description: minimum number of instances
- example: 1
- current_instances:
- type: integer
- description: current number of instances
- example: 3
- max_instances:
- type: integer
- description: max number of instances
- example: 6
- current_cores:
- type: number
- format: float
- description: current total CPU cores across all instances in the node group
- example: 12
- max_cores:
- type: number
- format: float
- description: maximum total CPU cores across all instances in the node group
- example: 24
- cpu_cores_per_instance:
- type: number
- format: float
- description: CPU cores per instance (for non-Karpenter node groups)
- example: 4
- is_karpenter_enabled:
- type: boolean
- description: whether this node group uses Karpenter for autoscaling
- example: false
- instance_type:
- type: string
- description: instance type for non-Karpenter node groups
- example: t3.medium
- SystemApplicationName:
- type: string
- enum:
- - prometheus
- - porter-agent
- - keda
- - otel-collector
- - metrics-server
- - ingress-nginx
- - aws-load-balancer-controller
- - cert-manager
- - karpenter
- - cluster-autoscaler
- - descheduler
- - tailscale-operator
- - linkerd
- - argo-rollouts
- - external-secrets
- - prometheus-adapter
- - dcgm-exporter
- - infisical-operator
- - node-local-dns
- - nvidia-device-plugin
- - gp3-storage-class
- - sandbox-api
- - oauth2-proxy
- description: Name of the system application
- SystemApplicationStatus:
- type: string
- enum:
- - RUNNING
- - PENDING
- - FAILED
- description: Status of the system application
- SystemApplicationStatusItem:
- type: object
- required:
- - name
- - status
- - release_version
- - contract_version
- - in_sync
- - pod_count
- properties:
- name:
- $ref: '#/components/schemas/SystemApplicationName'
- status:
- $ref: '#/components/schemas/SystemApplicationStatus'
- release_version:
- type: string
- description: Currently deployed version of the system application from the helm release
- example: 1.0.0
- contract_version:
- type: string
- description: Version of the system application in the contract
- example: 1.0.0
- in_sync:
- type: boolean
- description: Whether the deployed helm chart version matches the version specified in the system application contract
- pod_count:
- type: integer
- description: Number of pods running for this system application
- example: 2
- SystemApplicationsStatusResponse:
- type: object
- required:
- - system_applications
- properties:
- system_applications:
- type: array
- items:
- $ref: '#/components/schemas/SystemApplicationStatusItem'
- description: List of system application statuses
- NodeGroupMetricUnit:
- type: string
- enum:
- - count
- - cores
- description: Unit of measurement for node group metrics (count for instances, cores for CPU)
- NodeGroupMetric:
- type: object
- required:
- - workload_kind
- - node_group_id
- - unit
- - value
- properties:
- workload_kind:
- type: string
- description: Workload kind label from the node
- example: application
- node_group_id:
- type: string
- description: Node group ID label from the node
- example: ng-abc123
- unit:
- $ref: '#/components/schemas/NodeGroupMetricUnit'
- value:
- type: number
- format: double
- description: Metric value (either instance count or CPU cores depending on unit)
- example: 3
- NodeMetricsTimeSeries:
- type: object
- required:
- - timestamp_utc
- - metrics
- properties:
- timestamp_utc:
- type: string
- format: date-time
- description: Timestamp for this set of metrics
- metrics:
- type: array
- items:
- $ref: '#/components/schemas/NodeGroupMetric'
- description: Node counts by node group
- NodeMetricsResponse:
- type: object
- required:
- - results
- properties:
- results:
- type: array
- items:
- $ref: '#/components/schemas/NodeMetricsTimeSeries'
- description: Time series data for node metrics
- ClusterNode:
- type: object
- x-scalar-ignore: true
- required:
- - name
- - instance_type
- - node_group_id
- - cpu_capacity_millicores
- - cpu_used_millicores
- - cpu_reserved_millicores
- - memory_capacity_bytes
- - memory_used_bytes
- - memory_reserved_bytes
- - is_ready
- properties:
- name:
- type: string
- description: Name of the node
- example: ip-10-0-1-23.ec2.internal
- instance_type:
- type: string
- description: Cloud provider instance type
- example: m5.xlarge
- node_group_id:
- type: string
- description: Node group identifier (application, monitoring, system, or UUID)
- example: application
- cpu_capacity_millicores:
- type: integer
- format: int64
- description: Maximum CPU capacity in millicores
- example: 4000
- cpu_used_millicores:
- type: integer
- format: int64
- description: Current CPU usage in millicores
- example: 2500
- cpu_reserved_millicores:
- type: integer
- format: int64
- description: Total CPU reserved by pod resource requests in millicores
- example: 3000
- memory_capacity_bytes:
- type: integer
- format: int64
- description: Maximum memory capacity in bytes
- example: 16777216000
- memory_used_bytes:
- type: integer
- format: int64
- description: Current memory usage in bytes
- example: 8388608000
- memory_reserved_bytes:
- type: integer
- format: int64
- description: Total memory reserved by pod resource requests in bytes
- example: 10737418240
- is_ready:
- type: boolean
- description: Whether the node is in ready state
- example: true
- ClusterNodesResponse:
- type: object
- required:
- - nodes
- properties:
- nodes:
- type: array
- items:
- $ref: '#/components/schemas/ClusterNode'
- description: List of nodes in the cluster
- LoadBalancerAddress:
- type: object
- description: The load balancer's address and its format, so callers know whether to create an A record (ip) or a CNAME record (hostname).
- required:
- - type
- - value
- properties:
- type:
- type: string
- description: Whether value is an IP address or a DNS hostname.
- enum:
- - ip
- - hostname
- example: ip
- value:
- type: string
- description: The IP address or hostname of the load balancer.
- example: 34.120.10.20
- ClusterLoadBalancer:
- type: object
- x-scalar-ignore: true
- required:
- - network_access
- - kind
- - owner
- - address
- properties:
- network_access:
- type: string
- description: Whether the load balancer is reachable from the public internet or the private network
- enum:
- - public
- - private
- example: private
- kind:
- type: string
- description: Load balancer type — an L4 network load balancer or an L7 application load balancer.
- enum:
- - nlb
- - alb
- example: alb
- owner:
- type: string
- description: The feature the load balancer belongs to; the default owner serves general app ingress.
- enum:
- - default
- - sandbox
- example: default
- address:
- $ref: '#/components/schemas/LoadBalancerAddress'
- ClusterLoadBalancersResponse:
- type: object
- required:
- - load_balancers
- properties:
- load_balancers:
- type: array
- items:
- $ref: '#/components/schemas/ClusterLoadBalancer'
- description: Load balancers attached to the cluster
- SystemApplicationMetricType:
- type: string
- enum:
- - cpu_usage
- - autoscaling_cpu_threshold
- - cpu_request
- - cpu_limit
- - memory_usage
- - autoscaling_memory_threshold
- - memory_request
- - memory_limit
- - instance_count
- - max_instances
- - ingress_requests_by_status_code
- - ingress_active_connections
- - storage_usage
- description: Type of metric to query for system applications
- SystemApplicationSubProcess:
- type: string
- enum:
- - kube-state-metrics
- - loki
- description: Secondary workload of a system application to query; omit for its main workload
- SystemApplicationMetricUnit:
- type: string
- enum:
- - cores
- - bytes
- - count
- description: Unit of measurement for the metric
- SystemApplicationDataPoint:
- type: object
- x-scalar-ignore: true
- required:
- - timestamp
- - avg
- - max
- - min
- properties:
- timestamp:
- type: string
- format: date-time
- description: Timestamp for the data point.
- avg:
- type: number
- format: double
- description: Average value of the metric at this timestamp.
- max:
- type: number
- format: double
- description: Maximum value of the metric at this timestamp.
- min:
- type: number
- format: double
- description: Minimum value of the metric at this timestamp.
- SystemApplicationTimeSeriesData:
- type: object
- x-scalar-ignore: true
- required:
- - time_series
- - unit
- properties:
- labels:
- type: object
- description: Metric labels for grouping
- properties:
- status_code:
- type: string
- description: HTTP status code (only present for status_codes metric)
- example: '200'
- unit:
- $ref: '#/components/schemas/SystemApplicationMetricUnit'
- time_series:
- type: array
- items:
- $ref: '#/components/schemas/SystemApplicationDataPoint'
- description: List of data points for the timeseries
- TriggerSystemApplicationReconcileRequest:
- type: object
- required:
- - dry_run
- properties:
- dry_run:
- type: boolean
- description: When true, generates diffs between generated helm charts and deployed values without applying changes
- system_application_name:
- $ref: '#/components/schemas/SystemApplicationName'
- description: Optional name of a specific system application to reconcile. If omitted, all system applications are reconciled.
- SystemApplicationHelmChartConfiguration:
- type: object
- required:
- - value_overrides
- - chart_version
- properties:
- chart_version:
- type: string
- description: Version of the helm chart
- example: 1.0.0
- value_overrides:
- type: string
- description: Base64 encoded YAML string of value overrides for the helm chart
- example: ewoJImxva2kiOiB7CiAgInJvdXRpbml6ZSI6ICIzMGR4IgogfQp9
- Resources:
- type: object
- properties:
- cpu_millicores:
- type: integer
- description: CPU in millicores
- example: 500
- memory_mib:
- type: integer
- description: Memory in MiB
- example: 512
- ResourcesConfig:
- type: object
- properties:
- requests:
- $ref: '#/components/schemas/Resources'
- limits:
- $ref: '#/components/schemas/Resources'
- PrometheusServerConfig:
- type: object
- properties:
- resources:
- $ref: '#/components/schemas/ResourcesConfig'
- storage_size_gib:
- type: integer
- description: Persistent volume size in GiB for the Prometheus server
- example: 50
- PrometheusAlertmanagerConfig:
- type: object
- properties:
- resources:
- $ref: '#/components/schemas/ResourcesConfig'
- PrometheusKsmConfig:
- type: object
- properties:
- resources:
- $ref: '#/components/schemas/ResourcesConfig'
- PrometheusConfiguration:
- type: object
- required:
- - retention_period_days
- properties:
- retention_period_days:
- type: integer
- description: Retention period for the prometheus data
- example: 30
- server:
- $ref: '#/components/schemas/PrometheusServerConfig'
- alertmanager:
- $ref: '#/components/schemas/PrometheusAlertmanagerConfig'
- ksm:
- $ref: '#/components/schemas/PrometheusKsmConfig'
- ImageRef:
- type: object
- description: Container image identity. When resolving the image to run, an explicit sha takes precedence over the tag.
- properties:
- tag:
- type: string
- description: Image tag
- example: 3.9.6
- sha:
- type: string
- description: Image digest (sha256:<hex>)
- example: sha256:155c3c5e5bfddf63f07335f52bf9ad4867b7aa9d207e25052b44d56421591fe5
- PorterAgentConfiguration:
- type: object
- required:
- - loki_retention_period_days
- properties:
- image:
- description: Porter-agent image override configured on the contract; absent when the cluster runs the system default
- $ref: '#/components/schemas/ImageRef'
- loki_retention_period_days:
- type: integer
- description: Retention period for the loki data
- example: 30
- s3_bucket_id:
- type: string
- format: uuid
- description: The ID of the S3 storage bucket to use for Loki. The bucket must be connected to the cluster.
- PrometheusAdapterConfiguration:
- type: object
- required:
- - dcgm_rules_enabled
- - deepgram_rules_enabled
- properties:
- dcgm_rules_enabled:
- type: boolean
- description: Whether to enable the dcgm rules
- example: true
- deepgram_rules_enabled:
- type: boolean
- description: Whether to enable the deepgram rules
- example: true
- SandboxWarmPool:
- type: object
- properties:
- name:
- type: string
- description: Identifies the pool, for selecting among multiple pools.
- example: default
- size:
- type: integer
- description: Total pre-booted pods the pool keeps available across the sandbox nodes.
- example: 5
- resources:
- $ref: '#/components/schemas/ResourcesConfig'
- SandboxConfiguration:
- type: object
- required:
- - warm_pools
- properties:
- warm_pools:
- type: array
- description: Warm-path pools of pre-booted sandbox pods.
- items:
- $ref: '#/components/schemas/SandboxWarmPool'
- egress_enabled:
- type: boolean
- description: Whether network-layer egress enforcement is enabled for sandboxes on the cluster. Requires the warm path.
- example: true
- Oauth2ProxyConfiguration:
- type: object
- description: OIDC forward-auth configuration for the cluster's oauth2-proxy. Used for both reads and partial updates; all fields are optional so a patch sends only what changes.
- properties:
- provider_type:
- type: string
- description: OIDC provider type (e.g. oidc, okta, google, github)
- client_id:
- type: string
- description: OAuth2 client ID registered with the IdP
- client_secret:
- type: string
- writeOnly: true
- description: OAuth2 client secret. Write-only — written to a K8s secret on the cluster, never stored in Porter or returned.
- issuer_url:
- type: string
- description: OIDC issuer discovery URL
- cookie_domains:
- type: array
- items:
- type: string
- description: Domains for which the session cookie is issued
- allowed_redirects:
- type: array
- items:
- type: string
- description: Redirect URIs registered with the IdP
- email_domains:
- type: array
- items:
- type: string
- description: Email domains permitted to authenticate. Defaults to all domains when never set.
- rotate_cookie_secret:
- type: boolean
- writeOnly: true
- description: When true, rotates the session cookie secret, invalidating all existing sessions and forcing every user to re-authenticate.
- SystemApplicationConfiguration:
- type: object
- required:
- - name
- properties:
- name:
- $ref: '#/components/schemas/SystemApplicationName'
- helm_chart_config:
- $ref: '#/components/schemas/SystemApplicationHelmChartConfiguration'
- prometheus_config:
- $ref: '#/components/schemas/PrometheusConfiguration'
- porter_agent_config:
- $ref: '#/components/schemas/PorterAgentConfiguration'
- prometheus_adapter_config:
- $ref: '#/components/schemas/PrometheusAdapterConfiguration'
- sandbox_config:
- $ref: '#/components/schemas/SandboxConfiguration'
- oauth2_proxy_config:
- $ref: '#/components/schemas/Oauth2ProxyConfiguration'
- PatchSystemApplicationHelmChartConfiguration:
- type: object
- description: Partial helm chart configuration for patch operations.
- properties:
- chart_version:
- type: string
- description: Version of the helm chart
- example: 1.0.0
- value_overrides:
- type: string
- description: Base64-encoded helm value overrides
- PatchPrometheusConfiguration:
- type: object
- properties:
- retention_period_days:
- type: integer
- description: Retention period for the prometheus data
- example: 30
- server:
- $ref: '#/components/schemas/PrometheusServerConfig'
- alertmanager:
- $ref: '#/components/schemas/PrometheusAlertmanagerConfig'
- ksm:
- $ref: '#/components/schemas/PrometheusKsmConfig'
- PatchPorterAgentConfiguration:
- type: object
- properties:
- image:
- description: Replaces the configured porter-agent image reference as a whole; an empty object clears the override so the cluster returns to the system default
- $ref: '#/components/schemas/ImageRef'
- loki_retention_period_days:
- type: integer
- description: Retention period for the loki data
- example: 30
- s3_bucket_id:
- type: string
- format: uuid
- description: The ID of the S3 storage bucket to use for Loki
- PatchPrometheusAdapterConfiguration:
- type: object
- properties:
- dcgm_rules_enabled:
- type: boolean
- description: Whether to enable the dcgm rules
- example: true
- deepgram_rules_enabled:
- type: boolean
- description: Whether to enable the deepgram rules
- example: true
- PatchSandboxConfiguration:
- type: object
- properties:
- warm_pools:
- type: array
- description: Replaces the full set of warm pools when provided.
- items:
- $ref: '#/components/schemas/SandboxWarmPool'
- egress_enabled:
- type: boolean
- description: Turns network-layer egress enforcement for sandboxes on or off when provided. Requires the warm path.
- example: true
- PatchSystemApplicationConfigurationRequestBody:
- type: object
- description: Request body for partial updates to system application configuration.
- properties:
- helm_chart_config:
- $ref: '#/components/schemas/PatchSystemApplicationHelmChartConfiguration'
- prometheus_config:
- $ref: '#/components/schemas/PatchPrometheusConfiguration'
- porter_agent_config:
- $ref: '#/components/schemas/PatchPorterAgentConfiguration'
- prometheus_adapter_config:
- $ref: '#/components/schemas/PatchPrometheusAdapterConfiguration'
- sandbox_config:
- $ref: '#/components/schemas/PatchSandboxConfiguration'
- oauth2_proxy_config:
- $ref: '#/components/schemas/Oauth2ProxyConfiguration'
- LoadBalancerType:
- type: string
- description: Load balancer whose DNS provider credentials to manage. The backend derives the credentials Secret name from this and the provider.
- enum:
- - private_nlb
- - public_alb
- - sandbox_public_nlb
- - sandbox_private_nlb
- example: public_alb
- DnsProviderType:
- type: string
- description: DNS provider used to manage records and solve ACME DNS-01 challenges.
- enum:
- - cloudflare
- example: cloudflare
- DnsProviderCredentialsStatus:
- type: object
- required:
- - exists
- properties:
- exists:
- type: boolean
- description: Whether DNS provider credentials are stored for the cluster.
- example: true
- provider:
- $ref: '#/components/schemas/DnsProviderType'
- CreateDnsProviderCredentialsRequest:
- type: object
- required:
- - provider
- - api_token
- - load_balancer_type
- properties:
- provider:
- $ref: '#/components/schemas/DnsProviderType'
- api_token:
- type: string
- description: API token authorizing the DNS provider to manage records for the cluster's domains.
- example: cf-1234567890abcdef
- load_balancer_type:
- $ref: '#/components/schemas/LoadBalancerType'
- WatchmanMetricQuery:
- type: object
- description: A single instant PromQL query and the metric key its value is reported under.
- required:
- - key
- - promql
- properties:
- key:
- type: string
- description: Metric key to report the query result under.
- example: ingress_nginx_restarts
- promql:
- type: string
- description: Instant PromQL query returning a single value. Substitute $__lookback with your collection period as a PromQL duration before running it.
- example: sum(increase(k8s_container_restarts{k8s_namespace_name="ingress-nginx"}[$__lookback]))
- WatchmanSpec:
- type: object
- description: The metric queries the porter agent watchman runs against the cluster.
- required:
- - queries
- properties:
- queries:
- type: array
- description: Queries to run, one per reported metric.
- items:
- $ref: '#/components/schemas/WatchmanMetricQuery'
- WatchmanAppMetricSample:
- type: object
- description: A single sample of an app metric query.
- required:
- - key
- - labels
- - value
- properties:
- key:
- type: string
- description: Metric key the sample was collected for.
- example: app_requests
- labels:
- type: object
- description: Prometheus labels identifying the series the sample belongs to.
- additionalProperties:
- type: string
- example:
- namespace: default
- service: app-charts-repo-chartmuseum
- value:
- type: number
- format: double
- description: Sample value over the collection window.
- WatchmanAppStatusRequest:
- type: object
- description: Per-application request metrics observed at the ingress by the porter agent watchman.
- required:
- - results
- - errors
- properties:
- results:
- type: array
- description: One entry per metric sample, labeled with the series it was observed for.
- items:
- $ref: '#/components/schemas/WatchmanAppMetricSample'
- errors:
- type: object
- description: Collection failures, keyed by watchman metric key.
- additionalProperties:
- type: string
- example:
- app_requests_over_500ms: query timeout
- WatchmanStatusRequest:
- type: object
- description: Health metrics observed on the cluster by the porter agent watchman.
- required:
- - metrics
- - errors
- properties:
- metrics:
- type: object
- description: Collected values, keyed by watchman metric key.
- additionalProperties:
- type: number
- format: double
- example:
- ingress_nginx_cpu_percent_utilization_max: 42.1
- errors:
- type: object
- description: Collection failures, keyed by watchman metric key.
- additionalProperties:
- type: string
- example:
- ingress_nginx_connections_max: query timeout
- BlueGreenApplication:
- type: object
- x-scalar-ignore: true
- required:
- - app_name
- properties:
- app_name:
- type: string
- description: Name of the application in the Blue-Green group.
- example: frontend-app
- BlueGreenGroup:
- type: object
- x-scalar-ignore: true
- required:
- - name
- properties:
- name:
- type: string
- description: Name of the Blue-Green group.
- GitHubAccount:
- type: object
- x-scalar-ignore: true
- required:
- - id
- - name
- - type
- - authorized_at
- - installation_id
- properties:
- id:
- type: integer
- description: ID of the GitHub account
- example: 1234567890
- installation_id:
- type: integer
- description: GitHub App installation ID for this account
- example: 9876543210
- name:
- type: string
- description: Name of the GitHub account
- example: porter-dev
- type:
- type: string
- enum:
- - organization
- - user
- description: Type of the GitHub account
- example: organization
- authorized_at:
- type: string
- description: Date and time when the GitHub account was authorized to Porter
- example: '2021-01-01T00:00:00Z'
- GitHubBranch:
- type: object
- x-scalar-ignore: true
- required:
- - name
- - is_default
- properties:
- name:
- type: string
- description: Name of the GitHub branch
- example: main
- is_default:
- type: boolean
- description: Whether the branch is the default branch
- example: true
- GitHubDirectoryItemType:
- type: string
- x-scalar-ignore: true
- description: Type of the directory item
- enum:
- - file
- - directory
- - symlink
- - submodule
- example: file
- GitHubDirectoryItem:
- type: object
- x-scalar-ignore: true
- required:
- - path
- - type
- properties:
- path:
- type: string
- description: Path of the directory item
- example: README.md
- type:
- $ref: '#/components/schemas/GitHubDirectoryItemType'
- DataPoint:
- type: object
- x-scalar-ignore: true
- required:
- - timestamp_utc
- - value
- properties:
- timestamp_utc:
- type: string
- format: date-time
- description: Timestamp for the data point in UTC.
- value:
- type: number
- format: double
- description: Value of the metric at this timestamp.
- TimeSeriesData:
- type: object
- x-scalar-ignore: true
- required:
- - time_series
- properties:
- labels:
- type: object
- description: Metric labels as key-value pairs. Keys and values depend on the metric type and grouping options.
- additionalProperties:
- type: string
- unit:
- type: string
- description: Unit of the timeseries data
- time_series:
- type: array
- items:
- $ref: '#/components/schemas/DataPoint'
- description: List of data points for the timeseries
- MetricsData:
- type: object
- x-scalar-ignore: true
- required:
- - series
- properties:
- series:
- type: array
- items:
- $ref: '#/components/schemas/TimeSeriesData'
- description: List of timeseries data for the metric
- ApplicationMetricsQueryResponse:
- type: object
- x-scalar-ignore: true
- properties:
- results:
- type: array
- items:
- $ref: '#/components/schemas/MetricsData'
- ResourceRecommendations:
- type: object
- x-scalar-ignore: true
- properties:
- cpu_overprovisioned:
- type: boolean
- description: Whether the service is overprovisioned for CPU
- memory_overprovisioned:
- type: boolean
- description: Whether the service is overprovisioned for memory
- current_cpu_reserved:
- type: number
- format: float
- description: Current CPU reserved for the service
- current_memory_reserved:
- type: number
- format: float
- description: Current memory reserved for the service
- max_cpu_usage:
- type: number
- format: float
- description: Maximum CPU usage of the service over the analysis period
- max_memory_usage:
- type: number
- format: float
- description: Maximum memory usage of the service over the analysis period
- suggested_cpu_cores:
- type: number
- format: float
- description: Recommended CPU resources for the service
- suggested_memory_megabytes:
- type: number
- format: float
- description: Recommended memory resources for the service
- ServiceResourceAnalysis:
- type: object
- x-scalar-ignore: true
- required:
- - service_name
- - resource_recommendations
- properties:
- service_name:
- type: string
- description: Name of the service
- example: web-server
- resource_recommendations:
- $ref: '#/components/schemas/ResourceRecommendations'
- ResourceOptimizationAnalysis:
- type: object
- x-scalar-ignore: true
- required:
- - service_analyses
- - analysis_timestamp
- - analysis_period_start
- - analysis_period_end
- properties:
- service_analyses:
- type: array
- items:
- $ref: '#/components/schemas/ServiceResourceAnalysis'
- description: Resource analysis for each service across all applications in the deployment target
- analysis_timestamp:
- type: string
- format: date-time
- description: Timestamp when the analysis was performed
- analysis_period_start:
- type: string
- format: date-time
- description: Start of the analysis period (typically 1 month ago)
- analysis_period_end:
- type: string
- format: date-time
- description: End of the analysis period (typically now)
- VpnService:
- type: object
- x-scalar-ignore: true
- properties:
- name:
- type: string
- description: Name of the service
- ip:
- type: string
- description: IP address of the service
- port:
- type: integer
- description: Port of the service
- ServiceAccountConnection:
- type: object
- x-scalar-ignore: true
- required:
- - name
- - client_email
- - gcp_project_id
- - created_at
- properties:
- name:
- type: string
- description: Name of the GCP service account within Porter
- example: porter-service-account
- client_email:
- type: string
- description: Email address of the GCP service account
- gcp_project_id:
- type: string
- description: GCP project ID that the service account belongs to
- example: project-123456
- created_at:
- type: string
- format: date-time
- description: Timestamp when the service account connection was created
- example: '2024-01-15T10:30:00Z'
- DatastoreType:
- type: string
- x-scalar-ignore: true
- description: The type of the datastore
- example: postgres
- enum:
- - postgres
- - redis
- DatastoreKind:
- type: string
- x-scalar-ignore: true
- description: The specific kind of datastore for the given type
- example: rds
- enum:
- - rds
- - aurora
- - elasticache
- - in_cluster
- DatastoreStatus:
- type: string
- x-scalar-ignore: true
- description: The status of the datastore
- example: available
- enum:
- - available
- - creating
- - updating
- - deleting
- - unknown
- - failed
- RdsContract:
- type: object
- description: Current configuration for an RDS datastore
- properties:
- instance_type:
- type: string
- description: Current instance type for the RDS datastore
- example: db.m7g.large
- version:
- type: string
- description: Version of the datastore engine
- example: '17.6'
- snapshot_identifier:
- type: string
- description: Snapshot ID the datastore was restored from
- example: my-snapshot-id
- storage_gb:
- type: integer
- description: Current storage size in Gigabytes for the RDS datastore
- example: 100
- storage_autoscaling_enabled:
- type: boolean
- description: Whether storage autoscaling is enabled
- example: true
- database_name:
- type: string
- description: The name of the database
- example: myapp
- username:
- type: string
- description: The master username for the database
- example: postgres
- AuroraContract:
- type: object
- description: Current configuration for an Aurora datastore
- properties:
- instance_type:
- type: string
- description: Current instance type for the Aurora datastore
- example: db.r6g.large
- version:
- type: string
- description: Version of the datastore engine
- example: '17.6'
- snapshot_identifier:
- type: string
- description: Snapshot ID the datastore was restored from
- example: my-snapshot-id
- clone_identifier:
- type: string
- description: Database identifier the datastore was cloned from
- example: my-source-db
- database_name:
- type: string
- description: The name of the database
- example: myapp
- username:
- type: string
- description: The master username for the database
- example: postgres
- high_availability_enabled:
- type: boolean
- description: Whether high availability is enabled (creates writer and reader instances)
- example: true
- io_optimized_storage_enabled:
- type: boolean
- description: Whether I/O optimized storage is enabled
- example: true
- ElasticacheContract:
- type: object
- description: Current configuration for an ElastiCache datastore
- properties:
- instance_type:
- type: string
- description: Current instance type for the ElastiCache datastore
- example: cache.m7g.large
- version:
- type: string
- description: Version of the datastore engine
- example: '7.1'
- InClusterPostgresContract:
- type: object
- description: Current configuration for an in-cluster Postgres datastore
- properties:
- cpu_cores:
- type: number
- format: float
- description: Number of CPU cores allocated to the datastore
- ram_megabytes:
- type: integer
- description: Amount of RAM in MiB allocated to the datastore
- storage_gb:
- type: integer
- description: Allocated storage in Gigabytes (GB)
- example: 100
- InClusterRedisContract:
- type: object
- description: Current configuration for an in-cluster Redis datastore
- properties:
- cpu_cores:
- type: number
- format: float
- description: Number of CPU cores allocated to the datastore
- ram_megabytes:
- type: integer
- description: Amount of RAM in MiB allocated to the datastore
- storage_gb:
- type: integer
- description: Allocated storage in Gigabytes (GB)
- example: 100
- Datastore:
- x-scalar-ignore: true
- type: object
- description: Detailed configuration information for a specific datastore
- required:
- - id
- - name
- - type
- - status
- - kind
- - created_at
- - deletion_protection_enabled
- properties:
- id:
- type: string
- format: uuid
- description: The unique identifier for the datastore
- example: 123e4567-e89b-12d3-a456-426614174000
- x-order: 0
- name:
- type: string
- description: The name of the datastore
- example: my-postgres-db
- x-order: 1
- type:
- $ref: '#/components/schemas/DatastoreType'
- x-order: 2
- kind:
- $ref: '#/components/schemas/DatastoreKind'
- description: The kind of
- x-order: 3
- created_at:
- type: string
- description: The time the datastore was created
- format: date-time
- example: '2020-01-01T00:00:00Z'
- cloud_account_id:
- type: string
- description: Identifier for the cloud provider account. Empty string for cluster datastores.
- example: aws-account-123
- x-order: 4
- cluster_id:
- type: integer
- description: The ID of the cluster. Only set for datastores with kind in_cluster.
- example: 111
- format: uint
- x-order: 5
- region:
- type: string
- description: The region where the datastore is deployed. Empty string for cluster datastores.
- example: us-east-1
- x-order: 6
- connected_cluster_ids:
- type: array
- items:
- type: integer
- format: uint
- description: List of ids of clusters that are connected to this datastore. Only set for AWS datastores.
- example:
- - 101
- - 102
- x-order: 7
- status:
- $ref: '#/components/schemas/DatastoreStatus'
- x-order: 8
- rds:
- $ref: '#/components/schemas/RdsContract'
- x-order: 9
- aurora:
- $ref: '#/components/schemas/AuroraContract'
- x-order: 10
- elasticache:
- $ref: '#/components/schemas/ElasticacheContract'
- x-order: 11
- in_cluster_postgres:
- $ref: '#/components/schemas/InClusterPostgresContract'
- x-order: 12
- in_cluster_redis:
- $ref: '#/components/schemas/InClusterRedisContract'
- x-order: 13
- deletion_protection_enabled:
- type: boolean
- description: Whether deletion protection is enabled for the datastore
- example: true
- x-order: 14
- DatastoreCreateRequest:
- x-scalar-ignore: true
- type: object
- description: Request body for creating a new datastore
- required:
- - name
- - type
- - kind
- properties:
- name:
- type: string
- description: The name of the datastore
- example: my-postgres-db
- type:
- $ref: '#/components/schemas/DatastoreType'
- kind:
- $ref: '#/components/schemas/DatastoreKind'
- cloud_account_id:
- type: string
- description: Identifier for the cloud provider account. Required for AWS datastores.
- example: aws-account-123
- cluster_id:
- type: integer
- description: The ID of the cluster. Required for in_cluster datastores.
- example: 111
- format: uint
- region:
- type: string
- description: The region where the datastore should be deployed. Required for AWS datastores.
- example: us-east-1
- connected_cluster_ids:
- type: array
- items:
- type: integer
- format: uint
- description: List of ids of clusters that should be connected to this datastore
- example:
- - 101
- - 102
- rds:
- $ref: '#/components/schemas/RdsContract'
- aurora:
- $ref: '#/components/schemas/AuroraContract'
- elasticache:
- $ref: '#/components/schemas/ElasticacheContract'
- in_cluster_postgres:
- $ref: '#/components/schemas/InClusterPostgresContract'
- in_cluster_redis:
- $ref: '#/components/schemas/InClusterRedisContract'
- DatastoreSnapshot:
- x-scalar-ignore: true
- type: object
- description: Snapshot information for a datastore
- required:
- - id
- - kind
- - engine_version
- - create_time
- - status
- properties:
- id:
- type: string
- description: The snapshot identifier
- example: my-snapshot-id
- kind:
- $ref: '#/components/schemas/DatastoreKind'
- engine_version:
- type: string
- description: The database engine version
- example: '17.6'
- create_time:
- type: string
- format: date-time
- description: Timestamp when the snapshot was created (ISO 8601 format)
- example: '2025-01-30T12:00:00Z'
- status:
- type: string
- description: The status of the snapshot
- example: available
- size_gb:
- type: integer
- description: The size of the snapshot in gigabytes
- example: 100
- ExistingDatastore:
- x-scalar-ignore: true
- type: object
- description: Information about an existing datastore in the cloud provider
- required:
- - id
- - name
- - kind
- - engine_version
- - status
- properties:
- id:
- type: string
- description: The datastore identifier
- example: my-cluster-id
- name:
- type: string
- description: The datastore name or identifier
- example: my-cluster
- kind:
- $ref: '#/components/schemas/DatastoreKind'
- engine_version:
- type: string
- description: The database engine version
- example: '17.6'
- status:
- type: string
- description: The status of the datastore
- example: available
- RdsDatastoreOptions:
- x-scalar-ignore: true
- type: object
- description: RDS-specific datastore options
- required:
- - versions
- properties:
- versions:
- type: array
- description: List of supported PostgreSQL version numbers
- items:
- type: string
- example: '17.6'
- ElasticacheInstanceType:
- x-scalar-ignore: true
- type: object
- description: A supported ElastiCache instance class and its resource specs
- required:
- - instance_class
- - vcpu
- - memory_gib
- properties:
- instance_class:
- type: string
- description: The ElastiCache instance class name
- example: cache.t4g.medium
- vcpu:
- type: integer
- description: Number of vCPUs available on the instance
- example: 2
- memory_gib:
- type: number
- format: double
- description: Memory in GiB available on the instance
- example: 3.09
- ElasticacheDatastoreOptions:
- x-scalar-ignore: true
- type: object
- description: ElastiCache-specific datastore options
- required:
- - instance_types
- properties:
- instance_types:
- type: array
- description: Supported ElastiCache instance types with their resource specs. The first entry is the default the UI should pre-select.
- items:
- $ref: '#/components/schemas/ElasticacheInstanceType'
- DatastoreOptions:
- x-scalar-ignore: true
- type: object
- description: Available configuration options for datastores
- properties:
- rds:
- $ref: '#/components/schemas/RdsDatastoreOptions'
- elasticache:
- $ref: '#/components/schemas/ElasticacheDatastoreOptions'
- RdsContractPatch:
- type: object
- description: Configuration for patching an RDS datastore. Can update instance type, version, and storage.
- properties:
- version:
- type: string
- description: Version of the datastore engine
- example: '17.6'
- instance_type:
- type: string
- description: The new instance type for the RDS datastore.
- example: db.m7g.large
- storage_gb:
- type: integer
- description: The new storage size in Gigabytes for the RDS datastore.
- example: 100
- AuroraContractPatch:
- type: object
- description: Configuration for patching an Aurora datastore. Can update instance type and version.
- properties:
- version:
- type: string
- description: Version of the datastore engine
- example: '17.6'
- instance_type:
- type: string
- description: The new instance type for the Aurora datastore.
- example: db.r6g.large
- ElasticacheContractPatch:
- type: object
- description: Configuration for patching an ElastiCache datastore. Can only update instance type.
- properties:
- instance_type:
- type: string
- description: The new instance type for the ElastiCache datastore.
- example: cache.m7g.large
- InClusterPostgresContractPatch:
- type: object
- description: Configuration for patching an in-cluster Postgres datastore. Can update CPU and memory.
- properties:
- cpu_cores:
- type: number
- format: float
- description: The new number of CPU cores to allocate.
- ram_megabytes:
- type: integer
- description: The new amount of RAM in MiB to allocate.
- InClusterRedisContractPatch:
- type: object
- description: Configuration for patching an in-cluster Redis datastore. Can update CPU and memory.
- properties:
- cpu_cores:
- type: number
- format: float
- description: The new number of CPU cores to allocate.
- ram_megabytes:
- type: integer
- description: The new amount of RAM in MiB to allocate.
- DatastoreContractPatch:
- type: object
- description: Contract for patching a datastore.
- properties:
- rds:
- $ref: '#/components/schemas/RdsContractPatch'
- aurora:
- $ref: '#/components/schemas/AuroraContractPatch'
- elasticache:
- $ref: '#/components/schemas/ElasticacheContractPatch'
- in_cluster_postgres:
- $ref: '#/components/schemas/InClusterPostgresContractPatch'
- in_cluster_redis:
- $ref: '#/components/schemas/InClusterRedisContractPatch'
- major_version_upgrade_enabled:
- type: boolean
- description: Confirms a major engine version upgrade (e.g. PostgreSQL 14 to 16); required or the patch is rejected with a 400.
- example: false
- DatastoreEndpointType:
- type: string
- x-scalar-ignore: true
- description: The type of a datastore endpoint
- enum:
- - primary
- - replica
- - unknown
- DatastoreEndpoint:
- x-scalar-ignore: true
- type: object
- description: A single connection endpoint for a datastore
- required:
- - host
- - port
- - type
- properties:
- host:
- type: string
- description: Hostname or IP address of the endpoint
- example: my-db.cluster-abc123.us-east-1.rds.amazonaws.com
- port:
- type: integer
- description: Port number of the endpoint
- example: 5432
- type:
- $ref: '#/components/schemas/DatastoreEndpointType'
- url:
- type: string
- description: Pre-built connection URL for the endpoint, masked when reveal is not requested
- example: postgres://username:*******@host:5432/dbname?sslmode=require
- DatastoreCredential:
- x-scalar-ignore: true
- type: object
- description: Connection credentials for a datastore
- required:
- - endpoints
- properties:
- username:
- type: string
- description: The master username for the database
- example: postgres
- password:
- type: string
- description: The master password for the database
- example: supersecret
- database_name:
- type: string
- description: The name of the database
- example: myapp
- endpoints:
- type: array
- description: List of connection endpoints
- items:
- $ref: '#/components/schemas/DatastoreEndpoint'
- DatastoreConnectedApp:
- x-scalar-ignore: true
- type: object
- description: An app connected to a datastore, with its latest revision status
- required:
- - app_instance_id
- - source_name
- - deployment_target_id
- - deployment_target_name
- - region
- - status
- - buildpacks
- properties:
- app_instance_id:
- type: string
- description: UUID of the app instance
- source_name:
- type: string
- description: Name of the Porter app
- deployment_target_id:
- type: string
- description: UUID of the deployment target the app runs in
- deployment_target_name:
- type: string
- description: Display name of the deployment target
- region:
- type: string
- description: Cloud region the cluster is deployed in
- status:
- type: string
- description: Latest revision status for the app
- buildpacks:
- type: array
- description: Buildpacks detected in the app's latest revision, used for icon display
- items:
- type: string
- DatastoreDeletionProtection:
- type: object
- description: Deletion protection setting for a datastore.
- required:
- - enabled
- properties:
- enabled:
- type: boolean
- description: Whether deletion protection is enabled on the datastore's cloud resource.
- example: true
- DatastoreMetricDatapointSeriesKind:
- x-scalar-ignore: true
- type: string
- description: The type of metric being measured
- enum:
- - cpu_usage
- - memory_usage
- - disk_usage
- - connections
- DatastoreMetricDatapoint:
- x-scalar-ignore: true
- type: object
- description: A single metric data point with timestamp and statistical values
- required:
- - timestamp
- - average
- - maximum
- - minimum
- properties:
- timestamp:
- type: string
- format: date-time
- description: The timestamp when this metric was recorded (ISO 8601 format)
- average:
- type: number
- description: The average value of the metric over the time period
- minimum: 0
- maximum:
- type: number
- description: The maximum value of the metric over the time period
- minimum: 0
- minimum:
- type: number
- description: The minimum value of the metric over the time period
- minimum: 0
- DatastoreMetricDatapointSeries:
- x-scalar-ignore: true
- type: object
- description: A group of metrics of the same kind
- required:
- - kind
- - data
- - unit
- properties:
- kind:
- $ref: '#/components/schemas/DatastoreMetricDatapointSeriesKind'
- unit:
- type: string
- description: The unit of measurement for the metric values
- enum:
- - cores
- - bytes
- - connections
- tolerance:
- type: number
- description: The tolerance for the metric
- data:
- type: array
- description: Array of metric data points over time
- items:
- $ref: '#/components/schemas/DatastoreMetricDatapoint'
- minItems: 0
- DatastoreMetrics:
- x-scalar-ignore: true
- type: object
- description: Complete RDS metrics response containing CPU, memory, and disk usage data
- required:
- - metrics
- - timestamp
- properties:
- metrics:
- type: array
- description: Array of metric series by type
- items:
- $ref: '#/components/schemas/DatastoreMetricDatapointSeries'
- timestamp:
- type: string
- format: date-time
- description: Timestamp when these metrics were retrieved from CloudWatch
- ObjectStorage:
- type: object
- description: Object storage resource information
- required:
- - id
- - name
- - cloud_account_id
- - region
- - status
- properties:
- id:
- type: string
- format: uuid
- description: The unique identifier for the object storage
- example: a7f8c2e1-9b4d-4c3a-8e2f-1d5a6b7c8d9e
- name:
- type: string
- description: The vanity name for the storage resource
- example: my-app-storage
- cloud_account_id:
- type: string
- description: Identifier for the cloud provider account
- example: aws-account-123
- region:
- type: string
- description: The cloud region where the storage resource is deployed
- example: us-east-1
- connected_cluster_ids:
- type: array
- items:
- type: integer
- format: uint
- description: List of ids of clusters that are connected to this storage
- example:
- - 101
- - 102
- status:
- type: string
- description: The current status of the object storage
- example: available
- enum:
- - creating
- - available
- - updating
- - deleting
- - failed
- bucket_name:
- type: string
- description: The cloud storage bucket/container name
- example: porter-my-app-storage-a7f8c2e1
- credential_identifier:
- type: string
- description: The cloud provider credential identifier for accessing this storage (e.g. IAM role name for AWS, service account email for GCP)
- example: porter-s3-a7f8c2e1
- created_at:
- type: string
- description: The time the object storage was created
- format: date-time
- example: '2020-01-01T00:00:00Z'
- ObjectStorageListResponse:
- type: object
- description: Response containing a list of object storage resources
- required:
- - storages
- properties:
- storages:
- type: array
- items:
- $ref: '#/components/schemas/ObjectStorage'
- description: List of object storage resources
- ObjectStorageCreateRequest:
- type: object
- description: Request body for creating a new object storage resource
- required:
- - name
- - cloud_account_id
- - region
- properties:
- name:
- type: string
- description: The vanity name for the storage resource
- example: my-app-storage
- cloud_account_id:
- type: string
- description: Identifier for the cloud provider account
- example: aws-account-123
- region:
- type: string
- description: The cloud region where the storage resource should be created
- example: us-east-1
- connected_cluster_ids:
- type: array
- items:
- type: integer
- format: uint
- description: List of ids of clusters that should be connected to this storage
- example:
- - 101
- - 102
- ObjectStorageUpdateRequest:
- type: object
- description: Request body for updating an object storage resource
- required:
- - connected_cluster_ids
- properties:
- connected_cluster_ids:
- type: array
- items:
- type: integer
- format: uint
- description: List of ids of clusters that should be connected to this storage
- example:
- - 101
- - 102
- NotificationScope:
- type: object
- description: Defines the scope for notification rules
- x-scalar-ignore: true
- required:
- - application_ids
- properties:
- application_ids:
- type: array
- description: The application ID this rule applies to
- items:
- type: string
- description: Unique identifier for the application
- format: uuid
- x-go-type: uuid.UUID
- PagerDutyIntegration:
- type: object
- x-scalar-ignore: true
- required:
- - name
- - routing_key
- - scope
- properties:
- name:
- type: string
- description: The name of the integration
- example: Staging
- routing_key:
- type: string
- description: Routing key for sending PagerDuty events
- example: secret_goes_here
- scope:
- $ref: '#/components/schemas/NotificationScope'
- EmailIntegration:
- type: object
- x-scalar-ignore: true
- required:
- - name
- - email
- properties:
- name:
- type: string
- description: The name of the integration
- email:
- type: string
- format: email
- description: Email address for notifications
- scope:
- $ref: '#/components/schemas/NotificationScope'
- SlackOAuthInitiateResponse:
- type: object
- x-scalar-ignore: true
- required:
- - redirect_url
- properties:
- redirect_url:
- type: string
- description: Slack OAuth authorization URL to redirect user to
- example: https://slack.com/oauth/v2/authorize?client_id=1234567890.0987654321&scope=incoming-webhook&user_scope=&redirect_uri=https%3A%2F%2Fapi.porter.run%2Fapi%2Fv2%2Foauth%2Fslack%2Fcallback&state=eyJzdGF0ZSI6InJhbmRvbVN0cmluZyIsInByb2plY3RfaWQiOjEyM30%3D
- SlackNotificationSettings:
- type: object
- x-scalar-ignore: true
- required:
- - mentions
- properties:
- mentions:
- type: array
- description: The Slack users to mention when sending notifications
- items:
- type: string
- description: Slack user ID
- SlackIntegration:
- type: object
- x-scalar-ignore: true
- required:
- - name
- - channel
- - settings
- properties:
- name:
- type: string
- description: The name of the integration
- team_icon_url:
- type: string
- description: The URL for the team icon
- configuration_url:
- type: string
- description: The URL for the configuration page for this integration
- channel:
- type: string
- description: The Slack channel name for notifications
- example: '#alerts'
- settings:
- $ref: '#/components/schemas/SlackNotificationSettings'
- SlackUpdateRequestBody:
- type: object
- x-scalar-ignore: true
- required:
- - name
- - settings
- properties:
- name:
- type: string
- description: The name of the integration
- settings:
- $ref: '#/components/schemas/SlackNotificationSettings'
- NotificationIntegration:
- type: object
- description: Notification integration details
- x-scalar-ignore: true
- required:
- - kind
- - id
- - is_pending
- properties:
- kind:
- type: string
- description: The kind of notification integration
- enum:
- - pagerduty
- - email
- - slack
- id:
- type: string
- description: Unique identifier for the integration
- format: uuid
- x-go-type: uuid.UUID
- is_pending:
- type: boolean
- description: Whether the integration is pending verification
- default: false
- NotificationCICDSettings:
- type: object
- description: CICD notification settings
- x-scalar-ignore: true
- required:
- - on_failure
- - on_canceled
- - on_success
- - on_start
- properties:
- on_failure:
- type: boolean
- description: Send notifications on failure
- default: true
- on_canceled:
- type: boolean
- description: Send notifications when canceled
- default: false
- on_success:
- type: boolean
- description: Send notifications on success
- default: false
- on_start:
- type: boolean
- description: Send notifications when the app starts
- default: false
- NotificationLifeCycleSettings:
- type: object
- description: Lifecycle notification settings
- x-scalar-ignore: true
- required:
- - on_failure
- properties:
- on_failure:
- type: boolean
- description: Send notifications on failure
- default: true
- NotificationRules:
- type: object
- description: Notification settings for different categories
- x-scalar-ignore: true
- required:
- - ci_cd
- - life_cycle
- properties:
- ci_cd:
- $ref: '#/components/schemas/NotificationCICDSettings'
- life_cycle:
- $ref: '#/components/schemas/NotificationLifeCycleSettings'
- NotificationConfig:
- type: object
- description: A single notification integration
- x-scalar-ignore: true
- required:
- - id
- - integration
- - name
- - kind
- - scope
- - rules
- properties:
- id:
- type: integer
- description: The unique identifier for the notification config
- integration:
- $ref: '#/components/schemas/NotificationIntegration'
- name:
- type: string
- description: The name of the integration
- kind:
- type: string
- description: The kind of notification integration
- enum:
- - pagerduty
- - email
- - slack
- scope:
- $ref: '#/components/schemas/NotificationScope'
- rules:
- $ref: '#/components/schemas/NotificationRules'
- ListNotificationConfigsResponseBody:
- type: object
- description: List of notification integration configs
- x-scalar-ignore: true
- required:
- - items
- properties:
- items:
- type: array
- items:
- $ref: '#/components/schemas/NotificationConfig'
- UpdateNotificationConfigRequestBody:
- type: object
- description: Notification integration config
- x-scalar-ignore: true
- required:
- - id
- - kind
- - name
- - scope
- - rules
- properties:
- id:
- type: integer
- description: The unique identifier for the notification config
- kind:
- type: string
- description: The kind of notification integration
- enum:
- - pagerduty
- - email
- - slack
- name:
- type: string
- description: The name of the integration
- scope:
- $ref: '#/components/schemas/NotificationScope'
- rules:
- $ref: '#/components/schemas/NotificationRules'
- GetHelmDefaultValuesResponseBody:
- type: object
- required:
- - default_values
- properties:
- default_values:
- type: string
- description: Base64 encoded YAML containing the default values for the Helm chart
- example: YXBpVmVyc2lvbjogdjEKa2luZDogRGVwbG95bWVudA==
- ChartNotFoundError:
- type: object
- required:
- - message
- - error_code
- properties:
- message:
- type: string
- description: Error message describing what was not found
- example: Chart 'mysql' version '9.4.6' not found in repository 'https://charts.helm.sh/stable'
- error_code:
- type: string
- description: Error code for chart not found
- example: CHART_NOT_FOUND
- TemporalIntegration:
- type: object
- required:
- - id
- - name
- - endpoint
- - namespace
- - api_key
- properties:
- id:
- type: string
- format: uuid
- description: Unique identifier of the temporal integration
- example: 123e4567-e89b-12d3-a456-426614174000
- name:
- type: string
- description: Name of the temporal integration in Porter.
- example: my-temporal-cluster
- endpoint:
- type: string
- description: Regional endpoint from Temporal Cloud.
- example: temporal-frontend.temporal.svc.cluster.local:7233
- namespace:
- type: string
- description: Namespace from Temporal Cloud.
- example: default
- api_key:
- type: string
- description: Secret key for authenticating into the Temporal Cloud namespace provided above. This should be generated in Temporal Cloud.
- example: my-api-key
- ListTemporalIntegrationsResponseBody:
- type: object
- required:
- - integrations
- properties:
- integrations:
- type: array
- items:
- $ref: '#/components/schemas/TemporalIntegration'
- CreateTemporalIntegrationRequestBody:
- type: object
- required:
- - name
- - endpoint
- - namespace
- - api_key
- properties:
- name:
- type: string
- description: Name of the temporal integration in Porter.
- example: my-temporal-cluster
- endpoint:
- type: string
- description: Regional endpoint from Temporal Cloud.
- example: us-east-1.aws.api.temporal.io:7233
- namespace:
- type: string
- description: Namespace from Temporal Cloud.
- example: default
- api_key:
- type: string
- description: Secret key for authenticating into the Temporal Cloud namespace provided above. This should be generated in Temporal Cloud.
- example: my-api-key
- CreateTemporalIntegrationResponseBody:
- type: object
- required:
- - id
- properties:
- id:
- type: string
- format: uuid
- description: Unique identifier of the temporal integration in Porter.
- example: 123e4567-e89b-12d3-a456-426614174000
- UpdateTemporalIntegrationApiKeyRequestBody:
- type: object
- required:
- - api_key
- properties:
- api_key:
- type: string
- description: New API key for authenticating into the Temporal Cloud namespace.
- example: my-new-api-key
- WorkOsConfig:
- type: object
- required:
- - default_role
- properties:
- default_role:
- type: string
- description: The default role to use for the project.
- enum:
- - admin
- - developer
- - viewer
- UpdateWorkosIntegrationConfigRequestBody:
- type: object
- required:
- - config
- properties:
- config:
- $ref: '#/components/schemas/WorkOsConfig'
- projects_Project:
- type: object
- required:
- - jit_enabled
- - work_os_config
- - reject_user_jwt_tokens
- - export_audit_logs_enabled
- - azure_wif_enabled
- - sandboxes_enabled
- - cloud_accounts_redesign_enabled
- - aws_external_id_enabled
- - forward_auth_enabled
- properties:
- jit_enabled:
- type: boolean
- description: Whether or not the project has jit enabled
- reject_user_jwt_tokens:
- type: boolean
- description: True if user-scoped JWT tokens are rejected for this project.
- export_audit_logs_enabled:
- type: boolean
- description: True if API audit log export is enabled for this project.
- azure_wif_enabled:
- type: boolean
- description: True if Azure WIF onboarding is enabled for this project.
- sandboxes_enabled:
- type: boolean
- description: True if sandbox clusters can be enabled for this project.
- cloud_accounts_redesign_enabled:
- type: boolean
- description: True if the redesigned top-level cloud accounts experience is enabled for this project.
- aws_external_id_enabled:
- type: boolean
- description: True if AWS onboarding uses the external-ID grant flow for this project.
- forward_auth_enabled:
- type: boolean
- description: True if forward auth is enabled for this project.
- work_os_config:
- $ref: '#/components/schemas/WorkOsConfig'
- UserJwtTokenUsage:
- type: object
- required:
- - user_id
- - user_email
- - last_used_at
- properties:
- user_id:
- type: integer
- description: ID of the member who used a legacy JWT token.
- user_email:
- type: string
- description: Email of the member who used a legacy JWT token.
- last_used_at:
- type: string
- format: date-time
- description: When the member last authenticated with a legacy JWT token.
- UserJwtTokenUsageResponse:
- type: object
- required:
- - usages
- properties:
- usages:
- type: array
- description: Members who used a legacy JWT token within the last week.
- items:
- $ref: '#/components/schemas/UserJwtTokenUsage'
- DayOfWeek:
- type: string
- description: Day of the week
- enum:
- - sunday
- - monday
- - tuesday
- - wednesday
- - thursday
- - friday
- - saturday
- MaintenanceWindow:
- type: object
- required:
- - id
- - created_at
- - updated_at
- - project_id
- - day_of_week
- - start_time
- properties:
- id:
- type: string
- format: uuid
- description: Unique identifier for the maintenance window
- example: 550e8400-e29b-41d4-a716-446655440000
- created_at:
- type: string
- format: date-time
- description: Timestamp when the maintenance window was created
- example: '2025-01-15T10:30:00Z'
- updated_at:
- type: string
- format: date-time
- description: Timestamp when the maintenance window was last updated
- example: '2025-01-15T10:30:00Z'
- project_id:
- type: integer
- format: int
- description: ID of the project this maintenance window belongs to
- example: 123
- day_of_week:
- $ref: '#/components/schemas/DayOfWeek'
- example: sunday
- start_time:
- type: string
- format: date-time
- description: |
- Start time for the maintenance window in RFC 3339 format.
- The date component is ignored; only the time and timezone are significant.
- example: '0000-01-01T02:00:00Z'
- AddonType:
- type: string
- x-scalar-ignore: true
- description: Type of the addon
- enum:
- - custom
- example: custom
- AddonStatus:
- type: string
- x-scalar-ignore: true
- description: The status of the addon
- enum:
- - creating
- CustomContract:
- type: object
- description: Configuration for creating a custom addon from a Helm chart
- required:
- - chart_repo_url
- - chart_name
- properties:
- chart_repo_url:
- type: string
- description: The URL of the Helm chart repository
- example: https://helm.github.io/examples
- chart_name:
- type: string
- description: The name of the Helm chart to deploy
- example: hello-world
- chart_version:
- type: string
- description: The version of the Helm chart
- example: 0.1.0
- values_base64:
- type: string
- format: byte
- description: Base64 encoded Helm values YAML to override default chart values
- example: YXV0aDoKICBlbmFibGVkOiB0cnVlCiAgdXNlcm5hbWU6ICdhZG1pbicKcGVyc2lzdGVuY2U6CiAgc2l6ZTogJzEwR2kn
- environment_groups:
- type: array
- description: List of environment group names to inject into Helm values. Values like {{KEY}} will be replaced with the corresponding value from the environment group.
- items:
- type: string
- example:
- - my-env-group
- - database-secrets
- Addon:
- x-scalar-ignore: true
- type: object
- description: Detailed configuration information for a specific addon
- required:
- - name
- - type
- - status
- - created_at
- properties:
- name:
- type: string
- description: The name of the addon
- example: my-postgres-addon
- x-order: 1
- type:
- $ref: '#/components/schemas/AddonType'
- x-order: 2
- status:
- $ref: '#/components/schemas/AddonStatus'
- x-order: 3
- created_at:
- type: string
- description: The time the addon was created
- format: date-time
- example: '2020-01-01T00:00:00Z'
- x-order: 4
- custom:
- $ref: '#/components/schemas/CustomContract'
- x-order: 5
- AddonsUpdateRequest:
- x-scalar-ignore: true
- type: object
- description: Request body for updating an addon
- required:
- - name
- - type
- properties:
- name:
- type: string
- description: The name of the addon
- example: my-postgres-addon
- minLength: 1
- maxLength: 63
- pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
- type:
- $ref: '#/components/schemas/AddonType'
- cluster_id:
- type: integer
- description: The ID of the cluster to deploy the addon to
- example: 111
- format: int64
- custom:
- $ref: '#/components/schemas/CustomContract'
- AddonLog:
- x-scalar-ignore: true
- type: object
- required:
- - timestamp
- - line
- - level
- properties:
- timestamp:
- type: string
- format: date-time
- description: Timestamp when the log was generated
- example: '2021-01-01T00:00:00Z'
- line:
- type: string
- description: Log line content
- level:
- type: string
- description: Log severity level
- enum:
- - error
- - warning
- - info
- pod_name:
- type: string
- description: Name of the pod that generated the log
- AddonDeployment:
- x-scalar-ignore: true
- type: object
- required:
- - name
- - revision
- - created_at
- - manifest
- properties:
- name:
- type: string
- description: The name of the addon
- revision:
- type: integer
- description: The revision number
- created_at:
- type: string
- format: date-time
- description: When this revision was deployed
- manifest:
- type: object
- description: The addon configuration at this revision
- AddonDeploymentsResponse:
- x-scalar-ignore: true
- type: object
- required:
- - deployments
- properties:
- deployments:
- type: array
- items:
- $ref: '#/components/schemas/AddonDeployment'
- ImageRepository:
- type: object
- required:
- - uri
- properties:
- uri:
- type: string
- description: Full URI of the image repository
- example: 123456789.dkr.ecr.us-east-1.amazonaws.com/my-app
- ImageRepositoriesList:
- type: object
- required:
- - repositories
- properties:
- repositories:
- type: array
- description: List of image repositories
- items:
- $ref: '#/components/schemas/ImageRepository'
- ImageTag:
- type: object
- required:
- - name
- - updated_at
- properties:
- name:
- type: string
- description: Tag name
- example: v1.2.3
- updated_at:
- type: string
- format: date-time
- description: When the tag was last updated
- example: '2023-12-09T10:00:00Z'
- ImageTagsList:
- type: object
- required:
- - tags
- properties:
- tags:
- type: array
- description: List of image tags
- items:
- $ref: '#/components/schemas/ImageTag'
- PreviewEnvironmentListItem:
- x-scalar-ignore: true
- type: object
- required:
- - id
- - name
- - cluster_id
- - created_at
- - namespace
- properties:
- id:
- type: string
- description: Unique identifier of the preview deployment target
- example: 123e4567-e89b-12d3-a456-426614174000
- name:
- type: string
- description: Name of the preview deployment target
- example: pr-123-my-app
- cluster_id:
- type: integer
- description: ID of the cluster this preview is deployed to
- example: 456
- created_at:
- type: string
- format: date-time
- description: When the preview environment was created
- namespace:
- type: string
- description: Kubernetes namespace for this preview environment
- example: preview-pr-123
- last_updated_at:
- type: string
- format: date-time
- description: When any app in this preview environment was last updated
- expires_at:
- type: string
- format: date-time
- description: When this preview environment is scheduled to be torn down
- PreviewTemplateListItem:
- x-scalar-ignore: true
- type: object
- required:
- - id
- - name
- - app_name
- - repo_name
- - git_branch
- - addon_count
- - created_at
- properties:
- id:
- type: string
- description: Unique identifier of the preview template
- example: 123e4567-e89b-12d3-a456-426614174000
- name:
- type: string
- description: Name of the preview template
- example: my-app-template
- app_name:
- type: string
- description: Name of the application this template is for
- example: my-app
- repo_name:
- type: string
- description: Repository name associated with this template
- example: my-org/my-repo
- git_branch:
- type: string
- description: Git branch this template is configured for
- example: main
- addon_count:
- type: integer
- description: Number of addon templates included
- example: 2
- created_at:
- type: string
- format: date-time
- description: When the template was created
- CloudEnvironmentGroupSummary:
- type: object
- description: Summary view of a cloud environment group for list endpoints
- required:
- - id
- - name
- - current_version
- - created_at
- - updated_at
- properties:
- id:
- type: string
- format: uuid
- x-go-type: uuid.UUID
- description: Unique identifier of the cloud environment group
- name:
- type: string
- description: Name of the cloud environment group
- current_version:
- type: integer
- description: Current version of the cloud environment group
- created_at:
- type: string
- format: date-time
- description: When the cloud environment group was created
- updated_at:
- type: string
- format: date-time
- description: When the cloud environment group was last updated
- sync_target_cluster_ids:
- type: array
- items:
- type: integer
- description: Active sync target cluster IDs for this environment group.
- CloudEnvironmentGroupFile:
- type: object
- required:
- - name
- - b64_contents
- properties:
- name:
- type: string
- description: File name
- b64_contents:
- type: string
- description: Base64-encoded file contents
- CreateCloudEnvironmentGroupRequest:
- type: object
- required:
- - name
- - variables
- - secret_variables
- - files
- properties:
- name:
- type: string
- description: Name of the cloud environment group
- variables:
- type: object
- additionalProperties:
- type: string
- description: Non-secret variable key-value pairs
- secret_variables:
- type: object
- additionalProperties:
- type: string
- description: Secret variable key-value pairs
- files:
- type: array
- items:
- $ref: '#/components/schemas/CloudEnvironmentGroupFile'
- description: File attachments
- cluster_ids:
- type: array
- items:
- type: integer
- description: Restrict sync targets to the specified cluster IDs. When omitted, all available clusters in the project are targeted.
- CloudAccountSync:
- type: object
- description: Sync status for a cloud account linked to an environment group
- required:
- - cloud_account_id
- - sync_status
- - is_primary
- properties:
- cloud_account_id:
- type: string
- format: uuid
- x-go-type: uuid.UUID
- description: Cloud account ID
- sync_status:
- type: string
- enum:
- - pending
- - synced
- - failed
- description: Sync status for this cloud account
- is_primary:
- type: boolean
- description: Whether this is the primary cloud account for the environment group
- CloudEnvironmentGroup:
- type: object
- description: Full detail of a cloud environment group
- required:
- - id
- - name
- - current_version
- - variables
- - secret_variables
- - files
- - cloud_account_syncs
- - linked_applications
- - created_at
- - updated_at
- properties:
- id:
- type: string
- format: uuid
- x-go-type: uuid.UUID
- description: Unique identifier of the cloud environment group
- name:
- type: string
- description: Name of the cloud environment group
- current_version:
- type: integer
- description: Current version of the cloud environment group
- variables:
- type: object
- additionalProperties:
- type: string
- description: Non-secret variable key-value pairs
- secret_variables:
- type: object
- additionalProperties:
- type: string
- description: Secret variable key-value pairs
- files:
- type: array
- items:
- $ref: '#/components/schemas/CloudEnvironmentGroupFile'
- description: File attachments
- cloud_account_syncs:
- type: array
- items:
- $ref: '#/components/schemas/CloudAccountSync'
- description: Sync status per cloud account
- linked_applications:
- type: array
- items:
- type: string
- description: App instance IDs linked to this environment group across all clusters
- created_at:
- type: string
- format: date-time
- description: When the cloud environment group was created
- updated_at:
- type: string
- format: date-time
- description: When the cloud environment group was last updated
- sync_target_cluster_ids:
- type: array
- items:
- type: integer
- description: Cluster IDs currently targeted for sync. Empty when no targets have been recorded.
- UpdateCloudEnvironmentGroupRequest:
- type: object
- required:
- - expected_current_version
- - variables
- - secret_variables
- - files
- properties:
- expected_current_version:
- type: integer
- description: Current version expected by the caller for optimistic concurrency checks
- variables:
- type: object
- additionalProperties:
- type: string
- description: Non-secret variable key-value pairs
- secret_variables:
- type: object
- additionalProperties:
- type: string
- description: Secret variable key-value pairs
- files:
- type: array
- items:
- $ref: '#/components/schemas/CloudEnvironmentGroupFile'
- description: File attachments
- ReplaceCloudEnvironmentGroupSyncTargetsRequest:
- type: object
- required:
- - cluster_ids
- properties:
- cluster_ids:
- type: array
- items:
- type: integer
- description: Cluster IDs to sync this environment group to. Must contain at least one cluster.
- SyncTargetCloudAccountSync:
- type: object
- description: Sync status for a cloud account targeted by an environment group sync
- required:
- - cloud_account_id
- - sync_status
- properties:
- cloud_account_id:
- type: string
- format: uuid
- x-go-type: uuid.UUID
- description: Cloud account ID
- sync_status:
- type: string
- enum:
- - pending
- - synced
- - failed
- description: Sync status for this cloud account
- ReplaceCloudEnvironmentGroupSyncTargetsResult:
- type: object
- description: Result of replacing the sync target clusters for an environment group.
- required:
- - name
- - current_version
- - sync_target_cluster_ids
- - cloud_account_syncs
- properties:
- name:
- type: string
- description: Name of the cloud environment group
- current_version:
- type: integer
- description: Latest version of the environment group
- sync_target_cluster_ids:
- type: array
- items:
- type: integer
- description: Cluster IDs now targeted for sync
- cloud_account_syncs:
- type: array
- items:
- $ref: '#/components/schemas/SyncTargetCloudAccountSync'
- description: Per-cloud-account sync status for the targeted clusters
- CloudEnvironmentGroupVersion:
- type: object
- description: A historical version of a cloud environment group with resolved values
- required:
- - version
- - variables
- - secret_variables
- - files
- properties:
- version:
- type: integer
- description: Porter version number
- variables:
- type: object
- additionalProperties:
- type: string
- description: Non-secret variable key-value pairs for this version
- secret_variables:
- type: object
- additionalProperties:
- type: string
- description: Secret variable key-value pairs for this version
- files:
- type: array
- items:
- $ref: '#/components/schemas/CloudEnvironmentGroupFile'
- description: File attachments for this version
- RudderConfig:
- type: object
- required:
- - enabled
- - provider
- - model
- - api_keys
- - provider_url
- - tools_enabled
- - status
- - update_available
- properties:
- enabled:
- type: boolean
- description: Whether rudder is enabled
- status:
- type: string
- enum:
- - not_configured
- - deploying
- - ready
- description: Runtime status. not_configured when rudder has never been set up, deploying when enabled but the pod is not ready yet, ready when the pod is running.
- provider:
- type: string
- description: LLM provider name
- model:
- type: string
- description: LLM model ID
- api_keys:
- type: object
- additionalProperties:
- type: boolean
- description: Provider name to whether a key is saved
- provider_url:
- type: string
- description: Custom provider base URL
- tools_enabled:
- type: object
- additionalProperties:
- type: boolean
- description: Tool name to enabled state
- update_available:
- type: boolean
- description: True when the running rudder image digest differs from the latest digest in GHCR.
- UpdateRudderConfigRequest:
- type: object
- required:
- - enabled
- - provider
- - model
- - api_keys
- - provider_url
- - tools_enabled
- properties:
- enabled:
- type: boolean
- description: Whether rudder is enabled
- provider:
- type: string
- description: LLM provider name
- model:
- type: string
- description: LLM model ID
- api_keys:
- type: object
- additionalProperties:
- type: string
- description: Provider name to API key
- provider_url:
- type: string
- description: Custom provider base URL
- tools_enabled:
- type: object
- additionalProperties:
- type: boolean
- description: Tool name to enabled state
- CreateRudderSessionRequest:
- type: object
- required:
- - context
- properties:
- context:
- type: object
- description: Context for the debug session
- RudderSessionResult:
- type: object
- required:
- - session_id
- properties:
- session_id:
- type: string
- description: Debug session ID
- SendRudderMessageRequest:
- type: object
- required:
- - message
- properties:
- message:
- type: string
- description: Follow-up message to send
- InterruptRudderSessionRequest:
- type: object
- properties:
- message:
- type: string
- description: Optional follow-up message queued as the next user turn after the current turn is cancelled. When omitted the agent simply stops the current turn and waits for the next prompt.
- SandboxExecTarget:
- type: object
- description: Pod and container a client addresses for an interactive exec.
- x-go-type: sandboxapi.ExecTarget
- x-go-type-import:
- name: sandboxapi
- path: github.com/porter-dev/code/sandbox/gen/sandboxapi
- required:
- - namespace
- - pod_name
- - container_name
- properties:
- namespace:
- type: string
- description: Namespace of the sandbox pod
- pod_name:
- type: string
- description: Name of the sandbox pod
- container_name:
- type: string
- description: Container to target for the exec
- Sandbox:
- type: object
- description: A sandbox running on a cluster's sandbox-api control plane.
- x-go-type: sandboxapi.StatusResponse
- x-go-type-import:
- name: sandboxapi
- path: github.com/porter-dev/code/sandbox/gen/sandboxapi
- required:
- - id
- - name
- - image
- - phase
- - host
- - created_at
- properties:
- id:
- type: string
- description: Sandbox ID
- name:
- type: string
- description: Sandbox name; equals the id when no name was set
- image:
- type: string
- description: Image the sandbox runs
- tags:
- type: object
- additionalProperties:
- type: string
- description: Tags the sandbox was created with
- phase:
- type: string
- description: Current lifecycle phase of the sandbox
- enum:
- - queued
- - creating
- - running
- - succeeded
- - failed
- - terminated
- exit_code:
- type: integer
- description: Exit code, set once the sandbox has completed
- nullable: true
- created_at:
- type: string
- format: date-time
- description: When the sandbox was created
- started_at:
- type: string
- format: date-time
- description: When the sandbox pod started running
- nullable: true
- host:
- type: string
- description: Public hostname the sandbox is reachable at; empty when it exposes no port or the cluster has no sandbox ingress configured.
- exec_target:
- $ref: '#/components/schemas/SandboxExecTarget'
- nullable: true
- description: Where a client addresses an interactive exec into the running sandbox. Absent until the sandbox has a pod.
- SandboxFilterValues:
- type: object
- description: Values available for sandbox list filters.
- x-go-type: sandboxapi.FilterValuesResponse
- x-go-type-import:
- name: sandboxapi
- path: github.com/porter-dev/code/sandbox/gen/sandboxapi
- required:
- - tags
- - images
- - phases
- properties:
- tags:
- type: array
- description: Distinct sandbox tags, formatted as key=value
- items:
- type: string
- images:
- type: array
- description: Distinct sandbox images
- items:
- type: string
- phases:
- type: array
- description: Supported sandbox phases
- items:
- type: string
- enum:
- - queued
- - creating
- - running
- - succeeded
- - failed
- - terminated
- SandboxList:
- type: object
- description: A page of sandboxes on a cluster.
- x-go-type: sandboxapi.ListResponse
- x-go-type-import:
- name: sandboxapi
- path: github.com/porter-dev/code/sandbox/gen/sandboxapi
- required:
- - sandboxes
- - pagination
- properties:
- sandboxes:
- type: array
- description: Matching sandboxes
- items:
- $ref: '#/components/schemas/Sandbox'
- pagination:
- $ref: '#/components/schemas/PaginationResponse'
- filter_values:
- $ref: '#/components/schemas/SandboxFilterValues'
- nullable: true
- description: Cluster-wide filter option values, included only when requested.
- SandboxCountPoint:
- type: object
- description: Number of sandboxes created within a single time bucket.
- x-go-type: sandboxapi.CountPoint
- x-go-type-import:
- name: sandboxapi
- path: github.com/porter-dev/code/sandbox/gen/sandboxapi
- required:
- - timestamp
- - count
- properties:
- timestamp:
- type: string
- format: date-time
- description: Start of the bucket.
- count:
- type: integer
- description: Sandboxes created within the bucket.
- SandboxCounts:
- type: object
- description: Sandbox creation counts over time for a cluster.
- x-go-type: sandboxapi.CountsResponse
- x-go-type-import:
- name: sandboxapi
- path: github.com/porter-dev/code/sandbox/gen/sandboxapi
- required:
- - points
- - granularity_ms
- properties:
- points:
- type: array
- description: Created-sandbox counts per bucket, oldest first, gap-free.
- items:
- $ref: '#/components/schemas/SandboxCountPoint'
- granularity_ms:
- type: integer
- description: Width of each bucket in milliseconds.
- SandboxCreateRequest:
- type: object
- description: A sandbox to create.
- x-go-type: sandboxapi.SandboxSpec
- x-go-type-import:
- name: sandboxapi
- path: github.com/porter-dev/code/sandbox/gen/sandboxapi
- required:
- - image
- properties:
- image:
- type: string
- description: Container image to run
- tags:
- type: object
- additionalProperties:
- type: string
- description: Arbitrary key/value labels for identifying and filtering sandboxes
- command:
- type: array
- description: Override image entrypoint
- items:
- type: string
- args:
- type: array
- description: Arguments passed to the command
- items:
- type: string
- env:
- type: object
- additionalProperties:
- type: string
- description: Environment variables to set in the sandbox, keyed by name
- env_groups:
- type: array
- items:
- type: string
- description: |
- Names of environment groups on the cluster whose variables are
- injected into the sandbox, resolved to their latest version at create
- time. On a key conflict a later group wins over an earlier one, and
- an explicit env entry wins over any group value.
- volume_mounts:
- type: object
- additionalProperties:
- type: string
- description: Volumes to mount, keyed by absolute mount path; values are volume IDs
- ttl_seconds:
- type: integer
- minimum: 1
- description: |
- Maximum lifetime in seconds, counted from creation. The sandbox is
- terminated once it elapses. Omit for no limit.
- SandboxCreateResult:
- type: object
- description: A created sandbox, queued for execution.
- x-go-type: sandboxapi.CreateResponse
- x-go-type-import:
- name: sandboxapi
- path: github.com/porter-dev/code/sandbox/gen/sandboxapi
- required:
- - id
- properties:
- id:
- type: string
- description: Sandbox ID
- volume_mounts:
- type: object
- additionalProperties:
- type: string
- description: Volumes the sandbox mounts, keyed by mount path
- SandboxUsageMetric:
- type: object
- description: The CPU and memory a sandbox reserved over one measurement window.
- required:
- - sandbox_id
- - collected_at
- - cpu_cores
- - memory_gib
- - measurement_duration_seconds
- properties:
- sandbox_id:
- type: string
- format: uuid
- description: ID of the sandbox the window is billed to.
- collected_at:
- type: string
- format: date-time
- description: Window boundary the usage is recorded at.
- cpu_cores:
- type: number
- format: double
- description: CPU cores reserved over the window.
- memory_gib:
- type: number
- format: double
- description: Memory in GiB reserved over the window.
- measurement_duration_seconds:
- type: integer
- format: int32
- description: Length of the window in seconds.
- SandboxUsageIngestRequest:
- type: object
- description: A batch of sandbox usage windows reported by the sandbox control plane for billing.
- required:
- - metrics
- properties:
- metrics:
- type: array
- description: One entry per sandbox per measurement window.
- items:
- $ref: '#/components/schemas/SandboxUsageMetric'
- SandboxLookupResult:
- type: object
- description: The resolved id for a looked-up sandbox or volume.
- x-go-type: sandboxapi.LookupResult
- x-go-type-import:
- name: sandboxapi
- path: github.com/porter-dev/code/sandbox/gen/sandboxapi
- required:
- - id
- properties:
- id:
- type: string
- description: The resolved resource id
- SandboxLogLine:
- type: object
- description: A single sandbox log line.
- x-go-type: sandboxapi.LogLine
- x-go-type-import:
- name: sandboxapi
- path: github.com/porter-dev/code/sandbox/gen/sandboxapi
- required:
- - timestamp
- - line
- - level
- - exec_id
- properties:
- timestamp:
- type: string
- format: date-time
- description: When the log line was emitted
- line:
- type: string
- description: Log line content
- level:
- type: string
- description: Log severity level
- enum:
- - error
- - warning
- - info
- exec_id:
- type: string
- description: ID of the exec that produced this line; empty when the line is the workload's own output
- SandboxLogs:
- type: object
- description: Logs from a sandbox.
- x-go-type: sandboxapi.LogsResponse
- x-go-type-import:
- name: sandboxapi
- path: github.com/porter-dev/code/sandbox/gen/sandboxapi
- required:
- - sandbox_id
- - logs
- properties:
- sandbox_id:
- type: string
- description: Sandbox ID
- logs:
- type: array
- description: Log lines
- items:
- $ref: '#/components/schemas/SandboxLogLine'
- SandboxExecRequest:
- type: object
- description: A command to run in a sandbox.
- x-go-type: sandboxapi.ExecRequest
- x-go-type-import:
- name: sandboxapi
- path: github.com/porter-dev/code/sandbox/gen/sandboxapi
- required:
- - command
- properties:
- command:
- type: array
- description: Command and arguments to run
- items:
- type: string
- minItems: 1
- SandboxExecResult:
- type: object
- description: The output of a command run in a sandbox.
- x-go-type: sandboxapi.ExecResponse
- x-go-type-import:
- name: sandboxapi
- path: github.com/porter-dev/code/sandbox/gen/sandboxapi
- required:
- - stdout
- - stderr
- - exit_code
- properties:
- stdout:
- type: string
- description: Captured standard output
- stderr:
- type: string
- description: Captured standard error
- exit_code:
- type: integer
- description: Command exit code; non-zero is a normal result, not an error
- SandboxMetricsSummary:
- type: object
- description: p50/p90 CPU and memory usage over a lookback window with utilization against the sandbox's limits. Memory values include page cache, so they slightly overestimate resident memory.
- x-go-type: sandboxapi.MetricsSummaryResponse
- x-go-type-import:
- name: sandboxapi
- path: github.com/porter-dev/code/sandbox/gen/sandboxapi
- required:
- - window_seconds
- - has_data
- - cpu_cores_p50
- - cpu_cores_p90
- - cpu_limit_cores
- - cpu_util_p50_pct
- - cpu_util_p90_pct
- - mem_bytes_p50
- - mem_bytes_p90
- - mem_limit_bytes
- - mem_util_p50_pct
- - mem_util_p90_pct
- properties:
- window_seconds:
- type: integer
- format: int64
- description: Lookback window the summary was computed over.
- has_data:
- type: boolean
- description: |
- False when Prometheus returned no series for the sandbox's pod, which
- happens for freshly-started sandboxes (Prometheus scrapes at ~1m) and
- for pods shorter-lived than the [3m, 24h] window. When false, callers
- should render "no data yet" rather than the zeroed metric fields.
- cpu_cores_p50:
- type: number
- format: double
- description: 50th percentile CPU usage in cores.
- cpu_cores_p90:
- type: number
- format: double
- description: 90th percentile CPU usage in cores.
- cpu_limit_cores:
- type: number
- format: double
- description: CPU limit configured on the sandbox pod, in cores. Zero when no limit is set.
- cpu_util_p50_pct:
- type: number
- format: double
- description: p50 CPU usage as a percentage of the CPU limit. Zero when no limit is set.
- cpu_util_p90_pct:
- type: number
- format: double
- description: p90 CPU usage as a percentage of the CPU limit. Zero when no limit is set.
- mem_bytes_p50:
- type: integer
- format: int64
- description: 50th percentile memory usage in bytes. Includes page cache.
- mem_bytes_p90:
- type: integer
- format: int64
- description: 90th percentile memory usage in bytes. Includes page cache.
- mem_limit_bytes:
- type: integer
- format: int64
- description: Memory limit configured on the sandbox pod, in bytes. Zero when no limit is set.
- mem_util_p50_pct:
- type: number
- format: double
- description: p50 memory usage as a percentage of the memory limit. Zero when no limit is set.
- mem_util_p90_pct:
- type: number
- format: double
- description: p90 memory usage as a percentage of the memory limit. Zero when no limit is set.
- SandboxFileStorage:
- type: object
- description: The EFS-backed persistent disk shared by a cluster's sandboxes.
- required:
- - filesystem_id
- - created_at
- - metered_storage_bytes
- - storage_class_name
- - namespace
- properties:
- filesystem_id:
- type: string
- description: EFS filesystem ID.
- created_at:
- type: string
- format: date-time
- description: When the filesystem was created.
- metered_storage_bytes:
- type: integer
- format: int64
- description: Latest metered size of data stored in the filesystem, in bytes.
- storage_class_name:
- type: string
- description: StorageClass name the sandbox disk is provisioned under.
- namespace:
- type: string
- description: Namespace the sandbox disk is installed into.
- SandboxVolume:
- type: object
- description: A persistent volume that sandboxes can mount at launch.
- x-go-type: sandboxapi.Volume
- x-go-type-import:
- name: sandboxapi
- path: github.com/porter-dev/code/sandbox/gen/sandboxapi
- required:
- - id
- - name
- - phase
- - attached_to
- - created_at
- properties:
- id:
- type: string
- description: Volume ID; all volume operations address volumes by ID
- name:
- type: string
- description: Volume name, unique within the cluster
- phase:
- type: string
- description: Current lifecycle phase of the volume
- enum:
- - pending
- - ready
- - failed
- attached_to:
- type: array
- description: IDs of sandboxes the volume is attached to
- items:
- type: string
- created_at:
- type: string
- format: date-time
- description: When the volume was created
- SandboxVolumeList:
- type: object
- description: The volumes on a cluster.
- x-go-type: sandboxapi.VolumeListResponse
- x-go-type-import:
- name: sandboxapi
- path: github.com/porter-dev/code/sandbox/gen/sandboxapi
- required:
- - volumes
- properties:
- volumes:
- type: array
- description: Matching volumes
- items:
- $ref: '#/components/schemas/SandboxVolume'
- SandboxVolumeCreateRequest:
- type: object
- description: A volume to create.
- x-go-type: sandboxapi.VolumeSpec
- x-go-type-import:
- name: sandboxapi
- path: github.com/porter-dev/code/sandbox/gen/sandboxapi
- required:
- - name
- properties:
- name:
- type: string
- description: Volume name, unique within the cluster; must be a valid DNS label
- SandboxVolumeFileEntry:
- type: object
- description: One entry in a volume file listing.
- x-go-type: sandboxapi.VolumeFileEntry
- x-go-type-import:
- name: sandboxapi
- path: github.com/porter-dev/code/sandbox/gen/sandboxapi
- required:
- - name
- - type
- - size_bytes
- properties:
- name:
- type: string
- description: |
- Entry name within its parent directory, without any path separator
- (e.g. model.bin). Entries nest, so a directory name is carried once
- on the directory itself rather than repeated in the path of every
- entry beneath it. Reconstruct an entry's path relative to the volume
- root by joining the names from the listing's path down to the entry.
- type:
- type: string
- description: Whether the entry is a regular file or a directory
- enum:
- - file
- - directory
- size_bytes:
- type: integer
- format: int64
- description: Size of the entry in bytes. Zero for directories.
- modified_at:
- type: string
- format: date-time
- description: |
- When the entry was last modified. Always set on files; may be absent
- on directories when the volume's storage keeps no directory
- modification time.
- truncated:
- type: boolean
- description: |
- Set on a directory entry whose contents the walk did not fully read:
- the entry budget ran out before entering it, or the directory alone
- holds more entries than the budget. List the directory directly to
- read more of them. Never set on files.
- entries:
- type: array
- items:
- $ref: '#/components/schemas/SandboxVolumeFileEntry'
- description: |
- Entries directly inside this directory, directories before files and
- each group by name. Absent on files, and on a directory the walk did
- not enter (which carries truncated instead). Present and empty for a
- directory the walk read and found empty.
- SandboxVolumeFileList:
- type: object
- description: The result of walking one volume directory.
- x-go-type: sandboxapi.VolumeFileListResponse
- x-go-type-import:
- name: sandboxapi
- path: github.com/porter-dev/code/sandbox/gen/sandboxapi
- required:
- - path
- - entries
- - truncated
- properties:
- path:
- type: string
- description: The walked directory, relative to the volume root
- entries:
- type: array
- description: |
- Entries directly inside the walked directory, directories before
- files and each group by name. Entries nest, so everything the walk
- read below this level hangs off these entries rather than appearing
- here as a flat path.
- items:
- $ref: '#/components/schemas/SandboxVolumeFileEntry'
- truncated:
- type: boolean
- description: |
- Whether the walk stopped at its entry budget before reading every
- entry. Directories left unread or partially read carry their own
- truncated marker.
- SandboxVolumeFileMove:
- type: object
- description: Where to move a volume file or directory, and what to move.
- x-go-type: sandboxapi.VolumeFileMoveRequest
- x-go-type-import:
- name: sandboxapi
- path: github.com/porter-dev/code/sandbox/gen/sandboxapi
- required:
- - from
- - to
- properties:
- from:
- type: string
- description: File or directory to move, relative to the volume root, with or without a leading slash
- to:
- type: string
- description: Full new path for the entry, relative to the volume root, whose parent directory must already exist
- SandboxApiHealth:
- type: object
- description: Health status of a cluster's sandbox-api control plane.
- x-go-type: sandboxapi.HealthResponse
- x-go-type-import:
- name: sandboxapi
- path: github.com/porter-dev/code/sandbox/gen/sandboxapi
- required:
- - status
- properties:
- status:
- type: string
- description: Health status
- SandboxApiReadiness:
- type: object
- description: Readiness status of a cluster's sandbox-api control plane.
- x-go-type: sandboxapi.ReadinessResponse
- x-go-type-import:
- name: sandboxapi
- path: github.com/porter-dev/code/sandbox/gen/sandboxapi
- required:
- - status
- - active_sandboxes
- properties:
- status:
- type: string
- description: Readiness status
- active_sandboxes:
- type: integer
- description: Number of active sandboxes
- ApiToken:
- type: object
- required:
- - unique_id
- - name
- - role
- - created_at
- - created_by
- - usage_status
- properties:
- unique_id:
- type: string
- description: Unique identifier used in JWT claims
- example: abc123-def456
- name:
- type: string
- description: Human-readable name for the token
- example: CI deploy token
- role:
- type: string
- description: Display name of the role (or access policy)
- example: developer
- created_at:
- type: string
- format: date-time
- description: When the token was created
- created_by:
- type: string
- description: Email of the user who created the token (empty if unknown)
- expiry:
- type: string
- format: date-time
- description: When the token expires (absent if it never expires)
- last_used_at:
- type: string
- format: date-time
- description: |
- Last time the token was used to authenticate. Absent when usage_status is "never" or "unknown".
- usage_status:
- type: string
- enum:
- - active
- - never
- - unknown
- description: |
- Interpretation of last_used_at. "active" — last_used_at is a real timestamp. "never" — token was created after usage tracking began but has not been used. "unknown" — token predates usage tracking; its history is not recorded.
- CreateApiTokenRequest:
- type: object
- required:
- - name
- - role
- - expiry
- properties:
- name:
- type: string
- description: Human-readable name for the token
- example: CI deploy token
- role:
- type: string
- description: Access role to assign to the token
- enum:
- - admin
- - developer
- - viewer
- expiry:
- type: string
- format: date-time
- description: When the token should expire.
- CreatedApiToken:
- type: object
- required:
- - token
- properties:
- token:
- type: string
- description: |
- Signed JWT for authenticating API requests. This is the only time the plaintext token is returned.
- ApiAuditLogActorType:
- type: string
- description: Identifies the kind of actor that initiated the request.
- enum:
- - USER
- - API_TOKEN
- example: USER
- ApiAuditLogActorRef:
- type: object
- description: |
- Identifier pair for an audit log actor
- required:
- - actor_type
- - actor_id
- properties:
- actor_type:
- $ref: '#/components/schemas/ApiAuditLogActorType'
- actor_id:
- type: string
- description: |
- For USER, the numeric user id encoded as a string. For API_TOKEN,
- the token's `unique_id`.
- example: '58392'
- ApiAuditLogMethod:
- type: string
- description: HTTP method captured by the audit log middleware.
- enum:
- - GET
- - POST
- - PATCH
- - PUT
- - DELETE
- example: PATCH
- ApiAuditLogResourceType:
- type: string
- description: Resource family the request acted on.
- enum:
- - application
- - cluster
- - datastore
- - addon
- - environment_group
- - project
- - cloud_account
- - build
- - deployment_target
- - preview_environment
- - api_token
- - integration
- - devops_agent
- - user
- - audit_log
- example: application
- ApiAuditLogSource:
- type: string
- description: Source client that originated the action.
- enum:
- - cli
- example: cli
- ApiAuditLogQuery:
- type: object
- description: |
- Filter contract shared by all `/api-audit-log*/query` endpoints. Date
- range is required; every other field is optional and AND-ed when present.
- required:
- - start_date
- - end_date
- properties:
- start_date:
- type: string
- format: date-time
- description: Inclusive lower bound on `started_at` (RFC3339).
- example: '2026-04-23T00:00:00Z'
- end_date:
- type: string
- format: date-time
- description: Inclusive upper bound on `started_at` (RFC3339). Must not be in the future and must be after `start_date`.
- example: '2026-04-30T00:00:00Z'
- actors:
- type: array
- description: |
- Actors to include. Each element identifies one user or API token.
- Empty/omitted disables the filter. Mutually exclusive with `actors_exclude`
- items:
- $ref: '#/components/schemas/ApiAuditLogActorRef'
- actors_exclude:
- type: array
- description: |
- Actors to exclude. Empty/omitted disables the filter. Mutually exclusive with
- `actors`.
- items:
- $ref: '#/components/schemas/ApiAuditLogActorRef'
- methods:
- type: array
- description: |
- HTTP methods to include (uppercase, exact match). Empty/omitted
- disables the filter; rows whose method is in the set are returned.
- Mutually exclusive with `methods_exclude`.
- items:
- $ref: '#/components/schemas/ApiAuditLogMethod'
- methods_exclude:
- type: array
- description: |
- HTTP methods to exclude. Empty/omitted disables the filter. Mutually exclusive
- with `methods`.
- items:
- $ref: '#/components/schemas/ApiAuditLogMethod'
- status_codes:
- type: array
- description: |
- HTTP response status codes to include. Empty/omitted disables the
- filter; rows whose status_code is in the set are returned.
- Mutually exclusive with `status_codes_exclude`.
- items:
- type: integer
- format: int32
- minimum: 100
- maximum: 599
- example:
- - 200
- - 404
- status_codes_exclude:
- type: array
- description: |
- HTTP response status codes to exclude. Empty/omitted disables the filter. Mutually exclusive with
- `status_codes`.
- items:
- type: integer
- format: int32
- minimum: 100
- maximum: 599
- example:
- - 500
- path:
- type: string
- description: Filter by full request path (exact match, no query string).
- example: /api/v2/projects/12492/applications
- actions:
- type: array
- description: |
- Actions to include (exact match). Empty/omitted
- disables the filter. Mutually exclusive with `actions_exclude`.
- items:
- type: string
- example:
- - list_applications
- - create_app
- actions_exclude:
- type: array
- description: |
- Actions to exclude (exact match). Empty/omitted disables the filter.
- Mutually exclusive with `actions`.
- items:
- type: string
- example:
- - delete_app
- resource_types:
- type: array
- description: |
- Resource types to include (exact match). Empty/omitted disables
- the filter. Mutually exclusive with `resource_types_exclude`.
- items:
- $ref: '#/components/schemas/ApiAuditLogResourceType'
- resource_types_exclude:
- type: array
- description: |
- Resource types to exclude (exact match). Empty/omitted disables the filter. Mutually exclusive
- with `resource_types`.
- items:
- $ref: '#/components/schemas/ApiAuditLogResourceType'
- sources:
- type: array
- description: |
- Source clients to include. Empty/omitted disables the filter;
- rows whose source matches one of the values are returned.
- Mutually exclusive with `sources_exclude`.
- items:
- $ref: '#/components/schemas/ApiAuditLogSource'
- sources_exclude:
- type: array
- description: |
- Source clients to exclude. Empty/omitted disables the filter.
- Mutually exclusive with `sources`.
- items:
- $ref: '#/components/schemas/ApiAuditLogSource'
- application_ids:
- type: array
- description: |
- Application resource_ids to include. Mutually exclusive with
- `application_ids_exclude`.
- items:
- type: string
- example:
- - 22a55c5d-92aa-4b04-9b54-3a8ec3d6d4af
- application_ids_exclude:
- type: array
- description: |
- Application resource_ids to exclude. Mutually exclusive with `application_ids`.
- items:
- type: string
- cluster_ids:
- type: array
- description: |
- Cluster resource_ids (numeric strings) to include. Mutually
- exclusive with `cluster_ids_exclude`.
- items:
- type: string
- example:
- - '7'
- cluster_ids_exclude:
- type: array
- description: |
- Cluster resource_ids (numeric strings) to exclude. Mutually exclusive with `cluster_ids`.
- items:
- type: string
- environment_group_names:
- type: array
- description: |
- Environment group names to include.
- Mutually exclusive with `environment_group_names_exclude`.
- items:
- type: string
- example:
- - my-env-group
- environment_group_names_exclude:
- type: array
- description: |
- Environment group names to exclude. Mutually exclusive with `environment_group_names`.
- items:
- type: string
- search:
- type: string
- maxLength: 255
- description: |
- Free-text search. Case-insensitive substring match against
- request path, the resolved user's email, and the resolved API
- token's display name; a row matches if any of these contain
- the value. Whitespace is trimmed; an empty value
- disables the filter. SQL wildcards (`%` and `_`) are matched
- literally. ANDs with all other filters in this query body.
- example: alice
- QueryApiAuditLogsRequestBody:
- description: Request body for `query_api_audit_logs` — filter set plus pagination.
- allOf:
- - $ref: '#/components/schemas/ApiAuditLogQuery'
- - type: object
- properties:
- page:
- type: integer
- minimum: 1
- default: 1
- description: Page number (1-based).
- example: 1
- ApiAuditLogResourceMetadata:
- type: object
- description: Resource-type-specific context
- properties:
- cluster_id:
- type: integer
- format: int64
- description: ID of the owning cluster.
- example: 42
- cluster_name:
- type: string
- description: Display name of the owning cluster.
- example: prod-east
- preview_environment_id:
- type: string
- format: uuid
- x-go-type: uuid.UUID
- description: Deployment-target id. Omitted on the cluster's default deployment target.
- example: 7ee59b1f-8fef-4d3a-9d0d-9a1c5f9bb2a5
- preview_environment_name:
- type: string
- description: Deployment-target display name. Omitted on the cluster's default deployment target.
- example: PR 1234
- command:
- type: string
- description: CLI command the caller reported when the request was made. Omitted when the request carried no command.
- example: porter kubectl
- ApiAuditLogEntry:
- type: object
- required:
- - started_at
- - method
- - path
- - action
- - actor_type
- - actor_id
- - actor_name
- - user_agent
- - status_code
- properties:
- started_at:
- type: string
- format: date-time
- description: When the request entered the audit log middleware
- example: '2026-04-28T14:32:17.482Z'
- method:
- $ref: '#/components/schemas/ApiAuditLogMethod'
- path:
- type: string
- description: Full request path (no query string)
- example: /api/v2/projects/12492/applications
- action:
- type: string
- description: Human-readable action name
- example: application.list
- actor_type:
- $ref: '#/components/schemas/ApiAuditLogActorType'
- actor_id:
- type: string
- description: User id (encoded as string) or API token unique_id; empty when no actor was identified
- example: '58392'
- actor_name:
- type: string
- description: |
- Human-readable label for the actor. For USER, the user's email.
- For API_TOKEN, the token's display name. Soft-deleted users and
- revoked tokens still resolve so historical entries are readable.
- Empty when the actor is unset or was never associated with this
- project.
- user_agent:
- type: string
- description: User-Agent header captured by the middleware (truncated to 512 chars)
- example: Mozilla/5.0
- resource_type:
- $ref: '#/components/schemas/ApiAuditLogResourceType'
- description: Resource family the request acted on.
- resource_id:
- type: string
- description: ID of resource associated with the request.
- example: 22a55c5d-92aa-4b04-9b54-3a8ec3d6d4af
- resource_name:
- type: string
- description: Name of resource associated with the request.
- example: my-app
- resource_metadata:
- $ref: '#/components/schemas/ApiAuditLogResourceMetadata'
- status_code:
- type: integer
- format: int32
- description: HTTP response status code
- example: 200
- source:
- $ref: '#/components/schemas/ApiAuditLogSource'
- description: Source client for the action.
- ListApiAuditLogsResponseBody:
- type: object
- required:
- - entries
- - pagination
- properties:
- entries:
- type: array
- items:
- $ref: '#/components/schemas/ApiAuditLogEntry'
- pagination:
- $ref: '#/components/schemas/PaginationResponse'
- ApiAuditLogExportFormat:
- type: string
- description: Output format for an audit log export.
- enum:
- - csv
- - json
- example: csv
- ExportApiAuditLogsRequestBody:
- description: Request body for `export_api_audit_logs` — filter set plus the output `format`. Pagination is not accepted; the export covers the entire filtered set.
- allOf:
- - $ref: '#/components/schemas/ApiAuditLogQuery'
- - type: object
- required:
- - format
- properties:
- format:
- $ref: '#/components/schemas/ApiAuditLogExportFormat'
- ApiAuditLogCountPoint:
- type: object
- required:
- - timestamp
- - count
- properties:
- timestamp:
- type: string
- format: date-time
- description: |
- Bucket start in UTC, snapped to the wall-clock grid. The final bucket
- may extend past `end_date` when `end_date` falls mid-bucket.
- example: '2026-04-28T14:32:00Z'
- count:
- type: integer
- format: int64
- minimum: 0
- description: Number of audit log entries whose `started_at` falls in this bucket.
- example: 5
- ListApiAuditLogCountsResponseBody:
- type: object
- required:
- - points
- - granularity_ms
- properties:
- points:
- type: array
- description: |
- API audit log volume bucketed over time, ascending by timestamp.
- Buckets with no logs are present with `count: 0`.
- items:
- $ref: '#/components/schemas/ApiAuditLogCountPoint'
- granularity_ms:
- type: integer
- format: int64
- minimum: 1
- description: |
- Width of each bucket in milliseconds. Server-picked from the
- requested range so the resulting chart targets ~60 buckets.
- example: 60000
- ApiAuditLogFilterValuesQuery:
- type: object
- description: |
- Date-window contract for discovering filter picker values. The endpoint
- intentionally ignores table filters so each picker can show every value
- that could produce an audit-log row in this project and window.
- required:
- - start_date
- - end_date
- properties:
- start_date:
- type: string
- format: date-time
- description: Inclusive lower bound on `started_at` (RFC3339).
- example: '2026-04-23T00:00:00Z'
- end_date:
- type: string
- format: date-time
- description: Inclusive upper bound on `started_at` (RFC3339). Must not be in the future and must be after `start_date`.
- example: '2026-04-30T00:00:00Z'
- ApiAuditLogActor:
- allOf:
- - $ref: '#/components/schemas/ApiAuditLogActorRef'
- - type: object
- required:
- - actor_name
- - actor_role
- properties:
- actor_name:
- type: string
- description: User email or API token display name. Empty if not resolvable.
- actor_role:
- type: string
- description: |
- Role kind for USER actors, policy_name for API_TOKEN actors.
- Empty if not resolvable.
- example: admin
- ApiAuditLogResource:
- type: object
- description: Resource with hydrated display name. resource_id is opaque (UUID for app/datastore/addon/env_group, numeric for cluster/project).
- required:
- - resource_type
- - resource_id
- - resource_name
- properties:
- resource_type:
- $ref: '#/components/schemas/ApiAuditLogResourceType'
- resource_id:
- type: string
- example: 22a55c5d-92aa-4b04-9b54-3a8ec3d6d4af
- resource_name:
- type: string
- description: Empty when hard-deleted or otherwise unresolvable.
- example: my-app
- resource_metadata:
- $ref: '#/components/schemas/ApiAuditLogResourceMetadata'
- QueryApiAuditLogFilterValuesResponseBody:
- type: object
- description: |
- Distinct values of selected filter columns from audit log rows matching
- the project and date window.
- required:
- - actions
- - actors
- - status_codes
- - resources
- properties:
- actions:
- type: array
- description: Distinct actions. Sorted alphabetically.
- items:
- type: string
- example:
- - create_app
- - list_applications
- actors:
- type: array
- description: Distinct actors matching the query.
- items:
- $ref: '#/components/schemas/ApiAuditLogActor'
- status_codes:
- type: array
- description: |
- Distinct captured HTTP response status codes appearing in audit log
- rows that match the project and date window. Sorted ascending.
- items:
- type: integer
- format: int32
- minimum: 100
- maximum: 599
- example:
- - 200
- - 404
- - 500
- resources:
- type: array
- description: Distinct resources matching the query, with hydrated names. Sorted by type, then name.
- items:
- $ref: '#/components/schemas/ApiAuditLogResource'
- SandboxDailyUsage:
- type: object
- description: Sandbox compute usage summed over one day.
- required:
- - timestamp
- - cpu_hours
- - gib_hours
- properties:
- timestamp:
- type: string
- format: date-time
- description: Start of the day (UTC).
- cpu_hours:
- type: number
- format: double
- description: Sandbox CPU core hours used that day.
- gib_hours:
- type: number
- format: double
- description: Sandbox memory GiB hours used that day.
- SandboxBillingUsage:
- type: object
- description: Per-day billed sandbox compute usage for a project.
- required:
- - days
- properties:
- days:
- type: array
- description: One entry per day with recorded sandbox usage.
- items:
- $ref: '#/components/schemas/SandboxDailyUsage'
-x-tagGroups:
- - name: Alpha
- tags:
- - Applications
- - Deployment Targets
- - Jobs
- - Clusters
- - name: Stable
- tags:
- - Environment Groups
diff --git a/scripts/deploy-helm.sh b/scripts/deploy-helm.sh
index 88c27d201..e7f629255 100755
--- a/scripts/deploy-helm.sh
+++ b/scripts/deploy-helm.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail
-REPO="${1:?usage: scripts/deploy-helm.sh <image-repo-prefix> [tag] e.g. scripts/deploy-helm.sh ghcr.io/gkestenberg/qm}"
+REPO="${1:?usage: scripts/deploy-helm.sh <image-repo-prefix> [tag] e.g. scripts/deploy-helm.sh ghcr.io/<org>/qm}"
TAG="${2:-$(git rev-parse --short HEAD)}"
RELEASE="${QM_RELEASE:-qm}"
NAMESPACE="${QM_NAMESPACE:-qm}"
@@ -44,4 +44,4 @@ else
echo ">> QM_DEPLOY=0, skipping in-cluster deploy (images + chart published)"
fi
-echo ">> done: chart oci://$REPO @ chart $(helm show chart "$CHART" | awk '/^version:/{print $2}'), images @ $TAG"
+echo ">> done: chart oci://$CHART_NS @ chart $(helm show chart "$CHART" | awk '/^version:/{print $2}'), images @ $TAG"
diff --git a/src/config.ts b/src/config.ts
index 2063a4ed8..e7ea71d2a 100644
--- a/src/config.ts
+++ b/src/config.ts
@@ -347,6 +347,9 @@ function porterApiBaseUrl(env: NodeJS.ProcessEnv): string | undefined {
return env.PORTER_SANDBOX_BASE_URL ?? derived;
}
+const porterLocatorPresent = (env: NodeJS.ProcessEnv): boolean =>
+ Boolean(porterApiBaseUrl(env) || env.PORTER_CLUSTER_ID || env.KUBERNETES_SERVICE_HOST);
+
function porterDeployVisibilityStrict(value: string | undefined): PorterDeployEnv["visibility"] {
if (value === undefined || value.trim() === "") return undefined;
const visibility = value.trim();
@@ -357,7 +360,7 @@ function porterDeployVisibilityStrict(value: string | undefined): PorterDeployEn
}
function porterDeployEnv(env: NodeJS.ProcessEnv): PorterDeployEnv {
- const token = env.PORTER_DEPLOY_API_TOKEN ?? env.PORTER_SANDBOX_TOKEN;
+ const token = env.PORTER_DEPLOY_API_TOKEN;
const baseUrl = porterApiBaseUrl(env);
const visibility = porterDeployVisibilityStrict(env.PORTER_DEPLOY_VISIBILITY);
const ttlSec = numEnvStrict("PORTER_DEPLOY_TTL_SEC", env.PORTER_DEPLOY_TTL_SEC);
@@ -374,17 +377,16 @@ function porterDeployEnv(env: NodeJS.ProcessEnv): PorterDeployEnv {
}
function porterSandboxEnv(env: NodeJS.ProcessEnv): PorterSandboxEnv {
- const token = env.PORTER_SANDBOX_TOKEN ?? env.PORTER_DEPLOY_API_TOKEN;
+ const token = env.PORTER_SANDBOX_TOKEN;
const baseUrl = porterApiBaseUrl(env);
+ const ttlSec = numEnvStrict("PORTER_SANDBOX_TTL_SEC", env.PORTER_SANDBOX_TTL_SEC);
return {
...(env.PORTER_SANDBOX_IMAGE ? { image: env.PORTER_SANDBOX_IMAGE } : {}),
...(token ? { token } : {}),
...(baseUrl ? { baseUrl } : {}),
...(env.PORTER_SANDBOX_NAME_PREFIX ? { namePrefix: env.PORTER_SANDBOX_NAME_PREFIX } : {}),
...(env.PORTER_SANDBOX_HOME ? { homeDir: env.PORTER_SANDBOX_HOME } : {}),
- ...(numEnvStrict("PORTER_SANDBOX_TTL_SEC", env.PORTER_SANDBOX_TTL_SEC) !== undefined
- ? { ttlSec: numEnvStrict("PORTER_SANDBOX_TTL_SEC", env.PORTER_SANDBOX_TTL_SEC) }
- : {}),
+ ...(ttlSec !== undefined ? { ttlSec } : {}),
...(env.PORTER_SANDBOX_EGRESS_PROXY_URL ? { egressProxyUrl: env.PORTER_SANDBOX_EGRESS_PROXY_URL } : {}),
...(numEnvStrict("SANDBOX_TIMEOUT_SEC", env.SANDBOX_TIMEOUT_SEC) !== undefined
? { defaultTimeoutSec: numEnvStrict("SANDBOX_TIMEOUT_SEC", env.SANDBOX_TIMEOUT_SEC) }
@@ -762,26 +764,19 @@ export function loadConfig(env: NodeJS.ProcessEnv = process.env): Config {
);
}
const dataDir = resolve(env.DATA_DIR ?? "./data");
- if (env.SANDBOX_BACKEND === "porter" && !env.PORTER_SANDBOX_EGRESS_PROXY_URL) {
+ const porterSandboxSelected = env.SANDBOX_BACKEND === "porter" || env.SANDBOX_SECONDARY_BACKEND === "porter";
+ if (porterSandboxSelected && !env.PORTER_SANDBOX_EGRESS_PROXY_URL) {
console.warn(
"[config] SANDBOX_BACKEND=porter without PORTER_SANDBOX_EGRESS_PROXY_URL — sandboxes run with NO egress enforcement (fail-open); set PORTER_SANDBOX_EGRESS_PROXY_URL to the egress proxy to force sandbox traffic through it.",
);
}
- if (
- (env.SANDBOX_BACKEND === "porter" || env.SANDBOX_SECONDARY_BACKEND === "porter") &&
- !env.PORTER_SANDBOX_BASE_URL &&
- !(env.PORTER_DEPLOY_PROJECT_ID && env.PORTER_DEPLOY_CLUSTER_ID) &&
- !env.PORTER_CLUSTER_ID &&
- !env.KUBERNETES_SERVICE_HOST
- ) {
- throw new Error(
- "SANDBOX_BACKEND=porter requires PORTER_DEPLOY_PROJECT_ID and PORTER_DEPLOY_CLUSTER_ID (or PORTER_SANDBOX_BASE_URL, or PORTER_CLUSTER_ID) to locate the Porter sandbox API.",
- );
- }
- if (env.DEPLOY_PROVIDER === "porter") {
- if (!porterApiBaseUrl(env)) {
+ for (const [selected, label] of [
+ [porterSandboxSelected, "SANDBOX_BACKEND=porter"],
+ [env.DEPLOY_PROVIDER === "porter", "DEPLOY_PROVIDER=porter"],
+ ] as const) {
+ if (selected && !porterLocatorPresent(env)) {
throw new Error(
- "DEPLOY_PROVIDER=porter requires PORTER_DEPLOY_PROJECT_ID and PORTER_DEPLOY_CLUSTER_ID (or PORTER_SANDBOX_BASE_URL) to locate the Porter sandbox API.",
+ `${label} requires PORTER_DEPLOY_PROJECT_ID and PORTER_DEPLOY_CLUSTER_ID (or PORTER_SANDBOX_BASE_URL, or PORTER_CLUSTER_ID) to locate the Porter sandbox API.`,
);
}
}
diff --git a/src/deploy/porter-deploy-provider.ts b/src/deploy/porter-deploy-provider.ts
index e7de68a0b..0943765ab 100644
--- a/src/deploy/porter-deploy-provider.ts
+++ b/src/deploy/porter-deploy-provider.ts
@@ -9,14 +9,17 @@ import {
createPorterClient,
createPorterExec,
ensurePorterVolume,
+ listPorterSandboxes,
+ porterDnsLabel,
porterPhaseSettled,
+ retirePorterBody,
waitPorterRunning,
type PorterClientLike,
type PorterSandboxLike,
} from "../sandbox/porter-client.ts";
import { createMemoryMap, type DurableMap } from "../persistence/durable-map.ts";
import { createNoopAdvisoryLock, type AdvisoryLock } from "../persistence/advisory-lock.ts";
-import { createKeyedQueue, sleep } from "../util/async.ts";
+import { createKeyedQueue } from "../util/async.ts";
import { shq } from "../util/shell.ts";
import { swallow } from "../util/errors.ts";
@@ -29,8 +32,6 @@ const APP_PORT_DEFAULT = 8080;
const ENDPOINT_PORT = 443;
const APP_READY_WINDOW_SEC_DEFAULT = 60;
const APP_START_EXEC_TIMEOUT_SEC = 60;
-const RETIRE_DEADLINE_MS = 120_000;
-const RETIRE_POLL_MS = 1_000;
const RESOLVE_CACHE_MS_DEFAULT = 15_000;
const RESOLVE_CACHE_MAX = 500;
const KIND_TAG = "qm-kind";
@@ -87,7 +88,8 @@ export function createPorterDeployProvider(opts: PorterDeployProviderOptions): D
const baseName = (d: Deployment): string => `${prefix}-app-${d.id.slice(0, 12).toLowerCase()}`;
const volumeName = (d: Deployment): string => `${baseName(d)}-data`;
- const domainOf = (d: Deployment): string | undefined => (appsDomain ? `${d.name ?? d.id}.${appsDomain}` : undefined);
+ const domainOf = (d: Deployment): string | undefined =>
+ appsDomain ? `${porterDnsLabel(d.name ?? d.id)}.${appsDomain}` : undefined;
const endpointOf = (host: string): DeployEndpoint => ({
host,
port: ENDPOINT_PORT,
@@ -99,22 +101,12 @@ export function createPorterDeployProvider(opts: PorterDeployProviderOptions): D
queue(d.id, () => advisoryLock.withLock(`porter-deploy:${d.id}`, fn));
async function liveBodies(d: Deployment): Promise<PorterSandboxLike[]> {
- const found = await client.sandboxes.list({ tags: { [DEPLOY_TAG]: d.id } });
+ const found = await listPorterSandboxes(client, { [DEPLOY_TAG]: d.id });
return found.filter((b) => !porterPhaseSettled(b.phase));
}
async function retireBodies(d: Deployment, drain: boolean): Promise<void> {
- for (const b of await liveBodies(d)) {
- await b.terminate().catch((e) => {
- if (!(e instanceof NotFoundError)) throw e;
- });
- }
- if (!drain) return;
- const deadline = Date.now() + RETIRE_DEADLINE_MS;
- while ((await liveBodies(d)).length > 0) {
- if (Date.now() > deadline) throw new Error(`porter deploy ${d.id}: previous body did not terminate in time`);
- await sleep(RETIRE_POLL_MS);
- }
+ for (const b of await liveBodies(d)) await retirePorterBody(b, drain);
}
function appEnv(version: DeploymentVersion): Record<string, string> {
@@ -164,7 +156,7 @@ export function createPorterDeployProvider(opts: PorterDeployProviderOptions): D
apply: (d, version) =>
serialized(d, async () => {
resolveCache.delete(d.id);
- const volumeId = await ensurePorterVolume(client, volumeName(d));
+ const { id: volumeId } = await ensurePorterVolume(client, volumeName(d));
await retireBodies(d, true);
await store.delete(d.id).catch((e) => swallow("porter-deploy: clear stale pointer", e));
const name = `${baseName(d)}-${randomUUID().slice(0, 5)}`;
diff --git a/src/deployment/secret-schema.ts b/src/deployment/secret-schema.ts
index 31b188c8c..f33aca418 100644
--- a/src/deployment/secret-schema.ts
+++ b/src/deployment/secret-schema.ts
@@ -53,10 +53,8 @@ const GATE_PREDICATES: Readonly<Record<SecretGate, (env: NodeJS.ProcessEnv) => b
postgres: (env) => env.SESSION_STORE === "postgres" || env.RUN_STORE === "postgres",
sprites: (env) => env.SANDBOX_BACKEND === "sprites" || env.SANDBOX_SECONDARY_BACKEND === "sprites",
smolmachines: (env) => env.SANDBOX_BACKEND === "smolmachines" || env.SANDBOX_SECONDARY_BACKEND === "smolmachines",
- porter: (env) =>
- (env.SANDBOX_BACKEND === "porter" || env.SANDBOX_SECONDARY_BACKEND === "porter") &&
- !env.PORTER_DEPLOY_API_TOKEN,
- "porter-deploy": (env) => env.DEPLOY_PROVIDER === "porter" && !env.PORTER_SANDBOX_TOKEN,
+ porter: (env) => env.SANDBOX_BACKEND === "porter" || env.SANDBOX_SECONDARY_BACKEND === "porter",
+ "porter-deploy": (env) => env.DEPLOY_PROVIDER === "porter",
"fly-sandbox": (env) => env.SANDBOX_BACKEND === "fly",
"fly-deploy": (env) => env.DEPLOY_PROVIDER === "fly",
"aws-deploy-gate": (env) => Boolean(env.AWS_DEPLOY_APPS_DOMAIN),
diff --git a/src/sandbox/porter-client.ts b/src/sandbox/porter-client.ts
index 2d70ee192..bf4a6709f 100644
--- a/src/sandbox/porter-client.ts
+++ b/src/sandbox/porter-client.ts
@@ -3,6 +3,7 @@ import { Porter, NotFoundError, SandboxError } from "porter-sandbox";
import { sleep } from "../util/async.ts";
import { swallowAs } from "../util/errors.ts";
import { shq } from "../util/shell.ts";
+import { shortHash } from "../util/crypto.ts";
import type { ExecResult } from "./sandbox.ts";
const MISSING_RC = 44;
@@ -11,6 +12,8 @@ const WRITE_CHUNK_B64 = 64 * 1024;
const EXIT_GRACE_MS = 60_000;
const CREATE_DEADLINE_MS = 180_000;
const CREATE_POLL_MS = 500;
+const RETIRE_DEADLINE_MS = 120_000;
+const RETIRE_POLL_MS = 500;
export interface PorterSandboxLike {
readonly id: string;
@@ -36,7 +39,7 @@ export interface PorterClientLike {
sandboxes: {
create(spec: PorterSandboxSpec): Promise<PorterSandboxLike>;
get(name: string): Promise<PorterSandboxLike>;
- list(options?: { tags?: Record<string, string> }): Promise<PorterSandboxLike[]>;
+ list(options?: { tags?: Record<string, string>; page?: number }): Promise<PorterSandboxLike[]>;
raw: {
get(id: string): Promise<{ phase: string; host?: string }>;
exec(
@@ -97,12 +100,46 @@ export function createPorterClient(opts: { token?: string; baseUrl?: string }):
);
}
-export async function ensurePorterVolume(client: PorterClientLike, name: string): Promise<string> {
+export const porterSlug = (prefix: string, id: string): string => {
+ const cleaned = id
+ .toLowerCase()
+ .replace(/[^a-z0-9-]+/g, "-")
+ .replace(/^-+|-+$/g, "");
+ return `${prefix}-${cleaned.slice(0, 28).replace(/-+$/, "") || "scope"}-${shortHash(id)}`;
+};
+
+export const porterDnsLabel = (name: string): string => {
+ const cleaned = name
+ .toLowerCase()
+ .replace(/[^a-z0-9-]+/g, "-")
+ .replace(/^-+|-+$/g, "");
+ if (cleaned === name && cleaned.length <= 63) return cleaned;
+ return `${cleaned.slice(0, 56).replace(/-+$/, "") || "app"}-${shortHash(name)}`;
+};
+
+export async function ensurePorterVolume(
+ client: PorterClientLike,
+ name: string,
+): Promise<{ id: string; created: boolean }> {
try {
- return (await client.volumes.get(name)).id;
+ return { id: (await client.volumes.get(name)).id, created: false };
} catch (e) {
if (!(e instanceof NotFoundError)) throw e;
- return (await client.volumes.create({ name })).id;
+ return { id: (await client.volumes.create({ name })).id, created: true };
+ }
+}
+
+export async function listPorterSandboxes(
+ client: PorterClientLike,
+ tags: Record<string, string>,
+): Promise<PorterSandboxLike[]> {
+ const all: PorterSandboxLike[] = [];
+ const seen = new Set<string>();
+ for (let page = 1; ; page++) {
+ const fresh = (await client.sandboxes.list({ tags, page })).filter((b) => !seen.has(b.id));
+ if (fresh.length === 0) return all;
+ for (const b of fresh) seen.add(b.id);
+ all.push(...fresh);
}
}
@@ -110,6 +147,30 @@ const SETTLED_PHASES = new Set(["succeeded", "failed", "terminated"]);
export const porterPhaseSettled = (phase: string | null): boolean => SETTLED_PHASES.has(phase ?? "");
+export async function retirePorterBody(sb: PorterSandboxLike, drain: boolean): Promise<void> {
+ const gone = (e: unknown): boolean => e instanceof NotFoundError;
+ if (porterPhaseSettled(sb.phase)) return;
+ try {
+ await sb.terminate();
+ } catch (e) {
+ if (gone(e)) return;
+ throw e;
+ }
+ if (!drain) return;
+ const deadline = Date.now() + RETIRE_DEADLINE_MS;
+ while (!porterPhaseSettled(sb.phase)) {
+ if (Date.now() > deadline)
+ throw new Error(`porter sandbox ${sb.id} did not terminate within ${RETIRE_DEADLINE_MS}ms`);
+ await sleep(RETIRE_POLL_MS);
+ try {
+ await sb.refresh();
+ } catch (e) {
+ if (gone(e)) return;
+ throw e;
+ }
+ }
+}
+
export async function waitPorterRunning(name: string, sb: PorterSandboxLike): Promise<void> {
const deadline = Date.now() + CREATE_DEADLINE_MS;
while (sb.phase !== "running") {
diff --git a/src/sandbox/porter-sandbox.ts b/src/sandbox/porter-sandbox.ts
index 636d9d143..50fd9fbe5 100644
--- a/src/sandbox/porter-sandbox.ts
+++ b/src/sandbox/porter-sandbox.ts
@@ -9,7 +9,10 @@ import {
createPorterClient,
createPorterExec,
ensurePorterVolume,
+ listPorterSandboxes,
porterPhaseSettled,
+ porterSlug,
+ retirePorterBody,
waitPorterRunning,
type PorterClientLike,
type PorterSandboxLike,
@@ -33,7 +36,6 @@ import {
import { BLOB_TRANSFER_AUD, mintCapabilityToken } from "../auth/capability-token.ts";
import type { BlobTransferStore } from "../persistence/blob-transfer.ts";
import { CAPABILITY_HEADER } from "../api/contract.ts";
-import { shortHash } from "../util/crypto.ts";
import { killableScript, killScript } from "./exec-kill.ts";
import { visibleNotInstalled, visibleTools } from "./sandbox.ts";
import type {
@@ -83,13 +85,7 @@ export interface PorterSandboxOptions {
onError?: (e: { category: string; code: string; message: string; scopeLabel?: string }) => void;
}
-export const porterScopeSlug = (prefix: string, id: string): string => {
- const cleaned = id
- .toLowerCase()
- .replace(/[^a-z0-9-]+/g, "-")
- .replace(/^-+|-+$/g, "");
- return `${prefix}-${cleaned.slice(0, 28).replace(/-+$/, "") || "scope"}-${shortHash(id)}`;
-};
+export const porterScopeSlug = porterSlug;
const bodyName = (slug: string): string => `${slug}-${randomUUID().slice(0, 5)}`;
@@ -113,7 +109,7 @@ export function createPorterSandbox(workspace: WorkspaceStore, opts: PorterSandb
const bodies = new Map<string, BodyEntry>();
const scopeByBody = new Map<string, string>();
- const scratchKeyByName = new Map<string, string>();
+ const scratchSlugByName = new Map<string, string>();
const activeScratch = new Map<string, number>();
async function liveBody(slug: string): Promise<BodyEntry | null> {
@@ -126,7 +122,7 @@ export function createPorterSandbox(workspace: WorkspaceStore, opts: PorterSandb
if (bodies.has(slug) && cached.sb.phase === "running") return cached;
bodies.delete(slug);
}
- const found = await client.sandboxes.list({ tags: { [SCOPE_TAG]: slug } });
+ const found = await listPorterSandboxes(client, { [SCOPE_TAG]: slug });
const live =
found.find((b) => b.phase === "running") ?? found.find((b) => b.phase === "creating" || b.phase === "queued");
if (!live) return null;
@@ -173,10 +169,9 @@ export function createPorterSandbox(workspace: WorkspaceStore, opts: PorterSandb
return provisionQueue(scope, () =>
advisoryLock.withLock(`porter-provision:${scope}`, async () => {
const volumeName = `${slug}-home`;
- let volumeId: string;
- let freshVolume = false;
+ let volume: { id: string; created: boolean };
try {
- volumeId = await ensurePorterVolume(client, volumeName);
+ volume = await ensurePorterVolume(client, volumeName);
} catch (e) {
throw new Error(`porter volume ${volumeName}: ${errMessage(e)}`, { cause: e });
}
@@ -188,44 +183,37 @@ export function createPorterSandbox(workspace: WorkspaceStore, opts: PorterSandb
scopeByBody.set(existing.name, scope);
return { name: existing.name, coldStart: false };
}
- await existing.sb.terminate().catch(swallowAs("porter-sandbox: egress rotate terminate", undefined));
bodies.delete(slug);
- } else {
- freshVolume = await volumeIsEmpty(slug, volumeName);
+ await retirePorterBody(existing.sb, true);
}
try {
onStatus?.("Starting your computer…");
} catch (error) {
void error;
}
- const ref = await createBody(slug, egressMode, { mountPath: homeDir, id: volumeId });
+ const ref = await createBody(slug, egressMode, { mountPath: homeDir, id: volume.id });
scopeByBody.set(ref.name, scope);
- return { name: ref.name, coldStart: freshVolume };
+ return { name: ref.name, coldStart: volume.created };
}),
);
}
- const knownVolumes = new Set<string>();
- async function volumeIsEmpty(slug: string, volumeName: string): Promise<boolean> {
- if (knownVolumes.has(volumeName)) return false;
- knownVolumes.add(volumeName);
- const found = await client.sandboxes.list({ tags: { [SCOPE_TAG]: slug } });
- return found.length === 0;
- }
-
- async function ensureScratch(key: string): Promise<{ name: string; coldStart: boolean }> {
- const slug = porterScopeSlug(`${prefix}-scratch`, key);
- return provisionQueue(`scratch:${key}`, async () => {
+ async function ensureScratch(
+ key: string,
+ egressMode: "proxy" | "open",
+ ): Promise<{ name: string; coldStart: boolean }> {
+ const slug = porterScopeSlug(`${prefix}-scratch-${egressMode}`, key);
+ return provisionQueue(`scratch:${slug}`, async () => {
const active = activeScratch.get(slug) ?? 0;
if (active === 0) {
const stale = await liveBody(slug);
- if (stale) await stale.sb.terminate().catch(swallowAs("porter-sandbox: stale scratch terminate", undefined));
bodies.delete(slug);
- await createBody(slug, egressProxyHost ? "proxy" : "open", undefined, "scratch");
+ if (stale) await retirePorterBody(stale.sb, false);
+ await createBody(slug, egressMode, undefined, "scratch");
}
const ref = bodies.get(slug);
if (!ref) throw new Error(`porter scratch ${slug} vanished during provision`);
- scratchKeyByName.set(ref.name, key);
+ scratchSlugByName.set(ref.name, slug);
activeScratch.set(slug, active + 1);
return { name: ref.name, coldStart: active === 0 };
});
@@ -348,7 +336,7 @@ export function createPorterSandbox(workspace: WorkspaceStore, opts: PorterSandb
let name: string;
let coldStart: boolean;
if (scratch) {
- ({ name, coldStart } = await ensureScratch(scratch.key));
+ ({ name, coldStart } = await ensureScratch(scratch.key, forceEgress ? "proxy" : "open"));
} else {
({ name, coldStart } = await ensureScopeBody(scope, forceEgress ? "proxy" : "open", provOpts?.onStatus));
}
@@ -434,9 +422,8 @@ export function createPorterSandbox(workspace: WorkspaceStore, opts: PorterSandb
let machine = "no computer";
let name: string | undefined;
try {
- const found = await client.sandboxes.list({ tags: { [SCOPE_TAG]: slug } });
- const live =
- found.find((b) => b.phase === "running") ?? found.find((b) => !porterPhaseSettled(b.phase)) ?? found[0];
+ const found = await listPorterSandboxes(client, { [SCOPE_TAG]: slug });
+ const live = found.find((b) => b.phase === "running") ?? found.find((b) => !porterPhaseSettled(b.phase));
if (live) {
machine = live.phase ?? "unknown";
if (machine === "running") name = (await live.refresh()).name;
@@ -459,17 +446,13 @@ export function createPorterSandbox(workspace: WorkspaceStore, opts: PorterSandb
const slug = porterScopeSlug(prefix, scopeId);
return provisionQueue(scopeId, () =>
advisoryLock.withLock(`porter-provision:${scopeId}`, async () => {
- const found = await client.sandboxes.list({ tags: { [SCOPE_TAG]: slug } });
+ const found = await listPorterSandboxes(client, { [SCOPE_TAG]: slug });
const live = found.filter((b) => !porterPhaseSettled(b.phase));
const egressMode = live.some((b) => b.tags?.[EGRESS_TAG] === "proxy") ? "proxy" : "open";
- for (const b of live) {
- await b.terminate().catch((e) => {
- if (!(e instanceof NotFoundError)) throw e;
- });
- }
bodies.delete(slug);
- const volumeId = await ensurePorterVolume(client, `${slug}-home`);
- const ref = await createBody(slug, egressMode, { mountPath: homeDir, id: volumeId });
+ for (const b of live) await retirePorterBody(b, true);
+ const volume = await ensurePorterVolume(client, `${slug}-home`);
+ const ref = await createBody(slug, egressMode, { mountPath: homeDir, id: volume.id });
scopeByBody.set(ref.name, scopeId);
}),
);
@@ -477,9 +460,8 @@ export function createPorterSandbox(workspace: WorkspaceStore, opts: PorterSandb
async teardown(handle, tdOpts?: TeardownOptions): Promise<void> {
if (handle.scratch) {
- const key = scratchKeyByName.get(handle.id);
- const slug = key ? porterScopeSlug(`${prefix}-scratch`, key) : handle.id;
- return provisionQueue(key ? `scratch:${key}` : handle.id, async () => {
+ const slug = scratchSlugByName.get(handle.id) ?? handle.id;
+ return provisionQueue(`scratch:${slug}`, async () => {
const remaining = (activeScratch.get(slug) ?? 1) - 1;
if (remaining > 0) {
activeScratch.set(slug, remaining);
@@ -494,8 +476,9 @@ export function createPorterSandbox(workspace: WorkspaceStore, opts: PorterSandb
if (e instanceof NotFoundError) return null;
throw e;
}));
- if (tdOpts?.destroy) await target?.terminate();
- else await target?.terminate().catch(swallowAs("porter-sandbox: scratch terminate", undefined));
+ if (!target) return;
+ if (tdOpts?.destroy) await retirePorterBody(target, false);
+ else await retirePorterBody(target, false).catch(swallowAs("porter-sandbox: scratch terminate", undefined));
});
}
if (!tdOpts?.destroy) return;
@@ -512,7 +495,7 @@ export function createPorterSandbox(workspace: WorkspaceStore, opts: PorterSandb
throw e;
}));
const slug = target?.tags?.[SCOPE_TAG] ?? cachedSlug;
- await target?.terminate();
+ if (target) await retirePorterBody(target, true);
if (slug) await client.volumes.delete(`${slug}-home`);
} catch (e) {
opts.onError?.({
diff --git a/src/wiring.ts b/src/wiring.ts
index dfdc0a30a..76a95da4b 100644
--- a/src/wiring.ts
+++ b/src/wiring.ts
@@ -997,9 +997,7 @@ export function buildApp(
const buildAwsDeploy = (): DeployProvider =>
createAwsDeployProvider({
...config.awsDeploy,
- ...(!config.awsDeploy.dataBucket && config.awsSandbox.s3Bucket
- ? { dataBucket: config.awsSandbox.s3Bucket }
- : {}),
+ ...(!config.awsDeploy.dataBucket && config.awsSandbox.s3Bucket ? { dataBucket: config.awsSandbox.s3Bucket } : {}),
advisoryLock,
store: artifactMap<StoredDeployBody>("aws_deploy_bodies"),
});
diff --git a/test/config.test.ts b/test/config.test.ts
index 7f166c417..3654a3455 100644
--- a/test/config.test.ts
+++ b/test/config.test.ts
@@ -497,3 +497,21 @@ test("DEPLOY_PROVIDER=porter refuses to boot without a cluster and tolerates a m
test("an unknown DEPLOY_PROVIDER still falls back to docker", () => {
assert.equal(loadConfig({ DEPLOY_PROVIDER: "nope" }).deployProvider, "docker");
});
+
+test("SANDBOX_BACKEND=porter locates the API the same way the deploy provider does and keeps its own token", () => {
+ assert.throws(
+ () => loadConfig({ SANDBOX_BACKEND: "porter", PORTER_SANDBOX_TOKEN: "tok" }),
+ /PORTER_DEPLOY_PROJECT_ID/,
+ );
+ const inCluster = loadConfig({
+ SANDBOX_BACKEND: "porter",
+ DEPLOY_PROVIDER: "porter",
+ PORTER_SANDBOX_TOKEN: "sb-tok",
+ PORTER_DEPLOY_API_TOKEN: "dep-tok",
+ PORTER_CLUSTER_ID: "3",
+ PORTER_SANDBOX_TTL_SEC: "120",
+ });
+ assert.equal(inCluster.porterSandbox.token, "sb-tok");
+ assert.equal(inCluster.porterSandbox.ttlSec, 120);
+ assert.equal(inCluster.porterDeploy.token, "dep-tok");
+});
diff --git a/test/porter-deploy-provider.test.ts b/test/porter-deploy-provider.test.ts
index 145accff4..90f201355 100644
--- a/test/porter-deploy-provider.test.ts
+++ b/test/porter-deploy-provider.test.ts
@@ -256,3 +256,12 @@ test("without an apps domain the cluster-assigned hostname becomes the URL", asy
assert.deepEqual(await bare.resolveEndpoint!({ ...d, endpoint }, version({}, "")), endpoint);
assert.match(await fetchText("/"), /^hello from/);
});
+
+test("deployment names become DNS labels and ids become sandbox-safe names", async () => {
+ const d = deployment("dep-9", "My_App.v2");
+ const endpoint = await provider.apply(d, version({ "server.js": SERVER }, "node server.js"));
+ assert.match(endpoint.host, /^my-app-v2-[0-9a-f]{6}\.apps\.test$/);
+ const body = fake.bodies().find((b) => b.phase === "running")!;
+ assert.match(body.name, /^qmt-app-dep-9-/);
+ assert.deepEqual(fake.volumeNames(), ["qmt-app-dep-9-data"]);
+});
diff --git a/test/porter-sandbox.test.ts b/test/porter-sandbox.test.ts
index 4d7ea1f2a..2350cca96 100644
--- a/test/porter-sandbox.test.ts
+++ b/test/porter-sandbox.test.ts
@@ -187,3 +187,80 @@ test("porter API errors surface the response body detail, not just the status",
},
);
});
+
+test("destroy waits for a slowly terminating body before deleting its volume", async () => {
+ fake = installFakePorter({ terminateLag: 1 });
+ sandbox = make();
+ const h = await sandbox.provision(layers);
+ const errors: string[] = [];
+ const observed = make({ onError: (e: { message: string }) => errors.push(e.message) });
+ await observed.teardown(h, { destroy: true });
+ assert.deepEqual(errors, []);
+ assert.equal(fake.volumeNames().length, 0);
+ assert.equal(fake.bodies().filter((b) => b.phase !== "terminated").length, 0);
+});
+
+test("restart and egress rotation drain the old body before mounting the volume again", async () => {
+ fake = installFakePorter({ terminateLag: 1 });
+ const proxied = make({ egressProxyUrl: "https://egress.qm.internal:48080" });
+ const h1 = await proxied.provision(layers);
+ await proxied.writeFile(h1, "keep.txt", "kept");
+ await proxied.restartComputer!(scope);
+ const h2 = await proxied.provision(layers, { egressToken: "tok" });
+ assert.notEqual(h2.id, h1.id);
+ assert.equal(h2.coldStart, false);
+ assert.equal(await proxied.readFile(h2, "keep.txt"), "kept");
+ const running = fake.bodies().filter((b) => b.phase === "running");
+ assert.equal(running.length, 1);
+ assert.equal(running[0]!.tags["qm-egress"], "proxy");
+});
+
+test("scratch bodies without an egress token stay open even when a proxy is configured", async () => {
+ const proxied = make({ egressProxyUrl: "https://egress.qm.internal:48080" });
+ const h = await proxied.provision(layers, { scratch: { key: "k-open" } });
+ assert.equal(h.env, undefined);
+ const body = fake.bodies().find((b) => b.name === h.id)!;
+ assert.equal(body.tags["qm-egress"], "open");
+ assert.equal(body.egress, undefined);
+ await proxied.teardown(h);
+ const hp = await proxied.provision(layers, { scratch: { key: "k-proxy" }, egressToken: "tok" });
+ assert.match(hp.env?.HTTPS_PROXY ?? "", /tok@/);
+ assert.deepEqual(fake.bodies().find((b) => b.name === hp.id)!.egress, ["egress.qm.internal"]);
+});
+
+test("a running body past the first list page is still found", async () => {
+ fake = installFakePorter({ pageSize: 1 });
+ sandbox = make();
+ const h1 = await sandbox.provision(layers);
+ await sandbox.restartComputer!(scope);
+ await sandbox.restartComputer!(scope);
+ assert.equal(fake.bodies().length, 3);
+ const fresh = make();
+ const h2 = await fresh.provision(layers);
+ assert.notEqual(h2.id, h1.id);
+ assert.equal(fake.bodies().filter((b) => b.phase === "running").length, 1);
+ assert.deepEqual(await fresh.computerStatus!(scope), { machine: "running", guestResponsive: true });
+});
+
+test("computerStatus reports no computer once every body is retired", async () => {
+ const h = await sandbox.provision(layers);
+ await sandbox.teardown(h, { destroy: true });
+ assert.deepEqual(await sandbox.computerStatus!(scope), { machine: "no computer", guestResponsive: false });
+});
+
+test("coldStart tracks whether the home volume was just created", async () => {
+ await fake.client.volumes.create({ name: `${slug}-home` });
+ const h = await sandbox.provision(layers);
+ assert.equal(h.coldStart, false);
+});
+
+test("scratch bodies never share across egress modes", async () => {
+ const proxied = make({ egressProxyUrl: "https://egress.qm.internal:48080" });
+ const open = await proxied.provision(layers, { scratch: { key: "shared" } });
+ const locked = await proxied.provision(layers, { scratch: { key: "shared" }, egressToken: "tok" });
+ assert.notEqual(open.id, locked.id);
+ assert.deepEqual(fake.bodies().find((b) => b.name === locked.id)!.egress, ["egress.qm.internal"]);
+ await proxied.teardown(open);
+ await proxied.teardown(locked);
+ assert.equal(fake.bodies().filter((b) => b.phase === "running").length, 0);
+});
diff --git a/test/secret-schema-drift.test.ts b/test/secret-schema-drift.test.ts
index 22ac2a0b6..5aec612f1 100644
--- a/test/secret-schema-drift.test.ts
+++ b/test/secret-schema-drift.test.ts
@@ -104,13 +104,13 @@ test("porter sandbox backend requires PORTER_SANDBOX_TOKEN", () => {
assert.ok(!ok.includes("PORTER_SANDBOX_TOKEN"));
});
-test("porter deploy provider requires PORTER_DEPLOY_API_TOKEN unless the sandbox token is present", () => {
- assert.ok(
- validateCoreSecretEnv({ DEPLOY_PROVIDER: "porter" } as NodeJS.ProcessEnv).includes("PORTER_DEPLOY_API_TOKEN"),
+test("each porter role demands its own token, matching the CLI's unconditional env-equals rules", () => {
+ assert.deepEqual(
+ validateCoreSecretEnv({ DEPLOY_PROVIDER: "porter", PORTER_SANDBOX_TOKEN: "t" } as NodeJS.ProcessEnv),
+ ["PORTER_DEPLOY_API_TOKEN"],
);
- assert.ok(
- !validateCoreSecretEnv({ DEPLOY_PROVIDER: "porter", PORTER_SANDBOX_TOKEN: "t" } as NodeJS.ProcessEnv).includes(
- "PORTER_DEPLOY_API_TOKEN",
- ),
+ assert.deepEqual(
+ validateCoreSecretEnv({ SANDBOX_BACKEND: "porter", PORTER_DEPLOY_API_TOKEN: "t" } as NodeJS.ProcessEnv),
+ ["PORTER_SANDBOX_TOKEN"],
);
});
diff --git a/test/support/fake-porter.ts b/test/support/fake-porter.ts
index 63aafa139..a4a466d3c 100644
--- a/test/support/fake-porter.ts
+++ b/test/support/fake-porter.ts
@@ -17,6 +17,7 @@ export interface FakePorterBody {
export interface FakePorterOptions {
terminateLag?: number;
+ pageSize?: number;
}
export interface FakePorter {
@@ -143,6 +144,10 @@ export function installFakePorter(opts: FakePorterOptions = {}): FakePorter {
for (const [guest, volId] of Object.entries(spec.volume_mounts ?? {})) {
const vol = volumeById(volId);
if (!vol) throw new Error(`fake porter: unknown volume ${volId}`);
+ const holder = [...bodies.values()].find(
+ (b) => b.phase !== "terminated" && Object.values(b.mounts).includes(vol.dir),
+ );
+ if (holder) throw new Error(`fake porter: volume ${volId} is still attached to a ${holder.phase} sandbox`);
mounts[guest] = vol.dir;
}
const homeVolumeId = spec.volume_mounts?.[GUEST_HOME];
@@ -175,9 +180,12 @@ export function installFakePorter(opts: FakePorterOptions = {}): FakePorter {
async list(options) {
const tags = options?.tags ?? {};
for (const b of bodies.values()) observe(b);
- return [...bodies.keys()]
- .filter((name) => Object.entries(tags).every(([k, v]) => bodies.get(name)!.tags[k] === v))
- .map((name) => sandboxOf(name));
+ const matching = [...bodies.keys()].filter((name) =>
+ Object.entries(tags).every(([k, v]) => bodies.get(name)!.tags[k] === v),
+ );
+ const pageSize = opts.pageSize ?? matching.length;
+ const page = options?.page ?? 1;
+ return matching.slice((page - 1) * pageSize, page * pageSize).map((name) => sandboxOf(name));
},
raw: {
async get(id) {