SynapSynapDocs
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
/auth/status

Authorization

bearerAuth
headerAuthorizationBearer <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.

Response Body

Bearer credential introspection.

application/json
  1. response
keyId*string
Formatuuid
keyIdPrefix*string
userId*string
userEmail*string|null
userName*string|null
name*|

Human-friendly key name.

scopes*array<string>
createdAt*string
Formatdate-time
expiresAt*|
Formatdate-time
lastUsedAt*|
Formatdate-time
parentKeyId*|
Formatuuid
isActive*boolean
keyType*string
Value in"hub_inbound""user_pat""system""service""is_internal"
workspaceId*|
Formatuuid
Example Request
curl -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
/auth/key-state

Authorization

bearerAuth
headerAuthorizationBearer <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.

Response Body

The presented key's state.

application/json
  1. response
state*string
Value in"active""awaiting_approval""revoked""expired""unknown"
keyIdPrefix?string
keyId?string
Formatuuid
agentType?string|null
instanceId?string|null
instanceLabel?|

The computer's name this key was made on; null = unlabelled.

createdAt?string
Formatdate-time
expiresAt?|
Formatdate-time
approvalUrl?string

awaiting_approval: the page where the owner approves it.

revokedAt?|
Formatdate-time
revokedReason?string|null
replacedBy?|

revoked by replacement: when the replacing connection was created, and on which instance.

Example Request
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"  }}