-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# IPIP-0401: Data Onboarding (POST) via Writable Gateways | ||
|
||
- Start Date: YYYY-MM-DD | ||
- Related Issues: | ||
- (add links here) | ||
|
||
## Summary | ||
|
||
## Motivation | ||
|
||
## Detailed design | ||
|
||
## Test fixtures | ||
|
||
## Design rationale | ||
|
||
### User benefit | ||
|
||
### Compatibility | ||
|
||
### Security | ||
|
||
Introducing data onboarding via HTTP Gateways opens possibility for data creation | ||
and modification through the gateway. It is likely that not all users will want to | ||
have Writable Gateways enabled, or that they are available to everyone. Therefore, | ||
we recommend that the implementer includes an Authentication method. This | ||
authentication method can be application dependent and is therefore not specified. | ||
|
||
### Alternatives | ||
|
||
### Copyright | ||
|
||
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
date: 2023-04-17 | ||
editors: | ||
- name: Henrique Dias | ||
github: hacdias | ||
url: https://hacdias.com/ | ||
--- | ||
|
||
# Writable Gateway Specification | ||
|
||
Writable Gateway is an extension of :cite[path-gateway], which allows data onboarding | ||
to IPFS via HTTP endpoints. This allows for more interoperability with the remaining | ||
of the web, and allows for more ways of adding data to IPFS. | ||
|
||
# HTTP API | ||
|
||
This API is a superset of the HTTP API of :cite[path-gateway]. The differences are | ||
documented below. The main difference is the introduction of a `POST` endpoint. | ||
|
||
## `POST /ipfs` | ||
|
||
Onboards new data to the IPFS node behind the gateway. The onboarded data can be | ||
of any of the following types and be specified via the `Content-Type` header: | ||
|
||
- [`application/vnd.ipld.raw`] - adds raw [blocks] to the gateway. The data in | ||
the request body is assumed to be pure blocks of data, with no specific structure. | ||
- [`application/vnd.ipld.car`] - adds a [CAR] to the gateway. The data in the request | ||
body is assumed to be a CAR file. | ||
- [`application/x-tar`] - adds a [TAR] archive to the gateway. The data in the request | ||
body is assumed to be a TAR archive containing a directory tree that will be added | ||
as a UnixFS directory to IPFS. | ||
|
||
In case of success, the request will return a `303 See Other` status code, as | ||
well as a `Location` header containing the content path of the newly added | ||
resource. | ||
|
||
[`application/vnd.ipld.raw`]: https://www.iana.org/assignments/media-types/application/vnd.ipld.raw | ||
[`application/vnd.ipld.car`]: https://www.iana.org/assignments/media-types/application/vnd.ipld.car | ||
[`application/x-tar`]: https://en.wikipedia.org/wiki/Tar_(computing) | ||
[blocks]: https://docs.ipfs.io/concepts/glossary/#block | ||
[CAR]: https://docs.ipfs.io/concepts/glossary/#car | ||
[TAR]: https://en.wikipedia.org/wiki/Tar_(computing) |