Unity Cloud Build

This API is intended to be used in conjunction with the Unity Cloud Build service. A tool for building your Unity projects in the Cloud.

See https://build.cloud.unity3d.com for more information.

Making requests

This website is built to allow requests to be made against the API. If you are currently logged into Cloud Build you should be able to make requests without entering an API key.

You can find your API key in the Unity Cloud Services portal by clicking on 'Cloud Build Preferences' in the sidebar. Copy the API Key and paste it into the upper left corner of this website. It will be used in all subsequent requests.

Clients

The Unity Cloud Build API is based upon Swagger. Client libraries to integrate with your projects can easily be generated with the Swagger Code Generator.

The JSON schema required to generate a client for this API version is located here:

https://build-api.cloud.unity3d.com/api/v1/api.json

Authorization

The Unity Cloud Build API requires an access token from your Unity Cloud Build account, which can be found at https://build.cloud.unity3d.com/login/me

To authenticate requests, include a Basic Authentication header with your API key as the value. e.g.

Authorization: Basic [YOUR API KEY]

Pagination

Paged results will take two parameters. A page number that is calculated based upon the per_page amount. For instance if there are 40 results and you specify page 2 with per_page set to 10 you will receive records 11-20.

Paged results will also return a Content-Range header. For the example above the content range header would look like this:

Content-Range: items 11-20/40

Versioning

The API version is indicated in the request URL. Upgrading to a newer API version can be done by changing the path.

The API will receive a new version in the following cases:

  • removal of a path or request type
  • addition of a required field
  • removal of a required field

The following changes are considered backwards compatible and will not trigger a new API version:

  • addition of an endpoint or request type
  • addition of an optional field
  • removal of an optional field
  • changes to the format of ids

Rate Limiting

Requests against the Cloud Build API are limited to a rate of 100 per minute. To preserve the quality of service throughout Cloud Build, additional rate limits may apply to some actions. For example, polling aggressively instead of using webhooks or making API calls with a high concurrency may result in rate limiting.

It is not intended for these rate limits to interfere with any legitimate use of the API. Please contact support if your use is affected by this rate limit.

You can check the returned HTTP headers for any API request to see your current rate limit status.

  • X-RateLimit-Limit: maximum number of requests per minute
  • X-RateLimit-Remaining: remaining number of requests in the current window
  • X-RateLimit-Reset: time at which the current window will reset (UTC epoch seconds)

Once you go over the rate limit you will receive an error response:

HTTP Status: 429
{
"error": "Rate limit exceeded, retry in XX seconds"
}

# initialize the API client configuration = Configuration(); configuration.username = "[YOUR API KEY]"; client = CloudBuild.ApiClient("https://build-api.cloud.unity3d.com/api/v1")

Paths

Builds Introduction

Builds contain the output of building a Build Target for a Project. They contain metadata about the build itself as well as links to the build artifacts.

For certain operations, you can substitute "_all" for the buildtargetid to operate across all configured build targets.

Get audit log

GET /orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/auditlog

Description

Retrieve a list of historical settings changes for this build target.

Required Permissions

project:user

Request Parameters

orgid

Organization identifier

path string
projectid

Project identifier

path string
buildtargetid

unique id auto-generated from the build target name

path string
per_page

Number of audit log records to retrieve

query number 25
page

Skip to page number, based on per_page value

query number 1
curl -X GET -H "Content-Type: application/json" -H "Authorization: Basic [YOUR API KEY]" https://build-api.cloud.unity3d.com/api/v1/orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/auditlog buildsApi = BuildsApi(client) auditlog = buildsApi.get_audit_log('{orgid}', '{projectid}', '{buildtargetid}')

Responses

Uses default content-types: application/json text/plain text/html text/csv

200 OK
object
updatingUserEmail: string (email)
updated: string (dateTime)
lines: object[]
object
label: string
field: string
to: string
from: string
`
[ { "updatingUserEmail": "julie.smith@example.org", "updated": "2015-08-04T17:18:24.532Z", "lines": [{ "from": "Latest 4.x", "to": "4.6.5", "label": "Unity version", "field": "buildtarget.settings.unityVersion" }] }, { "updatingUserEmail": "sandra.johnson@example.org", "updated": "2015-08-02T12:02:44.532Z", "lines": [{ "label": "Keypass", "field": "buildtarget.settings.platform.keystoreInfo.keypass", "from": "", "to": "changed" }] } ]

Delete all artifacts associated with all non-favorited builds for a specified buildtargetid (_all is allowed).

DELETE /orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/builds/artifacts

Description

Required Permissions

project:manager

Request Parameters

orgid

Organization identifier

path string
projectid

Project identifier

path string
buildtargetid

unique id auto-generated from the build target name

path string
curl -X DELETE -H "Content-Type: application/json" -H "Authorization: Basic [YOUR API KEY]" https://build-api.cloud.unity3d.com/api/v1/orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/builds/artifacts buildsApi = BuildsApi(client) build = buildsApi.delete_all_build_artifacts('{orgid}', '{projectid}', '{buildtargetid}')

Responses

Uses default content-types: application/json text/plain text/html text/csv

204 No Content
`

Delete all artifacts associated with a specific build

DELETE /orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/builds/{number}/artifacts

Description

Required Permissions

project:manager

Request Parameters

orgid

Organization identifier

path string
projectid

Project identifier

path string
buildtargetid

unique id auto-generated from the build target name

path string
number

Build number or in some cases _all

path string
curl -X DELETE -H "Content-Type: application/json" -H "Authorization: Basic [YOUR API KEY]" https://build-api.cloud.unity3d.com/api/v1/orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/builds/{number}/artifacts buildsApi = BuildsApi(client) build = buildsApi.delete_build_artifacts('{orgid}', '{projectid}', '{buildtargetid}', '{number}')

Responses

Uses default content-types: application/json text/plain text/html text/csv

204 No Content
`

Delete artifacts for a batch of builds

POST /orgs/{orgid}/projects/{projectid}/artifacts/delete

Description

Delete all artifacts associated with the builds identified by the provided build target ids and build numbers. Builds marked as do not delete or that are currently building will be ignored.

Required Permissions

project:manager

Request Parameters

orgid

Organization identifier

path string
projectid

Project identifier

path string

Parameters are specified as application/json in the request body.

Options to specify what builds to delete

{"required":["builds"],"properties":{"builds":{"type":"array","items":{"required":["buildtargetid","build"],"properties":{"buildtargetid":{"type":"string"},"build":{"type":"number"}}}}}}
curl -X POST -H "Content-Type: application/json" -H "Authorization: Basic [YOUR API KEY]" -d '{builds: [{buildtargetid:"default-android",build:1}]}' https://build-api.cloud.unity3d.com/api/v1/orgs/{orgid}/projects/{projectid}/artifacts/delete buildsApi = BuildsApi(client) build = buildsApi.batch_delete_build_artifacts('{orgid}', '{projectid}', '{builds: [{buildtargetid:"default-android",build:1}]}')

Responses

Uses default content-types: application/json text/plain text/html text/csv

204 No Content
`

Create polling jobs

POST /orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/polling

Description

Create polling jobs for the specified buildtargetid (or all targets, if '_all' is specified as the buildtargetid). New builds will be subsequently triggered for any build targets with changes detected.

Required Permissions

project:user

Request Parameters

orgid

Organization identifier

path string
projectid

Project identifier

path string
buildtargetid

unique id auto-generated from the build target name

path string

application/x-www-form-urlencoded

curl -X POST -H "Content-Type: application/json" -H "Authorization: Basic [YOUR API KEY]" https://build-api.cloud.unity3d.com/api/v1/orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/polling buildsApi = BuildsApi(client) status = buildsApi.create_polling_jobs('{orgid}', '{projectid}', '{buildtargetid}')

Responses

Uses default content-types: application/json text/plain text/html text/csv

202 Accepted
pollingBuildTargets: string[]
string
`
{ "pollingBuildTargets": [ "android-builder", "default-ios" ] }

List all builds

GET /orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/builds

Description

List all running and finished builds, sorted by build number (optionally paginating the results). Use '_all' as the buildtargetid to get all configured build targets. The response includes a Content-Range header that identifies the range of results returned and the total number of results matching the given query parameters.

Required Permissions

project:user

Request Parameters

orgid

Organization identifier

path string
projectid

Project identifier

path string
buildtargetid

unique id auto-generated from the build target name

path string
include

Extra fields to include in the response

query string
per_page

Number of audit log records to retrieve

query number 25
page

Skip to page number, based on per_page value

query number 1
buildStatus

Query for only builds of a specific status

query string
platform

Query for only builds of a specific platform

query string
showDeleted

Query for builds that have been deleted

query boolean
onlyFavorites

Query for builds that have been favorited

query boolean
Default List curl -X GET -H "Content-Type: application/json" -H "Authorization: Basic [YOUR API KEY]" https://build-api.cloud.unity3d.com/api/v1/orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/builds With Paging curl -X GET -H "Content-Type: application/json" -H "Authorization: Basic [YOUR API KEY]" https://build-api.cloud.unity3d.com/api/v1/orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/builds?per_page=5&page=2 With Filtering curl -X GET -H "Content-Type: application/json" -H "Authorization: Basic [YOUR API KEY]" https://build-api.cloud.unity3d.com/api/v1/orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/builds?buildStatus=success&platform=ios # Default List buildsApi = BuildsApi(client) builds = buildsApi.get_builds('{orgid}', '{projectid}', '{buildtargetid}') # With Paging buildsApi = BuildsApi(client) builds = buildsApi.get_builds('{orgid}', '{projectid}', '{buildtargetid}', per_page=5, page=2) # With Filtering buildsApi = BuildsApi(client) builds = buildsApi.get_builds('{orgid}', '{projectid}', '{buildtargetid}', build_status='success', platform='ios')

Responses

Uses default content-types: application/json text/plain text/html text/csv

200 OK
object

buildattempt

build: number
buildtargetid: string

unique id auto-generated from the build target name

buildTargetName: string (up to 64 chars)
buildStatus: string , x ∈ { queued , sentToBuilder , started , restarted , success , failure , canceled , unknown }
failureDetails: object[]

list of failure details for this build attempt, when available

object
label: string
resolutionHint: string
stages: array
failureType: string
count: number
canceledBy: string , x ∈ { api , service }
platform: string , x ∈ { ios , android , webplayer , webgl , standaloneosxintel , standaloneosxintel64 , standaloneosxuniversal , standalonewindows , standalonewindows64 , standalonelinux , standalonelinux64 , standalonelinuxuniversal }
workspaceSize: number

size of workspace in bytes

created: string

when the build was created

finished: string

when the build completely finished

checkoutStartTime: string

when the build starting checking out code

checkoutTimeInSeconds: number

amount of time spent checking out code

buildStartTime: string

when the build started compiling

buildTimeInSeconds: number

amount of time spend compiling

publishStartTime: string

when the build started saving build artifacts

publishTimeInSeconds: number

amount of time spent saving build artifacts

totalTimeInSeconds: number

total time for the build

lastBuiltRevision: string

source control commit id for the build

changeset: object[]

a list of source control changes between this and the last build

object
favorited: boolean

if the build is marked as do not delete or not

label: string

description given when a build is favorited

deleted: boolean

if the build is deleted or not

deletedBy: string

email address of the user who deleted this attempt

queuedReason: string , x ∈ { targetConcurrency , cooldown , buildConcurrency , waitingForBuildAgent , evaluating , sentToBuilder }

reason the build is currently waiting

cooldownDate: string

time until this build will be reconsidered for building

scmBranch: string

scm branch to be built

unityVersion: string

'latest' or a unity dot version with underscores (ex. '4_6_5')

xcodeVersion: string

'latest' or a supported xcode version (ex. 'xcode7')

auditChanges: number
projectVersion: object
name: string

automatically generated name for the build

filename: string

filename for the primary artifact

projectName: string

name of the project

platform: string , x ∈ { ios , android , webplayer , webgl , standaloneosxintel , standaloneosxintel64 , standaloneosxuniversal , standalonewindows , standalonewindows64 , standalonelinux , standalonelinux64 , standalonelinuxuniversal }
size: number

size of the the primary build artifact in bytes

created: string

creation date

lastMod: string

last modified date

bundleId: string

a unique identifier (com.example.name)

udids: string[]

iPhone unique identifiers that are able to install this build

string
links: object

links to build artifacts

projectName: string
projectId: string
orgId: string
links: object
testResults: object

results from the build's unit & integration tests, if any

unit_test: object
integration_tests: object[]
object
error: string
`
[ { "orgId": example-org, "projectId": new-project, "projectName": new-project, "build": 2, "buildtargetid": "android-builder", "buildTargetName": "Android Builder", "buildStatus": "success", "platform": "android", "workspaceSize": 8911006, "created": "2015-07-14T21:56:28.202Z", "finished": "2015-07-14T22:04:10.000Z", "checkoutStartTime": "2015-07-14T22:00:20.000Z", "checkoutTimeInSeconds": 40, "buildStartTime": "2015-07-14T22:01:00.000Z", "buildTimeInSeconds": 152.386056, "publishStartTime": "2015-07-14T22:03:33.000Z", "publishTimeInSeconds": 10.371839, "totalTimeInSeconds": 461.798, "lastBuiltRevision": "88e565df27ca35c2603c29eb924dc018f32a22c1", "changeset": [], "favorited": false, "scmBranch": "master", "unityVersion": "latest", "auditChanges": 0, "projectVersion": { "name": "android-builder-2", "filename": "example-org/new-project/android-builder-2/android-builder.apk", "projectName": "New Project", "platform": "android", "size": 14452762, "created": "2015-07-14T22:03:45.847Z", "lastMod": "2015-07-14T22:03:46.251Z", "bundleId": "com.unity3d.example", "udids": [] }, "links": { "self": { "method": "get", "href": "/api/v1/orgs/example-org/projects/new-project/buildtargets/android-builder/builds/2" }, "log": { "method": "get", "href": "/api/v1/orgs/example-org/projects/new-project/buildtargets/android-builder/builds/2/log" }, "auditlog": { "method": "get", "href": "/api/v1/orgs/example-org/projects/new-project/buildtargets/android-builder/builds/2/auditlog" }, "download_primary": { "method": "get", "href": "https://unitycloud-build-user-svc-dev-build.s3.amazonaws.com/example-org/new-project/android-builder-2/android-builder.apk?AWSAccessKeyId=AKIAI6ZGSQWNDMF7X33A&Expires=1447890477&Signature=e9Hs%2FYECpVlrMITqCRY5dSWXChE%3D&response-content-disposition=attachment%3B%20filename%3Dexample-org%2Fnew-project-android-2-1436910988202.apk&response-content-type=application%2Foctet-stream", "meta": { "type": "APK" } }, "create_share": { "method": "post", "href": "/api/v1/orgs/example-org/projects/new-project/buildtargets/android-builder/builds/2/share" }, "revoke_share": { "method": "delete", "href": "/api/v1/orgs/example-org/projects/new-project/buildtargets/android-builder/builds/2/share" }, "icon": { "method": "get", "href": "https://unitycloud-build-user-svc-dev-extras-pub.s3.amazonaws.com/example-org/new-project/android-builder-2/icon.png" } } }, { "orgId": example-org, "projectId": new-project, "projectName": new-project, "build": 1, "buildtargetid": "android-builder", "buildTargetName": "Android Builder", "buildStatus": "success", "platform": "android", "workspaceSize": 8910982, "created": "2015-07-14T21:51:26.520Z", "finished": "2015-07-14T21:54:43.000Z", "checkoutStartTime": "2015-07-14T21:51:45.000Z", "checkoutTimeInSeconds": 41, "buildStartTime": "2015-07-14T21:52:26.000Z", "buildTimeInSeconds": 120.410226, "publishStartTime": "2015-07-14T21:54:27.000Z", "publishTimeInSeconds": 4.846675, "totalTimeInSeconds": 196.48, "lastBuiltRevision": "88e565df27ca35c2603c29eb924dc018f32a22c1", "changeset": [], "favorited": false, "scmBranch": "master", "unityVersion": "latest", "auditChanges": 0, "projectVersion": { "name": "android-builder-1", "filename": "example-org/new-project/android-builder-1/android-builder.apk", "projectName": "Example Unity Project", "platform": "android", "size": 14443743, "created": "2015-07-14T21:54:34.395Z", "lastMod": "2015-07-14T21:54:34.776Z", "bundleId": "com.tsugi.example", "udids": [] }, "links": { "self": { "method": "get", "href": "/api/v1/orgs/example-org/projects/new-project/buildtargets/android-builder/builds/1" }, "log": { "method": "get", "href": "/api/v1/orgs/example-org/projects/new-project/buildtargets/android-builder/builds/1/log" }, "auditlog": { "method": "get", "href": "/api/v1/orgs/example-org/projects/new-project/buildtargets/android-builder/builds/1/auditlog" }, "download_primary": { "method": "get", "href": "https://unitycloud-build-user-svc-dev-build.s3.amazonaws.com/example-org/new-project/android-builder-1/android-builder.apk?AWSAccessKeyId=AKIAI6ZGSQWNDMF7X33A&Expires=1447890477&Signature=5Z4ouUFyVIJ8jaChE%2F6K%2FMHHpiM%3D&response-content-disposition=attachment%3B%20filename%3Dexample-org%2Fnew-project-android-1-1436910686520.apk&response-content-type=application%2Foctet-stream", "meta": { "type": "APK" } }, "create_share": { "method": "post", "href": "/api/v1/orgs/example-org/projects/new-project/buildtargets/android-builder/builds/1/share" }, "revoke_share": { "method": "delete", "href": "/api/v1/orgs/example-org/projects/new-project/buildtargets/android-builder/builds/1/share" }, "icon": { "method": "get", "href": "https://unitycloud-build-user-svc-dev-extras-pub.s3.amazonaws.com/example-org/new-project/android-builder-1/icon.png" } } } ]

Create new build

POST /orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/builds

Description

Start the build process for this build target (or all targets, if '_all' is specified as the buildtargetid), if there is not one currently in process.

If a build is currently in process that information will be related in the 'error' field.

Required Permissions

project:user

Request Parameters

orgid

Organization identifier

path string
projectid

Project identifier

path string
buildtargetid

unique id auto-generated from the build target name

path string

Parameters are specified as application/json in the request body.

Options for starting the builds

{"properties":{"clean":{"type":"boolean"},"delay":{"type":"number"},"commit":{"type":"string"}}}
curl -X POST -d '{"clean": true, "delay": 30}' -H "Content-Type: application/json" -H "Authorization: Basic [YOUR API KEY]" https://build-api.cloud.unity3d.com/api/v1/orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/builds buildsApi = BuildsApi(client) status = buildsApi.start_builds('{orgid}', '{projectid}', '{buildtargetid}', options={"clean": True, "delay": 30})

Responses

Uses default content-types: application/json text/plain text/html text/csv

202 Accepted
object

buildattempt

build: number
buildtargetid: string

unique id auto-generated from the build target name

buildTargetName: string (up to 64 chars)
buildStatus: string , x ∈ { queued , sentToBuilder , started , restarted , success , failure , canceled , unknown }
failureDetails: object[]

list of failure details for this build attempt, when available

object
label: string
resolutionHint: string
stages: array
failureType: string
count: number
canceledBy: string , x ∈ { api , service }
platform: string , x ∈ { ios , android , webplayer , webgl , standaloneosxintel , standaloneosxintel64 , standaloneosxuniversal , standalonewindows , standalonewindows64 , standalonelinux , standalonelinux64 , standalonelinuxuniversal }
workspaceSize: number

size of workspace in bytes

created: string

when the build was created

finished: string

when the build completely finished

checkoutStartTime: string

when the build starting checking out code

checkoutTimeInSeconds: number

amount of time spent checking out code

buildStartTime: string

when the build started compiling

buildTimeInSeconds: number

amount of time spend compiling

publishStartTime: string

when the build started saving build artifacts

publishTimeInSeconds: number

amount of time spent saving build artifacts

totalTimeInSeconds: number

total time for the build

lastBuiltRevision: string

source control commit id for the build

changeset: object[]

a list of source control changes between this and the last build

object
favorited: boolean

if the build is marked as do not delete or not

label: string

description given when a build is favorited

deleted: boolean

if the build is deleted or not

deletedBy: string

email address of the user who deleted this attempt

queuedReason: string , x ∈ { targetConcurrency , cooldown , buildConcurrency , waitingForBuildAgent , evaluating , sentToBuilder }

reason the build is currently waiting

cooldownDate: string

time until this build will be reconsidered for building

scmBranch: string

scm branch to be built

unityVersion: string

'latest' or a unity dot version with underscores (ex. '4_6_5')

xcodeVersion: string

'latest' or a supported xcode version (ex. 'xcode7')

auditChanges: number
projectVersion: object
name: string

automatically generated name for the build

filename: string

filename for the primary artifact

projectName: string

name of the project

platform: string , x ∈ { ios , android , webplayer , webgl , standaloneosxintel , standaloneosxintel64 , standaloneosxuniversal , standalonewindows , standalonewindows64 , standalonelinux , standalonelinux64 , standalonelinuxuniversal }
size: number

size of the the primary build artifact in bytes

created: string

creation date

lastMod: string

last modified date

bundleId: string

a unique identifier (com.example.name)

udids: string[]

iPhone unique identifiers that are able to install this build

string
links: object

links to build artifacts

projectName: string
projectId: string
orgId: string
links: object
testResults: object

results from the build's unit & integration tests, if any

unit_test: object
integration_tests: object[]
object
error: string
`
Build Accepted [ { "build": 3, "buildtargetid": "android-builder", "buildTargetName": "Android Builder", "buildStatus": "queued", "platform": "a ndroid", "created": "2015-11-19T22:02:20.244Z", "changeset": [], "favorited": false, "auditChanges": 1, "links": { "self": { "method": "get", "href": "/api/v1/orgs/example-org/projects/new-project/buildtargets/default-ios/builds/3" }, "log": { "method": "get", "href": "/api/v1/orgs/example-org/projects/new-project/buildtargets/default-ios/builds/3/log" }, "auditlog": { "method": "get", "href": "/api/v1/orgs/example-org/projects/new-project/buildtargets/default-ios/builds/3/auditlog" }, "cancel": { "method": "delete", "href": "/api/v1/orgs/example-org/projects/new-project/buildtargets/default-ios/builds/3" } } } ] Build Already Started [ { "buildtargetid": "android-builder", "buildTargetName": "Android Builder", "error": "Cannot start build - already a build pending." } ]

Cancel all builds

DELETE /orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/builds

Description

Cancel all builds in progress for this build target (or all targets, if '_all' is specified as the buildtargetid). Canceling an already finished build will do nothing and respond successfully.

Required Permissions

project:user

Request Parameters

orgid

Organization identifier

path string
projectid

Project identifier

path string
buildtargetid

unique id auto-generated from the build target name

path string
curl -X DELETE -H "Content-Type: application/json" -H "Authorization: Basic [YOUR API KEY]" https://build-api.cloud.unity3d.com/api/v1/orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/builds buildsApi = BuildsApi(client) buildsApi.cancel_all_builds('{orgid}', '{projectid}', '{buildtargetid}')

Responses

Uses default content-types: application/json text/plain text/html text/csv

204 No Content
`

Build Status

GET /orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/builds/{number}

Description

Retrieve information for a specific build. A Build resource contains information related to a build attempt for a build target, including the build number, changeset, build times, and other pertinent data.

Required Permissions

project:user

Request Parameters

orgid

Organization identifier

path string
projectid

Project identifier

path string
buildtargetid

unique id auto-generated from the build target name

path string
number

Build number or in some cases _all

path string
include

Extra fields to include in the response

query string
curl -X GET -H "Content-Type: application/json" -H "Authorization: Basic [YOUR API KEY]" https://build-api.cloud.unity3d.com/api/v1/orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/builds/{number} buildsApi = BuildsApi(client) build = buildsApi.get_build('{orgid}', '{projectid}', '{buildtargetid}', '{number}')

Responses

Uses default content-types: application/json text/plain text/html text/csv

200 OK

buildattempt

build: number
buildtargetid: string

unique id auto-generated from the build target name

buildTargetName: string (up to 64 chars)
buildStatus: string , x ∈ { queued , sentToBuilder , started , restarted , success , failure , canceled , unknown }
failureDetails: object[]

list of failure details for this build attempt, when available

object
label: string
resolutionHint: string
stages: array
failureType: string
count: number
canceledBy: string , x ∈ { api , service }
platform: string , x ∈ { ios , android , webplayer , webgl , standaloneosxintel , standaloneosxintel64 , standaloneosxuniversal , standalonewindows , standalonewindows64 , standalonelinux , standalonelinux64 , standalonelinuxuniversal }
workspaceSize: number

size of workspace in bytes

created: string

when the build was created

finished: string

when the build completely finished

checkoutStartTime: string

when the build starting checking out code

checkoutTimeInSeconds: number

amount of time spent checking out code

buildStartTime: string

when the build started compiling

buildTimeInSeconds: number

amount of time spend compiling

publishStartTime: string

when the build started saving build artifacts

publishTimeInSeconds: number

amount of time spent saving build artifacts

totalTimeInSeconds: number

total time for the build

lastBuiltRevision: string

source control commit id for the build

changeset: object[]

a list of source control changes between this and the last build

object
favorited: boolean

if the build is marked as do not delete or not

label: string

description given when a build is favorited

deleted: boolean

if the build is deleted or not

deletedBy: string

email address of the user who deleted this attempt

queuedReason: string , x ∈ { targetConcurrency , cooldown , buildConcurrency , waitingForBuildAgent , evaluating , sentToBuilder }

reason the build is currently waiting

cooldownDate: string

time until this build will be reconsidered for building

scmBranch: string

scm branch to be built

unityVersion: string

'latest' or a unity dot version with underscores (ex. '4_6_5')

xcodeVersion: string

'latest' or a supported xcode version (ex. 'xcode7')

auditChanges: number
projectVersion: object
name: string

automatically generated name for the build

filename: string

filename for the primary artifact

projectName: string

name of the project

platform: string , x ∈ { ios , android , webplayer , webgl , standaloneosxintel , standaloneosxintel64 , standaloneosxuniversal , standalonewindows , standalonewindows64 , standalonelinux , standalonelinux64 , standalonelinuxuniversal }
size: number

size of the the primary build artifact in bytes

created: string

creation date

lastMod: string

last modified date

bundleId: string

a unique identifier (com.example.name)

udids: string[]

iPhone unique identifiers that are able to install this build

string
links: object

links to build artifacts

projectName: string
projectId: string
orgId: string
links: object
testResults: object

results from the build's unit & integration tests, if any

unit_test: object
integration_tests: object[]
object
error: string
`
{ "build": 2, "buildtargetid": "android-builder", "buildTargetName": "Android Builder", "buildStatus": "success", "platform": "android", "workspaceSize": 8911006, "created": "2015-07-14T21:56:28.202Z", "finished": "2015-07-14T22:04:10.000Z", "checkoutStartTime": "2015-07-14T22:00:20.000Z", "checkoutTimeInSeconds": 40, "buildStartTime": "2015-07-14T22:01:00.000Z", "buildTimeInSeconds": 152.386056, "publishStartTime": "2015-07-14T22:03:33.000Z", "publishTimeInSeconds": 10.371839, "totalTimeInSeconds": 461.798, "lastBuiltRevision": "88e565df27ca35c2603c29eb924dc018f32a22c1", "changeset": [], "favorited": true, "auditChanges": 0, "projectVersion": { "name": "android-builder-2", "filename": "example-org/new-project/android-builder-2/android-builder.apk", "projectName": "Example Unity Project", "platform": "android", "size": 14452762, "created": "2015-07-14T22:03:45.847Z", "lastMod": "2015-07-14T22:03:46.251Z", "bundleId": "com.tsugi.example", "udids": [] }, "links": { "self": { "method": "get", "href": "/api/v1/orgs/example-org/projects/new-project/buildtargets/android-builder/builds/2" }, "log": { "method": "get", "href": "/api/v1/orgs/example-org/projects/new-project/buildtargets/android-builder/builds/2/log" }, "auditlog": { "method": "get", "href": "/api/v1/orgs/example-org/projects/new-project/buildtargets/android-builder/builds/2/auditlog" }, "download_primary": { "method": "get", "href": "https://unitycloud-build-user-svc-dev-build.s3.amazonaws.com/example-org/new-project/android-builder-2/android-builder.apk?AWSAccessKeyId=AKIAI6ZGSQWNDMF7X33A&Expires=1447973385&Signature=ffKQIKOJsKN6qrwzxObXSSyCVts%3D&response-content-disposition=attachment%3B%20filename%3Dexample-org%2Fnew-project-android-2-1436910988202.apk&response-content-type=application%2Foctet-stream", "meta": { "type": "APK" } }, "create_share": { "method": "post", "href": "/api/v1/orgs/example-org/projects/new-project/buildtargets/android-builder/builds/2/share" }, "revoke_share": { "method": "delete", "href": "/api/v1/orgs/example-org/projects/new-project/buildtargets/android-builder/builds/2/share" }, "icon": { "method": "get", "href": "https://unitycloud-build-user-svc-dev-extras-pub.s3.amazonaws.com/example-org/new-project/android-builder-2/icon.png" } } }

Cancel build

DELETE /orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/builds/{number}

Description

Cancel a build in progress. Canceling an already finished build will do nothing and respond successfully.

Required Permissions

project:user

Request Parameters

orgid

Organization identifier

path string
projectid

Project identifier

path string
buildtargetid

unique id auto-generated from the build target name

path string
number

Build number or in some cases _all

path string
curl -X DELETE -H "Content-Type: application/json" -H "Authorization: Basic [YOUR API KEY]" https://build-api.cloud.unity3d.com/api/v1/orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/builds/{number} buildsApi = BuildsApi(client) build = buildsApi.cancel_build('{orgid}', '{projectid}', '{buildtargetid}', '{number}')

Responses

Uses default content-types: application/json text/plain text/html text/csv

204 No Content
`

Update build information

PUT /orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/builds/{number}

Description

Required Permissions

project:manager

Request Parameters

orgid

Organization identifier

path string
projectid

Project identifier

path string
buildtargetid

unique id auto-generated from the build target name

path string
number

Build number or in some cases _all

path string

Parameters are specified as application/json in the request body.

Options for build update

{"properties":{"favorited":{"type":"boolean"},"label":{"type":"string"}}}
curl -X PUT -H "Content-Type: application/json" -H "Authorization: Basic [YOUR API KEY]" -d '{"favorited": true}' https://build-api.cloud.unity3d.com/api/v1/orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/builds/{number} buildsApi = BuildsApi(client) build = buildsApi.cancel_build('{orgid}', '{projectid}', '{buildtargetid}', '{number}', {"favorited": true}) responses:

Responses

Uses default content-types: application/json text/plain text/html text/csv

200 OK

buildattempt

build: number
buildtargetid: string

unique id auto-generated from the build target name

buildTargetName: string (up to 64 chars)
buildStatus: string , x ∈ { queued , sentToBuilder , started , restarted , success , failure , canceled , unknown }
failureDetails: object[]

list of failure details for this build attempt, when available

object
label: string
resolutionHint: string
stages: array
failureType: string
count: number
canceledBy: string , x ∈ { api , service }
platform: string , x ∈ { ios , android , webplayer , webgl , standaloneosxintel , standaloneosxintel64 , standaloneosxuniversal , standalonewindows , standalonewindows64 , standalonelinux , standalonelinux64 , standalonelinuxuniversal }
workspaceSize: number

size of workspace in bytes

created: string

when the build was created

finished: string

when the build completely finished

checkoutStartTime: string

when the build starting checking out code

checkoutTimeInSeconds: number

amount of time spent checking out code

buildStartTime: string

when the build started compiling

buildTimeInSeconds: number

amount of time spend compiling

publishStartTime: string

when the build started saving build artifacts

publishTimeInSeconds: number

amount of time spent saving build artifacts

totalTimeInSeconds: number

total time for the build

lastBuiltRevision: string

source control commit id for the build

changeset: object[]

a list of source control changes between this and the last build

object
favorited: boolean

if the build is marked as do not delete or not

label: string

description given when a build is favorited

deleted: boolean

if the build is deleted or not

deletedBy: string

email address of the user who deleted this attempt

queuedReason: string , x ∈ { targetConcurrency , cooldown , buildConcurrency , waitingForBuildAgent , evaluating , sentToBuilder }

reason the build is currently waiting

cooldownDate: string

time until this build will be reconsidered for building

scmBranch: string

scm branch to be built

unityVersion: string

'latest' or a unity dot version with underscores (ex. '4_6_5')

xcodeVersion: string

'latest' or a supported xcode version (ex. 'xcode7')

auditChanges: number
projectVersion: object
name: string

automatically generated name for the build

filename: string

filename for the primary artifact

projectName: string

name of the project

platform: string , x ∈ { ios , android , webplayer , webgl , standaloneosxintel , standaloneosxintel64 , standaloneosxuniversal , standalonewindows , standalonewindows64 , standalonelinux , standalonelinux64 , standalonelinuxuniversal }
size: number

size of the the primary build artifact in bytes

created: string

creation date

lastMod: string

last modified date

bundleId: string

a unique identifier (com.example.name)

udids: string[]

iPhone unique identifiers that are able to install this build

string
links: object

links to build artifacts

projectName: string
projectId: string
orgId: string
links: object
testResults: object

results from the build's unit & integration tests, if any

unit_test: object
integration_tests: object[]
object
error: string
`
{ "build": 2, "buildtargetid": "android-builder", "buildTargetName": "Android Builder", "buildStatus": "success", "platform": "android", "workspaceSize": 8911006, "created": "2015-07-14T21:56:28.202Z", "finished": "2015-07-14T22:04:10.000Z", "checkoutStartTime": "2015-07-14T22:00:20.000Z", "checkoutTimeInSeconds": 40, "buildStartTime": "2015-07-14T22:01:00.000Z", "buildTimeInSeconds": 152.386056, "publishStartTime": "2015-07-14T22:03:33.000Z", "publishTimeInSeconds": 10.371839, "totalTimeInSeconds": 461.798, "lastBuiltRevision": "88e565df27ca35c2603c29eb924dc018f32a22c1", "changeset": [], "favorited": true, "auditChanges": 0, "projectVersion": { "name": "android-builder-2", "filename": "example-org/new-project/android-builder-2/android-builder.apk", "projectName": "Example Unity Project", "platform": "android", "size": 14452762, "created": "2015-07-14T22:03:45.847Z", "lastMod": "2015-07-14T22:03:46.251Z", "bundleId": "com.tsugi.example", "udids": [] }, "links": { "self": { "method": "get", "href": "/api/v1/orgs/example-org/projects/new-project/buildtargets/android-builder/builds/2" }, "log": { "method": "get", "href": "/api/v1/orgs/example-org/projects/new-project/buildtargets/android-builder/builds/2/log" }, "auditlog": { "method": "get", "href": "/api/v1/orgs/example-org/projects/new-project/buildtargets/android-builder/builds/2/auditlog" }, "download_primary": { "method": "get", "href": "https://unitycloud-build-user-svc-dev-build.s3.amazonaws.com/example-org/new-project/android-builder-2/android-builder.apk?AWSAccessKeyId=AKIAI6ZGSQWNDMF7X33A&Expires=1447973385&Signature=ffKQIKOJsKN6qrwzxObXSSyCVts%3D&response-content-disposition=attachment%3B%20filename%3Dexample-org%2Fnew-project-android-2-1436910988202.apk&response-content-type=application%2Foctet-stream", "meta": { "type": "APK" } }, "create_share": { "method": "post", "href": "/api/v1/orgs/example-org/projects/new-project/buildtargets/android-builder/builds/2/share" }, "revoke_share": { "method": "delete", "href": "/api/v1/orgs/example-org/projects/new-project/buildtargets/android-builder/builds/2/share" }, "icon": { "method": "get", "href": "https://unitycloud-build-user-svc-dev-extras-pub.s3.amazonaws.com/example-org/new-project/android-builder-2/icon.png" } } }

Get audit log

GET /orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/builds/{number}/auditlog

Description

Retrieve a list of settings changes between the last and current build.

Required Permissions

project:user

Request Parameters

orgid

Organization identifier

path string
projectid

Project identifier

path string
buildtargetid

unique id auto-generated from the build target name

path string
number

Build number or in some cases _all

path string
per_page

Number of audit log records to retrieve

query number 25
page

Skip to page number, based on per_page value

query number 1
curl -X GET -H "Content-Type: application/json" -H "Authorization: Basic [YOUR API KEY]" https://build-api.cloud.unity3d.com/api/v1/orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/builds/{number}/auditlog buildsApi = BuildsApi(client) auditlog = buildsApi.get_audit_log('{orgid}', '{projectid}', '{buildtargetid}', '{number}')

Responses

Uses default content-types: application/json text/plain text/html text/csv

200 OK
object
updatingUserEmail: string (email)
updated: string (dateTime)
lines: object[]
object
label: string
field: string
to: string
from: string
`
[ { "updatingUserEmail": "julie.smith@example.org", "updated": "2015-08-04T17:18:24.532Z", "lines": [{ "from": "Latest 4.x", "to": "4.6.5", "label": "Unity version", "field": "buildtarget.settings.unityVersion" }] }, { "updatingUserEmail": "sandra.johnson@example.org", "updated": "2015-08-02T12:02:44.532Z", "lines": [{ "label": "Keypass", "field": "buildtarget.settings.platform.keystoreInfo.keypass", "from": "", "to": "changed" }] } ]

List all builds for org

GET /orgs/{orgid}/builds

Description

List all running and finished builds, sorted by build number (optionally paginating the results). The response includes a Content-Range header that identifies the range of results returned and the total number of results matching the given query parameters.

Required Permissions

org:user

Request Parameters

orgid

Organization identifier

path string
include

Extra fields to include in the response

query string
per_page

Number of audit log records to retrieve

query number 25
page

Skip to page number, based on per_page value

query number 1
buildStatus

Query for only builds of a specific status

query string
platform

Query for only builds of a specific platform

query string
showDeleted

Query for builds that have been deleted

query boolean
onlyFavorites

Query for builds that have been favorited

query boolean
Default List curl -X GET -H "Content-Type: application/json" -H "Authorization: Basic [YOUR API KEY]" https://build-api.cloud.unity3d.com/api/v1/orgs/{orgid}/builds With Paging curl -X GET -H "Content-Type: application/json" -H "Authorization: Basic [YOUR API KEY]" https://build-api.cloud.unity3d.com/api/v1/orgs/{orgid}/builds?per_page=5&page=2 With Filtering curl -X GET -H "Content-Type: application/json" -H "Authorization: Basic [YOUR API KEY]" https://build-api.cloud.unity3d.com/api/v1/orgs/{orgid}/builds?buildStatus=success&platform=ios

Responses

Uses default content-types: application/json text/plain text/html text/csv

200 OK
object

buildattempt

build: number
buildtargetid: string

unique id auto-generated from the build target name

buildTargetName: string (up to 64 chars)
buildStatus: string , x ∈ { queued , sentToBuilder , started , restarted , success , failure , canceled , unknown }
failureDetails: object[]

list of failure details for this build attempt, when available

object
label: string
resolutionHint: string
stages: array
failureType: string
count: number
canceledBy: string , x ∈ { api , service }
platform: string , x ∈ { ios , android , webplayer , webgl , standaloneosxintel , standaloneosxintel64 , standaloneosxuniversal , standalonewindows , standalonewindows64 , standalonelinux , standalonelinux64 , standalonelinuxuniversal }
workspaceSize: number

size of workspace in bytes

created: string

when the build was created

finished: string

when the build completely finished

checkoutStartTime: string

when the build starting checking out code

checkoutTimeInSeconds: number

amount of time spent checking out code

buildStartTime: string

when the build started compiling

buildTimeInSeconds: number

amount of time spend compiling

publishStartTime: string

when the build started saving build artifacts

publishTimeInSeconds: number

amount of time spent saving build artifacts

totalTimeInSeconds: number

total time for the build

lastBuiltRevision: string

source control commit id for the build

changeset: object[]

a list of source control changes between this and the last build

object
favorited: boolean

if the build is marked as do not delete or not

label: string

description given when a build is favorited

deleted: boolean

if the build is deleted or not

deletedBy: string

email address of the user who deleted this attempt

queuedReason: string , x ∈ { targetConcurrency , cooldown , buildConcurrency , waitingForBuildAgent , evaluating , sentToBuilder }

reason the build is currently waiting

cooldownDate: string

time until this build will be reconsidered for building

scmBranch: string

scm branch to be built

unityVersion: string

'latest' or a unity dot version with underscores (ex. '4_6_5')

xcodeVersion: string

'latest' or a supported xcode version (ex. 'xcode7')

auditChanges: number
projectVersion: object
name: string

automatically generated name for the build

filename: string

filename for the primary artifact

projectName: string

name of the project

platform: string , x ∈ { ios , android , webplayer , webgl , standaloneosxintel , standaloneosxintel64 , standaloneosxuniversal , standalonewindows , standalonewindows64 , standalonelinux , standalonelinux64 , standalonelinuxuniversal }
size: number

size of the the primary build artifact in bytes

created: string

creation date

lastMod: string

last modified date

bundleId: string

a unique identifier (com.example.name)

udids: string[]

iPhone unique identifiers that are able to install this build

string
links: object

links to build artifacts

projectName: string
projectId: string
orgId: string
links: object
testResults: object

results from the build's unit & integration tests, if any

unit_test: object
integration_tests: object[]
object
error: string
`
[ { "orgId": example-org, "projectId": new-project, "projectName": new-project, "build": 2, "buildtargetid": "android-builder", "buildTargetName": "Android Builder", "buildStatus": "success", "platform": "android", "workspaceSize": 8911006, "created": "2015-07-14T21:56:28.202Z", "finished": "2015-07-14T22:04:10.000Z", "checkoutStartTime": "2015-07-14T22:00:20.000Z", "checkoutTimeInSeconds": 40, "buildStartTime": "2015-07-14T22:01:00.000Z", "buildTimeInSeconds": 152.386056, "publishStartTime": "2015-07-14T22:03:33.000Z", "publishTimeInSeconds": 10.371839, "totalTimeInSeconds": 461.798, "lastBuiltRevision": "88e565df27ca35c2603c29eb924dc018f32a22c1", "changeset": [], "favorited": false, "scmBranch": "master", "unityVersion": "latest", "auditChanges": 0, "projectVersion": { "name": "android-builder-2", "filename": "example-org/new-project/android-builder-2/android-builder.apk", "projectName": "New Project", "platform": "android", "size": 14452762, "created": "2015-07-14T22:03:45.847Z", "lastMod": "2015-07-14T22:03:46.251Z", "bundleId": "com.unity3d.example", "udids": [] }, "links": { "self": { "method": "get", "href": "/api/v1/orgs/example-org/projects/new-project/buildtargets/android-builder/builds/2" }, "log": { "method": "get", "href": "/api/v1/orgs/example-org/projects/new-project/buildtargets/android-builder/builds/2/log" }, "auditlog": { "method": "get", "href": "/api/v1/orgs/example-org/projects/new-project/buildtargets/android-builder/builds/2/auditlog" }, "download_primary": { "method": "get", "href": "https://unitycloud-build-user-svc-dev-build.s3.amazonaws.com/example-org/new-project/android-builder-2/android-builder.apk?AWSAccessKeyId=AKIAI6ZGSQWNDMF7X33A&Expires=1447890477&Signature=e9Hs%2FYECpVlrMITqCRY5dSWXChE%3D&response-content-disposition=attachment%3B%20filename%3Dexample-org%2Fnew-project-android-2-1436910988202.apk&response-content-type=application%2Foctet-stream", "meta": { "type": "APK" } }, "create_share": { "method": "post", "href": "/api/v1/orgs/example-org/projects/new-project/buildtargets/android-builder/builds/2/share" }, "revoke_share": { "method": "delete", "href": "/api/v1/orgs/example-org/projects/new-project/buildtargets/android-builder/builds/2/share" }, "icon": { "method": "get", "href": "https://unitycloud-build-user-svc-dev-extras-pub.s3.amazonaws.com/example-org/new-project/android-builder-2/icon.png" } } }, { "orgId": example-org, "projectId": new-project, "projectName": new-project, "build": 1, "buildtargetid": "android-builder", "buildTargetName": "Android Builder", "buildStatus": "success", "platform": "android", "workspaceSize": 8910982, "created": "2015-07-14T21:51:26.520Z", "finished": "2015-07-14T21:54:43.000Z", "checkoutStartTime": "2015-07-14T21:51:45.000Z", "checkoutTimeInSeconds": 41, "buildStartTime": "2015-07-14T21:52:26.000Z", "buildTimeInSeconds": 120.410226, "publishStartTime": "2015-07-14T21:54:27.000Z", "publishTimeInSeconds": 4.846675, "totalTimeInSeconds": 196.48, "lastBuiltRevision": "88e565df27ca35c2603c29eb924dc018f32a22c1", "changeset": [], "favorited": false, "scmBranch": "master", "unityVersion": "latest", "auditChanges": 0, "projectVersion": { "name": "android-builder-1", "filename": "example-org/new-project/android-builder-1/android-builder.apk", "projectName": "Example Unity Project", "platform": "android", "size": 14443743, "created": "2015-07-14T21:54:34.395Z", "lastMod": "2015-07-14T21:54:34.776Z", "bundleId": "com.tsugi.example", "udids": [] }, "links": { "self": { "method": "get", "href": "/api/v1/orgs/example-org/projects/new-project/buildtargets/android-builder/builds/1" }, "log": { "method": "get", "href": "/api/v1/orgs/example-org/projects/new-project/buildtargets/android-builder/builds/1/log" }, "auditlog": { "method": "get", "href": "/api/v1/orgs/example-org/projects/new-project/buildtargets/android-builder/builds/1/auditlog" }, "download_primary": { "method": "get", "href": "https://unitycloud-build-user-svc-dev-build.s3.amazonaws.com/example-org/new-project/android-builder-1/android-builder.apk?AWSAccessKeyId=AKIAI6ZGSQWNDMF7X33A&Expires=1447890477&Signature=5Z4ouUFyVIJ8jaChE%2F6K%2FMHHpiM%3D&response-content-disposition=attachment%3B%20filename%3Dexample-org%2Fnew-project-android-1-1436910686520.apk&response-content-type=application%2Foctet-stream", "meta": { "type": "APK" } }, "create_share": { "method": "post", "href": "/api/v1/orgs/example-org/projects/new-project/buildtargets/android-builder/builds/1/share" }, "revoke_share": { "method": "delete", "href": "/api/v1/orgs/example-org/projects/new-project/buildtargets/android-builder/builds/1/share" }, "icon": { "method": "get", "href": "https://unitycloud-build-user-svc-dev-extras-pub.s3.amazonaws.com/example-org/new-project/android-builder-1/icon.png" } } } ]

Cancel builds for org

DELETE /orgs/{orgid}/builds

Description

Cancel all in progress builds for an organization. Canceling an already finished build will do nothing and respond successfully.

Required Permissions

org:user

Request Parameters

orgid

Organization identifier

path string
curl -X DELETE -H "Content-Type: application/json" -H "Authorization: Basic [YOUR API KEY]" https://build-api.cloud.unity3d.com/api/v1/orgs/{orgid}/builds buildsApi = BuildsApi(client) build = buildsApi.cancel_builds_for_org('{orgid}')

Responses

Uses default content-types: application/json text/plain text/html text/csv

204 No Content
`

Get build log

GET /orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/builds/{number}/log

Description

Retrieve the plain text log for a specifc build.

Required Permissions

project:user

Request Parameters

orgid

Organization identifier

path string
projectid

Project identifier

path string
buildtargetid

unique id auto-generated from the build target name

path string
number

Build number or in some cases _all

path string
offsetlines

Stream log from the given line number

query number 1
linenumbers

Include log line numbers in the text output

query boolean
compact

Return the compact log, showing only errors and warnings

query boolean
withHtml

Surround important lines (errors, warnings) with SPAN and CSS markup

query boolean
Retrieve full log curl -X GET -H "Content-Type: application/json" -H "Authorization: Basic [YOUR API KEY]" https://build-api.cloud.unity3d.com/api/v1/orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/builds/{number}/log Retrieve HTML compact log curl -X GET -H "Content-Type: application/json" -H "Authorization: Basic [YOUR API KEY]" https://build-api.cloud.unity3d.com/api/v1/orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/builds/{number}/log?compact=true&withHtml=true # Retrieve full log buildsApi = BuildsApi(client) log = buildsApi.get_build_log('{orgid}', '{projectid}', '{buildtargetid}', '{number}') # Retrieve HTML compact log log = buildsApi.get_build_log('{orgid}', '{projectid}', '{buildtargetid}', '{number}', 1, compact='true', with_html='true')

Responses

Uses default content-types: application/json text/plain text/html text/csv

200 OK
`
Full text log Running Prebuild steps done. bvr 0.2.47 bvr-api 0.0.41 Using strategy: Default Cloning the remote Git repository ... WORKSPACESIZE | ARTIFACTSSIZE 8.50 MiB | 13.81 MiB Publishing build 2 of example-org/new-project for target 'android-builder'... Uploading /BUILD_PATH/example-org.new-project.android-builder/.build/last/android-builder/android-builder.apk ...done Uploading /BUILD_PATH/example-org.new-project.android-builder/.build/last/android-builder/extra_data/artifacts/icon.png ...done publishing finished successfully. done. postbuildstatus finished successfully. Deleting project workspace... Finished: SUCCESS Compact text log [Unity] Initialize engine version: 4.6.4f1 (99f88340878d) [Unity] Initialize engine version: 4.6.4f1 (99f88340878d) [Unity] Finished exporting player successfully. Warning: publishing finished successfully. Finished: SUCCESS Compact HTML log <span class="log_important_line">[Unity] <span class="log_important">Initialize engine version: </span>4.6.4f1 (99f88340878d)</span> <span class="log_important_line">[Unity] <span class="log_important">Initialize engine version: </span>4.6.4f1 (99f88340878d)</span> <span class="log_success_line">[Unity] <span class="log_success">Finished exporting player successfully.</span></span> <span class="log_warning_line"> <span class="log_warning">Warning</span>: </span> <span class="log_success_line"><span class="log_success">publishing finished successfully</span>.</span> <span class="log_success_line"><span class="log_success">Finished: SUCCESS</span></span>
default
error: string
`

Get the share link

GET /orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/builds/{number}/share

Description

Gets a share link if it exists

Required Permissions

project:user

Request Parameters

orgid

Organization identifier

path string
projectid

Project identifier

path string
buildtargetid

unique id auto-generated from the build target name

path string
number

Build number or in some cases _all

path string
curl -X GET -H "Content-Type: application/json" -H "Authorization: Basic [YOUR API KEY]" https://build-api.cloud.unity3d.com/api/v1/orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/builds/{number}/share buildsApi = BuildsApi(client) share = buildsApi.get_share('{orgid}', '{projectid}', '{buildtargetid}', '{number}')

Responses

Uses default content-types: application/json text/plain text/html text/csv

200 OK
shareid: string
`
{ "shareid": "bJ5Pu6RYFl" }
404 Not Found
`

Create a new link to share a project

POST /orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/builds/{number}/share

Description

Create a new short link to share a project. If this is called when a share already exists, that share will be revoked and a new one created.

Required Permissions

project:user

Request Parameters

orgid

Organization identifier

path string
projectid

Project identifier

path string
buildtargetid

unique id auto-generated from the build target name

path string
number

Build number or in some cases _all

path string

application/x-www-form-urlencoded

curl -X POST -H "Content-Type: application/json" -H "Authorization: Basic [YOUR API KEY]" https://build-api.cloud.unity3d.com/api/v1/orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/builds/{number}/share buildsApi = BuildsApi(client) share = buildsApi.create_share('{orgid}', '{projectid}', '{buildtargetid}', '{number}')

Responses

Uses default content-types: application/json text/plain text/html text/csv

201 Created
shareid: string
`
{ "shareid": "bJ5Pu6RYFl" }
404 Not Found
`

Revoke a shared link

DELETE /orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/builds/{number}/share

Description

Revoke a shared link, both {buildtargetid} and {number} may use _all to revoke all share links for a given buildtarget or entire project.

Required Permissions

project:user

Request Parameters

orgid

Organization identifier

path string
projectid

Project identifier

path string
buildtargetid

unique id auto-generated from the build target name

path string
number

Build number or in some cases _all

path string
curl -X DELETE -H "Content-Type: application/json" -H "Authorization: Basic [YOUR API KEY]" https://build-api.cloud.unity3d.com/api/v1/orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/builds/{number}/share buildsApi = BuildsApi(client) share = buildsApi.revoke_share('{orgid}', '{projectid}', '{buildtargetid}', '{number}')

Responses

Uses default content-types: application/json text/plain text/html text/csv

204 No Content
`
404 Not Found
`

Buildtargets Introduction

Build Targets are the configuration to build a project for a specific platform and/or source control branch.

List all build targets for a project

GET /orgs/{orgid}/projects/{projectid}/buildtargets

Description

Gets all configured build targets for a project, regardless of whether they are enabled. Add "?include=settings,credentials" as a query parameter to include the build target settings and credentials with the response.

Required Permissions

project:user

Request Parameters

orgid

Organization identifier

path string
projectid

Project identifier

path string
include

Extra fields to include in the response

query string
include_last_success

Include last successful build

query boolean
curl -X GET -H "Authorization: Basic [YOUR API KEY]" https://build-api.cloud.unity3d.com/api/v1/orgs/{orgid}/projects/{projectid}/buildtargets buildtargetsApi = BuildtargetsApi(client) buildtargets = buildtargetsApi.get_build_targets('{orgid}', '{projectid}')

Responses

Uses default content-types: application/json text/plain text/html text/csv

200 OK
object
name: string (up to 64 chars)
platform: string , x ∈ { ios , android , webplayer , webgl , standaloneosxintel , standaloneosxintel64 , standaloneosxuniversal , standalonewindows , standalonewindows64 , standalonelinux , standalonelinux64 , standalonelinuxuniversal }
buildtargetid: string

unique id auto-generated from the build target name

enabled: boolean

whether this target can be built by the API

settings: object
autoBuild: boolean

start builds automatically when your repo is updated

unityVersion: string

'latest' or a unity dot version with underscores (ex. '4_6_5')

executablename: string
scm: object
type: string , x ∈ { git , svn , p4 , hg , collab }
branch: string
subdirectory: string

subdirectory to build from

client: string

perforce only client workspace to build from

platform: object
bundleId: string

a unique identifier (com.example.name)

xcodeVersion: string

'latest' or a supported xcode version (ex. 'xcode7')

advanced: object
xcode: object
useArchiveAndExport: boolean
unity: object
preExportMethod: string

The fully-qualified name of a public static method you want us to call before we start the Unity build process. For example: ClassName.NeatMethod or NameSpace.ClassName.NeatMethod. No trailing parenthesis, and it can't have the same name as your Post-Export method!

postExportMethod: string

The fully-qualified name of a public static method you want us to call after we finish the Unity build process (but before Xcode). For example: ClassName.CoolMethod or NameSpace.ClassName.CoolMethod. No trailing parenthesis, and it can't have the same name as your Post-Export method! This method must accept a string parameter, which will receive the path to the exported Unity player (or Xcode project in the case of iOS).

preBuildScript: string

Relative path to the script that should be run before the build process starts.

postBuildScript: string

Relative path to the script that should be run after the build process finishes.

scriptingDefineSymbols: string

Enter the names of the symbols you want to define for iOS. These symbols can then be used as the conditions for #if directives just like the built-in ones. (i.e. #IF MYDEFINE or #IF AMAZON)

playerExporter: object
sceneList: string[]

A list of scenes to build overriding those specified in the Build Settings menu of your Unity project.

string

scene names

buildOptions: string[]

Unity Editor build options. Use BuildOptions.Development and BuildOptions.AllowDebugging to create a development build.

string
playerSettings: object
Android: object
useAPKExpansionFiles: boolean

break up android apk into an installable apk and expansion files

editorUserBuildSettings: object
androidBuildSystem: string , x ∈ { internal , gradle }

which android build system to build with (android only, supported in Unity 5.5+)

runUnitTests: boolean

Run any unit tests your project has when a build happens.

assetBundles: object
buildBundles: boolean

enable asset bundle builds for this target

basePath: string

base path relative to Assets folder where asset bundles are output. Default is 'AssetBundles'

buildAssetBundleOptions: string

comma separated list of flags from BuildAssetBundleOptions. see https://docs.unity3d.com/ScriptReference/BuildAssetBundleOptions.html

copyToStreamingAssets: boolean

copy bundles to streaming assets folder, which will be packaged into the exported player.

copyBundlePatterns: string[]

array of patterns to match (C# Regular Expressions) when copying asset bundle files. By default, all bundles will be copied.

string
failedUnitTestFailsBuild: boolean

Mark builds as failed if the unit tests do not pass.

unitTestMethod: string

The Unity method to call when running unit tests.

integrationTestMethod: string

The Unity method to call when running integration tests.

failedIntegrationTestFailsBuild: boolean

Mark build as failed if integration tests do not pass.

integrationTestSceneList: string[]

The collection of scenes to run integration tests within.

string
credentials: object
signing: object
credentialid: string
credentialResourceRef: object
platform: string , x ∈ { ios , android , webplayer , webgl , standaloneosxintel , standaloneosxintel64 , standaloneosxuniversal , standalonewindows , standalonewindows64 , standalonelinux , standalonelinux64 , standalonelinuxuniversal }
label: string
credentialid: string
created: string
lastMod: string
certificate: object
teamId: string

generated team id from Apple

certName: string

certificate name (from the certificate)

expiration: string

expiration date

isDistribution: boolean

if this is a distribution certificate

uploaded: string

uploaded date

provisioningProfile: object
teamId: string

generated team id from Apple

bundleId: string

a unique identifier (com.example.name)

uuid: string

generated UUID of the profile

expiration: string

expiration date

isEnterpriseProfile: boolean

is this compiled for Apple's enterprise program

type: string , x ∈ { developer , adhoc , appstore }
numDevices: number

number of devices provisioned for this certificate

uploaded: string

uploaded date

keystore: object
alias: string

friendly name for keystore

debug: boolean

whether this is a debug or production keystore

links: object
builds: object[]
object

buildattempt

build: number
buildtargetid: string

unique id auto-generated from the build target name

buildTargetName: string (up to 64 chars)
buildStatus: string , x ∈ { queued , sentToBuilder , started , restarted , success , failure , canceled , unknown }
failureDetails: object[]

list of failure details for this build attempt, when available

object
label: string
resolutionHint: string
stages: array
failureType: string
count: number
canceledBy: string , x ∈ { api , service }
platform: string , x ∈ { ios , android , webplayer , webgl , standaloneosxintel , standaloneosxintel64 , standaloneosxuniversal , standalonewindows , standalonewindows64 , standalonelinux , standalonelinux64 , standalonelinuxuniversal }
workspaceSize: number

size of workspace in bytes

created: string

when the build was created

finished: string

when the build completely finished

checkoutStartTime: string

when the build starting checking out code

checkoutTimeInSeconds: number

amount of time spent checking out code

buildStartTime: string

when the build started compiling

buildTimeInSeconds: number

amount of time spend compiling

publishStartTime: string

when the build started saving build artifacts

publishTimeInSeconds: number

amount of time spent saving build artifacts

totalTimeInSeconds: number

total time for the build

lastBuiltRevision: string

source control commit id for the build

changeset: object[]

a list of source control changes between this and the last build

object
favorited: boolean

if the build is marked as do not delete or not

label: string

description given when a build is favorited

deleted: boolean

if the build is deleted or not

deletedBy: string

email address of the user who deleted this attempt

queuedReason: string , x ∈ { targetConcurrency , cooldown , buildConcurrency , waitingForBuildAgent , evaluating , sentToBuilder }

reason the build is currently waiting

cooldownDate: string

time until this build will be reconsidered for building

scmBranch: string

scm branch to be built

unityVersion: string

'latest' or a unity dot version with underscores (ex. '4_6_5')

xcodeVersion: string

'latest' or a supported xcode version (ex. 'xcode7')

auditChanges: number
projectVersion: object
name: string

automatically generated name for the build

filename: string

filename for the primary artifact

projectName: string

name of the project

platform: string , x ∈ { ios , android , webplayer , webgl , standaloneosxintel , standaloneosxintel64 , standaloneosxuniversal , standalonewindows , standalonewindows64 , standalonelinux , standalonelinux64 , standalonelinuxuniversal }
size: number

size of the the primary build artifact in bytes

created: string

creation date

lastMod: string

last modified date

bundleId: string

a unique identifier (com.example.name)

udids: string[]

iPhone unique identifiers that are able to install this build

string
links: object

links to build artifacts

projectName: string
projectId: string
orgId: string
links: object
testResults: object

results from the build's unit & integration tests, if any

unit_test: object
integration_tests: object[]
object
error: string
links: object
`
[ { "name": "Default WebGL", "platform": "webgl", "buildtargetid": "default-webgl", "enabled": true, "links": { "self": { "method": "get", "href": "/api/v1/orgs/example-org/projects/new-project/buildtargets/default-webgl" }, "start_builds": { "method": "post", "href": "/api/v1/orgs/example-org/projects/new-project/buildtargets/default-webgl/builds" }, "list_builds": { "method": "get", "href": "/api/v1/orgs/example-org/projects/new-project/buildtargets/default-webgl/builds" }, "cancel_builds": { "method": "delete", "href": "/api/v1/orgs/example-org/projects/new-project/buildtargets/default-webgl/builds" }, "polling": { "method": "post", "href": "/api/v1/orgs/example-org/projects/new-project/buildtargets/default-webgl/polling" } } }, { "name": "Default Linux desktop Universal", "platform": "standalonelinuxuniversal", "buildtargetid": "default-linux-desktop-universal", "enabled": true, "links": { "self": { "method": "get", "href": "/api/v1/orgs/example-org/projects/new-project/buildtargets/default-linux-desktop-universal" }, "start_builds": { "method": "post", "href": "/api/v1/orgs/example-org/projects/new-project/buildtargets/default-linux-desktop-universal/builds" }, "list_builds": { "method": "get", "href": "/api/v1/orgs/example-org/projects/new-project/buildtargets/default-linux-desktop-universal/builds" }, "cancel_builds": { "method": "delete", "href": "/api/v1/orgs/example-org/projects/new-project/buildtargets/default-linux-desktop-universal/builds" }, "polling": { "method": "post", "href": "/api/v1/orgs/example-org/projects/new-project/buildtargets/default-linux-desktop-universal/polling" } } } ]

Create build target for a project

POST /orgs/{orgid}/projects/{projectid}/buildtargets

Description

Required Permissions

project:manager

Request Parameters

orgid

Organization identifier

path string
projectid

Project identifier

path string

Parameters are specified as application/json in the request body.

Options for build target create/update

{"properties":{"name":{"type":"string","maxLength":64},"platform":{"type":"string","enum":["ios","android","webplayer","webgl","standaloneosxintel","standaloneosxintel64","standaloneosxuniversal","standalonewindows","standalonewindows64","standalonelinux","standalonelinux64","standalonelinuxuniversal"]},"enabled":{"type":"boolean"},"settings":{"properties":{"autoBuild":{"description":"start builds automatically when your repo is updated","type":"boolean"},"unityVersion":{"description":"'latest' or a unity dot version with underscores (ex. '4_6_5')","type":"string"},"executablename":{"type":"string"},"scm":{"properties":{"type":{"enum":["git","svn","p4","hg","collab"],"type":"string"},"branch":{"type":"string"},"subdirectory":{"description":"subdirectory to build from","type":"string"},"client":{"description":"perforce only client workspace to build from","type":"string"}}},"platform":{"properties":{"bundleId":{"description":"a unique identifier (com.example.name)","type":"string"},"xcodeVersion":{"description":"'latest' or a supported xcode version (ex. 'xcode7')","type":"string"}}},"advanced":{"properties":{"xcode":{"properties":{"useArchiveAndExport":{"type":"boolean"}}},"unity":{"properties":{"preExportMethod":{"description":"The fully-qualified name of a public static method you want us to call before we start the Unity build process.\nFor example: ClassName.NeatMethod or NameSpace.ClassName.NeatMethod.\nNo trailing parenthesis, and it can't have the same name as your Post-Export method!","type":"string"},"postExportMethod":{"description":"The fully-qualified name of a public static method you want us to call after we finish the Unity build process\n(but before Xcode). For example: ClassName.CoolMethod or NameSpace.ClassName.CoolMethod. No trailing parenthesis,\nand it can't have the same name as your Post-Export method! This method must accept a string parameter, which\nwill receive the path to the exported Unity player (or Xcode project in the case of iOS).","type":"string"},"preBuildScript":{"description":"Relative path to the script that should be run before the build process starts.","type":"string"},"postBuildScript":{"description":"Relative path to the script that should be run after the build process finishes.","type":"string"},"scriptingDefineSymbols":{"description":"Enter the names of the symbols you want to define for iOS. These symbols can then be used as the condi