curl --request POST \
--url https://api.datalinks.com/api/v1/query/runs/{runId}/resume \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.datalinks.com/api/v1/query/runs/{runId}/resume"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.datalinks.com/api/v1/query/runs/{runId}/resume', 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.datalinks.com/api/v1/query/runs/{runId}/resume",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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.datalinks.com/api/v1/query/runs/{runId}/resume"
req, _ := http.NewRequest("POST", 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.post("https://api.datalinks.com/api/v1/query/runs/{runId}/resume")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.datalinks.com/api/v1/query/runs/{runId}/resume")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body"<string>"{
"error_code": "UNAUTHORIZED",
"message": "Missing authentication token",
"error_message": "",
"sub_errors": [
{
"code": "<string>",
"message": "<string>"
}
]
}{
"error_code": "UNAUTHORIZED",
"message": "Missing authentication token",
"error_message": "",
"sub_errors": [
{
"code": "<string>",
"message": "<string>"
}
]
}Resume a previously paused or crashed agent run
Resumes a run from its last checkpoint. The response is an SSE stream whose first
event is run-started, followed by the same domain events as the original streaming
endpoint (e.g. plan, step, answer for AutoRag).
Concurrency: each call rotates the run’s session id. If a second resume request arrives while a first is in flight, the first wrapper exits silently on its next checkpoint write; only the latest resume continues streaming events to its caller.
Only runs whose agent checkpoints its progress can be replayed. The AutoRag agent currently writes no checkpoints, so resume answers 409 for every run still in progress and the run continues to completion on its original connection.
Terminal states are surfaced via HTTP status codes:
- 410 Gone: run is Completed (the final answer is in the body) OR Expired (its resume cache is gone or no longer loadable). The body carries the original question and, for Completed runs, the rendered result.
- 409 Conflict: run has no checkpoint to replay from. It is left untouched — poll
GET /api/v1/query/runs/{runId}for its outcome. - 422 Unprocessable Content: run is in a Failed state
- 404 Not Found: run does not exist or is not owned by the caller
curl --request POST \
--url https://api.datalinks.com/api/v1/query/runs/{runId}/resume \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.datalinks.com/api/v1/query/runs/{runId}/resume"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.datalinks.com/api/v1/query/runs/{runId}/resume', 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.datalinks.com/api/v1/query/runs/{runId}/resume",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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.datalinks.com/api/v1/query/runs/{runId}/resume"
req, _ := http.NewRequest("POST", 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.post("https://api.datalinks.com/api/v1/query/runs/{runId}/resume")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.datalinks.com/api/v1/query/runs/{runId}/resume")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body"<string>"{
"error_code": "UNAUTHORIZED",
"message": "Missing authentication token",
"error_message": "",
"sub_errors": [
{
"code": "<string>",
"message": "<string>"
}
]
}{
"error_code": "UNAUTHORIZED",
"message": "Missing authentication token",
"error_message": "",
"sub_errors": [
{
"code": "<string>",
"message": "<string>"
}
]
}Authorizations
Use a Bearer token for authentication. Submit the token using the Authorization
header: Authorization: Bearer <token>.
Path Parameters
Response
SSE stream of lifecycle and domain events for the resumed run.
The response is of type string.