Skip to content

Latest commit

 

History

History
821 lines (610 loc) · 28.2 KB

ProjectsApi.md

File metadata and controls

821 lines (610 loc) · 28.2 KB

unity_cloud_build_api.ProjectsApi

All URIs are relative to /api/v1

Method HTTP request Description
add_project POST /orgs/{orgid}/projects Create project
archive_project DELETE /orgs/{orgid}/projects/{projectid} Archive project
billing_plan GET /orgs/{orgid}/projects/{projectid}/billingplan_alpha Get billing plan
get_audit_log_for_project GET /orgs/{orgid}/projects/{projectid}/auditlog Get audit log
get_billing_plans_for_project GET /orgs/{orgid}/projects/{projectid}/billingplan Get billing plan
get_env_variables_for_project GET /orgs/{orgid}/projects/{projectid}/envvars Get environment variables
get_project GET /orgs/{orgid}/projects/{projectid} Get project details
get_project_by_upid GET /projects/{projectupid} Get project details
get_ssh_key_for_project GET /orgs/{orgid}/projects/{projectid}/sshkey Get SSH Key
get_stats_for_project GET /orgs/{orgid}/projects/{projectid}/stats Get project statistics
list_projects_for_org GET /orgs/{orgid}/projects List all projects (org)
list_projects_for_user GET /projects List all projects (user)
set_env_variables_for_project PUT /orgs/{orgid}/projects/{projectid}/envvars Set environment variables
update_project PUT /orgs/{orgid}/projects/{projectid} Update project details

add_project

object add_project(body, orgid)

Create project

Create a project for the specified organization

Example

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.ProjectsApi(unity_cloud_build_api.ApiClient(configuration))
body = unity_cloud_build_api.OrgidProjectsBody() # OrgidProjectsBody | Options for project create/update
orgid = 'orgid_example' # str | Organization identifier

try:
    # Create project
    api_response = api_instance.add_project(body, orgid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProjectsApi->add_project: %s\n" % e)

Parameters

Name Type Description Notes
body OrgidProjectsBody Options for project create/update
orgid str Organization identifier

Return type

object

Authorization

apikey, permissions

HTTP request headers

  • 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]

archive_project

str archive_project(orgid, projectid)

Archive project

This will archive the project in Cloud Build ONLY. Use with caution - this process is not reversible. The projects UPID will be removed from Cloud Build allowing the project to be reconfigured.

Example

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.ProjectsApi(unity_cloud_build_api.ApiClient(configuration))
orgid = 'orgid_example' # str | Organization identifier
projectid = 'projectid_example' # str | Project identifier

try:
    # Archive project
    api_response = api_instance.archive_project(orgid, projectid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProjectsApi->archive_project: %s\n" % e)

Parameters

Name Type Description Notes
orgid str Organization identifier
projectid str Project identifier

Return type

str

Authorization

apikey, permissions

HTTP request headers

  • 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]

billing_plan

object billing_plan(orgid, projectid)

Get billing plan

Get the billing plan for the specified organization (but pull from project)

Example

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.ProjectsApi(unity_cloud_build_api.ApiClient(configuration))
orgid = 'orgid_example' # str | Organization identifier
projectid = 'projectid_example' # str | Project identifier

try:
    # Get billing plan
    api_response = api_instance.billing_plan(orgid, projectid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProjectsApi->billing_plan: %s\n" % e)

Parameters

Name Type Description Notes
orgid str Organization identifier
projectid str Project identifier

Return type

object

Authorization

apikey, permissions

HTTP request headers

  • 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]

get_audit_log_for_project

list[InlineResponse2006] get_audit_log_for_project(orgid, projectid, per_page=per_page, page=page)

Get audit log

Retrieve a list of historical settings changes for this project

Example

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.ProjectsApi(unity_cloud_build_api.ApiClient(configuration))
orgid = 'orgid_example' # str | Organization identifier
projectid = 'projectid_example' # str | Project identifier
per_page = 25.0 # float | Number of audit log records to retrieve (optional) (default to 25.0)
page = 1.0 # float | Skip to page number, based on per_page value (optional) (default to 1.0)

try:
    # Get audit log
    api_response = api_instance.get_audit_log_for_project(orgid, projectid, per_page=per_page, page=page)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProjectsApi->get_audit_log_for_project: %s\n" % e)

Parameters

Name Type Description Notes
orgid str Organization identifier
projectid str Project identifier
per_page float Number of audit log records to retrieve [optional] [default to 25.0]
page float Skip to page number, based on per_page value [optional] [default to 1.0]

Return type

list[InlineResponse2006]

Authorization

apikey, permissions

HTTP request headers

  • 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]

get_billing_plans_for_project

object get_billing_plans_for_project(orgid, projectid)

Get billing plan

Get the billing plan for the specified project

Example

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.ProjectsApi(unity_cloud_build_api.ApiClient(configuration))
orgid = 'orgid_example' # str | Organization identifier
projectid = 'projectid_example' # str | Project identifier

try:
    # Get billing plan
    api_response = api_instance.get_billing_plans_for_project(orgid, projectid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProjectsApi->get_billing_plans_for_project: %s\n" % e)

Parameters

Name Type Description Notes
orgid str Organization identifier
projectid str Project identifier

Return type

object

Authorization

apikey, permissions

HTTP request headers

  • 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]

get_env_variables_for_project

dict(str, str) get_env_variables_for_project(orgid, projectid)

Get environment variables

Get all configured environment variables for a given project

Example

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.ProjectsApi(unity_cloud_build_api.ApiClient(configuration))
orgid = 'orgid_example' # str | Organization identifier
projectid = 'projectid_example' # str | Project identifier

try:
    # Get environment variables
    api_response = api_instance.get_env_variables_for_project(orgid, projectid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProjectsApi->get_env_variables_for_project: %s\n" % e)

Parameters

Name Type Description Notes
orgid str Organization identifier
projectid str Project identifier

Return type

dict(str, str)

Authorization

apikey, permissions

HTTP request headers

  • 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]

get_project

object get_project(orgid, projectid, include=include)

Get project details

Example

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.ProjectsApi(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)

try:
    # Get project details
    api_response = api_instance.get_project(orgid, projectid, include=include)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProjectsApi->get_project: %s\n" % e)

Parameters

Name Type Description Notes
orgid str Organization identifier
projectid str Project identifier
include str Extra fields to include in the response [optional]

Return type

object

Authorization

apikey, permissions

HTTP request headers

  • 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]

get_project_by_upid

object get_project_by_upid(projectupid)

Get project details

Gets the same data as /orgs/{orgid}/project/{projectid} but looks up the project by the Unity Project ID. This value is returned in the project's guid field.

Example

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.ProjectsApi(unity_cloud_build_api.ApiClient(configuration))
projectupid = 'projectupid_example' # str | Project UPID - Unity global id

try:
    # Get project details
    api_response = api_instance.get_project_by_upid(projectupid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProjectsApi->get_project_by_upid: %s\n" % e)

Parameters

Name Type Description Notes
projectupid str Project UPID - Unity global id

Return type

object

Authorization

apikey, permissions

HTTP request headers

  • 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]

get_ssh_key_for_project

object get_ssh_key_for_project(orgid, projectid)

Get SSH Key

Get the ssh public key for the specified project

Example

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.ProjectsApi(unity_cloud_build_api.ApiClient(configuration))
orgid = 'orgid_example' # str | Organization identifier
projectid = 'projectid_example' # str | Project identifier

try:
    # Get SSH Key
    api_response = api_instance.get_ssh_key_for_project(orgid, projectid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProjectsApi->get_ssh_key_for_project: %s\n" % e)

Parameters

Name Type Description Notes
orgid str Organization identifier
projectid str Project identifier

Return type

object

Authorization

apikey, permissions

HTTP request headers

  • 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]

get_stats_for_project

object get_stats_for_project(orgid, projectid)

Get project statistics

Get statistics for the specified project

Example

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.ProjectsApi(unity_cloud_build_api.ApiClient(configuration))
orgid = 'orgid_example' # str | Organization identifier
projectid = 'projectid_example' # str | Project identifier

try:
    # Get project statistics
    api_response = api_instance.get_stats_for_project(orgid, projectid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProjectsApi->get_stats_for_project: %s\n" % e)

Parameters

Name Type Description Notes
orgid str Organization identifier
projectid str Project identifier

Return type

object

Authorization

apikey, permissions

HTTP request headers

  • 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_projects_for_org

list[object] list_projects_for_org(orgid, include=include)

List all projects (org)

List all projects that belong to the specified organization. Add "?include=settings" as a query parameter to include the project settings with the response.

Example

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.ProjectsApi(unity_cloud_build_api.ApiClient(configuration))
orgid = 'orgid_example' # str | Organization identifier
include = 'include_example' # str | Extra fields to include in the response (optional)

try:
    # List all projects (org)
    api_response = api_instance.list_projects_for_org(orgid, include=include)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProjectsApi->list_projects_for_org: %s\n" % e)

Parameters

Name Type Description Notes
orgid str Organization identifier
include str Extra fields to include in the response [optional]

Return type

list[object]

Authorization

apikey, permissions

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/plain, text/html, text/csv, application/json-default, application/json-include-settings

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_projects_for_user

list[object] list_projects_for_user(include=include)

List all projects (user)

List all projects that you have permission to access across all organizations. Add "?include=settings" as a query parameter to include the project settings with the response.

Example

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 HTTP basic authorization: filetoken
configuration = unity_cloud_build_api.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = unity_cloud_build_api.ProjectsApi(unity_cloud_build_api.ApiClient(configuration))
include = 'include_example' # str | Extra fields to include in the response (optional)

try:
    # List all projects (user)
    api_response = api_instance.list_projects_for_user(include=include)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProjectsApi->list_projects_for_user: %s\n" % e)

Parameters

Name Type Description Notes
include str Extra fields to include in the response [optional]

Return type

list[object]

Authorization

apikey, filetoken

HTTP request headers

  • 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]

set_env_variables_for_project

dict(str, str) set_env_variables_for_project(body, orgid, projectid)

Set environment variables

Set all configured environment variables for a given project

Example

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.ProjectsApi(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

try:
    # Set environment variables
    api_response = api_instance.set_env_variables_for_project(body, orgid, projectid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProjectsApi->set_env_variables_for_project: %s\n" % e)

Parameters

Name Type Description Notes
body dict(str, str) Environment variables
orgid str Organization identifier
projectid str Project identifier

Return type

dict(str, str)

Authorization

apikey, permissions

HTTP request headers

  • 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]

update_project

object update_project(body, orgid, projectid)

Update project details

Example

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.ProjectsApi(unity_cloud_build_api.ApiClient(configuration))
body = unity_cloud_build_api.ProjectsProjectidBody() # ProjectsProjectidBody | Options for project create/update
orgid = 'orgid_example' # str | Organization identifier
projectid = 'projectid_example' # str | Project identifier

try:
    # Update project details
    api_response = api_instance.update_project(body, orgid, projectid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProjectsApi->update_project: %s\n" % e)

Parameters

Name Type Description Notes
body ProjectsProjectidBody Options for project create/update
orgid str Organization identifier
projectid str Project identifier

Return type

object

Authorization

apikey, permissions

HTTP request headers

  • 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]