contentfulcontentful-management

Get all entries with included images using Contentful REST API


I am using typescript,and the Contentful-ManagementAPI (that's the reason I'm not using the SDK client), and I want to retrieve all entries from a specific type. I am calling th Api like this: axios.get("https://api.contentful.com/spaces/" + space_id + "/entries?content_type=" + content_type+"&include="+2)

I am receiving all the entries requested, but in the image field I am getting this:

poster:en-US: sys: {type: "Link", linkType: "Asset", id: "222xxm9aaAu4GiAc2ESw0Q"}

So, How could I get the image URL? I would appreciate any help. Thanks


Solution

  • From the Contentful docs:

    The CMA does not support the include and locale parameters.

    So, I might be better using the delivery api for retrieve content, and the management api for create/update/delete. That's the way it should be used.