Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to get API documentation as HTML #2289

Open
HyperCriSiS opened this issue Feb 25, 2025 · 3 comments
Open

Trying to get API documentation as HTML #2289

HyperCriSiS opened this issue Feb 25, 2025 · 3 comments
Labels

Comments

@HyperCriSiS
Copy link

Hi,

I just saw the API documentation can be fetched as HTML which would be nice to make it available for AI.
I tried to get it with CURL.

Versions

Core [v6.0.4]
FTL [v6.0.2]
Web interface [v6.0.1]

Windows 11

Expected behavior

API doc should be downloaded as HTML.

Actual behavior / bug

CURL is executed. Absolutely nothing happens.

Steps to reproduce

curl -insecure -X GET "https://192.168.0.100:443/api/docs" \ -H 'accept: text/html'

@yubiuser yubiuser transferred this issue from pi-hole/pi-hole Feb 26, 2025
@DL6ER
Copy link
Member

DL6ER commented Feb 26, 2025

It is downloadable, your curl call just won't work. Please use some other tool that can crawl the page. For instance, saving with a browser would be much easier.

If you want to use the CLI, I'd recommend using wget instead, e.g.

wget -r -np -k http://192.168.0.100:443/api/docs

I suggest you consult wget -h if you want to know what the individual flags I proposed do.

@DL6ER DL6ER added the No bug label Feb 26, 2025
@HyperCriSiS
Copy link
Author

That's strange, because I got this from the documentation 😅

Image

@DL6ER
Copy link
Member

DL6ER commented Feb 27, 2025

It is an automatically generated example that - unfortunately - doesn't work like this because of external dependencies the HTML page has. Seems we need to remove it if it is confusing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants