Coursera -- Test your proxy Lab (Postman) throws errors

Not applicable

While testing my proxy with Postman, I get the following error:

Here are the request and error

https://{{org}}-{{env}}.apigee.net/v1/products/{{product_id}}
{
    "fault": {
        "faultstring": "Unable to identify proxy for host: secure and url: /v1/products/%7B%7Bproduct_id%7D%7D",
        "detail": {
            "errorcode": "messaging.adaptors.http.flow.ApplicationNotFound"
        }
    }
}


0 9 1,309
9 REPLIES 9

@Ivan De Los Santos - I hope you imported the Postman collection and the environment json. Once you have imported both, please make sure that the "Apigee-Edge-Dev-Training" environment is selected in the top right dropdown (please check the instructions in Coursera). You will need to update the Environment values with your Org name. Once you do that, Postman should pick those values and hit the endpoint

Sai,

I followed all the lab's instructions.

The only issue I see is that when I hover over the {{product_id}}, the variable is undefined.

6964-courserapostman.png

Not sure why you dont see the other params. Use this environment file and try. If you are not able to, then create a new entry in the env in postman. The id is 697690

Sai,

I think, I discovered what is wrong.

My current URI in Postman was:

https://{{org}}-{{env}}.apigee.net/v1/products/{{product_id}}

This was generating an error. whereas the API Proxy end point in the Apigee console is

https://{{org}}-{{env}}.apigee.net/db/products/{{product_id}}

I traced both of these requests in the trace console and in Postman.

This one was successful.

https://{{org}}-{{env}}.apigee.net/db/products/{{product_id}}

I then opened the spec file for the API proxy and noticed that the base path:

"basePath": "/v1",
  "paths": {
    "/products": {

Then, I changed to:

"basePath": "/db",
  "paths": {
    "/products": {

I executed the request in the spec console and in Postman and It works in both places.

Let me know if this is an acceptable solution. I am afraid to continue with the course and find that this change will haunt me somewhere down the line.

Cheers,

@Ivan De Los Santos

It should not be changed, it should work as expected. Can you confirm that the URL in your Target end point of your Products proxy is https://{org}-test.apigee.net/db ?

jyothikiranr
Participant IV

Hello Everyone, It seems that several of us ran into this issue with the second Lab in course two. Lab: Test your Proxy

Im posting these steps here for your reference incase anyone runs into this issue.

  • When running node setup -- Make sure your Firebase Host name doesn't contain https:// at the beginning and not leading slash ( / ) at the end. So your firebase hostname that you input at console should look like this apigee-developer-trainin-xxxxx.firebaseio.com without protocol and leading slash at the end.
  • Important -- In second step when creating proxy from spec, you are asked to enter proxy name, Proxy Base Path (Make Sure its /v1 -- it will auto populate as /products) , existing API (make sure its like https://xxxx.apigee.net/db) and product description. (these instructions are given on the course tutorial)
  • Continue with setup, and test your proxy

I hope this helps anyone who got stuck.

Thanks

** Edit - dont need to edit spec, You can just rename the path for the existing API.

Hi @Jyothi K Reddy - I do not think any change is required to the spec, just follow the instructions during the create proxy wizard. That has what values you need to pass.

@ssvaidyanathan Yes, I agree. Updated my answer here.