Keys
The Keys operations of the Hub REST API (6 operations).
Generated from Synap-core/backend main at 24fabe7, which can be newer than the stable release self-hosters install.
bearerAuthAuthorizationBearer <API key>Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.
New key issued
application/json- response
apiKey*stringkeyId*stringscopes*array<string>curl -X POST 'https://pod.example.com/api/hub/keys/rotate-cli'{ "apiKey": "string", "keyId": "string", "scopes": [ "string" ]}bearerAuthAuthorizationBearer <API key>Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.
Templates
application/json- response
templates*array<>curl -X GET 'https://pod.example.com/api/hub/keys/templates'{ "templates": [ { "id": "string", "name": "string", "description": "string", "stored": true, "uses": [ "string" ], "permissions": [ "string" ], "workspaceIds": [ "string" ], "projectIds": [ "string" ], "entityIds": [ "string" ], "expiresInDays": 0 } ]}bearerAuthAuthorizationBearer <API key>Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.
application/json- body
template?string1 <= length <= 120permissions?array<>1 <= items <= 128uses?array<>1 <= items <= 8name?string1 <= length <= 100expiresInDays?|1 <= value <= 36500workspaceId?string^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/iuuidprojectId?string^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/iuuidRequest filed
application/json- response
request_code*stringrequest_id*stringreview_url*stringexpires_in*numberinterval*numbercurl -X POST 'https://pod.example.com/api/hub/keys/requests' \ -H 'Content-Type: application/json' \ -d '{}'{ "request_code": "string", "request_id": "string", "review_url": "string", "expires_in": 0, "interval": 0}bearerAuthAuthorizationBearer <API key>Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.
application/json- body
request_code*string16 <= length <= 128The key — shown once
application/json- response
apiKey*stringkeyId*stringkeyPrefix*stringname*stringscopes*array<string>expiresAt*string|nullcurl -X POST 'https://pod.example.com/api/hub/keys/requests/token' \ -H 'Content-Type: application/json' \ -d '{ "request_code": "stringstringstri"}'{ "apiKey": "string", "keyId": "string", "keyPrefix": "string", "name": "string", "scopes": [ "string" ], "expiresAt": "string"}bearerAuthAuthorizationBearer <API key>Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.
Requested keys
application/json- response
keys*array<>curl -X GET 'https://pod.example.com/api/hub/keys/requested'{ "keys": [ { "keyId": "string", "name": "string", "keyPrefix": "string", "templateId": "string", "scopes": [ "string" ], "createdAt": "string", "expiresAt": "string", "lastUsedAt": "string", "revokedAt": "string" } ]}bearerAuthAuthorizationBearer <API key>Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.
keyId*string^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/iuuidRevoked
application/json- response
revoked*booleancurl -X DELETE 'https://pod.example.com/api/hub/keys/requested/497f6eca-6276-4993-bfeb-53cbbbba6f08'{ "revoked": true}