curl --request GET \
--url https://api.recoupable.dev/api/runs \
--header 'x-api-key: <api-key>'import requests
url = "https://api.recoupable.dev/api/runs"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.recoupable.dev/api/runs', 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.recoupable.dev/api/runs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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.recoupable.dev/api/runs"
req, _ := http.NewRequest("GET", 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.get("https://api.recoupable.dev/api/runs")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.recoupable.dev/api/runs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "success",
"runs": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "valuation",
"state": "queued",
"album_count": 123,
"created_at": "2023-11-07T05:31:56Z",
"result": {
"catalog_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
],
"error": "<string>"
}{
"status": "error",
"error": "<string>"
}{
"status": "error",
"error": "<string>"
}Get Runs
Get background runs, newest first. A run is the generic status resource for long-running work. kind selects the run type (valuation and music today); future kinds are new enum values here, never new endpoints.
curl --request GET \
--url https://api.recoupable.dev/api/runs \
--header 'x-api-key: <api-key>'import requests
url = "https://api.recoupable.dev/api/runs"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.recoupable.dev/api/runs', 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.recoupable.dev/api/runs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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.recoupable.dev/api/runs"
req, _ := http.NewRequest("GET", 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.get("https://api.recoupable.dev/api/runs")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.recoupable.dev/api/runs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "success",
"runs": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "valuation",
"state": "queued",
"album_count": 123,
"created_at": "2023-11-07T05:31:56Z",
"result": {
"catalog_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
],
"error": "<string>"
}{
"status": "error",
"error": "<string>"
}{
"status": "error",
"error": "<string>"
}Authorizations
Your Recoup API key. Learn more.
Query Parameters
Required. The run type to list. Unknown kinds are rejected with 400.
valuation, music Optional. Maximum runs to return, newest first. Defaults to 1 (the latest run).
1 <= x <= 20Response
The calling account's runs of the requested kind, newest first. Empty when the account has never run one.
The calling account's runs of the requested kind, newest first.
Status of the request
success, error Runs, newest first. Empty when the account has never run one of this kind. The item shape follows the requested kind.
One background run. id is opaque; state is a domain phase, not a storage value: queued (capture accepted, not yet scraping), measuring (capture in flight, or finished moments ago and being claimed), claimed (catalog materialized - result.catalog_id is set), failed (the capture finished but no catalog was claimed, or the capture itself failed).
- Valuation run
- Music run
Show child attributes
Show child attributes
Error message (only present if status is 'error')
Was this page helpful?
