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

ability to get a directory listing in json from the gateway #2107

Closed
fazo96 opened this issue Dec 19, 2015 · 2 comments
Closed

ability to get a directory listing in json from the gateway #2107

fazo96 opened this issue Dec 19, 2015 · 2 comments

Comments

@fazo96
Copy link

fazo96 commented Dec 19, 2015

This would allow apps to run in a "limited mode" downloading files and listing directories using the gateway instead of the HTTP API. Shouldn't be hard to get the directory listing in json format depending on request headers or parameters, the only way to do it now is to parse the HTML as far as I know.

@ghost
Copy link

ghost commented Dec 19, 2015

Here's how to allow additional commands on the gateway's API: 9beebc9

This version command ends up as :8080/api/v0/version

@fazo96
Copy link
Author

fazo96 commented Dec 19, 2015

cryptix fazo: re #2107 - i think the json api is supposed to get a readonly version on the gateway
so you should be able to use the equiv of 'ipfs ls $hash' through https://ipfs.io/api/... 
lgierth cryptix: yeah please test!
fazo    very nice cryptix :) I hope it lands soon, so that my app can work on public gateways in read only mode
for now only a few features actually work because many rely on directory listing
lgierth :8080/api already exists -- if you need more commands make a PR :)
there's a simple whitelist of enabled commands
cryptix fazo: there you go.. :)) 
lgierth: need to roll back to go1.5.2 from 1.6b1. ipfs is quite a test case.. :))
fazo    woah. thanks lgierth! is there any docs about it?
cryptix my ~/.ipfs weighs in at 19gigs today
fazo    also I opened an issue here: https://github.com/ipfs/go-ipfs/issues/2107 you can close it and maybe provide links to documentation or what you said here
lgierth fazo: it's the same as :5001 -- but readonly and with a whitelist
cryptix snaps
lgierth ehm an allowlist

Well, I think I got my reply!

@fazo96 fazo96 closed this as completed Dec 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant