ドキュメント

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:

Accept a provider push for one project-owned source-control connection.


Accept a provider push for one project-owned source-control connection.

Path parameters for "{title}"

orgid

string
必須
No description

projectid

string
必須
No description

connectionid

string
必須
No description

Header parameters for "{title}"

x-hub-signature

string
No description

x-gitlab-token

string
No description

x-azure-token

string
No description

x-github-event

string
No description

x-gitlab-event

string
No description

x-event-key

string
No description

Query parameters for "{title}"

token

string
No description

Request body for "{title}"

Media Type:
application/json

HTTP response status codes for "{title}":

Code samples for "{title}":

Request example

curl -X POST \ -H "x-hub-signature: <x-hub-signature>" \ -H "x-gitlab-token: <x-gitlab-token>" \ -H "x-azure-token: <x-azure-token>" \ -H "x-github-event: <x-github-event>" \ -H "x-gitlab-event: <x-gitlab-event>" \ -H "x-event-key: <x-event-key>" \ -H "Content-Type: application/json" \ -d '{}' \ "https://build-automation.services.api.unity.com/v3/orgs/{orgid}/projects/{projectid}/connections/{connectionid}/hooks/commit"

Response example

{ "sha": "abc123def456", "message": "feat: add new feature", "branch": "main", "timestamp": "2023-01-01T00:00:00Z", "author": { "email": "user@example.com", "name": "John Doe", "date": "2023-01-01T00:00:00Z" }}

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

orgid

string
必須
No description

projectid

string
必須
No description

Query parameters for "{title}"

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 "{title}":

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

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

orgid

string
必須
No description

Query parameters for "{title}"

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 "{title}":

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"

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

projectid

string
必須
No description

Query parameters for "{title}"

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 "{title}":

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

Accept a signed UVCS event for one project-owned Plastic connection.


Accept a signed UVCS event for one project-owned Plastic connection.

Path parameters for "{title}"

orgid

string
必須
No description

projectid

string
必須
No description

connectionid

string
必須
No description

eventType

string
必須
No description

Header parameters for "{title}"

x-uvcs-signature

string
No description

x-uvcs-deliveryid

string
No description

Request body for "{title}"

Media Type:
application/json

PLASTIC_CHANGESET

string
example: cs:12345@br:/main/feature/task123@rep:myrepo@repserver:plastic.example.com:8087
Changeset information in format: cs:2341@br:/main/task4638@rep:product@repserver:plastic.mysite.com:17590

PLASTIC_CLIENTMACHINE

string
example: DEV-MACHINE-01
Client machine name

PLASTIC_COMMENT

string
example: Fixed bug in login flow
Commit comment

PLASTIC_SERVER

string
必須
example: plastic.example.com:8087
Plastic server address

PLASTIC_SHELVE

example: false
Whether this is a shelve operation
Any of

PLASTIC_USER

string
example: john.doe
User who performed the operation

INPUT

array[object]
example: ["AD \"/models/character.fbx\" FILE#br:/main;changeset:12345@rep:myrepo@repserver:plastic.example.com:8087","CH \"/textures/wall.png\" FILE#br:/main;changeset:12345@rep:myrepo@repserver:plastic.example.com:8087"]
Array of input entries describing changed files.
Can be either: - Legacy string format: 'CH "/src/main.c" FILE#br:(.);changeset:(\d+)@rep:(\w+)@repserver:(.)' - ChangedItem objects with changeType, path, branchName, and changesetId
Any of

CONTENT

string
example: Additional metadata or content
Additional content

content

string
example: Additional metadata or content
No description

PLASTIC_MERGELINKS

string
example: merge:123@branch:/develop
Merge links information

PLASTIC_MERGE_LINKS

string
example: merge:123@branch:/develop
No description

PLASTIC_BRANCH_NAME

string
example: feature/awesome-new-feature
No description

PLASTIC_FULL_BRANCH_NAME

string
example: /feature/awesome-new-feature
No description

PLASTIC_BRANCH_NEW_NAME

string
example: task-001
No description

PLASTIC_FULL_BRANCH_NEW_NAME

string
example: /main/task-001
No description

PLASTIC_REPOSITORY_NAME

string
example: my-repo
No description

PLASTIC_PROJECT_GUID

string
No description

PLASTIC_REPOSITORY_GUID

string
No description

PLASTIC_REPOSITORY_ID

string
No description

PLASTIC_CHANGESET_ID

string
No description

PLASTIC_BRANCH_DELETION_INCLUDES_CHANGESETS

string
No description

HTTP response status codes for "{title}":

Code samples for "{title}":

Request example

curl -X POST \ -H "x-uvcs-signature: <x-uvcs-signature>" \ -H "x-uvcs-deliveryid: <x-uvcs-deliveryid>" \ -H "Content-Type: application/json" \ -d '{ "PLASTIC_CHANGESET": "cs:12345@br:/main/feature/task123@rep:myrepo@repserver:plastic.example.com:8087", "PLASTIC_CLIENTMACHINE": "DEV-MACHINE-01", "PLASTIC_COMMENT": "Fixed bug in login flow", "PLASTIC_SERVER": "plastic.example.com:8087", "PLASTIC_SHELVE": "false", "PLASTIC_USER": "john.doe", "INPUT": [ "AD \"/models/character.fbx\" FILE#br:/main;changeset:12345@rep:myrepo@repserver:plastic.example.com:8087", "CH \"/textures/wall.png\" FILE#br:/main;changeset:12345@rep:myrepo@repserver:plastic.example.com:8087" ], "CONTENT": "Additional metadata or content", "content": "Additional metadata or content", "PLASTIC_MERGELINKS": "merge:123@branch:/develop", "PLASTIC_MERGE_LINKS": "merge:123@branch:/develop", "PLASTIC_BRANCH_NAME": "feature/awesome-new-feature", "PLASTIC_FULL_BRANCH_NAME": "/feature/awesome-new-feature", "PLASTIC_BRANCH_NEW_NAME": "task-001", "PLASTIC_FULL_BRANCH_NEW_NAME": "/main/task-001", "PLASTIC_REPOSITORY_NAME": "my-repo", "PLASTIC_PROJECT_GUID": "string", "PLASTIC_REPOSITORY_GUID": "string", "PLASTIC_REPOSITORY_ID": "string", "PLASTIC_CHANGESET_ID": "string", "PLASTIC_BRANCH_DELETION_INCLUDES_CHANGESETS": "string"}' \ "https://build-automation.services.api.unity.com/v3/orgs/{orgid}/projects/{projectid}/connections/{connectionid}/triggers/{eventType}"

Response example

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

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

orgid

string
必須
No description

projectid

string
必須
No description

connectionid

string
必須
No description

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://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 "{title}"

orgid

string
必須
No description

projectid

string
必須
No description

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://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 "{title}"

orgid

string
必須
No description

projectid

string
必須
No description

connectionid

string
必須
No description

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