Get Audit details of a particular namespace

This API provides usage audit details for a namespace over a specified period. The details include:

  • Requested method
  • Requested time
  • Requested user
  • Status of the request
  • Input payload for the request
  • Response was given for the request

Only namespace admins can access this API. They can retrieve audit details for the namespace associated with their auth token

METHOD: GET
ROUTE: /namespace/reports/audit-details
Headers:
{
“Authorization”: “Bearer <NAMESPACE_ADMIN_API_KEY >”
}

Query params:

start_date: This date is inclusive.Format should be “YYYY-MM-DD HH:MM:SS” eg: “2024-05-21  18:23:42”
end_date: This date is inclusive. Format should be “YYYY-MM-DD HH:MM:SS” eg: “2024-05-22  28:23:32”
next_page_token: It is used to paginate the data; by default, it will be null. If there is more data, then next_page_token will be sent through the API response. For upcoming requests, use the previous response next_page_token to navigate further.

Response structure:

{
"data": {
"details": [
{
"requested_method": "mask",
"requested_user": "userid1",
"status": "success",
"input_payload": {
"mask": [
{
"value": "George Williams lives in Washington"
}
]
},
"response": {
"data": [
{
"value": "George Williams lives in Washington",
"token_value": "<PER>hSw8kAEB10 ITItAd8FsN</PER> lives in <ADDRESS>748785848000</ADDRESS>",
"toxicity_analysis": {
"toxicity": 0.00088834815,
"severe_toxicity": 0.000104515464,
"obscene": 0.00018257574,
"threat": 0.0001108902,
"insult": 0.00017547917,
"identity_attack": 0.00013806517
},
"individual_tokens": [
{
"value": "George Williams",
"pii_type": "PERSON",
"token": "hSw8kAEB10 ITItAd8FsN",
"prefix": "<PER>",
"suffix": "</PER>",
"start_pos": 0,
"end_pos": 15
},
{
"value": "Washington",
"pii_type": "GPE",
"token": "748785848000",
"prefix": "<ADDRESS>",
"suffix": "</ADDRESS>",
"start_pos": 25,
"end_pos": 35
}
]
}
],
"success": true,
"error": {
"message": ""
}
},
"requested_time": "2024-05-22 23:59:59",
"error_log": null
}
],
"next_page_token": "eyJwYWdlX3NpemUiOiA1LCAicGFnZV9ubyI6IDEsICJ0b3RhbF9wYWdlcyI6IDJ9"
},
"success": "true",
"error": {
"message": ""
}
}

 

Updated on January 23, 2025
What are your feelings

© All Rights Reserved 2023 | Protecto