Skip to main content

How to set up a Codec Server

To use a Codec Server, first run it with your Payload Codec and then configure tctl and the Web UI to use it.

Run the server

A Codec Server is an HTTP server that implements two endpoints:

  • POST /encode
  • POST /decode

Each endpoint receives and responds with a JSON body that has a payloads property with an array of Payloads. The endpoints run the Payloads through a Payload Codec before returning them.

Sample Codec Servers:

Configure tctl

Once the Codec Server is started, for example on http://localhost:8888, provide it to tctl using the --codec_endpoint global option:

tctl --codec_endpoint 'http://localhost:8888' workflow show --wid workflow-id-123

Configure the Web UI

Once the Codec Server is started, there are two ways to provide it to the Web UI:

In the UI

Data Encoder icon

Select the icon with an up-down arrow on the bottom left of the screen. This action displays the codec endpoint dialog.

Enter the URL and port number for your codec endpoint. Exit the dialog, go back to the previous page, and refresh the page.

The button should now be light blue, and your Payloads should be displayed in a readable format.

In the config file

The codec endpoint can be specified in the configuration file:

codec:
endpoint: {{ default .Env.TEMPORAL_CODEC_ENDPOINT "{namespace}"}}