Upsun Project Variables API

These endpoints manipulate user-defined variables which are bound to an entire project. These variables are accessible to all environments within a single project, and they can be made available at both build time and runtime. For more information on project variables, see the [Variables](https://docs.upsun.com/anchors/variables/set/project/create/) section of the documentation.

Business capability
Configuration & Secrets Management BC-4210.60

Operations 5

GET /projects/{projectId}/variables Get list of project variables #
POST /projects/{projectId}/variables Add a project variable #
GET /projects/{projectId}/variables/{projectVariableId} Get a project variable #
PATCH /projects/{projectId}/variables/{projectVariableId} Update a project variable #
DELETE /projects/{projectId}/variables/{projectVariableId} Delete a project variable #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/upsun-project-variables-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

upsun-project-variables-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Upsun.com Rest Project Variables API
  version: '1.0'
  contact:
    name: Support
    url: https://upsun.com/contact-us/
  termsOfService: https://upsun.com/trust-center/legal/tos/
  description: '# Introduction


    Upsun, formerly Platform.sh, is a container-based Platform-as-a-Service.'
  x-logo:
    url: https://docs.upsun.com/images/upsun-api.svg
    href: https://upsun.com/#section/Introduction
    altText: Upsun logo
servers:
- url: '{schemes}://api.upsun.com'
  description: The Upsun.com API gateway
  variables:
    schemes:
      default: https
security:
- OAuth2: []
tags:
- name: Project Variables
  description: 'These endpoints manipulate user-defined variables which are bound to an

    entire project. These variables are accessible to all environments

    within a single project, and they can be made available at both build

    time and runtime. For more information on project variables,

    see the Variables

    section of the documentation.'
paths:
  /projects/{projectId}/variables:
    get:
      parameters:
      - in: path
        required: true
        schema:
          type: string
        name: projectId
      operationId: list-projects-variables
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectVariableCollection'
      tags:
      - Project Variables
      summary: Get list of project variables
      description: 'Retrieve a list of objects representing the user-defined variables

        within a project.'
    post:
      parameters:
      - in: path
        required: true
        schema:
          type: string
        name: projectId
      operationId: create-projects-variables
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AcceptedResponse'
      requestBody:
        description: ''
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProjectVariableCreateInput'
      tags:
      - Project Variables
      summary: Add a project variable
      description: 'Add a variable to a project. The `value` can be either a string or a JSON

        object (default: string), as specified by the `is_json` boolean flag.

        See the Variables

        section in our documentation for more information.'
  /projects/{projectId}/variables/{projectVariableId}:
    get:
      parameters:
      - in: path
        required: true
        schema:
          type: string
        name: projectId
      - in: path
        required: true
        schema:
          type: string
        name: projectVariableId
      operationId: get-projects-variables
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectVariable'
      tags:
      - Project Variables
      summary: Get a project variable
      description: Retrieve a single user-defined project variable.
    patch:
      requestBody:
        description: ''
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProjectVariablePatch'
      parameters:
      - in: path
        required: true
        schema:
          type: string
        name: projectId
      - in: path
        required: true
        schema:
          type: string
        name: projectVariableId
      operationId: update-projects-variables
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AcceptedResponse'
      tags:
      - Project Variables
      summary: Update a project variable
      description: 'Update a single user-defined project variable.

        The `value` can be either a string or a JSON

        object (default: string), as specified by the `is_json` boolean flag.

        See the Variables

        section in our documentation for more information.'
    delete:
      parameters:
      - in: path
        required: true
        schema:
          type: string
        name: projectId
      - in: path
        required: true
        schema:
          type: string
        name: projectVariableId
      operationId: delete-projects-variables
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AcceptedResponse'
      tags:
      - Project Variables
      summary: Delete a project variable
      description: Delete a single user-defined project variable.
components:
  schemas:
    ProjectVariablePatch:
      type: object
      properties:
        name:
          type: string
          title: Name
          description: Name of the variable
        attributes:
          type: object
          additionalProperties:
            type: string
          title: Arbitrary attributes
          description: Arbitrary attributes attached to this resource
        value:
          type: string
          title: Value
          description: Value of the variable
        is_json:
          type: boolean
          title: Is JSON
          description: The variable is a JSON string
        is_sensitive:
          type: boolean
          title: Is Sensitive
          description: The variable is sensitive
        visible_build:
          type: boolean
          title: Visible during build
          description: The variable is visible during build
        visible_runtime:
          type: boolean
          title: Visible at runtime
          description: The variable is visible at runtime
        application_scope:
          type: array
          items:
            type: string
          title: Application Scope
          description: Applications that have access to this variable
      additionalProperties: false
    ProjectVariableCreateInput:
      type: object
      properties:
        name:
          type: string
          title: Name
          description: Name of the variable
        attributes:
          type: object
          additionalProperties:
            type: string
          title: Arbitrary attributes
          description: Arbitrary attributes attached to this resource
        value:
          type: string
          title: Value
          description: Value of the variable
        is_json:
          type: boolean
          title: Is JSON
          description: The variable is a JSON string
        is_sensitive:
          type: boolean
          title: Is Sensitive
          description: The variable is sensitive
        visible_build:
          type: boolean
          title: Visible during build
          description: The variable is visible during build
        visible_runtime:
          type: boolean
          title: Visible at runtime
          description: The variable is visible at runtime
        application_scope:
          type: array
          items:
            type: string
          title: Application Scope
          description: Applications that have access to this variable
      required:
      - name
      - value
      additionalProperties: false
    ProjectVariableCollection:
      type: array
      items:
        $ref: '#/components/schemas/ProjectVariable'
    ProjectVariable:
      type: object
      properties:
        id:
          type: string
          title: ProjectVariable Identifier
          description: The identifier of ProjectVariable
        created_at:
          type:
          - string
          - 'null'
          format: date-time
          title: Creation date
          description: The creation date
        updated_at:
          type:
          - string
          - 'null'
          format: date-time
          title: Update date
          description: The update date
        name:
          type: string
          title: Name
          description: Name of the variable
        attributes:
          type: object
          additionalProperties:
            type: string
          title: Arbitrary attributes
          description: Arbitrary attributes attached to this resource
        value:
          type: string
          title: Value
          description: Value of the variable
        is_json:
          type: boolean
          title: Is JSON
          description: The variable is a JSON string
        is_sensitive:
          type: boolean
          title: Is Sensitive
          description: The variable is sensitive
        visible_build:
          type: boolean
          title: Visible during build
          description: The variable is visible during build
        visible_runtime:
          type: boolean
          title: Visible at runtime
          description: The variable is visible at runtime
        application_scope:
          type: array
          items:
            type: string
          title: Application Scope
          description: Applications that have access to this variable
      required:
      - id
      - created_at
      - updated_at
      - name
      - attributes
      - is_json
      - is_sensitive
      - visible_build
      - visible_runtime
      - application_scope
      additionalProperties: false
    AcceptedResponse:
      type: object
      properties:
        status:
          type: string
          title: Status text
          description: The status text of the response
        code:
          type: integer
          title: Status code
          description: The status code of the response
      required:
      - status
      - code
      additionalProperties: false
  securitySchemes:
    OAuth2:
      type: oauth2
      flows:
        authorizationCode:
          tokenUrl: https://auth.api.platform.sh/oauth2/token
          refreshUrl: https://auth.api.platform.sh/oauth2/token
          scopes: {}
          authorizationUrl: https://auth.api.platform.sh/oauth2/authorize
      description: ''
    OAuth2Admin:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://auth.api.platform.sh/oauth2/token
          refreshUrl: ''
          scopes:
            admin: administrative operations
      description: ''
x-tagGroups:
- name: Organization Administration
  tags:
  - Organizations
  - Organization Members
  - Organization Invitations
  - Organization Projects
  - Add-ons
- name: Project Administration
  tags:
  - Project
  - Domain Management
  - Cert Management
  - Certificate Provisioner
  - Project Variables
  - Repository
  - Third-Party Integrations
  - Support
- name: Environments
  tags:
  - Environment
  - Environment Backups
  - Environment Type
  - Environment Variables
  - Routing
  - Source Operations
  - Runtime Operations
  - Deployment
  - Autoscaling
- name: User Activity
  tags:
  - Project Activity
  - Environment Activity
- name: Project Access
  tags:
  - Project Invitations
  - Teams
  - Team Access
  - User Access
- name: Account Management
  tags:
  - API Tokens
  - Connections
  - MFA
  - Users
  - User Profiles
  - SSH Keys
  - Plans
- name: Billing
  tags:
  - Organization Management
  - Subscriptions
  - Orders
  - Invoices
  - Discounts
  - Vouchers
  - Records
  - Profiles
- name: Global Info
  tags:
  - Project Discovery
  - References
  - Regions
- name: Internal APIs
  tags:
  - Project Settings
  - Environment Settings
  - Deployment Target
  - System Information
  - Container Profile