API only returns entities for subfolders, not assets

Avatar

Avatar
Validate 1
Level 1
quarfie
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
quarfie
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
Top badges earned
Validate 1
View profile
quarfie
Level 1

12-12-2020

GET http://host:port/api/assets/myfolder.json 

Returns an object that contains "entities", an array of objects where each is a folder within "myfolder"

But when I do the same for a folder that contains assets...

GET http://host:port/api/assets/myfolder/mysubfolder.json  

There is no "entities" key at all.

"properties" is there (as well as "links", "class", and "actions"), and this contains paging information that shows me that there's something there ("total" > 0), plus I have links for "next" (and "previous" if I follow a "next" link), but I don't actually get the entities listing.

Note: on the web interface, every asset has a flag that says "REQUIRED METADATA MISSING". Would this be why they are excluded from the API? Can that be changed?

Note: I am a beginner with only 1 hour of experience with AEM! Just trying to do a simple integration with a project management app. Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Affirm 100
MVP
shelly-goel
MVP

Likes

246 likes

Total Posts

410 posts

Correct reply

105 solutions
Top badges earned
Affirm 100
Give Back 25
Ignite 3
Give Back 10
Validate 1
View profile

Avatar
Affirm 100
MVP
shelly-goel
MVP

Likes

246 likes

Total Posts

410 posts

Correct reply

105 solutions
Top badges earned
Affirm 100
Give Back 25
Ignite 3
Give Back 10
Validate 1
View profile
shelly-goel
MVP

13-12-2020

Hello@quarfie 

Yes there would be metadata schema applied on the assets folder which is validating if all the assets have mandatory metadata fields in it or not and displaying the flag. A property "hasValidMetadata" would be added to "jcr:content" of assets which is used to filter the invalid assets in a search result.

You can navigate to a specific asset's properties and add the missing mandatory metadata. You can also check which metadata schema is applied to the Asset's parent folder and navigate to Tools > Assets >  Metadata Schema Forms and see those properties configured as mandatory.

Please refer here: https://experienceleague.adobe.com/docs/experience-manager-65/assets/administer/metadata-schemas.htm...

Answers (0)