Appearance
dbo.ApiTokens
Info Generated by
scripts/Generate-DataDictionary.ps1- do not edit by hand. Edit descriptions inschemas/tables/dbo.ApiTokens.jsonand regenerate.
Columns
| # | Column | Type | Nullable | Flags | Description |
|---|---|---|---|---|---|
| 1 | Id | int | no | identity | Surrogate primary key for the stored API token record. |
| 2 | SystemName | nvarchar(100) | no | Name of the external system/integration this OAuth token belongs to (e.g. Prime Ecosystem, OptimoRoute). | |
| 3 | AccessToken | nvarchar(MAX) | no | OAuth access token used to authenticate calls to the external system's API. | |
| 4 | RefreshToken | nvarchar(MAX) | yes | OAuth refresh token used to obtain a new access token once the current one expires. | |
| 5 | TokenType | nvarchar(50) | yes | OAuth token type returned by the provider (e.g. "Bearer"). | |
| 6 | ExpiresIn | int | yes | Token lifetime in seconds from RetrievedAt, as returned by the OAuth provider. | |
| 7 | RetrievedAt | datetime2(0) | yes | Timestamp when this token was fetched/refreshed from the external system. | |
| 8 | ExpiresAt | datetime2(0) | yes | computed | Computed expiry timestamp (RetrievedAt + ExpiresIn) after which the token must be refreshed. |
Indexes
| Name | Type | Unique | PK | Key columns | Included | Filter |
|---|---|---|---|---|---|---|
| PK__ApiToken__3214EC078DA25450 | CLUSTERED | yes | yes | Id |
Referenced by
Procedures: dbo.spEthClearApiTokens, dbo.spEthGetLastApiToken, dbo.spEthResolveAppointmentContext, dbo.spPrimeUpsertApiToken

