enterprise_ai.applications
Source: sdks/python/src/enterprise_ai/applications/__init__.py. Back to the Python SDK reference index.
This page is generated by tools/docs/gen_sdk_reference.py from the SDK sources and the OpenAPI text folders. Do not edit it by hand: change the source and regenerate.
Class ApplicationsClient
/v1/applications.
Resource
ApplicationsClient.activate
activate(app_id: str, deployment_id: str) -> Any
Activate an approved deployment. Activates the deployment once its approval is approved (separation of duties is enforced by the approvals domain; a missing approval is audited as a denial): the previous active deployment of the environment is retired and the application becomes active. 409 application_suspended; 404 application_deployment_not_found. Needs tenant_admin, developer or application_owner. Audited as application.deployment.activate with the approver.
Route: /v1/applications/{app_id}/deployments/{deployment_id}/activate (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
app_id | str | yes | Identifier (UUID) or name of the application. | |
deployment_id | str | yes | Identifier (UUID) of the deployment. |
Returns: Any. Decoded JSON answer of the operation "Activate an approved deployment".
Raises: the typed errors of the transport (Errors).
ApplicationsClient.create
create(name: str, kind: str, origin: str | None = None, owner: str | None = None, project: str | None = None, risk_level: str | None = None, agents: list[str] | None = None, models: list[str] | None = None, tools: list[str] | None = None, mcp_servers: list[str] | None = None, plugins: list[str] | None = None, environments: list[str] | None = None) -> Any
Register an application. Creates the application (201). An external_agent is always of origin third_party. Owner defaults to the caller, project to the X-Project header. A name already used answers 409 conflict. Needs tenant_admin, developer or application_owner. Audited as application.create.
Route: /v1/applications (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
name | str | yes | Name, unique in the tenant: lowercase letters, digits, ., _, -, 1 to 128 characters. | |
kind | str | yes | agent_app, assistant, workflow or external_agent. | |
origin | str | None | None | no | internal (default) or third_party; forced to third_party for an external_agent. |
owner | str | None | None | no | Owner of the application. Default: the caller. |
project | str | None | None | no | Project of the application. Default: the X-Project header of the request. |
risk_level | str | None | None | no | low, medium (default) or high. |
agents | list[str] | None | None | no | Agents granted to the application (names or patterns). |
models | list[str] | None | None | no | Models its external agents may use (identifiers or patterns). |
tools | list[str] | None | None | no | Tools its external agents may invoke (names or patterns such as crm.*). |
mcp_servers | list[str] | None | None | no | MCP servers its external agents may call (names or patterns). |
plugins | list[str] | None | None | no | Plugins granted to the application (names or patterns). |
environments | list[str] | None | None | no | Environments it may be deployed to (1 to 10). Default ["dev"]. |
Returns: Any. Decoded JSON answer of the operation "Register an application".
Raises: the typed errors of the transport (Errors).
ApplicationsClient.create_external_agent
create_external_agent(app_id: str, name: str, scopes: list[str] | None = None) -> Any
Register a third party agent identity. Creates an API key with the role agent, bound to the application and its project, with the scopes tools:invoke, models:invoke plus the requested ones (201). The key is in api_key and is shown only once. Needs tenant_admin. Audited as application.external_agent.register.
Route: /v1/applications/{app_id}/external-agents (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
app_id | str | yes | Identifier (UUID) or name of the application. | |
name | str | yes | Name of the identity: lowercase letters, digits, ., _, -; the key is named app:<application>:<name>. | |
scopes | list[str] | None | None | no | Extra scopes of the key (up to 20), added to tools:invoke and models:invoke. |
Returns: Any. Decoded JSON answer of the operation "Register a third party agent identity".
Raises: the typed errors of the transport (Errors).
ApplicationsClient.deploy
deploy(app_id: str, version: str, environment: str, reason: str | None = None) -> Any
Request a deployment. Records a deployment of a version in one environment of the application and opens an application_deployment approval for tenant_admin or security_officer (201, the deployment carries approval_id). The environment must be declared by the application (400 invalid_request); the same version in the same environment answers 409 conflict; a suspended or retired application answers 409 application_suspended. Needs tenant_admin, developer or application_owner. Audited as application.deployment.create.
Route: /v1/applications/{app_id}/deployments (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
app_id | str | yes | Identifier (UUID) or name of the application. | |
version | str | yes | Version to deploy (1 to 100 characters). | |
environment | str | yes | Target environment, one of the application environments (1 to 50 characters). | |
reason | str | None | None | no | Why the deployment is requested, shown to the approvers (up to 2000 characters). |
Returns: Any. Decoded JSON answer of the operation "Request a deployment".
Raises: the typed errors of the transport (Errors).
ApplicationsClient.developer_kit
developer_kit(application_id: str | None = None, agent_id: str | None = None, project: str | None = None) -> Any
Get the developer kit. Developer kit of an application, an agent or a project: values, states and actions, never a secret. Give exactly one of application_id, agent_id or project (400 invalid_request otherwise). The answer holds the subject (with the models, tools, MCP servers, knowledge bases and evaluation suites it uses), the nine rows, the env entries of an environment file (the API key is only a placeholder marked secret), a summary of ready rows and the next_steps (create a key, run the tests, run the red team). An unknown application or agent, or a project without application, answers 404 not_found. Requires a tenant principal (403 tenant_required) with developer, application_owner or tenant_admin (403 forbidden).
Route: /v1/developer/kit (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
application_id | str | None | None | no | Identifier of the application the kit is built for, 200 characters at most. Exclusive with agent_id and project. |
agent_id | str | None | None | no | Identifier of the agent the kit is built for, 200 characters at most; its resources come from the manifest of its current version. Exclusive with application_id and project. |
project | str | None | None | no | Name of the project, 200 characters at most: the kit merges the resources of every application of the project. Exclusive with application_id and agent_id. |
Returns: Any. Decoded JSON answer of the operation "Get the developer kit".
Raises: the typed errors of the transport (Errors).
ApplicationsClient.get
get(app_id: str) -> Any
Get an application. Returns the application and its deployments, oldest first. 404 application_not_found.
Route: /v1/applications/{app_id} (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
app_id | str | yes | Identifier (UUID) or name of the application. |
Returns: Any. Decoded JSON answer of the operation "Get an application".
Raises: the typed errors of the transport (Errors).
ApplicationsClient.list
list() -> Any
List the applications. Applications of the tenant in name order, with kind, origin, status, environments and granted resources. One page only.
Route: /v1/applications (GET).
This element takes no parameter.
Returns: Any. Decoded JSON answer of the operation "List the applications".
Raises: the typed errors of the transport (Errors).
ApplicationsClient.set_status
set_status(app_id: str, status: str, reason: str) -> Any
Suspend or retire an application. Sets the application to suspended or retired and its active deployments too; every gateway call of its external agents is refused from then on. Needs tenant_admin or security_officer. Audited as application.suspended or application.retired.
Route: /v1/applications/{app_id}/status (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
app_id | str | yes | Identifier (UUID) or name of the application. | |
status | str | yes | suspended or retired. | |
reason | str | yes | Why (1 to 2000 characters); kept on a suspended application. |
Returns: Any. Decoded JSON answer of the operation "Suspend or retire an application".
Raises: the typed errors of the transport (Errors).