enterprise_ai.marketplace
Source: sdks/python/src/enterprise_ai/marketplace/__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 MarketplaceClient
/v1/marketplace.
Resource
MarketplaceClient.advance_change
advance_change(change_id: str, evidence: dict[str, Any] | None = None, approval_id: str | None = None) -> Any
Advance a change to the next stage. Moves the change to the next stage. Needs tenant_admin, developer or security_officer. Gates per target stage: 1. test: only the author (or tenant_admin) leaves draft (403 change_not_author). 2. security_review: evidence.tests must pass (passed > 0, no failed, no errors), else 422 change_evidence_missing. 3. business_approval: approval change.security_review by a security_officer. 4. staging: approval change.business_approval by a tenant_admin. 5. production: passing staging_smoke, then approval change.production with a quorum of two. 6. monitoring: passing production_smoke. Without approval_id, a gated stage answers 202 with the approval to obtain; call again with the approved id to get 200. The author never approves. A closed change answers 409 change_closed.
Route: /v1/marketplace/changes/{change_id}/advance (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
change_id | str | yes | Identifier (UUID) of the change request. | |
evidence | dict[str, Any] | None | None | no | Results added to the change evidence, by key: tests, staging_smoke, production_smoke, each {passed, failed, errors}. |
approval_id | str | None | None | no | Approved request for a stage that needs an approval (second call). |
Returns: Any. Decoded JSON answer of the operation "Advance a change to the next stage".
Raises: the typed errors of the transport (Errors).
MarketplaceClient.apply_installation
apply_installation(installation_id: str) -> Any
Apply an approved installation. Executes the pending install or upgrade once its approval is approved: the policy and the preflight are checked again, the objects of the pack are created inside a savepoint, the objects of the former version that are no longer part of it are removed and a smoke test runs. A failed smoke test rolls everything back and answers 422 smoke_failed. Needs tenant_admin. 409 installation_state when nothing is pending. Audited as marketplace.install or marketplace.upgrade.
Route: /v1/marketplace/installations/{installation_id}/apply (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
installation_id | str | yes | Identifier (UUID) of the installation. |
Returns: Any. Decoded JSON answer of the operation "Apply an approved installation".
Raises: the typed errors of the transport (Errors).
MarketplaceClient.authorize_installation
authorize_installation(installation_id: str, permission: str) -> Any
Check a runtime permission. Runtime permission check used by the pack MCP servers and connectors: allowed only when the installation is installed, the permission was granted, is not suspended and is not an external export denied by the data protection settings. Otherwise 403 with permission_not_granted, permission_suspended, installation_suspended or external_export_denied, recorded as an authorize_denied event. Needs tenant_admin, developer, agent or service.
Route: /v1/marketplace/installations/{installation_id}/authorize (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
installation_id | str | yes | Identifier (UUID) of the installation. | |
permission | str | yes | Permission scope, for example crm.contacts:read (2 to 128 characters, lowercase). |
Returns: Any. Decoded JSON answer of the operation "Check a runtime permission".
Raises: the typed errors of the transport (Errors).
MarketplaceClient.create_change
create_change(kind: str, ref: str, version: str, title: str | None = None) -> Any
Open a change request. Opens a change of a prompt, skill, connector, rule, model, policy, tool, agent or pack at stage draft. Needs tenant_admin or developer; the policy change.create is evaluated. Audited as change.create.
Route: /v1/marketplace/changes (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
kind | str | yes | Kind of object: prompt, skill, connector, rule, model, policy, tool, agent or pack. | |
ref | str | yes | Name of the object: lowercase letters, digits, ., _ and -, 1 to 128 characters, starting and ending with a letter or digit. | |
version | str | yes | Version of the object the change brings (1 to 64 characters). | |
title | str | None | None | no | Title of the change (up to 300 characters). |
Returns: Any. Decoded JSON answer of the operation "Open a change request".
Raises: the typed errors of the transport (Errors).
MarketplaceClient.create_publisher
create_publisher(name: str, public_key: str) -> Any
Add a trusted publisher key. Registers a public signing key for the tenant; pack signatures are verified against the active keys. Needs tenant_admin or security_officer. An unreadable key answers 422 publisher_invalid_key. Audited as marketplace.publisher.add.
Route: /v1/marketplace/publishers (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
name | str | yes | Publisher name, same pattern as a package name. | |
public_key | str | yes | Public key, PEM or text form (40 to 4000 characters). |
Returns: Any. Decoded JSON answer of the operation "Add a trusted publisher key".
Raises: the typed errors of the transport (Errors).
MarketplaceClient.get_change
get_change(change_id: str) -> Any
Get a change request. Returns the change with its stage, evidence, pending approval and history (one entry per transition with actor and time). 404 change_not_found.
Route: /v1/marketplace/changes/{change_id} (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
change_id | str | yes | Identifier (UUID) of the change request. |
Returns: Any. Decoded JSON answer of the operation "Get a change request".
Raises: the typed errors of the transport (Errors).
MarketplaceClient.get_installation
get_installation(installation_id: str) -> Any
Get an installation. Returns the installation: status, package and version, granted and suspended permissions, configuration, last preflight and smoke results, created objects and assets. 404 installation_not_found.
Route: /v1/marketplace/installations/{installation_id} (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
installation_id | str | yes | Identifier (UUID) of the installation. |
Returns: Any. Decoded JSON answer of the operation "Get an installation".
Raises: the typed errors of the transport (Errors).
MarketplaceClient.get_package
get_package(name: str) -> Any
Get a package and its versions. Returns the package and every version, oldest first, with gate results and a vulnerability summary. 404 marketplace_package_not_found.
Route: /v1/marketplace/packages/{name} (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
name | str | yes | Name of the package. |
Returns: Any. Decoded JSON answer of the operation "Get a package and its versions".
Raises: the typed errors of the transport (Errors).
MarketplaceClient.get_version
get_version(name: str, version: str) -> Any
Get a package version. Returns one version: manifest, digest, file digests, signature and its status, licence, OCI reference, gate results, provenance status and production approval. The archive and the SBOM are not included. 404 marketplace_version_not_found.
Route: /v1/marketplace/packages/{name}/versions/{version} (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
name | str | yes | Name of the package. | |
version | str | yes | Semantic version, for example 1.2.0. |
Returns: Any. Decoded JSON answer of the operation "Get a package version".
Raises: the typed errors of the transport (Errors).
MarketplaceClient.import_publication
import_publication(publication: dict[str, Any], oci_ref: str | None = None) -> Any
Publish a package version. Publishes a pack archive as a new version (201). Needs tenant_admin or developer; the policy marketplace.publish is evaluated. Steps: 1. The archive is decoded (422 marketplace_archive_invalid) and scanned by ClamAV and YARA-X before unpacking (422 file_blocked, 503 file_scan_unavailable). 2. Every gate runs: schema, signature, SBOM, vulnerability scan, tests, evaluations, licence, permissions, documentation, secrets, provenance, privacy, security, approvals, configuration, resilience. Any failure answers 422 publication_gate_failed with the result of each gate. 3. The package is created on first publication. 409 package_suspended when its kill switch is on, 409 marketplace_version_exists for a version already published. Audited as marketplace.publish.
Route: /v1/marketplace/packages (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
publication | dict[str, Any] | yes | Body made offline by enterprise-ai plugin publish --body-out. | |
oci_ref | str | None | None | no | Reference of the copy in the local registry; the version then points at it with the digest of the publication. |
Returns: Any. Decoded JSON answer of the operation "Publish a package version".
Raises: the typed errors of the transport (Errors).
MarketplaceClient.install
install(package: str, version: str, environment: str, approved_permissions: list[str] | None = None, config: dict[str, Any] | None = None, secret_refs: dict[str, str] | None = None) -> Any
Request the installation of a pack. Opens an installation request and answers 202 with the installation, the approval_id, the quorum and the preflight report. Needs tenant_admin. Steps: 1. The preflight runs (see POST /v1/marketplace/preflight); a failure answers 403 permission_unsafe, 422 config_invalid, 422 permission_not_requested, 409 package_suspended or 422 preflight_failed. 2. An approval marketplace.install is opened for tenant_admin or security_officer: quorum 1 by default, at least 2 when a sensitive permission is granted or the environment is prod. 3. Once approved, call POST .../installations/{id}/apply. 409 installation_exists when the package is already installed or suspended in this environment.
Route: /v1/marketplace/installations (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
package | str | yes | Name of the package. | |
version | str | yes | Version to install (5 to 64 characters). | |
environment | str | yes | Target environment: dev, test, staging or prod. | |
approved_permissions | list[str] | None | None | no | Permission scopes granted to the pack, among the ones it requests (up to 200). Wildcards and administration scopes are refused. |
config | dict[str, Any] | None | None | no | Configuration of the pack, validated against its configSchema; model_id must name an approved model. |
secret_refs | dict[str, str] | None | None | no | Secret reference per connector name, openbao://... or env://...; required for a connector with authentication. |
Returns: Any. Decoded JSON answer of the operation "Request the installation of a pack".
Raises: the typed errors of the transport (Errors).
MarketplaceClient.installation_events
installation_events(installation_id: str) -> Any
List the events of an installation. Lifecycle history of the installation, oldest first: requests, installs, upgrades, rollbacks, failed smoke tests, suspensions, resumptions, refused authorizations, with versions, outcome and actor. One page only.
Route: /v1/marketplace/installations/{installation_id}/events (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
installation_id | str | yes | Identifier (UUID) of the installation. |
Returns: Any. Decoded JSON answer of the operation "List the events of an installation".
Raises: the typed errors of the transport (Errors).
MarketplaceClient.list_changes
list_changes(kind: str | None = None, ref: str | None = None, stage: str | None = None) -> Any
List the change requests. Change requests of the tenant, newest first, at most 200, optionally filtered by kind, reference and stage. Any tenant principal may call it.
Route: /v1/marketplace/changes (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
kind | str | None | None | no | Only this kind: prompt, skill, connector, rule, model, policy, tool, agent or pack. |
ref | str | None | None | no | Only the changes of this object name. |
stage | str | None | None | no | Only the changes at this stage: draft, test, security_review, business_approval, staging, production, monitoring or rejected. |
Returns: Any. Decoded JSON answer of the operation "List the change requests".
Raises: the typed errors of the transport (Errors).
MarketplaceClient.list_installations
list_installations(environment: str | None = None) -> Any
List the installations. Installations of the tenant, oldest first, each with package, version and created assets. One page only.
Route: /v1/marketplace/installations (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
environment | str | None | None | no | Only the installations of this environment: dev, test, staging or prod. |
Returns: Any. Decoded JSON answer of the operation "List the installations".
Raises: the typed errors of the transport (Errors).
MarketplaceClient.list_packages
list_packages(domain: str | None = None) -> Any
List the packages. Packages of the catalogue in name order, with status, latest version, publisher and category. One page only.
Route: /v1/marketplace/packages (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
domain | str | None | None | no | Only the packages of this business domain. |
Returns: Any. Decoded JSON answer of the operation "List the packages".
Raises: the typed errors of the transport (Errors).
MarketplaceClient.list_publishers
list_publishers() -> Any
List the publishers. Trusted signing keys, by name: algorithm, status (active or revoked) and scope (platform for a key shared by every tenant, tenant for a key of this tenant). Public keys are not returned.
Route: /v1/marketplace/publishers (GET).
This element takes no parameter.
Returns: Any. Decoded JSON answer of the operation "List the publishers".
Raises: the typed errors of the transport (Errors).
MarketplaceClient.preflight
preflight(package: str, version: str, environment: str, approved_permissions: list[str] | None = None, config: dict[str, Any] | None = None, secret_refs: dict[str, str] | None = None) -> Any
Dry run the installation checks. Dry run of the installation checks, nothing is installed: package active, environment, configuration against the pack configSchema, version available (and in production for prod), platform compatibility, dependencies installed, archive digest, signature, permissions requested and safe, secret references of the connectors, approved model, no name conflict. Returns passed, every check, the granted, not granted and sensitive permissions, the approvals required and the data protection applied. Needs tenant_admin or security_officer. Audited as marketplace.preflight.
Route: /v1/marketplace/preflight (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
package | str | yes | Name of the package. | |
version | str | yes | Version to install (5 to 64 characters). | |
environment | str | yes | Target environment: dev, test, staging or prod. | |
approved_permissions | list[str] | None | None | no | Permission scopes granted to the pack, among the ones it requests (up to 200). Wildcards and administration scopes are refused. |
config | dict[str, Any] | None | None | no | Configuration of the pack, validated against its configSchema; model_id must name an approved model. |
secret_refs | dict[str, str] | None | None | no | Secret reference per connector name, openbao://... or env://...; required for a connector with authentication. |
Returns: Any. Decoded JSON answer of the operation "Dry run the installation checks".
Raises: the typed errors of the transport (Errors).
MarketplaceClient.promote_to_production
promote_to_production(name: str, version: str, approval_id: str | None = None) -> Any
Promote a version to production. Production gate, required to install a version in prod. Needs tenant_admin or security_officer. Steps: 1. Without approval_id: every stored gate must have passed, the signature must still verify and an OCI artifact digest must be attached (else 422 publication_gate_failed); then a marketplace.promote approval is opened with a quorum of at least two and the answer is 202 with the checks. 2. With the approved approval_id: the version becomes production (200). A version already in production answers 200 at once; 409 package_suspended while the kill switch is on.
Route: /v1/marketplace/packages/{name}/versions/{version}/production (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
name | str | yes | Name of the package. | |
version | str | yes | Semantic version, for example 1.2.0. | |
approval_id | str | None | None | no | Approved marketplace.promote request. Omit it on the first call. |
Returns: Any. Decoded JSON answer of the operation "Promote a version to production".
Raises: the typed errors of the transport (Errors).
MarketplaceClient.publish_package
publish_package(archive: str, signature: str | None = None, sbom: object | null = None, oci: dict[str, Any] | None = None, skill_signatures: dict[str, Any] | None = None, test_report: object | null = None, evaluation_report: object | null = None, vulnerability_scan: object | null = None, provenance: dict[str, Any] | None = None) -> Any
Publish a package version. Publishes a pack archive as a new version (201). Needs tenant_admin or developer; the policy marketplace.publish is evaluated. Steps: 1. The archive is decoded (422 marketplace_archive_invalid) and scanned by ClamAV and YARA-X before unpacking (422 file_blocked, 503 file_scan_unavailable). 2. Every gate runs: schema, signature, SBOM, vulnerability scan, tests, evaluations, licence, permissions, documentation, secrets, provenance, privacy, security, approvals, configuration, resilience. Any failure answers 422 publication_gate_failed with the result of each gate. 3. The package is created on first publication. 409 package_suspended when its kill switch is on, 409 marketplace_version_exists for a version already published. Audited as marketplace.publish.
Route: /v1/marketplace/packages (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
archive | str | yes | The .tar.gz pack, base64 encoded (up to 12 MiB of text). | |
signature | str | None | None | no | Signature of the archive digest by a trusted publisher. |
sbom | object | null | None | no | Software bill of materials of the pack. |
oci | dict[str, Any] | None | None | no | OCI artifact of the pack; its digest is required later by the production gate. |
skill_signatures | dict[str, Any] | None | None | no | Signatures of the skills of the pack, by skill name. |
test_report | object | null | None | no | Test report bound to the archive digest. |
evaluation_report | object | null | None | no | Evaluation report bound to the archive digest. |
vulnerability_scan | object | null | None | no | Vulnerability scan report bound to the archive digest. |
provenance | dict[str, Any] | None | None | no | Signed in-toto Statement v1 with a SLSA v1 predicate: {statement, signature: {value, signer}}. |
Returns: Any. Decoded JSON answer of the operation "Publish a package version".
Raises: the typed errors of the transport (Errors).
MarketplaceClient.reject_change
reject_change(change_id: str, reason: str) -> Any
Reject a change request. Closes the change at stage rejected from any open stage, with the reason kept in history. Needs tenant_admin or security_officer. 409 change_closed if already closed. Audited as change.reject.
Route: /v1/marketplace/changes/{change_id}/reject (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
change_id | str | yes | Identifier (UUID) of the change request. | |
reason | str | yes | Why the change is rejected (3 to 1000 characters). |
Returns: Any. Decoded JSON answer of the operation "Reject a change request".
Raises: the typed errors of the transport (Errors).
MarketplaceClient.revoke_publisher
revoke_publisher(name: str) -> Any
Revoke a publisher. Revokes every key of the tenant registered under this name; signatures made with them no longer verify. Needs tenant_admin or security_officer. 404 publisher_not_found. Platform keys cannot be revoked here. Audited as marketplace.publisher.revoke.
Route: /v1/marketplace/publishers/{name}/revoke (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
name | str | yes | Name of the publisher. |
Returns: Any. Decoded JSON answer of the operation "Revoke a publisher".
Raises: the typed errors of the transport (Errors).
MarketplaceClient.rollback_installation
rollback_installation(installation_id: str) -> Any
Roll back to the previous version. Reinstalls the previous version with its previous grant, inside a savepoint with a smoke test (422 smoke_failed keeps the current version). Needs tenant_admin. 409 installation_state unless installed; 409 rollback_unavailable when there is no previous version. Audited as marketplace.rollback.
Route: /v1/marketplace/installations/{installation_id}/rollback (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
installation_id | str | yes | Identifier (UUID) of the installation. |
Returns: Any. Decoded JSON answer of the operation "Roll back to the previous version".
Raises: the typed errors of the transport (Errors).
MarketplaceClient.sbom
sbom(name: str, version: str) -> Any
Get the SBOM of a version. Returns the software bill of materials stored at publication, its digest and the vulnerability scan report.
Route: /v1/marketplace/packages/{name}/versions/{version}/sbom (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
name | str | yes | Name of the package. | |
version | str | yes | Semantic version, for example 1.2.0. |
Returns: Any. Decoded JSON answer of the operation "Get the SBOM of a version".
Raises: the typed errors of the transport (Errors).
MarketplaceClient.set_installation_status
set_installation_status(installation_id: str, status: str, reason: str | None = None, permissions: list[str] | None = None, approval_id: str | None = None) -> Any
Suspend or resume an installation. Needs tenant_admin or security_officer. - status: suspended: immediate. Without permissions, the whole installation is suspended (tools blocked, agents suspended, MCP servers disabled, assets suspended); with permissions, only those granted capabilities (422 permission_not_granted for others). Answers 200. - status: installed: resume. Without approval_id, opens a marketplace.resume approval with a quorum of two and answers 202; with the approved id, lifts the suspension and answers 200. Refused with 409 package_suspended while the package kill switch is on. 409 installation_state for a state that does not allow the change.
Route: /v1/marketplace/installations/{installation_id}/status (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
installation_id | str | yes | Identifier (UUID) of the installation. | |
status | str | yes | suspended (immediate) or installed (resumption, with approval). | |
reason | str | None | None | no | Why the status changes (up to 1000 characters). |
permissions | list[str] | None | None | no | Suspend only these granted capabilities (up to 200; empty: the whole installation). |
approval_id | str | None | None | no | Approved marketplace.resume request, to resume. |
Returns: Any. Decoded JSON answer of the operation "Suspend or resume an installation".
Raises: the typed errors of the transport (Errors).
MarketplaceClient.set_package_status
set_package_status(name: str, status: str, reason: str | None = None, approval_id: str | None = None) -> Any
Set the kill switch of a package. Needs tenant_admin or security_officer. - status: suspended: immediate. Every installed installation of the package is suspended; installs, upgrades, publications and promotions are refused. Answers 200 with suspended_installations. - status: active: lifts the kill switch. Without approval_id, opens a marketplace.package.resume approval with a quorum of two (202); with the approved id, the package and the installations it suspended resume (200 with resumed_installations). 409 installation_state when lifting a package that is not suspended.
Route: /v1/marketplace/packages/{name}/status (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
name | str | yes | Name of the package. | |
status | str | yes | suspended (immediate) or active (lifting, with approval). | |
reason | str | None | None | no | Why the status changes (up to 1000 characters). |
approval_id | str | None | None | no | Approved marketplace.package.resume request, to lift the kill switch. |
Returns: Any. Decoded JSON answer of the operation "Set the kill switch of a package".
Raises: the typed errors of the transport (Errors).
MarketplaceClient.supervision
supervision(installation_id: str) -> Any
Supervise an installed pack. Activity, quality, costs and incidents of an installed pack, aggregated from the objects it created: tool invocations and runs per state, refused authorizations, evaluation results, last smoke result, run success rate, run costs per currency, and the incidents naming its objects (50 most recent).
Route: /v1/marketplace/installations/{installation_id}/supervision (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
installation_id | str | yes | Identifier (UUID) of the installation. |
Returns: Any. Decoded JSON answer of the operation "Supervise an installed pack".
Raises: the typed errors of the transport (Errors).
MarketplaceClient.uninstall
uninstall(installation_id: str) -> Any
Uninstall a pack. Removes every object and asset the installation created and sets it to uninstalled (grants, suspensions and previous version cleared). Allowed from installed, failed, pending_approval or suspended (else 409 installation_state). Needs tenant_admin; the policy marketplace.uninstall is evaluated. The answer lists removed. Audited as marketplace.uninstall.
Route: /v1/marketplace/installations/{installation_id}/uninstall (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
installation_id | str | yes | Identifier (UUID) of the installation. |
Returns: Any. Decoded JSON answer of the operation "Uninstall a pack".
Raises: the typed errors of the transport (Errors).
MarketplaceClient.upgrade_installation
upgrade_installation(installation_id: str, version: str, approved_permissions: list[str] | None = None, config: dict[str, Any] | None = None, secret_refs: dict[str, str] | None = None) -> Any
Request the upgrade of an installation. Opens an upgrade request to a higher version (202 with approval, quorum and preflight), then apply it with POST .../apply once approved. The installation must be installed and the version strictly higher (else 409 installation_state). Configuration and secret references default to the current ones. Needs tenant_admin. Preflight failures answer as for an installation request.
Route: /v1/marketplace/installations/{installation_id}/upgrade (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
installation_id | str | yes | Identifier (UUID) of the installation. | |
version | str | yes | Target version, higher than the installed one (5 to 64 characters). | |
approved_permissions | list[str] | None | None | no | Permission scopes granted to the new version, among the ones it requests (up to 200). |
config | dict[str, Any] | None | None | no | Configuration of the pack, validated against its configSchema. Empty: the current one. |
secret_refs | dict[str, str] | None | None | no | Secret reference per connector name, openbao://... or env://.... Empty: the current ones. |
Returns: Any. Decoded JSON answer of the operation "Request the upgrade of an installation".
Raises: the typed errors of the transport (Errors).