Audit API
Audit API
Get a list of audit events for an account.
Request
POST https://cloud.cdata.com/api/log/audit/list
Query String Parameters
| Name | Description | 
| startTime | Timestamp in UTC. | 
| endTime | Timestamp in UTC. | 
Response
HTTP 200 OK
{
"events": [
        {
            "eventType": 1003,
            "timestamp": "2025-08-18T17:07:07.3673862Z",
            "targetId": "aaa96669-74c8-480f-a8c1-7956979cbee9",
            "targetName": "PostgreSQL1",
            "targetType": 1,
            "userId": "6b8d5c25-cdc1-4b0c-b9f1-5b26647a8240",
            "userName": "User1",
            "userType": 0
        },
        {
            "eventType": 1107,
            "timestamp": "2025-08-13T21:20:08.4380865Z",
            "relatedId": "4780a367-2ba0-4b73-b086-b0d964323032",
            "relatedName": "Mcp",
            "relatedType": 4,
            "targetId": "a41dd9b5-1ed6-54d9-b5e5-2754e4a29deb",
            "targetName": "test@cdata.com",
            "targetType": 2,
            "userId": "a41dd9b5-1ed6-54d9-b5e5-2754e4a29deb",
            "userName": "User2",
            "userType": 0
        }
   ]        
}
Fields
| Name | Description | 
| eventType | The audit event type, such as user login, user PAT created, or permission created. | 
| timeStamp | The timestamp of the event. | 
| relatedId | The related resource Id, if applicable. | 
| relatedName | The related resource name, if applicable. | 
| relatedType | The related resource type, if applicable. | 
| targetId | The Id of the event, such as the Query Id. | 
| targetName | The target resource name, such a user’s email or a connection name. | 
| targetType | The target type, such as query or connection change. | 
| userId | The user’s Id. | 
| userName | The user’s name. | 
| userType | The user type. |