List scheduled tasks (or get one)
curl --request GET \
--url https://www.asteragents.com/api/scheduled-tasks/manage \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.asteragents.com/api/scheduled-tasks/manage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://www.asteragents.com/api/scheduled-tasks/manage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.asteragents.com/api/scheduled-tasks/manage",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://www.asteragents.com/api/scheduled-tasks/manage"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://www.asteragents.com/api/scheduled-tasks/manage")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.asteragents.com/api/scheduled-tasks/manage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": 42,
"name": "Weekly portfolio digest",
"description": "<string>",
"prompt": "Summarize any new documents added this week.",
"schedule": "0 13 * * 1",
"enabled": true,
"agentId": 123,
"agentName": "Portfolio Monitor",
"userId": "<string>",
"lastRunAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": "Bad Request",
"details": [
{}
]
}{
"error": "Internal Server Error"
}Scheduled Tasks API
List scheduled tasks (or get one)
Without taskId, returns the caller’s scheduled tasks as a bare JSON
array. With taskId, returns that single task object. Admins may pass
allInOrg=true to list every task in the org.
Requires Control Hub access (any non-guest org role).
GET
/
scheduled-tasks
/
manage
List scheduled tasks (or get one)
curl --request GET \
--url https://www.asteragents.com/api/scheduled-tasks/manage \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.asteragents.com/api/scheduled-tasks/manage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://www.asteragents.com/api/scheduled-tasks/manage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.asteragents.com/api/scheduled-tasks/manage",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://www.asteragents.com/api/scheduled-tasks/manage"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://www.asteragents.com/api/scheduled-tasks/manage")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.asteragents.com/api/scheduled-tasks/manage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": 42,
"name": "Weekly portfolio digest",
"description": "<string>",
"prompt": "Summarize any new documents added this week.",
"schedule": "0 13 * * 1",
"enabled": true,
"agentId": 123,
"agentName": "Portfolio Monitor",
"userId": "<string>",
"lastRunAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": "Bad Request",
"details": [
{}
]
}{
"error": "Internal Server Error"
}Authorizations
JWT token from Clerk authentication.
Must be from a user with org:admin role.
Query Parameters
Return a single task by id instead of the list.
Admins only — list all tasks in the org rather than just the caller's.
Response
A list of tasks (or a single task when taskId is given).
Example:
42
Example:
"Weekly portfolio digest"
Example:
"Summarize any new documents added this week."
Cron expression (UTC).
Example:
"0 13 * * 1"
Example:
123
Present on list/get responses.
Example:
"Portfolio Monitor"