Skip to content

Latest commit

 

History

History
225 lines (144 loc) · 4.67 KB

package.md

File metadata and controls

225 lines (144 loc) · 4.67 KB

Package

package_controller = client.package

Class Name

PackageController

Methods

Cancel Package Installation

Cancels a package installation.

def cancel_package_installation(self,
                               package_id)

Parameters

Parameter Type Tags Description
package_id uuid|string Template, Required Installation Id.

Response Type

void

Example Usage

package_id = '00000d24-0000-0000-0000-000000000000'

result = package_controller.cancel_package_installation(package_id)

Errors

HTTP Status Code Error Description Exception Class
401 Unauthorized APIException
403 Forbidden APIException

Get Package Info

Gets a package by name or assembly GUID.

def get_package_info(self,
                    name,
                    assembly_guid=None)

Parameters

Parameter Type Tags Description
name string Template, Required The name of the package.
assembly_guid uuid|string Query, Optional The GUID of the associated assembly.

Response Type

PackageInfo

Example Usage

name = 'name0'

result = package_controller.get_package_info(name)

Errors

HTTP Status Code Error Description Exception Class
401 Unauthorized APIException
403 Forbidden APIException

Get Packages

Gets available packages.

def get_packages(self)

Response Type

List of PackageInfo

Example Usage

result = package_controller.get_packages()

Errors

HTTP Status Code Error Description Exception Class
401 Unauthorized APIException
403 Forbidden APIException

Get Repositories

Gets all package repositories.

def get_repositories(self)

Response Type

List of RepositoryInfo

Example Usage

result = package_controller.get_repositories()

Errors

HTTP Status Code Error Description Exception Class
401 Unauthorized APIException
403 Forbidden APIException

Install Package

Installs a package.

def install_package(self,
                   name,
                   assembly_guid=None,
                   version=None,
                   repository_url=None)

Parameters

Parameter Type Tags Description
name string Template, Required Package name.
assembly_guid uuid|string Query, Optional GUID of the associated assembly.
version string Query, Optional Optional version. Defaults to latest version.
repository_url string Query, Optional Optional. Specify the repository to install from.

Response Type

void

Example Usage

name = 'name0'

result = package_controller.install_package(name)

Errors

HTTP Status Code Error Description Exception Class
401 Unauthorized APIException
403 Forbidden APIException
404 Package not found. ProblemDetailsException

Set Repositories

Sets the enabled and existing package repositories.

def set_repositories(self,
                    body)

Parameters

Parameter Type Tags Description
body List of RepositoryInfo Body, Required The list of package repositories.

Response Type

void

Example Usage

body = []

body.append(RepositoryInfo())

body.append(RepositoryInfo())


result = package_controller.set_repositories(body)

Errors

HTTP Status Code Error Description Exception Class
401 Unauthorized APIException
403 Forbidden APIException