Skip to main content
GET
/
api
/
v1
/
connected-orgs
/
{connected_org_id}
/
stats
Get Connected Org Stats
curl --request GET \
  --url https://api.example.com/api/v1/connected-orgs/{connected_org_id}/stats \
  --header 'X-API-Key: <api-key>'
{
  "artifact_type_breakdown": {},
  "consumed_artifact_count": 123,
  "dependency_type_breakdown": {},
  "health": {
    "consumers_lagging": 123,
    "consumers_on_latest": 123,
    "unresolved_declarations": 123
  },
  "last_scan": {
    "completed_at": "2023-11-07T05:31:56Z",
    "errors": 123,
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "repos_scanned": 123,
    "status": "<string>"
  },
  "orphan_artifact_count": 123,
  "total_artifact_rows": 123,
  "total_dependencies": 123,
  "total_repositories": 123
}

Authorizations

X-API-Key
string
header
required

Headers

X-Workspace-Id
string | null

Path Parameters

connected_org_id
string<uuid>
required

Cookies

riftmap_access
string | null

Response

Successful Response

Per-connected-org stats payload (scoped to one connected org).

Artifact-count semantics (every count is a raw artifact-row count — no canonical-name dedup — so all surfaces agree). Consumption is computed by the single source of truth src/graph/artifact_stats.py (the type-matched union), so an artifact's orphan status here always matches its is_orphan on GET /connected-orgs/{id}/artifacts:

  • total_artifact_rows — every artifact row the org produces (matches the X-Total-Count header of GET /connected-orgs/{id}/artifacts).
  • orphan_artifact_count — rows with zero consumers (consumer_count == 0). Equals the count of is_orphan==true rows on the artifacts endpoint and the Artifacts page "Hide orphans (N)" toggle.
  • consumed_artifact_count — rows with at least one consumer (== total_artifact_rows - orphan_artifact_count).
  • artifact_type_breakdown — count of all artifact rows grouped by artifact_type (includes every type present; never drops one). Invariant: sum(artifact_type_breakdown.values()) == total_artifact_rows.
artifact_type_breakdown
Artifact Type Breakdown · object
required
consumed_artifact_count
integer
required
dependency_type_breakdown
Dependency Type Breakdown · object
required
health
HealthSummary · object
required

Aggregate health indicators.

last_scan
LastScanSummary · object
required

Summary of the most recent scan.

orphan_artifact_count
integer
required
total_artifact_rows
integer
required
total_dependencies
integer
required
total_repositories
integer
required