API Workflows
This section highlights the most common API flows. All endpoints use the base URL:
https://api.deployrelay.com
Authenticate with a bearer token (Authorization: Bearer <token>). Tokens are issued via the console or the CLI.
Publish a Function
curl -X POST "$API_URL/v1/functions" \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "checkout-handler",
"runtime": "python3.11",
"source": "cHJpbnQoJ0F1dGhvcml6ZWQnKQ==",
"description": "Processes checkout events",
"tags": ["commerce", "payments"]
}'
Response includes the generated RUFID and version.
Trigger an Execution
curl -X POST "$API_URL/v1/functions/{rufid}/executions" \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"order_id": "ord_123", "amount": 4200}'
Use the returned execution ID to poll status or fetch logs.
Marketplace Search
curl "$API_URL/v1/marketplace/functions/search?q=payments" \
-H "Authorization: Bearer $API_TOKEN"
The response contains function listings, pagination metadata, and aggregations. See the marketplace service docs for exact fields.
Telemetry Snapshot
curl "$API_URL/v1/telemetry/functions/{rufid}?window=60m" \
-H "Authorization: Bearer $API_TOKEN"
This returns latency, error rate, and cost metrics. Pair it with Datadog monitors for alerts.
Postman Collection
An official Postman collection and OpenAPI schema are available in the console. Import docs/api/openapi.yaml to explore every endpoint.
Tip
Add the optional X-Relay-Namespace header to scope calls by namespace/tenant.