The declaration model and the three ways a resource enters it.
PII registry API
Declare, update, and query resources in the registry, review what the discovery crawler has found, and read the coverage score. See the PII registry guide for the underlying model.
GET
/pii-registry/resourcesAuthenticatedLists registry resources. Returns metadata only — never raw PII.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
system | query | string | No | Filter by system, e.g. bigquery. |
ownerConnector | query | string | No | Filter by owning connector. |
scanEnabled | query | boolean | No | Filter to resources with ghost-data scanning enabled. |
GET
/pii-registry/resources/:resourceIdAuthenticatedReturns one resource's declaration plus its current policy evaluation.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
resourceId | path | string | Yes | URL-encode this if it contains a colon or slash, e.g. bigquery:project.dataset.table. |
GET
/pii-registry/policyAuthenticatedAggregate policy status across the registry, with per-resource issues.
POST
/pii-registry/resourcesWrite token + x-tenant-id headerDeclares a new resource.
Request
{
"resourceId": "bigquery:acme-corp.analytics.users",
"system": "bigquery",
"resourceLayer": "STAGING",
"userIdColumn": "user_id",
"piiFields": [
{ "name": "email", "classification": "DIRECT_IDENTIFIER", "handling": "ENCRYPT" }
],
"deletionStrategy": "CRYPTO_SHRED"
}- 401 if the write token doesn't match; 503 if writes are disabled (no write token configured server-side — the safe default).
PUT
/pii-registry/resourcesWrite token + x-tenant-id headerUpdates an existing declaration.
DELETE
/pii-registry/resources/:idWrite token + x-tenant-id headerRemoves a declaration.
- Writes a deprecated marker rather than hard-deleting — the audit history for this resource is preserved.
GET
/pii-registry/discoveryAuthenticatedLists undeclared or drifted tables the discovery crawler has found for this tenant.
GET
/pii-registry/coverageAuthenticatedReturns the coverage score: counts of protected, partial, and exposed resources.
Response 200
{
"score": 0.82,
"counts": { "protected": 41, "partial": 6, "exposed": 3, "total": 50 }
}POST
/pii-registry/resources/:resourceId/mark-syncedAuthenticatedAdvances a resource's incremental-sync watermark.
- A transactional compare-and-swap, safe to call from overlapping sync runs without regressing the watermark.
Base URL, auth conventions, and the full endpoint index.