Which API to choose

When selecting an API for your integration, consider the following factors:

  • Use Case: Determine whether the AEM API supports your use case. Whenever possible, use OpenAPI-based AEM APIs, as they provide a standardized, modern approach to interacting with AEM. If OpenAPI-based APIs are not available, consider using RESTful APIs or GraphQL APIs and as a last resort, traditional APIs.

  • Compatibility: Ensure that the selected API is compatible with your AEM version. For instance, OpenAPI-based AEM APIs are exclusive to AEM as a Cloud Service and are unavailable in AEM 6.X.

  • AEM Service Type: Author vs. Publish: The choice of API also depends on whether it runs on the Author or Publish service, as their access models are different. The AEM Author service is used for content creation and always requires authentication. The AEM Publish service is used for content delivery and may not require authentication, depending on the use case.

  • Authentication: Verify that the API supports the authentication method you plan to use. For example:

    • OpenAPI-based AEM APIs: support OAuth 2.0 authentication, including Client Credentials (Server-to-Server), Authorization Code (Web App), and Proof Key for Code Exchange (Single Page App) grant types. Other AEM APIs do not support OAuth 2.0 authentication.
    • RESTful APIs: support JSON Web Token (JWT) authentication, also knows as token-based authentication.