Newman Runner with uuid as a path parameter returning 404

I’m running a small collection via newman that has some endpoints with a UUID as a path parameter. The endpoints return a 200 within the POSTman app but a 404 within newman runner. I looked at htmlextra but ran into other issues. Any idea?

{{host}}/somePath/7cc950f7-2407-4ec7-ba64-b1572ac86327 [404 Not Found, 288B, 250ms]

All endpoints without a UUID as a path param works as expected.

Hey @dkoakes :wave:

Welcome to the Postman Community! :postman:

It looks like the variable that you have for {{host}} isn’t resolved - What type of variable is that? How are you referencing that in the newman command?

Are you sure the {{host}} is the issue, as 404 means the resource can’t be found, it usually means the server can be reached.

As for the UUID, this will be down to the API spec. Is the UUID in the correct format, and does it exist in the system?

1 Like

True - I was just initially thinking that it should be resolved but looking at the example, they could have just replaced that in the example, like with somePath :thinking:

Hey thanks for the welcome!!.. sorry for the confusion it’s just a placeholder for the real host name, somePath is a placeholder for the real path as well as I was attempting to not show the real URL…

what it really looks something more like below… and all the environment variables are resolving because other requests in the same collection are passing with 200s

GET [404 Not Found, 288B, 254ms] not working

GET [200 OK, 902.44kB, 500ms] working

It’s weird that any request with UUID in the URL newman runner always returns a 404(works in postman app returns 200) but we use UUID as resource identifiers

If its working in Postman, but not Newman, then its most likely an issue with your variables.

How exactly are you defining the variables?

If you are using environment files, then ensure you are including the environment in the Newman command line options.

Leverage the console log as much as you can and check what is being sent in Postman vs Newman to see if there are any differences (however subtle).

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.