Reputation: 41
I'm running into an issue where trying to pull a list of assets on a folder by folder basis:
The docs show that assetHandleArray is a required field for “getAssets” and the docs have a description of “The root folder to retrieve folders and all subfolders to the leaf level. If excluded, the company root is used.”
But, when we try to put a folder handle it throws an illegal handle exception.
References: https://marketing.adobe.com/resources/help/en_US/s7/ips_api/operations/r_get_assets.html
Example Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.scene7.com/IpsApi/xsd/2014-04-03">
<soapenv:Header>
<ns:authHeader>
<ns:user>***********</ns:user>
<ns:password>***********</ns:password>
<ns:appName>MYAPP</ns:appName>
<ns:appVersion>1</ns:appVersion>
</ns:authHeader>
</soapenv:Header>
<soapenv:Body>
<ns:getAssetsParam>
<ns:companyHandle>c|12345</ns:companyHandle>
<ns:assetHandleArray>
<!--Zero or more repetitions:-->
<ns:items>f|Path/to/folder/</ns:items>
</ns:assetHandleArray>
</ns:getAssetsParam>
</soapenv:Body>
</soapenv:Envelope>
Example Response:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server</faultcode>
<faultstring>ipsApiFault</faultstring>
<detail>
<tns:ipsApiFault xmlns:tns="http://www.scene7.com/IpsApi/xsd">
<tns:code>30000</tns:code>
<tns:reason>Illegal AssetHandle (f|Path/to/folder/)</tns:reason>
</tns:ipsApiFault>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
So how do I go about getting assets?
Upvotes: 2
Views: 2096
Reputation: 41
Here is the answer in case anyone else tries to integrate with this service. The method that should be used to get assets by folder is the searchAssets method.
Upvotes: 2