Get an Access policy test users page
client.zeroTrust.access.applications.policyTests.users.list(stringpolicyTestId, UserListParams { account_id, page, per_page, status } params, RequestOptionsoptions?): V4PagePaginationArray<UserListResponse { id, email, name, status } >
GET/accounts/{account_id}/access/policy-tests/{policy_test_id}/users
Fetches a single page of user results from an Access policy test.
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)
Get an Access policy test users page
import Cloudflare from 'cloudflare';
const client = new Cloudflare({
apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const userListResponse of client.zeroTrust.access.applications.policyTests.users.list(
'f1a8b3c9d4e5f6789a0b1c2d3e4f5678a9b0c1d2e3f4a5b67890c1d2e3f4b5a6',
{ account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
)) {
console.log(userListResponse.id);
}{
"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": [
{
"id": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
"email": "jdoe@example.com",
"name": "Jane Doe",
"status": "approved"
}
]
}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": [
{
"id": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
"email": "jdoe@example.com",
"name": "Jane Doe",
"status": "approved"
}
]
}