Platform.sh 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 20

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
“Which environments exist in my Platform.sh project?”
“Can I see the details of every environment in a project?”
Tell an agent
List the environments in project {projectId}.
Show all environments for project {projectId}.
GET /projects/{projectId}/environments/{environmentId} Get one environment's details · Get an environment #
Ask an LLM
“What are the details of a specific environment in my project?”
“Can I look up one environment by its ID?”
Tell an agent
Show environment {environmentId} in project {projectId}.
Get the details of environment {environmentId} for project {projectId}.
PATCH /projects/{projectId}/environments/{environmentId} Update an environment · Update an environment #
Ask an LLM
“Can I rename an environment or change its title?”
“Is it possible to set attributes or SMTP on an existing environment?”
Tell an agent
Rename environment {environmentId} in project {projectId} to {name}.
Set the title of environment {environmentId} in project {projectId} to {title}.
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 activate an environment with a given resource set?”
Tell an agent
Activate environment {environmentId} in project {projectId} with resources {resources}.
Turn environment {environmentId} in project {projectId} active using {resources}.
POST /projects/{projectId}/environments/{environmentId}/branch Create a branch environment · Branch an environment #
Ask an LLM
“How do I create a new development environment branched from an existing one?”
“Can I clone an environment's data when branching it?”
Tell an agent
Branch a new {type} environment {name} from {environmentId} in project {projectId} titled {title}, cloning {clone_parent}.
Create a development environment {name} from {environmentId} in project {projectId}, titled {title}, cloning {clone_parent}.
POST /projects/{projectId}/environments/{environmentId}/deactivate Deactivate an environment · Deactivate an environment #
Ask an LLM
“How do I shut down an environment's services but keep its Git branch?”
“What happens to data when an environment is deactivated?”
Tell an agent destructive · confirm first
Deactivate environment {environmentId} in project {projectId}.
Stop all services on environment {environmentId} in project {projectId} but keep the Git branch.
POST /projects/{projectId}/environments/{environmentId}/deploy Deploy staged changes to an environment · Deploy an environment #
Ask an LLM
“How do I release the staged changes on an environment?”
“Can I choose a rolling or stop-start strategy for a deployment?”
Tell an agent
Deploy environment {environmentId} in project {projectId} using strategy {strategy}.
Release the staged changes on environment {environmentId} in 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}, config {config}, files {files} and resources {resources}.
Set up a new environment {environmentId} in project {projectId} from {repository} with {profile} and {config}, files {files}, resources {resources}.
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 code into its parent?”
“Does merging an environment rebuild and redeploy the parent?”
Tell an agent
Merge environment {environmentId} into its parent in project {projectId} with resources {resources}.
Pull the changes from environment {environmentId} into its parent in project {projectId} using {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 recently?”
Tell an agent
Pause environment {environmentId} in project {projectId}.
Stop services on environment {environmentId} in project {projectId} to save resources.
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 redeploy its code?”
Tell an agent
Redeploy environment {environmentId} in project {projectId}.
Trigger a redeployment of environment {environmentId} in 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 on 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 bring a child environment's code and data up to date 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} in project {projectId} with {synchronize_code}, {rebase}, {synchronize_data}, {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 on an environment?”
“Can I see all the versions for one environment?”
Tell an agent
List the versions of environment {environmentId} in project {projectId}.
Show every version deployed on environment {environmentId} in project {projectId}.
POST /projects/{projectId}/environments/{environmentId}/versions Create a version on 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 on a version when creating it?”
Tell an agent
Create a version on environment {environmentId} in project {projectId}.
Add a new 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
“What are the details of one version on an environment?”
“Can I look up a version by its ID?”
Tell an agent
Show version {versionId} on environment {environmentId} in project {projectId}.
Get the details of version {versionId} for 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 on an existing version?”
“Is it possible to update an environment version's settings?”
Tell an agent
Update version {versionId} on environment {environmentId} in project {projectId} with routing {routing}.
Change the routing of existing version {versionId} on 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 so it stops receiving traffic?”
Tell an agent destructive · confirm first
Delete version {versionId} from environment {environmentId} in project {projectId}.
Remove version {versionId} on environment {environmentId} in project {projectId}.
POST /projects/{projectId}/environments/{environmentId}/maintenance-redeploy Redeploy an environment for maintenance · Maintenance redeploy environment #
Ask an LLM
“How do I redeploy an environment for maintenance?”
“Can I trigger a maintenance redeploy of an environment?”
Tell an agent
Redeploy environment {environmentId} in project {projectId} for maintenance.
Trigger a maintenance redeploy 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/platform.sh:platform.sh-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

platform.sh-environment-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Platform.sh Environment API
  version: '1.0'
  contact:
    name: Support
    url: https://upsun.com/contact-us/
  termsOfService: https://upsun.com/trust-center/legal/tos/
  x-logo:
    url: https://docs.upsun.com/images/upsun-api.svg
    href: https://upsun.com/#section/Introduction
    altText: Upsun logo
  description: 'Operations tagged Environment across 2 of this provider''s published API definitions: platform.sh-developer-portal-openapi-original.json, platform.sh-openapi-original.json. Each path carries the servers of the definition it was published in.'
servers:
- url: '{schemes}://api.upsun.com'
  description: The Upsun.com API gateway
  variables:
    schemes:
      default: https
tags:


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