404 error when using Assets Open API search on delivery endpoint

This article explains how to resolve a 404 error encountered when using the AEM Assets Open API search endpoint on the delivery layer.

Description description

Environment

Adobe Experience Manager as a Cloud Service (AEMaaCS) (all versions)

Issue/Symptoms

When attempting to use the AEM Assets Open API to search for activated assets through the endpoint documented in the AEM Assets Delivery API, requests to the delivery endpoint (for example, https://delivery-<env>.adobeaemcloud.com/adobe/assets/search?allowUnsafeSearch=true) return a 404error:

404 "No RequestProcessor can handle this request."
  • The request body is a standard search query, such as:

    { "query": [ { "match": { "text": "*", "fields": [ "assetMetadata.dc:title" ] } } ] , "limit": 10 }

  • The error persists even after you configure product profiles and authentication in the Adobe Developer Console.

  • The same request works as expected when you send it to the author endpoint (for example, https://author-<env>.adobeaemcloud.com/adobe/assets/search?allowUnsafeSearch=true).

Cause

The search API is only available on the author tier. Requests to the delivery tier for this operation return a 404 error because the endpoint is not implemented there.

Resolution resolution

Note: The search operation is not supported on the delivery endpoint. Use the author endpoint for asset search operations.

To resolve this issue, follow these steps:

  1. Send the AEM Assets Open API search request to the author endpoint instead of the delivery endpoint by using the correct URL, such as https://author-<env>.adobeaemcloud.com/adobe/assets/search?allowUnsafeSearch=true.

  2. Use a POST request with the required headers and request body as defined in the AEM Assets API documentation, and run the request with the correct endpoint by executing a cURL command such as

    curl -u "admin:<password>" -X POST "https://author-<env>.adobeaemcloud.com/adobe/assets/search?allowUnsafeSearch=true" \ -H "Content-Type: application/json" \ -d '{ "query": [ { "match": { "text": "*", "fields": [ "assetMetadata.dc:title" ] } } ] , "limit": 10 }'

  3. Ensure the required Assets API feature toggles are enabled in your environment if the author endpoint returns a 404 error.

recommendation-more-help
experience-cloud-kcs-help-kbarticles