Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 0d9c665

Browse files
ozkatznopcoder
andauthoredJan 12, 2023
Add support for presigned URLs in the lakeFS API (treeverse#4985)
Co-authored-by: Barak Amar <barak.amar@treeverse.io>
1 parent f180367 commit 0d9c665

38 files changed

+660
-268
lines changed
 

‎api/swagger.yml

+36
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,10 @@ components:
246246
enum: [common_prefix, object]
247247
physical_address:
248248
type: string
249+
description: |
250+
The location of the object on the underlying object store.
251+
Formatted as a native URI with the object store type as scheme ("s3://...", "gs://...", etc.)
252+
Or, in the case of presign=true, will be an HTTP URL to be consumed via regular HTTP GET
249253
checksum:
250254
type: string
251255
size_bytes:
@@ -971,6 +975,11 @@ components:
971975
token:
972976
type: string
973977
description: opaque staging token to use to link uploaded object
978+
presigned_url:
979+
type: string
980+
nullable: true
981+
description: if presign=true is passed in the request, this field will contain a presigned URL to use when uploading
982+
974983

975984
StagingMetadata:
976985
type: object
@@ -2779,6 +2788,11 @@ paths:
27792788
schema:
27802789
type: string
27812790
pattern: '^bytes=((\d*-\d*,? ?)+)$'
2791+
- in: query
2792+
name: presign
2793+
required: false
2794+
schema:
2795+
type: boolean
27822796
responses:
27832797
200:
27842798
description: object content
@@ -2820,6 +2834,12 @@ paths:
28202834
ETag:
28212835
schema:
28222836
type: string
2837+
302:
2838+
description: Redirect to a pre-signed URL for the object
2839+
headers:
2840+
Location:
2841+
schema:
2842+
type: string
28232843
401:
28242844
$ref: "#/components/responses/Unauthorized"
28252845
404:
@@ -2917,6 +2937,12 @@ paths:
29172937
- staging
29182938
operationId: getPhysicalAddress
29192939
summary: get a physical address and a return token to write object to underlying storage
2940+
parameters:
2941+
- in: query
2942+
name: presign
2943+
required: false
2944+
schema:
2945+
type: boolean
29202946
responses:
29212947
200:
29222948
description: physical address for staging area
@@ -3258,6 +3284,11 @@ paths:
32583284
schema:
32593285
type: boolean
32603286
default: true
3287+
- in: query
3288+
name: presign
3289+
required: false
3290+
schema:
3291+
type: boolean
32613292
get:
32623293
tags:
32633294
- objects
@@ -3336,6 +3367,11 @@ paths:
33363367
schema:
33373368
type: boolean
33383369
default: true
3370+
- in: query
3371+
name: presign
3372+
required: false
3373+
schema:
3374+
type: boolean
33393375
- $ref: "#/components/parameters/PaginationAfter"
33403376
- $ref: "#/components/parameters/PaginationAmount"
33413377
- $ref: "#/components/parameters/PaginationDelimiter"

‎clients/java/api/openapi.yaml

+47
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎clients/java/docs/ObjectStats.md

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎clients/java/docs/ObjectsApi.md

+13-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎clients/java/docs/StagingApi.md

+4-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎clients/java/docs/StagingLocation.md

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
There was a problem loading the remainder of the diff.

0 commit comments

Comments
 (0)
Please sign in to comment.