Get account 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.

/accounts/{account_identifier}/audit_logs

get

Audit Logs

audit-logs-get-account-audit-logs

Debug "planAvailability"

{
  "business": true,
  "enterprise": true,
  "free": true,
  "pro": true
}

Debug "tokenPermissions"

null

Debug "parameters"

[
  {
    "in": "path",
    "name": "account_identifier",
    "required": true,
    "schema": {
      "description": "Identifier",
      "example": "023e105f4ecef8ad9ca31a8372d0c353",
      "maxLength": 32,
      "readOnly": true,
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "id",
    "schema": {
      "description": "Finds a specific log by its ID.",
      "example": "f174be97-19b1-40d6-954d-70cd5fbd52db",
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "export",
    "schema": {
      "description": "Indicates that this request is an export of logs in CSV format.",
      "example": true,
      "type": "boolean"
    }
  },
  {
    "in": "query",
    "name": "action.type",
    "schema": {
      "description": "Filters by the action type.",
      "example": "add",
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "actor.ip",
    "schema": {
      "description": "Filters by the IP address of the request that made the change by specific IP address or valid CIDR Range.",
      "example": "17.168.228.63",
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "actor.email",
    "schema": {
      "description": "Filters by the email address of the actor that made the change.",
      "example": "alice@example.com",
      "format": "email",
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "since",
    "schema": {
      "description": "Limits the returned results to logs newer than the specified date. This can be a date string `2019-04-30` or an absolute timestamp that conforms to RFC3339.",
      "example": "2019-04-30T01:12:20Z",
      "format": "date-time",
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "before",
    "schema": {
      "description": "Limits the returned results to logs older than the specified date. This can be a date string `2019-04-30` or an absolute timestamp that conforms to RFC3339.",
      "example": "2019-04-30T01:12:20Z",
      "format": "date-time",
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "zone.name",
    "schema": {
      "description": "Filters by the name of the zone associated to the change.",
      "example": "example.com",
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "direction",
    "schema": {
      "default": "desc",
      "description": "Changes the direction of the chronological sorting.",
      "enum": [
        "desc",
        "asc"
      ],
      "example": "desc",
      "type": "string"
    }
  },
  {
    "in": "query",
    "name": "per_page",
    "schema": {
      "default": 100,
      "description": "Sets the number of results to return per page.",
      "example": 25,
      "maximum": 1000,
      "minimum": 1,
      "type": "number"
    }
  },
  {
    "in": "query",
    "name": "page",
    "schema": {
      "default": 1,
      "description": "Defines which page of results to return.",
      "example": 50,
      "minimum": 1,
      "type": "number"
    }
  },
  {
    "in": "query",
    "name": "hide_user_logs",
    "schema": {
      "default": false,
      "description": "Indicates whether or not to hide user level audit logs.",
      "type": "boolean"
    }
  }
]

Debug "requestBody"

null

Debug "responses"

{
  "200": {
    "content": {
      "application/json": {
        "schema": {
          "oneOf": [
            {
              "properties": {
                "errors": {
                  "nullable": true,
                  "type": "object"
                },
                "messages": {
                  "example": [],
                  "items": {},
                  "type": "array"
                },
                "result": {
                  "items": {
                    "properties": {
                      "action": {
                        "properties": {
                          "result": {
                            "description": "A boolean that indicates if the action attempted was successful.",
                            "example": true,
                            "type": "boolean"
                          },
                          "type": {
                            "description": "A short string that describes the action that was performed.",
                            "example": "change_setting",
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "actor": {
                        "properties": {
                          "email": {
                            "description": "The email of the user that performed the action.",
                            "example": "michelle@example.com",
                            "format": "email",
                            "type": "string"
                          },
                          "id": {
                            "description": "The ID of the actor that performed the action. If a user performed the action, this will be their User ID.",
                            "example": "f6b5de0326bb5182b8a4840ee01ec774",
                            "type": "string"
                          },
                          "ip": {
                            "description": "The IP address of the request that performed the action.",
                            "example": "198.41.129.166",
                            "type": "string"
                          },
                          "type": {
                            "description": "The type of actor, whether a User, Cloudflare Admin, or an Automated System.",
                            "enum": [
                              "user",
                              "admin",
                              "Cloudflare"
                            ],
                            "example": "user",
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "id": {
                        "description": "A string that uniquely identifies the audit log.",
                        "example": "d5b0f326-1232-4452-8858-1089bd7168ef",
                        "type": "string"
                      },
                      "interface": {
                        "description": "The source of the event.",
                        "example": "API",
                        "type": "string"
                      },
                      "metadata": {
                        "description": "An object which can lend more context to the action being logged. This is a flexible value and varies between different actions.",
                        "example": {
                          "name": "security_level",
                          "type": "firewall",
                          "value": "high",
                          "zone_name": "example.com"
                        },
                        "type": "object"
                      },
                      "newValue": {
                        "description": "The new value of the resource that was modified.",
                        "example": "low",
                        "type": "string"
                      },
                      "oldValue": {
                        "description": "The value of the resource before it was modified.",
                        "example": "high",
                        "type": "string"
                      },
                      "owner": {
                        "properties": {
                          "id": {
                            "description": "Identifier",
                            "example": "023e105f4ecef8ad9ca31a8372d0c353",
                            "maxLength": 32,
                            "readOnly": true,
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "resource": {
                        "properties": {
                          "id": {
                            "description": "An identifier for the resource that was affected by the action.",
                            "example": "023e105f4ecef8ad9ca31a8372d0c353",
                            "type": "string"
                          },
                          "type": {
                            "description": "A short string that describes the resource that was affected by the action.",
                            "example": "zone",
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "when": {
                        "description": "A UTC RFC3339 timestamp that specifies when the action being logged occured.",
                        "example": "2017-04-26T17:31:07Z",
                        "format": "date-time",
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  "type": "array"
                },
                "success": {
                  "example": true,
                  "type": "boolean"
                }
              }
            },
            {
              "properties": {
                "errors": {
                  "example": [],
                  "items": {
                    "properties": {
                      "code": {
                        "minimum": 1000,
                        "type": "integer"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "code",
                      "message"
                    ],
                    "type": "object",
                    "uniqueItems": true
                  },
                  "type": "array"
                },
                "messages": {
                  "example": [],
                  "items": {
                    "properties": {
                      "code": {
                        "minimum": 1000,
                        "type": "integer"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "code",
                      "message"
                    ],
                    "type": "object",
                    "uniqueItems": true
                  },
                  "type": "array"
                },
                "result": {
                  "anyOf": [
                    {
                      "type": "object"
                    },
                    {
                      "items": {},
                      "type": "array"
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "success": {
                  "description": "Whether the API call was successful",
                  "enum": [
                    true
                  ],
                  "example": true,
                  "type": "boolean"
                }
              },
              "required": [
                "success",
                "errors",
                "messages",
                "result"
              ],
              "type": "object"
            }
          ]
        }
      }
    },
    "description": "Get account audit logs response"
  },
  "4XX": {
    "content": {
      "application/json": {
        "schema": {
          "allOf": [
            {
              "oneOf": [
                {
                  "properties": {
                    "errors": {
                      "nullable": true,
                      "type": "object"
                    },
                    "messages": {
                      "example": [],
                      "items": {},
                      "type": "array"
                    },
                    "result": {
                      "items": {
                        "properties": {
                          "action": {
                            "properties": {
                              "result": {
                                "description": "A boolean that indicates if the action attempted was successful.",
                                "example": true,
                                "type": "boolean"
                              },
                              "type": {
                                "description": "A short string that describes the action that was performed.",
                                "example": "change_setting",
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "actor": {
                            "properties": {
                              "email": {
                                "description": "The email of the user that performed the action.",
                                "example": "michelle@example.com",
                                "format": "email",
                                "type": "string"
                              },
                              "id": {
                                "description": "The ID of the actor that performed the action. If a user performed the action, this will be their User ID.",
                                "example": "f6b5de0326bb5182b8a4840ee01ec774",
                                "type": "string"
                              },
                              "ip": {
                                "description": "The IP address of the request that performed the action.",
                                "example": "198.41.129.166",
                                "type": "string"
                              },
                              "type": {
                                "description": "The type of actor, whether a User, Cloudflare Admin, or an Automated System.",
                                "enum": [
                                  "user",
                                  "admin",
                                  "Cloudflare"
                                ],
                                "example": "user",
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "id": {
                            "description": "A string that uniquely identifies the audit log.",
                            "example": "d5b0f326-1232-4452-8858-1089bd7168ef",
                            "type": "string"
                          },
                          "interface": {
                            "description": "The source of the event.",
                            "example": "API",
                            "type": "string"
                          },
                          "metadata": {
                            "description": "An object which can lend more context to the action being logged. This is a flexible value and varies between different actions.",
                            "example": {
                              "name": "security_level",
                              "type": "firewall",
                              "value": "high",
                              "zone_name": "example.com"
                            },
                            "type": "object"
                          },
                          "newValue": {
                            "description": "The new value of the resource that was modified.",
                            "example": "low",
                            "type": "string"
                          },
                          "oldValue": {
                            "description": "The value of the resource before it was modified.",
                            "example": "high",
                            "type": "string"
                          },
                          "owner": {
                            "properties": {
                              "id": {
                                "description": "Identifier",
                                "example": "023e105f4ecef8ad9ca31a8372d0c353",
                                "maxLength": 32,
                                "readOnly": true,
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "resource": {
                            "properties": {
                              "id": {
                                "description": "An identifier for the resource that was affected by the action.",
                                "example": "023e105f4ecef8ad9ca31a8372d0c353",
                                "type": "string"
                              },
                              "type": {
                                "description": "A short string that describes the resource that was affected by the action.",
                                "example": "zone",
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "when": {
                            "description": "A UTC RFC3339 timestamp that specifies when the action being logged occured.",
                            "example": "2017-04-26T17:31:07Z",
                            "format": "date-time",
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "success": {
                      "example": true,
                      "type": "boolean"
                    }
                  }
                },
                {
                  "properties": {
                    "errors": {
                      "example": [],
                      "items": {
                        "properties": {
                          "code": {
                            "minimum": 1000,
                            "type": "integer"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "message"
                        ],
                        "type": "object",
                        "uniqueItems": true
                      },
                      "type": "array"
                    },
                    "messages": {
                      "example": [],
                      "items": {
                        "properties": {
                          "code": {
                            "minimum": 1000,
                            "type": "integer"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "message"
                        ],
                        "type": "object",
                        "uniqueItems": true
                      },
                      "type": "array"
                    },
                    "result": {
                      "anyOf": [
                        {
                          "type": "object"
                        },
                        {
                          "items": {},
                          "type": "array"
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "success": {
                      "description": "Whether the API call was successful",
                      "enum": [
                        true
                      ],
                      "example": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "errors",
                    "messages",
                    "result"
                  ],
                  "type": "object"
                }
              ]
            },
            {
              "properties": {
                "errors": {
                  "allOf": [
                    {
                      "example": [],
                      "items": {
                        "properties": {
                          "code": {
                            "minimum": 1000,
                            "type": "integer"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "message"
                        ],
                        "type": "object",
                        "uniqueItems": true
                      },
                      "type": "array"
                    }
                  ],
                  "example": [
                    {
                      "code": 7003,
                      "message": "No route for the URI"
                    }
                  ],
                  "minLength": 1
                },
                "messages": {
                  "allOf": [
                    {
                      "example": [],
                      "items": {
                        "properties": {
                          "code": {
                            "minimum": 1000,
                            "type": "integer"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "message"
                        ],
                        "type": "object",
                        "uniqueItems": true
                      },
                      "type": "array"
                    }
                  ],
                  "example": []
                },
                "result": {
                  "enum": [
                    null
                  ],
                  "nullable": true,
                  "type": "object"
                },
                "success": {
                  "description": "Whether the API call was successful",
                  "enum": [
                    false
                  ],
                  "example": false,
                  "type": "boolean"
                }
              },
              "required": [
                "success",
                "errors",
                "messages",
                "result"
              ],
              "type": "object"
            }
          ]
        }
      }
    },
    "description": "Get account audit logs response failure"
  }
}

Debug "security"

[
  {
    "api_token": []
  },
  {
    "api_email": [],
    "api_key": []
  }
]