See Stacksync in action with a solution architect. Book a demo ↗
GeniesTasks

Genie tasks

Update a Genie task

PATCH
/v1/workspaces/{workspace_id}/genies/{genie_id}/tasks/{scheduled_task_id}

Changes a Genie task: name, instruction, schedule (cron_expression or run_at), start time, paused or not.

Authorization

Authorizationstringheaderrequired

Bearer <key>, where <key> is a workspace API key or a user API key. See Authentication.

Path Parameters

workspace_id*integer

The workspace. List the ones your key can reach with GET /v1/workspaces.

genie_id*string

The Genie.

Formatuuid
scheduled_task_id*string

The Genie task.

Formatuuid

Query Parameters

region*Regions

Region of the genie: besg (Europe) or usnv (United States)

Value in"besg""usnv"

Request Body

application/json
  1. body
name?|
Defaultnull
instruction?|
Defaultnull
cron_expression?|
Defaultnull
run_at?|
Defaultnull
start_time?|
Defaultnull
is_paused?|
Defaultnull
validate_only?Validate Only

Run every check of the write and answer 204 without writing: a refused write answers the error the write would

Defaultfalse

Response Body

OK

application/json
  1. response

A task a genie runs once (run_at) or on a cron schedule

task_id*Task Id
name?|
Defaultnull
instruction?|

What the genie is asked each time

Defaultnull
cron_expression?|
Defaultnull
run_at?|

For a one-time task: when it runs, ISO 8601

Defaultnull
start_time?|

For a scheduled task: when the schedule starts

Defaultnull
next_run_time?|
Defaultnull
is_paused?|
Defaultnull
is_shared_with_workspace?|
Defaultnull
created_time?|
Defaultnull
Update a Genie task
curl -X PATCH 'https://api.stacksync.com/v1/workspaces/0/genies/497f6eca-6276-4993-bfeb-53cbbbba6f08/tasks/497f6eca-6276-4993-bfeb-53cbbbba6f08?region=besg' \  -H 'Content-Type: application/json' \  -d '{  "cron_expression": "0 9 * * 1-5"}'
{  "task_id": "<task_id>",  "name": "<name>",  "instruction": "<instruction>",  "cron_expression": "<cron_expression>",  "run_at": "<run_at>",  "start_time": "<start_time>",  "next_run_time": "<next_run_time>",  "is_paused": false,  "is_shared_with_workspace": false,  "created_time": "<created_time>"}