GET /storage/buckets/{bucket_id}/access
Get a bucket's public access
Exact scope storage:read. Hidden surface: 404 not_found until Galon Storage is open to the account.
API key (Bearer), on the public API endpoint.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
bucket_id | path | string · required |
Responses
| Status | Description | Body |
|---|---|---|
200 | public, public URL, today's egress | object |
404 | storage_bucket_not_found | Error |
401 | Key missing or invalid | Error |
Examples
curl
curl -X GET "$GALON_API_BASE/storage/buckets/<bucket_id>/access" \
-H "Authorization: Bearer $GALON_API_KEY"Node.js (SDK)
import { Galon } from "galon";
const galon = new Galon(process.env.GALON_API_KEY);
const result = await galon.buckets.access("<id>");Python (SDK)
from galon import Galon
galon = Galon() # reads GALON_API_KEY
result = galon.buckets.access("<id>")PUT /storage/buckets/{bucket_id}/access
Make a bucket public or private
Exact scope storage:write. {"public": true, "confirm": "allow"} to open, {"public": false, "confirm": "disallow"} to close. Hidden surface: 404 not_found until Galon Storage is open to the account.
API key (Bearer), on the public API endpoint.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
bucket_id | path | string · required |
Request body
application/json
| Field | Type | Description |
|---|---|---|
public | boolean · required | |
confirm | "allow" | "disallow" · required |
Responses
| Status | Description | Body |
|---|---|---|
200 | Access changed | object |
404 | storage_bucket_not_found | Error |
401 | Key missing or invalid | Error |
Examples
curl
curl -X PUT "$GALON_API_BASE/storage/buckets/<bucket_id>/access" \
-H "Authorization: Bearer $GALON_API_KEY" \
-H "Content-Type: application/json" \
-d '{"public": true, "confirm": "allow"}'Node.js (SDK)
import { Galon } from "galon";
const galon = new Galon(process.env.GALON_API_KEY);
const result = await galon.buckets.setAccess("<id>", {"public": true, "confirm": "allow"});Python (SDK)
from galon import Galon
galon = Galon() # reads GALON_API_KEY
result = galon.buckets.set_access("<id>", {"public": True, "confirm": "allow"})