Using postman to post data into proxy

I want to post json data by postman into apigee proxy.I created a reverse proxy and used target server as http://mocktarget.apigee.net/.

When I send post request It gives me 404 error.

I saw this https://community.apigee.com/questions/54530/creating-an-api-proxy-for-post-request.html

But when i used no target server to create a proxy it gives me 200.But how do i check the data in proxy?When I click on url it shows me no data.

In a free account I want to post json data by postman and read back the data.

Solved Solved
0 13 2,428
2 ACCEPTED SOLUTIONS

sidd-harth
Participant V

Try with HTTPBin example.

Create another simple reverse proxy and use http://httpbin.org/anything as target server.

In Postman use POST method and send a body as shown in the link ,

Sample JSON,

{
"name":"Hima"
}

View solution in original post

ylesyuk
Participant V

> In a free account I want to post json data by postman and read back the data.

When you created no target server proxy, deployed, and executed it, by default you do not get back your request data. You get back a newly-created empty default response.

To implement your requirement, i.e., echo incoming request payload into outgoing response, you need to use Assign Message policy in the RESPONSE flow with <Copy>/<Payload> elements.


Then, you can use POSTMAN or other http client to execute a POST request with a body. You will get its copy as a response.

View solution in original post

13 REPLIES 13

sidd-harth
Participant V

Try with HTTPBin example.

Create another simple reverse proxy and use http://httpbin.org/anything as target server.

In Postman use POST method and send a body as shown in the link ,

Sample JSON,

{
"name":"Hima"
}

Thanks for prompt response.

ylesyuk
Participant V

> In a free account I want to post json data by postman and read back the data.

When you created no target server proxy, deployed, and executed it, by default you do not get back your request data. You get back a newly-created empty default response.

To implement your requirement, i.e., echo incoming request payload into outgoing response, you need to use Assign Message policy in the RESPONSE flow with <Copy>/<Payload> elements.


Then, you can use POSTMAN or other http client to execute a POST request with a body. You will get its copy as a response.

Thanks.I may sound naive.But when i click url in apigee i get blank?

> when i click url in apigee i get blank?

If you’re talking about Send button of Edge UI Tracing facility, then this is a very simple GET request http client. As you’re sending GET request, which does not have body, you are not getting any response payload back. That’s why you need to switch to Postman or Curl or another http client. Still, this is a successful GET request with 200 response.

status.png. In apigee overview url beside revision status ..Thanks.

OK. Functionally, this url link is an equivalent of Send button in Trace tab. I.e., it opens a new browser tab and sends GET request with no parameters or headers to the proxy endpoint.

The difference is Send button execute this request from Edge UI server and Overview URL executes the request from your computer.

Thanks..ylesyuk

Now i want to send the response from proxy to another url using service callout policy?Do i have to remove the assign message policy?I want the response payload not in postman but in another url?

This seems like a new question.

@Dino-at-Google

Yes I implemented after seeing the above solution.Now I want to redirect the payload to a different api.

yes i understand. I am suggesting that you should ASK A NEW QUESTION, instead of posting a new question as a comment to an existing answer.

@Dino-at-Google.I will upload the entire problem,the work i did and the result I am expecting with trace and will upload the proxy also..Please help me..With very little knowledge in Apigee.