Error code 7000,


#1

Hi,
I want to get the list of zones using the API by “GET zones” but I receive this error:

{
“success”: false,
“errors”: [
{
“code”: 7000,
“message”: “No route for that URI”
}
],
“messages”: ,
“result”: null
}


#2

Whats the URL you are calling?


#3

https://api.cloudflare.com/client/v4/zones[


#4

That looks like the right URL. Did you double check your request follows the example?

curl -X GET "https://api.cloudflare.com/client/v4/zones?name=example.com&status=active&page=1&per_page=20&order=status&direction=desc&match=all" \
     -H "X-Auth-Email: [email protected]" \
     -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
     -H "Content-Type: application/json"

#5

I use Postman and this is my request:

GET /client/v4/zones[? HTTP/1.1
Host: api.cloudflare.com
X-Auth-Email: ****@gmail.com
X-Auth-Key: *****
cache-control: no-cache
Postman-Token: 5a414564-ab84-4c83-9fd7


#6

What is this [ doing there?


#7

I do not know. I just fill the fields in Postman and Postman makes the url
I used the .json collection file obtained here:


#8

That configuration file contains https://api.cloudflare.com/client/v4/zones[?name=example.com&status=active&page=1&per_page=20&order=status&direction=desc&match=all] as URL.

Not sure if the bracketed value has a special meaning, but if it does not it will break the request. My best guess would be you are supposed to adjust that URL. If it is unclear I’d probably open a support ticket at https://support.cloudflare.com/requests/new.


#9

yes if you download this file and search the link inside it, you can see it there.


#10

That’s exactly what I was referring to.


#11

Thanks
I deleted the [ from the URL and it worked!:smile::smile: I think the .jason configuration file for Postman should be corrected for other users.


#12

Well, that URL looks like that value is supposed to be substituted by some actual value. Either automatically or manually.