Hub REST API
Auth
The Auth operations of the Hub REST API (2 operations).
For BuildersOpen-source podSynap CloudGenerated from Synap-core/backend@c31e261ab (main)
GET
bearerAuthheader
AuthorizationBearer <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.
Bearer credential introspection.
application/json- response
keyId*stringFormat
uuidkeyIdPrefix*stringuserId*stringuserEmail*string|nulluserName*string|nullname*|Human-friendly key name.
scopes*array<string>createdAt*stringFormat
date-timeexpiresAt*|Format
date-timelastUsedAt*|Format
date-timeparentKeyId*|Format
uuidisActive*booleankeyType*stringValue in
"hub_inbound""user_pat""system""service""is_internal"workspaceId*|Format
uuidcurl -X GET 'https://pod.example.com/api/hub/auth/status'Example Response
{ "keyId": "468bcefd-6536-4844-8249-aff3ecb2ef7b", "keyIdPrefix": "string", "userId": "string", "userEmail": "string", "userName": "string", "name": "string", "scopes": [ "string" ], "createdAt": "2019-08-24T14:15:22Z", "expiresAt": "2019-08-24T14:15:22Z", "lastUsedAt": "2019-08-24T14:15:22Z", "parentKeyId": "9dbb5623-c5bd-4a01-b4c9-f9396064b6bc", "isActive": true, "keyType": "hub_inbound", "workspaceId": "ef0efa32-d1c1-43d4-a5e2-fe7b4f00403c"}GET
bearerAuthheader
AuthorizationBearer <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.
The presented key's state.
application/json- response
state*stringValue in
"active""awaiting_approval""revoked""expired""unknown"keyIdPrefix?stringkeyId?stringFormat
uuidagentType?string|nullinstanceId?string|nullinstanceLabel?|The computer's name this key was made on; null = unlabelled.
createdAt?stringFormat
date-timeexpiresAt?|Format
date-timeapprovalUrl?stringawaiting_approval: the page where the owner approves it.
revokedAt?|Format
date-timerevokedReason?string|nullreplacedBy?|revoked by replacement: when the replacing connection was created, and on which instance.
curl -X GET 'https://pod.example.com/api/hub/auth/key-state'Example Response
{ "state": "active", "keyIdPrefix": "string", "keyId": "468bcefd-6536-4844-8249-aff3ecb2ef7b", "agentType": "string", "instanceId": "string", "instanceLabel": "string", "createdAt": "2019-08-24T14:15:22Z", "expiresAt": "2019-08-24T14:15:22Z", "approvalUrl": "string", "revokedAt": "2019-08-24T14:15:22Z", "revokedReason": "string", "replacedBy": { "createdAt": "2019-08-24T14:15:22Z", "instanceId": "string", "instanceLabel": "string" }}