Get Access authentication logs
GET/accounts/{account_id}/access/logs/access_requests
Gets a list of Access authentication audit logs for an account.
Security
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
email: optional string
Filter by user email. Match mode is controlled by emailOp (preferred) or the legacy email_exact flag.
- Default (no
emailOp,email_exact=falseor unset): substring match —email=@example.comreturns all events with that domain. - Exact match: set
emailOp=eq(preferred) oremail_exact=true— e.g.email=user@example.com&email_exact=truereturns only that user. - Explicit substring match: set
emailOp=contains(withoutemail_exact=true). When both are set,email_exact=truetakes precedence and the match is exact. - Exclusion: set
emailOp=neq. Withemail_exact=truethis is an exact-value exclusion; without it, a fuzzy substring exclusion.
formatemail
fields: optional string
Comma-separated list of fields to include in the response. When omitted, all fields are returned.
Get Access authentication logs
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/access/logs/access_requests \
-H "X-Auth-Email: $CLOUDFLARE_EMAIL" \
-H "X-Auth-Key: $CLOUDFLARE_API_KEY"{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"success": true,
"result": [
{
"action": "login",
"allowed": true,
"app_domain": "test.example.com/admin",
"app_uid": "df7e2w5f-02b7-4d9d-af26-8d1988fca630",
"connection": "saml",
"created_at": "2014-01-01T05:20:00.12345Z",
"ip_address": "198.41.129.166",
"ray_id": "187d944c61940c77",
"user_email": "user@example.com"
}
]
}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"
}
}
],
"success": true,
"result": [
{
"action": "login",
"allowed": true,
"app_domain": "test.example.com/admin",
"app_uid": "df7e2w5f-02b7-4d9d-af26-8d1988fca630",
"connection": "saml",
"created_at": "2014-01-01T05:20:00.12345Z",
"ip_address": "198.41.129.166",
"ray_id": "187d944c61940c77",
"user_email": "user@example.com"
}
]
}