curl --request POST \
--url https://{tenant}.earnie.dev/v1/findings/actions/bulk-resolve-preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"domain_slug": "<string>",
"reason_slug": "<string>",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"path_prefix": "<string>",
"purl": "<string>"
}
'import requests
url = "https://{tenant}.earnie.dev/v1/findings/actions/bulk-resolve-preview"
payload = {
"domain_slug": "<string>",
"reason_slug": "<string>",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"path_prefix": "<string>",
"purl": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
domain_slug: '<string>',
reason_slug: '<string>',
project_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
path_prefix: '<string>',
purl: '<string>'
})
};
fetch('https://{tenant}.earnie.dev/v1/findings/actions/bulk-resolve-preview', 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://{tenant}.earnie.dev/v1/findings/actions/bulk-resolve-preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'domain_slug' => '<string>',
'reason_slug' => '<string>',
'project_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'path_prefix' => '<string>',
'purl' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{tenant}.earnie.dev/v1/findings/actions/bulk-resolve-preview"
payload := strings.NewReader("{\n \"domain_slug\": \"<string>\",\n \"reason_slug\": \"<string>\",\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"path_prefix\": \"<string>\",\n \"purl\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{tenant}.earnie.dev/v1/findings/actions/bulk-resolve-preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"domain_slug\": \"<string>\",\n \"reason_slug\": \"<string>\",\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"path_prefix\": \"<string>\",\n \"purl\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.earnie.dev/v1/findings/actions/bulk-resolve-preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"domain_slug\": \"<string>\",\n \"reason_slug\": \"<string>\",\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"path_prefix\": \"<string>\",\n \"purl\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"matching": 123
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}Count the open findings a bulk-resolve would affect
Read-only preview of a bulk-resolve: returns how many currently open, unsuppressed findings match the given selection — without resolving anything. project_id scopes the count to one project; when absent the count spans every project in the organization. The selection semantics (reason-derived domain family, suppressed exclusion, purl/path matching) are shared with bulk-resolve so the preview can never diverge from what a confirm would do.
curl --request POST \
--url https://{tenant}.earnie.dev/v1/findings/actions/bulk-resolve-preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"domain_slug": "<string>",
"reason_slug": "<string>",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"path_prefix": "<string>",
"purl": "<string>"
}
'import requests
url = "https://{tenant}.earnie.dev/v1/findings/actions/bulk-resolve-preview"
payload = {
"domain_slug": "<string>",
"reason_slug": "<string>",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"path_prefix": "<string>",
"purl": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
domain_slug: '<string>',
reason_slug: '<string>',
project_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
path_prefix: '<string>',
purl: '<string>'
})
};
fetch('https://{tenant}.earnie.dev/v1/findings/actions/bulk-resolve-preview', 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://{tenant}.earnie.dev/v1/findings/actions/bulk-resolve-preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'domain_slug' => '<string>',
'reason_slug' => '<string>',
'project_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'path_prefix' => '<string>',
'purl' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{tenant}.earnie.dev/v1/findings/actions/bulk-resolve-preview"
payload := strings.NewReader("{\n \"domain_slug\": \"<string>\",\n \"reason_slug\": \"<string>\",\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"path_prefix\": \"<string>\",\n \"purl\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{tenant}.earnie.dev/v1/findings/actions/bulk-resolve-preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"domain_slug\": \"<string>\",\n \"reason_slug\": \"<string>\",\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"path_prefix\": \"<string>\",\n \"purl\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.earnie.dev/v1/findings/actions/bulk-resolve-preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"domain_slug\": \"<string>\",\n \"reason_slug\": \"<string>\",\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"path_prefix\": \"<string>\",\n \"purl\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"matching": 123
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}Authorizations
An Earnie API key, sent as Authorization: Bearer sk_earnie_.... Create one under Settings > API keys. The key's scopes decide which operations it may call.
Body
Selection for a bulk-resolve preview: counts the currently open, unsuppressed findings the equivalent bulk-resolve would newly resolve, without changing anything.
Producer domain_slug to filter findings (e.g. "oss").
Resolve reason slug the eventual bulk-resolve would use (e.g. mark_original, replace_component). Determines the finding-domain family the selection targets.
Project scope. Absent or null = organization-wide (all projects).
Optional folder path prefix scope filter.
Optional component PURL scope filter. A version-less purl (e.g. "pkg:npm/lodash") matches every versioned finding of that base purl — the same matching the scan-time Component override applies.
Response
Preview count
Result of a bulk-resolve preview. Read-only — nothing changes.
Count of currently open, unsuppressed findings the equivalent bulk-resolve would newly resolve.