GET Audit Logs

The Get Audit Logs API is used to retrieve one or more audit logs of processes.

Method URI

GET

/cdwebconsole/svc/auditlogs/logs

The following example shows the Command:
curl -X 'GET' \
  'https://172.20.186.254:9443/cdwebconsole/svc/auditlog/logs?limit=10' \
  -H 'Authorization: eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiI5YmQ5NDc0Mi04NTBhLTRiZjUtYTlmNC1lZTc0ZGNhZjk0YmUiLCJleHAiOjE3MTU5MzAxMDF9.HyQID1DSH4extlpi3NgscFDXobV_rTjrnMbs-jFJ1zScIMJTsifhZjHGl7UbneE5uPStH_F3knc2khGc3JSR3g' \
  -H 'Content-Type: application/json' \
  -H 'X-XSRF-TOKEN: bc922a09-0afa-4acf-9593-9bc2bd70992b' 
Table 1. Input Parameters
Parameter Name Required/Optional Description Valid values

limit

Optional

Specifies the number of records to be returned.

Default limit is 10.
iobjectId Optional Specifies the Object Id for which the audit log information is to be retrieve.  
iobjectType Optional Specifies the Object Type for which the audit log information is to be retrieved.  
ichangeBy Optional Specifies the ChangedBy for which the audit log information is to be retrieved.  
Istatus Optional

Specifies the Status for which the audit log information is to be retrieved.

For example: Logged In.

 
fromDate Optional Specifies the start date and time of the desired records. The valid format is Date (mm/dd/yyyy) followed by Time (hh:mm:ss am/pm). For example: 03/14/2024, 00:01:00 am.
toDate Optional Specifies the start date and time of the desired records. The valid format is Date (mm/dd/yyyy) followed by Time (hh:mm:ss am/pm). For example: 03/14/2024, 00:01:00 pm.
sortOrder Optional

Specifies the Sort Order. This sort depends on the sortColumn field.

Valid Values are: ASC, DESC.

sortColumn Optional

Specifies the Sort Column name. The sorting will be based on the specified name.

Valid values are: dobjectId, dobjectType, dchangedBy, dstatus and dcreatedOn.

The following example shows the Sample Response:
{
  "data": [
    {
      "logId": 1,
      "objectId": "172.20.186.254",
      "objectType": "admin",
      "property": "Admin is successfully logged in",
      "changeBy": "admin",
      "status": "Logged In",
      "createdOn": "Thu Apr 11 12:05:47 IST 2024"
    },
    {
      "logId": 2,
      "objectId": "172.20.186.254",
      "objectType": "admin",
      "property": "Admin is successfully logged in",
      "changeBy": "admin",
      "status": "Logged In",
      "createdOn": "Thu Apr 11 12:06:23 IST 2024"
    },
    {
      "logId": 3,
      "objectId": "172.20.186.254",
      "objectType": "admin",
      "property": "Admin password is changed successfully",
      "changeBy": "admin",
      "status": "Success Password Reset",
      "createdOn": "Thu Apr 11 12:06:36 IST 2024"
    },
    {
      "logId": 4,
      "objectId": "172.20.186.254",
      "objectType": "admin",
      "property": "Admin is successfully logged in",
      "changeBy": "admin",
      "status": "Logged In",
      "createdOn": "Thu Apr 11 12:06:44 IST 2024"
    },
    {
      "logId": 5,
      "objectId": "172.20.186.254",
      "objectType": "admin",
      "property": "Admin is successfully logged out",
      "changeBy": "admin",
      "status": "Logged Out",
      "createdOn": "Thu Apr 11 12:07:41 IST 2024"
    },
    {
      "logId": 6,
      "objectId": "172.20.186.254",
      "objectType": "admin",
      "property": "Admin is successfully logged in",
      "changeBy": "admin",
      "status": "Logged In",
      "createdOn": "Thu Apr 11 12:07:55 IST 2024"
    },
    {
      "logId": 7,
      "objectId": "172.20.186.254",
      "objectType": "admin",
      "property": "Admin is successfully logged out",
      "changeBy": "admin",
      "status": "Logged Out",
      "createdOn": "Thu Apr 11 12:09:29 IST 2024"
    },
    {
      "logId": 8,
      "objectId": "172.20.186.254",
      "objectType": "admin",
      "property": "Admin is successfully logged in",
      "changeBy": "admin",
      "status": "Logged In",
      "createdOn": "Thu Apr 11 12:10:56 IST 2024"
    },
    {
      "logId": 9,
      "objectId": "172.20.186.254",
      "objectType": "admin",
      "property": "Admin is successfully logged out",
      "changeBy": "admin",
      "status": "Logged Out",
      "createdOn": "Thu Apr 11 12:13:44 IST 2024"
    },
    {
      "logId": 10,
      "objectId": "172.20.186.254",
      "objectType": "admin",
      "property": "Admin is successfully logged in",
      "changeBy": "admin",
      "status": "Logged In",
      "createdOn": "Fri Apr 12 16:18:09 IST 2024"
    }
  ],
  "totalRows": 69
}