-
Notifications
You must be signed in to change notification settings - Fork 1
MP Data Manager API Documentation
This document lays out all API endpoints offered by MP Data Manager.
This endpoint is intended for future development to migrate historic API endpoints into Django's REST Framework.
As of the time of this writing, little work on this has been done, and so this endpoint serves little purpose, but to hint at all of the great features embedded into Django Rest Framework: Open the Endpoint
A simple ViewSet for Layers
- Arguements (query string): format ['json', 'api']
- Allow: GET, HEAD, OPTIONS
- Return: JSON
- Examples:
- HTML: Mid Atlantic Portal
- JSON: Mid Atlantic Portal
Updates the details of a particular layer via POST.
| Argument | Format | Example |
|---|---|---|
| layer_id | string [A-Za-z0-9_-]+
|
3971 |
JSON Request Status:
| Argument | Type | Example |
|---|---|---|
| status_code | int | 200 |
| success | boolean | True |
| message | string | 'Edited Successfully' |
| layer | JSON object | {...} |
| themes | array | [ {...},{...},...] |
TBH: This doesn't seem to be used anymore.
Create a new layer via POST
| Argument | Format | Example |
|---|---|---|
| url | string | https://coast.noaa.gov/arcgis/rest/services/MarineCadastre/2015VesselTransitCounts_AllVessels/MapServer/ |
| name | string | New Layer |
| layer_type | string | 'ArcREST' |
| themes | array | [0,4,27] |
For 'layer_type' values, please review your local settings for "LAYER_TYPE_CHOICES"
JSON Request Status:
| Argument | Type | Example |
|---|---|---|
| status_code | int | 200 |
| success | boolean | True |
| message | string | 'Saved Successfully' |
| layer | JSON object | {...} |
| themes | array | [ {...},{...},...] |
Get JSON of all Layers, Themes, and current state via GET
| Argument | Format | Example |
|---|---|---|
| None | N/A | N/A |
JSON Request Status:
| Argument | Type | Example |
|---|---|---|
| state | JSON Object | {} |
| layers | Array of Objects | [{...},{...},...] |
| themes | Array of Objects | [{...},{...},...] |
| success | Boolean | true |
Example: https://portal.midatlanticocean.org/data_manager/get_json