full diff

space.highport.manage.getConsumption

From
bafyreidxxlrwux2uc7ebhwdfsuyxriymddzq2iowbujfckt4tstxwsjsdi indexed 2026-09-07 12:02 UTC View this version
To
bafyreiek47vcmqetss5kzlw5rlvf72rrx56zqbi4ljvyyzn5cgiaqvd6fy indexed 2026-09-17 17:49 UTC View this version

Compatibility

backward compatible No changes detected.

Changes

11{
22 "$type": "com.atproto.lexicon.schema",
33 "defs": {
44 "main": {
5 "description": "The calling identity's allowance for a period: what it was granted, what it has spent, what remains, which entitlements contributed, and which domains it has approved to draw on it. One wallet, spent by the identity's own sites and by its browsing of sender-pays sites alike.",
5 "description": "The caller's bandwidth allowance for a period: granted, used, remaining, which entitlements contributed, and which domains may draw on it. One allowance covers both the caller's own sites and its visits to sender-pays sites.",
66 "errors": [
77 {
8 "description": "The period is not a UTC calendar month formatted YYYY-MM.",
8 "description": "period is not a UTC month formatted as YYYY-MM.",
99 "name": "InvalidRequest"
1010 }
1111 ],
1212 "output": {
1313 "encoding": "application/json",
1414 "schema": {
1515 "properties": {
1616 "approvals": {
17 "description": "Domains this identity agreed to spend its allowance on, with the cap it chose.",
17 "description": "Domains the caller agreed to let spend its allowance, with the cap it chose for each.",
1818 "items": {
19 "description": "One identity's standing consent to spend its allowance on one domain.",
19 "description": "Standing consent to spend the allowance on one domain.",
2020 "properties": {
2121 "approvedAt": {
2222 "description": "When the identity agreed.",
2323 "format": "datetime",
2424 "type": "string"
2525 },
2626 "capBytes": {
27 "description": "The ceiling the identity chose for this domain. Absent means no ceiling of its own.",
27 "description": "The cap the caller chose for this domain. Absent means no cap.",
2828 "type": "integer"
2929 },
3030 "domain": {
3131 "description": "The domain approved.",
3232 "type": "string"
3333 }
3434 },
3535 "required": [
3636 "domain",
3737 "approvedAt"
3838 ],
3939 "type": "object"
4040 },
4141 "type": "array"
4242 },
4343 "consumption": {
4444 "description": "One identity's allowance for one period.",
4545 "properties": {
4646 "byDomain": {
4747 "description": "Spend by domain.",
4848 "items": {
49 "description": "Where an identity's allowance went.",
49 "description": "Where the allowance was spent.",
5050 "properties": {
5151 "asVisitor": {
52 "description": "Whether this was somebody else's sender-pays site rather than the caller's own.",
52 "description": "True when this was someone else's sender-pays site, not one of the caller's own.",
5353 "type": "boolean"
5454 },
5555 "bytesBilled": {
5656 "description": "Billed bytes.",
5757 "type": "integer"
5858 },
5959 "domain": {
6060 "description": "The domain.",
6161 "type": "string"
6262 }
6363 },
6464 "required": [
6565 "domain",
6666 "bytesBilled"
6767 ],
6868 "type": "object"
6969 },
7070 "type": "array"
7171 },
7272 "entitledBytes": {
73 "description": "What entitlements contributed.",
73 "description": "Bytes from entitlements.",
7474 "type": "integer"
7575 },
7676 "entitlements": {
7777 "items": {
78 "description": "One grant contributing to the allowance. The payment processor's reference is deliberately not exposed.",
78 "description": "One grant that adds to the allowance. The payment processor's reference is not exposed.",
7979 "properties": {
8080 "bytesPerPeriod": {
8181 "description": "Bytes this entitlement adds per period.",
8282 "type": "integer"
8383 },
8484 "endsAt": {
85 "description": "When it ends. Absent for an open-ended grant.",
85 "description": "When it ends. Absent if it has no end date.",
8686 "format": "datetime",
8787 "type": "string"
8888 },
8989 "startsAt": {
9090 "description": "When it started.",
9191 "format": "datetime",
9292 "type": "string"
9393 }
9494 },
9595 "required": [
9696 "bytesPerPeriod",
9797 "startsAt"
9898 ],
9999 "type": "object"
100100 },
101101 "type": "array"
102102 },
103103 "freeBytes": {
104 "description": "The free grant's contribution.",
104 "description": "Bytes from the free grant.",
105105 "type": "integer"
106106 },
107107 "freePerDomainBytes": {
108 "description": "The ceiling on what the free grant may spend at any one domain in this period. Purchased quota is not capped this way, and zero means the free grant may not be spent on a third party's site at all. It is the limit that refuses a reader at one domain while their allowance still shows headroom.",
108 "description": "The most the free grant can spend at any one domain this period. Purchased quota has no such cap. Zero means the free grant cannot be spent on other people's sites. This is why a reader can be refused at one domain while their allowance still has room.",
109109 "type": "integer"
110110 },
111111 "grantedBytes": {
112112 "description": "The free grant plus every active entitlement.",
113113 "type": "integer"
114114 },
115115 "headerEstimateBytes": {
116 "description": "The flat per-response constant included in usedBytes. Every byte figure here is an estimate by this much per response, because the edge's access log records the response body only.",
116 "description": "The fixed per-response header estimate included in usedBytes. The edge logs only response bodies, so every byte figure here is estimated by this much per response.",
117117 "type": "integer"
118118 },
119119 "period": {
120 "description": "The UTC calendar month, YYYY-MM.",
120 "description": "The UTC month, as YYYY-MM.",
121121 "type": "string"
122122 },
123123 "periodEndsAt": {
124124 "description": "When the allowance resets.",
125125 "format": "datetime",
126126 "type": "string"
127127 },
128128 "reconciledAt": {
129 "description": "When the rollup last confirmed usedBytes against the recorded requests. Absent for a period still in progress.",
129 "description": "When usedBytes was last reconciled against recorded requests. Absent for a period still in progress.",
130130 "format": "datetime",
131131 "type": "string"
132132 },
133133 "remainingBytes": {
134 "description": "What is left, floored at zero.",
134 "description": "What is left, never below zero.",
135135 "type": "integer"
136136 },
137137 "usedBytes": {
138138 "description": "Billable bytes spent so far.",
139139 "type": "integer"
140140 }
141141 },
142142 "required": [
143143 "period",
144144 "periodEndsAt",
145145 "grantedBytes",
146146 "usedBytes",
147147 "remainingBytes",
148148 "freeBytes",
149149 "entitledBytes",
150150 "headerEstimateBytes"
151151 ],
152152 "type": "object"
153153 }
154154 },
155155 "required": [
156156 "consumption"
157157 ],
158158 "type": "object"
159159 }
160160 },
161161 "parameters": {
162162 "properties": {
163163 "period": {
164 "description": "A UTC calendar month as YYYY-MM. Defaults to the current one.",
164 "description": "A UTC month as YYYY-MM. Defaults to the current month.",
165165 "type": "string"
166166 }
167167 },
168168 "type": "params"
169169 },
170170 "type": "query"
171171 }
172172 },
173173 "id": "space.highport.manage.getConsumption",
174174 "lexicon": 1
175175}

Compare other versions