GC Ledger
sfp server API reference for GC Ledger: 5 endpoints.
/sfp/api/gc-ledger/eventsRecords component drop observations (detected, moved) from a build's source scan. Each event upserts the ledger entry for the component on the branch.
Resolution states are never client-asserted: restored/handled transitions are derived server-side from published package manifests, and dismissals go through the dismiss endpoint with user identity.
Repeat detections of an unchanged state refresh the entry's lastEventAt without growing its event history. Dismissed entries are not re-opened by repeat detections.
Ingestion also triggers reconciliation of the branch's open entries against the latest published package manifests — builds with no drops still post (with an empty events array) so previously dropped components that were restored, moved, or covered by destructive changes get resolved.
Authorization
access-token In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
curl -X POST "https://example.com/sfp/api/gc-ledger/events" \ -H "Content-Type: application/json" \ -d '{ "repositoryIdentifier": "flxbl-io/sf-core", "branch": "main", "events": [ { "type": "detected", "packageName": "core", "componentType": "ApexClass", "fullName": "LeadScoring" } ] }'/sfp/api/gc-ledgerLists components dropped from packages across a repository, optionally scoped to a branch. Filter by status to see what is pending garbage collection (status=detected) or what has been resolved.
Authorization
access-token In: header
Query Parameters
Branch to scope to; omit for all branches
Value in
- "detected"
- "moved"
- "handled"
- "restored"
- "dismissed"
- "owned-elsewhere"
- "reclaimed"
Filter by package name
Max entries (default 100, max 500)
Response Body
curl -X GET "https://example.com/sfp/api/gc-ledger?repositoryIdentifier=flxbl-io%2Fsf-core"/sfp/api/gc-ledger/dismissManually acknowledges a dropped component so it no longer shows as pending garbage collection. Dismissal is sticky against repeat detections; the entry only re-opens if the component is restored and dropped again.
Authorization
access-token In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
curl -X PATCH "https://example.com/sfp/api/gc-ledger/dismiss" \ -H "Content-Type: application/json" \ -d '{ "repositoryIdentifier": "flxbl-io/sf-core", "branch": "main", "packageName": "core", "componentType": "ApexClass", "fullName": "LeadScoring" }'/sfp/api/gc-ledger/org-checkRecords the verified presence of dropped components in one registered environment's org. When an entry is positively confirmed absent in ALL registered environments tracking the branch, it is removed from the ledger. unknown results never count as absent, and nothing is removed while zero environments are registered.
Authorization
access-token In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
curl -X POST "https://example.com/sfp/api/gc-ledger/org-check" \ -H "Content-Type: application/json" \ -d '{ "repositoryIdentifier": "flxbl-io/sf-core", "branch": "main", "environment": "qa", "results": [ { "packageName": "core", "componentType": "ApexClass", "fullName": "LeadScoring", "presence": "present" } ] }'/sfp/api/gc-ledger/reopenReturns a dismissed entry to detected (pending cleanup). Only dismissed entries can be reopened; the action is recorded with the acting user.
Authorization
access-token In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
curl -X PATCH "https://example.com/sfp/api/gc-ledger/reopen" \ -H "Content-Type: application/json" \ -d '{ "repositoryIdentifier": "flxbl-io/sf-core", "branch": "main", "packageName": "core", "componentType": "ApexClass", "fullName": "LeadScoring" }'