List Work Orders
curl --request GET \
--url https://agentgate.mynewapi.com/api/v1/work-orders \
--header 'Authorization: Bearer <token>'import requests
url = "https://agentgate.mynewapi.com/api/v1/work-orders"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://agentgate.mynewapi.com/api/v1/work-orders', 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://agentgate.mynewapi.com/api/v1/work-orders",
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://agentgate.mynewapi.com/api/v1/work-orders"
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://agentgate.mynewapi.com/api/v1/work-orders")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://agentgate.mynewapi.com/api/v1/work-orders")
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{
"success": true,
"data": {
"items": [
{
"id": "<string>",
"taskPrompt": "<string>",
"status": "<string>",
"workspaceSource": {
"type": "<string>",
"path": "<string>",
"repo": "<string>",
"branch": "<string>"
},
"agentType": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"runCount": 123
}
],
"total": 123,
"limit": 123,
"offset": 123,
"hasMore": true
}
}Work Orders
List Work Orders
Retrieve a paginated list of work orders with optional filtering
GET
/
api
/
v1
/
work-orders
List Work Orders
curl --request GET \
--url https://agentgate.mynewapi.com/api/v1/work-orders \
--header 'Authorization: Bearer <token>'import requests
url = "https://agentgate.mynewapi.com/api/v1/work-orders"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://agentgate.mynewapi.com/api/v1/work-orders', 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://agentgate.mynewapi.com/api/v1/work-orders",
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://agentgate.mynewapi.com/api/v1/work-orders"
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://agentgate.mynewapi.com/api/v1/work-orders")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://agentgate.mynewapi.com/api/v1/work-orders")
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{
"success": true,
"data": {
"items": [
{
"id": "<string>",
"taskPrompt": "<string>",
"status": "<string>",
"workspaceSource": {
"type": "<string>",
"path": "<string>",
"repo": "<string>",
"branch": "<string>"
},
"agentType": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"runCount": 123
}
],
"total": 123,
"limit": 123,
"offset": 123,
"hasMore": true
}
}List Work Orders
Returns a paginated list of work orders with optional status filtering.Request
Filter by work order status. One of:
queued, running, waiting_for_children, integrating, succeeded, failed, canceledMaximum number of results to return (1-100)
Number of results to skip for pagination
curl "https://agentgate.mynewapi.com/api/v1/work-orders?status=running&limit=10" \
-H "Authorization: Bearer YOUR_API_KEY"
Response
Indicates if the request was successful
Paginated work order list
Show properties
Show properties
Array of work order summaries
Show properties
Show properties
Work order ID (e.g.,
wo_abc123)Task description
Current status:
queued, running, waiting_for_children, integrating, succeeded, failed, canceledAgent driver type
ISO 8601 timestamp
ISO 8601 timestamp of last update
Number of runs for this work order
Total number of matching work orders
Number of results per page
Current offset
Whether more results are available
Example Response
{
"success": true,
"data": {
"items": [
{
"id": "wo_abc123",
"taskPrompt": "Add input validation to login form",
"status": "running",
"workspaceSource": {
"type": "github",
"repo": "myorg/frontend",
"branch": "main"
},
"agentType": "claude-code-subscription",
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:35:00.000Z",
"runCount": 1
},
{
"id": "wo_def456",
"taskPrompt": "Fix authentication bug",
"status": "running",
"workspaceSource": {
"type": "github",
"repo": "myorg/backend",
"branch": "develop"
},
"agentType": "claude-code-subscription",
"createdAt": "2024-01-15T09:00:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z",
"runCount": 2
}
],
"total": 45,
"limit": 10,
"offset": 0,
"hasMore": true
},
"requestId": "req_xyz789"
}
Status Values
| Status | Description |
|---|---|
queued | Waiting to be processed |
running | Currently being executed |
waiting_for_children | Waiting for sub-tasks to complete |
integrating | Merging results |
succeeded | Completed successfully |
failed | Execution failed |
canceled | Canceled by user |
Pagination Example
# First page
curl "https://agentgate.mynewapi.com/api/v1/work-orders?limit=20&offset=0" \
-H "Authorization: Bearer YOUR_API_KEY"
# Second page
curl "https://agentgate.mynewapi.com/api/v1/work-orders?limit=20&offset=20" \
-H "Authorization: Bearer YOUR_API_KEY"
Filter by Status
# Get only running work orders
curl "https://agentgate.mynewapi.com/api/v1/work-orders?status=running" \
-H "Authorization: Bearer YOUR_API_KEY"
# Get only failed work orders
curl "https://agentgate.mynewapi.com/api/v1/work-orders?status=failed&limit=50" \
-H "Authorization: Bearer YOUR_API_KEY"
⌘I