Skip to main content
GET
The organization's crypto posture across a scope of projects

Authorizations

Authorization
string
header
required

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.

Query Parameters

projects
string

Comma-separated project ids to narrow the scope to. Omitted means every non-archived project in the organization. A value that is not a uuid is a 400; an id the caller cannot see is dropped.

batch
string<uuid>

A bulk import batch id. Narrows the scope to the projects that batch has created so far, resolved on the server so the request stays one id long however large the import. Cannot be combined with projects. A batch that does not exist in the caller's organization is a 404; a batch that has created no project yet answers an empty scope, never the whole organization.

include_archived
boolean
default:false

Response

The scope's crypto posture. Always 200 for an authorized caller — an unmeasured estate, an unentitled organization and a failed findings read all return this shape with crypto absent, never an error and never zeros.

Two halves answering two different questions. The scope counts — projects_in_scope, projects_scanned, projects_not_scanned — say how much of the estate the numbers cover and are ALWAYS present. crypto carries the numbers, and is ABSENT when no project in scope has been measured.

Coverage is reported as its own field rather than left to subtraction, because a reader who has to compute it will not. "1,240 quantum-vulnerable assets" stated over a fifth of the estate is a different sentence from the same number stated over all of it, and an estate surface that cannot say which one it is saying is worse than no surface. Two invariants hold: projects_scanned + projects_not_scanned == projects_in_scope, and when crypto is present, projects_scanned == len(crypto.projects).

A project is MEASURED when it has EVER completed a crypto scan stage on a completed scan, OR it still holds active crypto findings. Both halves are load-bearing: the stage alone loses a project whose findings outlived the scan that found them, and the findings alone report a project the scanner cleared as never scanned. An unmeasured project is counted in projects_not_scanned, is absent from crypto.projects, and contributes to NO total on this payload. It is never folded in as a zero — that coercion turns "unknown" into "verified safe", which on a governance surface is the single error this response exists to prevent.

THAT RULE IS DELIBERATELY WIDER THAN THE PROJECT CARD'S, and the two are not interchangeable. ProjectCryptoSummary.crypto is present when the POSTURE SOURCE SCAN ran crypto to completion, or the project holds active crypto findings. This endpoint asks instead whether ANY completed scan of the project ever completed a crypto stage, which is a strict superset. The divergence has exactly one shape: scan A completes with a completed crypto stage and zero findings; scan B completes later, without crypto, and becomes the posture source. That project's own page reads "Crypto not scanned", while here it is counted in projects_scanned, listed in crypto.projects with zeros, and counted in export_readiness.ready_projects.

The wider rule is the right one at this altitude: a project the scanner ran and cleared IS measured, and the estate is where calling it unmeasured most distorts the coverage answer. The crypto NUMBERS still agree with the project card — such a project contributes zeros to every count — so the divergence is in coverage accounting (projects_scanned, export_readiness.ready_projects), never in a crypto total. crypto.projects[].last_crypto_scan_at is what lets a reader see it: it dates the older crypto scan the project page no longer reports.

An organization without the crypto scanner receives exactly this response with crypto absent and every project counted in projects_not_scanned — byte-identical to an entitled organization that has never run a crypto scan, and reached through the same code path rather than through an entitlement branch. There is deliberately no 403 and no crypto-specific error code: a distinguishable refusal would advertise entitlement state on a read surface that carries none today.

projects_in_scope
integer
required

Projects this request resolved: the caller's organization, narrowed by projects, by include_archived, and by any project binding on the principal. The denominator every other count here is read against.

projects_scanned
integer
required

In-scope projects that are MEASURED under the union above. Equals len(crypto.projects) whenever crypto is present, and 0 whenever it is absent.

A measured project with zero crypto findings is counted HERE and contributes real zeros to every total. "Scanned and clean" and "never scanned" stay distinguishable at estate altitude, which is exactly where conflating them does the most damage: a clean headline covering projects nobody ever looked at is the report a CISO would act on and should not.

projects_not_scanned
integer
required

In-scope projects that are NOT measured. Its own field rather than projects_in_scope − projects_scanned, because a client that has to derive coverage will render the total without it.

This is also where a failed read lands. When the crypto findings for this scope cannot be read, the response degrades to ABSENCE — crypto omitted, every project counted here — never to zeros and never to an empty estate. That deliberately makes an outage indistinguishable from an unscanned estate ON THE WIRE; the server's WARN log is where an operator learns which one it was. The alternative shapes are both worse: zeros would claim a clean estate the store never confirmed, and a 500 would take down a page whose other cards are fine.

crypto
object

The aggregate itself. OPTIONAL, and its presence is the not-measured discriminator, exactly as ProjectCryptoSummary.crypto is for one project: ABSENT means no project in scope has ever completed a crypto stage and none holds an active crypto finding (or the read failed); PRESENT with all-zero counts means the scanner ran across the measured projects and found nothing.

Clients must never read absence as "clean" nor zeros as "not scanned", and must never render a total from this object without also rendering projects_not_scanned beside it.