GraphQL API : Get Image details like title and description | Community
Skip to main content
Level 4
October 12, 2022

GraphQL API : Get Image details like title and description

  • October 12, 2022
  • 2 replies
  • 1927 views

I am using AEM GQL API and want to fetch the image document's metadata like title and description?

 

Currently my query looks like this:

I don't see any way to get article title and description. Can someone help me understand how can I fetch the same?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

SantoshSai
Community Advisor
Community Advisor
November 25, 2022

Hi @spidey1405,

Please refer this:

{
  adventureList {
    items {
      _path,
      _metadata {
        stringMetadata {
          name,
          value
        }
        stringArrayMetadata {
          name,
          value
        }
        intMetadata {
          name,
          value
        }
        intArrayMetadata {
          name,
          value
        }
        floatMetadata {
          name,
          value
        }
        floatArrayMetadata {
          name,
          value
        }
        booleanMetadata {
          name,
          value
        }
        booleanArrayMetadata {
          name,
          value
        }
        calendarMetadata {
          name,
          value
        }
        calendarArrayMetadata {
          name,
          value
        }
      }
    }
  }
}

Reference: https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/headless/graphql-api/sample-queries.html?lang=en#sample-wknd-metadata

Hope that helps!

Regards,

Santosh

Santosh Sai
Level 4
November 28, 2022

Hi Santosh this is only for the metadata associated with that whole content fragment and not exactly the image asset. 😞

krati_garg
Adobe Employee
Adobe Employee
November 28, 2022

@spidey1405 There is no OOTB way to extract Image Ref Metadata out of a Content Fragment Query.

 

These are the only attributes available for Image Reference:

I believe a custom solution needs to be designed for such cases.

Level 4
November 29, 2022

Hmm so through GQL Query we cannot do that unless we introduce some customization in source code? What customisation are you talking about?