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
Request
- Base URLhttps://api.upsun.com
- AuthOAuth 2Authorization codehttps://auth.api.platform.sh/oauth2/authorizeToken URLhttps://auth.api.platform.sh/oauth2/token
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
projectIdstring required
environmentIdstring required
Request body
Response
Changes
No recorded changes to this operation across all 1 revision of this API.