publish_service_package
Publish a managed-service package version to this organisation's catalogue from its contract document (the twin of ankra services packages publish), so the services one of the organisation's own stack profiles deploys can be set up from the catalogue and connected to applications. Build the document as schema_version 2: name (a DNS label), version (semantic version), publisher_id and profiles.customer from get_service_profile_pin, capability (one of logs, metrics, traces, database, cache, queue, search or object_storage), parameters, secrets and outputs (each an array, may be empty), lifecycle (verify, upgrade, recovery and delete set to stack-profile-verify, stack-profile-upgrade, stack-profile-recovery and stack-profile-delete), and connection: the wire protocol consumers speak (postgres, redis, nats, opensearch, s3, victorialogs or victoriametrics), the engine's Service and port in the instance namespace as endpoints[0] (name primary, with the protocol's URL scheme), the Secret holding its credentials as secret_name and secret_keys, and in fields where each of the protocol's connection fields comes from (kind secret_key with the key, literal with the value, or primary_host / primary_address with no value). Read the profile's manifests or a running instance (get_services, get_secrets) for the Service, port and Secret rather than guessing them. A refused document answers with the path that failed; fix that part and publish again. A published version cannot change: the same name and version with identical content returns it, different content is refused, so a change needs a new version. Publishing makes the package available to set up here; it does not make Ankra operate or qualify it. Requires profiles.write.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| package | Yes | The package contract document as a JSON object (schema_version 2), at most 256 KiB. |