ba71f959e2
* Improved the existing runs API
* WIP next runs API
* Improve the returned ApiPromise to add ability to return response
* More WIP
* WI{
* Added offset/limit pagination stuff like the cursor one, and converted all API methods to use ApiPromise
* More run API stuff
- Adding schedule output from the retrieveRun endpoint
- Ability to filter by schedule and isTest
* Remove env from retrieve run in openAPI
* prefer duplication over merge
* WIP docs
* Use spread to DRY up some run API schemas
* Finish the overview docs
* Adding changeset
* Fixed typecheck errors
* Typo fix
* Re-export zodfetch from core so the v3 CLI can use it
* Fixed type errors
---------
Co-authored-by: Matt Aitken <matt@mattaitken.com>
1674 lines
51 KiB
YAML
1674 lines
51 KiB
YAML
---
|
|
openapi: 3.1.0
|
|
info:
|
|
title: Trigger.dev v3 REST API
|
|
description: "The REST API lets you trigger and manage runs on Trigger.dev. You
|
|
can trigger a run, get the status of a run, and get the results of a run. "
|
|
version: 2024-04
|
|
license:
|
|
name: Apache 2.0
|
|
url: https://www.apache.org/licenses/LICENSE-2.0.html
|
|
servers:
|
|
- url: https://api.trigger.dev
|
|
description: Trigger.dev API
|
|
paths:
|
|
"/api/v1/schedules":
|
|
post:
|
|
operationId: create_schedule_v1
|
|
summary: Create a schedule
|
|
description: Create a new schedule based on the specified options.
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
"$ref": "#/components/schemas/CreateScheduleOptions"
|
|
responses:
|
|
"200":
|
|
description: Schedule created successfully
|
|
content:
|
|
application/json:
|
|
schema:
|
|
"$ref": "#/components/schemas/ScheduleObject"
|
|
"400":
|
|
description: Invalid request parameters
|
|
"401":
|
|
description: Unauthorized
|
|
"422":
|
|
description: Unprocessable Entity
|
|
tags:
|
|
- schedules
|
|
security:
|
|
- secretKey: []
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
source: |-
|
|
import { schedules } from "@trigger.dev/sdk/v3";
|
|
|
|
const schedule = await schedules.create({
|
|
task: 'my-task',
|
|
cron: '0 0 * * *'
|
|
});
|
|
|
|
get:
|
|
operationId: list_schedules_v1
|
|
summary: List all schedules
|
|
description: List all schedules. You can also paginate the results.
|
|
parameters:
|
|
- in: query
|
|
name: page
|
|
schema:
|
|
type: integer
|
|
required: false
|
|
description: Page number of the schedule listing
|
|
- in: query
|
|
name: perPage
|
|
schema:
|
|
type: integer
|
|
required: false
|
|
description: Number of schedules per page
|
|
responses:
|
|
"200":
|
|
description: Successful request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
"$ref": "#/components/schemas/ListSchedulesResult"
|
|
"401":
|
|
description: Unauthorized request
|
|
tags:
|
|
- schedules
|
|
security:
|
|
- secretKey: []
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
source: |-
|
|
import { schedules } from "@trigger.dev/sdk/v3";
|
|
|
|
const allSchedules = await schedules.list();
|
|
|
|
"/api/v1/schedules/{schedule_id}":
|
|
get:
|
|
operationId: get_schedule_v1
|
|
summary: Retrieve Schedule
|
|
description: Get a schedule by its ID.
|
|
parameters:
|
|
- in: path
|
|
name: schedule_id
|
|
required: true
|
|
schema:
|
|
type: string
|
|
description: The ID of the schedule.
|
|
example: sched_1234
|
|
responses:
|
|
"200":
|
|
description: Successful request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
"$ref": "#/components/schemas/ScheduleObject"
|
|
"401":
|
|
description: Unauthorized request
|
|
"404":
|
|
description: Resource not found
|
|
tags:
|
|
- schedules
|
|
security:
|
|
- secretKey: []
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
source: |-
|
|
import { schedules } from "@trigger.dev/sdk/v3";
|
|
|
|
const schedule = await schedules.retrieve(scheduleId);
|
|
|
|
put:
|
|
operationId: update_schedule_v1
|
|
summary: Update Schedule
|
|
description: Update a schedule by its ID.
|
|
parameters:
|
|
- in: path
|
|
name: schedule_id
|
|
required: true
|
|
schema:
|
|
type: string
|
|
description: The ID of the schedule.
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
"$ref": "#/components/schemas/CreateScheduleOptions"
|
|
responses:
|
|
"200":
|
|
description: Schedule updated successfully
|
|
content:
|
|
application/json:
|
|
schema:
|
|
"$ref": "#/components/schemas/ScheduleObject"
|
|
"400":
|
|
description: Invalid request parameters
|
|
"401":
|
|
description: Unauthorized
|
|
"404":
|
|
description: Resource not found
|
|
"422":
|
|
description: Unprocessable Entity
|
|
tags:
|
|
- schedules
|
|
security:
|
|
- secretKey: []
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
source: |-
|
|
import { schedules } from "@trigger.dev/sdk/v3";
|
|
|
|
const updatedSchedule = await schedules.update(scheduleId, {
|
|
task: 'my-updated-task',
|
|
cron: '0 0 * * *'
|
|
});
|
|
|
|
delete:
|
|
operationId: delete_schedule_v1
|
|
summary: Delete Schedule
|
|
description: Delete a schedule by its ID.
|
|
parameters:
|
|
- in: path
|
|
name: schedule_id
|
|
required: true
|
|
schema:
|
|
type: string
|
|
description: The ID of the schedule.
|
|
responses:
|
|
"200":
|
|
description: Schedule deleted successfully
|
|
"401":
|
|
description: Unauthorized request
|
|
"404":
|
|
description: Resource not found
|
|
tags:
|
|
- schedules
|
|
security:
|
|
- secretKey: []
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
source: |-
|
|
import { schedules } from "@trigger.dev/sdk/v3";
|
|
|
|
await schedules.del(scheduleId);
|
|
|
|
"/api/v1/schedules/{schedule_id}/deactivate":
|
|
post:
|
|
operationId: deactivate_schedule_v1
|
|
summary: Deactivate Schedule.
|
|
description: Deactivate a schedule by its ID.
|
|
parameters:
|
|
- in: path
|
|
name: schedule_id
|
|
required: true
|
|
schema:
|
|
type: string
|
|
description: The ID of the schedule.
|
|
responses:
|
|
"200":
|
|
description: Schedule updated successfully
|
|
content:
|
|
application/json:
|
|
schema:
|
|
"$ref": "#/components/schemas/ScheduleObject"
|
|
"401":
|
|
description: Unauthorized request
|
|
"404":
|
|
description: Resource not found
|
|
tags:
|
|
- schedules
|
|
security:
|
|
- secretKey: []
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
source: |-
|
|
import { schedules } from "@trigger.dev/sdk/v3";
|
|
|
|
const schedule = await schedules.deactivate(scheduleId);
|
|
|
|
"/api/v1/schedules/{schedule_id}/activate":
|
|
post:
|
|
operationId: activate_schedule_v1
|
|
summary: Activate Schedule
|
|
description: Activate a schedule by its ID.
|
|
parameters:
|
|
- in: path
|
|
name: schedule_id
|
|
required: true
|
|
schema:
|
|
type: string
|
|
description: The ID of the schedule.
|
|
responses:
|
|
"200":
|
|
description: Schedule updated successfully
|
|
content:
|
|
application/json:
|
|
schema:
|
|
"$ref": "#/components/schemas/ScheduleObject"
|
|
"401":
|
|
description: Unauthorized request
|
|
"404":
|
|
description: Resource not found
|
|
tags:
|
|
- schedules
|
|
security:
|
|
- secretKey: []
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
source: |-
|
|
import { schedules } from "@trigger.dev/sdk/v3";
|
|
|
|
const schedule = await schedules.activate(scheduleId);
|
|
|
|
"/api/v1/runs/{runId}/replay":
|
|
parameters:
|
|
- $ref: "#/components/parameters/runId"
|
|
post:
|
|
operationId: replay_run_v1
|
|
summary: Replay a run
|
|
description: Creates a new run with the same payload and options as the original
|
|
run.
|
|
responses:
|
|
"200":
|
|
description: Successful request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: string
|
|
description: The ID of the new run.
|
|
"400":
|
|
description: Invalid request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
error:
|
|
type: string
|
|
enum:
|
|
- Invalid or missing run ID
|
|
- Failed to create new run
|
|
"401":
|
|
description: Unauthorized request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
error:
|
|
type: string
|
|
enum:
|
|
- Invalid or Missing API key
|
|
"404":
|
|
description: Resource not found
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
error:
|
|
type: string
|
|
enum:
|
|
- Run not found
|
|
tags:
|
|
- runs
|
|
security:
|
|
- secretKey: []
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
source: |-
|
|
import { runs } from "@trigger.dev/sdk/v3";
|
|
|
|
const handle = await runs.replay("run_1234");
|
|
|
|
"/api/v2/runs/{runId}/cancel":
|
|
parameters:
|
|
- $ref: "#/components/parameters/runId"
|
|
post:
|
|
operationId: cancel_run_v1
|
|
summary: Cancel a run
|
|
description: Cancels an in-progress run. If the run is already completed, this
|
|
will have no effect.
|
|
responses:
|
|
"200":
|
|
description: Successful request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: string
|
|
description: The ID of the run that was canceled.
|
|
example: run_1234
|
|
"400":
|
|
description: Invalid request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
error:
|
|
type: string
|
|
enum:
|
|
- Invalid or missing run ID
|
|
- Failed to create new run
|
|
"401":
|
|
description: Unauthorized request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
error:
|
|
type: string
|
|
enum:
|
|
- Invalid or Missing API key
|
|
"404":
|
|
description: Resource not found
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
error:
|
|
type: string
|
|
enum:
|
|
- Run not found
|
|
tags:
|
|
- runs
|
|
security:
|
|
- secretKey: []
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
source: |-
|
|
import { runs } from "@trigger.dev/sdk/v3";
|
|
|
|
await runs.cancel("run_1234");
|
|
|
|
"/api/v3/runs/{runId}":
|
|
parameters:
|
|
- $ref: "#/components/parameters/runId"
|
|
get:
|
|
operationId: retrieve_run_v1
|
|
summary: Retrieve a run
|
|
description: |
|
|
Retrieve information about a run, including its status, payload, output, and attempts. If you authenticate with a Public API key, we will omit the payload and output fields for security reasons.
|
|
responses:
|
|
"200":
|
|
description: Successful request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
"$ref": "#/components/schemas/RetrieveRunResponse"
|
|
"400":
|
|
description: Invalid request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
error:
|
|
type: string
|
|
enum:
|
|
- Invalid or missing run ID
|
|
"401":
|
|
description: Unauthorized request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
error:
|
|
type: string
|
|
enum:
|
|
- Invalid or Missing API key
|
|
"404":
|
|
description: Resource not found
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
error:
|
|
type: string
|
|
enum:
|
|
- Run not found
|
|
tags:
|
|
- run
|
|
security:
|
|
- secretKey: []
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
source: |-
|
|
import { runs } from "@trigger.dev/sdk/v3";
|
|
|
|
const result = await runs.retrieve("run_1234");
|
|
|
|
// We include boolean helpers to check the status of the run
|
|
// (isSuccess, isFailed, isCompleted, etc.)
|
|
if (result.isSuccess) {
|
|
console.log("Run was successful with output", result.output);
|
|
}
|
|
|
|
// You also have access to the run status that includes more granular information
|
|
console.log("Run status:", result.status);
|
|
|
|
// You can access the payload and output
|
|
console.log("Payload:", result.payload);
|
|
console.log("Output:", result.output);
|
|
|
|
// You can also access the attempts, which will give you information about errors (if they exist)
|
|
for (const attempt of result.attempts) {
|
|
if (attempt.status === "FAILED") {
|
|
console.log("Attempt failed with error:", attempt.error);
|
|
}
|
|
}
|
|
|
|
"/api/v1/runs":
|
|
get:
|
|
operationId: list_runs_v1
|
|
summary: List runs
|
|
description: List runs in a specific environment. You can filter the runs by status, created at, task identifier, version, and more.
|
|
parameters:
|
|
- $ref: "#/components/parameters/cursorPagination"
|
|
- $ref: "#/components/parameters/runsFilter"
|
|
responses:
|
|
"200":
|
|
description: Successful request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ListRunsResult"
|
|
"400":
|
|
description: Invalid query parameters
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorWithDetailsResponse"
|
|
"401":
|
|
description: Unauthorized request
|
|
tags:
|
|
- runs
|
|
security:
|
|
- secretKey: []
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: List runs
|
|
source: |-
|
|
import { runs } from "@trigger.dev/sdk/v3";
|
|
|
|
// Get the first page of runs
|
|
let page = await runs.list({ limit: 20 });
|
|
|
|
for (const run of page.data) {
|
|
console.log(`Run ID: ${run.id}, Status: ${run.status}`);
|
|
}
|
|
|
|
// Convenience methods are provided for manually paginating:
|
|
while (page.hasNextPage()) {
|
|
page = await page.getNextPage();
|
|
// Do something with the next page of runs
|
|
}
|
|
|
|
// Auto-paginate through all runs
|
|
const allRuns = [];
|
|
|
|
for await (const run of runs.list({ limit: 20 })) {
|
|
allRuns.push(run);
|
|
}
|
|
- lang: typescript
|
|
label: Filter runs
|
|
source: |-
|
|
import { runs } from "@trigger.dev/sdk/v3";
|
|
|
|
const response = await runs.list({
|
|
status: ["QUEUED", "EXECUTING"],
|
|
taskIdentifier: ["my-task", "my-other-task"],
|
|
from: new Date("2024-04-01T00:00:00Z"),
|
|
to: new Date(),
|
|
});
|
|
|
|
for (const run of response.data) {
|
|
console.log(`Run ID: ${run.id}, Status: ${run.status}`);
|
|
}
|
|
|
|
"/api/v1/projects/{projectRef}/runs":
|
|
parameters:
|
|
- $ref: "#/components/parameters/projectRef"
|
|
get:
|
|
operationId: list_project_runs_v1
|
|
summary: List project runs
|
|
description: List runs in a project, across multiple environments, using Personal Access Token auth. You can filter the runs by status, created at, task identifier, version, and more.
|
|
parameters:
|
|
- $ref: "#/components/parameters/cursorPagination"
|
|
- $ref: "#/components/parameters/runsFilterWithEnv"
|
|
responses:
|
|
"200":
|
|
description: Successful request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ListRunsResult"
|
|
"400":
|
|
description: Invalid request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorWithDetailsResponse"
|
|
"401":
|
|
description: Unauthorized request
|
|
tags:
|
|
- runs
|
|
security:
|
|
- personalAccessToken: []
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: List runs
|
|
source: |-
|
|
import { runs, configure } from "@trigger.dev/sdk/v3";
|
|
|
|
configure({
|
|
secretKey: "tr_pat_1234" // always use an environment variable for this
|
|
});
|
|
|
|
// Get the first page of runs
|
|
let page = await runs.list("proj_1234", { limit: 20 });
|
|
|
|
for (const run of page.data) {
|
|
console.log(`Run ID: ${run.id}, Status: ${run.status}`);
|
|
}
|
|
|
|
// Convenience methods are provided for manually paginating:
|
|
while (page.hasNextPage()) {
|
|
page = await page.getNextPage();
|
|
// Do something with the next page of runs
|
|
}
|
|
|
|
// Auto-paginate through all runs
|
|
const allRuns = [];
|
|
|
|
for await (const run of runs.list("proj_1234", { limit: 20 })) {
|
|
allRuns.push(run);
|
|
}
|
|
- lang: typescript
|
|
label: Filter runs
|
|
source: |-
|
|
import { runs, configure } from "@trigger.dev/sdk/v3";
|
|
|
|
configure({
|
|
secretKey: "tr_pat_1234" // always use an environment variable for this
|
|
});
|
|
|
|
const response = await runs.list("proj_1234", {
|
|
env: ["prod", "staging"],
|
|
status: ["QUEUED", "EXECUTING"],
|
|
taskIdentifier: ["my-task", "my-other-task"],
|
|
from: new Date("2024-04-01T00:00:00Z"),
|
|
to: new Date(),
|
|
});
|
|
|
|
for (const run of response.data) {
|
|
console.log(`Run ID: ${run.id}, Status: ${run.status}`);
|
|
}
|
|
|
|
|
|
|
|
"/api/v1/projects/{projectRef}/envvars/{env}":
|
|
parameters:
|
|
- $ref: "#/components/parameters/projectRef"
|
|
- $ref: "#/components/parameters/env"
|
|
get:
|
|
operationId: list_project_envvars_v1
|
|
summary: List environment variables
|
|
description: List all environment variables for a specific project and environment.
|
|
responses:
|
|
"200":
|
|
description: Successful request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
"$ref": "#/components/schemas/ListEnvironmentVariablesResponse"
|
|
"400":
|
|
description: Invalid request parameters or body
|
|
content:
|
|
application/json:
|
|
schema:
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
"401":
|
|
description: Unauthorized request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
"404":
|
|
description: Resource not found
|
|
content:
|
|
application/json:
|
|
schema:
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
tags:
|
|
- envvars
|
|
security:
|
|
- secretKey: []
|
|
- personalAccessToken: []
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: Outside of a task
|
|
source: |-
|
|
import { envvars, configure } from "@trigger.dev/sdk/v3";
|
|
|
|
const variables = await envvars.list("proj_yubjwjsfkxnylobaqvqz", "dev");
|
|
|
|
for (const variable of variables) {
|
|
console.log(`Name: ${variable.name}, Value: ${variable.value}`);
|
|
}
|
|
- lang: typescript
|
|
label: Inside a task
|
|
source: |-
|
|
import { envvars, task } from "@trigger.dev/sdk/v3";
|
|
|
|
export const myTask = task({
|
|
id: "my-task",
|
|
run: async () => {
|
|
// projectRef and env are automatically inferred from the task context
|
|
const variables = await envvars.list();
|
|
|
|
for (const variable of variables) {
|
|
console.log(`Name: ${variable.name}, Value: ${variable.value}`);
|
|
}
|
|
}
|
|
})
|
|
post:
|
|
operationId: create_project_envvar_v1
|
|
summary: Create environment variable
|
|
description: Create a new environment variable for a specific project and environment.
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
"$ref": "#/components/schemas/EnvVar"
|
|
responses:
|
|
"200":
|
|
description: Environment variable created successfully
|
|
content:
|
|
application/json:
|
|
schema:
|
|
"$ref": "#/components/schemas/SucceedResponse"
|
|
"400":
|
|
description: Invalid request parameters or body
|
|
content:
|
|
application/json:
|
|
schema:
|
|
"$ref": "#/components/schemas/InvalidEnvVarsRequestResponse"
|
|
"401":
|
|
description: Unauthorized request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
error:
|
|
type: string
|
|
"404":
|
|
description: Resource not found
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
error:
|
|
type: string
|
|
tags:
|
|
- envvars
|
|
security:
|
|
- secretKey: []
|
|
- personalAccessToken: []
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: Outside of a task
|
|
source: |-
|
|
import { envvars } from "@trigger.dev/sdk/v3";
|
|
|
|
await envvars.create("proj_yubjwjsfkxnylobaqvqz", "dev", {
|
|
name: "SLACK_API_KEY",
|
|
value: "slack_123456"
|
|
});
|
|
- lang: typescript
|
|
label: Inside a task
|
|
source: |-
|
|
import { envvars, task } from "@trigger.dev/sdk/v3";
|
|
|
|
export const myTask = task({
|
|
id: "my-task",
|
|
run: async () => {
|
|
// projectRef and env are automatically inferred from the task context
|
|
await envvars.create({
|
|
name: "SLACK_API_KEY",
|
|
value: "slack_123456"
|
|
});
|
|
}
|
|
})
|
|
|
|
"/api/v1/projects/{projectRef}/envvars/{env}/import":
|
|
parameters:
|
|
- $ref: "#/components/parameters/projectRef"
|
|
- $ref: "#/components/parameters/env"
|
|
post:
|
|
operationId: upload_project_envvars_v1
|
|
summary: Upload environment variables
|
|
description: Upload mulitple environment variables for a specific project and environment.
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
variables:
|
|
type: array
|
|
items:
|
|
"$ref": "#/components/schemas/EnvVar"
|
|
override:
|
|
type: boolean
|
|
description: Whether to override existing variables or not
|
|
default: false
|
|
required: ["variables"]
|
|
multipart/form-data:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
variables:
|
|
type: string
|
|
format: binary
|
|
override:
|
|
type: boolean
|
|
required:
|
|
- variables
|
|
responses:
|
|
"200":
|
|
description: Environment variables imported successfully
|
|
content:
|
|
application/json:
|
|
schema:
|
|
"$ref": "#/components/schemas/SucceedResponse"
|
|
"400":
|
|
description: Invalid request parameters or body
|
|
content:
|
|
application/json:
|
|
schema:
|
|
"$ref": "#/components/schemas/InvalidEnvVarsRequestResponse"
|
|
"401":
|
|
description: Unauthorized request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
error:
|
|
type: string
|
|
"404":
|
|
description: Resource not found
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
error:
|
|
type: string
|
|
tags:
|
|
- envvars
|
|
security:
|
|
- secretKey: []
|
|
- personalAccessToken: []
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: Import variables from an array
|
|
source: |-
|
|
import { envvars } from "@trigger.dev/sdk/v3";
|
|
|
|
// Import variables from an array
|
|
await envvars.upload("proj_yubjwjsfkxnylobaqvqz", "dev", {
|
|
variables: [
|
|
{
|
|
name: "SLACK_API_KEY",
|
|
value: "slack_123456"
|
|
}
|
|
],
|
|
override: false
|
|
});
|
|
- lang: typescript
|
|
label: Import variables from a read stream
|
|
source: |-
|
|
import { envvars } from "@trigger.dev/sdk/v3";
|
|
import { createReadStream } from "node:fs";
|
|
|
|
// Import variables in dotenv format from a file
|
|
await envvars.upload("proj_yubjwjsfkxnylobaqvqz", "dev", {
|
|
variables: createReadStream(".env"),
|
|
override: false
|
|
});
|
|
- lang: typescript
|
|
label: Import variables from a response
|
|
source: |-
|
|
import { envvars } from "@trigger.dev/sdk/v3";
|
|
|
|
// Import variables in dotenv format from a response
|
|
await envvars.upload("proj_yubjwjsfkxnylobaqvqz", "dev", {
|
|
variables: await fetch("https://example.com/.env"),
|
|
override: false
|
|
});
|
|
- lang: typescript
|
|
label: Import variables from a Buffer
|
|
source: |-
|
|
import { envvars } from "@trigger.dev/sdk/v3";
|
|
|
|
// Import variables in dotenv format from a buffer
|
|
await envvars.upload("proj_yubjwjsfkxnylobaqvqz", "dev", {
|
|
variables: Buffer.from("SLACK_API_KEY=slack_1234"),
|
|
override: false
|
|
});
|
|
- lang: typescript
|
|
label: Import variables from a File
|
|
source: |-
|
|
import { envvars } from "@trigger.dev/sdk/v3";
|
|
|
|
// Import variables in dotenv format from a file
|
|
await envvars.upload("proj_yubjwjsfkxnylobaqvqz", "dev", {
|
|
variables: new File(["SLACK_API_KEY=slack_1234"], ".env"),
|
|
override: false
|
|
});
|
|
|
|
|
|
"/api/v1/projects/{projectRef}/envvars/{env}/{name}":
|
|
parameters:
|
|
- $ref: "#/components/parameters/projectRef"
|
|
- $ref: "#/components/parameters/env"
|
|
- $ref: "#/components/parameters/envvarName"
|
|
get:
|
|
operationId: get_project_envvar_v1
|
|
summary: Retrieve environment variable
|
|
description: Retrieve a specific environment variable for a specific project and environment.
|
|
responses:
|
|
"200":
|
|
description: Successful request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
"$ref": "#/components/schemas/EnvVarValue"
|
|
"400":
|
|
description: Invalid request parameters or body
|
|
content:
|
|
application/json:
|
|
schema:
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
"401":
|
|
description: Unauthorized request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
"404":
|
|
description: Resource not found
|
|
content:
|
|
application/json:
|
|
schema:
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
tags:
|
|
- envvars
|
|
security:
|
|
- secretKey: []
|
|
- personalAccessToken: []
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: Outside of a task
|
|
source: |-
|
|
import { envvars } from "@trigger.dev/sdk/v3";
|
|
|
|
const variable = await envvars.retrieve("proj_yubjwjsfkxnylobaqvqz", "dev", "SLACK_API_KEY");
|
|
|
|
console.log(`Value: ${variable.value}`);
|
|
- lang: typescript
|
|
label: Inside a task
|
|
source: |-
|
|
import { envvars, task } from "@trigger.dev/sdk/v3";
|
|
|
|
export const myTask = task({
|
|
id: "my-task",
|
|
run: async () => {
|
|
// projectRef and env are automatically inferred from the task context
|
|
const variable = await envvars.retrieve("SLACK_API_KEY");
|
|
|
|
console.log(`Value: ${variable.value}`);
|
|
}
|
|
})
|
|
|
|
delete:
|
|
operationId: delete_project_envvar_v1
|
|
summary: Delete environment variable
|
|
description: Delete a specific environment variable for a specific project and environment.
|
|
responses:
|
|
"200":
|
|
description: Environment variable deleted successfully
|
|
content:
|
|
application/json:
|
|
schema:
|
|
"$ref": "#/components/schemas/SucceedResponse"
|
|
"400":
|
|
description: Invalid request parameters or body
|
|
content:
|
|
application/json:
|
|
schema:
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
"401":
|
|
description: Unauthorized request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
"404":
|
|
description: Resource not found
|
|
content:
|
|
application/json:
|
|
schema:
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
tags:
|
|
- envvars
|
|
security:
|
|
- secretKey: []
|
|
- personalAccessToken: []
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: Outside of a task
|
|
source: |-
|
|
import { envvars } from "@trigger.dev/sdk/v3";
|
|
|
|
await envvars.del("proj_yubjwjsfkxnylobaqvqz", "dev", "SLACK_API_KEY");
|
|
- lang: typescript
|
|
label: Inside a task
|
|
source: |-
|
|
import { envvars, task } from "@trigger.dev/sdk/v3";
|
|
|
|
export const myTask = task({
|
|
id: "my-task",
|
|
run: async () => {
|
|
// projectRef and env are automatically inferred from the task context
|
|
await envvars.del("SLACK_API_KEY");
|
|
}
|
|
})
|
|
put:
|
|
operationId: update_project_envvar_v1
|
|
summary: Update environment variable
|
|
description: Update a specific environment variable for a specific project and environment.
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
"$ref": "#/components/schemas/EnvVarValue"
|
|
responses:
|
|
"200":
|
|
description: Environment variable updated successfully
|
|
content:
|
|
application/json:
|
|
schema:
|
|
"$ref": "#/components/schemas/SucceedResponse"
|
|
"400":
|
|
description: Invalid request parameters or body
|
|
content:
|
|
application/json:
|
|
schema:
|
|
"$ref": "#/components/schemas/InvalidEnvVarsRequestResponse"
|
|
"401":
|
|
description: Unauthorized request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
"404":
|
|
description: Resource not found
|
|
content:
|
|
application/json:
|
|
schema:
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
tags:
|
|
- envvars
|
|
security:
|
|
- secretKey: []
|
|
- personalAccessToken: []
|
|
x-codeSamples:
|
|
- lang: typescript
|
|
label: Outside of a task
|
|
source: |-
|
|
import { envvars } from "@trigger.dev/sdk/v3";
|
|
|
|
await envvars.update("proj_yubjwjsfkxnylobaqvqz", "dev", "SLACK_API_KEY", {
|
|
value: "slack_123456"
|
|
});
|
|
- lang: typescript
|
|
label: Inside a task
|
|
source: |-
|
|
import { envvars, task } from "@trigger.dev/sdk/v3";
|
|
|
|
export const myTask = task({
|
|
id: "my-task",
|
|
run: async () => {
|
|
// projectRef and env are automatically inferred from the task context
|
|
await envvars.update("SLACK_API_KEY", {
|
|
value: "slack_123456"
|
|
});
|
|
}
|
|
})
|
|
|
|
|
|
components:
|
|
parameters:
|
|
runsFilterWithEnv:
|
|
in: query
|
|
name: filter
|
|
style: deepObject
|
|
explode: true
|
|
description: |
|
|
Use this parameter to filter the runs. You can filter by created at, environment, status, task identifier, and version.
|
|
|
|
For array fields, you can provide multiple values to filter by using a comma-separated list. For example, to get QUEUED and EXECUTING runs, you can use `filter[status]=QUEUED,EXECUTING`.
|
|
|
|
For object fields, you should use the "form" encoding style. For example, to filter by the period, you can use `filter[createdAt][period]=1d`.
|
|
schema:
|
|
allOf:
|
|
- $ref: "#/components/schemas/CommonRunsFilter"
|
|
- $ref: "#/components/schemas/EnvFilter"
|
|
runsFilter:
|
|
in: query
|
|
name: filter
|
|
style: deepObject
|
|
explode: true
|
|
description: |
|
|
Use this parameter to filter the runs. You can filter by created at, status, task identifier, and version.
|
|
|
|
For array fields, you can provide multiple values to filter by using a comma-separated list. For example, to get QUEUED and EXECUTING runs, you can use `filter[status]=QUEUED,EXECUTING`.
|
|
|
|
For object fields, you should use the "form" encoding style. For example, to filter by the period, you can use `filter[createdAt][period]=1d`.
|
|
schema:
|
|
$ref: "#/components/schemas/CommonRunsFilter"
|
|
cursorPagination:
|
|
in: query
|
|
name: page
|
|
style: deepObject
|
|
explode: true
|
|
description: |
|
|
Use this parameter to paginate the results. You can specify the number of runs per page, and the ID of the run to start the page after or before.
|
|
|
|
For object fields like `page`, you should use the "form" encoding style. For example, to get the next page of runs, you can use `page[after]=run_1234`.
|
|
schema:
|
|
type: object
|
|
properties:
|
|
size:
|
|
type: integer
|
|
maximum: 100
|
|
minimum: 10
|
|
default: 25
|
|
description: Number of runs per page. Maximum is 100.
|
|
after:
|
|
type: string
|
|
description: The ID of the run to start the page after. This will set the direction of the pagination to forward.
|
|
before:
|
|
type: string
|
|
description: The ID of the run to start the page before. This will set the direction of the pagination to backward.
|
|
runId:
|
|
in: path
|
|
name: runId
|
|
required: true
|
|
schema:
|
|
type: string
|
|
description: |
|
|
The ID of an run, starts with `run_`. The run ID will be returned when you trigger a run on a task.
|
|
example: run_1234
|
|
projectRef:
|
|
in: path
|
|
name: projectRef
|
|
required: true
|
|
schema:
|
|
type: string
|
|
description: The external ref of the project. You can find this in the project settings. Starts with `proj_`.
|
|
example: proj_yubjwjsfkxnylobaqvqz
|
|
env:
|
|
in: path
|
|
name: env
|
|
required: true
|
|
schema:
|
|
type: string
|
|
enum: [dev, staging, prod]
|
|
description: The environment of the project to list variables for.
|
|
example: dev
|
|
envvarName:
|
|
in: path
|
|
name: name
|
|
required: true
|
|
schema:
|
|
type: string
|
|
description: The name of the environment variable.
|
|
example: SLACK_API_KEY
|
|
securitySchemes:
|
|
secretKey:
|
|
type: http
|
|
scheme: bearer
|
|
description: |
|
|
Use your project-specific Secret API key. Will start with `tr_dev_`, `tr_prod`, `tr_stg`, etc.
|
|
|
|
You can find your Secret API key in the API Keys section of your Trigger.dev project dashboard.
|
|
|
|
Our TypeScript SDK will default to using the value of the `TRIGGER_SECRET_KEY` environment variable if it is set. If you are using the SDK in a different environment, you can set the key using the `configure` function.
|
|
|
|
```typescript
|
|
import { configure } from "@trigger.dev/sdk/v3";
|
|
|
|
configure({ secretKey: "tr_dev_1234" });
|
|
```
|
|
|
|
personalAccessToken:
|
|
type: http
|
|
scheme: bearer
|
|
description: |
|
|
Use your user-specific Personal Access Token, which you can generate from the Trigger.dev dashboard in your account settings. (It will start with `tr_pat_`.)
|
|
|
|
Our TypeScript SDK will default to using the value of the `TRIGGER_ACCESS_TOKEN` environment variable if it is set. If you are using the SDK in a different environment, you can set the key using the `configure` function.
|
|
|
|
```typescript
|
|
import { configure } from "@trigger.dev/sdk/v3";
|
|
|
|
configure({ secretKey: "tr_pat_1234" });
|
|
```
|
|
schemas:
|
|
EnvFilter:
|
|
type: object
|
|
properties:
|
|
env:
|
|
type: array
|
|
items:
|
|
type: string
|
|
description: The environment of the project
|
|
enum:
|
|
- dev
|
|
- staging
|
|
- prod
|
|
CommonRunsFilter:
|
|
type: object
|
|
properties:
|
|
createdAt:
|
|
type: object
|
|
properties:
|
|
from:
|
|
type: string
|
|
format: date-time
|
|
description: The start date to filter the runs by
|
|
to:
|
|
type: string
|
|
format: date-time
|
|
description: The end date to filter the runs by
|
|
period:
|
|
type: string
|
|
description: The period to filter the runs by
|
|
example: 1d
|
|
status:
|
|
type: array
|
|
items:
|
|
type: string
|
|
description: The status of the run
|
|
enum:
|
|
- WAITING_FOR_DEPLOY
|
|
- QUEUED
|
|
- EXECUTING
|
|
- REATTEMPTING
|
|
- FROZEN
|
|
- COMPLETED
|
|
- CANCELED
|
|
- FAILED
|
|
- CRASHED
|
|
- INTERRUPTED
|
|
- SYSTEM_FAILURE
|
|
taskIdentifier:
|
|
type: array
|
|
items:
|
|
type: string
|
|
description: The identifier of the task that was run
|
|
version:
|
|
type: array
|
|
items:
|
|
type: string
|
|
description: The version of the worker that executed the run
|
|
|
|
bulkAction:
|
|
type: string
|
|
description: The bulk action ID to filter the runs by
|
|
example: bulk_1234
|
|
schedule:
|
|
type: string
|
|
description: The schedule ID to filter the runs by
|
|
example: schedule_1234
|
|
isTest:
|
|
type: boolean
|
|
description: Whether the run is a test run or not
|
|
example: false
|
|
ListRunsResult:
|
|
type: object
|
|
properties:
|
|
data:
|
|
type: array
|
|
items:
|
|
"$ref": "#/components/schemas/ListRunItem"
|
|
pagination:
|
|
type: object
|
|
properties:
|
|
next:
|
|
type: string
|
|
description: The run ID to start the next page after. This should be used as the `page[after]` parameter in the next request.
|
|
example: run_1234
|
|
previous:
|
|
type: string
|
|
description: The run ID to start the previous page before. This should be used as the `page[before]` parameter in the next request.
|
|
example: run_5678
|
|
ListRunItem:
|
|
type: object
|
|
required:
|
|
- id
|
|
- status
|
|
- taskIdentifier
|
|
- createdAt
|
|
- updatedAt
|
|
- isTest
|
|
- env
|
|
properties:
|
|
id:
|
|
type: string
|
|
description: The unique ID of the run, prefixed with `run_`
|
|
example: run_1234
|
|
status:
|
|
type: string
|
|
description: The status of the run
|
|
enum:
|
|
- WAITING_FOR_DEPLOY
|
|
- QUEUED
|
|
- EXECUTING
|
|
- REATTEMPTING
|
|
- FROZEN
|
|
- COMPLETED
|
|
- CANCELED
|
|
- FAILED
|
|
- CRASHED
|
|
- INTERRUPTED
|
|
- SYSTEM_FAILURE
|
|
taskIdentifier:
|
|
type: string
|
|
description: The identifier of the task that was run
|
|
example: my-task
|
|
version:
|
|
type: string
|
|
example: 20240523.1
|
|
description: The version of the worker that executed the run
|
|
env:
|
|
type: object
|
|
description: The environment of the run
|
|
required:
|
|
- id
|
|
- name
|
|
properties:
|
|
id:
|
|
type: string
|
|
description: The unique ID of the environment
|
|
example: cl1234
|
|
name:
|
|
type: string
|
|
description: The name of the environment
|
|
example: dev
|
|
user:
|
|
type: string
|
|
description: If this is a dev environment, the username of the user represented by this environment
|
|
example: Anna
|
|
idempotencyKey:
|
|
type: string
|
|
description: The idempotency key used to prevent creating duplicate runs, if provided
|
|
example: idempotency_key_1234
|
|
isTest:
|
|
type: boolean
|
|
description: Whether the run is a test run or not
|
|
example: false
|
|
createdAt:
|
|
type: string
|
|
format: date-time
|
|
updatedAt:
|
|
type: string
|
|
format: date-time
|
|
startedAt:
|
|
type: string
|
|
format: date-time
|
|
description: The time the run started
|
|
finishedAt:
|
|
type: string
|
|
format: date-time
|
|
description: The time the run finished
|
|
InvalidEnvVarsRequestResponse:
|
|
type: object
|
|
properties:
|
|
error:
|
|
type: string
|
|
issues:
|
|
type: array
|
|
items:
|
|
type: object
|
|
variableErrors:
|
|
type: array
|
|
items:
|
|
type: object
|
|
SucceedResponse:
|
|
type: object
|
|
properties:
|
|
success:
|
|
type: boolean
|
|
required: ["success"]
|
|
ErrorResponse:
|
|
type: object
|
|
properties:
|
|
error:
|
|
type: string
|
|
required: ["error"]
|
|
ErrorWithDetailsResponse:
|
|
type: object
|
|
properties:
|
|
error:
|
|
type: string
|
|
example: Query Error
|
|
details:
|
|
type: array
|
|
items:
|
|
type: object
|
|
required:
|
|
- code
|
|
- message
|
|
properties:
|
|
code:
|
|
type: string
|
|
description: The error code
|
|
example: custom
|
|
message:
|
|
type: string
|
|
description: The error message
|
|
example: "Invalid status values: FOOBAR"
|
|
path:
|
|
type: array
|
|
items:
|
|
type: string
|
|
description: The relevant path in the request
|
|
example: ["filter[status]"]
|
|
required: ["error"]
|
|
ListEnvironmentVariablesResponse:
|
|
type: array
|
|
items:
|
|
"$ref": "#/components/schemas/EnvVar"
|
|
EnvVarValue:
|
|
type: object
|
|
properties:
|
|
value:
|
|
type: string
|
|
example: slack_123456
|
|
required: ["value"]
|
|
EnvVar:
|
|
type: object
|
|
properties:
|
|
name:
|
|
type: string
|
|
example: SLACK_API_KEY
|
|
value:
|
|
type: string
|
|
example: slack_123456
|
|
required: ["name", "value"]
|
|
RetrieveRunResponse:
|
|
type: object
|
|
required:
|
|
- id
|
|
- status
|
|
- taskIdentifier
|
|
- createdAt
|
|
- updatedAt
|
|
- attempts
|
|
properties:
|
|
id:
|
|
type: string
|
|
description: The unique ID of the run, prefixed with `run_`
|
|
example: run_1234
|
|
status:
|
|
type: string
|
|
description: The status of the run
|
|
enum:
|
|
- WAITING_FOR_DEPLOY
|
|
- QUEUED
|
|
- EXECUTING
|
|
- REATTEMPTING
|
|
- FROZEN
|
|
- COMPLETED
|
|
- CANCELED
|
|
- FAILED
|
|
- CRASHED
|
|
- INTERRUPTED
|
|
- SYSTEM_FAILURE
|
|
taskIdentifier:
|
|
type: string
|
|
description: The identifier of the task that was run
|
|
example: my-task
|
|
version:
|
|
type: string
|
|
example: 20240523.1
|
|
description: The version of the worker that executed the run
|
|
payload:
|
|
type: object
|
|
description: The payload that was sent to the task. Will be omitted if the request was made with a Public API key
|
|
example: {"foo": "bar"}
|
|
output:
|
|
type: object
|
|
description: The output of the run. Will be omitted if the request was made with a Public API key
|
|
example: {"foo": "bar"}
|
|
idempotencyKey:
|
|
type: string
|
|
description: The idempotency key used to prevent creating duplicate runs, if provided
|
|
example: idempotency_key_1234
|
|
createdAt:
|
|
type: string
|
|
format: date-time
|
|
updatedAt:
|
|
type: string
|
|
format: date-time
|
|
isTest:
|
|
type: boolean
|
|
description: Whether the run is a test run or not
|
|
example: false
|
|
startedAt:
|
|
type: string
|
|
format: date-time
|
|
description: The time the run started
|
|
finishedAt:
|
|
type: string
|
|
format: date-time
|
|
description: The time the run finished
|
|
schedule:
|
|
type: object
|
|
description: The schedule that triggered the run. Will be omitted if the run was not triggered by a schedule
|
|
required:
|
|
- id
|
|
- generator
|
|
properties:
|
|
id:
|
|
type: string
|
|
description: The unique ID of the schedule, prefixed with `sched_`
|
|
example: sched_1234
|
|
externalId:
|
|
type: string
|
|
description: The external ID of the schedule. Can be anything that is useful to you (e.g., user ID, org ID, etc.)
|
|
example: user_1234
|
|
deduplicationKey:
|
|
type: string
|
|
description: The deduplication key used to prevent creating duplicate schedules
|
|
example: dedup_key_1234
|
|
generator:
|
|
type: object
|
|
properties:
|
|
type:
|
|
type: string
|
|
enum:
|
|
- CRON
|
|
expression:
|
|
type: string
|
|
description: The cron expression used to generate the schedule
|
|
example: 0 0 * * *
|
|
description:
|
|
type: string
|
|
description: The description of the generator in plain english
|
|
example: Every day at midnight
|
|
attempts:
|
|
type: array
|
|
items:
|
|
type: object
|
|
required:
|
|
- id
|
|
- status
|
|
- createdAt
|
|
- updatedAt
|
|
properties:
|
|
id:
|
|
type: string
|
|
description: The unique ID of the attempt, prefixed with `attempt_`
|
|
example: attempt_1234
|
|
status:
|
|
type: string
|
|
enum:
|
|
- PENDING
|
|
- EXECUTING
|
|
- PAUSED
|
|
- COMPLETED
|
|
- FAILED
|
|
- CANCELED
|
|
error:
|
|
$ref: "#/components/schemas/SerializedError"
|
|
createdAt:
|
|
type: string
|
|
format: date-time
|
|
updatedAt:
|
|
type: string
|
|
format: date-time
|
|
startedAt:
|
|
type: string
|
|
format: date-time
|
|
completedAt:
|
|
type: string
|
|
format: date-time
|
|
CreateScheduleOptions:
|
|
type: object
|
|
properties:
|
|
task:
|
|
type: string
|
|
cron:
|
|
type: string
|
|
deduplicationKey:
|
|
type: string
|
|
externalId:
|
|
type: string
|
|
required:
|
|
- task
|
|
- cron
|
|
ScheduleObject:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: string
|
|
example: sched_1234
|
|
description: The unique ID of the schedule, prefixed with 'sched_'
|
|
task:
|
|
type: string
|
|
example: my-scheduled-task
|
|
description: The id of the scheduled task that will be triggered by this
|
|
schedule
|
|
active:
|
|
type: boolean
|
|
example: true
|
|
description: Whether the schedule is active or not
|
|
deduplicationKey:
|
|
type: string
|
|
example: dedup_key_1234
|
|
description: The deduplication key used to prevent creating duplicate schedules
|
|
externalId:
|
|
type: string
|
|
example: user_1234
|
|
description: The external ID of the schedule. Can be anything that is useful
|
|
to you (e.g., user ID, org ID, etc.)
|
|
generator:
|
|
type: object
|
|
properties:
|
|
type:
|
|
type: string
|
|
enum:
|
|
- CRON
|
|
expression:
|
|
type: string
|
|
description: The cron expression used to generate the schedule
|
|
example: 0 0 * * *
|
|
description:
|
|
type: string
|
|
description: The description of the generator in plain english
|
|
example: Every day at midnight
|
|
nextRun:
|
|
type: string
|
|
format: date-time
|
|
description: The next time the schedule will run
|
|
example: "2024-04-01T00:00:00Z"
|
|
environments:
|
|
type: array
|
|
items:
|
|
"$ref": "#/components/schemas/ScheduleEnvironment"
|
|
ListSchedulesResult:
|
|
type: object
|
|
properties:
|
|
data:
|
|
type: array
|
|
items:
|
|
"$ref": "#/components/schemas/ScheduleObject"
|
|
pagination:
|
|
type: object
|
|
properties:
|
|
currentPage:
|
|
type: integer
|
|
totalPages:
|
|
type: integer
|
|
count:
|
|
type: integer
|
|
ScheduleEnvironment:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: string
|
|
type:
|
|
type: string
|
|
userName:
|
|
type: string
|
|
SerializedError:
|
|
type: object
|
|
required:
|
|
- message
|
|
properties:
|
|
message:
|
|
type: string
|
|
example: Something went wrong
|
|
name:
|
|
type: string
|
|
example: Error
|
|
stackTrace:
|
|
type: string
|
|
example: "Error: Something went wrong"
|