hostd
hostd copied to clipboard
Info on https://api.sia.tech/hostd is out of date
Current Behavior
There are a lot of api calls that have changed over time and the documentation has not been updated. As an example, the code snippet at https://api.sia.tech/hostd#4ee2877e-6c02-4578-9e4c-cd60cab49570 is incorrect. It says curl --location 'http://localhost:9980/api/contracts/fcid:49b8fd417052ed8fef9f0e2f98e13bec24b8be674beda2de4ac21ed3267112b8' whereas it should say curl --location 'http://localhost:9980/api/contracts/49b8fd417052ed8fef9f0e2f98e13bec24b8be674beda2de4ac21ed3267112b8' (without the fcid:).
In this area there is also no documentation to query V2 contracts like the call curl --location 'http://localhost:9980/api/v2/contracts/d432dd6671d67f0dc7dc28b225a2eedf5cb3f46d0af97db4d23899feaac0ea49'. With the format if this command, I suspect all V2 api calls are undocumented.
Arguably the V1 calls need reviewing as well, but they will become fairly obsolete in the next few days.
As there is an /api/v2/contracts do we assume there is an /api/v2/metrics? I don't think so.
Expected Behavior
The api docs should be up to date and document all calls correctly
Steps to Reproduce
No response
Version
v2.3.4
What operating system did the problem occur on (e.g. Ubuntu 22.04, macOS 12.0, Windows 11)?
Ubuntu 24.04 LTS
Anything else?
No response