curl --request GET \
--url https://{tenant}.earnie.dev/v1/scans/{scanId}/files \
--header 'Authorization: Bearer <token>'import requests
url = "https://{tenant}.earnie.dev/v1/scans/{scanId}/files"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{tenant}.earnie.dev/v1/scans/{scanId}/files', 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/scans/{scanId}/files",
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://{tenant}.earnie.dev/v1/scans/{scanId}/files"
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://{tenant}.earnie.dev/v1/scans/{scanId}/files")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.earnie.dev/v1/scans/{scanId}/files")
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[
{
"path": "<string>",
"kind": "dir",
"total_files": 123,
"resolved_files": 123,
"match_type": "match",
"file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scan_outcome": "filtered",
"decision_state": "pending",
"identification_count": 123,
"has_note": true,
"pending_files": 123,
"identified_files": 123,
"ignored_files": 123,
"needs_review_files": 123
}
]{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}List all files in the scan (flat)
Returns every file in the scan as a flat list of TreeEntry file rows (no folder rows, no one-level projection). The client builds the folder tree from the flat paths. Mirrors the snapshot semantics of the tree endpoint.
curl --request GET \
--url https://{tenant}.earnie.dev/v1/scans/{scanId}/files \
--header 'Authorization: Bearer <token>'import requests
url = "https://{tenant}.earnie.dev/v1/scans/{scanId}/files"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{tenant}.earnie.dev/v1/scans/{scanId}/files', 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/scans/{scanId}/files",
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://{tenant}.earnie.dev/v1/scans/{scanId}/files"
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://{tenant}.earnie.dev/v1/scans/{scanId}/files")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.earnie.dev/v1/scans/{scanId}/files")
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[
{
"path": "<string>",
"kind": "dir",
"total_files": 123,
"resolved_files": 123,
"match_type": "match",
"file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scan_outcome": "filtered",
"decision_state": "pending",
"identification_count": 123,
"has_note": true,
"pending_files": 123,
"identified_files": 123,
"ignored_files": 123,
"needs_review_files": 123
}
]{
"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.
Path Parameters
Response
All files in the scan.
Absolute path within the archive. Directories end with / (e.g. "src/lib/"); files do not (e.g.
dir, file 1 for a file row; count of descendant files for a dir row.
Descendants with zero file_components rows.
Present only when kind = "file".
match, snippet, no_match, filtered The active file row's id (file rows only) — key for the detail pane's identification list + restore. Absent for model paths projected from scan evidence.
Per-file scan result (file rows only). Distinct axis from decision_state. "manifest" marks a declared-dependency manifest file (design D-manifest-files) — never fingerprint-matched, excluded from OSS coverage math, but still listed here.
filtered, no_match, matched, manifest Per-file decision (file rows only). pending = no identification rows.
pending, identified, ignored File rows — number of component identifications (0 for pending/ignored).
File rows — true if any identification on this file carries a note.
Dir rows — descendant files with decision_state pending.
Dir rows — descendant files with decision_state identified.
Dir rows — descendant files with decision_state ignored.
Dir rows — matched descendant files still pending (drives the folder pending dot).