betacode / cloud-build-api

API for Unity's cloud build services generated from swagger and modified to work

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

swagger-client

This API is intended to be used in conjunction with the Unity Cloud Build service. A tool for building your Unity projects in the Cloud. See https://developer.cloud.unity3d.com for more information. ## Making requests This website is built to allow requests to be made against the API. If you are currently logged into Cloud Build you should be able to make requests without entering an API key. You can find your API key in the Unity Cloud Services portal by clicking on 'Cloud Build Preferences' in the sidebar. Copy the API Key and paste it into the upper left corner of this website. It will be used in all subsequent requests. ## Clients The Unity Cloud Build API is based upon Swagger. Client libraries to integrate with your projects can easily be generated with the Swagger Code Generator. The JSON schema required to generate a client for this API version is located here: [API_URL][BASE_PATH]/api.json ## Authorization The Unity Cloud Build API requires an access token from your Unity Cloud Build account, which can be found at https://build.cloud.unity3d.com/login/me To authenticate requests, include a Basic Authentication header with your API key as the value. e.g. Authorization: Basic [YOUR API KEY] ## Pagination Paged results will take two parameters. A page number that is calculated based upon the per_page amount. For instance if there are 40 results and you specify page 2 with per_page set to 10 you will receive records 11-20. Paged results will also return a Content-Range header. For the example above the content range header would look like this: Content-Range: items 11-20/40 ## Versioning The API version is indicated in the request URL. Upgrading to a newer API version can be done by changing the path. The API will receive a new version in the following cases: * removal of a path or request type * addition of a required field * removal of a required field The following changes are considered backwards compatible and will not trigger a new API version: * addition of an endpoint or request type * addition of an optional field * removal of an optional field * changes to the format of ids ## Rate Limiting Requests against the Cloud Build API are limited to a rate of 100 per minute. To preserve the quality of service throughout Cloud Build, additional rate limits may apply to some actions. For example, polling aggressively instead of using webhooks or making API calls with a high concurrency may result in rate limiting. It is not intended for these rate limits to interfere with any legitimate use of the API. Please contact support 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\" }

This Python package is automatically generated by the Swagger Codegen project:

  • API version: 1.0.0
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.languages.PythonClientCodegen

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

If the python package is hosted on Github, you can install directly from Github

pip install git+https://github.com//.git

(you may need to run pip with root permission: sudo pip install git+https://github.com//.git)

Then import the package:

import swagger_client 

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import swagger_client

Getting Started

Please follow the installation procedure and then run the following:

from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: apikey
swagger_client.configuration.username = 'YOUR_USERNAME'
swagger_client.configuration.password = 'YOUR_PASSWORD'
# Configure OAuth2 access token for authorization: permissions
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = swagger_client.BuildsApi()
orgid = 'orgid_example' # str | Organization identifier
projectid = 'projectid_example' # str | Project identifier
options = swagger_client.Options10() # Options10 | Options to specify what builds to delete

try:
    # Delete artifacts for a batch of builds
    api_response = api_instance.batch_delete_build_artifacts(orgid, projectid, options)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BuildsApi->batch_delete_build_artifacts: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://localhost/api/v1

Class Method HTTP request Description
BuildsApi batch_delete_build_artifacts POST /orgs/{orgid}/projects/{projectid}/artifacts/delete Delete artifacts for a batch of builds
BuildsApi cancel_all_builds DELETE /orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/builds Cancel all builds
BuildsApi cancel_build DELETE /orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/builds/{number} Cancel build
BuildsApi cancel_builds_for_org DELETE /orgs/{orgid}/builds Cancel builds for org
BuildsApi create_share POST /orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/builds/{number}/share Create a new link to share a project
BuildsApi delete_all_build_artifacts DELETE /orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/builds/artifacts Delete all artifacts associated with all non-favorited builds for a specified buildtargetid (_all is allowed).
BuildsApi delete_build_artifacts DELETE /orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/builds/{number}/artifacts Delete all artifacts associated with a specific build
BuildsApi get_audit_log GET /orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/auditlog Get audit log
BuildsApi get_audit_log_0 GET /orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/builds/{number}/auditlog Get audit log
BuildsApi get_build GET /orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/builds/{number} Build Status
BuildsApi get_build_log GET /orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/builds/{number}/log Get build log
BuildsApi get_builds GET /orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/builds List all builds
BuildsApi get_builds_for_org GET /orgs/{orgid}/builds List all builds for org
BuildsApi get_share GET /orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/builds/{number}/share Get the share link
BuildsApi revoke_share DELETE /orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/builds/{number}/share Revoke a shared link
BuildsApi start_builds POST /orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/builds Create new build
BuildsApi update_build PUT /orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid}/builds/{number} Update build information
BuildtargetsApi add_build_target POST /orgs/{orgid}/projects/{projectid}/buildtargets Create build target for a project
BuildtargetsApi delete_build_target DELETE /orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid} Delete build target
BuildtargetsApi get_build_target GET /orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid} Get a build target
BuildtargetsApi get_build_targets GET /orgs/{orgid}/projects/{projectid}/buildtargets List all build targets for a project
BuildtargetsApi get_build_targets_for_org GET /orgs/{orgid}/buildtargets List all build targets for an org
BuildtargetsApi update_build_target PUT /orgs/{orgid}/projects/{projectid}/buildtargets/{buildtargetid} Update build target details
ConfigApi list_unity_versions GET /versions/unity List all unity versions
ConfigApi list_xcode_versions GET /versions/xcode List all xcode versions
CredentialsApi add_credentials_android POST /orgs/{orgid}/projects/{projectid}/credentials/signing/android Upload Android Credentials
CredentialsApi add_credentials_ios POST /orgs/{orgid}/projects/{projectid}/credentials/signing/ios Upload iOS Credentials
CredentialsApi delete_android DELETE /orgs/{orgid}/projects/{projectid}/credentials/signing/android/{credentialid} Delete Android Credentials
CredentialsApi delete_ios DELETE /orgs/{orgid}/projects/{projectid}/credentials/signing/ios/{credentialid} Delete iOS Credentials
CredentialsApi get_all_android GET /orgs/{orgid}/projects/{projectid}/credentials/signing/android Get All Android Credentials
CredentialsApi get_all_ios GET /orgs/{orgid}/projects/{projectid}/credentials/signing/ios Get All iOS Credentials
CredentialsApi get_one_android GET /orgs/{orgid}/projects/{projectid}/credentials/signing/android/{credentialid} Get Android Credential Details
CredentialsApi get_one_ios GET /orgs/{orgid}/projects/{projectid}/credentials/signing/ios/{credentialid} Get iOS Credential Details
CredentialsApi update_android PUT /orgs/{orgid}/projects/{projectid}/credentials/signing/android/{credentialid} Update Android Credentials
CredentialsApi update_ios PUT /orgs/{orgid}/projects/{projectid}/credentials/signing/ios/{credentialid} Update iOS Credentials
OrgsApi get_billing_plans GET /orgs/{orgid}/billingplan Get billing plan
OrgsApi get_ssh_key GET /orgs/{orgid}/sshkey Get SSH Key
OrgsApi regenerate_ssh_key POST /orgs/{orgid}/sshkey Regenerate SSH Key
ProjectsApi add_project POST /orgs/{orgid}/projects Create project
ProjectsApi archive_project DELETE /orgs/{orgid}/projects/{projectid} Archive project
ProjectsApi get_audit_log GET /orgs/{orgid}/projects/{projectid}/auditlog Get audit log
ProjectsApi get_billing_plans GET /orgs/{orgid}/projects/{projectid}/billingplan Get billing plan
ProjectsApi get_project GET /orgs/{orgid}/projects/{projectid} Get project details
ProjectsApi get_project_by_upid GET /projects/{projectupid} Get project details
ProjectsApi get_ssh_key GET /orgs/{orgid}/projects/{projectid}/sshkey Get SSH Key
ProjectsApi get_stats GET /orgs/{orgid}/projects/{projectid}/stats Get project statistics
ProjectsApi list_projects_for_org GET /orgs/{orgid}/projects List all projects (org)
ProjectsApi list_projects_for_user GET /projects List all projects (user)
ProjectsApi update_project PUT /orgs/{orgid}/projects/{projectid} Update project details
SharesApi get_share_metadata GET /shares/{shareid} Get details on shared build including download link
StatusApi get_status GET /status Get Cloud Build Status
UserdevicesApi create_device POST /users/me/devices Create iOS device profile
UserdevicesApi list_devices_for_user GET /users/me/devices List iOS device profiles
UsersApi get_user_api_key GET /users/me/apikey Get current user's API key
UsersApi get_user_self GET /users/me Get current user
UsersApi regen_api_key POST /users/me/apikey Regenerate API Key
UsersApi update_user_self PUT /users/me Update current user
WebhooksApi add_hook_for_org POST /orgs/{orgid}/hooks Add hook for organization
WebhooksApi add_hook_for_project POST /orgs/{orgid}/projects/{projectid}/hooks Add hook for project
WebhooksApi delete_hook DELETE /orgs/{orgid}/hooks/{id} Delete organization hook
WebhooksApi delete_hook_0 DELETE /orgs/{orgid}/projects/{projectid}/hooks/{id} Delete project hook
WebhooksApi get_hook GET /orgs/{orgid}/hooks/{id} Get organization hook details
WebhooksApi get_hook_0 GET /orgs/{orgid}/projects/{projectid}/hooks/{id} Get project hook details
WebhooksApi list_hooks_for_org GET /orgs/{orgid}/hooks List hooks for organization
WebhooksApi list_hooks_for_project GET /orgs/{orgid}/projects/{projectid}/hooks List hooks for project
WebhooksApi ping_hook POST /orgs/{orgid}/hooks/{id}/ping Ping an org hook
WebhooksApi ping_hook_0 POST /orgs/{orgid}/projects/{projectid}/hooks/{id}/ping Ping a project hook
WebhooksApi update_hook PUT /orgs/{orgid}/hooks/{id} Update hook for organization
WebhooksApi update_hook_0 PUT /orgs/{orgid}/projects/{projectid}/hooks/{id} Update hook for project

Documentation For Models

Documentation For Authorization

apikey

  • Type: HTTP basic authentication

permissions

  • Type: OAuth
  • Flow: implicit
  • Authorization URL: https://build.cloud.unity3d.com/login/
  • Scopes:
  • org:user: must have at least user permissions in the organization
  • org:manager: must have at least manager permissions in the organization
  • project:user: must have at least user permissions in the project
  • project:manager: must have at least manager permissions in the project
  • admin: administrative privileges
  • admin_readstats: administrative read stats privileges

Author

About

API for Unity's cloud build services generated from swagger and modified to work


Languages

Language:Python 99.9%Language:Shell 0.1%