Encore Apps API

The Apps API from Encore — 5 operation(s) for apps.

OpenAPI Specification

encore-dev-apps-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Encore Framework Apps API
  version: '1.57'
  description: 'Conceptual OpenAPI describing the runtime HTTP surface that the Encore framework

    (Encore.ts and Encore.go) exposes for every Encore application. This is not a

    single hosted API — it is the per-application surface generated by the framework

    when an api() / //encore:api declaration is parsed. Real endpoints, paths, and

    schemas are app-specific.

    '
  contact:
    name: Encore
    url: https://encore.dev
  license:
    name: MPL-2.0
    url: https://github.com/encoredev/encore/blob/main/LICENSE
servers:
- url: http://localhost:4000
  description: Local Encore dev server (encore run)
- url: https://staging-{app-id}.encr.app
  description: Encore Cloud staging environment
  variables:
    app-id:
      default: example
- url: https://{app-id}.encr.app
  description: Encore Cloud production environment
  variables:
    app-id:
      default: example
tags:
- name: Apps
paths:
  /apps:
    get:
      operationId: listApps
      summary: List Encore Applications
      description: List Encore applications the caller has access to.
      responses:
        '200':
          description: List of Encore applications.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/App'
      tags:
      - Apps
  /apps/{app_id}/environments:
    parameters:
    - name: app_id
      in: path
      required: true
      schema:
        type: string
    get:
      operationId: listEnvironments
      summary: List Environments
      description: List environments (development, preview, staging, production) for an Encore application.
      responses:
        '200':
          description: List of environments.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Environment'
      tags:
      - Apps
  /apps/{app_id}/environments/{env}/deployments:
    parameters:
    - name: app_id
      in: path
      required: true
      schema:
        type: string
    - name: env
      in: path
      required: true
      schema:
        type: string
    get:
      operationId: listDeployments
      summary: List Deployments
      description: List deployments for an environment.
      responses:
        '200':
          description: Deployment history.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Deployment'
      tags:
      - Apps
    post:
      operationId: createDeployment
      summary: Trigger Deployment
      description: Trigger a new deployment of a commit to the named environment (equivalent to `git push encore`).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - commit
              properties:
                commit:
                  type: string
                  description: Git commit SHA to deploy.
      responses:
        '202':
          description: Deployment accepted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Deployment'
      tags:
      - Apps
  /apps/{app_id}/secrets:
    parameters:
    - name: app_id
      in: path
      required: true
      schema:
        type: string
    get:
      operationId: listSecrets
      summary: List Secrets
      description: List secret names declared by the application (values are never returned).
      responses:
        '200':
          description: Secret metadata.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SecretMeta'
      tags:
      - Apps
    put:
      operationId: setSecret
      summary: Set Secret Value
      description: Set or update a secret value for an environment.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - name
              - env
              - value
              properties:
                name:
                  type: string
                env:
                  type: string
                value:
                  type: string
      responses:
        '204':
          description: Secret stored.
      tags:
      - Apps
  /apps/{app_id}/traces:
    parameters:
    - name: app_id
      in: path
      required: true
      schema:
        type: string
    get:
      operationId: queryTraces
      summary: Query Distributed Traces
      description: Query distributed traces captured by Encore Cloud.
      parameters:
      - name: env
        in: query
        schema:
          type: string
      - name: limit
        in: query
        schema:
          type: integer
          default: 50
      responses:
        '200':
          description: Trace list.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Trace'
      tags:
      - Apps
components:
  schemas:
    App:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        framework:
          type: string
          enum:
          - encore.ts
          - encore.go
        repository:
          type: string
    Trace:
      type: object
      properties:
        trace_id:
          type: string
        root_span:
          type: string
        endpoint:
          type: string
        status:
          type: string
        duration_ms:
          type: number
        started_at:
          type: string
          format: date-time
    Deployment:
      type: object
      properties:
        id:
          type: string
        commit:
          type: string
        status:
          type: string
          enum:
          - queued
          - building
          - deploying
          - succeeded
          - failed
        created_at:
          type: string
          format: date-time
    SecretMeta:
      type: object
      properties:
        name:
          type: string
        environments:
          type: array
          items:
            type: string
    Environment:
      type: object
      properties:
        name:
          type: string
        type:
          type: string
          enum:
          - development
          - preview
          - staging
          - production
        cloud:
          type: string
          enum:
          - encore
          - aws
          - gcp
          - self-hosted
        region:
          type: string