Get Task by Name
curl --request GET \
--url https://api.example.com/tasks/name/{task_name}import requests
url = "https://api.example.com/tasks/name/{task_name}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/tasks/name/{task_name}', 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.example.com/tasks/name/{task_name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/tasks/name/{task_name}"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/tasks/name/{task_name}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/tasks/name/{task_name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"status_reason": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"cleaned_at": "2023-11-07T05:31:56Z",
"params": {},
"task_metadata": {},
"agents": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"status": "Unknown",
"status_reason": "<string>",
"registration_metadata": {},
"registered_at": "2023-11-07T05:31:56Z",
"production_deployment_id": "<string>"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Tasks
Get Task by Name
Get a task by its unique name.
GET
/
tasks
/
name
/
{task_name}
Get Task by Name
curl --request GET \
--url https://api.example.com/tasks/name/{task_name}import requests
url = "https://api.example.com/tasks/name/{task_name}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/tasks/name/{task_name}', 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.example.com/tasks/name/{task_name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/tasks/name/{task_name}"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/tasks/name/{task_name}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/tasks/name/{task_name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"status_reason": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"cleaned_at": "2023-11-07T05:31:56Z",
"params": {},
"task_metadata": {},
"agents": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"status": "Unknown",
"status_reason": "<string>",
"registration_metadata": {},
"registered_at": "2023-11-07T05:31:56Z",
"production_deployment_id": "<string>"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Path Parameters
Query Parameters
Task relationships that can be loaded
Available options:
agents Response
Successful Response
Task response model with optional related data based on relationships
Available options:
CANCELED, COMPLETED, FAILED, RUNNING, TERMINATED, TIMED_OUT, DELETED Show child attributes
Show child attributes
⌘I

