Cloudflare Images API docs outdated

While toying around with Cloudflare Images I’ve found the following discrepancies between the API docs and the actual API responses:

  • The image properties (and all example responses) list a metadata property, but this field is called meta in the actual response from the API.
  • The image properties (and all example responses) show the variants property as an object (map of string to string), but it seems to be actually a list of strings.
  • The example response from listing images contains the metadata (or meta as it should be) property, but this property is not included in the response of this API. The meta field is only included when requesting the image details for a single image. It’d actually be cool to include the meta property in the list response, would make it easier to develop third party integrations that rely on data within meta.

While I am at it, when editing an image variant in the UI, the Fit select always reverts back to Scale down, regardless of what is actually selected.

Not sure if the community is the best place for reports like that, but couldn’t find another suitable way of reporting that.

Cheers

On the subject of metadata, the API docs define it as “User modifyable” but I haven’t found any way to modify it after it was sent with an image upload.
And I agree that not including the metadata in image listings reduces its usability a lot.

i’d like to add that in the upload API the parameter is called metadata and in the get details API it’s returned as meta

[
  "result" =>  [
    "id" => "image-id"
    "filename" => "Schermafbeelding 2021-10-05 om 23.48.54.jpg"
    "meta" =>  [
      "productId" => 65009
    ]
    "uploaded" => "2021-10-06T14:51:47.294Z"
    "requireSignedURLs" => false
    "variants" =>  [
      0 => "https://imagedelivery.net/account-tag/image-id/public"
      1 => "https://imagedelivery.net/account-tag/image-id/thumb"
    ]
  ]
  "result_info" => null
  "success" => true
  "errors" => []
  "messages" => []
]

I think I’ve already bugged @kody once this week, but twice is twice as good when it comes to updating documentation.

I’d feel insulted if you didn’t @sdayman! Let me escalate this to our team, though maybe this is a Prod thing… (and get back to you on that other comment).

1 Like

Put a ticket in the Images team’s backlog. I’d think that they would come back to this thread when they address the issue, but I guess we’ll see?

1 Like

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