Apps API Reference

Apps

class apolo_sdk.Apps

Application management subsystem. Allows listing and uninstalling applications, as well as browsing available application templates.

async list(states: list[AppState] | None = None, cluster_name: str | None = None, org_name: str | None = None, project_name: str | None = None) AsyncContextManager[AsyncIterator[App]][source]

List applications, async iterator. Yields App instances.

Parameters:
  • states (list[AppState]) – Optional list of app states to filter by.

  • cluster_name (str) – cluster to list applications. Default is current cluster.

  • org_name (str) – org to list applications. Default is current org.

  • project_name (str) – project to list applications. Default is current project.

async install(app_data: dict, cluster_name: str | None = None, org_name: str | None = None, project_name: str | None = None) App[source]

Install a new application instance from template data.

Parameters:
  • app_data (dict) – Dictionary containing application installation data.

  • cluster_name (str) – cluster to install application. Default is current cluster.

  • org_name (str) – org to install application. Default is current org.

  • project_name (str) – project to install application. Default is current project.

async uninstall(app_id: str, cluster_name: str | None = None, org_name: str | None = None, project_name: str | None = None, *, force: bool = False) None[source]

Uninstall an application instance.

Parameters:
  • app_id (str) – The ID of the application instance to uninstall.

  • cluster_name (str) – cluster where the application is deployed. Default is current cluster.

  • org_name (str) – org where the application is deployed. Default is current org.

  • project_name (str) – project where the application is deployed. Default is current project.

  • force (bool) – Force uninstall the application. Default is False.

async list_templates(cluster_name: str | None = None, org_name: str | None = None, project_name: str | None = None) AsyncContextManager[AsyncIterator[AppTemplate]][source]

List available application templates, async iterator. Yields AppTemplate instances.

Parameters:
  • cluster_name (str) – cluster to list templates. Default is current cluster.

  • org_name (str) – org to list templates. Default is current org.

  • project_name (str) – project to list templates. Default is current project.

async list_template_versions(name: str, cluster_name: str | None = None, org_name: str | None = None, project_name: str | None = None) AsyncContextManager[AsyncIterator[AppTemplate]][source]

List all available versions for a specific app template, async iterator. Yields AppTemplate instances.

Parameters:
  • name (str) – The name of the app template.

  • cluster_name (str) – cluster to list template versions. Default is current cluster.

  • org_name (str) – org to list template versions. Default is current org.

  • project_name (str) – project to list template versions. Default is current project.

async get_template(name: str, version: str | None = None, cluster_name: str | None = None, org_name: str | None = None, project_name: str | None = None) AppTemplate[source]

Get complete metadata for a specific app template.

Parameters:
  • name (str) – The name of the app template.

  • version (str) – The version of the app template. Default is “latest”.

  • cluster_name (str) – cluster to get template from. Default is current cluster.

  • org_name (str) – org to get template from. Default is current org.

  • project_name (str) – project to get template from. Default is current project.

async get(app_id: str) App[source]

Get a specific application instance by ID.

Parameters:

app_id (str) – The ID of the application instance.

Returns:

The application instance.

Return type:

App

Raises:

ResourceNotFound – If app instance not found.

async get_output(app_id: str, cluster_name: str | None = None, org_name: str | None = None, project_name: str | None = None) dict[str, Any][source]

Get output parameters from an app instance.

Returns a dictionary containing output parameters as key-value pairs. Output parameters are values generated by the application after installation, such as URLs, passwords, API keys, and other configuration values.

Parameters:
  • app_id (str) – The ID of the app instance.

  • cluster_name (str) – Cluster where the app is deployed. Default is current cluster.

  • org_name (str) – Organization where the app is deployed. Default is current org.

  • project_name (str) – Project where the app is deployed. Default is current project.

Returns:

Dictionary containing output parameters as key-value pairs.

Return type:

dict[str, Any]

Raises:

ResourceNotFound – If app instance not found or no output records exist.

async get_values(app_id: str | None = None, value_type: str | None = None, cluster_name: str | None = None, org_name: str | None = None, project_name: str | None = None) AsyncContextManager[AsyncIterator[AppValue]][source]

Get values from app instances, async iterator. Yields AppValue instances.

Parameters:
  • app_id (str) – Optional app instance ID to filter values.

  • value_type (str) – Optional value type to filter.

  • cluster_name (str) – cluster to get values from. Default is current cluster.

  • org_name (str) – org to get values from. Default is current org.

  • project_name (str) – project to get values from. Default is current project.

async logs(app_id: str, *, cluster_name: str | None = None, org_name: str | None = None, project_name: str | None = None, since: datetime | None = None, timestamps: bool = False) AsyncContextManager[AsyncIterator[bytes]][source]

Get logs for an app instance, async iterator. Yields chunks of logs as bytes.

Parameters:
  • app_id (str) – The ID of the app instance.

  • cluster_name (str) – Cluster where the app is deployed. Default is current cluster.

  • org_name (str) – Organization where the app is deployed. Default is current org.

  • project_name (str) – Project where the app is deployed. Default is current project.

  • since (datetime) – Optional timestamp to start logs from.

  • timestamps (bool) – Include timestamps in the logs output.

async get_events(app_id: str, cluster_name: str | None = None, org_name: str | None = None, project_name: str | None = None) AsyncContextManager[AsyncIterator[AppEvent]][source]

Get events for an app instance, async iterator. Yields AppEvent instances.

Parameters:
  • app_id (str) – The ID of the app instance.

  • cluster_name (str) – Cluster where the app is deployed. Default is current cluster.

  • org_name (str) – Organization where the app is deployed. Default is current org.

  • project_name (str) – Project where the app is deployed. Default is current project.

async get_revisions(app_id: str) list[AppConfigurationRevision][source]

Get configuration revision history for an app instance.

Parameters:

app_id (str) – The ID of the app instance.

Returns:

List of configuration revisions.

Return type:

list[AppConfigurationRevision]

async rollback(app_id: str, revision_number: int, cluster_name: str | None = None, org_name: str | None = None, project_name: str | None = None, comment: str | None = None) App[source]

Rollback an app instance to a previous configuration revision.

Parameters:
  • app_id (str) – The ID of the app instance.

  • revision_number (int) – The revision number to rollback to.

  • cluster_name (str) – Cluster where the app is deployed. Default is current cluster.

  • org_name (str) – Organization where the app is deployed. Default is current org.

  • project_name (str) – Project where the app is deployed. Default is current project.

  • comment (str) – Optional comment describing the rollback.

Returns:

The updated application instance.

Return type:

App

async get_input(app_id: str, cluster_name: str | None = None, org_name: str | None = None, project_name: str | None = None, revision: int | None = None) dict[str, Any][source]

Get input parameters for an app instance, optionally for a specific revision.

Parameters:
  • app_id (str) – The ID of the app instance.

  • cluster_name (str) – Cluster where the app is deployed. Default is current cluster.

  • org_name (str) – Organization where the app is deployed. Default is current org.

  • project_name (str) – Project where the app is deployed. Default is current project.

  • revision (int) – Optional revision number to get input for. Default is current revision.

Returns:

Dictionary containing input parameters.

Return type:

dict[str, Any]

async configure(app_id: str, app_data: dict, comment: str | None = None) App[source]

Reconfigure an application instance with new input data and display name.

Parameters:
  • app_id (str) – The ID of the application instance to reconfigure.

  • app_data (dict) – Dictionary containing application update data. The structure is the same as in install().

  • comment (str) – Optional comment describing the configuration change.

===

class apolo_sdk.App

Read-only dataclass for describing application instance.

id

The application ID, str.

name

The application name, str.

display_name

The application display name, str.

template_name

The template name used for the application, str.

template_version

The template version used for the application, str.

project_name

Project the application belongs to, str.

org_name

Organization the application belongs to, str.

cluster_name

Cluster the application belongs to, str.

namespace

Kubernetes namespace where the application is deployed, str.

state

Current state of the application, str.

creator

Username of the user who created the application, str.

created_at

Timestamp when the application was created, datetime.

updated_at

Timestamp when the application was last updated, datetime.

endpoints

List of endpoint URLs for the application, list of str.

===

class apolo_sdk.AppTemplate

Read-only dataclass for describing an application template.

name

The template name, str.

title

The template title, str.

version

Template version, str.

short_description

Short description of the template, str.

description

Full description of the template, str.

tags

List of template tags, list of str.

input

Input schema definition for the template, dict or None.

===

class apolo_sdk.AppValue

Read-only dataclass for describing an application value.

instance_id

The application instance ID, str.

type

The value type, str.

path

The value path, str.

value

The actual value, can be any type.

===

class apolo_sdk.AppState

Enumeration of possible application states.

QUEUED

Application is queued for deployment.

PROGRESSING

Application deployment is in progress.

HEALTHY

Application is healthy and running.

DEGRADED

Application is running but in a degraded state.

ERRORED

Application has encountered an error.

UNINSTALLING

Application is being uninstalled.

UNINSTALLED

Application has been uninstalled.

get_active_states() list[AppState][source]

Get all active states (all states except UNINSTALLED).

===

class apolo_sdk.AppEvent

Read-only dataclass for describing an application event.

created_at

Timestamp when the event was created, datetime.

state

Application state at the time of the event, str.

reason

Reason for the event, str or None.

message

Event message, str or None.

resources

List of resources associated with the event, list of AppEventResource.

===

class apolo_sdk.AppEventResource

Read-only dataclass for describing a resource in an application event.

kind

Resource kind (e.g., “Deployment”, “Service”), str or None.

name

Resource name, str or None.

uid

Resource UID, str or None.

health_status

Health status of the resource, str or None.

health_message

Health status message, str or None.

===

class apolo_sdk.AppConfigurationRevision

Read-only dataclass for describing a configuration revision.

revision_number

The revision number, int.

creator

Username of the user who created the revision, str.

comment

Comment describing the revision, str or None.

created_at

Timestamp when the revision was created, datetime.

end_at

Timestamp when the revision ended (if applicable), datetime or None.