Upsun Source Operations API

These endpoints interact with source code operations as defined in the `source.operations` key in a project's `.upsun/config.yaml` configuration. More information on source code operations is [available in our user documentation](https://docs.upsun.com/anchors/app/source-operations/).

Operations 2

POST /projects/{projectId}/environments/{environmentId}/source-operation Trigger a source operation #
GET /projects/{projectId}/environments/{environmentId}/source-operations List source operations #

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-source-operations-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-source-operations-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Upsun.com Rest Source Operations 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: Source Operations
  description: 'These endpoints interact with source code operations as defined in the `source.operations`

    key in a project''s `.upsun/config.yaml` configuration. More information

    on source code operations is

    available in our user documentation.'
paths:
  /projects/{projectId}/environments/{environmentId}/source-operation:
    post:
      parameters:
      - in: path
        required: true
        schema:
          type: string
        name: projectId
      - in: path
        required: true
        schema:
          type: string
        name: environmentId
      operationId: run-source-operation
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AcceptedResponse'
      requestBody:
        description: ''
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnvironmentSourceOperationInput'
      tags:
      - Source Operations
      summary: Trigger a source operation
      description: 'This endpoint triggers a source code operation as defined in the `source.operations`

        key in a project''s `.upsun/config.yaml` configuration. More information

        on source code operations is

        available in our user documentation.'
  /projects/{projectId}/environments/{environmentId}/source-operations:
    get:
      parameters:
      - in: path
        required: true
        schema:
          type: string
        name: projectId
      - in: path
        required: true
        schema:
          type: string
        name: environmentId
      operationId: list-projects-environments-source-operations
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvironmentSourceOperationCollection'
      tags:
      - Source Operations
      summary: List source operations
      description: 'Lists all the source operations, defined in `.upsun/config.yaml`, that are available in an environment.

        More information on source code operations is

        available in our user documentation.'
components:
  schemas:
    EnvironmentSourceOperationInput:
      type: object
      properties:
        operation:
          type: string
          title: Operation name
          description: The name of the operation to execute
        variables:
          type: object
          additionalProperties:
            type: object
            additionalProperties: {}
          title: Variables
          description: The variables of the application.
      required:
      - operation
      - variables
      additionalProperties: false
    EnvironmentSourceOperationCollection:
      type: array
      items:
        $ref: '#/components/schemas/EnvironmentSourceOperation'
    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
    EnvironmentSourceOperation:
      type: object
      properties:
        id:
          type: string
          title: EnvironmentSourceOperation Identifier
          description: The identifier of EnvironmentSourceOperation
        app:
          type: string
          title: Application name
          description: The name of the application
        operation:
          type: string
          title: Source operation name
          description: The name of the source operation
        command:
          type: string
          title: Command
          description: The command that will be triggered
      required:
      - id
      - app
      - operation
      - command
      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