Galon Cloud
Galon API v1

/storage/buckets/{bucket_id}/access

Base URL https://api.galon.ai/v1 · export GALON_API_BASE="https://api.galon.ai/v1"

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

NameInTypeDescription
bucket_idpathstring · required

Responses

StatusDescriptionBody
200public, public URL, today's egressobject
404storage_bucket_not_foundError
401Key missing or invalidError

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

NameInTypeDescription
bucket_idpathstring · required

Request body

application/json

FieldTypeDescription
publicboolean · required
confirm"allow" | "disallow" · required

Responses

StatusDescriptionBody
200Access changedobject
404storage_bucket_not_foundError
401Key missing or invalidError

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"})