controllers.app_controller module¶
-
class
controllers.app_controller.
AppController
(config=None, client=None, call_back=None)[source]¶ Bases:
cohesity_management_sdk.controllers.base_controller.BaseController
A Controller to access Endpoints in the cohesity_management_sdk API.
-
get_apps
()[source]¶ Does a GET request to /public/apps.
Api provides the list of the apps which are available for the user to install or are already installed. App object provides basic app information along with app metadata.
- Returns:
App: Response from the API. Success
- Raises:
- APIException: When an error occurs while fetching the data from
the remote API. This exception includes the HTTP Response code, an error message, and the HTTP body that was received in the request.
-
install_app
(version, app_uid)[source]¶ Does a POST request to /public/apps/{appUid}/versions/{version}.
Only purchased apps can be installed using this api.
- Args:
version (long|int): Specifies the app version. app_uid (long|int): Specifies the app Id.
- Returns:
App: Response from the API. Success
- Raises:
- APIException: When an error occurs while fetching the data from
the remote API. This exception includes the HTTP Response code, an error message, and the HTTP body that was received in the request.
-
uninstall_app
(version, app_uid)[source]¶ Does a DELETE request to /public/apps/{appUid}/versions/{version}.
Only purchased apps can be installed using this api.
- Args:
version (long|int): Specifies the app version. app_uid (long|int): Specifies the app Id.
- Returns:
void: Response from the API. No Content
- Raises:
- APIException: When an error occurs while fetching the data from
the remote API. This exception includes the HTTP Response code, an error message, and the HTTP body that was received in the request.
-
upload_app
(files)[source]¶ Does a POST request to /public/apps.
Api provides the list of the apps which are available for the user to install or are already installed. App object provides basic app information along with app metadata.
- Returns:
App: Response from the API. Success
- Raises:
- APIException: When an error occurs while fetching the data from
the remote API. This exception includes the HTTP Response code, an error message, and the HTTP body that was received in the request.
-