Documentation

Build Automation Client API


Build Automation Client API


Unity Build Automation

This REST API is intended to be used in conjunction with Unity Build Automation.

Authentication

Authenticate with HTTP Basic auth using a Unity service account key and secret (
Authorization: Basic <base64(keyId:secret)>
). The legacy Build Automation API key is not supported on v3.
For service account setup, see Create a service account.
Note: This documentation describes version 3 of the Unity Build Automation API. Version 2 is the previous API version.
Download OpenAPI specification:

Get project details.


Returns the SCM-free v3 representation of a project in an organization.
Authorizations
basicAuth
HTTP: basicAuth
HTTP Authorization Scheme: basic
jwt
HTTP: jwt
HTTP Authorization Scheme: bearer

Path parameters for "Get project details."

orgid

string
required
No description

projectid

string
required
No description

Query parameters for "Get project details."

include

array
Selects which top-level fields the response contains. Accepts repeated keys (
include=guid&include=name
) and comma-separated values (
include=guid,name
), which may be combined. Accepted values:
settings
,
defaultConnection
,
created
,
disabled
,
disableNotifications
,
generateShareLinks
,
projectid
,
name
,
orgName
,
serviceFlags
,
orgid
,
guid
,
orgFk
,
buildTimeoutMinutes
,
cachedIcon
,
links
. Any other value returns HTTP 422. Omit the parameter to receive every field.

HTTP response status codes for "Get project details.":

Code samples for "Get project details.":

Request example

curl -X GET \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ -H "Authorization: Bearer <YOUR_TOKEN>" \ "https://build-automation.services.api.unity.com/v3/orgs/{orgid}/projects/{projectid}"

Response example

{ "settings": { "remoteCacheStrategy": "inherit", "cacheCompressionLevel": "1", "artifactCompressionLevel": "1", "windowsGitBinary": "cygwin", "shallowClone": true }, "defaultConnection": "a1b2c3d4-e5f6-4a8b-9c0d-1e2f3a4b5c6d", "created": "string", "disabled": true, "disableNotifications": true, "generateShareLinks": true, "projectid": "string", "name": "string", "orgName": "string", "serviceFlags": {}, "orgid": "string", "guid": "string", "orgFk": "string", "buildTimeoutMinutes": 0, "cachedIcon": "string", "links": { "self": { "method": "get", "href": "/some/path/to/resource", "type": "application/json", "meta": {}, "redirect": false }, "list_buildtargets": { "method": "get", "href": "/some/path/to/resource", "type": "application/json", "meta": {}, "redirect": false }, "latest_builds": { "method": "get", "href": "/some/path/to/resource", "type": "application/json", "meta": {}, "redirect": false }, "revoke_all_shared": { "method": "get", "href": "/some/path/to/resource", "type": "application/json", "meta": {}, "redirect": false } }}

List projects for an organization.


Returns SCM-free v3 project representations for the requested organization.
Authorizations
basicAuth
HTTP: basicAuth
HTTP Authorization Scheme: basic
jwt
HTTP: jwt
HTTP Authorization Scheme: bearer

Path parameters for "List projects for an organization."

orgid

string
required
No description

Query parameters for "List projects for an organization."

include

array
Selects which top-level fields each project in the response contains. Accepts repeated keys (
include=guid&include=name
) and comma-separated values (
include=guid,name
), which may be combined. Accepted values:
settings
,
defaultConnection
,
created
,
disabled
,
disableNotifications
,
generateShareLinks
,
projectid
,
name
,
orgName
,
serviceFlags
,
orgid
,
guid
,
orgFk
,
buildTimeoutMinutes
,
cachedIcon
,
links
. Any other value returns HTTP 422. Omit the parameter to receive every field.

HTTP response status codes for "List projects for an organization.":

Code samples for "List projects for an organization.":

Request example

curl -X GET \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ -H "Authorization: Bearer <YOUR_TOKEN>" \ "https://build-automation.services.api.unity.com/v3/orgs/{orgid}/projects"

Response example

[ { "settings": { "remoteCacheStrategy": "inherit", "cacheCompressionLevel": "1", "artifactCompressionLevel": "1", "windowsGitBinary": "cygwin", "shallowClone": true }, "defaultConnection": "a1b2c3d4-e5f6-4a8b-9c0d-1e2f3a4b5c6d", "created": "string", "disabled": true, "disableNotifications": true, "generateShareLinks": true, "projectid": "string", "name": "string", "orgName": "string", "serviceFlags": {}, "orgid": "string", "guid": "string", "orgFk": "string", "buildTimeoutMinutes": 0, "cachedIcon": "string", "links": { "self": { "method": "get", "href": "/some/path/to/resource", "type": "application/json", "meta": {}, "redirect": false }, "list_buildtargets": { "method": "get", "href": "/some/path/to/resource", "type": "application/json", "meta": {}, "redirect": false }, "latest_builds": { "method": "get", "href": "/some/path/to/resource", "type": "application/json", "meta": {}, "redirect": false }, "revoke_all_shared": { "method": "get", "href": "/some/path/to/resource", "type": "application/json", "meta": {}, "redirect": false } } }]

Get project details by project ID.


Returns the SCM-free v3 representation of a project without an organization path parameter.
Authorizations
basicAuth
HTTP: basicAuth
HTTP Authorization Scheme: basic
jwt
HTTP: jwt
HTTP Authorization Scheme: bearer

Path parameters for "Get project details by project ID."

projectid

string
required
No description

Query parameters for "Get project details by project ID."

include

array
Selects which top-level fields the response contains. Accepts repeated keys (
include=guid&include=name
) and comma-separated values (
include=guid,name
), which may be combined. Accepted values:
settings
,
defaultConnection
,
created
,
disabled
,
disableNotifications
,
generateShareLinks
,
projectid
,
name
,
orgName
,
serviceFlags
,
orgid
,
guid
,
orgFk
,
buildTimeoutMinutes
,
cachedIcon
,
links
. Any other value returns HTTP 422. Omit the parameter to receive every field.

HTTP response status codes for "Get project details by project ID.":

Code samples for "Get project details by project ID.":

Request example

curl -X GET \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ -H "Authorization: Bearer <YOUR_TOKEN>" \ "https://build-automation.services.api.unity.com/v3/projects/{projectid}"

Response example

{ "settings": { "remoteCacheStrategy": "inherit", "cacheCompressionLevel": "1", "artifactCompressionLevel": "1", "windowsGitBinary": "cygwin", "shallowClone": true }, "defaultConnection": "a1b2c3d4-e5f6-4a8b-9c0d-1e2f3a4b5c6d", "created": "string", "disabled": true, "disableNotifications": true, "generateShareLinks": true, "projectid": "string", "name": "string", "orgName": "string", "serviceFlags": {}, "orgid": "string", "guid": "string", "orgFk": "string", "buildTimeoutMinutes": 0, "cachedIcon": "string", "links": { "self": { "method": "get", "href": "/some/path/to/resource", "type": "application/json", "meta": {}, "redirect": false }, "list_buildtargets": { "method": "get", "href": "/some/path/to/resource", "type": "application/json", "meta": {}, "redirect": false }, "latest_builds": { "method": "get", "href": "/some/path/to/resource", "type": "application/json", "meta": {}, "redirect": false }, "revoke_all_shared": { "method": "get", "href": "/some/path/to/resource", "type": "application/json", "meta": {}, "redirect": false } }}

Get raw project details.


Returns the SCM-free v3 representation used by callers that require raw project access. On v3 this response is identical to
GET /orgs/{orgid}/projects/{projectid}
; both return
ProjectResponse
with the same fields. The route exists for parity with the v2 path, which returns a different shape, and carries no additional fields. Prefer the non-raw route.
Authorizations
basicAuth
HTTP: basicAuth
HTTP Authorization Scheme: basic
jwt
HTTP: jwt
HTTP Authorization Scheme: bearer

Path parameters for "Get raw project details."

orgid

string
required
No description

projectid

string
required
No description

Query parameters for "Get raw project details."

include

array
Selects which top-level fields the response contains. Accepts repeated keys (
include=guid&include=name
) and comma-separated values (
include=guid,name
), which may be combined. Accepted values:
settings
,
defaultConnection
,
created
,
disabled
,
disableNotifications
,
generateShareLinks
,
projectid
,
name
,
orgName
,
serviceFlags
,
orgid
,
guid
,
orgFk
,
buildTimeoutMinutes
,
cachedIcon
,
links
. Any other value returns HTTP 422. Omit the parameter to receive every field.

HTTP response status codes for "Get raw project details.":

Code samples for "Get raw project details.":

Request example

curl -X GET \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ -H "Authorization: Bearer <YOUR_TOKEN>" \ "https://build-automation.services.api.unity.com/v3/orgs/{orgid}/projects/{projectid}/raw"

Response example

{ "settings": { "remoteCacheStrategy": "inherit", "cacheCompressionLevel": "1", "artifactCompressionLevel": "1", "windowsGitBinary": "cygwin", "shallowClone": true }, "defaultConnection": "a1b2c3d4-e5f6-4a8b-9c0d-1e2f3a4b5c6d", "created": "string", "disabled": true, "disableNotifications": true, "generateShareLinks": true, "projectid": "string", "name": "string", "orgName": "string", "serviceFlags": {}, "orgid": "string", "guid": "string", "orgFk": "string", "buildTimeoutMinutes": 0, "cachedIcon": "string", "links": { "self": { "method": "get", "href": "/some/path/to/resource", "type": "application/json", "meta": {}, "redirect": false }, "list_buildtargets": { "method": "get", "href": "/some/path/to/resource", "type": "application/json", "meta": {}, "redirect": false }, "latest_builds": { "method": "get", "href": "/some/path/to/resource", "type": "application/json", "meta": {}, "redirect": false }, "revoke_all_shared": { "method": "get", "href": "/some/path/to/resource", "type": "application/json", "meta": {}, "redirect": false } }}

Get SCM connection settings by id.


Returns the public settings for one connection, excluding dedicated credential fields such as passwords, tokens, and private keys. Exactly one provider section is returned, matching the connection type.
url
is returned exactly as stored, so a URL configured with credentials embedded in it, for example as userinfo or a query parameter, returns those credentials too. Treat this field as sensitive.
Authorizations
basicAuth
HTTP: basicAuth
HTTP Authorization Scheme: basic
jwt
HTTP: jwt
HTTP Authorization Scheme: bearer

Path parameters for "Get SCM connection settings by id."

orgid

string
required
No description

projectid

string
required
No description

connectionid

string
required
No description

HTTP response status codes for "Get SCM connection settings by id.":

Code samples for "Get SCM connection settings by id.":

Request example

curl -X GET \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ -H "Authorization: Bearer <YOUR_TOKEN>" \ "https://build-automation.services.api.unity.com/v3/orgs/{orgid}/projects/{projectid}/connections/{connectionid}"

Response example

{ "id": "string", "name": "my-repo", "type": "git", "url": "https://github.com/unity/example-repo.git", "user": "johndoe", "git": { "sshPublicKey": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC...", "sshKeyType": "rsa" }, "p4": { "authType": "ticket", "fingerprint": "a1b2c3d4e5f6g7h8i9j0" }, "plastic": { "authType": "ticket", "plasticEnvironment": "prd", "useEncryption": false, "encryptionMethod": "AES128" }, "gitProvider": "github", "bitbucket": { "workspace": "my-workspace" }, "azure": { "org": "my-azure-org", "project": "my-azure-project" }}

List SCM connection settings for a project.


Returns the public settings for every connection the project owns, excluding dedicated credential fields such as passwords, tokens, and private keys. Each entry returns exactly one provider section, matching its connection type.
url
is returned exactly as stored, so a URL configured with credentials embedded in it, for example as userinfo or a query parameter, returns those credentials too. Treat this field as sensitive.
Authorizations
basicAuth
HTTP: basicAuth
HTTP Authorization Scheme: basic
jwt
HTTP: jwt
HTTP Authorization Scheme: bearer

Path parameters for "List SCM connection settings for a project."

orgid

string
required
No description

projectid

string
required
No description

HTTP response status codes for "List SCM connection settings for a project.":

Code samples for "List SCM connection settings for a project.":

Request example

curl -X GET \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ -H "Authorization: Bearer <YOUR_TOKEN>" \ "https://build-automation.services.api.unity.com/v3/orgs/{orgid}/projects/{projectid}/connections"

Response example

[ { "id": "string", "name": "my-repo", "type": "git", "url": "https://github.com/unity/example-repo.git", "user": "johndoe", "git": { "sshPublicKey": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC...", "sshKeyType": "rsa" }, "p4": { "authType": "ticket", "fingerprint": "a1b2c3d4e5f6g7h8i9j0" }, "plastic": { "authType": "ticket", "plasticEnvironment": "prd", "useEncryption": false, "encryptionMethod": "AES128" }, "gitProvider": "github", "bitbucket": { "workspace": "my-workspace" }, "azure": { "org": "my-azure-org", "project": "my-azure-project" } }]

Validate a stored SCM connection through its provider without storing validation state.


Validate a stored SCM connection through its provider without storing validation state.
Authorizations
basicAuth
HTTP: basicAuth
HTTP Authorization Scheme: basic
jwt
HTTP: jwt
HTTP Authorization Scheme: bearer

Path parameters for "Validate a stored SCM connection through its provider without storing validation state."

orgid

string
required
No description

projectid

string
required
No description

connectionid

string
required
No description

HTTP response status codes for "Validate a stored SCM connection through its provider without storing validation state.":

Code samples for "Validate a stored SCM connection through its provider without storing validation state.":

Request example

curl -X POST \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ -H "Authorization: Bearer <YOUR_TOKEN>" \ "https://build-automation.services.api.unity.com/v3/orgs/{orgid}/projects/{projectid}/connections/{connectionid}/validate"

Response example

{ "requestId": "string", "details": [ {} ], "detail": "string", "type": "string", "code": 0, "title": "string", "status": 0}