access_requests
Creates, updates, deletes, gets or lists an access_requests resource.
Overview
| Name | access_requests |
| Type | Resource |
| Id | cloudflare.zero_trust.access_requests |
Fields
The following fields are returned by SELECT queries:
- list
Get Access authentication logs response
| Name | Datatype | Description |
|---|---|---|
ray_id | string | The unique identifier for the request to Cloudflare. (example: 187d944c61940c77) |
action | string | The event that occurred, such as a login attempt. (example: login) |
allowed | boolean | The result of the authentication event. |
app_domain | string | The URL of the Access application. (example: test.example.com/admin) |
app_uid | string | The unique identifier for the Access application. (example: df7e2w5f-02b7-4d9d-af26-8d1988fca630) |
connection | string | The IdP used to authenticate. (example: saml) |
created_at | string (date-time) | (example: 2014-01-01T05:20:00.12345Z) |
ip_address | string | The IP address of the authenticating user. (example: 198.41.129.166) |
user_email | string (email) | The email address of the authenticating user. (example: user@example.com) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | account_id | limit, 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, fields | Gets 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.
| Name | Datatype | Description |
|---|---|---|
account_id | string | The Cloudflare account ID. |
allowedOp | string | Operator for the allowed filter. |
app_typeOp | string | Operator for the app_type filter. |
app_uidOp | string | Operator for the app_uid filter. |
country_codeOp | string | Operator for the country_code filter. |
direction | string | The chronological sorting order for the logs. |
email | string (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. |
emailOp | string | Operator for the email filter. |
email_exact | boolean | When true, email is matched exactly instead of substring matching. |
fields | string | Comma-separated list of fields to include in the response. When omitted, all fields are returned. |
idpOp | string | Operator for the idp filter. |
limit | integer | The maximum number of log entries to retrieve. |
non_identityOp | string | Operator for the non_identity filter. |
page | integer | |
per_page | integer | |
ray_idOp | string | Operator for the ray_id filter. |
since | string (date-time) | The earliest event timestamp to query. |
until | string (date-time) | The latest event timestamp to query. |
user_id | string (uuid) | Filter by user UUID. |
user_idOp | string | Operator for the user_id filter. |
SELECT examples
- list
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 }}'
;