Publish collection module version
Publish a collection module version with the Workbench CLI or direct API access.
Use rp publish from the Workbench CLI to publish a collection module version. The CLI command wraps the publish endpoint, handles auth from your .root-auth file, and prints the resulting live version. Direct API access is also supported for CI pipelines or scripts that don't run the CLI.
Prerequisites
Before you publish the collection module version:
- Push your local changes with
rp push. Publishing promotes the current draft, so you can't publish changes that have not been pushed. - Confirm your local collection module directory contains the
.root-authand.root-config.jsonfiles created byrp clone -cm. - Confirm your API key has the
publishProductModulespermission.
Publish with the Workbench CLI
Run rp publish from the collection module directory:
rp publishPublishing promotes the current draft to a new live version and bumps the sandbox version automatically.
To publish without an interactive confirmation prompt, pass --force:
rp publish --forceSee the rp publish command reference for the full command details. To understand the sandbox and live version distinction, see Collection module environments.
Optional: Publish with the API
Send a POST request to the publish endpoint:
curl -XPOST -u '{{api_key}}:' '{{host}}/v1/apps/{{org_id}}/insurance/collection-modules/{{cm_key}}/publish?bumpSandbox=true'| Key | Type | Description |
|---|---|---|
| api_key | Auth value | The Root Platform API key used for Basic Auth. See Workbench CLI commands for how the CLI stores this in .root-auth. |
| host | URL | The Root Platform URL |
| org_id | Path value | The Root organisation ID |
| cm_key | Path value | The collection module key. See Collection module settings for local module configuration. |
| bumpSandbox | Query value | When true, Root also bumps the sandbox version after publishing the live version. |
This endpoint uses Basic Auth. Pass the Root Platform API key as the username and an empty password. The request requires the publishProductModules permission.
Verify the publish request
When the request succeeds, the collection module version is published and Root returns the same result used by rp publish. If the request fails, check that the Root Platform API key, Root organisation ID, collection module key, Root Platform URL, and publishProductModules permission are correct.
Updated 18 days ago