Dominevo
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.

MethodKindTierToken scopeViewer
listDeviceCredentialsqueryadminadmin onlyno
startEnrollmentmutationadminadmin onlyno
revokeDeviceCredentialmutationadminadmin onlyno
getDeviceCertificateSettingsqueryadminadmin onlyno
setDeviceCertificateSettingsmutationadminadmin onlyno
deleteDeviceCredentialmutationadminadmin onlyno
getDeviceCaStatusqueryadminadmin onlyno
renameDeviceCredentialmutationadminadmin onlyno

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.listDeviceCredentials on 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.startEnrollment on 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.revokeDeviceCredential on 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.getDeviceCertificateSettings on your hub

Input

{}

Output

DeviceCertificateSettingsSchema

Shapes: 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.setDeviceCertificateSettings on your hub

Input

DeviceCertificateSettingsSchema

Output

DeviceCertificateSettingsSchema

Shapes: 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.deleteDeviceCredential on 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.getDeviceCaStatus on your hub

Input

{}

Output

DeviceCaStatusSchema

Shapes: 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.renameDeviceCredential on your hub

Input

{ id: string; deviceName: string }

Output

{ renamed: boolean }