Skip to content

Commit 0600bd8

Browse files
docs: Update API volume creation instructions and authentication process (#1922)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 55e056a commit 0600bd8

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

docs/src/content/docs/guides/s3-tables.mdx

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -83,19 +83,25 @@ Create a volume in Embucket that connects to your S3 table bucket. Use either th
8383
<Tabs>
8484
<TabItem label="API">
8585

86-
Use `HTTPie` or `curl` to create the volume via API:
86+
Creating a volume via the API requires Bearer Token authentication. This is a two-step process: first, get an access token, then use that token to create the volume.
87+
88+
Use `HTTPie` + jq or `curl` + jq to create the volume via API:
8789

8890
```bash
89-
http POST localhost:3000/v1/metastore/volumes \
91+
# 1. Get access token (using demo credentials)
92+
TOKEN=$(http POST :3000/ui/auth/login \
93+
username=embucket password=embucket \
94+
--pretty=none | jq -r .accessToken)
95+
96+
# 2. Create volume
97+
http POST http://localhost:3000/ui/volumes \
98+
Authorization:"Bearer $TOKEN" \
99+
name=demo \
90100
ident=demo \
91-
type=s3-tables \
101+
type=s3Tables \
92102
database=demo \
93-
credentials:='{
94-
"credential_type": "access_key",
95-
"aws-access-key-id": "YOUR_ACCESS_KEY",
96-
"aws-secret-access-key": "YOUR_SECRET_KEY"
97-
}' \
98-
arn=arn:aws:s3tables:us-east-2:123456789012:bucket/my-table-bucket
103+
credentials:='{"accessKey":{"awsAccessKeyId":"YOUR_ACCESS_KEY","awsSecretAccessKey":"YOUR_SECRET_KEY"}}' \
104+
arn="arn:aws:s3tables:us-east-2:123456789012:bucket/my-table-bucket"
99105
```
100106

101107
**Required parameters:**
@@ -115,7 +121,7 @@ Use the SQL interface to create the volume:
115121
CREATE EXTERNAL VOLUME IF NOT EXISTS demo
116122
STORAGE_LOCATIONS = ((
117123
NAME = 'demo'
118-
STORAGE_PROVIDER = 's3-tables'
124+
STORAGE_PROVIDER = 'S3TABLES'
119125
STORAGE_AWS_ACCESS_POINT_ARN = 'arn:aws:s3tables:us-east-2:123456789012:bucket/my-table-bucket'
120126
CREDENTIALS = (
121127
AWS_KEY_ID = 'YOUR_ACCESS_KEY'

0 commit comments

Comments
 (0)