Unity Cloud Build
NOTE: As of February 15, 2023, any automation using this API should support redirects for all endpoints to avoid any disruptions in the future.
This API is intended to be used in conjunction with Unity Cloud Build.
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 by selecting Settings under DevOps > Cloud Build at https://dashboard.unity3d.com/cloud-build
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
Identifiers
It should not be assumed that any of the identifiers used in paths will be a perfect match
for your user-entered information. If you see unexpected 403s or 404s from API calls then check your
identifiers match the ones used by the API. In particular, projectId
does NOT typically
change when the project is renamed and in fact may not be a direct match for the project name even
at initial creation time.
To avoid confusion we recommend that instead of using the human-readable autogenerated orgId and projectId available from the API you should instead use:
- org foreign key for
orgId
(available from project APIs asorgFk
and org APIs ascoreForeignKey
) guid
forprojectId
All links generated by the API and the Dashboard should follow this format already, making it easy to figure out the correct parameters by making a comparison.
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 at cloudbuild@unity3d.com 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
Get billing plan
Description
Get the billing plan for the specified organization (but pull from project)
Required Permissions
Request Parameters
Responses
Uses default content-types: application/json text/plain text/html text/csv
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
Description
Retrieve a list of historical settings changes for this build target.
Required Permissions
Request Parameters
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
- updatingUserEmail: string
-
- 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).
Description
Required Permissions
Request Parameters
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
Delete all artifacts associated with a specific build
Description
Required Permissions
Request Parameters
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
Delete artifacts for a batch of builds
Description
Delete all artifacts whose build target ids and build numbers are included in the builds array. Alternatively, delete all builds that match a given filter, excluding builds from the operation by including their build target ids and build numbers in the excludedBuilds array (the allWithExclusions query parameter must be set to true for this to work). Builds that are favorited, or whose status does not match one of the following statuses, will not be deleted: success, failure, canceled, unknown.
Required Permissions
Request Parameters
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
- numberOfDeletedBuildArtifacts: number
-
List all 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
Request Parameters
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
buildattempt
- build: number
-
- buildtargetid: string
-
unique id auto-generated from the build target name
- buildTargetName: string (up to 64 chars)
-
- buildGUID: string
-
unique GUID identifying this build
- buildStatus: string , x ∈ { created , queued , sentToBuilder , started , restarted , success , failure , canceled , unknown }
-
- cleanBuild: boolean
-
if the build was built without using data cached from previous builds
- failureDetails: object[]
-
list of failure details for this build attempt, when available
object - label: string
-
- resolutionHint: string
-
- stages: string[]
-
string - failureType: string
-
- count: number
-
- canceledBy: string , x ∈ { api , service , service-timelimit , concurrency-timelimit , restart-limit , evaluation-timelimit , jenkins-timelimit , service-badconfiguration , billing-invalidsubscription }
-
- platform: string , x ∈ { ios , android , webplayer , webgl , standaloneosxintel , standaloneosxintel64 , standaloneosxuniversal , standalonewindows , standalonewindows64 , standalonelinux , standalonelinux64 , standalonelinuxuniversal , wsaplayer }
-
- 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
- billableTimeInSeconds: number
-
total billable time for the build
- unitTestTimeInSeconds: number
-
total time for unit test execution step
- editModeTestTimeInSeconds: number
-
total time for unit test execution step
- playModeTestTimeInSeconds: number
-
total time for unit test execution step
- 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
- headless: object
-
if the build was built to run in linux headless mode
- credentialsOutdated: boolean
-
if a newer credential has been attached to this buildtarget and the build can be re-signed
- deletedBy: string
-
email address of the user who deleted this attempt
- queuedReason: string , x ∈ { targetConcurrency , cooldown , billingService , buildConcurrency , concurrency , waitingForBuildAgent , evaluating , sentToBuilder , notPending }
-
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 , wsaplayer }
-
- 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
-
- projectGuid: string
-
- orgId: string
-
- orgFk: string
-
- filetoken: string
-
- links: object
-
- artifacts: object[]
-
object
object - href: string
-
- method: string
-
- meta: object
-
- buildReport: object
-
- errors: integer
-
- warnings: integer
-
- testResults: object
-
results from the build's unit tests, if any
- unit_test: object
-
- unit_test_editmode: object
-
- unit_test_playmode: 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",
"cleanBuild": "false",
"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
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
Request Parameters
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
buildattempt
- build: number
-
- buildtargetid: string
-
unique id auto-generated from the build target name
- buildTargetName: string (up to 64 chars)
-
- buildGUID: string
-
unique GUID identifying this build
- buildStatus: string , x ∈ { created , queued , sentToBuilder , started , restarted , success , failure , canceled , unknown }
-
- cleanBuild: boolean
-
if the build was built without using data cached from previous builds
- failureDetails: object[]
-
list of failure details for this build attempt, when available
object - label: string
-
- resolutionHint: string
-
- stages: string[]
-
string - failureType: string
-
- count: number
-
- canceledBy: string , x ∈ { api , service , service-timelimit , concurrency-timelimit , restart-limit , evaluation-timelimit , jenkins-timelimit , service-badconfiguration , billing-invalidsubscription }
-
- platform: string , x ∈ { ios , android , webplayer , webgl , standaloneosxintel , standaloneosxintel64 , standaloneosxuniversal , standalonewindows , standalonewindows64 , standalonelinux , standalonelinux64 , standalonelinuxuniversal , wsaplayer }
-
- 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
- billableTimeInSeconds: number
-
total billable time for the build
- unitTestTimeInSeconds: number
-
total time for unit test execution step
- editModeTestTimeInSeconds: number
-
total time for unit test execution step
- playModeTestTimeInSeconds: number
-
total time for unit test execution step
- 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
- headless: object
-
if the build was built to run in linux headless mode
- credentialsOutdated: boolean
-
if a newer credential has been attached to this buildtarget and the build can be re-signed
- deletedBy: string
-
email address of the user who deleted this attempt
- queuedReason: string , x ∈ { targetConcurrency , cooldown , billingService , buildConcurrency , concurrency , waitingForBuildAgent , evaluating , sentToBuilder , notPending }
-
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 , wsaplayer }
-
- 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
-
- projectGuid: string
-
- orgId: string
-
- orgFk: string
-
- filetoken: string
-
- links: object
-
- artifacts: object[]
-
object
object - href: string
-
- method: string
-
- meta: object
-
- buildReport: object
-
- errors: integer
-
- warnings: integer
-
- testResults: object
-
results from the build's unit tests, if any
- unit_test: object
-
- unit_test_editmode: object
-
- unit_test_playmode: object
-
- error: string
-
Build Accepted
[
{
"build": 3,
"buildtargetid": "android-builder",
"buildTargetName": "Android Builder",
"buildStatus": "queued",
"cleanBuild": "false",
"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
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
Request Parameters
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
Build Status
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
Request Parameters
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
buildattempt
- build: number
-
- buildtargetid: string
-
unique id auto-generated from the build target name
- buildTargetName: string (up to 64 chars)
-
- buildGUID: string
-
unique GUID identifying this build
- buildStatus: string , x ∈ { created , queued , sentToBuilder , started , restarted , success , failure , canceled , unknown }
-
- cleanBuild: boolean
-
if the build was built without using data cached from previous builds
- failureDetails: object[]
-
list of failure details for this build attempt, when available
object - label: string
-
- resolutionHint: string
-
- stages: string[]
-
string - failureType: string
-
- count: number
-
- canceledBy: string , x ∈ { api , service , service-timelimit , concurrency-timelimit , restart-limit , evaluation-timelimit , jenkins-timelimit , service-badconfiguration , billing-invalidsubscription }
-
- platform: string , x ∈ { ios , android , webplayer , webgl , standaloneosxintel , standaloneosxintel64 , standaloneosxuniversal , standalonewindows , standalonewindows64 , standalonelinux , standalonelinux64 , standalonelinuxuniversal , wsaplayer }
-
- 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
- billableTimeInSeconds: number
-
total billable time for the build
- unitTestTimeInSeconds: number
-
total time for unit test execution step
- editModeTestTimeInSeconds: number
-
total time for unit test execution step
- playModeTestTimeInSeconds: number
-
total time for unit test execution step
- 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
- headless: object
-
if the build was built to run in linux headless mode
- credentialsOutdated: boolean
-
if a newer credential has been attached to this buildtarget and the build can be re-signed
- deletedBy: string
-
email address of the user who deleted this attempt
- queuedReason: string , x ∈ { targetConcurrency , cooldown , billingService , buildConcurrency , concurrency , waitingForBuildAgent , evaluating , sentToBuilder , notPending }
-
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 , wsaplayer }
-
- 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
-
- projectGuid: string
-
- orgId: string
-
- orgFk: string
-
- filetoken: string
-
- links: object
-
- artifacts: object[]
-
object
object - href: string
-
- method: string
-
- meta: object
-
- buildReport: object
-
- errors: integer
-
- warnings: integer
-
- testResults: object
-
results from the build's unit tests, if any
- unit_test: object
-
- unit_test_editmode: object
-
- unit_test_playmode: object
-
- error: string
-
{
"build": 2,
"buildtargetid": "android-builder",
"buildTargetName": "Android Builder",
"buildStatus": "success",
"cleanBuild": "false",
"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
Description
Cancel a build in progress. Canceling an already finished build will do nothing and respond successfully.
Required Permissions
Request Parameters
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
Update build information
Description
Required Permissions
Request Parameters
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
buildattempt
- build: number
-
- buildtargetid: string
-
unique id auto-generated from the build target name
- buildTargetName: string (up to 64 chars)
-
- buildGUID: string
-
unique GUID identifying this build
- buildStatus: string , x ∈ { created , queued , sentToBuilder , started , restarted , success , failure , canceled , unknown }
-
- cleanBuild: boolean
-
if the build was built without using data cached from previous builds
- failureDetails: object[]
-
list of failure details for this build attempt, when available
object - label: string
-
- resolutionHint: string
-
- stages: string[]
-
string - failureType: string
-
- count: number
-
- canceledBy: string , x ∈ { api , service , service-timelimit , concurrency-timelimit , restart-limit , evaluation-timelimit , jenkins-timelimit , service-badconfiguration , billing-invalidsubscription }
-
- platform: string , x ∈ { ios , android , webplayer , webgl , standaloneosxintel , standaloneosxintel64 , standaloneosxuniversal , standalonewindows , standalonewindows64 , standalonelinux , standalonelinux64 , standalonelinuxuniversal , wsaplayer }
-
- 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
- billableTimeInSeconds: number
-
total billable time for the build
- unitTestTimeInSeconds: number
-
total time for unit test execution step
- editModeTestTimeInSeconds: number
-
total time for unit test execution step
- playModeTestTimeInSeconds: number
-
total time for unit test execution step
- 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
- headless: object
-
if the build was built to run in linux headless mode
- credentialsOutdated: boolean
-
if a newer credential has been attached to this buildtarget and the build can be re-signed
- deletedBy: string
-
email address of the user who deleted this attempt
- queuedReason: string , x ∈ { targetConcurrency , cooldown , billingService , buildConcurrency , concurrency , waitingForBuildAgent , evaluating , sentToBuilder , notPending }
-
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 , wsaplayer }
-
- 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
-
- projectGuid: string
-
- orgId: string
-
- orgFk: string
-
- filetoken: string
-
- links: object
-
- artifacts: object[]
-
object
object - href: string
-
- method: string
-
- meta: object
-
- buildReport: object
-
- errors: integer
-
- warnings: integer
-
- testResults: object
-
results from the build's unit tests, if any
- unit_test: object
-
- unit_test_editmode: object
-
- unit_test_playmode: object
-
- error: string
-
{
"build": 2,
"buildtargetid": "android-builder",
"buildTargetName": "Android Builder",
"buildStatus": "success",
"cleanBuild": "false",
"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
Description
Retrieve a list of settings changes between the last and current build.
Required Permissions
Request Parameters
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
- updatingUserEmail: string
-
- 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"
}]
}
]
Re-sign a build artifact
Description
Re-sign a build artifact using the most recent credentials associated with the buildtarget.
Required Permissions
Request Parameters
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}/resign
buildsApi = BuildsApi(client)
build = buildsApi.resign_build_artifact('{orgid}', '{projectid}', '{buildtargetid}', '{number}')
Responses
Uses default content-types: application/json text/plain text/html text/csv
buildattempt
- build: number
-
- buildtargetid: string
-
unique id auto-generated from the build target name
- buildTargetName: string (up to 64 chars)
-
- buildGUID: string
-
unique GUID identifying this build
- buildStatus: string , x ∈ { created , queued , sentToBuilder , started , restarted , success , failure , canceled , unknown }
-
- cleanBuild: boolean
-
if the build was built without using data cached from previous builds
- failureDetails: object[]
-
list of failure details for this build attempt, when available
object - label: string
-
- resolutionHint: string
-
- stages: string[]
-
string - failureType: string
-
- count: number
-
- canceledBy: string , x ∈ { api , service , service-timelimit , concurrency-timelimit , restart-limit , evaluation-timelimit , jenkins-timelimit , service-badconfiguration , billing-invalidsubscription }
-
- platform: string , x ∈ { ios , android , webplayer , webgl , standaloneosxintel , standaloneosxintel64 , standaloneosxuniversal , standalonewindows , standalonewindows64 , standalonelinux , standalonelinux64 , standalonelinuxuniversal , wsaplayer }
-
- 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
- billableTimeInSeconds: number
-
total billable time for the build
- unitTestTimeInSeconds: number
-
total time for unit test execution step
- editModeTestTimeInSeconds: number
-
total time for unit test execution step
- playModeTestTimeInSeconds: number
-
total time for unit test execution step
- 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
- headless: object
-
if the build was built to run in linux headless mode
- credentialsOutdated: boolean
-
if a newer credential has been attached to this buildtarget and the build can be re-signed
- deletedBy: string
-
email address of the user who deleted this attempt
- queuedReason: string , x ∈ { targetConcurrency , cooldown , billingService , buildConcurrency , concurrency , waitingForBuildAgent , evaluating , sentToBuilder , notPending }
-
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 , wsaplayer }
-
- 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
-
- projectGuid: string
-
- orgId: string
-
- orgFk: string
-
- filetoken: string
-
- links: object
-
- artifacts: object[]
-
object
object - href: string
-
- method: string
-
- meta: object
-
- buildReport: object
-
- errors: integer
-
- warnings: integer
-
- testResults: object
-
results from the build's unit tests, if any
- unit_test: object
-
- unit_test_editmode: object
-
- unit_test_playmode: object
-
- error: string
-
Resign Accepted
[
{
"build": 3,
"buildtargetid": "default-ios",
"buildTargetName": "iOS Builder",
"buildStatus": "queued",
"cleanBuild": "false",
"platform": "ios",
"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"
}
}
}
]
Resign Already Started
[
{
"buildtargetid": "default-ios",
"buildTargetName": "iOS Builder",
"error": "Cannot start build - already a build pending."
}
]
List all builds for org
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
Request Parameters
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
buildattempt
- build: number
-
- buildtargetid: string
-
unique id auto-generated from the build target name
- buildTargetName: string (up to 64 chars)
-
- buildGUID: string
-
unique GUID identifying this build
- buildStatus: string , x ∈ { created , queued , sentToBuilder , started , restarted , success , failure , canceled , unknown }
-
- cleanBuild: boolean
-
if the build was built without using data cached from previous builds
- failureDetails: object[]
-
list of failure details for this build attempt, when available
object - label: string
-
- resolutionHint: string
-
- stages: string[]
-
string - failureType: string
-
- count: number
-
- canceledBy: string , x ∈ { api , service , service-timelimit , concurrency-timelimit , restart-limit , evaluation-timelimit , jenkins-timelimit , service-badconfiguration , billing-invalidsubscription }
-
- platform: string , x ∈ { ios , android , webplayer , webgl , standaloneosxintel , standaloneosxintel64 , standaloneosxuniversal , standalonewindows , standalonewindows64 , standalonelinux , standalonelinux64 , standalonelinuxuniversal , wsaplayer }
-
- 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
- billableTimeInSeconds: number
-
total billable time for the build
- unitTestTimeInSeconds: number
-
total time for unit test execution step
- editModeTestTimeInSeconds: number
-
total time for unit test execution step
- playModeTestTimeInSeconds: number
-
total time for unit test execution step
- 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
- headless: object
-
if the build was built to run in linux headless mode
- credentialsOutdated: boolean
-
if a newer credential has been attached to this buildtarget and the build can be re-signed
- deletedBy: string
-
email address of the user who deleted this attempt
- queuedReason: string , x ∈ { targetConcurrency , cooldown , billingService , buildConcurrency , concurrency , waitingForBuildAgent , evaluating , sentToBuilder , notPending }
-
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 , wsaplayer }
-
- 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
-
- projectGuid: string
-
- orgId: string
-
- orgFk: string
-
- filetoken: string
-
- links: object
-
- artifacts: object[]
-
object
object - href: string
-
- method: string
-
- meta: object
-
- buildReport: object
-
- errors: integer
-
- warnings: integer
-
- testResults: object
-
results from the build's unit tests, if any
- unit_test: object
-
- unit_test_editmode: object
-
- unit_test_playmode: object
-
- error: string
-
[
{
"orgId": example-org,
"projectId": new-project,
"projectName": new-project,
"build": 2,
"buildtargetid": "android-builder",
"buildTargetName": "Android Builder",
"buildStatus": "success",
"cleanBuild": "true",
"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",
"cleanBuild": "false",
"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
Description
Cancel all in progress builds for an organization. Canceling an already finished build will do nothing and respond successfully.
Required Permissions
Request Parameters
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
Get build log
Description
Retrieve the plain text log for a specific build.
Please note that this route will normally redirect with a 303 code to the build log for a completed job, so it is important to follow redirects.
Required Permissions
Request Parameters
Retrieve full log
curl
-L 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
-L 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
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>
- error: string
-
- detail: string[]
-
string
Get the build steps for a given build
Description
Retrieves all build steps for a build, this replaces the old method where we would manually download the build report artifacts and allows us to add more functionality into build steps.
Required Permissions
Request Parameters
curl
-X GET
-H "Authorization: Basic [YOUR API KEY]"
https://build-api.cloud.unity3d.com/api/v1/orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/builds/{number}/steps
Responses
Uses default content-types: application/json text/plain text/html text/csv
- depth: integer
-
- duration: number
-
- name: string
-
- messages: object[]
-
object - content: string
-
- typeCode: integer
-
[{
"depth": 0,
"duration": 67138.5108,
"name": "Build player",
"messages": []
}, {
"depth": 1,
"duration": 2839.5708,
"name": "Compile scripts",
"messages": [{
"content": "Library/PackageCache/com.unity.analytics@3.2.2/DataPrivacy/DataPrivacyButton.cs(28,13): warning CS0618: 'Application.ExternalEval(string)' is obsolete: 'Application.ExternalEval is deprecated. See https://docs.unity3d.com/Manual/webgl-interactingwithbrowserscripting.html for alternatives.'",
"typeCode": 2,
}]
}, {
"depth": 1,
"duration": 0.027,
"name": "Prepare splash screen",
"messages": []
}])