curl --request POST \
--url https://api.example.com/api/checkpoints/sweep \
--header 'x-api-key: <api-key>'import requests
url = "https://api.example.com/api/checkpoints/sweep"
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.example.com/api/checkpoints/sweep', 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/api/checkpoints/sweep",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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/api/checkpoints/sweep"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.example.com/api/checkpoints/sweep")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/checkpoints/sweep")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"finished_minutes": 123,
"finished_swept": [
"<string>"
],
"provider": "<string>",
"spared": [
"<string>"
],
"swept_count": 123,
"waiting_minutes": 123,
"waiting_swept": [
"<string>"
],
"skipped": "<string>"
}
}{
"error": "<string>",
"code": "<string>"
}{
"error": "reloading — the server is applying a config reload; retry shortly",
"reloading": true
}Sweep expired checkpoint threads
Delete the checkpoint threads of the deployment’s store that are past their retention horizon.
A finished thread (marked by its owner) goes at the due time stored with its mark; on
postgres/sqlite any thread goes its waiting retention (declared by its owner, else
checkpoint_retention_waiting_minutes) after its newest checkpoint (redis expires it by key
TTL and memory keeps it for the process — both reported in skipped). A thread a
registered live-thread filter claims is spared and listed. waiting_minutes and
finished_minutes in the result are the platform’s values: the default and ceiling of every
thread’s retention.
curl --request POST \
--url https://api.example.com/api/checkpoints/sweep \
--header 'x-api-key: <api-key>'import requests
url = "https://api.example.com/api/checkpoints/sweep"
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.example.com/api/checkpoints/sweep', 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/api/checkpoints/sweep",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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/api/checkpoints/sweep"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.example.com/api/checkpoints/sweep")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/checkpoints/sweep")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"finished_minutes": 123,
"finished_swept": [
"<string>"
],
"provider": "<string>",
"spared": [
"<string>"
],
"swept_count": 123,
"waiting_minutes": 123,
"waiting_swept": [
"<string>"
],
"skipped": "<string>"
}
}{
"error": "<string>",
"code": "<string>"
}{
"error": "reloading — the server is applying a config reload; retry shortly",
"reloading": true
}Authorizations
Response
Success.
The checkpoint-sweep report.
finished_swept / waiting_swept list the threads deleted past each horizon;
spared lists the threads past a horizon a live-thread filter reported live.
skipped is set only when the provider has no waiting-horizon sweep (its threads
expire by key TTL, or live as long as the process). waiting_minutes /
finished_minutes are the platform's two retention values: the default and the
ceiling of every thread's retention, which a thread's owner may declare shorter.
Show child attributes
Show child attributes

