В API получения данных аудита могут появляться новые действия. При этом версия API может не меняться.

Описание: Список данных аудита, отсортированных по дате и времени зарегистрированного действия пользователя.

Метод: GET

Ресурс: audit

Параметры:

schemas:
    auditCommon:
      type: object
      required: [AUDIT_LOG_ID, CHANGE_DATE, OPERATION, ENTITY_TYPE]
      properties: &common
        AUDIT_LOG_ID:
          type: integer
          description: Audit log id
        USER_ID:
          type: integer
          nullable: true
          description: |
            User id who performed the action (See /xapi/user).
            USER_ID may be null on login or if changes make by plugin.
        CHANGER_NAME:
          type: string
          nullable: true
          description: |
            User name or Plugin name who performed the action.
            May be null on login.
        CHANGE_DATE:
          type: string
          description: Date and time of the registered user action with format "Y-m-d H:i:s.u" in UTC
          example: "2020-05-14 13:53:52.926560"
        OPERATION:
          type: string
          description: Operation type over which the action was performed. There may be values not from the enum.
          enum:
            - run
            - canceled
            - start
            - stop
            - restart
            - view
            - create
            - update
            - change
            - delete
            - delete_ref
            - delete_hash
            - copy
            - move
            - login_failure
            - bruteforce
            - login
            - logout
            - change_password
            - commit
            - rollback
            - draft
            - add
            - import
            - export
            - export_object
            - create_widget
            - update_widget
            - delete_widget
            - download
            - sync
            - decision_update
            - add_tag
            - remove_tag
            - add_role
            - remove_role
            - add_visibility_area
            - remove_visibility_area
            - logging
            - apply_inbound
            - xapi_decision_update
            - start_scan_job
            - apply_result_scan_job
            - update_job_schedule
            - create_log
            - plugin_register
            - plugin_update
            - privileges_update
            - privileges_create
            - notification
            - notification_template
            - notification_test
            - upload_image
            - delete_image
            - create_contact
            - update_contact
            - delete_contact
            - compile_create
            - compile_update
            - create_template
            - update_template
            - delete_template
            - create_rule
            - update_rule
            - delete_rule
            - notification_test
        ENTITY_TYPE:
          type: string
          description: Entity type over which the action was performed. There may be values not from the enum.
          enum: *entryTypes
        ENTITY_ID:
          type: string
          nullable: true
          description: |
            ID of the entity which the action was performed. May be GUID or integer as string
            May by null for:
            | OPERATION | ENTITY_TYPE |
            | :--- | :--- |
            | commit | Config |
            | run | QueryReportRun |
            | sync | Adlibitum |
            | login | User |
            | rollback | Config |
          example: "DBAF4F834F7647CBB297BC9DD17B77B100000000"
        ENTITY_DISPLAY_NAME:
          type: string
          nullable: true
          description: The name of the entity over which the action was carried out
          example: "Some name"
        PROPERTY_CHANGES:
          type: object
          nullable: true
          description: Null in default Audit log events
    userLoginLogout:
      type: object
      description: For ENTITY_TYPE User and OPERATION login or logout
      properties:
        <<: *common
        OPERATION:
          type: string
          enum: [login, logout]
        ENTITY_TYPE:
          type: string
          enum: [User]
        PROPERTY_CHANGES:
          type: object
          nullable: true
          required: [request]
          properties:
            request:
              required:
                - hostname
                - ip
                - result
                - login
              properties:
                hostname:
                  type: string
                  title: Hostname
                  description: Hostname from which authorization passed
                ip:
                  type: string
                  title: Ip address
                  description: Ip address from which authorization passed
                result:
                  type: string
                  title: Result
                  description: Result
                  enum:
                    - login_failure
                    - login
                    - logout
                login:
                  type: string
                  title: User login
                  description: Entered user login in input
    userBruteForce:
      type: object
      description: For ENTITY_TYPE User and OPERATION login with bruteforce
      properties:
        <<: *common
        OPERATION:
          type: string
          enum: [ bruteforce ]
        ENTITY_TYPE:
          type: string
          enum: [ User ]
        PROPERTY_CHANGES:
          type: object
          nullable: true
          required: [ login ]
          properties:
            request:
              required:
                - login
                - display_name
              properties:
                login:
                  type: string
                  title: User login
                  description: Entered user login in input
                display_name:
                  type: string
                  title: User full name
                  description: User full name
    tagPropertyChanges:
      type: object
      properties:
        <<: *common
        ENTITY_TYPE:
          type: string
          enum: [ Object ]
        OPERATION:
          type: string
          enum: [ add_tag, remove_tag ]
        PROPERTY_CHANGES:
          type: object
          properties:
            new:
              $ref: '#/components/schemas/TagDiffProperties'
            old:
              $ref: '#/components/schemas/TagDiffProperties'
    TagDiffProperties:
      type: object
      properties:
        DISPLAY_NAME:
          type: string
        NOTE:
          type: string
    userDesicionPropertyChanges:
      type: object
      properties:
        <<: *common
        ENTITY_TYPE:
          type: string
          enum: [ Object ]
        OPERATION:
          type: string
          enum: [ decision_update, xapi_decision_update ]
        PROPERTY_CHANGES:
          type: object
          properties:
            new:
              type: object
              properties:
                USER_DECISION:
                  $ref: '#/components/schemas/UserDecisionState'
            old:
              type: object
              properties:
                USER_DECISION:
                  $ref: '#/components/schemas/UserDecisionState'
    UserDecisionState:
      type: string
      enum: [ NotProcessed, NoViolation, Violation, AdditionalProcessingNeeded ]
    objectExportPropertyChanges:
      type: object
      properties:
        <<: *common
        ENTITY_TYPE:
          type: string
          enum: [ Object ]
        OPERATION:
          type: string
          enum: [ export_object ]
        PROPERTY_CHANGES:
          type: object
          properties:
            new:
              type: object
              properties:
                PARAMS:
                  type: object
                  properties:
                    QUERY_ID:
                      type: integer
                      nullable: true
                    DISPLAY_NAME:
                      type: string
                    COMMENT:
                      type: string
                    FILTER:
                      anyOf:
                        - type: object
                        - type: array
                    SORT:
                      type: object
                    IS_ONE_REPORT:
                      $ref: '#/components/schemas/BooleanAsInteger'
                    ONE_LOAD_REPORT:
                      $ref: '#/components/schemas/BooleanAsInteger'
                    FORMAT:
                      type: string
                      enum: [ simple, full ]
                    TYPE:
                      type: object
                      properties:
                        one_report:
                          type: string
                          enum: [ docx, xls, xlsx, pdf ]
                        several_report:
                          type: string
                          enum: [ docx, pdf ]
                    IS_SEVERAL_REPORT:
                      $ref: '#/components/schemas/BooleanAsInteger'
                    SEVERAL_LOAD_REPORT:
                      $ref: '#/components/schemas/BooleanAsInteger'
                    LOAD_ATTACHMENT:
                      $ref: '#/components/schemas/BooleanAsInteger'
                    KEEP_HIERARCHY:
                      $ref: '#/components/schemas/BooleanAsInteger'
                    LOAD_SNIPPET:
                      $ref: '#/components/schemas/BooleanAsInteger'
                    LOAD_EML:
                      $ref: '#/components/schemas/BooleanAsInteger'
                    LOAD_DEBUG_OBJECT:
                      $ref: '#/components/schemas/BooleanAsInteger'
                    SCOPE:
                      oneOf:
                        - type: string
                          enum: [ all ]
                        - type: array
                          items:
                            type: integer
                    GROUPING:
                      type: array
                      items:
                        type: string
                        enum: [CaptureDate, Computer, Object, ObjectType, Person]
                    IS_REPORT_ARCHIVE:
                      $ref: '#/components/schemas/BooleanAsInteger'
    BooleanAsStringOrInteger:
      $ref: 'common.yaml#/components/schemas/BooleanAsStringOrInteger'
    BooleanAsInteger:
      $ref: 'common.yaml#/components/schemas/BooleanAsInteger'
    BooleanAsString:
      $ref: 'common.yaml#/components/schemas/BooleanAsString'
  

Пример:

curl -X GET "https://server.company.ru/xapi/audit?sort[change_date]=asc&filter[entity_type][]=Adlibitum&filter[entity_type][]=Audit&filter[entity_type][]=Config&filter[entity_type][]=Perimeter&filter[entity_type][]=Policy&start=0&limit=5" -H "accept: application/json" -H "X-Enable-OpenAPI: 1"


{
  "data": [
    {
      "AUDIT_LOG_ID": 0,
      "USER_ID": 0,
      "CHANGER_NAME": "string",
      "CHANGE_DATE": "2020-05-14 13:53:52.926560",
      "OPERATION": "run",
      "ENTITY_TYPE": "Adlibitum",
      "ENTITY_ID": "DBAF4F834F7647CBB297BC9DD17B77B100000000",
      "ENTITY_DISPLAY_NAME": "Some name",
      "PROPERTY_CHANGES": {}
    },
    {
      "AUDIT_LOG_ID": 0,
      "USER_ID": 0,
      "CHANGER_NAME": "string",
      "CHANGE_DATE": "2020-05-14 13:53:52.926560",
      "OPERATION": "login",
      "ENTITY_TYPE": "User",
      "ENTITY_ID": "DBAF4F834F7647CBB297BC9DD17B77B100000000",
      "ENTITY_DISPLAY_NAME": "Some name",
      "PROPERTY_CHANGES": {
        "request": {
          "hostname": "string",
          "ip": "string",
          "result": "login_failure",
          "login": "string"
        }
      }
    },
    {
      "AUDIT_LOG_ID": 0,
      "USER_ID": 0,
      "CHANGER_NAME": "string",
      "CHANGE_DATE": "2020-05-14 13:53:52.926560",
      "OPERATION": "run",
      "ENTITY_TYPE": "Policy",
      "ENTITY_ID": "DBAF4F834F7647CBB297BC9DD17B77B100000000",
      "ENTITY_DISPLAY_NAME": "Some name",
      "PROPERTY_CHANGES": {
        "old": {
          "DISPLAY_NAME": "string",
          "NOTE": "string",
          "STATUS": 0,
          "START_DATE": "string",
          "END_DATE": "string",
          "DATA": {
            "ITEMS": [
              {
                "TYPE": "catalog",
                "ID": "string",
                "NAME": "string"
              },
              {
                "TYPE": "fileformat",
                "ID": "string",
                "NAME": "string",
                "MIME_TYPE": "string",
                "ENCRYPTED": 0,
                "MERGED": 0,
                "MAX": 0,
                "MIN": 0,
                "MAX_TYPE": 0,
                "MIN_TYPE": 0
              }
            ]
          }
        },
        "new": {
          "DISPLAY_NAME": "string",
          "NOTE": "string",
          "STATUS": 0,
          "START_DATE": "string",
          "END_DATE": "string",
          "DATA": {
            "ITEMS": [
              {
                "TYPE": "catalog",
                "ID": "string",
                "NAME": "string"
              },
              {
                "TYPE": "fileformat",
                "ID": "string",
                "NAME": "string",
                "MIME_TYPE": "string",
                "ENCRYPTED": 0,
                "MERGED": 0,
                "MAX": 0,
                "MIN": 0,
                "MAX_TYPE": 0,
                "MIN_TYPE": 0
              }
            ]
          }
        },
        "rule": {
          "ENTITY_TYPE": "PolicyRule",
          "ENTITY_ID": "string",
          "ENTITY_DISPLAY_NAME": "string"
        }
      }
    }
  ],
  "meta": {
    "totalCount": 0,
    "start": 0,
    "limit": 0
  }
}