openapi: 3.1.0 info: title: Dexwize Integration Service version: 1.0.0 description: > ServiceNow and Jira ticketing, inbound status webhooks, the ITSM context panel and the event relay to Teams (E16, ADR-0030). Connector credentials are encrypted per tenant and never returned. Outbound calls go only to vendor cloud hosts on https, never to private addresses and never follow redirects. Panel actions are forwarded to remediation-service with the caller's token, so remediation policy, autonomy level and approval always apply. security: - bearer: [] paths: /v1/integrations/connections: get: summary: List ticketing connections without secrets (TenantManage) operationId: listConnections responses: '200': description: OK content: application/json: schema: type: array items: $ref: '#/components/schemas/Connection' /v1/integrations/connections/{system}: parameters: - $ref: '#/components/parameters/System' put: summary: Create or replace a connection (TenantManage) description: > Send ServiceNow username and password or clientId and clientSecret; Jira email and apiToken. A new webhook secret is generated and returned once in this response; configure it in the vendor's outbound webhook. operationId: saveConnection requestBody: required: true content: application/json: schema: type: object required: - baseUrl properties: baseUrl: type: string format: uri description: 'https://.service-now.com or https://.atlassian.net' project: type: string description: Jira project key fieldMap: type: object maxProperties: 50 additionalProperties: type: string maxLength: 200 username: type: string password: type: string writeOnly: true clientId: type: string clientSecret: type: string writeOnly: true email: type: string apiToken: type: string writeOnly: true responses: '200': description: Saved content: application/json: schema: type: object properties: connection: $ref: '#/components/schemas/Connection' webhookSecret: type: string description: Shown once '400': description: Host not allowed, missing credentials or field map too large '403': { description: 'Missing permission, or the tenant plan does not include itsm_integration (ADR-0053): {"error":"feature_not_entitled","feature":"itsm_integration"}', content: { application/json: { schema: { $ref: '#/components/schemas/FeatureRefusal' } } } } '503': { description: 'Entitlements could not be confirmed and nothing usable is cached; itsm_integration is refused (fail closed). Retry-After is set.', content: { application/json: { schema: { $ref: '#/components/schemas/FeatureRefusal' } } } } delete: summary: Delete a connection (TenantManage) operationId: deleteConnection responses: '204': description: Deleted '404': description: No connection /v1/integrations/change-tickets: post: summary: Create the change ticket for an approved change (IntegrationsWrite; recommendation-service) description: Idempotent per change id; a second call returns the existing ticket. operationId: createChangeTicket requestBody: required: true content: application/json: schema: type: object required: - changeId - recommendationId - title - description - rollbackSteps - affectedDevices - windowStart - windowEnd properties: changeId: type: string format: uuid recommendationId: type: string format: uuid title: type: string description: type: string rollbackSteps: type: array items: type: string affectedDevices: type: integer windowStart: type: string format: date-time windowEnd: type: string format: date-time responses: '200': description: Ticket reference, or system none when the tenant has no connection content: application/json: schema: type: object properties: system: type: string enum: - servicenow - jira - none externalReference: type: - string - 'null' '502': description: Vendor call failed /v1/integrations/service-tickets: post: summary: Open an incident for a workflow step or an employee agent request (IntegrationsWrite) description: One ticket per subject id; repeat calls return the existing ticket. operationId: createServiceTicket requestBody: required: true content: application/json: schema: type: object required: - subjectId - summary - description - priority properties: subjectId: type: string maxLength: 200 summary: type: string maxLength: 200 description: type: string maxLength: 4000 priority: type: integer minimum: 1 maximum: 4 callerEmail: type: - string - 'null' configurationItem: type: - string - 'null' responses: '200': description: Ticket reference, or system none when the tenant has no connection content: application/json: schema: type: object properties: system: type: string enum: - servicenow - jira - none externalReference: type: - string - 'null' '400': description: Invalid fields '502': description: Vendor call failed /v1/integrations/subject-status: post: summary: Mirror a change, remediation or finding status to its ticket (IntegrationsWrite) operationId: mirrorSubjectStatus requestBody: required: true content: application/json: schema: type: object required: - subjectType - subjectId - kind - status - note properties: subjectType: $ref: '#/components/schemas/SubjectType' subjectId: type: string kind: type: string enum: - Incident - Change status: $ref: '#/components/schemas/TicketStatus' note: type: string maxLength: 4000 responses: '200': description: Whether a linked ticket was updated content: application/json: schema: type: object properties: mirrored: type: boolean '502': description: Vendor call failed /v1/integrations/events: post: summary: Relay a finding or approval event to notification-service for Teams (IntegrationsWrite) description: Only High and Critical findings and approval requests are relayed. operationId: relayEvent requestBody: required: true content: application/json: schema: type: object required: - type - id properties: type: type: string enum: - finding.raised - recommendation.approval_requested id: type: string title: type: - string - 'null' severity: type: - string - 'null' devices: type: - integer - 'null' responses: '200': description: Whether the event was relayed content: application/json: schema: type: object properties: relayed: type: boolean /v1/integrations/links: get: summary: Ticket linked to a subject (FindingsRead) operationId: getTicketLink parameters: - name: subjectType in: query required: true schema: $ref: '#/components/schemas/SubjectType' - name: subjectId in: query required: true schema: type: string responses: '200': description: OK content: application/json: schema: type: object properties: system: type: string externalKey: type: string subjectType: $ref: '#/components/schemas/SubjectType' subjectId: type: string status: $ref: '#/components/schemas/TicketStatus' updatedAt: type: string format: date-time '404': description: No linked ticket /v1/integrations/webhooks/{system}/{tenantId}: parameters: - $ref: '#/components/parameters/System' - name: tenantId in: path required: true schema: type: string format: uuid post: summary: Inbound vendor status webhook description: > Anonymous; authenticated by an HMAC-SHA256 signature of the raw body with the connection's webhook secret (ServiceNow x-dexwize-signature; Jira x-hub-signature). Delivery ids make it idempotent. An unknown tenant and a bad signature both return 401. Bodies over 256 KB are refused. operationId: receiveWebhook security: [] requestBody: required: true content: application/json: schema: type: object responses: '200': description: Applied, duplicate or ignored content: application/json: schema: type: object properties: outcome: type: string enum: - Applied - Duplicate - Ignored '400': description: Body is not JSON '401': description: Unknown connection or bad signature '413': description: Body too large '429': description: Rate limited /v1/itsm/panel: get: summary: Device context for a ticket (DevicesRead) description: Actions are listed only when the caller holds RemediationExecute. operationId: getItsmPanel parameters: - name: ci in: query schema: type: string description: Configuration item name (device hostname) - name: caller in: query schema: type: string description: Caller user principal name; used when there is no configuration item responses: '200': description: OK content: application/json: schema: type: object properties: device: type: object score: type: - object - 'null' openFindings: type: - object - array - 'null' recentChanges: type: array items: type: object actions: type: array items: type: object properties: actionId: type: string title: type: string category: type: string autonomyLevelRequired: type: string '400': description: Neither ci nor caller given '404': description: Device not found in this tenant '403': { description: 'Missing permission, or the tenant plan does not include itsm_integration (ADR-0053): {"error":"feature_not_entitled","feature":"itsm_integration"}', content: { application/json: { schema: { $ref: '#/components/schemas/FeatureRefusal' } } } } '503': { description: 'Entitlements could not be confirmed and nothing usable is cached; itsm_integration is refused (fail closed). Retry-After is set.', content: { application/json: { schema: { $ref: '#/components/schemas/FeatureRefusal' } } } } /v1/itsm/actions: post: summary: Request a library action from the ticket (RemediationExecute) description: Forwarded to remediation-service as the caller; its status code and body are returned unchanged. operationId: requestItsmAction requestBody: required: true content: application/json: schema: type: object required: - actionId - deviceId properties: actionId: type: string deviceId: type: string format: uuid ticketRef: type: - string - 'null' responses: '201': description: Remediation created (pending approval or queued, per policy) content: application/json: schema: type: object '403': { description: 'Refused by remediation policy, missing permission, or the tenant plan does not include itsm_integration (ADR-0053): {"error":"feature_not_entitled","feature":"itsm_integration"}', content: { application/json: { schema: { $ref: '#/components/schemas/FeatureRefusal' } } } } '503': { description: 'Entitlements could not be confirmed and nothing usable is cached; itsm_integration is refused (fail closed). Retry-After is set.', content: { application/json: { schema: { $ref: '#/components/schemas/FeatureRefusal' } } } } /v1/integrations/ai-usage: get: summary: AI tool usage per department from the connected AI governance source (KavachLab), k-anonymised with a minimum group of 5 (ReportsRead) operationId: getAiUsage parameters: - { name: days, in: query, description: 'Window, clamped to 7-180', schema: { type: integer, default: 30 } } responses: '200': description: "Published cells only; cells below 5 people merge into Other or are suppressed and counted" content: application/json: schema: { $ref: '#/components/schemas/AiUsageSummary' } '403': { description: Missing ReportsRead } '404': { description: No AI governance source is connected for the tenant (error ai_usage_source_not_connected) } /v1/support/tickets: get: summary: The caller's tenant's support requests, newest first (TenantRead) description: > Phase D support desk intake. Requests from the portal and from email to the support address; each is copied to the platform support desk and its status follows the desk. operationId: listSupportTickets parameters: - { name: limit, in: query, schema: { type: integer, default: 100, minimum: 1, maximum: 200 } } responses: '200': description: OK content: application/json: schema: type: array items: { $ref: '#/components/schemas/SupportTicket' } '403': { description: Missing TenantRead } post: summary: Raise a support request for the caller's tenant (TenantRead; not from JIT or platform sessions) operationId: createSupportTicket requestBody: required: true content: application/json: schema: { $ref: '#/components/schemas/CreateSupportTicket' } responses: '201': description: Created; forwarded is false while the support desk could not be reached (retried automatically) content: application/json: schema: { $ref: '#/components/schemas/SupportTicket' } '400': { description: Validation failed } '403': { description: 'Missing TenantRead, or a JIT or platform session' } /v1/support/tickets/{id}: get: summary: One of the caller's tenant's support requests (TenantRead) operationId: getSupportTicket parameters: - { name: id, in: path, required: true, schema: { type: string, format: uuid } } responses: '200': description: OK content: application/json: schema: { $ref: '#/components/schemas/SupportTicket' } '404': { description: Not found in the caller's tenant } components: securitySchemes: bearer: type: http scheme: bearer bearerFormat: JWT parameters: System: name: system in: path required: true schema: type: string enum: - servicenow - jira schemas: FeatureRefusal: description: Module licensing refusal (ADR-0053); 403 feature_not_entitled or 503 entitlements_unavailable. type: object required: [error, feature] properties: error: { type: string, enum: [feature_not_entitled, entitlements_unavailable] } feature: { type: string, description: Feature code, for example remote_actions } SubjectType: type: string enum: - Change - Remediation - Finding TicketStatus: type: string enum: - Open - InProgress - Resolved - Closed - Cancelled SupportCategory: type: string enum: [Technical, Agent, Reports, Billing, Access, Security, Other] SupportSeverity: type: string description: Sev 1 (Critical) to Sev 4 (Low), as in the incident severity guide enum: [Critical, High, Medium, Low] CreateSupportTicket: type: object required: [category, severity, subject, description] properties: category: { $ref: '#/components/schemas/SupportCategory' } severity: { $ref: '#/components/schemas/SupportSeverity' } subject: { type: string, minLength: 3, maxLength: 200 } description: { type: string, minLength: 1, maxLength: 4000 } deviceId: { type: [string, 'null'], format: uuid } deviceName: { type: [string, 'null'], maxLength: 200 } SupportTicket: type: object required: [id, number, channel, category, severity, subject, description, status, forwarded, createdAt, updatedAt] properties: id: { type: string, format: uuid } number: { type: string, description: 'SUP-yyMMdd-XXXXXX' } channel: { type: string, enum: [Portal, Email] } category: { $ref: '#/components/schemas/SupportCategory' } severity: { $ref: '#/components/schemas/SupportSeverity' } subject: { type: string } description: { type: string } deviceId: { type: [string, 'null'], format: uuid } deviceName: { type: [string, 'null'] } requesterName: { type: [string, 'null'] } requesterEmail: { type: [string, 'null'] } status: { $ref: '#/components/schemas/TicketStatus' } deskReference: { type: [string, 'null'], description: The support desk's ticket key } forwarded: { type: boolean } createdAt: { type: string, format: date-time } updatedAt: { type: string, format: date-time } Connection: type: object properties: system: type: string enum: - ServiceNow - Jira baseUrl: type: string project: type: - string - 'null' fieldMap: type: object additionalProperties: type: string updatedAt: type: string format: date-time updatedBy: type: string webhookPath: type: string AiToolUsage: type: object required: [department, tool, activeUsers, prompts, licensedSeats] properties: department: { type: string } tool: { type: string } activeUsers: { type: integer, minimum: 5 } prompts: { type: integer } licensedSeats: { type: integer } seatUtilisation: { type: [number, 'null'] } AiUsageSummary: type: object required: [from, to, source, minGroupSize, rows, activeUsersByTool, suppressedRows, contractStatus] properties: from: { type: string, format: date } to: { type: string, format: date } source: { type: string, enum: [kavachlab] } minGroupSize: { type: integer } rows: { type: array, items: { $ref: '#/components/schemas/AiToolUsage' } } activeUsersByTool: { type: object, additionalProperties: { type: integer } } suppressedRows: { type: integer } contractStatus: { type: string, description: 'assumed_contract_pending_live_verification until the KavachLab API is verified live' }