AEMasCS REST API calls from POSTMAN or any external application

This post details the steps to invoke REST API hosted in AEM as a Cloud Service (AEMasCS) instance from POSTMAN or any external application. 


As we all know AEM is REST based Web application and contents of Repository can be accessed via GET call to respective path (Eg say,  ".json" extension or content path with ".html" extension) and updates to Repository is possible via respective HTTP method type + API endpoint as exposed (Eg. Assets HTTP API Create Folder POST request)provided we have Authentication and Authorization to the accessing endpoints. 
  • Authentication is achieved using the credentials that we use to access our instance.
    • Eg. In our local AEM author instance, we login using admin/admin or any username as created/available in the respective instance
  • Authorization refers to the permissions to the path we are accessing 
    • Eg: If we are to make GET request on /content/we-retail.html, we need to have read permission on this path.
Given this understanding, when we want to access an endpoint from our AEM instance using POSTMAN, we need to set the Authentication information via  tab -> "Authorization" with respective Type. (Which would help generate an Authorization Header for making an HTTP request)
  • For Classic AEM instance, we need to use "Basic" Type -> respective Username and Password input as we would give in our AEM instance.
  • For AEMasCS instance(the one as hosted in cloud and NOT Cloud Service SDK instance), we need to use Token Based Authentication -> "Bearer" Type -> Token value as input. 
AEM instance 6.5.0:

Screenshot below highlights use of Assets HTTP API "Create Folder" request hosted in local classic AEM instance 6.5.0


AEMasCS instance:

For AEMasCS instance, Token value is acquired from AEM Developer console. 
  • For Local Development, we can use Temporary Access Token. 
  • For actual integration in case of an external application say from frontend app like React, we need to make use of Service Credentials. 
  • Details for the same is explained here in Adobe Doc with Video Demo and sample Node JS application for both Local Development Access Token and for Service Credentials
  • In POSTMAN, we need to input the Token as acquired above(using Local Development Access Token) in below highlighted screenshot. 
Note :  
  • Token Based authentication is required only when we access AEMasCS instance as available in cloud from any external application. 
    • In this case, external application is POSTMAN. 
    • In the sample illustrated in above Adobe doc, external application refers to Node JS application.
  • Highlighted in red in below screenshot is the dummy AEMasCS URL. I don't have access to any AEMasCS instance, It is used in the screenshot to highlight the usage.


I had a chance to respond to a query (related to this subject) raised in our Experience League Community recently. 
Below is the respective thread for reference. (Has sample request details to be used in React Code)

Comments

  1. Agile software outsourcing by a top Artificial Intelligence Technologies companies can help minimize costs and improve time to market.

    ReplyDelete
  2. Coin Development Company Coin Development Company is a trusted partner in cryptocurrency development, offering expert team, tailored solutions, innovative technology, security, and comprehensive support. We specialize in coin creation, token development, smart contracts, and blockchain consulting. Our team focuses on staying ahead of the curve, ensuring your coin stands out in the market, and providing ongoing maintenance and updates to keep your coin running smoothly.

    ReplyDelete
  3. The LDPE shrink film has one of the most significant manners in providing good holding force along with good tear resistance and stretching ability. The shrinkage rate is considered moderate, shrinkage is not as dramatic as polyolefin, yet LDPE will still conform tightly to different shapes and sizes of packages.

    ReplyDelete
  4. Looking through various surfacing materials, your explanation makes the selection process much easier. If you need high-quality hpl high pressure laminate, Stylam Industries Limited provides a wide collection that enhances both style and structural integrity.

    ReplyDelete
  5. WebClues Infotech specializes in the knowledge of these requirements prior to deciding on a proper development approach, which helps companies to evade unneeded technical intricacy. Python development solution is also capable of offering a base to be used in incorporating new technologies as the business requirements change. In case your organization is looking to integrate Python applications with intelligent functionality, get in touch with WebClues Infotech and discuss its generative AI development services and find appropriate problem-solving and problem-oriented applications.

    ReplyDelete
  6. NET Development Companies assists companies to develop reliable web applications, APIs, enterprise platforms and cloud ready software with the help of the Microsoft.NET ecosystem. WebClues Infotech is an ASP partner.NET Core to build scalable applications, modernize old systems, and integrate with third parties, as well as enhance performance of applications. In case your project needs smart capabilities and a reliable software base, you may consider looking into the generative AI development services of WebClues Infotech. Talk with the team about your needs to find out which aspects of AI can be used to supplement your current or intended use.

    ReplyDelete
  7. AI development is becoming popular to solve business problems such, as routine tasks, data analysis, customer support and decision making. A good AI solution must solve a well‑defined problem not simply automate something. WebClues Infotech specializes in building AI solutions that fit particular business needs including machine learning, generative AI, data solutions and intelligent automation.

    When your company thinks about using AI but needs help deciding the right use case, architecture or rollout plan contact WebClues Infotech. Discover our AI development services that turn real business challenges into scalable smart solutions.

    ReplyDelete

Post a Comment

Popular posts from this blog

Creation of Template Types for Editable templates

Embedding Third party dependency/OSGi bundle in AEM application hosted in AEMasCS

Lucene Index in AEM - Part 1