POST
/
api
/
v1
/
workspaces
/
{workspace_id}
/
schedules
{
  "id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "name": "<string>",
  "status": "ACTIVE",
  "started_at": "2023-11-07T05:31:56Z",
  "ended_at": "2023-11-07T05:31:56Z",
  "schedule": "<string>",
  "ended_after": 123,
  "run_template": {
    "workspace_id": "<string>",
    "workflows": [
      "<string>"
    ],
    "runner_assignment": {
      "ids": [
        "<string>"
      ],
      "host": "SELF",
      "tags": [
        "<string>"
      ]
    },
    "data": {}
  },
  "runs_count": 0
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

workspace_id
string
required

Body

application/json
name
string
default:Unnamed
Required string length: 1 - 63
host
enum<string>
Available options:
SELF,
ASKUI
runner_ids
string[]
tags
string[]
started_at
string

Timestamp after which the schedule starts. If not specified, the schedule starts immediately.

ended_at
string | null
ended_after
integer | null

Number of runs (more specifically, completions) after which the schedule ends, i.e., no more runs will be scheduled. If both ended_at and ended_after are specified, the schedule will end when either condition is met. If neither is specified, the schedule will run indefinitely.

schedule
string | null

Cron expression specifying the schedule. If not specified, the schedule will run once on when started_at is reached which is now by default. end_at and ended_after will be ignored if schedule is not specified.

workflows
string[] | null

List of paths (not starting with '/' but relative to root of workspace) of workflows to be executed. Each string is a syntactically valid s3 object key or prefix. Cannot be empty. Strings starting with '.' will be ignored.

data
object

Arbitrary data to be stored with the schedule which is made available to the runner when executing AskUI workflows.

Response

201
application/json
Successful Response
name
string
required
started_at
string
required
run_template
object
required
id
string
created_at
string
status
enum<string>
Available options:
ACTIVE,
SUSPENDED,
ENDED
ended_at
string | null
schedule
string | null
ended_after
integer | null
runs_count
integer
default:0