Closed bajtos closed 1 month ago
@patrickwoodhead I reworked the implementation, below are the new examples. I'll need to update the README, but I'll wait until we agree on the new API request & response formats.
Example request:
GET /miner/f0814049/retrievable-deals/summary
Example response:
{
"minerId": "f0814049",
"clients": [
{ "clientId": "f02516933", "dealCount": 6880 },
{ "clientId": "f02833886", "dealCount": 3126 }
]
}
Example request:
GET /clients/f0215074/retrievable-deals/summary
Example response:
{
"clientId": "f0215074",
"providers": [
{ "minerId": "f0406478", "dealCount": 4592 },
{ "minerId": "f0814049", "dealCount": 758 }
]
}
{
"clientId": "f0215074",
"providers": [
{ "minerId": "f0406478", "dealCount": 4592 },
{ "minerId": "f0814049", "dealCount": 758 }
]
}
Two questions to consider:
providers
or miners
?dealCount
to deals
?{
"clientId": "f0215074",
"miners": [
{ "minerId": "f0406478", "deals": 4592 },
{ "minerId": "f0814049", "deals": 758 }
]
}
I realised that this new API should be implemented in spark-stats to make it part of the Spark Stats product. I moved the implementation to https://github.com/filecoin-station/spark-stats/pull/194
Links:
Out of the scope of this pull request:
Example request:
Example response:
Example request:
Example response: