Render Environment Variables API

Per-service environment variables and secret files.

Documentation

Specifications

Other Resources

OpenAPI Specification

render-com-environment-variables-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Render Blueprints Environment Variables API
  description: The Render REST API programmatically manages resources on the Render cloud application platform (PaaS). It exposes almost all of the functionality available in the Render Dashboard - services (web services, static sites, private services, background workers, cron jobs), deploys, custom domains, environment variables and groups, secret files, managed Postgres and Key Value (Redis-compatible) datastores, one-off jobs, persistent disks, Blueprints, projects and environments, workspaces and members, registry credentials, metrics, logs, and webhooks. All requests are authenticated with a Bearer API key created in the Render Dashboard. Real-time log streaming is available over a WebSocket surface (see the companion AsyncAPI document). This OpenAPI document models the REST surface; a subset of endpoints is confirmed against Render's public API reference and the remainder follow Render's documented, consistent REST conventions.
  version: '1.0'
  contact:
    name: Render
    url: https://render.com
  license:
    name: Proprietary
    url: https://render.com/terms
servers:
- url: https://api.render.com/v1
  description: Render Public API
security:
- bearerAuth: []
tags:
- name: Environment Variables
  description: Per-service environment variables and secret files.
paths:
  /services/{serviceId}/env-vars:
    parameters:
    - $ref: '#/components/parameters/ServiceId'
    get:
      operationId: listEnvVars
      tags:
      - Environment Variables
      summary: List environment variables
      responses:
        '200':
          description: A list of environment variables.
    put:
      operationId: replaceEnvVars
      tags:
      - Environment Variables
      summary: Replace environment variables
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                type: object
      responses:
        '200':
          description: The updated environment variables.
  /services/{serviceId}/env-vars/{envVarKey}:
    parameters:
    - $ref: '#/components/parameters/ServiceId'
    - name: envVarKey
      in: path
      required: true
      schema:
        type: string
    get:
      operationId: retrieveEnvVar
      tags:
      - Environment Variables
      summary: Retrieve an environment variable
      responses:
        '200':
          description: The requested environment variable.
    put:
      operationId: upsertEnvVar
      tags:
      - Environment Variables
      summary: Add or update an environment variable
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                value:
                  type: string
      responses:
        '200':
          description: The upserted environment variable.
    delete:
      operationId: deleteEnvVar
      tags:
      - Environment Variables
      summary: Delete an environment variable
      responses:
        '204':
          description: The environment variable was deleted.
  /services/{serviceId}/secret-files:
    parameters:
    - $ref: '#/components/parameters/ServiceId'
    get:
      operationId: listSecretFiles
      tags:
      - Environment Variables
      summary: List secret files
      responses:
        '200':
          description: A list of secret files.
    put:
      operationId: replaceSecretFiles
      tags:
      - Environment Variables
      summary: Replace secret files
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                type: object
      responses:
        '200':
          description: The updated secret files.
  /services/{serviceId}/secret-files/{secretFileName}:
    parameters:
    - $ref: '#/components/parameters/ServiceId'
    - name: secretFileName
      in: path
      required: true
      schema:
        type: string
    put:
      operationId: upsertSecretFile
      tags:
      - Environment Variables
      summary: Add or update a secret file
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          description: The upserted secret file.
    delete:
      operationId: deleteSecretFile
      tags:
      - Environment Variables
      summary: Delete a secret file
      responses:
        '204':
          description: The secret file was deleted.
components:
  parameters:
    ServiceId:
      name: serviceId
      in: path
      required: true
      schema:
        type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Render API key created in the Render Dashboard, sent as an Authorization Bearer token.