Retrieve task
curl --request GET \
--url https://api.komos.ai/public/v1/tasks/{taskId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.komos.ai/public/v1/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://api.komos.ai/public/v1/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://api.komos.ai/public/v1/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://api.komos.ai/public/v1/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://api.komos.ai/public/v1/tasks/{taskId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.komos.ai/public/v1/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{
"task": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"status": "DRAFT",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"inputs": [
{}
],
"outputs": [
{}
],
"runCount": 123,
"lists": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
],
"description": "<string>",
"owner": {
"name": "<string>"
},
"createdBy": {
"name": "<string>"
},
"schedule": {
"isActive": true,
"cadenceType": "<string>",
"cronExpression": "<string>",
"timezone": "<string>",
"nextRunAt": "2023-11-07T05:31:56Z",
"lastRunAt": "2023-11-07T05:31:56Z"
},
"lastRunAt": "2023-11-07T05:31:56Z",
"definition": {},
"planSummary": "<string>"
}
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Tasks
Retrieve Task
Fetch full details for a single task.
GET
/
public
/
v1
/
tasks
/
{taskId}
Retrieve task
curl --request GET \
--url https://api.komos.ai/public/v1/tasks/{taskId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.komos.ai/public/v1/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://api.komos.ai/public/v1/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://api.komos.ai/public/v1/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://api.komos.ai/public/v1/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://api.komos.ai/public/v1/tasks/{taskId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.komos.ai/public/v1/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{
"task": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"status": "DRAFT",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"inputs": [
{}
],
"outputs": [
{}
],
"runCount": 123,
"lists": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
],
"description": "<string>",
"owner": {
"name": "<string>"
},
"createdBy": {
"name": "<string>"
},
"schedule": {
"isActive": true,
"cadenceType": "<string>",
"cronExpression": "<string>",
"timezone": "<string>",
"nextRunAt": "2023-11-07T05:31:56Z",
"lastRunAt": "2023-11-07T05:31:56Z"
},
"lastRunAt": "2023-11-07T05:31:56Z",
"definition": {},
"planSummary": "<string>"
}
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Returns complete details for a single task, including the node graph definition and plan summary
that are omitted from the list endpoint. Use this to inspect the task configuration or validate
inputs before queuing a run.
Request
Path parameters
taskId— UUID of the task to retrieve.
Example
curl -X GET \
https://api.komos.ai/public/v1/tasks/4df7d6f9-56be-4f77-9b18-25ad908a20b7 \
-H 'Authorization: Bearer sk_live_example'
Responses
200 OK— Returns{ "task": Task }with all fields from the list endpoint, plus:definition(object) — The full node graph definition for the task.planSummary(string | null) — AI-generated summary of the execution plan.
400 Bad Request— Invalid task ID format.401 Unauthorized— Missing or malformed API key.404 Not Found— Task not found or not accessible to the authenticated organization.
Was this page helpful?