Request URL
https://<BMC Helix Portal URL>/audit/api/v1/audit_records/search
Content-Type: application/json
Authorization: Bearer <JWT_token>
Request body
{
"select_string": "string",
"search_string": "string",
"activity_from_date_time": "string",
"activity_to_date_time": "string",
"page_index": 0,
"page_size": 0
}
Example request body
{
"select_string": "appId",
"search_string": "appId='IMS'",
"activity_from_date_time": "2010-08-16 10:42:51",
"activity_to_date_time": "2022-02-21 10:42:51",
"page_index": 0,
"page_size": 100
}
Parameters
Name | Located in | Description | Mandatory | Schema |
---|
select_string | body | Specific column of an audit record. | no | string |
search_string | body | Search value in audit record. | no | string |
activity_from_date_time | body | Display of all suitable audit records starting from this time.
| yes | timestamp |
activity_to_date_time | body | Display of all suitable audit records up to this time. | yes | timestamp |
page_index | body | Page index | no | integer |
page_size | body | Page size | no | integer |
Columns supported for search
auditCategory
appId
objectName
objectType
objectCategory
objectDetails
operationType
operationSubType
operationStatus='SUCCESS'
activityTime
source
loginId
Successful response
{
"metadata": {
"page_index": 0,
"page_size": 100,
"total_records": 1
},
"data": [
{
"appId": "IMS"
}
]
}
Unsuccessful response
Scenario 1: Searching audit record in incorrect format
{
"timestamp": "2022-02-21T14:13:21.154141Z",
"code": 2300,
"message": "BAD_REQUEST",
"error": "Invalid token in search_string: appId=IMS"
}
Scenario 2: Searching audit record with missing activity time and date value
{
"timestamp": "2022-02-21T14:15:04.007938Z",
"code": 400,
"message": "BAD_REQUEST",
"error": "activity_to_date_time can not be empty/null, please enter date in yyyy-MM-dd HH:mm:ss format"
}
Comments
Log in or register to comment.