@@ -4,6 +4,59 @@ A lightweight IPNI node mapping Filecoin PieceCID → payload block CID.
4
4
5
5
- [ Design doc] ( ./docs/design.md )
6
6
7
+ ## Basic use
8
+
9
+ Note: this will change soon, see
10
+ https://github.com/filecoin-station/piece-indexer/issues/33
11
+
12
+ ## `GET /sample/{provider-id}/{piece-cid}
13
+
14
+ Sample a set of multihashes ingested by IPNI for a given ContextID, matching the
15
+ route eventually to be exposed by an IPNI reverse index.
16
+
17
+ _ This is an alternative implementation of the IPNI Reverse Index as specified in
18
+ [ xedni/openapi.yaml] ( https://github.com/ipni/xedni/blob/526f90f5a6001cb50b52e6376f8877163f8018af/openapi.yaml ) ._
19
+
20
+ Parameters:
21
+
22
+ - ` provider-id ` - the peer ID of the storage provider (index publisher)
23
+ - ` piece-cid ` - the Filecoin deal's PieceCID as advertised by the provider in
24
+ Graphsync retrieval metadata
25
+
26
+ Response:
27
+
28
+ - ` samples ` - a list of exactly one payload block CID contained inside the piece
29
+ identified by the requested PieceCID.
30
+
31
+ Example:
32
+
33
+ https://pix.filspark.com/sample/12D3KooWHKeaNCnYByQUMS2n5PAZ1KZ9xKXqsb4bhpxVJ6bBJg5V/baga6ea4seaqlwzed5tgjtyhrugjziutzthx2wrympvsuqhfngwdwqzvosuchmja
34
+
35
+ ``` json
36
+ {
37
+ "samples" : [" bafkreigrnnl64xuevvkhknbhrcqzbdvvmqnchp7ae2a4ulninsjoc5svoq" ]
38
+ }
39
+ ```
40
+
41
+ ## ` GET /ingestion-status/{provider-id} `
42
+
43
+ Return the index status for the given provider.
44
+
45
+ Example:
46
+
47
+ https://pix.filspark.com/ingestion-status/12D3KooWHKeaNCnYByQUMS2n5PAZ1KZ9xKXqsb4bhpxVJ6bBJg5V
48
+
49
+ ``` json
50
+ {
51
+ "providerId" : " 12D3KooWHKeaNCnYByQUMS2n5PAZ1KZ9xKXqsb4bhpxVJ6bBJg5V" ,
52
+ "ingestionStatus" : " All advertisements from baguqeeralhduow57bhqo5zgiwe6swgjrqw2nuckvnch6nlylaensfzf3bfyq to the end of the chain were processed." ,
53
+ "lastHeadWalkedFrom" : " baguqeeralhduow57bhqo5zgiwe6swgjrqw2nuckvnch6nlylaensfzf3bfyq" ,
54
+ "adsMissingPieceCID" : 0 ,
55
+ "entriesNotRetrievable" : 0 ,
56
+ "piecesIndexed" : 6344
57
+ }
58
+ ```
59
+
7
60
## Development
8
61
9
62
``` bash
0 commit comments