Unity Projects Environments API (Public)
Public Unity API for managing project environments.
Download OpenAPI specification:
List environments for a project
List all the environments for a project.
Authorizations
ServiceAccount
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
UnityUser
HTTP: UnityUser
HTTP Authorization Scheme: bearer
Code samples for "{title}":
Request example
curl -X GET \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ -H "Authorization: Bearer <YOUR_TOKEN>" \ "https://services.api.unity.com/unity/v1/projects/{projectId}/environments"
Response example
{ "results": [ { "id": "390121ca-bb43-494f-b418-55be4e0c0faf", "projectId": "390121ca-bb43-494f-b418-55be4e0c0faf", "name": "production", "isDefault": true, "createdAt": "2020-07-20T18:30:51.243Z", "updatedAt": "2020-08-25T11:55:20.651Z", "archivedAt": "2020-08-25T11:55:20.651Z" } ]}
Create an environment in a project
Create an environment under a project. A project can have at most 25 environments.
Authorizations
ServiceAccount
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
UnityUser
HTTP: UnityUser
HTTP Authorization Scheme: bearer
Code samples for "{title}":
Request example
curl -X POST \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ -H "Authorization: Bearer <YOUR_TOKEN>" \ -H "Content-Type: application/json" \ -d '{ "name": "staging"}' \ "https://services.api.unity.com/unity/v1/projects/{projectId}/environments"
Response example
{ "id": "390121ca-bb43-494f-b418-55be4e0c0faf", "projectId": "390121ca-bb43-494f-b418-55be4e0c0faf", "name": "production", "isDefault": true, "createdAt": "2020-07-20T18:30:51.243Z", "updatedAt": "2020-08-25T11:55:20.651Z", "archivedAt": "2020-08-25T11:55:20.651Z"}
Get an environment
Get a single environment.
Authorizations
ServiceAccount
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
UnityUser
HTTP: UnityUser
HTTP Authorization Scheme: bearer
Code samples for "{title}":
Request example
curl -X GET \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ -H "Authorization: Bearer <YOUR_TOKEN>" \ "https://services.api.unity.com/unity/v1/projects/{projectId}/environments/{environmentId}"
Response example
{ "id": "390121ca-bb43-494f-b418-55be4e0c0faf", "projectId": "390121ca-bb43-494f-b418-55be4e0c0faf", "name": "production", "isDefault": true, "createdAt": "2020-07-20T18:30:51.243Z", "updatedAt": "2020-08-25T11:55:20.651Z", "archivedAt": "2020-08-25T11:55:20.651Z"}
Delete an environment
Delete an existing environment. You cannot delete the default environment. That request returns 400.
Authorizations
ServiceAccount
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
UnityUser
HTTP: UnityUser
HTTP Authorization Scheme: bearer
Code samples for "{title}":
Request example
curl -X DELETE \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ -H "Authorization: Bearer <YOUR_TOKEN>" \ "https://services.api.unity.com/unity/v1/projects/{projectId}/environments/{environmentId}"
Response example
{ "name": "ConflictError", "message": "string", "status": 0, "errors": [ "string" ], "code": 0, "type": "string", "requestId": "string"}