Repository navigation
Expand file tree
/
Copy pathopenapi.yaml
More file actions
4601 lines (4548 loc) · 178 KB
/
Copy pathopenapi.yaml
File metadata and controls
4601 lines (4548 loc) · 178 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
---
openapi: 3.1.1
info:
title: ar.io Gateway API
# Served specs report the running gateway's release in place of this.
version: '84'
x-logo:
url: 'https://ar.io/brand/ario-full-black.svg'
altText: ar.io
summary: The HTTP API every ar.io gateway serves, for reading, verifying, querying and uploading permanent data.
description: |
ar.io is the open network that makes permanent data fast, verifiable, and
accessible through independent gateways, without ongoing storage fees or
dependence on a single vendor. This is the HTTP API each of those
gateways serves. Data on Arweave is addressed by content, not by host, so
the same request works against any gateway: pick one near you, or let a
client such as Wayfinder choose.
## What a gateway serves
- **Data**: any Arweave transaction or ANS-104 data item by ID
(`/{txId}`, `/raw/{txId}`), with manifest path resolution, byte
ranges, and caching.
- **Names**: ArNS names resolve as subdomains of the gateway
(`https://{name}.{gateway}`), and through `/ar-io/resolver/{name}`.
- **Queries**: a GraphQL endpoint (`/graphql`) over layer 1
transactions and bundled data items, filterable by tags, owners and
block ranges.
- **Uploads**: signed transactions and data chunks, forwarded to the
Arweave network.
- **Arweave node API**: node-compatible routes (`/info`, `/tx/{txId}`,
`/chunk/{offset}`, blocks, wallets, pricing), so existing Arweave
clients work unchanged.
- **Index Sharing**: a gateway can publish index bands at
`/ar-io/indexes`, signed with its registered observer key: root-TX
bands, which locate data items inside their bundles, and L1 bands of
the base layer. Other gateways and clients verify and use them.
- **The gateway itself**: `/ar-io/info` (release, capabilities),
`/ar-io/peers`, health checks and metrics.
## Verifying what you receive
A gateway is one party among many, so its responses say what it knows
about the bytes it served:
- `X-AR-IO-Digest`: the SHA-256 of the data, when the gateway knows it.
- `X-AR-IO-Verified`: `true` when the gateway has verified the data
against its Arweave data root and is serving it from its own cache.
- `X-AR-IO-Trusted`: whether the data came from a source the gateway
trusts.
- `X-AR-IO-Stable`: whether the data's block is past the maximum fork
depth. Absent when the gateway has no local record of the data.
- **HTTP message signatures** (RFC 9421, `Signature` and
`Signature-Input`): when enabled, the gateway signs these headers and,
through `Content-Digest`, the body, so a client can prove which
gateway said what.
For data you need to trust without trusting the gateway, check the
digest yourself or fetch through a verifying client.
## Limits and payments
Gateways may rate-limit data egress. A request over the limit gets
`429 Too Many Requests`, or, on a gateway that accepts x402 payments,
`402 Payment Required` with the price, payable in USDC (then retried
with an `X-PAYMENT` header). Both are the gateway operator's choice; see
[x402 and rate limiting](https://github.com/ar-io/ar-io-node/blob/main/docs/x402-and-rate-limiting.md).
## Errors
Standard HTTP status codes. `404` means the gateway could not find the
data, not that it doesn't exist on Arweave; another gateway may have it.
A `503` may carry `Retry-After`.
## Authentication
Reading, querying and resolving are unauthenticated. Uploads carry their
own authorization: every transaction and data item must be signed by the
wallet paying for it, and the network verifies that signature. Admin
routes (`/ar-io/admin/*`) require the operator's `ADMIN_API_KEY` as a
bearer token.
## Versions
Gateways upgrade independently. `info.version` in a served copy of this
spec (`/openapi.json`) is that gateway's release; `/ar-io/info` reports
it too.
contact:
name: ar.io
url: https://ar.io
license:
name: GNU Affero General Public License v3.0
identifier: AGPL-3.0-only
externalDocs:
description: ar.io documentation, including running a gateway
url: https://docs.ar.io
servers:
- url: /
description: The gateway serving this page. Every ar.io gateway serves the same API.
tags:
- name: Gateway
description: |
Operations related to the AR.IO Gateway server itself, including health checks, metrics, and gateway-specific information
- name: Data
description: |
Core data retrieval operations for accessing transaction and data item content. Supports manifest resolution,
range requests, caching, and verification status. These endpoints serve as the primary interface for retrieving
data from the Permaweb.
- name: Network
description: |
Get Arweave node info, peers and network status
- name: Pricing
description: |
Get the price (in winston) for an amount of bytes
- name: Wallets
description: |
Get Arweave wallet balance and last transaction information
- name: Blocks
description: |
Get current or historical Arweave block information
- name: Transactions
description: |
Submit a new Arweave transaction or get existing transaction information
- name: Chunks
description: |
Upload Arweave data chunks or get existing chunk offset information
- name: ArNS
description: |
Resolve ArNS names (the ar.io Arweave Name System) and serve their data
- name: Index Querying
description: |
Get data from the AR.IO Gateway index using GQL
- name: Farcaster Frames
description: |
Retrieve and interact with Farcaster Frames using Arweave transactions.
- name: Admin
description: |
Access several password protected features and functions specific to your AR.IO Gateway.
- name: Rate Limiting
description: |
Query and manage rate limit bucket balances. Supports both public balance queries and top-ups via x402 payments or admin authentication.
**⚠️ EXPERIMENTAL FEATURES**: The rate limiter and x402 payment protocol are experimental features subject to change. API endpoints, parameters, behavior, and configuration options (environment variables) may evolve in future releases as these systems continue to be developed. See [docs/x402-and-rate-limiting.md](https://github.com/ar-io/ar-io-node/blob/develop/docs/x402-and-rate-limiting.md) for details.
- name: Indexes
description: |
Index Sharing: the signed publication of the root-TX and L1 bands
this gateway offers to other gateways and clients, their files by
name, by SHA-256 and as a WebSeed, their torrents, an RSS feed of each
index's torrents for BitTorrent clients to follow, and the tracker
peers announce to through the gateway's HTTPS. See
[Index Sharing](https://docs.ar.io/learn/gateways/index-sharing).
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: apiToken
description: ADMIN_API_KEY set in your .env file.
parameters:
RootTransactionIdHint:
name: X-AR-IO-Root-Transaction-Id
in: header
required: false
schema:
$ref: '#/components/schemas/Base64Url43'
description: |
Optional retrieval hint identifying the root L1 transaction that contains
the requested ANS-104 data item. The data item ID remains the path
parameter. The gateway validates this hint and falls back to its normal
lookup process when the hint is unusable.
example: '283VjqeZG65tPI6V0e-gucoHCaEBPL41_cI8rXVRbMc'
RootPathHint:
name: X-AR-IO-Root-Path
in: header
required: false
schema:
type: string
pattern: '^[0-9a-zA-Z_-]{43}(\s*,\s*[0-9a-zA-Z_-]{43})*$'
description: |
Optional comma-separated traversal path of transaction IDs from the root
L1 transaction through each parent bundle to the requested ANS-104 data
item's immediate parent. Use this when the item is nested in multiple
bundles. Every value must be a 43-character base64url transaction ID.
example: '283VjqeZG65tPI6V0e-gucoHCaEBPL41_cI8rXVRbMc,hs48Pj6C9TqAk7W7D3T8F5kWg3q5W7K3m9Gf2L4n8Ps'
RootItemOffsetHint:
name: X-AR-IO-Root-Item-Offset
in: header
required: false
schema:
type: integer
minimum: 0
description: |
Optional byte offset of the complete ANS-104 data item, including its
header, from the start of the root transaction's data. This header is
only used when X-AR-IO-Root-Item-Size is also provided, and only for
requests without a Range header. The gateway reads the item header at
this offset and serves the payload only if the item's signature
verifies over it; otherwise the hint is ignored. It is not forwarded to
other gateways.
example: 2048
RootItemSizeHint:
name: X-AR-IO-Root-Item-Size
in: header
required: false
schema:
type: integer
minimum: 1
description: |
Optional size of the complete ANS-104 data item, including its header,
in bytes. This header is only used when X-AR-IO-Root-Item-Offset is also
provided, under the same conditions: no Range header, and the item's
signature must verify over the payload it frames. It is not forwarded to
other gateways.
example: 2092
schemas:
ParquetExportStatus:
type: object
description: Status record for a Parquet export job
properties:
status:
type: string
enum: [not_started, running, completed, errored]
description: Lifecycle state of the export job
jobId:
type: string
description: Server-assigned id for the job
outputDir:
type: string
description: Directory where Parquet files are being saved
startHeight:
type: integer
description: Starting block height of the export
endHeight:
type: integer
description: Ending block height of the export
maxFileRows:
type: integer
description: Maximum number of rows per Parquet file
heightPartitionSize:
type: integer
description: Blocks per Parquet partition
skipL1Transactions:
type: boolean
skipL1Tags:
type: boolean
currentPartitionStart:
type: integer
description: First height of the partition currently being exported
currentPartitionEnd:
type: integer
description: Last height of the partition currently being exported
completedPartitions:
type: integer
description: Number of partitions completed so far
totalPartitions:
type: integer
description: Total number of partitions for the job
durationInSeconds:
type: number
description: Duration of the export process in seconds
endTime:
type: string
format: date-time
description: ISO timestamp when the export completed
endTimestamp:
type: integer
description: Unix timestamp (ms) when the export completed
error:
type: string
description: Error message if the export failed
required:
- status
Base64Url:
type: string
pattern: '^[A-Za-z0-9_-]+$'
Base64Url43:
type: string
pattern: '^[0-9a-zA-Z_-]{43}$'
Base64Url64:
type: string
pattern: '^[0-9a-zA-Z_-]{64}$'
Base64Url4364:
type: string
pattern: '^[0-9a-zA-Z_-]{43}$|^[0-9a-zA-Z_-]{64}$'
WinstonAmount:
type: string
pattern: '^[0-9]{1,21}$'
NumericString:
type: string
pattern: '^[0-9]+$'
IntegerOrNumericString:
description: A value that can be either an integer or a string representation of an integer
anyOf:
- type: integer
- type: string
pattern: '^[0-9]+$'
TagList:
type: array
maxItems: 2048
items:
type: object
properties:
name:
type: string
pattern: '^[0-9a-zA-Z_-]{1,2731}$'
value:
type: string
pattern: '^[0-9a-zA-Z_-]{1,2731}$'
Owner:
type: string
pattern: '^[0-9a-zA-Z_-]{1,683}$'
Signature:
type: string
pattern: '^[0-9a-zA-Z_-]{1,683}$'
L1TransactionHeader:
type: object
description: |
A signed Arweave L1 transaction header (the same JSON shape returned by
`GET /tx/:id`). The signature is verified server-side, so every
consequential field (data_root, owner, target, quantity, reward,
last_tx, tags, data_size) is bound to the signature.
properties:
id:
$ref: '#/components/schemas/Base64Url43'
description: Transaction ID (sha256 of the signature)
owner:
$ref: '#/components/schemas/Owner'
description: Transaction signer's public key
signature:
$ref: '#/components/schemas/Signature'
description: Transaction signature
last_tx:
type: string
description: Anchor (a recent block hash or tx ID)
data_root:
$ref: '#/components/schemas/Base64Url43'
description: Merkle root of the transaction's data
data_size:
type: string
description: Size of the data in bytes (stringified integer)
format:
type: integer
description: Transaction format (2 for current data transactions)
target:
type: string
description: Optional recipient address
quantity:
type: string
description: Optional transfer amount in winston (stringified integer)
reward:
type: string
description: Mining reward in winston (stringified integer)
tags:
$ref: '#/components/schemas/TagList'
description: Optional transaction tags
required:
- id
- owner
- signature
- last_tx
ByteRange:
type: string
pattern: '^bytes=\d*-\d*(?:,\d*-\d*)*$'
description: |
HTTP byte range specifying which parts of the data to retrieve.
Supports single ranges (e.g. "bytes=0-1023") and multiple ranges (e.g. "bytes=0-50,100-150").
example: 'bytes=0-1023'
CacheStatus:
type: string
enum: [HIT, MISS]
description: Indicates whether the data was served from cache
VerificationStatus:
type: string
enum: [true, false]
description: Indicates whether the data has been verified
Block:
type: object
properties:
usd_to_ar_rate:
type: array
minItems: 2
maxItems: 2
items:
$ref: '#/components/schemas/Base64Url'
scheduled_usd_to_ar_rate:
type: array
minItems: 2
maxItems: 2
items:
$ref: '#/components/schemas/Base64Url'
packing_2_5_threshold:
$ref: '#/components/schemas/Base64Url'
strict_data_split_threshold:
$ref: '#/components/schemas/NumericString'
nonce:
$ref: '#/components/schemas/Base64Url'
previous_block:
$ref: '#/components/schemas/Base64Url64'
timestamp:
type: integer
last_retarget:
type: integer
diff:
$ref: '#/components/schemas/IntegerOrNumericString'
height:
type: integer
hash:
$ref: '#/components/schemas/Base64Url4364'
txs:
type: array
minItems: 0
maxItems: 1000
items:
$ref: '#/components/schemas/Base64Url43'
tx_root:
$ref: '#/components/schemas/Base64Url43'
tx_tree:
type: array
maxItems: 0
items:
type: string
wallet_list:
$ref: '#/components/schemas/Base64Url4364'
reward_addr:
$ref: '#/components/schemas/Base64Url43'
tags:
$ref: '#/components/schemas/TagList'
reward_pool:
# TODO add length restriction
$ref: '#/components/schemas/IntegerOrNumericString'
weave_size:
$ref: '#/components/schemas/IntegerOrNumericString'
block_size:
$ref: '#/components/schemas/IntegerOrNumericString'
cumulative_diff:
$ref: '#/components/schemas/NumericString'
hash_list_merkle:
$ref: '#/components/schemas/Base64Url64'
poa:
type: object
properties:
option:
$ref: '#/components/schemas/NumericString'
tx_path:
# TODO specify length
$ref: '#/components/schemas/Base64Url'
data_path:
# TODO specify length
$ref: '#/components/schemas/Base64Url'
chunk:
# TODO specify length
$ref: '#/components/schemas/Base64Url'
required:
- nonce
- previous_block
- timestamp
- last_retarget
- diff
- height
- hash
- indep_hash
- txs
- tx_root
- wallet_list
- reward_addr
- tags
- reward_pool
- weave_size
- block_size
- poa
Chunk:
type: object
properties:
tx_path:
$ref: '#/components/schemas/Base64Url'
packing:
type: string
# TODO add all types
pattern: '^unpacked$'
data_path:
$ref: '#/components/schemas/Base64Url'
chunk:
$ref: '#/components/schemas/Base64Url'
required:
- tx_path
- packing
- data_path
- chunk
Transaction:
type: object
properties:
format:
type: integer
id:
$ref: '#/components/schemas/Base64Url43'
last_tx:
$ref: '#/components/schemas/Base64Url4364'
owner:
$ref: '#/components/schemas/Owner'
tags:
$ref: '#/components/schemas/TagList'
target:
$ref: '#/components/schemas/Base64Url43'
quantity:
$ref: '#/components/schemas/WinstonAmount'
data:
$ref: '#/components/schemas/Base64Url'
data_tree:
type: array
items:
# TODO determine contents of array (is this just for v1?)
type: string
data_root:
$ref: '#/components/schemas/Base64Url'
reward:
$ref: '#/components/schemas/WinstonAmount'
signature:
$ref: '#/components/schemas/Signature'
required:
- format
- id
- last_tx
- owner
- tags
- target
- quantity
- data
- data_tree
- data_root
- reward
- signature
TransactionOffset:
type: object
properties:
size:
$ref: '#/components/schemas/NumericString'
offset:
$ref: '#/components/schemas/NumericString'
required:
- size
- offset
TransactionStatus:
type: object
properties:
block_height:
type: integer
block_indep_hash:
$ref: '#/components/schemas/Base64Url64'
number_of_confirmations:
type: integer
required:
- block_height
- block_indep_hash
- number_of_confirmations
Mempool:
type: array
items:
$ref: '#/components/schemas/Base64Url43'
NetworkInfo:
type: object
properties:
network:
type: string
version:
type: integer
release:
type: integer
current:
$ref: '#/components/schemas/Base64Url64'
blocks:
type: integer
peers:
type: integer
queue_length:
type: integer
node_state_latency:
type: integer
required:
- network
- version
- release
- current
- blocks
- peers
- queue_length
- node_state_latency
PeerList:
type: array
items:
type: string
pattern: '^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}:\d+$'
Height:
type: string
pattern: '^[0-9]{16}$'
ArNSResolution:
type: object
description: Response containing ArNS name resolution details
properties:
txId:
$ref: '#/components/schemas/Base64Url43'
description: The resolved transaction ID
ttlSeconds:
type: integer
description: Time-to-live in seconds for this resolution
antId:
type: string
description: |
Per-ANT identifier for the ANT that resolved this name — the
ANT mint's PDA (base58 pubkey). Omitted when resolution came
via a trusted-gateway peer that has not yet shipped the
X-ArNS-Ant-Id header.
resolvedAt:
type: integer
description: Unix timestamp when the name was resolved
index:
type: integer
description: Index of the name in the sorted list of names
limit:
type: integer
description: The undername limit for the base ArNS name
required:
- txId
- ttlSeconds
- resolvedAt
- index
- limit
requestBodies:
QueueTxRequest:
required: true
content:
application/json:
schema:
type: object
properties:
id:
$ref: '#/components/schemas/Base64Url43'
description: TX ID of the transaction you would like to prioritize.
examples:
example1:
value:
id: '3lyxgbgEvqNSvJrTX2J7CfRychUD5KClFhhVLyTPNCQ'
responses:
MissingId:
description: Bad Request. Id is required.
content:
text/plain:
schema:
type: string
example: "Must provide 'id'"
MissingIdOrBypassFilter:
description: Bad Request. The request is missing required parameters.
content:
text/plain:
schema:
type: string
examples:
missingId:
summary: ID is required
value: "Must provide 'id'"
missingFilter:
summary: bypassFilter must be a boolean
value: "'bypassFilter' must be a boolean"
QueueTxSuccess:
description: Successful operation
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: 'TX queued'
required:
- message
Unauthorized:
description: Unauthorized
content:
text/plain:
schema:
type: string
example: 'Unauthorized'
ServerError:
description: Internal Server Error
content:
text/plain:
schema:
type: string
example: 'Internal Server Error'
paths:
# Gateway
'/':
get:
tags: [Gateway]
summary: Gateway Info or Apex Content
description: |
Returns either gateway information or serves content based on configuration:
- If neither APEX_TX_ID nor APEX_ARNS_NAME is set, returns gateway information
- If APEX_TX_ID is set, serves that transaction's content
- If APEX_ARNS_NAME is set, resolves and serves that ArNS name's content
The Content-Type of the response will match the content type of the transaction or ArNS-resolved data (e.g., text/html for HTML documents, application/json for JSON documents, application/octet-stream for binary data, etc.).
responses:
'200':
description: |-
Either gateway information or transaction/ArNS content
content:
application/json:
schema:
oneOf:
- type: object
description: Gateway information
properties:
wallet:
$ref: '#/components/schemas/Base64Url43'
description: Gateway wallet address
ans104UnbundleFilter:
type: object
description: Configuration for ANS-104 unbundling filter
ans104IndexFilter:
type: object
description: Configuration for ANS-104 indexing filter
supportedManifestVersions:
type: array
description: List of supported manifest versions
items:
type: string
enum: ['0.1.0', '0.2.0']
release:
type: string
description: Gateway software release version
required:
- supportedManifestVersions
- release
application/octet-stream:
schema:
type: string
format: binary
description: Transaction or ArNS content when APEX_TX_ID or APEX_ARNS_NAME is set
'/ar-io/healthcheck':
get:
tags: [Gateway]
summary: Health check endpoint
description: Get the current health status of the AR.IO Gateway.
responses:
'200':
description: Health check response
content:
application/json:
schema:
type: object
properties:
status:
type: string
enum: [ok, unhealthy]
description: Current health status of the gateway
uptime:
type: number
description: Process uptime in seconds
date:
type: string
format: date-time
description: Current server timestamp
reasons:
type: array
items:
type: string
description: Array of reasons if status is unhealthy
required:
- status
- uptime
- date
'/ar-io/offsets/{id}':
get:
tags: [Gateway]
summary: Get root transaction offsets for a data item
description: |
Returns the location of a data item within its root L1 transaction,
from this node's own data: its index first, then CDB64 indexes on its
local disk, such as bands installed by Index Sharing.
This is the cheap counterpart to `HEAD /raw/{id}`, which exposes the
same values in `X-AR-IO-Root-*` headers but only as a side effect of a
successful data retrieval — on a cache miss that route runs the node's
entire retrieval cascade before answering. This endpoint never reads
contiguous data and never makes a network request. A hit costs one
index read; a miss costs that plus a read or two per local CDB64
index.
Offsets resolve for any data item this node has unbundled and indexed,
or that an installed CDB64 index covers, even when none of its bytes
are cached locally. CDB64 indexes are consulted only while `cdb` is
in `ROOT_TX_LOOKUP_ORDER`, as it is by default.
A 200 is cached for `CACHE_DEFAULT_MAX_AGE` seconds, short because a
band can be replaced or withdrawn; a 404 for `CACHE_NOT_FOUND_MAX_AGE`
seconds with `must-revalidate`; a 500 is `no-store`.
A 200 is signed with HTTP Message Signatures (when the gateway signs
responses, the default), with `Content-Digest` binding the body, so
it is this gateway's attributable claim. The offsets are still a
claim, not proof: confirm them by reading the data item header at
`rootOffset` (its ID must match) or with a chunk proof. An answer from
a CDB64 index never includes `contentType` or `dataSize`.
parameters:
- name: id
in: path
required: true
description: The 43-character base64url data item or transaction ID.
schema:
type: string
pattern: '^[a-zA-Z0-9_-]{43}$'
responses:
'200':
description: Offsets resolved from the local index or a local CDB64 index
headers:
Cache-Control:
description: '`public, max-age=<CACHE_DEFAULT_MAX_AGE>`'
schema:
type: string
X-AR-IO-Root-Transaction-Id:
description: The root transaction ID, as in the body. Its presence makes the response signed.
schema:
type: string
Content-Digest:
description: RFC 9530 SHA-256 digest of the response body, covered by the signature.
schema:
type: string
content:
application/json:
schema:
type: object
properties:
rootTxId:
type: string
description: base64url ID of the root L1 transaction containing the data item.
path:
type: array
items:
type: string
description: |
Bundle traversal path from root to the immediate parent
bundle. From the local index, only emitted in the
single-level case, where the parent is the root bundle;
a CDB64 index may give the full path.
rootOffset:
type: integer
description: Byte offset of the data item header within the root transaction's data.
rootDataOffset:
type: integer
description: Byte offset of the data item's payload within the root transaction's data.
contentType:
type: string
description: Content type of the data item, when known. Never set by a CDB64 index.
size:
type: integer
description: Total size of the data item in bytes, including its header.
dataSize:
type: integer
description: Size of the data item's payload in bytes, excluding its header. Never set by a CDB64 index.
required:
- rootTxId
'400':
description: Invalid data ID
content:
text/plain:
schema:
type: string
'404':
description: |
This node cannot place the ID inside a root transaction — the ID is
unknown to its index, or has no indexed root parent, and no local
CDB64 index covers it.
headers:
Cache-Control:
description: '`public, max-age=<CACHE_NOT_FOUND_MAX_AGE>, must-revalidate`'
schema:
type: string
content:
text/plain:
schema:
type: string
'500':
description: Failed to resolve offsets
headers:
Cache-Control:
description: '`no-store`'
schema:
type: string
content:
text/plain:
schema:
type: string
'/ar-io/info':
get:
tags: [Gateway]
summary: Get AR.IO Gateway information
description: |
Returns information about the AR.IO Gateway, including:
- Gateway wallet address
- The AR.IO Network's Solana program IDs
- ANS-104 filter configurations
- Supported manifest versions
- Gateway software release version
- Bundler service URLs for data upload service discovery
- Rate limiter configuration (if enabled)
- x402 payment protocol configuration (if enabled)
- HTTPSIG response signing configuration (if enabled)
- The indexes it publishes, and their feeds (if it publishes any)
responses:
'200':
description: Gateway information response
content:
application/json:
schema:
type: object
properties:
wallet:
type: string
description: The gateway's registered wallet (`AR_IO_WALLET`), a Solana address
example: '34LYvMptiDvBP5sqfh1oAd6Q4qFsy4PWaZ1HTFmML7h5'
programIds:
type: object
description: The AR.IO Network's Solana program IDs this gateway reads protocol state from
properties:
core:
type: string
example: '73YoECm6NKXpVRoe5f1Q9BcP5DJGPFUjnFy6AxBE5Nvh'
gar:
type: string
example: '89fNiiwgpFSPHKuqfNUkgYTYjtAJAhyqHjXmgXeppGpf'
arns:
type: string
example: '2yCUx5edFvUrkibYaUa2ZXWyx9kuJkS8CwyzsgHPWdZZ'
ant:
type: string
example: '2MWexMHfMhGJwMHv9Qm9YAVCqjUFUJwDJAysW4oCUGk5'
ans104UnbundleFilter:
type: object
description: Configuration for ANS-104 unbundling filter
ans104IndexFilter:
type: object
description: Configuration for ANS-104 indexing filter
supportedManifestVersions:
type: array
description: List of supported manifest versions
items:
type: string
enum: ['0.1.0', '0.2.0']
release:
type: string
description: Gateway software release version
services:
type: object
description: Service discovery information
properties:
bundlers:
type: array
description: List of bundler service URLs for data upload service discovery
items:
type: object
properties:
url:
type: string
format: uri
description: Bundler service URL
example: 'https://turbo.ardrive.io/'
required:
- url
required:
- bundlers
rateLimiter:
type: object
description: Rate limiter configuration (only present when rate limiting is enabled)
properties:
enabled:
type: boolean
description: Whether rate limiting is enabled
example: true
dataEgress:
type: object
description: Data egress rate limiting configuration
properties:
buckets:
type: object
description: Token bucket configurations for rate limiting
properties:
resource:
type: object
description: Per-resource (transaction ID) rate limits
properties:
capacity:
type: number
description: Maximum tokens in bucket (1 token = 1 KiB)
example: 1000000
refillRate:
type: number
description: Tokens added per second
example: 100