Get account audit logs
GET/accounts/{account_id}/audit_logs
Gets a list of audit logs for an account. Can be filtered by who made the change, on which zone, and the timeframe of the change.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Accepted Permissions (at least one required)
Query Parameters
Get account audit logs
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/audit_logs \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"result": [
{
"id": "d5b0f326-1232-4452-8858-1089bd7168ef",
"action": {
"result": true,
"type": "change_setting"
},
"actor": {
"id": "f6b5de0326bb5182b8a4840ee01ec774",
"email": "michelle@example.com",
"ip": "198.41.129.166",
"type": "user"
},
"interface": "API",
"metadata": {
"name": "security_level",
"type": "firewall",
"value": "high",
"zone_name": "example.com"
},
"newValue": "low",
"oldValue": "high",
"owner": {
"id": "023e105f4ecef8ad9ca31a8372d0c353"
},
"resource": {
"id": "023e105f4ecef8ad9ca31a8372d0c353",
"type": "zone"
},
"when": "2017-04-26T17:31:07Z"
}
],
"success": true
}Returns Examples
{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"result": [
{
"id": "d5b0f326-1232-4452-8858-1089bd7168ef",
"action": {
"result": true,
"type": "change_setting"
},
"actor": {
"id": "f6b5de0326bb5182b8a4840ee01ec774",
"email": "michelle@example.com",
"ip": "198.41.129.166",
"type": "user"
},
"interface": "API",
"metadata": {
"name": "security_level",
"type": "firewall",
"value": "high",
"zone_name": "example.com"
},
"newValue": "low",
"oldValue": "high",
"owner": {
"id": "023e105f4ecef8ad9ca31a8372d0c353"
},
"resource": {
"id": "023e105f4ecef8ad9ca31a8372d0c353",
"type": "zone"
},
"when": "2017-04-26T17:31:07Z"
}
],
"success": true
}