ReferenceHTTP API
deviceCredentials
The deviceCredentials router: 8 methods of the device-credentials capability, with tier, scope, input and output.
Capability device-credentials · scope system · mode singleton · source packages/types/src/capabilities/device-credentials.cap.ts:40.
Every method is called at /trpc/deviceCredentials.<method> — queries with GET, mutations with POST. See How to call and Authorization.
| Method | Kind | Tier | Token scope | Viewer |
|---|---|---|---|---|
listDeviceCredentials | query | admin | admin only | no |
startEnrollment | mutation | admin | admin only | no |
revokeDeviceCredential | mutation | admin | admin only | no |
getDeviceCertificateSettings | query | admin | admin only | no |
setDeviceCertificateSettings | mutation | admin | admin only | no |
deleteDeviceCredential | mutation | admin | admin only | no |
getDeviceCaStatus | query | admin | admin only | no |
renameDeviceCredential | mutation | admin | admin only | no |
deviceCredentials.listDeviceCredentials
- Kind: query —
GET /trpc/deviceCredentials.listDeviceCredentials - Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
- Token scope: none — the admin tier needs an administrator (a
*token or an admin session) - Viewer: no
- Try it: open
/system/api-explorer?method=deviceCredentials.listDeviceCredentialson your hub
Input
{ userId?: string; includeRevoked?: boolean = false }Output
({ id: string; userId: string; username: string | null; deviceName: string; platform: "ios" | "android" | "web" | "other"; enrolledVia: "qr" | "self"; fingerprint: string; issuedAt: number; expiresAt: number; lastUsedAt: number | null; lastUsedFrom: string | null; revokedAt: number | null; revokedBy: string | null; status: "active" | "expired" | "revoked" })[]deviceCredentials.startEnrollment
- Kind: mutation —
POST /trpc/deviceCredentials.startEnrollment - Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
- Token scope: none — the admin tier needs an administrator (a
*token or an admin session) - Viewer: no
- Try it: open
/system/api-explorer?method=deviceCredentials.startEnrollmenton your hub
Input
{ userId: string; deviceName: string }Output
{ code: string; expiresAt: number; enrollUrl: string; hubOrigin: string | null; hubOrigins: string[] }deviceCredentials.revokeDeviceCredential
- Kind: mutation —
POST /trpc/deviceCredentials.revokeDeviceCredential - Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
- Token scope: none — the admin tier needs an administrator (a
*token or an admin session) - Viewer: no
- Try it: open
/system/api-explorer?method=deviceCredentials.revokeDeviceCredentialon your hub
Input
{ id: string }Output
{ revoked: boolean; sessionsEnded: number; status: "active" | "expired" | "revoked" }deviceCredentials.getDeviceCertificateSettings
- Kind: query —
GET /trpc/deviceCredentials.getDeviceCertificateSettings - Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
- Token scope: none — the admin tier needs an administrator (a
*token or an admin session) - Viewer: no
- Try it: open
/system/api-explorer?method=deviceCredentials.getDeviceCertificateSettingson your hub
Input
{}Output
DeviceCertificateSettingsSchemaShapes: DeviceCertificateSettingsSchema
deviceCredentials.setDeviceCertificateSettings
- Kind: mutation —
POST /trpc/deviceCredentials.setDeviceCertificateSettings - Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
- Token scope: none — the admin tier needs an administrator (a
*token or an admin session) - Viewer: no
- Try it: open
/system/api-explorer?method=deviceCredentials.setDeviceCertificateSettingson your hub
Input
DeviceCertificateSettingsSchemaOutput
DeviceCertificateSettingsSchemaShapes: DeviceCertificateSettingsSchema
deviceCredentials.deleteDeviceCredential
- Kind: mutation —
POST /trpc/deviceCredentials.deleteDeviceCredential - Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
- Token scope: none — the admin tier needs an administrator (a
*token or an admin session) - Viewer: no
- Try it: open
/system/api-explorer?method=deviceCredentials.deleteDeviceCredentialon your hub
Input
{ id: string }Output
{ result: "deleted" | "live" | "unknown" }deviceCredentials.getDeviceCaStatus
- Kind: query —
GET /trpc/deviceCredentials.getDeviceCaStatus - Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
- Token scope: none — the admin tier needs an administrator (a
*token or an admin session) - Viewer: no
- Try it: open
/system/api-explorer?method=deviceCredentials.getDeviceCaStatuson your hub
Input
{}Output
DeviceCaStatusSchemaShapes: DeviceCaStatusSchema
deviceCredentials.renameDeviceCredential
- Kind: mutation —
POST /trpc/deviceCredentials.renameDeviceCredential - Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
- Token scope: none — the admin tier needs an administrator (a
*token or an admin session) - Viewer: no
- Try it: open
/system/api-explorer?method=deviceCredentials.renameDeviceCredentialon your hub
Input
{ id: string; deviceName: string }Output
{ renamed: boolean }