Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MapShed Endpoint to Geoprocessing API #3472

Closed
rajadain opened this issue Feb 2, 2022 · 0 comments
Closed

Add MapShed Endpoint to Geoprocessing API #3472

rajadain opened this issue Feb 2, 2022 · 0 comments
Assignees
Labels
2 DRWI Funding Source: Delaware River Watershed Initiative

Comments

@rajadain
Copy link
Member

rajadain commented Feb 2, 2022

To the geoprocessing API, add a new endpoint at /model/mapshed/, which copies the behavior of apps.modeling.views.start_mapshed.

This view should have the same decorators as all the other endpoints:

@swagger_auto_schema(method='post',
manual_parameters=[schemas.WKAOI],
request_body=schemas.MULTIPOLYGON,
responses={200: schemas.JOB_STARTED_RESPONSE})
@decorators.api_view(['POST'])
@decorators.authentication_classes((SessionAuthentication,
TokenAuthentication, ))
@decorators.permission_classes((IsAuthenticated, ))
@decorators.throttle_classes([BurstRateThrottle, SustainedRateThrottle])
@log_request

With the appropriate authorization header, you should be able to post a geojson to it, such as 1-sq-km.geojson.txt, or a WKAoI such as huc12__55174. In both cases, the response should be a JSON blob with a job id. This job should be queryable by the /jobs/ endpoint.

This should not include any sub-basin capability.

@rajadain rajadain mentioned this issue Feb 2, 2022
37 tasks
@rajadain rajadain changed the title Add endpoint to the geoprocessing API that can start a MapShed job Add MapShed Endpoint to Geoprocessing API Feb 2, 2022
@rajadain rajadain added the DRWI Funding Source: Delaware River Watershed Initiative label Feb 2, 2022
@rajadain rajadain self-assigned this Feb 8, 2022
@obrienad obrienad added the 2 label Jun 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 DRWI Funding Source: Delaware River Watershed Initiative
Projects
None yet
Development

No branches or pull requests

3 participants