| Back | Main view

IMiS/Storage Connector Services REST - Audit log

Product:IMiS/StorageConnector Services REST
Release:9.6.2010
Date:07/20/2021

Case: IMiS/Storage Connector Services REST - Audit log

Description:

This example demonstrates operations which reads audit log with parameters and statistics on the IMiS/ARChive Server.
Requests and responses are in JSON format.
Below is a description of operations for the reading audit log.


1. Directory entity audit log read

Operation reads the audit log for directory entity "kclay", results are sorted by date in descending order.

Request
POST archives/{archiveId}/audit_log.json


Headers:
- Authorization: Bearer <session-token>
- Content-Type: application/json;charset=utf-8

Body:
{
  "refresh": true,
  "statistic": true,
  "usernames": [
    "kclay"
  ],
  "page_start": 0,
  "page_size": 5,
  "sort_by_date": "DESCENDING"
}

Response

Body:
{
  "events": [
    {
      "classification_code": "C=14^F=01/002/03^D=000005",
      "computer_name": "DESKTOP-LB1R5U3",
      "details": "Dokument [Dk2tjjVOKxhsnPtZF-Eukx8hZMAlyVdQ]",
      "id": "fRLG0U10wPzwV2juxWU6ks6oohIdv12x",
      "public_address": "192.168.100.63",
      "public_classification_code": "14-01/002/03/000005",
      "time": "2020-11-09T09:17:55Z",
      "type": "CONTENT_PART_SAVE",
      "user": {
        "id": "kclay",
        "email": "keira.clay@acme.com",
        "first_name": "Keira",
        "icon_url": "https://apps.imis.eu/scsvc/archives/IARC/directory/kclay/avatar",
        "last_name": "Clay",
        "type": "USER"
      }
    },
    {
      "classification_code": "C=14^F=01/002/03^D=000005",
      "computer_name": "DESKTOP-LB1R5U3",
      "details": "Dokument [Dk2tjjVOKxhsnPtZF-Eukx8hZMAlyVdQ]",
      "id": "fRLG0U10wPzwV2juxWU6ks6oohIdv12x",
      "public_address": "192.168.100.63",
      "public_classification_code": "14-01/002/03/000005",
      "time": "2020-11-09T09:17:55Z",
      "type": "CONTENT_PART_OPEN_READ_WRITE",
      "user": {
        "id": "kclay",
        "email": "keira.clay@acme.com",
        "first_name": "Keira",
        "icon_url": "https://apps.imis.eu/scsvc/archives/IARC/directory/kclay/avatar",
        "last_name": "Clay",
        "type": "USER"
      }
    },
    {
      "classification_code": "C=14^F=01/002/03^D=000005",
      "computer_name": "DESKTOP-LB1R5U3",
      "details": "Dokument [Dk2tjjVOKxhsnPtZF-Eukx8hZMAlyVdQ]",
      "id": "fRLG0U10wPzwV2juxWU6ks6oohIdv12x",
      "public_address": "192.168.100.63",
      "public_classification_code": "14-01/002/03/000005",
      "time": "2020-11-09T09:17:55Z",
      "type": "CONTENT_PART_SAVE",
      "user": {
        "id": "kclay",
        "email": "keira.clay@acme.com",
        "first_name": "Keira",
        "icon_url": "https://apps.imis.eu/scsvc/archives/IARC/directory/kclay/avatar",
        "last_name": "Clay",
        "type": "USER"
      }
    },
    {
      "classification_code": "C=14^F=01/002/03^D=000005",
      "computer_name": "DESKTOP-LB1R5U3",
      "details": "Dokument [Dk2tjjVOKxhsnPtZF-Eukx8hZMAlyVdQ]",
      "id": "fRLG0U10wPzwV2juxWU6ks6oohIdv12x",
      "public_address": "192.168.100.63",
      "public_classification_code": "14-01/002/03/000005",
      "time": "2020-11-09T09:17:55Z",
      "type": "CONTENT_PART_CREATE",
      "user": {
        "id": "kclay",
        "email": "keira.clay@acme.com",
        "first_name": "Keira",
        "icon_url": "https://apps.imis.eu/scsvc/archives/IARC/directory/kclay/avatar",
        "last_name": "Clay",
        "type": "USER"
      }
    },
    {
      "classification_code": "C=5^D=IS-CODE-923",
      "computer_name": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36 Edg/86.0.622.51",
      "id": "59g3Xn9ZPQ-7QS3C8lrbdcTecIBi_bHT",
      "local_address": "192.168.100.64",
      "public_address": "192.168.50.15",
      "public_classification_code": "5/IS-CODE-923",
      "time": "2020-10-23T12:42:41Z",
      "type": "ENTITY_SAVE",
      "user": {
        "id": "kclay",
        "email": "keira.clay@acme.com",
        "first_name": "Keira",
        "icon_url": "https://apps.imis.eu/scsvc/archives/IARC/directory/kclay/avatar",
        "last_name": "Clay",
        "type": "USER"
      },
      "version": 9,
      "version_label": "4.0.0.1"
    }
  ],
  "size": 749,
  "statistic": {
    "days": [
      {
        "date": "2020-02-21+01:00",
        "events": 104
      },
      {
        "date": "2020-02-26+01:00",
        "events": 107
      },
      {
        "date": "2020-11-09+01:00",
        "events": 16
      }
    ],
    "users": [
      {
        "date": "2020-02-21+01:00",
        "users": 1
      },
      {
        "date": "2020-02-26+01:00",
        "users": 1
      },
      {
        "date": "2020-11-09+01:00",
        "users": 1
      }
    ]
  }
}

2. Audit log query events read

Operation reads the audit log after 01.08.2021, with audit log query event type, results are sorted by date in descending order.

Request
POST archives/{archiveId}/audit_log.json


Headers:
- Authorization: Bearer <session-token>
- Content-Type: application/json;charset=utf-8

Body:
{
  "after": "2021-08-01T15:47:57+0200",
  "events": [
    "AUDIT_LOG_QUERY"
  ],
  "refresh": true,
  "statistic": true,
  "page_start": 0,
  "page_size": 5,
  "sort_by_date": "DESCENDING"
}

Response

Body:
{
  "events": [
    {
      "computer_name": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36",
      "details": "Requested all audit events where object  'acc46dbed572b1ef5c8e485b1f2ad7f1950d496de22ee570' ",
      "local_address": "192.168.100.51",
      "public_address": "192.168.50.15",
      "time": "2021-08-24T13:49:24Z",
      "type": "AUDIT_LOG_QUERY",
      "user": {
        "id": "anelson",
        "email": "alex.nelson@acme.com",
        "first_name": "Alex",
        "icon_url": "https://apps.imis.eu/scsvc/archives/IARC/directory/anelson/avatar",
        "last_name": "Nelson",
        "type": "USER"
      }
    },
    {
      "computer_name": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36",
      "details": "Requested all audit events from '2021-08-01T13:47:57Z' to '8191-12-31T23:59:59.999Z' ",
      "local_address": "192.168.80.64",
      "public_address": "192.168.50.15",
      "time": "2021-08-24T13:48:54Z",
      "type": "AUDIT_LOG_QUERY",
      "user": {
        "id": "admin",
        "email": "admin@acme.com",
        "first_name": "",
        "icon_url": "https://apps.imis.eu/scsvc/archives/IARC/directory/admin/avatar",
        "last_name": "Administrator",
        "type": "USER"
      }
    },
    {
      "computer_name": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36",
      "details": "Requested all audit events for user 'kclay' ",
      "local_address": "192.168.80.64",
      "public_address": "192.168.50.15",
      "time": "2021-08-24T13:45:14Z",
      "type": "AUDIT_LOG_QUERY",
      "user": {
        "id": "admin",
        "email": "admin@acme.com",
        "first_name": "",
        "icon_url": "https://apps.imis.eu/scsvc/archives/IARC/directory/admin/avatar",
        "last_name": "Administrator",
        "type": "USER"
      }
    },
    {
      "computer_name": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36",
      "details": "Requested all audit events for user 'kclay' ",
      "local_address": "192.168.80.64",
      "public_address": "192.168.50.15",
      "time": "2021-08-24T13:44:33Z",
      "type": "AUDIT_LOG_QUERY",
      "user": {
        "id": "admin",
        "email": "admin@acme.com",
        "first_name": "",
        "icon_url": "https://apps.imis.eu/scsvc/archives/IARC/directory/admin/avatar",
        "last_name": "Administrator",
        "type": "USER"
      }
    },
    {
      "computer_name": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36",
      "details": "Requested all audit events for user 'kclay' ",
      "local_address": "192.168.80.64",
      "public_address": "192.168.50.15",
      "time": "2021-08-24T13:44:14Z",
      "type": "AUDIT_LOG_QUERY",
      "user": {
        "id": "admin",
        "email": "admin@acme.com",
        "first_name": "",
        "icon_url": "https://apps.imis.eu/scsvc/archives/IARC/directory/admin/avatar",
        "last_name": "Administrator",
        "type": "USER"
      }
    }
  ],
  "size": 76,
  "statistic": {
    "days": [
      {
        "date": "2021-08-20+02:00",
        "events": 2
      },
      {
        "date": "2021-08-23+02:00",
        "events": 3
      },
      {
        "date": "2021-08-24+02:00",
        "events": 12
      }
    ],
    "users": [
      {
        "date": "2021-08-20+02:00",
        "users": 2
      },
      {
        "date": "2021-08-23+02:00",
        "users": 1
      },
      {
        "date": "2021-08-24+02:00",
        "users": 2
      }
    ]
  }
}

3. Entity audit log read

Operation reads the audit log for entity with id "UI5xIqUKX70ano1FhnLNNnV_G2TJTR71", directory entity "anelson" and after 01.08.2021, results are sorted by date in descending order.

Request
POST archives/{archiveId}/audit_log.json


Headers:
- Authorization: Bearer <session-token>
- Content-Type: application/json;charset=utf-8

Body:
{
  "after": "2021-08-01T15:47:57+0200",
  "id": "UI5xIqUKX70ano1FhnLNNnV_G2TJTR71",
  "recursive": false,
  "refresh": true,
  "statistic": true,
  "usernames": [
    "anelson"
  ],
  "page_start": 0,
  "page_size": 5,
  "sort_by_date": "DESCENDING"
}

Response

Body:
{
  "events": [
    {
      "classification_code": "C=3",
      "computer_name": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36",
      "id": "UI5xIqUKX70ano1FhnLNNnV_G2TJTR71",
      "local_address": "192.168.100.50",
      "public_address": "192.168.50.15",
      "public_classification_code": "3",
      "time": "2021-08-11T09:57:48Z",
      "type": "ENTITY_OPEN_READ_ONLY",
      "user": {
        "id": "anelson",
        "email": "alex.nelson@acme.com",
        "first_name": "Alex",
        "icon_url": "https://apps.imis.eu/scsvc/archives/IARC/directory/anelson/avatar",
        "last_name": "Nelson",
        "type": "USER"
      }
    }
  ],
  "size": 1,
  "statistic": {
    "days": [
      {
        "date": "2021-08-11+02:00",
        "events": 1
      }
    ],
    "users": [
      {
        "date": "2021-08-11+02:00",
        "users": 1
      }
    ]
  }
}


Related Documents:



| Back | Main view