Get a cost estimation
Returns one cost estimation. While an estimation is pending, poll this endpoint until status reaches a terminal value (completed, partial, or failed).
Request
GET /cost-estimations/{id}
Send an API key with the read scope in the X-Api-Key header.
Path parameters
| Parameter | Description |
|---|---|
idstring, required |
Responses
200 OK
| Field | Description |
|---|---|
idstring, required | Estimation UUID. |
organization_idstring, required | Organization UUID. |
user_idstring, required | User UUID. |
namestring | Friendly name for this estimation. |
task_idstring, required | Task identifier. |
statusstring, required | Estimation status. One of pending, running, completed, partial, or failed. |
reposarray of object, required | Input repositories. |
repos[].string | Source type. One of connected, public, or upload. |
repos[].string | Repository URL. |
repos[].string | Branch name. |
repos[].string | Resolved commit SHA. |
repos[].string | Archive ID (for upload sources). |
total_creditsnumber | Total estimated credits across all repos. |
repo_resultsarray of object | Per-repo estimation results. |
repo_results[].string, required | Repository URL. |
repo_results[].string | Branch name. |
repo_results[].string | Commit SHA. |
repo_results[].string, required | Result status. One of completed or failed. |
repo_results[].boolean, required | Whether result was served from cache. |
repo_results[].array of object | Detected applications. |
repo_results[].applications[].string, required | Application name. |
repo_results[].applications[].string, required | Application root path. |
repo_results[].applications[].string | Architecture description. |
repo_results[].number | Estimated credits for this repo. |
repo_results[].string | Error message (when status is failed). |
repo_results[].string | Structured failure reason. One of unsupported_language or scope_no_match. |
repo_results[].array of string | Detected unsupported languages among the top languages. |
repo_results[].number | Files that matched the repository’s whitebox scope rules, counted on disk before analysis. Absent for unscoped repositories. |
repo_results[].number | Non-blank lines of code in the files the engine indexes. |
repo_results[].number | Non-whitespace bytes of code used to calculate the quote. |
repo_results[].object | Lines of code and allocated credits per folder. |
repo_results[].loc_tree.string, required | Folder name. |
repo_results[].loc_tree.string, required | Folder path from the repository root; surplus subfolders fold into a row whose path ends in an ellipsis. |
repo_results[].loc_tree.number, required | Non-blank lines of code in the folder, including subfolders. |
repo_results[].loc_tree.number | Non-whitespace bytes of code in the folder, including subfolders. |
repo_results[].loc_tree.number | Credits allocated to the folder; subfolders share them by bytes and the folder’s own files keep the rest, so they can add up to less. |
repo_results[].loc_tree.array of object, required | Subfolders, largest first. Each child has the same fields as loc_tree. |
errorstring | Error message. |
triage_requiredboolean, required | Whether human triage is mandatory for a scan of this estimation (large app, above the predicted-cost threshold). The customer cannot opt out when true. |
triage_fee_creditsnumber, required | Triage fee in credits (a percentage of the scan base credits) added when triage is enabled. |
created_atstring (date-time), required | Timestamp when estimation was created. |
updated_atstring (date-time), required | Timestamp when estimation was last updated. |