Skip to main content

Marketplace

The Marketplace publishes and deploys reusable apps and agents. Use this resource to browse and review items and to deploy them into your environment.

Access it as client.marketplace on a Strongly client, or the same path on AsyncStrongly with await. All methods exist on both with identical signatures.

Methods​

Lifecycle & actions​

deploy​

deploy(*, app_name: str, marketplace_item_id: str, terms_accepted: bool, resources: Mapping[str, Any] | None = None, deployment_id: str | None = None, config: Mapping[str, Any] | None = None) -> DeploymentStarted

Deploy a marketplace offering.

The request is checked (terms, sizes, governance) and a refused one raises with its reason; otherwise the deployment starts and runs in the background: follow it with deployment_status. The app runs at resources when given, otherwise at the size the offering declares (resources.defaults in item_deploy_config); each new add-on at the cpu, memory and disk of its config["addons"][i]["createNew"], otherwise at the offering's addons[].defaults.

Parameters

  • app_name (str): The offering's app_name (see retrieve_item).
  • marketplace_item_id (str): The marketplace item's id.
  • terms_accepted (bool): True accepts the marketplace terms (required to deploy).
  • resources (Mapping[str, Any] | None, optional): The app's size and capacity: {"cpu": "1", "memory": "2GB", "disk": "10GB", "instances": 1, "useSpot": True, "spotFallback": True}` (`cpu` a string; `useSpot runs the app on spot capacity, spotFallback True, the default, falls back to on-demand when spot is unavailable).
  • deployment_id (str | None, optional): An id you choose for the deployment (17 letters and digits). The same id from you for the same item returns the same deployment, so a retried request deploys once. The API's default is a new id.
  • config (Mapping[str, Any] | None, optional): The deploy form's other choices, with their wire names: addons, permissions, environmentVariables, aiModels, createProject and so on.

Returns

  • DeploymentStarted: The deployment's id.

Raises

  • UnprocessableEntityError: The terms were not accepted.
  • ValidationError: A choice is invalid, or a size cannot run.
  • PermissionDeniedError: The offering is not enabled for users, or a governance policy blocks it.
  • NotFoundError: There is no such item.

Other​

available_addons​

available_addons() -> AvailableAddons

Return the running add-ons (and data sources) a deployment can use.

Returns

  • AvailableAddons: Your add-ons, and those shared with you.

available_models​

available_models() -> AvailableModels

Return the AI models a deployment can use.

Returns

  • AvailableModels: The active models you may use.

cancel_deployment​

cancel_deployment(deployment_id: str) -> MarketplaceDeployment

Cancel a deployment in progress; what it created is removed.

The deployment moves to cancelling, then cancelled; follow it with deployment_status.

Parameters

  • deployment_id (str): The deployment's id.

Returns

  • MarketplaceDeployment: The deployment, cancelling, as retrieve_deployment shows it.

Raises

  • NotFoundError: There is no such deployment.

create_item​

create_item(*, name: str, description: str, vendor: str, type: str, vertical: str, app_name: str | None = None, tags: Sequence[str] | None = None, featured: bool | None = None, **extra) -> str

Add an item to the marketplace catalog (platform admins).

Parameters

  • name (str): The item's name.
  • description (str): What it is.
  • vendor (str): Who publishes it.
  • type (str): Its type, such as "app" or "agent".
  • vertical (str): Its vertical, such as "technology".
  • app_name (str | None, optional): The offering's name for deploys.
  • tags (Sequence[str] | None, optional): Its tags.
  • featured (bool | None, optional): Whether it is featured.
  • **extra (Any): Any other catalog field (images, pricing, features, ...), stored as given; snake_case names are sent in camelCase.

Returns

  • str: The new item's id.

Raises

  • PermissionDeniedError: You are not a platform admin.
  • ValidationError: A required field is missing.

delete_deployment​

delete_deployment(deployment_id: str) -> None

Remove the record of a finished deployment; what it created is kept.

Parameters

  • deployment_id (str): The deployment's id; one that is complete, failed or cancelled.

Raises

  • NotFoundError: There is no such deployment.
  • ConflictError: The deployment is still running; cancel it first.

delete_item​

delete_item(item_id: str) -> None

Remove an item from the marketplace catalog (platform admins).

Parameters

  • item_id (str): The item's id.

Raises

  • PermissionDeniedError: You are not a platform admin.

deployment_status​

deployment_status(deployment_id: str) -> DeploymentStatus

Return a marketplace deployment's status and progress.

Parameters

  • deployment_id (str): The deployment's id.

Returns

  • DeploymentStatus: The status and progress.

Raises

  • NotFoundError: There is no such deployment, or you cannot see it.

item_deploy_config​

item_deploy_config(item_id: str) -> dict[str, Any]

Return an offering's deploy configuration: what a deployment asks for.

Parameters

  • item_id (str): The item's id.

Returns

  • dict[str, Any]: The offering's own deploy description (free-form): its steps, resources (defaults and options), addons, permissions and so on.

Raises

  • NotFoundError: There is no such item, or it has no deploy configuration.

item_license​

item_license(item_id: str) -> MarketplaceLicense

Return an offering's license text.

Parameters

  • item_id (str): The item's id.

Returns

  • MarketplaceLicense: The license, or found=False when the offering has none.

list_deployments​

list_deployments() -> dict[str, DeployedItem]

Return the apps you deployed from the marketplace, by marketplace item id.

Returns

  • dict[str, DeployedItem]: Each deployed item's app, keyed by the marketplace item's id.

list_items​

list_items(*, search: str | None = None, vertical: str | None = None, type: str | None = None, featured: bool | None = None, sort: str | None = None, limit: int | None = None) -> SyncPaginator[MarketplaceItem]

List the marketplace's offerings.

Parameters

  • search (str | None, optional): Only items whose name, description or tags contain this text (case insensitive).
  • vertical (str | None, optional): Only items in this vertical, such as "technology".
  • type (str | None, optional): Only items of this type: "app", "agent", "plugin", "project", "streaming_workflow" or "batch_workflow".
  • featured (bool | None, optional): True lists only featured items (False filters nothing).
  • sort (str | None, optional): The order, as comma-separated wire field names, each prefixed with - for descending (for example "name"). The API's default is "-createdAt".
  • limit (int | None, optional): The most items to return; None returns every one.

Returns

  • SyncPaginator[MarketplaceItem]: The items, fetched a page at a time.

list_reviews​

list_reviews(item_id: str) -> MarketplaceReviews

Return a marketplace item's reviews.

Parameters

  • item_id (str): The item's id.

Returns

  • MarketplaceReviews: The reviews, the average rating and the review count.

Raises

  • NotFoundError: There is no such item.

list_verticals​

list_verticals() -> list[MarketplaceVertical]

List the marketplace's verticals, most items first.

Returns

  • list[MarketplaceVertical]: Each vertical with its item count and average rating.

post_review​

post_review(item_id: str, *, rating: float, title: str, comment: str) -> MarketplaceReview

Review a marketplace item (once per user).

Parameters

  • item_id (str): The item's id.
  • rating (float): The rating, 1 to 5.
  • title (str): The review's title.
  • comment (str): The review.

Returns

  • MarketplaceReview: Your review, as list_reviews shows it.

Raises

  • ValidationError: A field is missing, or the rating is outside 1 to 5.
  • ConflictError: You already reviewed the item (error_code duplicate).
  • NotFoundError: There is no such item.

record_offering_usage​

record_offering_usage(*, offering_id: str, meter_key: str, quantity: float, idempotency_key: str, occurred_at: str | None = None) -> OfferingUsageRecorded

Record usage of a metered offering your organization subscribes to.

Recording is exactly-once per idempotency_key.

Parameters

  • offering_id (str): The offering's app_name.
  • meter_key (str): A meter of your organization's subscription to the offering (such as "resumes").
  • quantity (float): A positive quantity (for a counter the amount used, for a gauge the current value).
  • idempotency_key (str): A key you choose, unique per event.
  • occurred_at (str | None, optional): When it happened, ISO 8601. The API's default is when it is received.

Returns

  • OfferingUsageRecorded: The event's id, or deduplicated=True when the key was already recorded.

Raises

  • UnprocessableEntityError: No live subscription to the offering, an unknown meter, a quantity that is not positive, or an invalid occurred_at.
  • PermissionDeniedError: You have no organization.

retrieve_deployment​

retrieve_deployment(deployment_id: str) -> MarketplaceDeployment

Retrieve a marketplace deployment: its progress, result and what it created.

Parameters

  • deployment_id (str): The deployment's id.

Returns

  • MarketplaceDeployment: The deployment.

Raises

  • NotFoundError: There is no such deployment, or you cannot see it.

retrieve_item​

retrieve_item(item_id: str) -> MarketplaceItem

Retrieve a marketplace item with all its detail.

Parameters

  • item_id (str): The item's id.

Returns

  • MarketplaceItem: The item.

Raises

  • NotFoundError: There is no such item.

update_item​

update_item(item_id: str, *, name: str | None = None, description: str | None = None, vendor: str | None = None, type: str | None = None, vertical: str | None = None, app_name: str | None = None, tags: Sequence[str] | None = None, featured: bool | None = None, **extra) -> None

Change a marketplace catalog item (platform admins).

Only the fields you give change.

Parameters

  • item_id (str): The item's id.
  • name (str | None, optional): Its name.
  • description (str | None, optional): Its description.
  • vendor (str | None, optional): Its publisher.
  • type (str | None, optional): Its type.
  • vertical (str | None, optional): Its vertical.
  • app_name (str | None, optional): The offering's name for deploys.
  • tags (Sequence[str] | None, optional): Its tags, replacing the current ones.
  • featured (bool | None, optional): Whether it is featured.
  • **extra (Any): Any other catalog field, stored as given; snake_case names are sent in camelCase.

Raises

  • PermissionDeniedError: You are not a platform admin.