[FRONTIFY-6] API data on all asset types Created: 28/Dec/21  Updated: 26/Jan/23  Resolved: 06/Apr/22

Status: Closed
Project: Frontify
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Medium
Reporter: Miguel Ducanto Assignee: Teresa Miyar
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
causes FRONTIFY-15 Add parameter "permanent: true" to do... Closed
Template:
Acceptance criteria:
Empty
Date of First Response:

 Description   

When executing the graphQL query to get the data on an asset, most of the data gets retrieved only on Image type. 

This is due to Asset is an extensible type that has not all the properties. 

However, in order to be able to use frontify to choose from other asset types (such as videos and PDF documents), we need to extract some additional information on all the types. 

 

By Replacing the query on 

getAssetGraphQlQuery() in the file frontify-dam-connector/src/main/java/info/magnolia/external/dam/frontify/service/FrontifyServiceImpl.java

with: 

query AssetById {
  asset: node(id: ASSET_ID) {
    type: __typename
    id
    ... on Asset {
      creator

{         id         email       }

      createdAt
      modifiedAt
      copyright

{         status         notice       }

      description
      externalId
      id
      title
      tags

{         value       }

      metadataValues {         value       }

    }
    ... on Image

{       extension       filename       width       height       size       previewUrl       downloadUrl       focalPoint     }

    ... on Video

{       extension       filename       duration       bitrate       width       height       size       previewUrl       downloadUrl     }

    ... on Document

{       extension       filename       pageCount       size       previewUrl       downloadUrl     }

    ... on File

{       extension       filename       size       previewUrl       downloadUrl     }

  }

}

 

The information needed will be recovered on those types (Image, Video, Document and File) 



 Comments   
Comment by Riste Drangovski [ 31/Dec/21 ]

Hi Miguel, we updated the graphql query as you requested.
Do you need this extra information in the Java objects:
info.magnolia.external.dam.frontify.asset.FrontifyAsset
info.magnolia.external.dam.frontify.asset.FrontifyAssetMetadata

or json data that is saved in jcr is enough ?

Comment by Miguel Ducanto [ 03/Jan/22 ]

Hi, Riste!

On our side, we only use the info provided by the JSON data stored in the JCR, so it'd be enough for us

 

Once the code is deployed, we will conduct a deep testing on different asset types just to be sure, but I think everything will work as expected

 

Thank you!

Generated at Mon Feb 12 02:03:44 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.