Gamma API

Connect storage

PUT
/api/organizations/{slug}/storage

Connects the organization's own bucket, or replaces the one it has, after the same checks as a test. New model files go there; files already written are not moved. Owners and admins are notified.

Who may call it: An owner or security admin of the organization. API keys: no.

Authorization

session
cookiegamma.session_token<token>

The session cookie a sign-in sets. Over HTTPS its name carries the __Secure- prefix. Browsers send it on their own; other clients keep it from the sign-in response.

Path Parameters

slug*string

The organization's slug, as in its URL.

Request Body

application/json
  1. body
bucket*string
Length1 <= length <= 63
region*string
Length1 <= length <= 64
endpoint?||

An S3-compatible endpoint, public and https; empty or absent for AWS.

prefix?string

Where in the bucket files go; empty for the whole bucket.

Default""
accessKeyId*string
Length1 <= length
secretAccessKey?string

Required on a first connection or a new endpoint; left out or empty, the saved one is kept.

Response Body

OK.

application/json
  1. response
storage*

The organization's own S3-compatible bucket, which new model files go to. The secret key is never sent back.

Example Request
curl -X PUT 'http://localhost:3000/api/organizations/string/storage' \  -H 'Content-Type: application/json' \  -d '{  "bucket": "string",  "region": "string",  "accessKeyId": "string"}'
Example Response
{  "storage": {    "id": "string",    "bucket": "string",    "region": "string",    "endpoint": "string",    "prefix": "string",    "accessKeyId": "string",    "lastFailureAt": "2019-08-24T14:15:22Z",    "lastError": "string",    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z"  }}