API error "filters.api.not_found: could not find list xxx" while in console that xxx exists

curl API for Get list items returns error “filters.api.not_found: could not find list xxx” while in console that xxx exists.

my testing detail is as below:

curl --request GET --url (https://api.cloudflare.com/client/v4/accounts/9***********1/rules/lists/botlist) --header “Content-Type: application/json” --header “X-Auth-Email: v*****@.com" --header "X-Auth-Key:5**********4”

response is:
{
“result”: null,
“success”: false,
“errors”: [
{
“code”: 10001,
“message”: “filters.api.not_found: could not find list botlist”
}
],
“messages”:
}

console:

console screen dump

Use https://api.cloudflare.com/client/v4 /accounts/{account_identifier}/rules/lists to return a list of your lists.

In the response you will find the IDs of the lists you are using. Locate the ID for your botlist list and then you can get the content of the list using https://api.cloudflare.com/client/v4 /accounts/{account_identifier}/rules/lists/{list_id}

list_id is an identifier like 2c0fc9fa937b11eaa1b71c4d701ab86e, not the name of your list.

See…

1 Like

Thanks a lot man

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.