curl --request GET \
--url https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/scheduled-tasks/{taskId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/scheduled-tasks/{taskId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/scheduled-tasks/{taskId}', 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://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/scheduled-tasks/{taskId}",
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://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/scheduled-tasks/{taskId}"
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://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/scheduled-tasks/{taskId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/scheduled-tasks/{taskId}")
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{
"deploymentId": 123,
"id": 123,
"isEnabled": true,
"name": "<string>",
"prompt": "<string>",
"timezone": "<string>",
"userId": 123,
"agentId": 123,
"cronExpression": "<string>",
"description": "<string>",
"nextRunAt": "<string>"
}Get a scheduled task
curl --request GET \
--url https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/scheduled-tasks/{taskId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/scheduled-tasks/{taskId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/scheduled-tasks/{taskId}', 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://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/scheduled-tasks/{taskId}",
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://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/scheduled-tasks/{taskId}"
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://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/scheduled-tasks/{taskId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/scheduled-tasks/{taskId}")
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{
"deploymentId": 123,
"id": 123,
"isEnabled": true,
"name": "<string>",
"prompt": "<string>",
"timezone": "<string>",
"userId": 123,
"agentId": 123,
"cronExpression": "<string>",
"description": "<string>",
"nextRunAt": "<string>"
}Authorizations
Token authentication. Send Authorization: Bearer <YOUR_TOKEN>.
Response
False while the schedule is paused.
What the agent is asked on every run, shown as the task's Instructions in Cube. Each run starts a new chat thread, so the prompt has to stand on its own.
IANA time zone the cron is read in, e.g. America/New_York. Defaults to UTC.
The creator. Every run executes as this user, and only they or an admin may change, delete or run the task.
The agent that runs the task; null runs the deployment default.
Standard 5-field cron (minute hour day-of-month month day-of-week), e.g. 0 9 * * 1-5 for 9:00 on weekdays. Null when the task is Manual: it runs only when started with POST /scheduled-tasks/{taskId}/run.
When the schedule next fires (ISO 8601, UTC); null for a Manual or paused task.