Skip to main content

Get an access key

This operation returns one access key of your account: its name, the buckets and object prefix it is limited to, its permissions, where it was created, and the regions it is ready in. The secret stays out of the answer - it is shown exactly once, when the key is created - so the response is safe to log or print.

The calling key can look up any access key of the account, itself included, whatever its own buckets and permissions. A deleted key answers 404, and so do the keys STRG looks after for you - the dashboard's own key and the assistant's.

When you'd use it​

  • Waiting for a new key to be ready. A deploy script that has just created a key can look at its regions until every region it needs reads active, and only then hand the key on.
  • Checking what a key can do. Before a tool is given a key id, a quick look at its permissions, bucketScope and keyPrefix shows exactly what it will reach.
  • A key describing itself. A long-running job can look up its own key id, $AWS_ACCESS_KEY_ID, to log the permissions and buckets it was given when it starts.

Request​

GET /v1/access-keys/{id} HTTP/1.1
Host: api.strg.com
Authorization: Bearer <access key id>:<secret>

Path parameters​

NameTypeRequiredDescription
idstringYesThe access key id, as an S3 client sends it - 20 uppercase letters and digits. Any other value answers 404 not_found

Request headers​

NameTypeRequiredDescription
AuthorizationstringYesBearer <access key id>:<secret> of an access key holding Manage access keys through the API (api:access-management) - Authentication has the details

The request has no query parameters and no body.

Response​

200 OK, with Content-Type: application/json and Cache-Control: no-store.

{
"id": "STRG7K2Q9XWM4BHT3NPA",
"label": "ci-uploads",
"bucketScope": ["my-bucket"],
"keyPrefix": "builds/",
"permissions": ["objects:list", "objects:read", "objects:write"],
"origin": "api",
"createdAt": "2026-10-18T09:14:03.512Z",
"regions": {
"eu-central-1": "active"
}
}
FieldTypeDescription
idstringThe access key id, as an S3 client sends it
labelstring or nullThe key's name
bucketScopearray of strings or nullThe buckets the key reaches, by name - null for every bucket, including buckets created later. Scope explains how it works
keyPrefixstring or nullThe object key prefix the key is limited to, or null for none. Object prefix explains how it works
permissionsarray of stringsThe key's permissions, by name - Permissions describes each one
originstringWhere the key was created: dashboard, mcp (an MCP client) or api (this API)
createdAtstringWhen the key was created - ISO 8601, in UTC
regionsobjectOne entry per region the key is set up in, keyed by region (us-east-1, eu-central-1): pending until the key works there, then active. A region with no entry is one the key is not set up in - yet, or because you have no bucket there. When a key starts working has the details

Within /v1, fields may be added to this response but are never removed or changed, so a client can safely skip any field it does not know.

Errors​

This table lists every error this operation can answer, so a client knows what to branch on. Each one is an application/problem+json body carrying a code; Errors has its shape.

StatuscodeWhen
401unauthenticatedThe Authorization header is missing or malformed, the key is unknown or deleted, the secret is wrong, your account is closed, or the key does not hold Manage access keys through the API. The response carries WWW-Authenticate: Bearer realm="strg.com"
404not_foundNo active key of your account has this id: it never existed, it was deleted, it belongs to another account, it is one STRG manages for you, or the id is not a well-formed access key id
429rate_limitedToo many authentication attempts for this key or from this address. The Retry-After header says how many seconds to wait before the next attempt, as Rate limits describes
500internal_errorSomething went wrong on STRG's side. The same request can be sent again a moment later

Examples​

Each example looks up the key STRG7K2Q9XWM4BHT3NPA, which stands in for one of your own key ids. The calling key's id, $AWS_ACCESS_KEY_ID, works too: it returns the calling key itself.

curl -sS https://api.strg.com/v1/access-keys/STRG7K2Q9XWM4BHT3NPA \
-H "Authorization: Bearer $AWS_ACCESS_KEY_ID:$AWS_SECRET_ACCESS_KEY"
View as Markdown