List scheduled tasks
curl --request GET \
--url https://api.langdock.com/automations/v1 \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.langdock.com/automations/v1"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.langdock.com/automations/v1', 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://api.langdock.com/automations/v1",
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://api.langdock.com/automations/v1"
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://api.langdock.com/automations/v1")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.langdock.com/automations/v1")
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_bodyScheduled Tasks API
Scheduled Tasks auflisten
Liste Scheduled Tasks, die diesem Workspace-API-Key gehören, neueste zuerst
GET
/
automations
/
v1
List scheduled tasks
curl --request GET \
--url https://api.langdock.com/automations/v1 \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.langdock.com/automations/v1"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.langdock.com/automations/v1', 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://api.langdock.com/automations/v1",
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://api.langdock.com/automations/v1"
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://api.langdock.com/automations/v1")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.langdock.com/automations/v1")
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_bodyGibt Scheduled Tasks zurück, die dieser Workspace-API-Key erstellt hat, neueste zuerst. Aufgaben eines anderen Keys fehlen. Gelöschte Aufgaben fehlen.
Basis-URL
https://api.langdock.com/automations/v1
Dedicated DeploymentsErsetze
api.langdock.com durch <your-deployment-url>/api/public in allen Anfragen.Benötigte Scopes
Dieser Endpoint braucht den ScopeAUTOMATION_API (Scheduled Tasks API) auf einem Workspace-API-Key.
Parameter
| Parameter | In | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
limit | Query | integer | Nein | Seitengröße von 1 bis 250. Standard: 50. |
cursor | Query | string | Nein | Task-UUID aus nextCursor der vorherigen Antwort. |
Beispiel
const axios = require("axios");
async function listScheduledTasks(cursor) {
const response = await axios.get(
"https://api.langdock.com/automations/v1",
{
params: { limit: 50, cursor },
headers: {
Authorization: "Bearer YOUR_API_KEY"
}
}
);
console.log(response.data.automations);
return response.data.nextCursor;
}
listScheduledTasks();
Antwortformat
Erfolgreiche Antwort (200 OK)
nextCursor ist nur da, wenn es eine weitere Seite gibt. Jede Aufgabe enthält runCount. Alle Felder stehen in der Scheduled Tasks API Übersicht.
{
automations: Array<{
id: string;
createdAt: string;
name: string;
prompt: string;
modelId: string | null;
modelMode: "UNSET" | "EXPLICIT" | "AUTO";
assistantId: string | null;
taggedAssistantId: string | null;
frequency:
| "MANUAL"
| "DAILY"
| "WEEKDAYS"
| "WEEKLY"
| "MONTHLY"
| "SELECTED_WEEKDAYS";
timeOfDay: string | null;
dayOfWeek: number | null;
dayOfMonth: number | null;
daysOfWeek: number[];
timezone: string | null;
active: boolean;
lastRunAt: string | null;
runCount: number;
attachments: Array<{
id: string;
name: string;
mimeType: string | null;
type: string | null;
}>;
taggedIntegrationIds: string[];
taggedKnowledgeFolderIds: string[];
taggedWorkflowIds: string[];
taggedSkillSlugs: string[];
}>;
nextCursor?: string;
}
Fehlerbehandlung
| Statuscode | Beschreibung |
|---|---|
| 400 | Ungültiges limit oder cursor |
| 401 | Ungültiger oder fehlender API-Key, oder der Key-User wurde nicht gefunden |
| 403 | AUTOMATION_API fehlt, persönlicher API-Key, Scheduled Tasks deaktiviert, oder der Key hat keinen Zugriff |
| 405 | Methode nicht erlaubt |
| 429 | Rate Limit überschritten |
| 500 | Interner Serverfehler |
Langdock blockiert Anfragen aus Browser-Origins absichtlich, um deinen API-Key zu schützen und deine Anwendungen sicher zu halten. Mehr dazu findest du im Guide zu API Key Best Practices.
Autorisierungen
API key as Bearer token. Format "Bearer YOUR_API_KEY"
Abfrageparameter
Number of scheduled tasks to return.
Erforderlicher Bereich:
1 <= x <= 250Task UUID from nextCursor in the previous response.
Antwort
Scheduled tasks returned successfully. nextCursor is present only when another page exists. Each task includes runCount.
War diese Seite hilfreich?