Upsun Environment API

On Upsun, an environment encompasses a single instance of your entire application stack, the services used by the application, the application's data storage, and the environment's backups. In general, an environment represents a single branch or merge request in the Git repository backing a project. It is a virtual cluster of read-only application and service containers with read-write mounts for application and service data. On Upsun, the default branch is your production environment—thus, merging changes to this branch will put those changes to production.

GitHub OpenAPI
Business capability
Environment Management BC-4210.20

Operations 19

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /projects/{projectId}/environments List a project's environments · Get list of project environments #
Ask an LLM
“What environments exist in my Platform.sh project?”
“Can I see the details of each environment in a project?”
Tell an agent
List the environments in project {projectId}.
Show every environment under project {projectId}.
GET /projects/{projectId}/environments/{environmentId} Get an environment's details · Get an environment #
Ask an LLM
“How do I look up one environment's details by its ID?”
“What type and access settings does a specific environment have?”
Tell an agent
Get environment {environmentId} in project {projectId}.
Show the details of environment {environmentId} of project {projectId}.
PATCH /projects/{projectId}/environments/{environmentId} Update an environment · Update an environment #
Ask an LLM
“Can I rename an environment or change its type?”
“Is it possible to clone parent data when renaming an environment?”
Tell an agent
Rename environment {environmentId} in project {projectId} to {name}.
Set the type of environment {environmentId} in project {projectId} to {type}.
DELETE /projects/{projectId}/environments/{environmentId} Delete an environment · Delete an environment #
Ask an LLM
“How do I permanently delete an environment?”
“Can I remove an environment I no longer need?”
Tell an agent destructive · confirm first
Delete environment {environmentId} from project {projectId}.
Permanently remove environment {environmentId} in project {projectId}.
POST /projects/{projectId}/environments/{environmentId}/activate Activate an environment · Activate an environment #
Ask an LLM
“How do I turn an inactive environment back on?”
“Can I reactivate an environment with a given set of resources?”
Tell an agent
Activate environment {environmentId} in project {projectId} with resources {resources}.
Bring environment {environmentId} of project {projectId} back online using {resources}.
POST /projects/{projectId}/environments/{environmentId}/branch Branch an environment · Branch an environment #
Ask an LLM
“How do I create a new environment as a branch of an existing one?”
“Can I clone an environment's data when branching it?”
Tell an agent
Branch environment {environmentId} in project {projectId} into a new {type} environment named {name} titled {title}, cloning {clone_parent}.
Create a {type} child environment {name} from {environmentId} in project {projectId} with title {title}, cloning {clone_parent}.
POST /projects/{projectId}/environments/{environmentId}/deactivate Deactivate an environment · Deactivate an environment #
Ask an LLM
“How do I stop an environment's services and data but keep the Git branch?”
“Will all data be lost when I deactivate an environment?”
Tell an agent destructive · confirm first
Deactivate environment {environmentId} in project {projectId}.
Stop all services on environment {environmentId} of project {projectId} but keep the branch.
POST /projects/{projectId}/environments/{environmentId}/deploy Deploy an environment · Deploy an environment #
Ask an LLM
“How do I manually deploy staged changes to an environment?”
“Can I choose a rolling or stop-start deployment strategy?”
Tell an agent
Deploy environment {environmentId} in project {projectId} using strategy {strategy}.
Release the staged changes in environment {environmentId} of project {projectId} with {strategy} strategy.
POST /projects/{projectId}/environments/{environmentId}/initialize Initialize a new environment from a repository · Initialize a new environment #
Ask an LLM
“How do I set up a new environment from an existing Git repository?”
“Can I add files to a repository when initializing an environment?”
Tell an agent
Initialize environment {environmentId} in project {projectId} from repository {repository} using profile {profile} and config {config}.
Set up a new environment {environmentId} in project {projectId} from {repository} with files {files}, profile {profile}, config {config}.
POST /projects/{projectId}/environments/{environmentId}/merge Merge an environment into its parent · Merge an environment #
Ask an LLM
“How do I merge a branch environment's changes into its parent?”
“Does merging an environment rebuild and redeploy the parent?”
Tell an agent
Merge environment {environmentId} in project {projectId} into its parent using resources {resources}.
Integrate the changes in environment {environmentId} of project {projectId} into the parent with {resources}.
POST /projects/{projectId}/environments/{environmentId}/pause Pause an environment · Pause an environment #
Ask an LLM
“How do I pause an environment to save resources?”
“Can I pause a development environment that hasn't been redeployed in a while?”
Tell an agent
Pause environment {environmentId} in project {projectId}.
Stop services on environment {environmentId} of project {projectId} but keep the router.
POST /projects/{projectId}/environments/{environmentId}/redeploy Redeploy an environment · Redeploy an environment #
Ask an LLM
“How do I trigger a redeployment of an environment?”
“Can I force an environment to rebuild its services?”
Tell an agent
Redeploy environment {environmentId} in project {projectId}.
Trigger a redeployment of environment {environmentId} of project {projectId}.
POST /projects/{projectId}/environments/{environmentId}/resume Resume a paused environment · Resume a paused environment #
Ask an LLM
“How do I restart a paused environment?”
“Can I bring a paused development environment back online?”
Tell an agent
Resume environment {environmentId} in project {projectId}.
Restart the services of paused environment {environmentId} in project {projectId}.
POST /projects/{projectId}/environments/{environmentId}/synchronize Synchronize an environment with its parent · Synchronize a child environment with its parent #
Ask an LLM
“How do I sync an environment's code and data with its parent?”
“Can I rebase an environment's code instead of merging it?”
Tell an agent
Synchronize environment {environmentId} in project {projectId} with its parent: code {synchronize_code}, rebase {rebase}, data {synchronize_data}, resources {synchronize_resources}.
Rebase and redeploy environment {environmentId} of project {projectId} with code {synchronize_code}, rebase {rebase}, data {synchronize_data}, resources {synchronize_resources}.
GET /projects/{projectId}/environments/{environmentId}/versions List an environment's versions · List versions associated with the environment #
Ask an LLM
“Which versions of my app are deployed in an environment?”
“What deployment target type does an environment support for staged rollout?”
Tell an agent
List the versions in environment {environmentId} of project {projectId}.
Show every app version deployed in environment {environmentId} in project {projectId}.
POST /projects/{projectId}/environments/{environmentId}/versions Create a version in an environment · Create versions associated with the environment #
Ask an LLM
“How do I add a new version to an environment?”
“Can I set routing for a version when creating it?”
Tell an agent
Create a version in environment {environmentId} of project {projectId}.
Add a version to environment {environmentId} in project {projectId} with routing {routing}.
GET /projects/{projectId}/environments/{environmentId}/versions/{versionId} Get an environment version · List the version #
Ask an LLM
“How do I look up one version of an environment?”
“Can I see the routing percentage for a single version?”
Tell an agent
Get version {versionId} in environment {environmentId} of project {projectId}.
Show routing for version {versionId} of environment {environmentId} in project {projectId}.
PATCH /projects/{projectId}/environments/{environmentId}/versions/{versionId} Update an environment version · Update the version #
Ask an LLM
“Can I change the routing of an existing version?”
“Is it possible to update a version's routing percentage?”
Tell an agent
Update version {versionId} in environment {environmentId} of project {projectId} with routing {routing}.
Change the routing of existing version {versionId} in environment {environmentId} in project {projectId} to {routing}.
DELETE /projects/{projectId}/environments/{environmentId}/versions/{versionId} Delete an environment version · Delete the version #
Ask an LLM
“How do I remove an old version from an environment?”
“Can I delete a version by its ID?”
Tell an agent destructive · confirm first
Delete version {versionId} from environment {environmentId} in project {projectId}.
Remove version {versionId} of environment {environmentId} in project {projectId}.

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:upsun-environment-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

upsun-environment-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Upsun.com Rest Environment 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:


# --- truncated at 32 KB (47 KB total) ---
# Full source: https://artifacts.apis.io/upsun/openapi/upsun-environment-api-openapi.yml