Skip to main content
Level 4
Oct 26, 2023 6:20 AM UTC

API not working from Postman

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.

8 replies

aanchal-sikka
Community Advisor
Community Advisor
Oct 26, 2023 6:26 AM UTC

Hello @goyalkritika 

 

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

Translate
Aanchal Sikka
Level 4
Oct 26, 2023 6:33 AM UTC

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

 

Translate
aanchal-sikka
Community Advisor
Community Advisor
Oct 26, 2023 6:36 AM UTC

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. 

Translate
Aanchal Sikka
Jagadeesh_Prakash
Community Advisor
Community Advisor
Oct 26, 2023 9:28 AM UTC

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

Translate
arunpatidar
Community Advisor
Community Advisor
Oct 26, 2023 1:35 PM UTC

Hi @goyalkritika 
Are you trying in Author or Publish?

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

Translate
Arun Patidar
kautuk_sahni
Level 9
Oct 30, 2023 11:10 AM UTC

@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.

Translate
Kautuk Sahni