Cumulocity Audit Records API

The Audit Records API from Cumulocity — 2 operation(s) for audit records.

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

cumulocity-audit-records-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Cumulocity Alarm Alarms Audit Records API
  version: 10.20.0
  description: 'Raise, query, acknowledge, clear, and bulk-update alarms with four severity levels (CRITICAL, MAJOR,

    MINOR, WARNING) and four statuses (ACTIVE, ACKNOWLEDGED, CLEARED). Cumulocity auto-deduplicates alarms

    by source + type so repeated raises increment the count rather than creating duplicates.

    '
servers:
- url: https://{tenant}.cumulocity.com
  variables:
    tenant:
      default: example
security:
- basicAuth: []
- bearerAuth: []
tags:
- name: Audit Records
paths:
  /audit/auditRecords:
    get:
      tags:
      - Audit Records
      summary: List Audit Records
      operationId: listAuditRecords
      parameters:
      - name: source
        in: query
        schema:
          type: string
      - name: type
        in: query
        schema:
          type: string
      - name: user
        in: query
        schema:
          type: string
      - name: application
        in: query
        schema:
          type: string
      - name: dateFrom
        in: query
        schema:
          type: string
          format: date-time
      - name: dateTo
        in: query
        schema:
          type: string
          format: date-time
      - name: revert
        in: query
        schema:
          type: boolean
      responses:
        '200':
          description: A collection of audit records.
          content:
            application/vnd.com.nsn.cumulocity.auditRecordCollection+json:
              schema:
                $ref: '#/components/schemas/AuditRecordCollection'
    post:
      tags:
      - Audit Records
      summary: Create an Audit Record
      operationId: createAuditRecord
      requestBody:
        required: true
        content:
          application/vnd.com.nsn.cumulocity.auditRecord+json:
            schema:
              $ref: '#/components/schemas/AuditRecord'
      responses:
        '201':
          description: Audit record created.
  /audit/auditRecords/{id}:
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: string
    get:
      tags:
      - Audit Records
      summary: Retrieve an Audit Record
      operationId: getAuditRecord
      responses:
        '200':
          description: A single audit record.
components:
  schemas:
    AuditRecord:
      type: object
      properties:
        id:
          type: string
          readOnly: true
        self:
          type: string
          format: uri
          readOnly: true
        activity:
          type: string
        application:
          type: string
        severity:
          type: string
          enum:
          - CRITICAL
          - MAJOR
          - MINOR
          - WARNING
          - INFORMATION
        text:
          type: string
        time:
          type: string
          format: date-time
        type:
          type: string
        user:
          type: string
        source:
          type: object
          properties:
            id:
              type: string
            self:
              type: string
              format: uri
        changes:
          type: array
          items:
            type: object
            properties:
              attribute:
                type: string
              type:
                type: string
              previousValue: {}
              newValue: {}
              changeType:
                type: string
                enum:
                - ADDED
                - REPLACED
                - REMOVED
    AuditRecordCollection:
      type: object
      properties:
        self:
          type: string
          format: uri
        auditRecords:
          type: array
          items:
            $ref: '#/components/schemas/AuditRecord'
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT