openapi: 3.1.0 info: title: Dexwize Usage Service version: 1.0.0 description: > Aggregated usage analytics (E06) and the employee transparency API. Every published row represents at least 5 devices; smaller groups merge into "(other)" or are suppressed. Reports contain no device, user or pseudonymous identifiers. Cross-tenant and other-employee access returns 404. servers: - url: https://api.dexwize.example security: - bearer: [] paths: /v1/usage/report: get: summary: Aggregated usage by department or device group (ReportsRead) operationId: getUsageReport parameters: - { name: groupBy, in: query, schema: { type: string, enum: [department, device_group], default: department } } - { name: from, in: query, schema: { type: string, format: date-time }, description: Defaults to 7 days before "to". } - { name: to, in: query, schema: { type: string, format: date-time }, description: Defaults to now. Period at most 90 days. } responses: '200': description: OK content: application/json: schema: { $ref: '#/components/schemas/UsageReport' } '400': { description: Invalid groupBy or period } '403': { description: Missing ReportsRead } /v1/usage/reidentify: post: summary: Re-identify a pseudonym (tenant admin, Standard privacy mode only, always audited) operationId: reidentify requestBody: required: true content: application/json: schema: type: object required: [pseudonym] properties: pseudonym: { type: string } responses: '200': description: Mapping found content: application/json: schema: type: object properties: pseudonym: { type: string } user_id: { type: string } '403': { description: Missing PrivacySettingsManage } '404': { description: 'Unknown pseudonym, or tenant is in Strict mode' } /v1/transparency/me: get: summary: What is collected about my devices, and the tenant privacy settings (employee) operationId: getMyTransparency responses: '200': description: OK content: application/json: schema: { $ref: '#/components/schemas/TransparencyOverview' } '403': { description: Not an employee session (OwnDeviceRead) } /v1/transparency/me/devices/{deviceId}: get: summary: The metadata collected about one of my devices (employee) operationId: getMyDevice parameters: - { name: deviceId, in: path, required: true, schema: { type: string, format: uuid } } responses: '200': description: OK content: application/json: schema: { $ref: '#/components/schemas/DeviceCollectedData' } '404': { description: 'Not my device, or no data' } components: securitySchemes: bearer: { type: http, scheme: bearer, bearerFormat: JWT } schemas: UsageReport: type: object properties: groupBy: { type: string } from: { type: string, format: date-time } to: { type: string, format: date-time } minimumGroupSize: { type: integer, const: 5 } suppressedRows: { type: integer, description: Rows withheld because they represented fewer than 5 devices. } groups: type: array items: { $ref: '#/components/schemas/GroupUsage' } GroupUsage: type: object properties: groupKey: { type: string, description: 'Department or device group, "(other)" or "(unassigned)".' } deviceCount: { type: integer, minimum: 5 } avgConcurrentApps: { type: number } avgForegroundHoursPerDevicePerDay: { type: number } concurrencyBands: type: array items: { type: object, properties: { band: { type: string }, deviceCount: { type: integer, minimum: 5 } } } topApps: type: array items: type: object properties: app: { type: string } category: { type: string } deviceCount: { type: integer, minimum: 5 } avgForegroundHoursPerDevicePerDay: { type: number } idleOpenApps: type: array items: type: object properties: app: { type: string } category: { type: string } deviceCount: { type: integer, minimum: 5 } avgForegroundShare: { type: number } categoryShares: type: array items: type: object properties: category: { type: string } deviceCount: { type: integer, minimum: 5 } shareOfForeground: { type: number } browserTabs: type: [object, 'null'] properties: deviceCount: { type: integer, minimum: 5 } avgTabs: { type: number } p90Tabs: { type: number } TransparencyOverview: type: object properties: privacy: type: object properties: privacyMode: { type: string, enum: [Standard, Strict] } detailedTelemetryRetentionDays: { type: integer } rawBatchRetentionDays: { type: integer } usageMinimumGroupSize: { type: integer } neverCollected: { type: array, items: { type: string } } devices: type: array items: { $ref: '#/components/schemas/DeviceSummary' } DeviceSummary: type: object properties: deviceId: { type: string, format: uuid } model: { type: [string, 'null'] } os: { type: [string, 'null'] } lastSeen: { type: [string, 'null'], format: date-time } categories: type: array items: type: object properties: key: { type: string } enabled: { type: boolean } lastCollectedAt: { type: [string, 'null'], format: date-time } DeviceCollectedData: type: object properties: summary: { $ref: '#/components/schemas/DeviceSummary' } inventory: type: array items: type: object properties: { kind: { type: string }, name: { type: string }, publisher: { type: [string, 'null'] }, version: { type: [string, 'null'] } } counters: type: array items: type: object properties: { name: { type: string }, value: { type: number }, unit: { type: string }, collectedAt: { type: string, format: date-time } }