Difference between revisions of "Audit Web Service"
(→Overview) |
(→Query the Audit event for a Transaction) |
||
| Line 41: | Line 41: | ||
= Query the Audit event for a Transaction = | = Query the Audit event for a Transaction = | ||
| − | This web service is used to obtain a specific audit event for a transaction (a transaction is where the | + | This web service is used to obtain a specific audit event for a transaction (a transaction is where the Registry updates either structural metadata, or a data registration). |
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Revision as of 02:27, 27 March 2021
Contents
Overview
The Audit web service can be used to query for audited events in the Fusion Metadata Registry
Querying Audits
Returns a JSON Array of all of the structures in the Registry, filterable by parameter.
| Entry Point | /ws/secure/audit/searchAudits |
| Access | Restricted (Agency and Admin users only) |
| Http Method | GET |
| Response Format | application/json (array of objects) see #Audit JSON |
| Response Statuses | 200 - Query Ok
|
HTTP Query Parameters
If no parameters are supplied the last 500 audited events are returned
| Request Parameter | Purpose |
|---|---|
| dateFrom | The earliest audit event to return. The value must be specified as the epoch time in milliseconds (e.g. 1609459200000 is the start of the year 2021). |
| dateTo | The latest audit event to return. The value must be specified as the epoch time in milliseconds (e.g. 1609459200000 is the start of the year 2021). |
| max | The maximum number of audits to return, must be a positive integer, the default is 500 if not specified |
| type | The category of audit:
|
| orderDesc | true to order by time descending order, false to order ascending. The default output is that Transactions are returned in a descending order (most recent first) |
| user | username of the user that caused the audit event |
Query the Audit event for a Transaction
This web service is used to obtain a specific audit event for a transaction (a transaction is where the Registry updates either structural metadata, or a data registration).
| Entry Point | /ws/secure/audit/getDetailsByTransactionId |
| Access | Restricted (Agency and Admin users only) |
| Http Method | GET |
| Response Format | application/json see #Audit JSON |
| Response Statuses | 200 - Query Ok
|
HTTP Query Parameters
| Request Parameter | Purpose |
|---|---|
| txId | The transaction ID (see the RSS feed) |
Download the Logs event for a Transaction
This web service is used to obtain a the log events for a transaction (a transaction is where the Fusion Registry updates either structural metadata, or a data registration).
| Entry Point | /ws/secure/audit/downloadLogsForTransaction |
| Access | Restricted (Agency and Admin users only) |
| Http Method | GET |
| Response Format | application/octet-stream |
| Response Statuses | 200 - Query Ok
|
HTTP Query Parameters
| Request Parameter | Purpose |
|---|---|
| txId | The transaction ID (see the RSS feed) |
Download the Logs event for an Audit event
This web service is used to obtain a the log events for a transaction (a transaction is where the Fusion Registry updates either structural metadata, or a data registration).
| Entry Point | /ws/secure/audit/downloadLogsForAudit |
| Access | Restricted (Agency and Admin users only) |
| Http Method | GET |
| Response Format | application/octet-stream |
| Response Statuses | 200 - Query Ok
|
HTTP Query Parameters
| Request Parameter | Purpose |
|---|---|
| uid | The unique audit Id (UID) see #Audit_JSON |
Audit JSON
Each audit event is output a JSON Object which contains the following information
{
"UID": "52731504-0273-4f5c-a9e6-bb64bfd27574",
"Type": "Data Query",
"ServerName": "yourserver.com",
"VMID": "12b597ceb123456:1c12c34:123bc3bfe61:-8000",
"MachineId": "ip-11-2-3-44internal/11.2.3.44",
"ServerContext": "/FusionRegistry",
"ServletPath": "/ws/public/sdmxapi/rest",
"ServerPort": 443,
"PathInfo": "/data/WB,WDI_POVERTY,1.0",
"Parameters": "format=sdmx-json",
"Protocol": "HTTP/1.1",
"AcceptHeaders": "application/json, text/javascript, */*; q=0.01",
"AcceptLanguage": "en",
"SubmissionMethod": "GET",
"HttpResponseStatus": 200,
"RequestTime": 1615821933116,
"Duration": 6,
"Username": "anonymous",
"RequestIP": "111.222.33.44",
"ProductVersion": "10.6.6",
"UserAgent": "Chrome/89.0.4389.82 Safari/537.36",
"BrowserName": "Chrome",
"BrowserVersion": "89",
"OS": "Windows 10"
}