openapi: 3.1.0 info: title: Dexwize Ingest Service version: 1.0.0 description: > Telemetry intake for enrolled agents. Devices authenticate with their enrolled Ed25519 key (the envelope signature) and mTLS at the gateway; no user token is involved. The decompressed payload must validate against contracts/events/telemetry-batch.v1.schema.json, and its tenant_id and device_id must match the key registration. paths: /v1/ingest/batches: post: summary: Submit a signed telemetry batch operationId: ingestBatch security: [] requestBody: required: true content: application/json: schema: { $ref: '#/components/schemas/SignedEnvelope' } responses: '202': description: Accepted, or already received (idempotent on batch_id) content: application/json: schema: type: object required: [batch_id, status, records] properties: batch_id: { type: string, format: uuid } status: { type: string, enum: [accepted, duplicate] } records: { type: integer } '400': { $ref: '#/components/responses/Rejected' } '401': description: Unknown device key, invalid signature or unsupported algorithm (re-enrol if persistent) '403': description: Device revoked, or batch identity does not match the key registration '413': description: Envelope over 8 MB or decompressed payload over 16 MB components: responses: Rejected: description: Malformed envelope or schema violation content: application/json: schema: type: object properties: error: type: string enum: [MalformedEnvelope, MalformedPayload, SchemaViolation] schemas: SignedEnvelope: type: object additionalProperties: false required: [alg, key_id, signature, payload] properties: alg: { const: ed25519 } key_id: { type: string, maxLength: 128 } signature: type: string contentEncoding: base64 description: Ed25519 over "dexwize-batch-v1\0" || key_id || "\0" || payload bytes payload: type: string contentEncoding: base64 description: gzip-compressed UTF-8 JSON telemetry batch