- Checkmarx Documentation
- Checkmarx One
- Checkmarx One API Documentation
- Checkmarx One API Endpoints
- Audit Trail API
Audit Trail API
Notice
A comprehensive Checkmarx One API Reference Guide is now available here.
Introduction
This API enables users to get a complete log of events that occurred in their account over a specified period of time. Events are stored for user management, such as creation or deletion of users and roles. In addition, events are stored for several other Checkmarx One services.
Notice
Event info is stored in CloudEvents format.
Events for the current day are given as a json object with a record for each event. Events for previous days are given as links that are used to download the json for that day's events.
Notice
Events are available for the previous 365 days.
List of Logged Events
The following list shows the events that are currently logged by this service.
events.cxiam.user.account.login
events.cxiam.user.account.deleted
events.cxiam.user.account.created
events.cxiam.user.account.updated
events.cxiam.user.account.unlocked
events.cxiam.user.email.verifie
events.cxiam.user.password.reset
events.cxiam.user.iam-role.assigned
events.cxiam.user.iam-role.unassigne
events.cxiam.user.iam-role.created
events.cxiam.user.iam-role.deleted
events.cxiam.user.ast-role.created
events.cxiam.user.ast-role.updated
events.cxiam.user.ast-role.deleted
events.cxiam.user.cb-role.created
events.cxiam.user.cb-role.updated
events.cxiam.user.cb-role.deleted
events.cxiam.user.ast-role.assigned
events.cxiam.user.ast-role.unassigned
events.cxiam.role.ast-role.assigned
events.cxiam.role.ast-role.unassigned
events.cxiam.user.cb-role.assigned
events.cxiam.user.cb-role.unassigned
events.cxiam.role.iam-role.assigned
events.cxiam.role.iam-role.unassigned
events.cxiam.role.cb-role.assigned
events.cxiam.role.cb-role.unassigned
events.cxiam.user-group.account.deleted
events.cxiam.user-group.account.created
events.cxiam.user-group.account.updated
events.cxiam.user-group.ast-role.assigne
events.cxiam.user-group.ast-role.unassigned
events.cxiam.user-group.cb-role.assigne
events.cxiam.user-group.cb-role.unassigne
events.cxiam.user-group.iam-role.unassigned
events.cxiam.user-group.iam-role.assigned
events.cxiam.user-group.managers.unassigne
events.cxiam.user-group.managers.assigned
events.cxiam.user-group.user.assigned
events.cxiam.user-group.user.unassigne
event.cxiam.identity-provider.deleted
events.cxiam.identity-provider.created
events.cxiam.identity-provider.updated
events.cxiam.oauth2-client.created
events.cxiam.oauth2-client.update
events.cxiam.oauth2-client.deleted
events.cxiam.oauth2-client.ast-role.unassigned
events.cxiam.oauth2-client.iam-role.unassigned
events.cxiam.user.mfa.deleted
events.cxiam.user.mfa.updated
events.cxiam.ldap.created
events.cxiam.ldap.updated
events.cxiam.ldap.deleted
events.cxiam.eula.accepted
events.cxiam.eula.declined
events.cxiam.realm.updated
events.ast-reports.report.requested
events.configuration.defaultConfig.create
events.configuration.defaultConfig.delete
events.configuration.defaultConfig.update
events.support-tickets.ticket.open
Workflow
Use
GET /api/audit
to get the events for the current day as well as URL links for events on previous days.For each previous day, use GET <URL> to get the events for that day.
Note
You need to submit your JWT token with each request.
Audit Trail Endpoints
The URL for Audit Trail endpoints is <base_url>/api/audit
US Environment - https://ast.checkmarx.net
US2 Environment - https://us.ast.checkmarx.net
EU Environment - https://eu.ast.checkmarx.net
EU2 Environment - https://eu-2.iam.checkmarx.net/
Australia & New Zealand – https://anz.ast.checkmarx.net
India - https://ind.ast.checkmarx.net
Singapore - https://sng.ast.checkmarx.net
Swagger
To view these APIs in the Swagger UI and run sample API calls, go to <base_url>/spec/v1/ and select Audit Trail in the definition field.
US Environment - https://ast.checkmarx.net/spec/v1/
US2 Environment - https://us.ast.checkmarx.net/spec/v1/
EU Environment - https://eu.ast.checkmarx.net/spec/v1/
EU2 Envitonment - https://eu-2.ast.checkmarx.net/spec/v1/
Australia & New Zealand – https://anz.ast.checkmarx.net/spec/v1/
Singapore - https://sng.ast.checkmarx.net/spec/v1/
GET Audit Trail
Authentication
Authentication for all Checkmarx One endpoints is done using JWT (JSON Web Token) access token. Access tokens are generated using the Authentication API.
Media Type (header)
Authorization: Bearer <access_token>
Accept: application/json
Curl Sample
curl -X GET "https://eu.ast.checkmarx.net/api/audit" -H "accept: application/json"
Parameters
None
Success Response
Code: 200 OK
Attributes:
Attribute | Type | Description |
---|---|---|
links[ ] | Returns a record that includes a link to access the events for each date that was included in the request, prior to the current date. The following info is returned for each link: | |
links/eventDate | Date | The date of the event. |
links/url | string | The link to retreive the events for this date. |
links/crc | string | A checksum for verifying the authenticity of the downloaded file. |
events | Returns a record for each event that occurred on the current date. The following data is returned for each event: | |
events/eventDate | datetime | The date and time that the event occurred (UTC time). |
events/eventType | string | The resource (service) that reported the event. |
events/auditResource | string | The type of system entity for which the event occurred. For example, if an application was created, the auditResource will be "application". |
events/actionType | string | The type of event that occurred. For example, if an application was created, the actionType will be "created". |
events/actionUserId | string | The ID of the user who took the action. |
events/ipAddress | string | The public IP address of the user who initiated the event. |
events/data | json | Additional data about the event. |
Sample Success Response:
{ "links": [{ "eventDate": "2022-12-18T00:00:00Z", "url": "https://eu.ast.checkmarx.net/storage/audit.checkmarx-ast/audit/12345fe35-965a-4506-b226-e0155ec81234/2022/ast-audit-2022-12-18.json?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ast%2F20221225%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20221225T110608Z&X-Amz-Expires=3600&X-Amz-Signature=233e60417bf21781b915d9ba84ad3c0e6af878c78a01d25b01582e30f12345f&X-Amz-SignedHeaders=host", "crc": "52c16c34e5206228881a294593781307ec7f7795409b7b7e91b962786b412345" }], "events": [{ "eventDate": "2022-12-19T10:04:30.900264Z", "eventType": "events.cxiam.user-group.account.created", "auditResource": "user-group.account", "actionType": "create", "actionUserId": "f6374e40-3d56-4c2e-b0f7-9b5e1e9ec4ab", "ipAddress": "", "data": { "groupId": "b1de5cfe-ae0e-42bd-b2a5-7b9e5a6b266d", "userId": "f6374e40-3d56-4c2e-b0f7-9b5e1e9ec4ab" } }, { "eventDate": "2022-12-19T10:04:30.876611Z", "eventType": "events.cxiam.user.account.login", "auditResource": "user.account", "actionType": "login", "actionUserId": "f6374e40-3d56-4c2e-b0f7-9b5e1e9ec4ab", "ipAddress": "", "data": { "id": "f6374e40-3d56-4c2e-b0f7-9b5e1e9ec4ab", "status": "OK", "username": "org_admin" } } ] }