내 커뮤니티 업적 표시줄을 확대합니다.

Submissions are now open for the 2026 Adobe Experience Maker Awards.
해결됨

How to to add a metadata subnode to jcr:content/metadata to files using AEM API from Fusion

Avatar

Level 2

For metadata organizational purposes, I am trying to add subnodes to jcr:content/metadata/ using the AEM Custom API Call module in Workfront Fusion.  I am trying to do this after loading a new asset to AEM using Workfront Fusion.

 

For example, I'd like to add 

  • jcr:content/metadata/subnode1/subfield1
  • jcr:content/metadata/subnode1/subfield2
  • jcr:content/metadata/subnode2/subfield1
  • jcr:content/metadata/subnode2/subfield2

 

I can add/update existing fields that live in /metadata just fine.  It's when I am trying to add/update a subnode to /metadata where I have an issue since subnode1 and subnode2 do not yet exist (they are not automatically being added in AEM and hence do not appear through CRXDE Lite), i get a 403 error when trying to execute:

{
	"class":"asset",
	"properties":{
		"metadata":{
			"subnode1":{
				"subfield1":"test",
				"subfield2":"test"
			}
		}
	}
}

 

Here is the complete input bundle: 

[
    {
        "url": "api/assets/folder1/folder2/folder3/filename.pdf",
        "body": "{\"class\":\"asset\",\"properties\":{\"metadata\":{\"subnode1\":{\"subfield1\":\"test\",\"subfield2\":\"test\"}}}}",
        "method": "PUT",
        "headers": [
            {
                "key": "Content-Type",
                "value": "application/json"
            }
        ]
    }
]

 

Is there a way I can dynamically add subnode1 to jcr:content/metadata through the AEM API and Fusion?

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Community Advisor

@bfamous ,

In this case, I would check the user credentials you are passing while trying to add these nodes under the ASSET metadata folder. Also, make sure the user credentials you are using to add these sub-nodes has write access under /content/dam/ node hierarchy.

원본 게시물의 솔루션 보기

3 답변 개

Avatar

Administrator

@Rezwanur @Saravanan_Dharmaraj @Sudheer_Sundalam @lukasz-m @Preetpal_Bindra @Harwinder-singh @Gaurav_Sachdeva_ @DPrakashRaj @aanchal-sikka Can you please review this unanswered question? Appreciate your thoughts on this.



Kautuk Sahni

Avatar

정확한 답변 작성자:
Community Advisor

@bfamous ,

In this case, I would check the user credentials you are passing while trying to add these nodes under the ASSET metadata folder. Also, make sure the user credentials you are using to add these sub-nodes has write access under /content/dam/ node hierarchy.

Avatar

Level 3

HI, sorry I can't help with your problem but can you show me what the JSON body looks like for updating the existing fields that live in /metadata? I am trying to do this and struggling to get it to work. Any hints would be helpful. Thanks