Get a visibility run
curl --request GET \
--url https://api.spreadjam.com/v1/visibility-runs/{runId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.spreadjam.com/v1/visibility-runs/{runId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.spreadjam.com/v1/visibility-runs/{runId}', 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.spreadjam.com/v1/visibility-runs/{runId}",
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://api.spreadjam.com/v1/visibility-runs/{runId}"
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://api.spreadjam.com/v1/visibility-runs/{runId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spreadjam.com/v1/visibility-runs/{runId}")
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{
"id": "<string>",
"trigger": "<string>",
"status": "<string>",
"storedStatus": "<string>",
"reason": {
"code": "<string>",
"message": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"startedAt": "2023-11-07T05:31:56Z",
"finishedAt": "2023-11-07T05:31:56Z",
"storedFinishedAt": "2023-11-07T05:31:56Z",
"errorCode": "<string>",
"answers": {
"total": 123,
"answered": 123,
"failed": 123,
"skipped": 123,
"pending": 123
},
"expectedTotal": 123,
"queuing": true,
"platforms": [
{
"platform": "<string>",
"total": 123,
"answered": 123,
"failed": 123,
"skipped": 123,
"pending": 123,
"failureRate": 123,
"errors": [
{
"code": "<string>",
"count": 123,
"message": "<string>"
}
]
}
],
"collection": {
"total": 123,
"settled": 123,
"completed": 123,
"byPlatform": {}
}
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"docs": "<string>",
"resolveUrl": "<string>",
"details": [
{}
]
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"docs": "<string>",
"resolveUrl": "<string>",
"details": [
{}
]
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"docs": "<string>",
"resolveUrl": "<string>",
"details": [
{}
]
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"docs": "<string>",
"resolveUrl": "<string>",
"details": [
{}
]
}Visibility runs
Get a visibility run
One scan’s progress: answers collected, failed and still pending per platform, and the collector’s task counts. Poll it after POST /v1/visibility-runs until status is final and answers.pending is 0.
GET
/
v1
/
visibility-runs
/
{runId}
Get a visibility run
curl --request GET \
--url https://api.spreadjam.com/v1/visibility-runs/{runId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.spreadjam.com/v1/visibility-runs/{runId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.spreadjam.com/v1/visibility-runs/{runId}', 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.spreadjam.com/v1/visibility-runs/{runId}",
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://api.spreadjam.com/v1/visibility-runs/{runId}"
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://api.spreadjam.com/v1/visibility-runs/{runId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spreadjam.com/v1/visibility-runs/{runId}")
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{
"id": "<string>",
"trigger": "<string>",
"status": "<string>",
"storedStatus": "<string>",
"reason": {
"code": "<string>",
"message": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"startedAt": "2023-11-07T05:31:56Z",
"finishedAt": "2023-11-07T05:31:56Z",
"storedFinishedAt": "2023-11-07T05:31:56Z",
"errorCode": "<string>",
"answers": {
"total": 123,
"answered": 123,
"failed": 123,
"skipped": 123,
"pending": 123
},
"expectedTotal": 123,
"queuing": true,
"platforms": [
{
"platform": "<string>",
"total": 123,
"answered": 123,
"failed": 123,
"skipped": 123,
"pending": 123,
"failureRate": 123,
"errors": [
{
"code": "<string>",
"count": 123,
"message": "<string>"
}
]
}
],
"collection": {
"total": 123,
"settled": 123,
"completed": 123,
"byPlatform": {}
}
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"docs": "<string>",
"resolveUrl": "<string>",
"details": [
{}
]
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"docs": "<string>",
"resolveUrl": "<string>",
"details": [
{}
]
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"docs": "<string>",
"resolveUrl": "<string>",
"details": [
{}
]
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"docs": "<string>",
"resolveUrl": "<string>",
"details": [
{}
]
}Authorizations
Response
The run.
queued, running, retry_scheduled, finishing, success, partial_success, failed, blocked, cancelled or skipped. finishing: every task is queued but answers.pending answers are still being collected; the status becomes final (and finishedAt is set) once none is pending. A finished run that asked nothing itself (an earlier scan today already covered its prompts) is skipped; one that recorded no answer is failed. reason says why.