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 (). The legacy Build Automation API key is not supported on v3.
Authorization: Basic <base64(keyId:secret)>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
Query parameters for "{title}"
Selects which top-level fields the response contains. Accepts repeated keys () and comma-separated values (), which may be combined. Accepted values: , , , , , , , , , , , , , , , . Any other value returns HTTP 422. Omit the parameter to receive every field.
include=guid&include=nameinclude=guid,namesettingsdefaultConnectioncreateddisableddisableNotificationsgenerateShareLinksprojectidnameorgNameserviceFlagsorgidguidorgFkbuildTimeoutMinutescachedIconlinksCode samples for "{title}":
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
Query parameters for "{title}"
Selects which top-level fields each project in the response contains. Accepts repeated keys () and comma-separated values (), which may be combined. Accepted values: , , , , , , , , , , , , , , , . Any other value returns HTTP 422. Omit the parameter to receive every field.
include=guid&include=nameinclude=guid,namesettingsdefaultConnectioncreateddisableddisableNotificationsgenerateShareLinksprojectidnameorgNameserviceFlagsorgidguidorgFkbuildTimeoutMinutescachedIconlinksCode samples for "{title}":
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
Query parameters for "{title}"
Selects which top-level fields the response contains. Accepts repeated keys () and comma-separated values (), which may be combined. Accepted values: , , , , , , , , , , , , , , , . Any other value returns HTTP 422. Omit the parameter to receive every field.
include=guid&include=nameinclude=guid,namesettingsdefaultConnectioncreateddisableddisableNotificationsgenerateShareLinksprojectidnameorgNameserviceFlagsorgidguidorgFkbuildTimeoutMinutescachedIconlinksCode samples for "{title}":
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 ; both return 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.
GET /orgs/{orgid}/projects/{projectid}ProjectResponseAuthorizations
basicAuth
HTTP: basicAuth
HTTP Authorization Scheme: basic
jwt
HTTP: jwt
HTTP Authorization Scheme: bearer
Query parameters for "{title}"
Selects which top-level fields the response contains. Accepts repeated keys () and comma-separated values (), which may be combined. Accepted values: , , , , , , , , , , , , , , , . Any other value returns HTTP 422. Omit the parameter to receive every field.
include=guid&include=nameinclude=guid,namesettingsdefaultConnectioncreateddisableddisableNotificationsgenerateShareLinksprojectidnameorgNameserviceFlagsorgidguidorgFkbuildTimeoutMinutescachedIconlinksCode samples for "{title}":
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. 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.
urlAuthorizations
basicAuth
HTTP: basicAuth
HTTP Authorization Scheme: basic
jwt
HTTP: jwt
HTTP Authorization Scheme: bearer
Code samples for "{title}":
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. 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.
urlAuthorizations
basicAuth
HTTP: basicAuth
HTTP Authorization Scheme: basic
jwt
HTTP: jwt
HTTP Authorization Scheme: bearer
Code samples for "{title}":
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
Code samples for "{title}":
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}