Skip to main content

access_requests

Creates, updates, deletes, gets or lists an access_requests resource.

Overview

Nameaccess_requests
TypeResource
Idcloudflare.zero_trust.access_requests

Fields

The following fields are returned by SELECT queries:

Get Access authentication logs response

NameDatatypeDescription
ray_idstringThe unique identifier for the request to Cloudflare. (example: 187d944c61940c77)
actionstringThe event that occurred, such as a login attempt. (example: login)
allowedbooleanThe result of the authentication event.
app_domainstringThe URL of the Access application. (example: test.example.com/admin)
app_uidstringThe unique identifier for the Access application. (example: df7e2w5f-02b7-4d9d-af26-8d1988fca630)
connectionstringThe IdP used to authenticate. (example: saml)
created_atstring (date-time) (example: 2014-01-01T05:20:00.12345Z)
ip_addressstringThe IP address of the authenticating user. (example: 198.41.129.166)
user_emailstring (email)The email address of the authenticating user. (example: user@example.com)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectaccount_idlimit, direction, since, until, page, per_page, email, email_exact, user_id, allowedOp, country_codeOp, app_typeOp, app_uidOp, ray_idOp, emailOp, idpOp, non_identityOp, user_idOp, fieldsGets a list of Access authentication audit logs for an account.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
account_idstringThe Cloudflare account ID.
allowedOpstringOperator for the allowed filter.
app_typeOpstringOperator for the app_type filter.
app_uidOpstringOperator for the app_uid filter.
country_codeOpstringOperator for the country_code filter.
directionstringThe chronological sorting order for the logs.
emailstring (email)Filter by user email. Defaults to substring matching. To force exact matching, set email_exact=true. Example (default): email=@example.com returns all events with that domain. Example (exact): email=user@example.com&email_exact=true returns only that user.
emailOpstringOperator for the email filter.
email_exactbooleanWhen true, email is matched exactly instead of substring matching.
fieldsstringComma-separated list of fields to include in the response. When omitted, all fields are returned.
idpOpstringOperator for the idp filter.
limitintegerThe maximum number of log entries to retrieve.
non_identityOpstringOperator for the non_identity filter.
pageinteger
per_pageinteger
ray_idOpstringOperator for the ray_id filter.
sincestring (date-time)The earliest event timestamp to query.
untilstring (date-time)The latest event timestamp to query.
user_idstring (uuid)Filter by user UUID.
user_idOpstringOperator for the user_id filter.

SELECT examples

Gets a list of Access authentication audit logs for an account.

SELECT
ray_id,
action,
allowed,
app_domain,
app_uid,
connection,
created_at,
ip_address,
user_email
FROM cloudflare.zero_trust.access_requests
WHERE account_id = '{{ account_id }}' -- required
AND limit = '{{ limit }}'
AND direction = '{{ direction }}'
AND since = '{{ since }}'
AND until = '{{ until }}'
AND page = '{{ page }}'
AND per_page = '{{ per_page }}'
AND email = '{{ email }}'
AND email_exact = '{{ email_exact }}'
AND user_id = '{{ user_id }}'
AND allowedOp = '{{ allowedOp }}'
AND country_codeOp = '{{ country_codeOp }}'
AND app_typeOp = '{{ app_typeOp }}'
AND app_uidOp = '{{ app_uidOp }}'
AND ray_idOp = '{{ ray_idOp }}'
AND emailOp = '{{ emailOp }}'
AND idpOp = '{{ idpOp }}'
AND non_identityOp = '{{ non_identityOp }}'
AND user_idOp = '{{ user_idOp }}'
AND fields = '{{ fields }}'
;