Skip to content

Commit ca46f40

Browse files
authored
Merge pull request #472 from ipfs/gateway-car-parms
gateway: car-* request query parameters
2 parents 11100a7 + 1defdd3 commit ca46f40

File tree

2 files changed

+39
-3
lines changed

2 files changed

+39
-3
lines changed

src/http-gateways/path-gateway.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,11 +254,23 @@ A Gateway SHOULD include the
254254

255255
### `dag-scope` (request query parameter)
256256

257-
Only used on CAR requests, same as :ref[dag-scope] from :cite[trustless-gateway].
257+
Optional, can be used to limit the scope of verifiable DAG requests such as CAR, same as :ref[dag-scope] from :cite[trustless-gateway].
258258

259259
### `entity-bytes` (request query parameter)
260260

261-
Only used on CAR requests, same as :ref[entity-bytes] from :cite[trustless-gateway].
261+
Optional, can be used to limit the scope of verifiable DAG requests such as CAR, same as :ref[entity-bytes] from :cite[trustless-gateway].
262+
263+
### `car-version` (request query parameter)
264+
265+
Optional, specific to CAR requests, same as :ref[car-version] from :cite[trustless-gateway].
266+
267+
### `car-order` (request query parameter)
268+
269+
Optional, specific to CAR requests, same as :ref[car-order] from :cite[trustless-gateway].
270+
271+
### `car-dups` (request query parameter)
272+
273+
Optional, specific to CAR requests, same as :ref[car-dups] from :cite[trustless-gateway].
262274

263275
# HTTP Response
264276

src/http-gateways/trustless-gateway.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,30 @@ returned:
194194
returned to the client, the HTTP status code has already been sent to the
195195
client.
196196

197+
### :dfn[`car-version`] (request query parameter)
198+
199+
Optional, only used on CAR requests.
200+
201+
Serves same purpose as [CAR `version` content type parameter](#car-version-content-type-parameter).
202+
203+
In case both are present in the request, the value from the [`Accept`](#accept-request-header) HTTP Header has priority and a matching [`Content-Location`](#content-location-response-header) SHOULD be returned with the response.
204+
205+
### :dfn[`car-order`] (request query parameter)
206+
207+
Optional, only used on CAR requests.
208+
209+
Serves same purpose as [CAR `order` content type parameter](#car-order-content-type-parameter).
210+
211+
In case both are present in the request, the value from the [`Accept`](#accept-request-header) HTTP Header has priority and a matching [`Content-Location`](#content-location-response-header) SHOULD be returned with the response.
212+
213+
### :dfn[`car-dups`] (request query parameter)
214+
215+
Optional, only used on CAR requests.
216+
217+
Serves same purpose as [CAR `dups` content type parameter](#car-dups-content-type-parameter).
218+
219+
In case both are present in the request, the value from the [`Accept`](#accept-request-header) HTTP Header has priority and a matching [`Content-Location`](#content-location-response-header) SHOULD be returned with the response.
220+
197221
# HTTP Response
198222

199223
Below MUST be implemented **in addition** to "HTTP Response" of :cite[path-gateway].
@@ -234,7 +258,7 @@ A CAR stream for the requested
234258
content type (with optional `order` and `dups` params), path and optional
235259
`dag-scope` and `entity-bytes` URL parameters.
236260

237-
## CAR version (content type parameter)
261+
## CAR `version` (content type parameter)
238262

239263
Value returned in
240264
[`CarV1Header.version`](https://ipld.io/specs/transport/car/carv1/#header)

0 commit comments

Comments
 (0)