latestOpenAPI 3.0.12026-08-10234260964.0 KB

6cc88fde6435

Environment

Initialize a new environment

Initialize and configure a new environment with an existing repository. The payload is the url of a git repository with a profile name:

{
    "repository": "git@github.com:platformsh/a-project-template.git@master",
    "profile": "Example Project",
    "files": [
      {
        "mode": 0600,
        "path": "config.json",
        "contents": "XXXXXXXX"
      }
    ]
}

It can optionally carry additional files that will be committed to the repository, the POSIX file mode to set on each file, and the base64-encoded contents of each file.

This endpoint can also add a second repository URL in the config parameter that will be added to the contents of the first. This allows you to put your application in one repository and the Upsun YAML configuration files in another.

post/projects/{projectId}/environments/{environmentId}/initialize

Path parameters

projectIdstring required
environmentIdstring required

Request body

profilestring required

Name of the profile to show in the UI

repositorystring required

Repository to clone from

configstring nullable required

Repository to clone the configuration files from

Response

statusstring required

The status text of the response

codeinteger required

The status code of the response