Release Environments API

The Environments API from Release — 6 operation(s) for environments.

OpenAPI Specification

release-environments-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Release.com Platform Accounts Environments API
  version: 1.0.0
  description: 'The Release.com Platform API provides REST endpoints for managing

    ephemeral environments, deployments, builds, clusters, and related

    infrastructure.


    **V1 scope:** Platform endpoints only. AI sandbox endpoints (`/ai/**`)

    are excluded from this version and will be added in a future iteration.

    '
  contact:
    name: Release.com
    url: https://release.com
  x-logo:
    url: https://api.release.com/release-logo.png
    backgroundColor: '#FFFFFF'
    altText: Release
servers:
- url: https://api.release.com
  description: Production
security:
- userEmail: []
  userToken: []
tags:
- name: Environments
paths:
  /apps/{app_id}/spaces/{id}/extend_expiration:
    put:
      tags:
      - Environments
      summary: Extend environment expiration
      operationId: spaces_extend_expiration
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Space'
        '401':
          description: Unauthorized — missing or invalid credentials
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      parameters:
      - name: app_id
        in: path
        required: true
        schema:
          type: string
        description: App ID (integer or hashid)
      - name: id
        in: path
        required: true
        schema:
          type: string
        description: Resource ID (integer or hashid)
  /apps/{app_id}/spaces/{id}/pause:
    post:
      tags:
      - Environments
      summary: Pause environment
      operationId: spaces_pause
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Space'
        '401':
          description: Unauthorized — missing or invalid credentials
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      parameters:
      - name: app_id
        in: path
        required: true
        schema:
          type: string
        description: App ID (integer or hashid)
      - name: id
        in: path
        required: true
        schema:
          type: string
        description: Resource ID (integer or hashid)
  /apps/{app_id}/spaces/{id}/resume:
    post:
      tags:
      - Environments
      summary: Resume environment
      operationId: spaces_resume
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Space'
        '401':
          description: Unauthorized — missing or invalid credentials
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      parameters:
      - name: app_id
        in: path
        required: true
        schema:
          type: string
        description: App ID (integer or hashid)
      - name: id
        in: path
        required: true
        schema:
          type: string
        description: Resource ID (integer or hashid)
  /apps/{app_id}/spaces/{id}/override_schedule:
    post:
      tags:
      - Environments
      summary: Override environment schedule
      operationId: spaces_override_schedule
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Space'
        '401':
          description: Unauthorized — missing or invalid credentials
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      parameters:
      - name: app_id
        in: path
        required: true
        schema:
          type: string
        description: App ID (integer or hashid)
      - name: id
        in: path
        required: true
        schema:
          type: string
        description: Resource ID (integer or hashid)
  /apps/{app_id}/spaces:
    get:
      tags:
      - Environments
      summary: List Spaces
      operationId: spaces_index
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Space'
        '401':
          description: Unauthorized — missing or invalid credentials
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      parameters:
      - name: app_id
        in: path
        required: true
        schema:
          type: string
        description: App ID (integer or hashid)
      - name: sort_key
        in: query
        schema:
          type: string
        description: Sort field
      - name: sort_order
        in: query
        schema:
          type: string
          enum:
          - asc
          - desc
        description: Sort direction
    post:
      tags:
      - Environments
      summary: Create Space
      operationId: spaces_create
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
        '401':
          description: Unauthorized — missing or invalid credentials
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      parameters:
      - name: app_id
        in: path
        required: true
        schema:
          type: string
        description: App ID (integer or hashid)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
  /apps/{app_id}/spaces/{id}:
    get:
      tags:
      - Environments
      summary: Get Space
      operationId: spaces_show
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Space'
        '401':
          description: Unauthorized — missing or invalid credentials
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      parameters:
      - name: app_id
        in: path
        required: true
        schema:
          type: string
        description: App ID (integer or hashid)
      - name: id
        in: path
        required: true
        schema:
          type: string
        description: Resource ID (integer or hashid)
    delete:
      tags:
      - Environments
      summary: Delete Space
      operationId: spaces_destroy
      responses:
        '200':
          description: Deleted
        '401':
          description: Unauthorized — missing or invalid credentials
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      parameters:
      - name: app_id
        in: path
        required: true
        schema:
          type: string
        description: App ID (integer or hashid)
      - name: id
        in: path
        required: true
        schema:
          type: string
        description: Resource ID (integer or hashid)
components:
  schemas:
    Space:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        permanent:
          type: boolean
        tracking_branch:
          type: string
        tracking_tag:
          type: string
        namespace:
          type: string
        mode:
          type: string
        deployment_strategy:
          type: string
        error_message:
          type: string
        production:
          type: boolean
        dependencies_status:
          type: string
        pool_id:
          type: string
        pool_cluster_id:
          type: string
        pool_name:
          type: string
        current_snapshot_id:
          type: string
        newest_snapshot_id:
          type: string
        aasm_state:
          type: string
        latest_deploy_id:
          type: integer
        env_id:
          type: string
        version:
          type: string
        latest_version:
          type: string
        digest_version:
          type: string
        latest_digest_version:
          type: string
        last_deployed_at:
          type: string
        connected:
          type: boolean
        expires_at:
          type: string
        expires_at_in_seconds:
          type: integer
        pull_request_title:
          type: string
        pull_request_url:
          type: string
        primary_display_url:
          type: string
        enabled:
          type: string
        orphaned_connected_space:
          type: boolean
    Error:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
        errors:
          type: array
          items:
            type: string
  securitySchemes:
    userEmail:
      type: apiKey
      in: header
      name: X-User-Email
      description: User's email address for authentication
    userToken:
      type: apiKey
      in: header
      name: X-User-Token
      description: User's authentication token (from ~/.release.yaml)
externalDocs:
  description: Release Documentation
  url: https://docs.release.com