Reference

Create credentials

Short-lived S3 credentials that reach only this namespace's folder, so a daemon or CLI can use the store directly without a key for the whole bucket.

POST
/namespaces/{namespace}/credentials

Authorization

bearer
headerAuthorizationBearer <token>

Path Parameters

namespace*string

A namespace of your organization, such as prod/app, or <org>:<namespace> for a public namespace of another one. Encode / as %2F.

Request Body

application/json
  1. body
access*string

write needs a key with the write role.

Value in"read""write"

Response Body

The credentials.

application/json
  1. response
store*string

The namespace's folder in the bucket, as s3://<bucket>/<prefix>.

region*string
endpoint*|

The S3 endpoint, for S3-compatible stores. Null for AWS.

accessKeyId*string
secretAccessKey*string
sessionToken*string
expiresAt*string

Ask again before then. At least 15 minutes ahead.

Formatdate-time
access*Access
Value in"read""write"
heads*|

When the cache servers own this namespace's branch heads: change heads through them. These credentials then cannot write refs/.

Example Request
curl -X POST 'https://example.com/v1/namespaces/string/credentials' \  -H 'Content-Type: application/json' \  -d '{  "access": "read"}'
Example Response
{  "store": "string",  "region": "string",  "endpoint": "string",  "accessKeyId": "string",  "secretAccessKey": "string",  "sessionToken": "string",  "expiresAt": "2019-08-24T14:15:22Z",  "access": "read",  "heads": {    "nodes": [      "string"    ],    "folder": "string",    "pass": "string"  }}