Home / Companies / Temporal / Blog / Post Details
Content Deep Dive

REST APIs for every Temporal Workflow in one line of code

Blog post from Temporal

Post Details
Company
Date Published
Author
Valeri Karpov
Word Count
934
Language
English
Hacker News Points
-
Summary

The text discusses using Temporal's long-lived Workflows to build REST APIs without a conventional database, and introduces temporal-rest, a package that simplifies creating RESTful APIs for these Workflows. It demonstrates how to use temporal-rest with ExpressJS to create an API for counterWorkflow, a sample long-lived Workflow. The API supports POST, GET, and PUT requests for starting new instances of the Workflow, executing Queries on existing instances, and sending Signals to them, respectively. It also explains how to pass parameters to these operations using JSON request bodies or query strings.