The Trigger.dev connector lets your AI agent act in each user's Trigger.dev account. Each user connects their own Trigger.dev access token once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 59 tools.
- Tools
- 59
- What they doRead · write · destructive
- 28 · 28 · 328 read28 write3 destructive
- Users sign in with
- Access token
Setup
Install the SDK
Terminal window npm install @scalekit-sdk/node dotenvTerminal window pip install scalekit-sdk-python python-dotenvSet your credentials
Add your Scalekit credentials to your
.envfile. Find values in app.scalekit.com > Developers > API Credentials..env SCALEKIT_ENVIRONMENT_URL=<your-environment-url>SCALEKIT_CLIENT_ID=<your-client-id>SCALEKIT_CLIENT_SECRET=<your-client-secret>Create the Trigger.dev connection
In AgentKit > Connections, create a Trigger.dev connection. The name you give it is the
connection_nameyour code passes. See Configure connections.Authorize a user and make your first call
quickstart.mts import { ScalekitClient } from '@scalekit-sdk/node'import 'dotenv/config'import { createInterface } from 'node:readline/promises'const scalekit = new ScalekitClient(process.env.SCALEKIT_ENVIRONMENT_URL,process.env.SCALEKIT_CLIENT_ID,process.env.SCALEKIT_CLIENT_SECRET,)const actions = scalekit.actionsconst connector = 'triggerdev'const identifier = 'user_123'// Generate an authorization link for the userconst { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })console.log('Authorize Trigger.dev:', link)const rl = createInterface({ input: process.stdin, output: process.stdout })await rl.question('Press Enter after authorizing...')rl.close()// Make your first callconst result = await actions.executeTool({connector,identifier,toolName: 'triggerdev_get_latest_deployment',toolInput: {},})console.log(result)Terminal window npx tsx quickstart.mtsquickstart.py import osfrom scalekit import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),client_id=os.getenv("SCALEKIT_CLIENT_ID"),client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),)actions = scalekit_client.actionsconnection_name = "triggerdev"identifier = "user_123"# Generate an authorization link for the userlink_response = actions.get_authorization_link(connection_name=connection_name,identifier=identifier,)print("Authorize Trigger.dev:", link_response.link)input("Press Enter after authorizing...")# Make your first callresult = actions.execute_tool(tool_input={},tool_name="triggerdev_get_latest_deployment",connection_name=connection_name,identifier=identifier,)print(result)Terminal window python quickstart.pyEach user opens the link once and enters their Trigger.dev credentials there. See Authorize a user for the full flow and statuses.
Tools
Pass the exact name toexecute_tooltriggerdev_execute_queryRun a TRQL (Trigger.dev Query Language) query, a SQL-style language, against run data to analyze runs and calculate metrics.Read-onlyExecute TRQL Query
Run a TRQL (Trigger.dev Query Language) query, a SQL-style language, against run data to analyze runs and calculate metrics. Returns the result rows as JSON, or a CSV string when format is csv. Use get_query_schema first to see the tables and columns you can query.
Inputs
querystringrequired- The TRQL query to run.
formatstring- Response format: json (default) or csv.one of
jsoncsv fromstring- Start of the time range as an ISO 8601 timestamp. Use together with to.
periodstring- Relative time range such as 7d, 30d or 1h. Do not combine with from and to.
scopestring- Scope of data to query: environment (default), project or organization.one of
environmentprojectorganization tostring- End of the time range as an ISO 8601 timestamp. Use together with from.
triggerdev_get_batchRetrieve a batch by id with its status and the ids of all runs in it.Read-onlyGet Batch
Retrieve a batch by id with its status and the ids of all runs in it. Returns status, run counts, run ids and any errors. Use get_batch_results for the outputs of the finished runs.
Inputs
batch_idstringrequired- ID of the batch, starting with batch_.
triggerdev_get_batch_resultsRetrieve the execution results of the finished runs in a batch.Read-onlyGet Batch Results
Retrieve the execution results of the finished runs in a batch. Runs still executing are left out. Returns the batch id and an items array of run results. Use get_batch to see overall batch progress.
Inputs
batch_idstringrequired- ID of the batch, starting with batch_.
triggerdev_get_bulk_actionRetrieve the status and aggregate processing counts of a bulk action.Read-onlyGet Bulk Action
Retrieve the status and aggregate processing counts of a bulk action. Returns status, type and success and failure counts. Use list_bulk_actions to find ids.
Inputs
bulk_action_idstringrequired- ID of the bulk action, starting with bulk_.
triggerdev_get_concurrency_limitRetrieve a concurrency limit by name with its bounds and live running and queued counts.Read-onlyGet Concurrency Limit
Retrieve a concurrency limit by name with its bounds and live running and queued counts. With concurrency_key it returns the view for that key: its per-key bound, any override and the runs executing for the key. Use list_concurrency_limits to find names.
Inputs
namestringrequired- Name of the concurrency limit.
concurrency_keystring- Return the view for this concurrency key instead of the whole limit.
triggerdev_get_deploymentRetrieve one deployment by id.Read-onlyGet Deployment
Retrieve one deployment by id. Returns its version, status, timestamps and the tasks it registered. Use list_deployments to find deployment ids.
Inputs
deployment_idstringrequired- ID of the deployment.
triggerdev_get_env_varRetrieve one environment variable of a project environment by name.Read-onlyGet Environment Variable
Retrieve one environment variable of a project environment by name. Returns the variable value. Use list_env_vars to see all variables.
Inputs
envstringrequired- Environment slug: dev, staging, prod or preview.
namestringrequired- Name of the environment variable.
project_refstringrequired- Project reference, starting with proj_ (shown in the dashboard project settings). Required for environment variable endpoints.
triggerdev_get_errorRetrieve one error group with its lifecycle state and the worker versions it affected.Read-onlyGet Error
Retrieve one error group with its lifecycle state and the worker versions it affected. Returns the error details and occurrence data. Use list_errors to find error ids.
Inputs
error_idstringrequired- ID of the error group, starting with error_.
triggerdev_get_latest_deploymentRetrieve the latest unmanaged deployment of the project.Read-onlyGet Latest Deployment
Retrieve the latest unmanaged deployment of the project. Returns its version, status and timestamps. Use list_deployments to browse older deployments.
Inputs
This tool takes no inputs.
triggerdev_get_query_schemaRetrieve the schema available to TRQL queries: tables, columns, data types, descriptions and allowed values.Read-onlyGet Query Schema
Retrieve the schema available to TRQL queries: tables, columns, data types, descriptions and allowed values. Returns the full schema. Use it before execute_query to write a valid query.
Inputs
This tool takes no inputs.
triggerdev_get_queueRetrieve one queue by id, task identifier or custom name.Read-onlyGet Queue
Retrieve one queue by id, task identifier or custom name. Returns the queue with its concurrency limit, paused state and running and queued counts. Use list_queues to browse all queues.
Inputs
queue_idstringrequired- Queue ID, task identifier, or custom queue name, depending on queue_type.
queue_typestring- How queue_id is interpreted: id (default), task, or custom.one of
idtaskcustom
triggerdev_get_runRetrieve one run by id, including its status, payload, output, error, attempts, tags, metadata and timestamps.Read-onlyGet Run
Retrieve one run by id, including its status, payload, output, error, attempts, tags, metadata and timestamps. Returns the full run object. Payload and output are omitted when the key is a public access token. Use list_runs to find run ids. Use get_run_result for only the final result of a finished run.
Inputs
run_idstringrequired- ID of the run, starting with run_.
triggerdev_get_run_eventsRetrieve all OpenTelemetry span events recorded for a run.Read-onlyGet Run Events
Retrieve all OpenTelemetry span events recorded for a run. Returns the list of events for debugging and observability. Use get_run_trace for the span tree instead of a flat event list.
Inputs
run_idstringrequired- ID of the run, starting with run_.
triggerdev_get_run_resultRetrieve the execution result of a finished run: success flag, output, error and usage.Read-onlyGet Run Result
Retrieve the execution result of a finished run: success flag, output, error and usage. Returns ok, id, output, outputType, error, usage and taskIdentifier. Responds 404 while the run is still in progress. Use get_run for status and attempts of a run that may still be executing.
Inputs
run_idstringrequired- ID of the run, starting with run_.
triggerdev_get_run_traceRetrieve the OpenTelemetry trace of a run: its root span, ancestor chain and descendant spans.Read-onlyGet Run Trace
Retrieve the OpenTelemetry trace of a run: its root span, ancestor chain and descendant spans. Returns the trace subtree scoped to this run, optionally paged as flat spans. Use get_run_events for the flat event log.
Inputs
run_idstringrequired- ID of the run, starting with run_.
page_afterstring- Cursor from the previous response (pagination.next) to fetch the next page of spans.
page_sizeinteger- Number of spans per page (maximum 100).
triggerdev_get_scheduleRetrieve one schedule by id.Read-onlyGet Schedule
Retrieve one schedule by id. Returns task, cron expression, timezone, type, active flag, next run time and environments. Use list_schedules to find schedule ids.
Inputs
schedule_idstringrequired- ID of the schedule, starting with sched_.
triggerdev_get_waitpoint_tokenRetrieve a waitpoint token by id with its current status and output if it has been completed.Read-onlyGet Waitpoint Token
Retrieve a waitpoint token by id with its current status and output if it has been completed. Returns id, status, completion time, timeout and output. Use list_waitpoint_tokens to find token ids.
Inputs
waitpoint_idstringrequired- ID of the waitpoint token, starting with waitpoint_.
triggerdev_list_bulk_actionsList bulk actions in the environment, newest first.Read-onlyList Bulk Actions
List bulk actions in the environment, newest first. Returns a page of bulk actions and pagination cursors. Use get_bulk_action for the processing counts of one action.
Inputs
page_afterstring- Cursor from the previous response (pagination.next) to fetch the next page of bulk actions.
page_beforestring- Cursor from the previous response (pagination.previous) to fetch the previous page of bulk actions.
page_sizeinteger- Number of bulk actions per page (maximum 100).
triggerdev_list_concurrency_limitsList the concurrency limits declared in the environment with their bounds and live running and queued counts.Read-onlyList Concurrency Limits
List the concurrency limits declared in the environment with their bounds and live running and queued counts. Returns a page of limits and pagination info. Use get_concurrency_limit for one limit.
Inputs
pageinteger- Page number, starting at 1.
per_pageinteger- Number of limits per page.
triggerdev_list_deploymentsList deployments of the environment, most recent first, optionally filtered by status or time window.Read-onlyList Deployments
List deployments of the environment, most recent first, optionally filtered by status or time window. Returns a page of deployments (id, version, status, timestamps) and pagination cursors. Use get_deployment for one deployment and get_latest_deployment for the newest unmanaged one.
Inputs
fromstring- Start of the time window as an ISO 8601 date-time.
page_afterstring- Cursor from the previous response (pagination.next) to fetch the next page of deployments.
page_sizeinteger- Number of deployments per page (maximum 100).
periodstring- Relative window such as 1d or 7d.
statusstring- Only deployments with this status.one of
PENDINGBUILDINGDEPLOYINGDEPLOYEDFAILEDCANCELEDTIMED_OUT tostring- End of the time window as an ISO 8601 date-time.
triggerdev_list_env_varsList the environment variables of a project environment.Read-onlyList Environment Variables
List the environment variables of a project environment. Returns each variable name and value. Use get_env_var for one variable. Needs a project_ref, so a personal access token is the usual credential.
Inputs
envstringrequired- Environment slug: dev, staging, prod or preview.
project_refstringrequired- Project reference, starting with proj_ (shown in the dashboard project settings). Required for environment variable endpoints.
triggerdev_list_errorsList error groups in the environment.Read-onlyList Errors
List error groups in the environment. Failed runs are grouped by a fingerprint of error type, message and stack trace. Returns a page of error groups (id, message, status, occurrence counts) and pagination cursors. Use get_error for one group and list_runs with error_id for the runs behind it.
Inputs
fromstring- Start of the occurrence time range as an ISO 8601 date-time.
page_afterstring- Cursor from the previous response (pagination.next) to fetch the next page of errors.
page_beforestring- Cursor from the previous response (pagination.previous) to fetch the previous page of errors.
page_sizeinteger- Number of errors per page (maximum 100).
periodstring- Relative time range to count occurrences in, such as 1d or 7d.
searchstring- Free-text search across error type and message.
statusstring- Comma-separated error lifecycle statuses to include, for example UNRESOLVED,RESOLVED,IGNORED.
task_identifierstring- Comma-separated task identifiers to include.
tostring- End of the occurrence time range as an ISO 8601 date-time.
versionstring- Comma-separated worker versions to include.
triggerdev_list_query_dashboardsList the built-in dashboards with their widgets and pre-built TRQL queries for metrics such as run success rate, cost and LLM usage.Read-onlyList Query Dashboards
List the built-in dashboards with their widgets and pre-built TRQL queries for metrics such as run success rate, cost and LLM usage. Returns each dashboard with its widgets. Use the widget queries as a starting point for execute_query.
Inputs
This tool takes no inputs.
triggerdev_list_queuesList the queues in the environment with their concurrency settings and running and queued counts.Read-onlyList Queues
List the queues in the environment with their concurrency settings and running and queued counts. Returns a page of queues and pagination info. Use get_queue for one queue.
Inputs
pageinteger- Page number, starting at 1.
per_pageinteger- Number of queues per page.
triggerdev_list_runsList runs in the environment of the secret key, newest first, filtered by status, task, tag, version, schedule or time window.Read-onlyList Runs
List runs in the environment of the secret key, newest first, filtered by status, task, tag, version, schedule or time window. Returns a page of runs (id, status, task identifier, timestamps, tags) and pagination cursors. Use get_run for the full payload and output of one run. Without a created-at filter only runs from the last 7 days are returned. This is for browsing and reporting, not for polling a run: use get_run for that.
Inputs
bulk_action_idstring- Only runs processed by this bulk action ID.
created_fromstring- Start of the created-at window as an ISO 8601 date-time.
created_periodstring- Relative created-at window such as 1h, 1d or 7d. Do not combine with created_from or created_to.
created_tostring- End of the created-at window as an ISO 8601 date-time.
error_idstring- Only runs behind this error group ID (starts with error_).
is_testboolean- Set true to list only test runs, false to list only non-test runs.
page_afterstring- Cursor from the previous response (pagination.next) to fetch the next page of runs.
page_beforestring- Cursor from the previous response (pagination.previous) to fetch the previous page of runs.
page_sizeinteger- Number of runs per page (maximum 100).
schedule_idstring- Only runs created by this schedule ID.
statusstring- Comma-separated run statuses to include. Values: PENDING_VERSION, QUEUED, EXECUTING, REATTEMPTING, FROZEN, COMPLETED, CANCELED, FAILED, CRASHED, INTERRUPTED, SYSTEM_FAILURE.
tagstring- Comma-separated run tags to include.
task_identifierstring- Comma-separated task identifiers to include.
versionstring- Comma-separated worker versions to include.
triggerdev_list_schedulesList the schedules in the environment, both declarative and imperative.Read-onlyList Schedules
List the schedules in the environment, both declarative and imperative. Returns a page of schedules (id, task, cron, timezone, active flag, next run) and pagination info. Use get_schedule for one schedule.
Inputs
pageinteger- Page number, starting at 1.
per_pageinteger- Number of schedules per page.
triggerdev_list_timezonesList every IANA timezone that schedules support.Read-onlyList Timezones
List every IANA timezone that schedules support. Returns an array of timezone names. Use it to pick a valid value for the timezone of create_schedule or update_schedule.
Inputs
This tool takes no inputs.
triggerdev_list_waitpoint_tokensList waitpoint tokens in the environment, newest first.Read-onlyList Waitpoint Tokens
List waitpoint tokens in the environment, newest first. Returns a page of tokens (id, status, tags, timestamps) and pagination cursors. Use get_waitpoint_token for one token and its output.
Inputs
created_fromstring- Start of the created-at window as an ISO 8601 date-time.
created_periodstring- Relative created-at window such as 1h or 1d.
created_tostring- End of the created-at window as an ISO 8601 date-time.
idempotency_keystring- Only tokens created with this idempotency key.
page_afterstring- Cursor from the previous response (pagination.next) to fetch the next page of tokens.
page_beforestring- Cursor from the previous response (pagination.previous) to fetch the previous page of tokens.
page_sizeinteger- Number of tokens per page (maximum 100).
statusstring- Only tokens with this status, for example WAITING or COMPLETED.
tagsstring- Only tokens with this tag.
triggerdev_abort_bulk_actionAbort a pending bulk action so it stops processing more runs.WriteAbort Bulk Action
Abort a pending bulk action so it stops processing more runs. Runs already processed are not undone. Returns the updated bulk action. Use get_bulk_action to see how far it got.
- Idempotent
Inputs
bulk_action_idstringrequired- ID of the bulk action, starting with bulk_.
triggerdev_activate_scheduleActivate an imperative schedule so it triggers runs again.WriteActivate Schedule
Activate an imperative schedule so it triggers runs again. Returns the updated schedule. Only works on imperative schedules. Use deactivate_schedule to pause it.
- Idempotent
Inputs
schedule_idstringrequired- ID of the schedule, starting with sched_.
triggerdev_batch_trigger_taskStart many runs of the same task in one request, one run per payload item.WriteBatch Trigger a Single Task
Start many runs of the same task in one request, one run per payload item. Returns the batch id, run count, and the id of each run created. Use batch_trigger_tasks to mix different tasks in one batch. Use get_batch to check progress. The task must already be deployed to the environment that the secret key belongs to.
Inputs
itemsarrayrequired- List of items (up to 1,000). Each item is an object with an optional payload and optional options, for example [{"payload": {"userId": "user_1"}}, {"payload": {"userId": "user_2"}}].
task_idstringrequired- Identifier of the task to run for every item.
triggerdev_batch_trigger_tasksStart runs of one or more tasks in a single request, one run per item in the list.WriteBatch Trigger Tasks
Start runs of one or more tasks in a single request, one run per item in the list. Returns the batch id, run count, and the id of each run created. Use trigger_task for a single run. Use get_batch to check progress and get_batch_results for outputs. Each item names its own task, so one batch can mix different tasks.
Inputs
itemsarrayrequired- List of runs to start (up to 1,000). Each item is an object with a task identifier, an optional payload, and optional options. Example: [{"task": "send-welcome-email", "payload": {"userId": "user_1"}}, {"task": "send-welcome-email", "payload": {"userId": "user_2"}, "options": {"tags": ["batch"]}}].
triggerdev_complete_waitpoint_tokenComplete a waitpoint token to unblock the run waiting on it, optionally passing data back to the run.WriteComplete Waitpoint Token
Complete a waitpoint token to unblock the run waiting on it, optionally passing data back to the run. Returns a success flag. Completing an already completed token is a no-op. Use create_waitpoint_token to make a token first.
- Idempotent
Inputs
waitpoint_idstringrequired- ID of the waitpoint token, starting with waitpoint_.
dataobject- JSON data returned to the waiting run as the wait result.
triggerdev_create_bulk_actionStart an asynchronous bulk action that cancels or replays many runs, chosen by run ids or by a filter.WriteCreate Bulk Action
Start an asynchronous bulk action that cancels or replays many runs, chosen by run ids or by a filter. Returns the bulk action id (HTTP 202). Provide either run_ids or at least one filter field, not both. Use get_bulk_action to follow progress and abort_bulk_action to stop it.
Inputs
actionstringrequired- What to do with the selected runs.one of
cancelreplay filter_fromstring- Filter: start of the time range as an ISO 8601 date-time.
filter_periodstring- Filter: relative time range such as 24h or 30d.
filter_statusstring- Filter: comma-separated run statuses. Values: PENDING_VERSION, QUEUED, EXECUTING, REATTEMPTING, FROZEN, COMPLETED, CANCELED, FAILED, CRASHED, INTERRUPTED, SYSTEM_FAILURE.
filter_tagstring- Filter: comma-separated run tags.
filter_task_identifierstring- Filter: comma-separated task identifiers.
filter_tostring- Filter: end of the time range as an ISO 8601 date-time.
namestring- Optional name for the bulk action (up to 255 characters).
run_idsarray- Run ids to act on (1 to 500). Use this or the filter fields.
target_regionstring- Replay only: region to replay the runs in. Defaults to each run original region.
triggerdev_create_env_varCreate an environment variable in a project environment.WriteCreate Environment Variable
Create an environment variable in a project environment. Returns a success flag. Use update_env_var to change an existing variable and import_env_vars to add many at once.
Inputs
envstringrequired- Environment slug: dev, staging, prod or preview.
namestringrequired- Name of the new variable.
project_refstringrequired- Project reference, starting with proj_ (shown in the dashboard project settings). Required for environment variable endpoints.
valuestringrequired- Value of the new variable.
triggerdev_create_scheduleCreate an imperative schedule that triggers a task on a cron expression.WriteCreate Schedule
Create an imperative schedule that triggers a task on a cron expression. Returns the new schedule. The task must be defined with schedules.task() in code. Use update_schedule to change an existing schedule.
Inputs
cronstringrequired- Cron expression for when the task runs.
deduplication_keystringrequired- Unique key for this schedule. Creating again with the same key updates the existing schedule instead of adding another.
taskstringrequired- Identifier of the scheduled task to run.
external_idstring- Your own id to attach to the schedule, such as a user id.
timezonestring- IANA timezone for the cron expression. Defaults to UTC.
triggerdev_create_waitpoint_tokenCreate a waitpoint token that a run can pause on until it is completed.WriteCreate Waitpoint Token
Create a waitpoint token that a run can pause on until it is completed. Returns the token id, a callback url and whether it was reused through an idempotency key. Use complete_waitpoint_token to release the waiting run.
Inputs
idempotency_keystring- Reuses the same token when the same key is sent again before it expires.
idempotency_key_ttlstring- How long the idempotency key stays valid, as a duration such as 1h.
tagsarray- Tags to attach to the token (maximum 10, each under 128 characters).
timeoutstring- How long to wait before the token times out, as a duration such as 10m or 1d.
triggerdev_deactivate_scheduleDeactivate an imperative schedule so it stops triggering runs, without deleting it.WriteDeactivate Schedule
Deactivate an imperative schedule so it stops triggering runs, without deleting it. Returns the updated schedule. Only works on imperative schedules. Use activate_schedule to resume it.
- Idempotent
Inputs
schedule_idstringrequired- ID of the schedule, starting with sched_.
triggerdev_ignore_errorMark an error group as ignored, for a fixed time and or until thresholds are exceeded.WriteIgnore Error
Mark an error group as ignored, for a fixed time and or until thresholds are exceeded. With no options it is ignored indefinitely. Returns the updated error group. Use unresolve_error to reopen it.
- Idempotent
Inputs
error_idstringrequired- ID of the error group, starting with error_.
durationinteger- How long to ignore the error for, in milliseconds.
occurrence_ratenumber- Re-surface the error if it exceeds this many occurrences per minute.
reasonstring- Optional reason for ignoring the error.
total_occurrencesinteger- Re-surface the error after this many new occurrences.
triggerdev_import_env_varsUpload several environment variables to a project environment in one request.WriteImport Environment Variables
Upload several environment variables to a project environment in one request. Returns a success flag. Use create_env_var for a single variable. Set override to replace variables that already exist.
- Idempotent
Inputs
envstringrequired- Environment slug: dev, staging, prod or preview.
project_refstringrequired- Project reference, starting with proj_ (shown in the dashboard project settings). Required for environment variable endpoints.
variablesarrayrequired- Variables to upload. Each item is an object with name and value, for example [{"name": "SLACK_API_KEY", "value": "slack_123456"}].
overrideboolean- Set true to overwrite variables that already exist. Defaults to false.default
false
triggerdev_override_concurrency_limitOverride the bounds of a concurrency limit.WriteOverride Concurrency Limit
Override the bounds of a concurrency limit. Two modes: set total and or per_key for the limit itself, or set concurrency_key with per_key to cap one key temporarily. Returns the updated limit. Use reset_concurrency_limit to restore the values declared in code. In per-key mode do not send total.
- Idempotent
Inputs
namestringrequired- Name of the concurrency limit.
concurrency_keystring- Override the per-key cap for this one key only.
per_keyinteger- Cap on each concurrency key pool (0 to 100000). Required together with concurrency_key.
totalinteger- Cap on every run holding this limit (0 to 100000). Not allowed together with concurrency_key.
ttlstring- Per-key mode only: how long the override lasts, such as 7d. Default 7 days, maximum 30 days.
triggerdev_override_queue_concurrencyTemporarily override the concurrency limit of a queue to scale it up or down.WriteOverride Queue Concurrency
Temporarily override the concurrency limit of a queue to scale it up or down. Returns the updated queue. Use reset_queue_concurrency to return to the limit defined in code.
- Idempotent
Inputs
concurrency_limitintegerrequired- New concurrency limit. It cannot exceed the environment maximum.
queue_idstringrequired- Queue ID, task identifier, or custom queue name, depending on queue_type.
queue_typestring- How queue_id is interpreted: id (queue ID, default), task (a task identifier), or custom (a custom queue name).one of
idtaskcustom
triggerdev_pause_concurrency_limitPause a concurrency limit so runs holding it do not start, or resume it.WritePause or Resume Concurrency Limit
Pause a concurrency limit so runs holding it do not start, or resume it. Running runs finish and the configured bounds are kept. Returns the updated limit. Prefer this over override_concurrency_limit with total 0 to stop runs.
- Idempotent
Inputs
actionstringrequired- Whether to pause or resume the limit.one of
pauseresume namestringrequired- Name of the concurrency limit.
triggerdev_pause_queuePause a queue so no new runs start, or resume a paused queue.WritePause or Resume Queue
Pause a queue so no new runs start, or resume a paused queue. Runs already executing finish normally. Returns the updated queue. Use override_queue_concurrency to throttle a queue without stopping it.
- Idempotent
Inputs
actionstringrequired- Whether to pause or resume the queue.one of
pauseresume queue_idstringrequired- Queue ID, task identifier, or custom queue name, depending on queue_type.
queue_typestring- How queue_id is interpreted: id (queue ID, default), task (a task identifier), or custom (a custom queue name).one of
idtaskcustom
triggerdev_promote_deploymentPromote a previously deployed version to be the current version of the environment, so new runs use it.WritePromote Deployment
Promote a previously deployed version to be the current version of the environment, so new runs use it. Returns the promoted deployment id and version. Use list_deployments to find the version to promote.
- Idempotent
Inputs
versionstringrequired- Worker version to promote.
triggerdev_replay_runCreate a new run from an existing run, reusing its payload and options unless you override them.WriteReplay Run
Create a new run from an existing run, reusing its payload and options unless you override them. Returns the id of the new run. Use trigger_task to start a run from scratch. Use create_bulk_action to replay many runs at once.
Inputs
run_idstringrequired- ID of the run, starting with run_.
concurrency_keystring- Concurrency key for the new run.
delaystring- Delay the new run, as a duration (1h30m) or an ISO 8601 date-time.
idempotency_keystring- Idempotency key for the new run. A repeated request with the same key returns the same run.
machinestring- Machine preset for the new run.one of
microsmall-1xsmall-2xmedium-1xmedium-2xlarge-1xlarge-2x max_attemptsinteger- Maximum number of attempts for the new run.
metadataobject- Metadata for the new run. Omit it to reuse the original metadata.
payloadobject- Payload for the new run. Omit it to reuse the original run payload.
queuestring- Name of an existing queue to run the new run on.
regionstring- Region to run in. Defaults to the original run region.
tagsarray- Tags for the new run. These replace the original run tags (maximum 10).
versionstring- Lock the new run to this deployed version. Defaults to the current version.
triggerdev_reschedule_runChange the start time of a delayed run.WriteReschedule Run
Change the start time of a delayed run. Only valid while the run is in the DELAYED state. Returns the updated run. Use get_run first to confirm the run is delayed.
Inputs
delaystringrequired- New delay as a duration (1d, 6h, 10m, 11s) or an ISO 8601 date-time to run at.
run_idstringrequired- ID of the run, starting with run_.
triggerdev_reset_concurrency_limitReset a concurrency limit back to the values declared in code, clearing any override.WriteReset Concurrency Limit
Reset a concurrency limit back to the values declared in code, clearing any override. With concurrency_key it clears only that key override. Returns the updated limit. Use override_concurrency_limit to set a temporary override.
- Idempotent
Inputs
namestringrequired- Name of the concurrency limit.
concurrency_keystring- Clear the per-key override for this key only.
triggerdev_reset_queue_concurrencyReset the concurrency limit of a queue back to the base value defined in code.WriteReset Queue Concurrency
Reset the concurrency limit of a queue back to the base value defined in code. Returns the updated queue. Use override_queue_concurrency to set a temporary limit.
- Idempotent
Inputs
queue_idstringrequired- Queue ID, task identifier, or custom queue name, depending on queue_type.
queue_typestring- How queue_id is interpreted: id (queue ID, default), task (a task identifier), or custom (a custom queue name).one of
idtaskcustom
triggerdev_resolve_errorMark an error group as resolved, optionally recording the worker version that fixed it.WriteResolve Error
Mark an error group as resolved, optionally recording the worker version that fixed it. Returns the updated error group. Use unresolve_error to reopen it.
- Idempotent
Inputs
error_idstringrequired- ID of the error group, starting with error_.
resolved_in_versionstring- Worker version the error was resolved in.
triggerdev_trigger_taskTrigger a run of a deployed task by its task identifier, with an optional JSON payload and run options.WriteTrigger Task
Trigger a run of a deployed task by its task identifier, with an optional JSON payload and run options. Returns the new run id. Use batch_trigger_tasks to start many runs at once. Use get_run to follow the run afterwards. The task must already be deployed to the environment that the secret key belongs to.
Inputs
task_idstringrequired- Identifier of the task to run (the id set in your task() definition).
concurrency_keystring- Scopes the queue concurrency limit to this key, for example a user id.
delaystring- Delay before the run starts, as a duration (1h, 30m, 2w) or an ISO 8601 date-time.
idempotency_keystring- Prevents duplicate runs: a repeated request with the same key returns the existing run id.
machinestring- Machine preset for this run. Overrides the task default.one of
microsmall-1xsmall-2xmedium-1xmedium-2xlarge-1xlarge-2x payloadobject- JSON payload passed to the task. Omit it for tasks that take no payload.
queue_concurrency_limitinteger- Maximum number of concurrent executions on this queue (0 to 1000). Omit to use the environment limit.
queue_namestring- Name of an existing shared queue to run the task on.
tagsarray- Tags to attach to the run (maximum 10, each under 128 characters). Prefix with a namespace such as user_ or org: to make filtering easier.
ttlstring- Time-to-live: the run is dropped if it has not started within this time. Use a duration such as 1h, 10m or 1h42m, or a number of seconds as text.
triggerdev_unresolve_errorMove a resolved or ignored error group back to unresolved.WriteUnresolve Error
Move a resolved or ignored error group back to unresolved. Returns the updated error group. Use resolve_error or ignore_error to close it again.
- Idempotent
Inputs
error_idstringrequired- ID of the error group, starting with error_.
triggerdev_update_env_varSet a new value for an existing environment variable.WriteUpdate Environment Variable
Set a new value for an existing environment variable. Returns a success flag. Use create_env_var to add a variable that does not exist yet.
- Idempotent
Inputs
envstringrequired- Environment slug: dev, staging, prod or preview.
namestringrequired- Name of the environment variable.
project_refstringrequired- Project reference, starting with proj_ (shown in the dashboard project settings). Required for environment variable endpoints.
valuestringrequired- New value. An empty string is valid and is stored as is.
triggerdev_update_run_metadataReplace the metadata object of a run with new JSON metadata.WriteUpdate Run Metadata
Replace the metadata object of a run with new JSON metadata. Returns the updated metadata. Use add_run_tags to label a run instead.
- Idempotent
Inputs
metadataobjectrequired- New metadata for the run as a JSON object. It replaces the existing metadata.
run_idstringrequired- ID of the run, starting with run_.
triggerdev_update_scheduleUpdate the task, cron expression, timezone or external id of an imperative schedule.WriteUpdate Schedule
Update the task, cron expression, timezone or external id of an imperative schedule. Returns the updated schedule. Only works on schedules created in the dashboard or with the imperative API, not on declarative schedules defined in code.
- Idempotent
Inputs
cronstringrequired- Cron expression for when the task runs.
schedule_idstringrequired- ID of the schedule, starting with sched_.
taskstringrequired- Identifier of the scheduled task to run.
external_idstring- Your own id to attach to the schedule.
timezonestring- IANA timezone for the cron expression. Defaults to UTC.
triggerdev_cancel_runCancel a run that is still queued or executing.DestructiveCancel Run
Cancel a run that is still queued or executing. Has no effect on a run that already finished. Returns the id of the canceled run. Use cancel_run for one run. Use create_bulk_action to cancel many runs at once.
- Idempotent
Inputs
run_idstringrequired- ID of the run, starting with run_.
triggerdev_delete_env_varPermanently delete an environment variable from a project environment.DestructiveDelete Environment Variable
Permanently delete an environment variable from a project environment. Returns a success flag. Running tasks lose access to the variable on their next start.
- Idempotent
Inputs
envstringrequired- Environment slug: dev, staging, prod or preview.
namestringrequired- Name of the environment variable.
project_refstringrequired- Project reference, starting with proj_ (shown in the dashboard project settings). Required for environment variable endpoints.
triggerdev_delete_schedulePermanently delete an imperative schedule.DestructiveDelete Schedule
Permanently delete an imperative schedule. Returns a confirmation. Only works on imperative schedules. Use deactivate_schedule to pause a schedule without deleting it.
- Idempotent
Inputs
schedule_idstringrequired- ID of the schedule, starting with sched_.
No tools match.