UpgradeAssistantClient

Client for the Kibana Upgrade Assistant API.

The Upgrade Assistant helps you prepare a cluster for a major version upgrade by reporting deprecation issues that must be resolved first.

Note

The Upgrade Assistant API is in technical preview in Kibana 9.4; it may change or be removed in a future release. It is not space-scoped.

class kibana._sync.client.upgrade_assistant.UpgradeAssistantClient(client, default_space_id=None, validate_spaces=True)[source]

Bases: NamespaceClient

Client for the Kibana Upgrade Assistant API.

The Upgrade Assistant helps you prepare a cluster for a major version upgrade by reporting deprecation issues that must be resolved first.

Note

The Upgrade Assistant API is in Technical Preview in Kibana 9.4; it may change or be removed in a future release. It is not space-scoped.

Example

>>> from kibana import Kibana
>>> client = Kibana("http://localhost:5601", api_key="...")
>>> status = client.upgrade_assistant.status()
>>> status.body["readyForUpgrade"]
True

Checking Upgrade Readiness

from kibana import Kibana

client = Kibana("http://localhost:5601", api_key="your_api_key")

status = client.upgrade_assistant.status()

if status.body["readyForUpgrade"]:
    print("Cluster is ready for the next major upgrade")
else:
    print(status.body["details"])
status()[source]

Get the upgrade readiness status.

Check the status of your cluster: whether it is ready for an upgrade and, if not, which deprecation issues remain to be resolved.

Note

Technical Preview in Kibana 9.4.

Returns:

  • readyForUpgrade (bool): Whether the cluster is ready to be upgraded.

  • details (str): Human-readable summary of the readiness state (when ready or when issues remain).

  • recentEsDeprecationLogs (dict): Recent Elasticsearch deprecation log entries (count and logs).

  • kibanaApiDeprecations (list): Deprecated Kibana API usage detected on this cluster.

Return type:

ObjectApiResponse whose body includes

Raises:

Example

>>> response = client.upgrade_assistant.status()
>>> if response.body["readyForUpgrade"]:
...     print("Cluster is ready for upgrade")
... else:
...     print(response.body.get("details", "Issues remain"))
Cluster is ready for upgrade
__init__(client, default_space_id=None, validate_spaces=True)

Initialize NamespaceClient with optional space support.

Parameters:
  • client (BaseClient) – Parent BaseClient instance to delegate requests to

  • default_space_id (str | None) – Optional default space ID for all operations

  • validate_spaces (bool) – Whether to validate space existence (default: True)

perform_request(method, path, *, params=None, headers=None, body=None)

Perform an HTTP request via the parent client with space context enhancement.

Parameters:
  • method (str) – HTTP method (GET, POST, PUT, DELETE, etc.)

  • path (str) – API endpoint path

  • params (dict[str, Any] | None) – Query parameters

  • headers (dict[str, str] | None) – Request headers

  • body (dict[str, Any] | None) – Request body

Returns:

API response

Raises:

ApiError – If the API returns an error response (enhanced with space context)

Return type:

ObjectApiResponse[Any]

AsyncUpgradeAssistantClient

Asynchronous version of the UpgradeAssistantClient for use with async/await syntax.

class kibana._async.client.upgrade_assistant.AsyncUpgradeAssistantClient(client, default_space_id=None, validate_spaces=True)[source]

Bases: AsyncNamespaceClient

Async client for the Kibana Upgrade Assistant API.

The Upgrade Assistant helps you prepare a cluster for a major version upgrade by reporting deprecation issues that must be resolved first.

Note

The Upgrade Assistant API is in Technical Preview in Kibana 9.4; it may change or be removed in a future release. It is not space-scoped.

Example

>>> from kibana import AsyncKibana
>>> client = AsyncKibana("http://localhost:5601", api_key="...")
>>> status = await client.upgrade_assistant.status()
>>> status.body["readyForUpgrade"]
True

Usage

The AsyncUpgradeAssistantClient provides the same methods as UpgradeAssistantClient but all methods are async and must be awaited:

from kibana import AsyncKibana
import asyncio

async def main():
    async with AsyncKibana("http://localhost:5601") as client:
        status = await client.upgrade_assistant.status()
        print(status.body["readyForUpgrade"])

asyncio.run(main())
async status()[source]

Get the upgrade readiness status.

Check the status of your cluster: whether it is ready for an upgrade and, if not, which deprecation issues remain to be resolved.

Note

Technical Preview in Kibana 9.4.

Returns:

  • readyForUpgrade (bool): Whether the cluster is ready to be upgraded.

  • details (str): Human-readable summary of the readiness state (when ready or when issues remain).

  • recentEsDeprecationLogs (dict): Recent Elasticsearch deprecation log entries (count and logs).

  • kibanaApiDeprecations (list): Deprecated Kibana API usage detected on this cluster.

Return type:

ObjectApiResponse whose body includes

Raises:

Example

>>> response = await client.upgrade_assistant.status()
>>> if response.body["readyForUpgrade"]:
...     print("Cluster is ready for upgrade")
... else:
...     print(response.body.get("details", "Issues remain"))
Cluster is ready for upgrade
__init__(client, default_space_id=None, validate_spaces=True)

Initialize AsyncNamespaceClient with optional space support.

Parameters:
  • client (AsyncBaseClient) – Parent AsyncBaseClient instance to delegate requests to

  • default_space_id (str | None) – Optional default space ID for all operations

  • validate_spaces (bool) – Whether to validate space existence (default: True)

async perform_request(method, path, *, params=None, headers=None, body=None)

Perform an async HTTP request via the parent client with space context enhancement.

Parameters:
  • method (str) – HTTP method (GET, POST, PUT, DELETE, etc.)

  • path (str) – API endpoint path

  • params (dict[str, Any] | None) – Query parameters

  • headers (dict[str, str] | None) – Request headers

  • body (dict[str, Any] | None) – Request body

Returns:

API response

Raises:

ApiError – If the API returns an error response (enhanced with space context)

Return type:

ObjectApiResponse[Any]