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

ipfs http server API #132

Closed
jbenet opened this issue Sep 28, 2014 · 1 comment
Closed

ipfs http server API #132

jbenet opened this issue Sep 28, 2014 · 1 comment

Comments

@jbenet
Copy link
Member

jbenet commented Sep 28, 2014

We need to define the http server API. We'll use this issue to draft it. (if you haven't designed HTTP APIs before, please take a look at notoriously well-designed HTTP APIs like github's)

Some notes:

  • should resolve ipfs and ipns at /ipfs/... and /ipns/...
  • should resolve ipfs rpc commands (add, refs, etc) under /api
  • /api should be versioned.
  • should serve a standard "hello world, this is IPFS" doc page at root /
  • should expose the ipfs-webui under /console or /admin or /webui
  • should -- wherever possible -- permit changing output format (via query string ?format=json or header Accept-Content-Type: application/json). Should support JSON, raw protobuf (for returning blocks), and ... potentially XML (ew).
  • should -- wherever possible -- permit ?pretty=true to pretty print output
  • should -- wherever possible -- use JSON-LD in responses (i.e. an @context, which needs to be made)
  • should use relative 302 (or 303/307) redirects for resolving /ipns -> /ipfs
  • should allow to output the ipns name without resolving (w. option, like ?resolve=false)
  • should -- wherever possible -- permit ?raw=true to output raw blocks (or, conversely, make that the default, and use ?unwrap=true to only get back the data)

So far, routes:

/ipfs/...      // resolves to an ipfs object and returns it (
/ipns/...      // either resolves to an ipfs object (w. 30X redirect) or returns the signed name (200)
/api/v#/...    // rpc api (versioned)
/console/...   // ipfs-webui  (or /admin or /webui)
This was referenced Sep 28, 2014
@llSourcell
Copy link
Contributor

I will incrementally contribute to this.
edit: nvm herukarhu is on it

@aschmahmann aschmahmann mentioned this issue Feb 18, 2021
73 tasks
ariescodescream pushed a commit to ariescodescream/go-ipfs that referenced this issue Oct 23, 2021
laurentsenta pushed a commit to laurentsenta/kubo that referenced this issue Feb 25, 2022
laurentsenta pushed a commit to laurentsenta/kubo that referenced this issue Feb 25, 2022
laurentsenta pushed a commit to laurentsenta/kubo that referenced this issue Mar 4, 2022
laurentsenta pushed a commit to laurentsenta/kubo that referenced this issue Mar 4, 2022
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

3 participants