All URIs are relative to /api/v1
Method | HTTP request | Description |
---|---|---|
add_build_target | POST /orgs/{orgid}/projects/{projectid}/buildtargets | Create build target for a project |
delete_build_target | DELETE /orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid} | Delete build target |
get_build_target | GET /orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid} | Get a build target |
get_build_targets | GET /orgs/{orgid}/projects/{projectid}/buildtargets | List all build targets for a project |
get_build_targets_for_org | GET /orgs/{orgid}/buildtargets | List all build targets for an org |
get_env_variables_for_build_target | GET /orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/envvars | Get environment variables |
get_stats_for_build_target | GET /orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/stats | Get build target statistics |
set_env_variables_for_build_target | PUT /orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/envvars | Set environment variables |
update_build_target | PUT /orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid} | Update build target details |
object add_build_target(body, orgid, projectid)
Create build target for a project
from __future__ import print_function
import time
import unity_cloud_build_api
from unity_cloud_build_api.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: apikey
configuration = unity_cloud_build_api.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure OAuth2 access token for authorization: permissions
configuration = unity_cloud_build_api.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = unity_cloud_build_api.BuildtargetsApi(unity_cloud_build_api.ApiClient(configuration))
body = unity_cloud_build_api.ProjectidBuildtargetsBody() # ProjectidBuildtargetsBody | Options for build target create/update
orgid = 'orgid_example' # str | Organization identifier
projectid = 'projectid_example' # str | Project identifier
try:
# Create build target for a project
api_response = api_instance.add_build_target(body, orgid, projectid)
pprint(api_response)
except ApiException as e:
print("Exception when calling BuildtargetsApi->add_build_target: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
body | ProjectidBuildtargetsBody | Options for build target create/update | |
orgid | str | Organization identifier | |
projectid | str | Project identifier |
object
- Content-Type: application/json
- Accept: application/json, text/plain, text/html, text/csv
[Back to top] [Back to API list] [Back to Model list] [Back to README]
str delete_build_target(orgid, projectid, buildtargetid)
Delete build target
from __future__ import print_function
import time
import unity_cloud_build_api
from unity_cloud_build_api.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: apikey
configuration = unity_cloud_build_api.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure OAuth2 access token for authorization: permissions
configuration = unity_cloud_build_api.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = unity_cloud_build_api.BuildtargetsApi(unity_cloud_build_api.ApiClient(configuration))
orgid = 'orgid_example' # str | Organization identifier
projectid = 'projectid_example' # str | Project identifier
buildtargetid = 'buildtargetid_example' # str | unique id auto-generated from the build target name
try:
# Delete build target
api_response = api_instance.delete_build_target(orgid, projectid, buildtargetid)
pprint(api_response)
except ApiException as e:
print("Exception when calling BuildtargetsApi->delete_build_target: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
orgid | str | Organization identifier | |
projectid | str | Project identifier | |
buildtargetid | str | unique id auto-generated from the build target name |
str
- Content-Type: Not defined
- Accept: application/json, text/plain, text/html, text/csv
[Back to top] [Back to API list] [Back to Model list] [Back to README]
object get_build_target(orgid, projectid, buildtargetid)
Get a build target
from __future__ import print_function
import time
import unity_cloud_build_api
from unity_cloud_build_api.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: apikey
configuration = unity_cloud_build_api.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure OAuth2 access token for authorization: permissions
configuration = unity_cloud_build_api.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = unity_cloud_build_api.BuildtargetsApi(unity_cloud_build_api.ApiClient(configuration))
orgid = 'orgid_example' # str | Organization identifier
projectid = 'projectid_example' # str | Project identifier
buildtargetid = 'buildtargetid_example' # str | unique id auto-generated from the build target name
try:
# Get a build target
api_response = api_instance.get_build_target(orgid, projectid, buildtargetid)
pprint(api_response)
except ApiException as e:
print("Exception when calling BuildtargetsApi->get_build_target: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
orgid | str | Organization identifier | |
projectid | str | Project identifier | |
buildtargetid | str | unique id auto-generated from the build target name |
object
- Content-Type: Not defined
- Accept: application/json, text/plain, text/html, text/csv
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list[InlineResponse2007] get_build_targets(orgid, projectid, include=include, include_last_success=include_last_success)
List all build targets for a project
Gets all configured build targets for a project, regardless of whether they are enabled. Add "?include=settings,credentials" as a query parameter to include the build target settings and credentials with the response.
from __future__ import print_function
import time
import unity_cloud_build_api
from unity_cloud_build_api.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: apikey
configuration = unity_cloud_build_api.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure OAuth2 access token for authorization: permissions
configuration = unity_cloud_build_api.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = unity_cloud_build_api.BuildtargetsApi(unity_cloud_build_api.ApiClient(configuration))
orgid = 'orgid_example' # str | Organization identifier
projectid = 'projectid_example' # str | Project identifier
include = 'include_example' # str | Extra fields to include in the response (optional)
include_last_success = false # bool | Include last successful build (optional) (default to false)
try:
# List all build targets for a project
api_response = api_instance.get_build_targets(orgid, projectid, include=include, include_last_success=include_last_success)
pprint(api_response)
except ApiException as e:
print("Exception when calling BuildtargetsApi->get_build_targets: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
orgid | str | Organization identifier | |
projectid | str | Project identifier | |
include | str | Extra fields to include in the response | [optional] |
include_last_success | bool | Include last successful build | [optional] [default to false] |
- Content-Type: Not defined
- Accept: application/json, text/plain, text/html, text/csv
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list[InlineResponse2007] get_build_targets_for_org(orgid, include=include, include_last_success=include_last_success)
List all build targets for an org
Gets all configured build targets for an org, regardless of whether they are enabled. Add "?include=settings,credentials" as a query parameter to include the build target settings and credentials with the response.
from __future__ import print_function
import time
import unity_cloud_build_api
from unity_cloud_build_api.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: apikey
configuration = unity_cloud_build_api.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure OAuth2 access token for authorization: permissions
configuration = unity_cloud_build_api.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = unity_cloud_build_api.BuildtargetsApi(unity_cloud_build_api.ApiClient(configuration))
orgid = 'orgid_example' # str | Organization identifier
include = 'include_example' # str | Extra fields to include in the response (optional)
include_last_success = false # bool | Include last successful build (optional) (default to false)
try:
# List all build targets for an org
api_response = api_instance.get_build_targets_for_org(orgid, include=include, include_last_success=include_last_success)
pprint(api_response)
except ApiException as e:
print("Exception when calling BuildtargetsApi->get_build_targets_for_org: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
orgid | str | Organization identifier | |
include | str | Extra fields to include in the response | [optional] |
include_last_success | bool | Include last successful build | [optional] [default to false] |
- Content-Type: Not defined
- Accept: application/json, text/plain, text/html, text/csv
[Back to top] [Back to API list] [Back to Model list] [Back to README]
dict(str, str) get_env_variables_for_build_target(orgid, projectid, buildtargetid)
Get environment variables
Get all configured environment variables for a given build target
from __future__ import print_function
import time
import unity_cloud_build_api
from unity_cloud_build_api.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: apikey
configuration = unity_cloud_build_api.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure OAuth2 access token for authorization: permissions
configuration = unity_cloud_build_api.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = unity_cloud_build_api.BuildtargetsApi(unity_cloud_build_api.ApiClient(configuration))
orgid = 'orgid_example' # str | Organization identifier
projectid = 'projectid_example' # str | Project identifier
buildtargetid = 'buildtargetid_example' # str | unique id auto-generated from the build target name
try:
# Get environment variables
api_response = api_instance.get_env_variables_for_build_target(orgid, projectid, buildtargetid)
pprint(api_response)
except ApiException as e:
print("Exception when calling BuildtargetsApi->get_env_variables_for_build_target: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
orgid | str | Organization identifier | |
projectid | str | Project identifier | |
buildtargetid | str | unique id auto-generated from the build target name |
dict(str, str)
- Content-Type: Not defined
- Accept: application/json, text/plain, text/html, text/csv
[Back to top] [Back to API list] [Back to Model list] [Back to README]
object get_stats_for_build_target(orgid, projectid, buildtargetid, build_status=build_status, clean_build=clean_build, limit=limit)
Get build target statistics
Get statistics for the specified build target
from __future__ import print_function
import time
import unity_cloud_build_api
from unity_cloud_build_api.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: apikey
configuration = unity_cloud_build_api.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure OAuth2 access token for authorization: permissions
configuration = unity_cloud_build_api.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = unity_cloud_build_api.BuildtargetsApi(unity_cloud_build_api.ApiClient(configuration))
orgid = 'orgid_example' # str | Organization identifier
projectid = 'projectid_example' # str | Project identifier
buildtargetid = 'buildtargetid_example' # str | unique id auto-generated from the build target name
build_status = 'build_status_example' # str | Query for only builds of a specific status (optional)
clean_build = true # bool | Query for builds that have either been built clean or using caches (optional)
limit = 1.2 # float | Get stats for last limit builds (optional)
try:
# Get build target statistics
api_response = api_instance.get_stats_for_build_target(orgid, projectid, buildtargetid, build_status=build_status, clean_build=clean_build, limit=limit)
pprint(api_response)
except ApiException as e:
print("Exception when calling BuildtargetsApi->get_stats_for_build_target: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
orgid | str | Organization identifier | |
projectid | str | Project identifier | |
buildtargetid | str | unique id auto-generated from the build target name | |
build_status | str | Query for only builds of a specific status | [optional] |
clean_build | bool | Query for builds that have either been built clean or using caches | [optional] |
limit | float | Get stats for last limit builds | [optional] |
object
- Content-Type: Not defined
- Accept: application/json, text/plain, text/html, text/csv
[Back to top] [Back to API list] [Back to Model list] [Back to README]
dict(str, str) set_env_variables_for_build_target(body, orgid, projectid, buildtargetid)
Set environment variables
Set all configured environment variables for a given build target
from __future__ import print_function
import time
import unity_cloud_build_api
from unity_cloud_build_api.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: apikey
configuration = unity_cloud_build_api.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure OAuth2 access token for authorization: permissions
configuration = unity_cloud_build_api.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = unity_cloud_build_api.BuildtargetsApi(unity_cloud_build_api.ApiClient(configuration))
body = NULL # dict(str, str) | Environment variables
orgid = 'orgid_example' # str | Organization identifier
projectid = 'projectid_example' # str | Project identifier
buildtargetid = 'buildtargetid_example' # str | unique id auto-generated from the build target name
try:
# Set environment variables
api_response = api_instance.set_env_variables_for_build_target(body, orgid, projectid, buildtargetid)
pprint(api_response)
except ApiException as e:
print("Exception when calling BuildtargetsApi->set_env_variables_for_build_target: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
body | dict(str, str) | Environment variables | |
orgid | str | Organization identifier | |
projectid | str | Project identifier | |
buildtargetid | str | unique id auto-generated from the build target name |
dict(str, str)
- Content-Type: application/json
- Accept: application/json, text/plain, text/html, text/csv
[Back to top] [Back to API list] [Back to Model list] [Back to README]
object update_build_target(body, orgid, projectid, buildtargetid)
Update build target details
from __future__ import print_function
import time
import unity_cloud_build_api
from unity_cloud_build_api.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: apikey
configuration = unity_cloud_build_api.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure OAuth2 access token for authorization: permissions
configuration = unity_cloud_build_api.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = unity_cloud_build_api.BuildtargetsApi(unity_cloud_build_api.ApiClient(configuration))
body = unity_cloud_build_api.BuildtargetsBuildtargetidBody() # BuildtargetsBuildtargetidBody | Options for build target create/update
orgid = 'orgid_example' # str | Organization identifier
projectid = 'projectid_example' # str | Project identifier
buildtargetid = 'buildtargetid_example' # str | unique id auto-generated from the build target name
try:
# Update build target details
api_response = api_instance.update_build_target(body, orgid, projectid, buildtargetid)
pprint(api_response)
except ApiException as e:
print("Exception when calling BuildtargetsApi->update_build_target: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
body | BuildtargetsBuildtargetidBody | Options for build target create/update | |
orgid | str | Organization identifier | |
projectid | str | Project identifier | |
buildtargetid | str | unique id auto-generated from the build target name |
object
- Content-Type: application/json
- Accept: application/json, text/plain, text/html, text/csv
[Back to top] [Back to API list] [Back to Model list] [Back to README]