BackendHTTP APIFunctions

Dry run a function

Requires an API key with the environment:functions:dryrun scope. Learn more about API key scopes.

Starts an asynchronous dry run for TypeScript function source code against a connection without deploying it.

POST
/functions/dryruns

Starts an asynchronous dry run for TypeScript function source code against a connection without deploying it.

Authorization

bearerAuth
headerAuthorizationBearer <token>

An Environment API key from your Tenklo environment, or an Account API key for account-level endpoints.

Request Body

application/json
  1. body
integration_id*string

The integration ID (unique_key) that you created in Tenklo.

function_type*RunnableFunctionType
Value in"action""sync"
code*string

The TypeScript source code for the function.

Length1 <= length
connection_id*string

The connection ID to use for the dry run.

input?unknown

Optional JSON input payload passed to the function.

metadata?

Optional metadata available to the function during the dry run.

checkpoint?

Optional checkpoint payload available to sync functions during the dry run.

last_sync_date?string

Optional last sync date available to sync functions during the dry run.

Formatdate-time

Response Body

Successfully started the dry run.

application/json
  1. response
id*string
Formatuuid
status*string
Value in"waiting""running"
created_at*string
Formatdate-time
Example Request
curl -X POST 'https://api.tenklo.dev/functions/dryruns' \  -H 'Content-Type: application/json' \  -d '{  "integration_id": "string",  "function_type": "action",  "code": "string",  "connection_id": "string"}'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "status": "waiting",  "created_at": "2019-08-24T14:15:22Z"}