JSON parameters added directly to query string failing

25 views Asked by At

Hopefully a fairly simple request here. I am hitting the following endpoint through Postman:

https://ipacb.ecosphere.fws.gov/location/api/resources

For a different tool, I need the full query string the comes after adding the following JSON:

{
  "location.footprint": "{\"coordinates\":[[[-95.1306152,30.4486737],[-93.6584473,29.4061051],[-94.6691895,28.5314486],[-96.5368652,29.9834867],[-95.1306152,30.4486737]]],\"type\":\"Polygon\"}",
  "timeout": 2,
  "apiVersion": "1.0.0",
  "locationFormat": "GeoJSON",
  "includeOtherFwsResources": true,
  "includeCrithabGeometry": false
}

My guess has been:

https://ipacb.ecosphere.fws.gov/location/api/resources?location.footprint={"coordinates":[[[-95.1306152,30.4486737],[-93.6584473,29.4061051],[-94.6691895,28.5314486],[-96.5368652,29.9834867],[-95.1306152,30.4486737]]],"type":"Polygon"}&timeout=2&apiVersion=1.0.0&locationFormat=GeoJSON&includeOtherFwsResources=true&includeCrithabGeometry=false

Unfortunately, it's barfing and I can't quite figure out what the syntax error is.

I have also tried getting it in the tests tab on Postman tests via pm.request.url.query to no avail.

Any help with what I'm formatting poorly?

0

There are 0 answers