Skip to content

Latest commit

 

History

History
81 lines (58 loc) · 1.5 KB

File metadata and controls

81 lines (58 loc) · 1.5 KB

Public domain metadata API

Published domains expose read-only deployment metadata.

Base path:

https://YOUR_DOMAIN/api/truthgate/v1

Call these endpoints on the published domain. The Host header identifies the domain configuration.

Current domain CID

GET /api/truthgate/v1/GetDomainCid

Example:

{
  "domain": "example.com",
  "cidV0": "QmExample...",
  "cidV1": "bafyExample..."
}

Use this endpoint for:

  • deployment verification;
  • gateway URLs;
  • monitoring;
  • CID-aware clients.

Current IPNS and TGP state

GET /api/truthgate/v1/GetDomainIpns

Example:

{
  "domain": "example.com",
  "ipnsPeerId": "k51...",
  "tgpCid": "bafy...",
  "currentCid": "bafy...",
  "lastPublishedCid": "bafy..."
}

Field meaning:

  • ipnsPeerId — the configured IPNS identity;
  • tgpCid — the CID of the current TGP root;
  • currentCid — the active target from tgp.json;
  • lastPublishedCid — the latest site root recorded by TruthGate.

Examples

curl -s \
  https://example.com/api/truthgate/v1/GetDomainCid \
  | jq
curl -s \
  https://example.com/api/truthgate/v1/GetDomainIpns \
  | jq

Security model

These endpoints are anonymous and intentionally reveal public deployment pointers. They do not return private keys, account data, or API credentials.

Caching

Metadata may be cached briefly. Monitoring should tolerate a short delay after publication and compare both the immutable site CID and mutable IPNS/TGP state.