Skip to main content
GET
/
tasks
Typescript (SDK)
import { Crevio } from "@crevio/sdk";

const crevio = new Crevio({
  apiKey: process.env["CREVIO_API_KEY"] ?? "",
});

async function run() {
  const result = await crevio.tasks.list({});

  console.log(result);
}

run();
{
  "object": "list",
  "data": [
    {
      "id": "<string>",
      "object": "<string>",
      "name": "<string>",
      "description": "<string>",
      "prompt": "<string>",
      "trigger_type": "immediate",
      "cron_expression": "<string>",
      "interval_seconds": 123,
      "scheduled_at": "2023-11-07T05:31:56Z",
      "timezone": "<string>",
      "delivery_method": "notification",
      "approval_mode": "autonomous",
      "model_id": "<string>",
      "active": true,
      "expires_at": "2023-11-07T05:31:56Z",
      "next_run_at": "2023-11-07T05:31:56Z",
      "last_run_at": "2023-11-07T05:31:56Z",
      "total_runs_count": 123,
      "consecutive_failure_count": 123,
      "total_credits_consumed": 123,
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z"
    }
  ],
  "has_more": true,
  "url": "<string>"
}

Authorizations

Authorization
string
header
required

API key in the format: Bearer {api_token}

Query Parameters

trigger_type
enum<string>

Filter by trigger type

Available options:
immediate,
cron,
interval,
once,
event
active
boolean

Filter by active flag

query
string

Search by task name or description

starting_after
string

Cursor for pagination — the ID of the last item in the previous page

limit
integer
default:20

Items per page

Required range: 1 <= x <= 100

Response

List of tasks

object
enum<string>
required
Available options:
list
data
object[]
required
has_more
boolean
required
url
string
required