Skip to content

Latest commit

 

History

History
1765 lines (1322 loc) · 59.9 KB

File metadata and controls

1765 lines (1322 loc) · 59.9 KB

timeweb_cloud_api.AppsApi

All URIs are relative to https://api.timeweb.cloud

Method HTTP request Description
add_provider POST /api/v1/vcs-provider Привязка vcs провайдера
create_app POST /api/v1/apps Создание приложения
create_deploy POST /api/v1/apps/{app_id}/deploy Запуск деплоя приложения
delete_app DELETE /api/v1/apps/{app_id} Удаление приложения
delete_provider DELETE /api/v1/vcs-provider/{provider_id} Отвязка vcs провайдера от аккаунта
deploy_action POST /api/v1/apps/{app_id}/deploy/{deploy_id}/stop Остановка деплоя приложения
get_app GET /api/v1/apps/{app_id} Получение приложения по id
get_app_deploys GET /api/v1/apps/{app_id}/deploys Получение списка деплоев приложения
get_app_logs GET /api/v1/apps/{app_id}/logs Получение логов приложения
get_app_statistics GET /api/v1/apps/{app_id}/statistics Получение статистики приложения
get_apps GET /api/v1/apps Получение списка приложений
get_apps_presets GET /api/v1/presets/apps Получение списка доступных тарифов для приложения
get_branches GET /api/v1/vcs-provider/{provider_id}/repository/{repository_id} Получение списка веток репозитория
get_commits GET /api/v1/vcs-provider/{provider_id}/repository/{repository_id}/branch Получение списка коммитов ветки репозитория
get_deploy_logs GET /api/v1/apps/{app_id}/deploy/{deploy_id}/logs Получение логов деплоя приложения
get_deploy_settings GET /api/v1/deploy-settings/apps Получение списка дефолтных настроек деплоя для приложения
get_frameworks GET /api/v1/frameworks/apps Получение списка доступных фреймворков для приложения
get_providers GET /api/v1/vcs-provider Получение списка vcs провайдеров
get_repositories GET /api/v1/vcs-provider/{provider_id} Получение списка репозиториев vcs провайдера
update_app_settings PATCH /api/v1/apps/{app_id} Изменение настроек приложения
update_app_state PATCH /api/v1/apps/{app_id}/action/{action} Изменение состояния приложения

add_provider

AddProvider201Response add_provider(add_github)

Привязка vcs провайдера

Чтобы привязать аккаунт провайдера отправьте POST-запрос в /api/v1/vcs-provider, задав необходимые атрибуты.

Example

  • Bearer (JWT) Authentication (Bearer):
import time
import os
import timeweb_cloud_api
from timeweb_cloud_api.models.add_github import AddGithub
from timeweb_cloud_api.models.add_provider201_response import AddProvider201Response
from timeweb_cloud_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.timeweb.cloud
# See configuration.py for a list of all supported configuration parameters.
configuration = timeweb_cloud_api.Configuration(
    host = "https://api.timeweb.cloud"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (JWT): Bearer
configuration = timeweb_cloud_api.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with timeweb_cloud_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = timeweb_cloud_api.AppsApi(api_client)
    add_github = timeweb_cloud_api.AddGithub() # AddGithub | 

    try:
        # Привязка vcs провайдера
        api_response = api_instance.add_provider(add_github)
        print("The response of AppsApi->add_provider:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AppsApi->add_provider: %s\n" % e)

Parameters

Name Type Description Notes
add_github AddGithub

Return type

AddProvider201Response

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
201 Добавление аккаунта провайдера: объект JSON c ключом `provider` -
400 -
401 -
403 -
409 -
429 -
500 -

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

create_app

CreateApp201Response create_app(create_app)

Создание приложения

Чтобы создать приложение, отправьте POST-запрос в /api/v1/apps, задав необходимые атрибуты.

Example

  • Bearer (JWT) Authentication (Bearer):
import time
import os
import timeweb_cloud_api
from timeweb_cloud_api.models.create_app import CreateApp
from timeweb_cloud_api.models.create_app201_response import CreateApp201Response
from timeweb_cloud_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.timeweb.cloud
# See configuration.py for a list of all supported configuration parameters.
configuration = timeweb_cloud_api.Configuration(
    host = "https://api.timeweb.cloud"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (JWT): Bearer
configuration = timeweb_cloud_api.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with timeweb_cloud_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = timeweb_cloud_api.AppsApi(api_client)
    create_app = timeweb_cloud_api.CreateApp() # CreateApp | 

    try:
        # Создание приложения
        api_response = api_instance.create_app(create_app)
        print("The response of AppsApi->create_app:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AppsApi->create_app: %s\n" % e)

Parameters

Name Type Description Notes
create_app CreateApp

Return type

CreateApp201Response

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
201 Объект JSON c ключом `app` -
400 -
401 -
403 -
409 -
429 -
500 -

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

create_deploy

CreateDeploy201Response create_deploy(app_id, create_deploy_request)

Запуск деплоя приложения

Чтобы запустить деплой приложения, отправьте POST-запрос в /api/v1/apps/{app_id}/deploy, задав необходимые атрибуты.

Example

  • Bearer (JWT) Authentication (Bearer):
import time
import os
import timeweb_cloud_api
from timeweb_cloud_api.models.create_deploy201_response import CreateDeploy201Response
from timeweb_cloud_api.models.create_deploy_request import CreateDeployRequest
from timeweb_cloud_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.timeweb.cloud
# See configuration.py for a list of all supported configuration parameters.
configuration = timeweb_cloud_api.Configuration(
    host = "https://api.timeweb.cloud"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (JWT): Bearer
configuration = timeweb_cloud_api.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with timeweb_cloud_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = timeweb_cloud_api.AppsApi(api_client)
    app_id = None # object | 
    create_deploy_request = timeweb_cloud_api.CreateDeployRequest() # CreateDeployRequest | 

    try:
        # Запуск деплоя приложения
        api_response = api_instance.create_deploy(app_id, create_deploy_request)
        print("The response of AppsApi->create_deploy:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AppsApi->create_deploy: %s\n" % e)

Parameters

Name Type Description Notes
app_id object
create_deploy_request CreateDeployRequest

Return type

CreateDeploy201Response

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
201 Деплой: объект JSON c ключом `deploy` -
400 -
401 -
403 -
409 -
429 -
500 -

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

delete_app

delete_app(app_id)

Удаление приложения

Чтобы удалить приложение, отправьте DELETE-запрос в /api/v1/apps/{app_id}.

Example

  • Bearer (JWT) Authentication (Bearer):
import time
import os
import timeweb_cloud_api
from timeweb_cloud_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.timeweb.cloud
# See configuration.py for a list of all supported configuration parameters.
configuration = timeweb_cloud_api.Configuration(
    host = "https://api.timeweb.cloud"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (JWT): Bearer
configuration = timeweb_cloud_api.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with timeweb_cloud_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = timeweb_cloud_api.AppsApi(api_client)
    app_id = None # object | 

    try:
        # Удаление приложения
        api_instance.delete_app(app_id)
    except Exception as e:
        print("Exception when calling AppsApi->delete_app: %s\n" % e)

Parameters

Name Type Description Notes
app_id object

Return type

void (empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 Приложение успешно удалено. -
400 -
401 -
403 -
404 -
429 -
500 -

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

delete_provider

delete_provider(provider_id)

Отвязка vcs провайдера от аккаунта

Чтобы отвязать vcs провайдера от аккаунта, отправьте DELETE-запрос в /api/v1/vcs-provider/{provider_id}.

Example

  • Bearer (JWT) Authentication (Bearer):
import time
import os
import timeweb_cloud_api
from timeweb_cloud_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.timeweb.cloud
# See configuration.py for a list of all supported configuration parameters.
configuration = timeweb_cloud_api.Configuration(
    host = "https://api.timeweb.cloud"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (JWT): Bearer
configuration = timeweb_cloud_api.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with timeweb_cloud_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = timeweb_cloud_api.AppsApi(api_client)
    provider_id = None # object | 

    try:
        # Отвязка vcs провайдера от аккаунта
        api_instance.delete_provider(provider_id)
    except Exception as e:
        print("Exception when calling AppsApi->delete_provider: %s\n" % e)

Parameters

Name Type Description Notes
provider_id object

Return type

void (empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 Успешное удаление провайдера -
400 -
401 -
403 -
404 -
429 -
500 -

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

deploy_action

CreateDeploy201Response deploy_action(app_id, deploy_id)

Остановка деплоя приложения

Чтобы остановить деплой приложения, отправьте POST-запрос в api/v1/apps/{app_id}/deploy/{deploy_id}/stop.

Example

  • Bearer (JWT) Authentication (Bearer):
import time
import os
import timeweb_cloud_api
from timeweb_cloud_api.models.create_deploy201_response import CreateDeploy201Response
from timeweb_cloud_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.timeweb.cloud
# See configuration.py for a list of all supported configuration parameters.
configuration = timeweb_cloud_api.Configuration(
    host = "https://api.timeweb.cloud"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (JWT): Bearer
configuration = timeweb_cloud_api.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with timeweb_cloud_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = timeweb_cloud_api.AppsApi(api_client)
    app_id = None # object | 
    deploy_id = None # object | 

    try:
        # Остановка деплоя приложения
        api_response = api_instance.deploy_action(app_id, deploy_id)
        print("The response of AppsApi->deploy_action:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AppsApi->deploy_action: %s\n" % e)

Parameters

Name Type Description Notes
app_id object
deploy_id object

Return type

CreateDeploy201Response

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Ответ будет представлять собой объект JSON c ключом `deploy` -
400 -
401 -
403 -
409 -
429 -
500 -

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

get_app

CreateApp201Response get_app(app_id)

Получение приложения по id

Чтобы получить приложение по id, отправьте GET-запрос на /api/v1/apps/{app_id}.

Example

  • Bearer (JWT) Authentication (Bearer):
import time
import os
import timeweb_cloud_api
from timeweb_cloud_api.models.create_app201_response import CreateApp201Response
from timeweb_cloud_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.timeweb.cloud
# See configuration.py for a list of all supported configuration parameters.
configuration = timeweb_cloud_api.Configuration(
    host = "https://api.timeweb.cloud"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (JWT): Bearer
configuration = timeweb_cloud_api.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with timeweb_cloud_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = timeweb_cloud_api.AppsApi(api_client)
    app_id = None # object | 

    try:
        # Получение приложения по id
        api_response = api_instance.get_app(app_id)
        print("The response of AppsApi->get_app:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AppsApi->get_app: %s\n" % e)

Parameters

Name Type Description Notes
app_id object

Return type

CreateApp201Response

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Объект JSON c ключом `app` -
400 -
401 -
403 -
404 -
429 -
500 -

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

get_app_deploys

GetAppDeploys200Response get_app_deploys(app_id, limit=limit, offset=offset)

Получение списка деплоев приложения

Чтобы получить список деплоев приложения, отправьте GET-запрос на /api/v1/apps/{app_id}/deploys.

Example

  • Bearer (JWT) Authentication (Bearer):
import time
import os
import timeweb_cloud_api
from timeweb_cloud_api.models.get_app_deploys200_response import GetAppDeploys200Response
from timeweb_cloud_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.timeweb.cloud
# See configuration.py for a list of all supported configuration parameters.
configuration = timeweb_cloud_api.Configuration(
    host = "https://api.timeweb.cloud"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (JWT): Bearer
configuration = timeweb_cloud_api.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with timeweb_cloud_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = timeweb_cloud_api.AppsApi(api_client)
    app_id = None # object | 
    limit = None # object | Обозначает количество записей, которое необходимо вернуть. (optional)
    offset = None # object | Указывает на смещение относительно начала списка. (optional)

    try:
        # Получение списка деплоев приложения
        api_response = api_instance.get_app_deploys(app_id, limit=limit, offset=offset)
        print("The response of AppsApi->get_app_deploys:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AppsApi->get_app_deploys: %s\n" % e)

Parameters

Name Type Description Notes
app_id object
limit object Обозначает количество записей, которое необходимо вернуть. [optional]
offset object Указывает на смещение относительно начала списка. [optional]

Return type

GetAppDeploys200Response

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Объект JSON c ключом `deploys` -
400 -
401 -
403 -
404 -
429 -
500 -

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

get_app_logs

GetAppLogs200Response get_app_logs(app_id)

Получение логов приложения

Чтобы получить логи приложения, отправьте GET-запрос на /api/v1/apps/{app_id}/logs.

Example

  • Bearer (JWT) Authentication (Bearer):
import time
import os
import timeweb_cloud_api
from timeweb_cloud_api.models.get_app_logs200_response import GetAppLogs200Response
from timeweb_cloud_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.timeweb.cloud
# See configuration.py for a list of all supported configuration parameters.
configuration = timeweb_cloud_api.Configuration(
    host = "https://api.timeweb.cloud"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (JWT): Bearer
configuration = timeweb_cloud_api.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with timeweb_cloud_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = timeweb_cloud_api.AppsApi(api_client)
    app_id = None # object | 

    try:
        # Получение логов приложения
        api_response = api_instance.get_app_logs(app_id)
        print("The response of AppsApi->get_app_logs:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AppsApi->get_app_logs: %s\n" % e)

Parameters

Name Type Description Notes
app_id object

Return type

GetAppLogs200Response

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Объект JSON c ключом `app_logs` -
400 -
401 -
403 -
404 -
429 -
500 -

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

get_app_statistics

GetServerStatistics200Response get_app_statistics(app_id, date_from, date_to)

Получение статистики приложения

Чтобы получить статистику сервера, отправьте GET-запрос на /api/v1/apps/{app_id}/statistics. Метод поддерживает только приложения type: backend.

Example

  • Bearer (JWT) Authentication (Bearer):
import time
import os
import timeweb_cloud_api
from timeweb_cloud_api.models.get_server_statistics200_response import GetServerStatistics200Response
from timeweb_cloud_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.timeweb.cloud
# See configuration.py for a list of all supported configuration parameters.
configuration = timeweb_cloud_api.Configuration(
    host = "https://api.timeweb.cloud"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (JWT): Bearer
configuration = timeweb_cloud_api.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with timeweb_cloud_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = timeweb_cloud_api.AppsApi(api_client)
    app_id = None # object | 
    date_from = None # object | Дата начала сбора статистики. Строка в формате ISO 8061, закодированная в ASCII, пример: `2023-05-25T14%3A35%3A38`
    date_to = None # object | Дата окончания сбора статистики. Строка в формате ISO 8061, закодированная в ASCII, пример: `2023-05-25T14%3A35%3A38`

    try:
        # Получение статистики приложения
        api_response = api_instance.get_app_statistics(app_id, date_from, date_to)
        print("The response of AppsApi->get_app_statistics:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AppsApi->get_app_statistics: %s\n" % e)

Parameters

Name Type Description Notes
app_id object
date_from object Дата начала сбора статистики. Строка в формате ISO 8061, закодированная в ASCII, пример: `2023-05-25T14%3A35%3A38`
date_to object Дата окончания сбора статистики. Строка в формате ISO 8061, закодированная в ASCII, пример: `2023-05-25T14%3A35%3A38`

Return type

GetServerStatistics200Response

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Объект JSON c ключами `cpu`, `disk`, `network_traffic`, `ram` -
400 -
401 -
403 -
404 -
409 -
429 -
500 -

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

get_apps

GetApps200Response get_apps()

Получение списка приложений

Чтобы получить список приложений, отправьте GET-запрос на /api/v1/apps.

Example

  • Bearer (JWT) Authentication (Bearer):
import time
import os
import timeweb_cloud_api
from timeweb_cloud_api.models.get_apps200_response import GetApps200Response
from timeweb_cloud_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.timeweb.cloud
# See configuration.py for a list of all supported configuration parameters.
configuration = timeweb_cloud_api.Configuration(
    host = "https://api.timeweb.cloud"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (JWT): Bearer
configuration = timeweb_cloud_api.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with timeweb_cloud_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = timeweb_cloud_api.AppsApi(api_client)

    try:
        # Получение списка приложений
        api_response = api_instance.get_apps()
        print("The response of AppsApi->get_apps:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AppsApi->get_apps: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

GetApps200Response

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Объект JSON c ключом `apps` -
400 -
401 -
403 -
404 -
429 -
500 -

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

get_apps_presets

AppsPresets get_apps_presets(app_id)

Получение списка доступных тарифов для приложения

Чтобы получить список доступных тарифов, отправьте GET-запрос на /api/v1/presets/apps.

Example

  • Bearer (JWT) Authentication (Bearer):
import time
import os
import timeweb_cloud_api
from timeweb_cloud_api.models.apps_presets import AppsPresets
from timeweb_cloud_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.timeweb.cloud
# See configuration.py for a list of all supported configuration parameters.
configuration = timeweb_cloud_api.Configuration(
    host = "https://api.timeweb.cloud"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (JWT): Bearer
configuration = timeweb_cloud_api.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with timeweb_cloud_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = timeweb_cloud_api.AppsApi(api_client)
    app_id = None # object | 

    try:
        # Получение списка доступных тарифов для приложения
        api_response = api_instance.get_apps_presets(app_id)
        print("The response of AppsApi->get_apps_presets:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AppsApi->get_apps_presets: %s\n" % e)

Parameters

Name Type Description Notes
app_id object

Return type

AppsPresets

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Объект JSON c ключами `backend_presets`, `frontend_presets` -
400 -
401 -
403 -
404 -
429 -
500 -

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

get_branches

GetBranches200Response get_branches(provider_id, repository_id)

Получение списка веток репозитория

Чтобы получить список веток репозитория, отправьте GET-запрос на /api/v1/vcs-provider/{provider_id}/repository/{repository_id}.

Example

  • Bearer (JWT) Authentication (Bearer):
import time
import os
import timeweb_cloud_api
from timeweb_cloud_api.models.get_branches200_response import GetBranches200Response
from timeweb_cloud_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.timeweb.cloud
# See configuration.py for a list of all supported configuration parameters.
configuration = timeweb_cloud_api.Configuration(
    host = "https://api.timeweb.cloud"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (JWT): Bearer
configuration = timeweb_cloud_api.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with timeweb_cloud_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = timeweb_cloud_api.AppsApi(api_client)
    provider_id = None # object | 
    repository_id = None # object | 

    try:
        # Получение списка веток репозитория
        api_response = api_instance.get_branches(provider_id, repository_id)
        print("The response of AppsApi->get_branches:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AppsApi->get_branches: %s\n" % e)

Parameters

Name Type Description Notes
provider_id object
repository_id object

Return type

GetBranches200Response

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Объект JSON c ключом `branches` -
400 -
401 -
403 -
404 -
429 -
500 -

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

get_commits

GetCommits200Response get_commits(account_id, provider_id, repository_id, name)

Получение списка коммитов ветки репозитория

Чтобы получить список коммитов ветки репозитория, отправьте GET-запрос на /api/v1/vcs-provider/{provider_id}/repository/{repository_id}/branch.

Example

  • Bearer (JWT) Authentication (Bearer):
import time
import os
import timeweb_cloud_api
from timeweb_cloud_api.models.get_commits200_response import GetCommits200Response
from timeweb_cloud_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.timeweb.cloud
# See configuration.py for a list of all supported configuration parameters.
configuration = timeweb_cloud_api.Configuration(
    host = "https://api.timeweb.cloud"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (JWT): Bearer
configuration = timeweb_cloud_api.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with timeweb_cloud_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = timeweb_cloud_api.AppsApi(api_client)
    account_id = None # object | 
    provider_id = None # object | 
    repository_id = None # object | 
    name = None # object | Название ветки

    try:
        # Получение списка коммитов ветки репозитория
        api_response = api_instance.get_commits(account_id, provider_id, repository_id, name)
        print("The response of AppsApi->get_commits:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AppsApi->get_commits: %s\n" % e)

Parameters

Name Type Description Notes
account_id object
provider_id object
repository_id object
name object Название ветки

Return type

GetCommits200Response

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Объект JSON c ключом `commits` -
400 -
401 -
403 -
404 -
429 -
500 -

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

get_deploy_logs

GetDeployLogs200Response get_deploy_logs(app_id, deploy_id, debug=debug)

Получение логов деплоя приложения

Чтобы получить информацию о деплое, отправьте GET-запрос на api/v1/apps/{app_id}/deploy/{deploy_id}/logs.

Example

  • Bearer (JWT) Authentication (Bearer):
import time
import os
import timeweb_cloud_api
from timeweb_cloud_api.models.get_deploy_logs200_response import GetDeployLogs200Response
from timeweb_cloud_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.timeweb.cloud
# See configuration.py for a list of all supported configuration parameters.
configuration = timeweb_cloud_api.Configuration(
    host = "https://api.timeweb.cloud"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (JWT): Bearer
configuration = timeweb_cloud_api.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with timeweb_cloud_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = timeweb_cloud_api.AppsApi(api_client)
    app_id = None # object | 
    deploy_id = None # object | 
    debug = None # object | Управляет выводом логов деплоя (optional)

    try:
        # Получение логов деплоя приложения
        api_response = api_instance.get_deploy_logs(app_id, deploy_id, debug=debug)
        print("The response of AppsApi->get_deploy_logs:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AppsApi->get_deploy_logs: %s\n" % e)

Parameters

Name Type Description Notes
app_id object
deploy_id object
debug object Управляет выводом логов деплоя [optional]

Return type

GetDeployLogs200Response

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Объект JSON c ключом `deploy_logs` -
400 -
401 -
403 -
404 -
429 -
500 -

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

get_deploy_settings

GetDeploySettings200Response get_deploy_settings(app_id)

Получение списка дефолтных настроек деплоя для приложения

Чтобы получить список настроек деплоя, отправьте GET-запрос на /api/v1/deploy-settings/apps.

Example

  • Bearer (JWT) Authentication (Bearer):
import time
import os
import timeweb_cloud_api
from timeweb_cloud_api.models.get_deploy_settings200_response import GetDeploySettings200Response
from timeweb_cloud_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.timeweb.cloud
# See configuration.py for a list of all supported configuration parameters.
configuration = timeweb_cloud_api.Configuration(
    host = "https://api.timeweb.cloud"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (JWT): Bearer
configuration = timeweb_cloud_api.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with timeweb_cloud_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = timeweb_cloud_api.AppsApi(api_client)
    app_id = None # object | 

    try:
        # Получение списка дефолтных настроек деплоя для приложения
        api_response = api_instance.get_deploy_settings(app_id)
        print("The response of AppsApi->get_deploy_settings:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AppsApi->get_deploy_settings: %s\n" % e)

Parameters

Name Type Description Notes
app_id object

Return type

GetDeploySettings200Response

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Объект JSON c ключом `default_deploy_settings` -
400 -
401 -
403 -
404 -
429 -
500 -

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

get_frameworks

AvailableFrameworks get_frameworks(app_id)

Получение списка доступных фреймворков для приложения

Чтобы получить список доступных фреймворков, отправьте GET-запрос на /api/v1/frameworks/apps.

Example

  • Bearer (JWT) Authentication (Bearer):
import time
import os
import timeweb_cloud_api
from timeweb_cloud_api.models.available_frameworks import AvailableFrameworks
from timeweb_cloud_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.timeweb.cloud
# See configuration.py for a list of all supported configuration parameters.
configuration = timeweb_cloud_api.Configuration(
    host = "https://api.timeweb.cloud"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (JWT): Bearer
configuration = timeweb_cloud_api.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with timeweb_cloud_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = timeweb_cloud_api.AppsApi(api_client)
    app_id = None # object | 

    try:
        # Получение списка доступных фреймворков для приложения
        api_response = api_instance.get_frameworks(app_id)
        print("The response of AppsApi->get_frameworks:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AppsApi->get_frameworks: %s\n" % e)

Parameters

Name Type Description Notes
app_id object

Return type

AvailableFrameworks

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Объект JSON c ключом `backend_frameworks`, `frontend_frameworks` -
400 -
401 -
403 -
404 -
429 -
500 -

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

get_providers

GetProviders200Response get_providers()

Получение списка vcs провайдеров

Чтобы получить список vcs провайдеров, отправьте GET-запрос на /api/v1/vcs-provider.

Example

  • Bearer (JWT) Authentication (Bearer):
import time
import os
import timeweb_cloud_api
from timeweb_cloud_api.models.get_providers200_response import GetProviders200Response
from timeweb_cloud_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.timeweb.cloud
# See configuration.py for a list of all supported configuration parameters.
configuration = timeweb_cloud_api.Configuration(
    host = "https://api.timeweb.cloud"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (JWT): Bearer
configuration = timeweb_cloud_api.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with timeweb_cloud_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = timeweb_cloud_api.AppsApi(api_client)

    try:
        # Получение списка vcs провайдеров
        api_response = api_instance.get_providers()
        print("The response of AppsApi->get_providers:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AppsApi->get_providers: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

GetProviders200Response

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Объект JSON c ключом `providers` -
400 -
401 -
403 -
404 -
429 -
500 -

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

get_repositories

GetRepositories200Response get_repositories(provider_id)

Получение списка репозиториев vcs провайдера

Чтобы получить список репозиториев vcs провайдера, отправьте GET-запрос на /api/v1/vcs-provider/{provider_id}.

Example

  • Bearer (JWT) Authentication (Bearer):
import time
import os
import timeweb_cloud_api
from timeweb_cloud_api.models.get_repositories200_response import GetRepositories200Response
from timeweb_cloud_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.timeweb.cloud
# See configuration.py for a list of all supported configuration parameters.
configuration = timeweb_cloud_api.Configuration(
    host = "https://api.timeweb.cloud"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (JWT): Bearer
configuration = timeweb_cloud_api.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with timeweb_cloud_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = timeweb_cloud_api.AppsApi(api_client)
    provider_id = None # object | 

    try:
        # Получение списка репозиториев vcs провайдера
        api_response = api_instance.get_repositories(provider_id)
        print("The response of AppsApi->get_repositories:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AppsApi->get_repositories: %s\n" % e)

Parameters

Name Type Description Notes
provider_id object

Return type

GetRepositories200Response

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Объект JSON c ключом `repositories` -
400 -
401 -
403 -
404 -
429 -
500 -

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

update_app_settings

UpdateAppSettings200Response update_app_settings(app_id, update_settings)

Изменение настроек приложения

Чтобы изменить настройки приложения отправьте PATCH-запрос в /api/v1/apps/{app_id}, задав необходимые атрибуты.

Example

  • Bearer (JWT) Authentication (Bearer):
import time
import os
import timeweb_cloud_api
from timeweb_cloud_api.models.update_app_settings200_response import UpdateAppSettings200Response
from timeweb_cloud_api.models.update_settings import UpdateSettings
from timeweb_cloud_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.timeweb.cloud
# See configuration.py for a list of all supported configuration parameters.
configuration = timeweb_cloud_api.Configuration(
    host = "https://api.timeweb.cloud"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (JWT): Bearer
configuration = timeweb_cloud_api.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with timeweb_cloud_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = timeweb_cloud_api.AppsApi(api_client)
    app_id = None # object | 
    update_settings = timeweb_cloud_api.UpdateSettings() # UpdateSettings | 

    try:
        # Изменение настроек приложения
        api_response = api_instance.update_app_settings(app_id, update_settings)
        print("The response of AppsApi->update_app_settings:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AppsApi->update_app_settings: %s\n" % e)

Parameters

Name Type Description Notes
app_id object
update_settings UpdateSettings

Return type

UpdateAppSettings200Response

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Ответ будет представлять собой объект JSON c ключом `app`. -
400 -
401 -
429 -
500 -

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

update_app_state

update_app_state(app_id, action)

Изменение состояния приложения

Чтобы изменить состояние приложения отправьте PATCH-запрос в /api/v1/apps/{app_id}/action/{action}, задав необходимые атрибуты.

Example

  • Bearer (JWT) Authentication (Bearer):
import time
import os
import timeweb_cloud_api
from timeweb_cloud_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.timeweb.cloud
# See configuration.py for a list of all supported configuration parameters.
configuration = timeweb_cloud_api.Configuration(
    host = "https://api.timeweb.cloud"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (JWT): Bearer
configuration = timeweb_cloud_api.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with timeweb_cloud_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = timeweb_cloud_api.AppsApi(api_client)
    app_id = None # object | 
    action = None # object | 

    try:
        # Изменение состояния приложения
        api_instance.update_app_state(app_id, action)
    except Exception as e:
        print("Exception when calling AppsApi->update_app_state: %s\n" % e)

Parameters

Name Type Description Notes
app_id object
action object

Return type

void (empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 Действие выполнено успешно. -
400 -
401 -
403 -
404 -
429 -
500 -

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