Unity DevOps Build Automation
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 DevOps Build Automation.
Making requests
This website is built to allow requests to be made against the API. If you are currently logged into Unity DevOps 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 'Build Automation Settings' 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 Build Automation 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 Build Automation API requires an access token from your Unity DevOps account, which can be found by selecting Settings under DevOps > Build Automation at https://cloud.unity.com/home/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 Build Automation API are limited to a rate of 100 per minute. To preserve the quality of service throughout Build Automation, 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 application/x-apple-aspen-config text/plain text/html text/csv text/x-generic
List all build target groups for a project
Description
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}/buildTargetGroups
Responses
Uses default content-types: application/json application/x-apple-aspen-config text/plain text/html text/csv text/x-generic
- data: object[]
-
object - id: string
-
- name: string
-
- description: string
-
- created: string (date-time)
-
- lastModified: string (date-time)
-
- deleted: boolean
-
- enabled: boolean
-
- buildTargets: object[]
-
object - buildTargetId: string
-
- name: string
-
- enabled: boolean
-
- platform: string
-
- builderOperatingSystem: string
-
{
"data": [
{
"id": "63e31979d9efa30438dcbee5",
"name": "test group number 3",
"description": "hi this is a description",
"created": "2023-02-08T03:39:37.545Z",
"lastModified": "2023-02-08T03:39:37.548Z",
"deleted": false,
"enabled": true,
"buildTargets": [
{
"buildTargetId": "default-mac-desktop-universal",
"name": "Default Mac desktop Universal",
"enabled": true,
"platform": "standaloneosx",
"builderOperatingSystem": "mac"
}
]
},
{
"id": "63e31979d9efa30438dcbee6",
"name": "test group number 4",
"description": "hi this is a description",
"created": "2023-02-11T03:39:37.545Z",
"lastModified": "2023-02-11T03:39:37.548Z",
"deleted": false,
"enabled": true,
"buildTargets": [
{
"buildTargetId": "default-mac-desktop-universal",
"name": "Default Mac desktop Universal",
"enabled": true,
"platform": "standaloneosx",
"builderOperatingSystem": "mac"
}
]
}
]
}
Create build target group for a project
Description
Required Permissions
Request Parameters
curl
-X POST
-H "Content-Type: application/json"
-d '{"name": "test group number 3", "description": "hi this is a description", "buildTargetIds": ["default-mac-desktop-universal"]}'
-H "Authorization: Basic [YOUR API KEY]"
https://build-api.cloud.unity3d.com/api/v1/orgs/{orgid}/projects/{projectid}/buildTargetGroups
Responses
Uses default content-types: application/json application/x-apple-aspen-config text/plain text/html text/csv text/x-generic
- id: string
-
- name: string
-
- description: string
-
- created: string (date-time)
-
- lastModified: string (date-time)
-
- deleted: boolean
-
- enabled: boolean
-
- buildTargets: object[]
-
object - buildTargetId: string
-
- name: string
-
- enabled: boolean
-
- platform: string
-
- builderOperatingSystem: string
-
{
"id": "63e31979d9efa30438dcbee5",
"name": "test group number 3",
"description": "hi this is a description",
"created": "2023-02-08T03:39:37.545Z",
"lastModified": "2023-02-08T03:39:37.548Z",
"deleted": false,
"enabled": true,
"buildTargets": [
{
"buildTargetId": "default-mac-desktop-universal",
"name": "Default Mac desktop Universal",
"enabled": true,
"platform": "standaloneosx",
"builderOperatingSystem": "mac"
}
]
}
Delete build target groups for a project
Description
Required Permissions
Request Parameters
curl
-X DELETE
-H "Content-Type: application/json"
-d '{"buildTargetGroupIds": ["643777304e3edf0016865fbc", "643858504af6150017aa3b6b"]}'
-H "Authorization: Basic [YOUR API KEY]"
https://build-api.cloud.unity3d.com/api/v1/orgs/{orgid}/projects/{projectid}/buildTargetGroups
Responses
Uses default content-types: application/json application/x-apple-aspen-config text/plain text/html text/csv text/x-generic
Set enabled state of build target groups for a project
Description
Required Permissions
Request Parameters
curl
-X PUT
-H "Content-Type: application/json"
-d '{"enabled": true, "buildTargetGroupIds": ["63e31979d9efa30438dcbee5"]}'
-H "Authorization: Basic [YOUR API KEY]"
https://build-api.cloud.unity3d.com/api/v1/orgs/{orgid}/projects/{projectid}/buildTargetGroups/enabled
Responses
Uses default content-types: application/json application/x-apple-aspen-config text/plain text/html text/csv text/x-generic
- data: object[]
-
object - id: string
-
- name: string
-
- description: string
-
- created: string (date-time)
-
- lastModified: string (date-time)
-
- deleted: boolean
-
- enabled: boolean
-
- buildTargets: object[]
-
object - buildTargetId: string
-
- name: string
-
- enabled: boolean
-
- platform: string
-
- builderOperatingSystem: string
-
{
"data": [
{
"id": "63e31979d9efa30438dcbee5",
"name": "test group number 3",
"description": "hi this is a description",
"created": "2023-02-08T03:39:37.545Z",
"lastModified": "2023-02-08T03:39:37.548Z",
"deleted": false,
"enabled": false,
"buildTargets": [
{
"buildTargetId": "default-mac-desktop-universal",
"name": "Default Mac desktop Universal",
"enabled": true,
"platform": "standaloneosx",
"builderOperatingSystem": "mac"
}
]
}
]
}
Update build target group for a project
Description
Required Permissions
Request Parameters
curl
-X PATCH
-H "Content-Type: application/json"
-d '{"name": "test group number 3", "description": "This is a newly added description", "buildTargetIds": ["default-mac-desktop-universal"]}'
-H "Authorization: Basic [YOUR API KEY]"
https://build-api.cloud.unity3d.com/api/v1/orgs/{orgid}/projects/{projectid}/buildTargetGroups/{buildtargetgroupid}
Responses
Uses default content-types: application/json application/x-apple-aspen-config text/plain text/html text/csv text/x-generic
- id: string
-
- name: string
-
- description: string
-
- created: string (date-time)
-
- lastModified: string (date-time)
-
- deleted: boolean
-
- enabled: boolean
-
- buildTargets: object[]
-
object - buildTargetId: string
-
- name: string
-
- enabled: boolean
-
- platform: string
-
- builderOperatingSystem: string
-
{
"id": "63e31979d9efa30438dcbee5",
"name": "test group number 3",
"description": "This is a newly added description",
"created": "2023-02-08T03:39:37.545Z",
"lastModified": "2023-02-08T03:39:37.548Z",
"deleted": false,
"enabled": true,
"buildTargets": [
{
"buildTargetId": "default-mac-desktop-universal",
"name": "Default Mac desktop Universal",
"enabled": true,
"platform": "standaloneosx",
"builderOperatingSystem": "mac"
}
]
}
Set enabled state of build target group for a project
Description
Required Permissions
Request Parameters
curl
-X PUT
-H "Content-Type: application/json"
-d '{"enabled": true}'
-H "Authorization: Basic [YOUR API KEY]"
https://build-api.cloud.unity3d.com/api/v1/orgs/{orgid}/projects/{projectid}/buildTargetGroups/{buildtargetgroupid}/enabled
Responses
Uses default content-types: application/json application/x-apple-aspen-config text/plain text/html text/csv text/x-generic
- id: string
-
- name: string
-
- description: string
-
- created: string (date-time)
-
- lastModified: string (date-time)
-
- deleted: boolean
-
- enabled: boolean
-
- buildTargets: object[]
-
object - buildTargetId: string
-
- name: string
-
- enabled: boolean
-
- platform: string
-
- builderOperatingSystem: string
-
{
"id": "63e31979d9efa30438dcbee5",
"name": "test group number 3",
"description": "This is a newly added description",
"created": "2023-02-08T03:39:37.545Z",
"lastModified": "2023-02-08T03:39:37.548Z",
"deleted": false,
"enabled": true,
"buildTargets": [
{
"buildTargetId": "default-mac-desktop-universal",
"name": "Default Mac desktop Universal",
"enabled": true,
"platform": "standaloneosx",
"builderOperatingSystem": "mac"
}
]
}
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 application/x-apple-aspen-config text/plain text/html text/csv text/x-generic
- 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"
}]
}
]
Get all build targets that can share caches with the specified build target
Description
Retrieve a list of build targets that are able to share caches with the specified 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}/compatibletargets
buildsApi = BuildsApi(client)
buildtargets = buildsApi.get_compatible_targets('{orgid}', '{projectid}', '{buildtargetid}')
Responses
Uses default content-types: application/json application/x-apple-aspen-config text/plain text/html text/csv text/x-generic
- name: string
-
- createdBy: string
-
- platform: string , x ∈ { ios , android , webplayer , webgl , standaloneosxintel , standaloneosxintel64 , standaloneosxuniversal , standaloneosx , standalonewindows , standalonewindows64 , standalonelinux , standalonelinux64 , standalonelinuxuniversal , wsaplayer , gamecorescarlett , ps5 , switch }
-
- 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')
- autoDetectUnityVersion: boolean
-
attempt to automatically detect which unity version to use, fallback to specified unityVersion if unable to.
- fallbackPatchVersion: boolean
-
attempt to get a similar unity patch version to use, applies to unavailable auto-detected Unity versions only.
- executablename: string
-
- buildProfilePath: string
-
- scm: object
-
- type: string , x ∈ { git , svn , p4 , oauth , plastic }
-
- isUnityCloudDrive: boolean
-
If true, the build will use the Unity Cloud Drive for the source code (only applies to UVCS projects).
- repo: string
-
Which repo to use. Only applies to Plastic SCM, other SCM types configure repo on the project level.
- 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
-
a supported xcode version (ex. 'xcode13_0_0')
- buildSchedule: object
-
For Scheduling builds
- isEnabled: boolean
-
- date: string (date-time)
-
- repeatCycle: string , x ∈ { none , once (default) , daily , weekly , monthly , yearly }
-
- cleanBuild: boolean
-
- autoBuildCancellation: boolean
-
- machineTypeLabel: string
-
- operatingSystemSelected: string , x ∈ { mac , windows }
-
- operatingSystemVersion: string
-
Choose the version of the operating system for building your project.
- rubyVersion: string
-
- remoteCacheStrategy: string , x ∈ { none , library , workspace , inherit }
-
Specifies the caching strategy (none, library, workspace, or inherit) for remote data storage and retrieval
- windowsGitBinary: string , x ∈ { inherit (default) , native , cygwin }
-
Specifies the Git binary that will be used for Windows builds
- buildTargetCopyCache: string
-
Specifies the id of the build target that this target's cache was copied from
- architecture: string
-
Specifies the Unity editor architecture to use for building the project.
- cacheCompressionLevel: string , x ∈ { inherit (default) , none , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 }
-
Specifies the compression level for caching workspace or Library.
- advanced: object
-
- cache: object
-
- xcode: object
-
- useArchiveAndExport: boolean
-
- customFastlaneConfigPath: string
-
The path (including file name) from the project root to the custom FastLane configuration json file to configure multiple provisioning files, or customize the FastLane build process. See https://forum.unity.com/threads/xcode-9-multiple-provisioning-profiles.545121/ Will look for Assets/ucb_xcode_fastlane.json by default, if not specified.
- uploadXCArchive: boolean
-
Upload the XCArchive file produced by the build. This file will be downloadable from the dashboard if this property is true.
- shouldNotarize: boolean
-
Only used with OSX targets, this triggers signing and notarization process for the executable.
- android: object
-
- buildAppBundle: boolean
-
- buildAssetPacks: boolean
-
- androidSDKVersion: string
-
Android SDK Version
- 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.
- preBuildScriptFailsBuild: boolean
-
If this is true, a non-zero exit code on your preBuildScript will cause your build to be marked as Failed
- postBuildScriptFailsBuild: boolean
-
If this is true, a non-zero exit code on your postBuildScript will cause your build to be marked as Failed
- 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 - export: boolean true
-
Enable exporting a player from Unity (i.e. running BuildPipeline.BuildPlayer). Enabling this is equivalent to disabling Content-only Build in Build Target on Developer Dashboard. In general, this should be true, unless you are doing something something like an asset bundle only build or unit test only build without generating an actual build artifact.
- playerSettings: object
-
- Android: object
-
- useAPKExpansionFiles: boolean
-
break up android apk into an installable apk and expansion files
- Switch: object
-
- useSwitchCPUProfiler: boolean
-
Weather to use CPU profiler or not
- editorUserBuildSettings: object
-
- androidBuildSystem: string , x ∈ { internal , gradle }
-
which android build system to build with (android only, supported in Unity 5.5+)
- standaloneBuildSubtarget: string , x ∈ { Player (default) , Server }
-
standalone build subtarget for Dedicated Server Build (supported in Unity 2021.2+). see https://docs.unity3d.com/2021.2/Documentation/ScriptReference/StandaloneBuildSubtarget.html
- 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
- addressables: object
-
- buildAddressables: boolean
-
enable addressable builds for this target
- contentUpdate: boolean
-
Update a previously built player with new Addressable Content.
- profileName: string
-
which addressables profile should be used for the build
- failedAddressablesFailsBuild: boolean true
-
Exit and mark the build as failed if an error occurs when addressables are built
- contentUpdateSettings: object
-
- contentStatePath: string
-
The path to a Content State .bin file relative to the project root
- linkedTargetId: string
-
The Id of the build target to obtain a Content State .bin file from
- generateBuildLayout: boolean
-
Whether to generate the bundle build layout report.
- buildLayoutReportFileFormat: string , x ∈ { JSON (default) , TXT }
-
The format of the bundle build layout report.
- runUnitTests: boolean
-
Run any unit tests your project has when a build happens.
- runEditModeTests: boolean
-
Should Edit Mode unit tests be run? NOTE: requires runUnitTests to be true and building with Unity 5.6 or newer.
- runPlayModeTests: boolean
-
Should Play Mode unit tests be run? NOTE: requires runUnitTests to be true and building with Unity 5.6 or newer.
- failedUnitTestFailsBuild: boolean
-
Mark builds as failed if the unit tests do not pass.
- unitTestMethod: string
-
LEGACY - The Unity method to call when running unit tests (only supported in Unity 5.2 and lower).
- enableLightBake: boolean
-
Enable lightmap baking (disabled by default since it is very slow and usually unnecessary)
- uwp: object
-
- windowsSDKVersion: string , x ∈ { 10.0.17134.0 , 10.0.17763.0 , 10.0.18362.0 , 10.0.19041.0 , 10.0.20348.0 , 10.0.22621.0 , 10.0.22000.0 }
-
Sets Windows SDK Version to use when building UWP
- visualStudioVersion: string , x ∈ { 2019 , 2022 }
-
Sets the Visual Studio Version to use when building UWP
- wsaArchitecture: string,null , x ∈ { x64 , x86 , ARM , ARM64 }
-
Sets target architecture for Exectuable Only builds
- capabilities: array,null
-
Sets the capabilities of the build UWP application
- targetFamily: string[]
-
Sets the target device family for the build
string , x ∈ { Universal , Desktop , Mobile , Xbox , Holographic , IoT , IoTHeadless } The target device family
- buildType: string , x ∈ { ExecutableOnly , D3D , XAML }
-
Sets the build type for UWP. Executable
- msbuildConfiguration: string,null , x ∈ { Debug , Release , Master , MasterWithLTCG }
-
Sets the ms build configuration for UWP
- platforms: array,null
-
Sets the target platforms for the AppXBundle
- publishVisualStudioSolution: boolean
-
Enable publishing of the visual studio .sln file
- gamecorescarlett: object
-
- ps5: object
-
- ignorePlasticCheckedInLibrary: boolean
-
Ignore the checked-in Library folder when building from Plastic SCM.
- buildTargetGroups: object[]
-
object - id: string
-
- name: string
-
- lastBuilt: object
-
- unityVersion: string
-
Last Unity version built by this target. Setting this has no effect.
- credentials: object
-
- signing: object
-
- credentialid: string
-
- credentialResourceRef: object
-
- platform: string , x ∈ { ios , android , webplayer , webgl , standaloneosxintel , standaloneosxintel64 , standaloneosxuniversal , standaloneosx , standalonewindows , standalonewindows64 , standalonelinux , standalonelinux64 , standalonelinuxuniversal , wsaplayer , gamecorescarlett , ps5 , switch }
-
- 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
- issuer: string
-
issuer of the 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
- expiration: string
-
expiration date
- links: object
-
- builds: object[]
-
object buildattempt
- build: number
-
- buildtargetid: string
-
unique id auto-generated from the build target name
- buildTargetName: string
-
- buildGUID: string
-
unique GUID identifying this build
- buildStatus: string , x ∈ { created , queued , sentToBuilder , started , restarted , success , failure , canceled , unknown , processing }
-
- 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 }
-
- causedBy: string
-
What triggered the build to be created
- causedByUser: string
-
Name of the user who caused the build to be created
- buildProfilePath: string
-
- platform: string , x ∈ { ios , android , webplayer , webgl , standaloneosxintel , standaloneosxintel64 , standaloneosxuniversal , standaloneosx , standalonewindows , standalonewindows64 , standalonelinux , standalonelinux64 , standalonelinuxuniversal , wsaplayer , gamecorescarlett , ps5 , switch }
-
- formattedPlatformName: string
-
- editorIcon: string
-
- 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
- groupBuildId: string (uuid)
-
the unique ID used to launch a group of attempts
- buildTargetGroups: object[]
-
list of build target groups this build attempt is a part of
object - name: string
-
- id: string
-
- deleted: boolean
-
- enabled: boolean
-
- machineType: object
-
the type of machine used to build this build
- name: string
-
- label: string
-
- enabled: boolean
-
- operatingSystem: string
-
- deletedBy: string
-
email address of the user who deleted this attempt
- queuedReason: string , x ∈ { targetConcurrency , cooldown , 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')
- architecture: string
-
The Unity editor architecture used for building
- operatingSystemVersion: string
-
a supported operating system version (ex. 'monterey')
- operatingSystem: string
-
the OS that this build ran (or will run) on (ex. 'windows' / 'mac')
- xcodeVersion: string
-
a supported xcode version (ex. 'xcode13_0_0')
- androidSdkVersion: string
-
a supported android sdk version (ex. 'android_sdk_34')
- 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 , standaloneosx , standalonewindows , standalonewindows64 , standalonelinux , standalonelinux64 , standalonelinuxuniversal , wsaplayer , gamecorescarlett , ps5 , switch }
-
- 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
-
- machineTypeLabel: string
-
- requestedRevision: string
-
- 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"
}
}
}
]
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 application/x-apple-aspen-config text/plain text/html text/csv text/x-generic
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 application/x-apple-aspen-config text/plain text/html text/csv text/x-generic
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 application/x-apple-aspen-config text/plain text/html text/csv text/x-generic
- 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 application/x-apple-aspen-config text/plain text/html text/csv text/x-generic
buildattempt
- build: number
-
- buildtargetid: string
-
unique id auto-generated from the build target name
- buildTargetName: string
-
- buildGUID: string
-
unique GUID identifying this build
- buildStatus: string , x ∈ { created , queued , sentToBuilder , started , restarted , success , failure , canceled , unknown , processing }
-
- 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 }
-
- causedBy: string
-
What triggered the build to be created
- causedByUser: string
-
Name of the user who caused the build to be created
- buildProfilePath: string
-
- platform: string , x ∈ { ios , android , webplayer , webgl , standaloneosxintel , standaloneosxintel64 , standaloneosxuniversal , standaloneosx , standalonewindows , standalonewindows64 , standalonelinux , standalonelinux64 , standalonelinuxuniversal , wsaplayer , gamecorescarlett , ps5 , switch }
-
- formattedPlatformName: string
-
- editorIcon: string
-
- 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
- groupBuildId: string (uuid)
-
the unique ID used to launch a group of attempts
- buildTargetGroups: object[]
-
list of build target groups this build attempt is a part of
object - name: string
-
- id: string
-
- deleted: boolean
-
- enabled: boolean
-
- machineType: object
-
the type of machine used to build this build
- name: string
-
- label: string
-
- enabled: