기술 자료

Projects and Apps Client API


Projects and Apps Client API


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

Path parameters for "{title}"

projectId

string
필수
example: 8bdacc33-6eef-4577-beb0-633c86259f0b
ID of the project. Usually a UUID, but some legacy projects use a numeric string, so treat it as a string.

Query parameters for "{title}"

archived

boolean
If true, the API returns only archived environments. Otherwise it returns only active environments.

HTTP response status codes for "{title}":

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

Path parameters for "{title}"

projectId

string
필수
example: 8bdacc33-6eef-4577-beb0-633c86259f0b
ID of the project. Usually a UUID, but some legacy projects use a numeric string, so treat it as a string.

Request body for "{title}"

Media Type:
application/json

name

string
필수
example: staging
The name of the environment. The API accepts letters, digits, hyphens, and underscores, up to 255 characters. It trims whitespace and stores the name in lowercase.

HTTP response status codes for "{title}":

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

Path parameters for "{title}"

projectId

string
필수
example: 8bdacc33-6eef-4577-beb0-633c86259f0b
ID of the project. Usually a UUID, but some legacy projects use a numeric string, so treat it as a string.

environmentId

string
필수
example: 8bdacc33-6eef-4577-beb0-633c86259f0a
ID of the environment

HTTP response status codes for "{title}":

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

Path parameters for "{title}"

projectId

string
필수
example: 8bdacc33-6eef-4577-beb0-633c86259f0b
ID of the project. Usually a UUID, but some legacy projects use a numeric string, so treat it as a string.

environmentId

string
필수
example: 8bdacc33-6eef-4577-beb0-633c86259f0a
ID of the environment

HTTP response status codes for "{title}":

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"}