Skip to content

Versions and Publishing

How versions work

Every time you publish your tool, a new version is created. Versions are immutable — once published, the code for that version cannot be changed. To update your tool you create a new version.

Each version has its own:

  • Source code files
  • Runtime and compute type
  • Memory and timeout limits
  • Environment variable configuration
  • Price per execution
  • Visibility (draft / private / public)

Version states

StateWho can see itWho can execute it
DraftYour organization onlyYour organization only
PrivateYour organization onlyYour organization only
PublicEveryone on the marketplaceAnyone with sufficient balance

All executions incur compute cost. For Draft and Private versions, only your organization can run them and no function fee is charged — but compute cost applies.


Publishing a version

Publishing happens in Step 6 (Publish) of the tool editor:

  1. Set the price per execution (set to 0 for a free tool)
  2. Click Publish as Private to keep the version within your organization, or Publish as Public to list it on the marketplace

Publishing to the marketplace

Setting a version to Public makes it appear in the marketplace and discoverable by anyone. Before publishing:

  • Complete all steps (Basic Info, Code, Branding, Overview, Documentation)
  • Make sure your tool has been tested and works correctly
  • Set a price — free tools are valid and common

Creating a new version

To add a new version to an existing tool:

  1. Open your tool from My Tools
  2. Go to Step 2 (Code & Test)
  3. Edit your code
  4. When ready, go to Step 6 and publish with a new version number

Executing a specific version

When calling your tool via the API, the version is part of the URL:

POST https://cortexconnect.rival.io/api/v1/functions/{function_id}/{version}/invoke

For example, to call version 1.0.2:

Terminal window
curl --location 'https://cortexconnect.rival.io/api/v1/functions/<function_id>/1.0.2/invoke' \
--header 'Content-Type: application/json' \
--header 'Authorization: <your_api_key>' \
--data '{
"event": {
"num": [1, 2, 3]
}
}'

Deprecating a version

You can mark older versions as deprecated from the tool editor. Deprecated versions still execute but are flagged for callers who inspect version details.