How do I list a single specific image-id via v2 endpoint for cloudflare images?

Since the v1 way to list images from Cloudflare Image is deprecated, I would like to switch to v2. However, I already ran into a question I can’t answer and does not seem to be documented

with v1 I could just do:

    def get_image(self, image_id):
        url = "https://api.cloudflare.com/client/v4/accounts/{0}/images/v1/{1}".format(self.account_id, image_id)
        headers = {
            "Authorization": "Bearer " + self.api_key,
            "Content-Type": "application/json"
        }
        response = requests.get(url, headers=headers).json()
        print(response)

and i successfully queried my single image id.
with v2, this does not seem to be possible anymore? It works fine if i don’t specify an image id like so:

    def get_image(self, image_id):
        url = "https://api.cloudflare.com/client/v4/accounts/{0}/images/v2".format(self.account_id)
        headers = {
            "Authorization": "Bearer " + self.api_key,
            "Content-Type": "application/json"
        }
        response = requests.get(url, headers=headers).json()
        print(response)

Can I somehow still list only one specific image id or is that not supported anymore?

what are you describing is not listing API.

It’s fetching image details and it works as expected, there is no V2

This topic was automatically closed after 15 days. New replies are no longer allowed.