{
"id": "space.highport.admin.listTopSites",
"defs": {
"main": {
"type": "query",
"errors": [
{
"name": "AnalyticsDisabled",
"description": "This deployment has no analytics store configured, so no traffic was ever recorded. Distinct from an empty list, which means the window held no traffic worth ranking."
}
],
"output": {
"schema": {
"type": "object",
"required": [
"sites"
],
"properties": {
"sites": {
"type": "array",
"items": {
"ref": "#topSite",
"type": "ref"
}
}
}
},
"encoding": "application/json"
},
"parameters": {
"type": "params",
"properties": {
"days": {
"type": "integer",
"default": 7,
"maximum": 30,
"minimum": 1,
"description": "Length of the trailing window, in days, ending now."
},
"limit": {
"type": "integer",
"default": 20,
"maximum": 100,
"minimum": 1,
"description": "Maximum sites to return. Fewer come back when the window holds fewer ranked domains that are safe to show."
},
"minRequests": {
"type": "integer",
"default": 0,
"minimum": 0,
"description": "Floor under the ranked figure, so a near-dead domain cannot rank on a quiet window."
}
}
},
"description": "Domains ranked by successful, non-crawler request count over a trailing window. A popularity signal and nothing more, but one that is safe to publish: a domain that is not serving, that is denylisted directly or by pattern or through its identity, its space, its record or its serving CID, or that carries any malware finding, never appears. Answered from an hourly rollup that trails real time by up to ten minutes, which is invisible at this window's scale."
},
"topSite": {
"type": "object",
"required": [
"domain",
"requests",
"botRequests",
"siteDid"
],
"properties": {
"domain": {
"type": "string",
"description": "The hostname."
},
"siteDid": {
"type": "string",
"format": "did",
"description": "The registration's owner."
},
"requests": {
"type": "integer",
"description": "Responses in the window that were 2xx and not classified as a crawler. This is the figure the ranking is on: a showcase ranks what people read, so bytes do not decide it, an error loop cannot win it, and a scraper cannot either."
},
"recordCid": {
"type": "string",
"format": "cid",
"description": "The record version the serving snapshot was built from, which is how a later run tells a republished site from unchanged bytes. Absent when the domain is serving without an active snapshot."
},
"botRequests": {
"type": "integer",
"description": "Crawler responses in the window, at every status, reported beside the ranked figure rather than folded into it — the same split getSiteTraffic's status mix reports, so a caller can see what was excluded."
}
},
"description": "One domain's standing in the window, and the identity of what is published there."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}