Demander l'annulation
curl --request POST \
--url https://api.retriever.run/v1/runs/{id}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.retriever.run/v1/runs/{id}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.retriever.run/v1/runs/{id}/cancel', 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.retriever.run/v1/runs/{id}/cancel",
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.retriever.run/v1/runs/{id}/cancel"
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.retriever.run/v1/runs/{id}/cancel")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.retriever.run/v1/runs/{id}/cancel")
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{
"id": "run_001",
"workspace_id": "ws_001",
"conversation_id": "conv_001",
"status": "completed",
"message": "J'ai créé la table Fintechs FR avec 30 entreprises.",
"artifacts": [
{
"type": "table",
"id": "tbl_001",
"name": "Fintechs FR",
"effect": "created",
"links": {
"self": "/v1/tables/tbl_001",
"rows": "/v1/tables/tbl_001/rows"
}
}
],
"output": null,
"error": null,
"cancellation_requested": false,
"links": {
"self": "/v1/runs/run_001",
"app": "https://app.retriever.so/app/workspaces/ws_001/conversations/conv_001"
}
}{
"error": {
"code": "not_authenticated",
"message": "A valid API key is required."
}
}{
"error": {
"code": "run_not_found",
"message": "Run not found."
}
}{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded. Retry later."
}
}Runs
Demander l'annulation
Marque cancellation_requested: true. Le worker s’arrête au prochain
battement. Les modifications déjà faites dans les tables restent.
POST
/
v1
/
runs
/
{id}
/
cancel
Demander l'annulation
curl --request POST \
--url https://api.retriever.run/v1/runs/{id}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.retriever.run/v1/runs/{id}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.retriever.run/v1/runs/{id}/cancel', 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.retriever.run/v1/runs/{id}/cancel",
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.retriever.run/v1/runs/{id}/cancel"
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.retriever.run/v1/runs/{id}/cancel")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.retriever.run/v1/runs/{id}/cancel")
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{
"id": "run_001",
"workspace_id": "ws_001",
"conversation_id": "conv_001",
"status": "completed",
"message": "J'ai créé la table Fintechs FR avec 30 entreprises.",
"artifacts": [
{
"type": "table",
"id": "tbl_001",
"name": "Fintechs FR",
"effect": "created",
"links": {
"self": "/v1/tables/tbl_001",
"rows": "/v1/tables/tbl_001/rows"
}
}
],
"output": null,
"error": null,
"cancellation_requested": false,
"links": {
"self": "/v1/runs/run_001",
"app": "https://app.retriever.so/app/workspaces/ws_001/conversations/conv_001"
}
}{
"error": {
"code": "not_authenticated",
"message": "A valid API key is required."
}
}{
"error": {
"code": "run_not_found",
"message": "Run not found."
}
}{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded. Retry later."
}
}Authorizations
Clé API ret_live_… créée dans Settings → API keys.
Path Parameters
Response
Run mis à jour.
Available options:
queued, running, recovering, completed, failed, cancelled Texte final de l'agent.
Tables créées ou modifiées par le run (état vivant).
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes