You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Specify protocol to find out what cascade options are available to a
client using `OPTIONS` method and a specific HTTP response header. This
enables clients to programmatically determine the alternative routing
systems to which a lookup may optionally be cascaded.
Add extra wording to clarify that there are no constraints on the order
by which results are returned at the presence of `cascade` query option.
Copy file name to clipboardExpand all lines: IPNI.md
+22-9Lines changed: 22 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -459,6 +459,22 @@ to fetch the advertisement chain.
459
459
460
460
An indexer node can be queried over HTTP for a multihash or a CID. This section provides a summary of the HTTP query APIs. A full OpenAPI specification of the APIs can be found [here](schemas/v1/openapi.yaml).
461
461
462
+
463
+
#### Cascading Lookup
464
+
465
+
The HTTP query API supports cascading queries for a given multihash or CID onto alternative routing systems in addition to searching IPNI records.
466
+
A client may optionally specify a query parameter with key set to `cascade`, and value set to comma separated alternative routing systems, which are also searched for records.
467
+
468
+
The specification imposes no constraints on the order by which the results are returned.
469
+
Implementers are free to return results as they are found.
470
+
471
+
The alternative routing systems currently supported is:
472
+
*`ipfs-dht`: equivalent to searching records on the IPFS network.
473
+
474
+
A client may discover the list of alternative routing systems supported by a server via sending `OPTIONS` request.
475
+
In response, the server may include `X-IPNI-Allow-Cascade` header key, with value as the comma separated list of alternative routing systems supported.
476
+
The absence of this header key implies that the server does not offer cascading lookups.
477
+
462
478
#### `GET /cid/{cid}`
463
479
464
480
Given a CID as path parameter, returns a list of its content providers. The lookup ignores CID codec
@@ -471,8 +487,7 @@ and uses the multihash portion of the CID only.
471
487
472
488
##### Query Parameters
473
489
474
-
*`cascade` - _Optional_. The comma separated alternative routing systems to which the lookup is cascaded in addition to searching IPNI index records. If unspecified, only IPNI index records are searched. Supported values:
475
-
*`ipfs-dht`- The IPFS Kademlia DHT.
490
+
*`cascade` - _Optional_. The comma separated alternative routing systems to which the lookup is cascaded in addition to searching IPNI index records. If unspecified, only IPNI index records are searched. See [Cascading Lookup](#cascading-lookup)
476
491
477
492
##### Response
478
493
@@ -495,8 +510,7 @@ Given a multihash as path parameter, returns a list of its content providers.
495
510
496
511
##### Query Parameters
497
512
498
-
*`cascade` - _Optional_. The comma separated alternative routing systems to which the lookup is cascaded in addition to searching IPNI index records. If unspecified, only IPNI index records are searched. Supported values:
499
-
*`ipfs-dht`- The IPFS Kademlia DHT.
513
+
*`cascade` - _Optional_. The comma separated alternative routing systems to which the lookup is cascaded in addition to searching IPNI index records. If unspecified, only IPNI index records are searched. See [Cascading Lookup](#cascading-lookup)
500
514
501
515
502
516
##### Response
@@ -533,8 +547,7 @@ Base58 string representation. See [`FindRequest`][find-request-schema] schema.
533
547
534
548
##### Query Parameters
535
549
536
-
*`cascade` - _Optional_. The comma separated alternative routing systems to which the lookup is cascaded in addition to searching IPNI index records. If unspecified, only IPNI index records are searched. Supported values:
537
-
*`ipfs-dht`- The IPFS Kademlia DHT.
550
+
*`cascade` - _Optional_. The comma separated alternative routing systems to which the lookup is cascaded in addition to searching IPNI index records. If unspecified, only IPNI index records are searched. See [Cascading Lookup](#cascading-lookup)
538
551
539
552
540
553
##### Response
@@ -667,6 +680,6 @@ The following lists the libraries and implementations of IPNI protocol:
667
680
668
681
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).
0 commit comments