natcap / urban-online-workflow

This repository hosts the beta implementation of the Urban Online ES Workflow. The project is intended to give urban planners the ability to create and assess scenarios using InVEST Urban models.
1 stars 5 forks source link

/stats_under_parcel/ TypeError #42

Closed davemfish closed 1 year ago

davemfish commented 1 year ago

I see this just when testing this endpoint at the FastAPI docs:

TypeError: Failed to execute 'fetch' on 'Window': Request with GET/HEAD method cannot have body.

Also for the payload, I'm also not sure where we get stats_id? Is this like a job id? Maybe the request can just be made with the WKT polygon and return a table like this, mapping lucodes to the number of pixels with that code inside the polygon? Or does it need to be submitted to the job queue and then the result requested later?

{ 1: 24, 9: 3, 88: 9 }

emlys commented 1 year ago

I had these questions as well. I think I updated that to be a POST endpoint on the frontend-backend-integration branch?

dcdenu4 commented 1 year ago

Just to relay what I noted on Slack:

Just a note in case it's helpful. Requesting the result from Wallpapering from the endpoint scenario/result will return the LULC URL and Stats. For stats_under_parcel endpoint, that was in anticipation of wanting stats prior to running a scenario and it looks like I didn't create an endpoint to get the results of that job!

davemfish commented 1 year ago

This is resolved now. I no longer see a TypeError.