Get list items
GET/accounts/{account_id}/rules/lists/{list_id}/items
Fetches all the items in the list.
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)
Path Parameters
Query Parameters
cursor: optional string
The pagination cursor. An opaque string token indicating the position from which to continue when requesting the next/previous set of records. Cursor values are provided under result_info.cursors in the response. You should make no assumptions about a cursor’s content or length.
Get list items
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/rules/lists/$LIST_ID/items \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"result": [
{
"id": "34b12448945f11eaa1b71c4d701ab86e",
"created_on": "2020-01-01T08:00:00Z",
"ip": "10.0.0.1",
"modified_on": "2020-01-10T14:00:00Z",
"comment": "Private IP address"
}
],
"success": true,
"result_info": {
"cursors": {
"after": "yyy",
"before": "xxx"
}
}
}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"
}
}
],
"result": [
{
"id": "34b12448945f11eaa1b71c4d701ab86e",
"created_on": "2020-01-01T08:00:00Z",
"ip": "10.0.0.1",
"modified_on": "2020-01-10T14:00:00Z",
"comment": "Private IP address"
}
],
"success": true,
"result_info": {
"cursors": {
"after": "yyy",
"before": "xxx"
}
}
}