API not working from Postman | Community
Skip to main content
Level 4
October 26, 2023

API not working from Postman

  • October 26, 2023
  • 4 replies
  • 1220 views

I have an API (POST) and I am getting the below response from Postman. What can be the issue?

 

<html>

<head>
    <title>Content modified /content/spartacus-endpoint/getNavigationData</title>
</head>

<body>
    <h1>Content modified /content/spartacus-endpoint/getNavigationData</h1>
    <table>
        <tbody>
            <tr>
                <td>Status</td>
                <td>
                    <div id="Status">200</div>
                </td>
            </tr>
            <tr>
                <td>Message</td>
                <td>
                    <div id="Message">OK</div>
                </td>
            </tr>
            <tr>
                <td>Location</td>
                <td><a href="/content/spartacus-endpoint/getNavigationData"
                        id="Location">/content/spartacus-endpoint/getNavigationData</a></td>
            </tr>
            <tr>
                <td>Parent Location</td>
                <td><a href="/content/spartacus-endpoint" id="ParentLocation">/content/spartacus-endpoint</a></td>
            </tr>
            <tr>
                <td>Path</td>
                <td>
                    <div id="Path">/content/spartacus-endpoint/getNavigationData</div>
                </td>
            </tr>
            <tr>
                <td>Referer</td>
                <td>
                    <div id="Referer"></div>
                </td>
            </tr>
            <tr>
                <td>ChangeLog</td>
                <td>
                    <div id="ChangeLog">&lt;pre&gt;&lt;/pre&gt;</div>
                </td>
            </tr>
        </tbody>
    </table>
    <p><a href="/content/spartacus-endpoint/getNavigationData">Modified Resource</a></p>
    <p><a href="/content/spartacus-endpoint">Parent of Modified Resource</a></p>
</body>

</html>
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

4 replies

aanchal-sikka
Community Advisor
Community Advisor
October 26, 2023

Hello @goyalkritika 

 

Can you possibly share the Request that you sending from postman?

Aanchal Sikka
Level 4
October 26, 2023

Hi @aanchal-sikka please find below the request snapshot.

 

aanchal-sikka
Community Advisor
Community Advisor
October 26, 2023

Hello @goyalkritika 

 

Are you sure the URL used is correct?

A URL "/content/spartacus-endpoint/getNavigationData" seems more like a content to be created in AEM. It doesn't seem like a Servlet URL accepting POST request. 

Aanchal Sikka
Jagadeesh_Prakash
Community Advisor
Community Advisor
October 26, 2023

Hi @goyalkritika 

 

Can I know what is the purpose of the API ? are you using any service user to write or create data on jcr ?

 

If yes, Please check the permissions of that service user

arunpatidar
Community Advisor
Community Advisor
October 26, 2023

Hi @goyalkritika 
Are you trying in Author or Publish?

Can you share how do you hit API from postman and from browser?

Arun Patidar
kautuk_sahni
Community Manager
Community Manager
October 30, 2023

@goyalkritika Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.

Kautuk Sahni