Something went wrong on our end
mra_reference.rst 35.45 KiB
MapServer Rest API - Rest Configuration API Reference
Formats and representations
The following table defines the content-type
values for each format you can use.
Format | Content-type |
---|---|
XML |
application/xml (or text/xml ) |
JSON | application/json |
HTML | text/html |
SLD | application/vnd.ogc.sld+xml |
MAP | text/plain |
Status codes
The following table sets out the main status-code
you can obtain.
Status-code | Definition |
---|---|
200 | The request was fulfilled |
201 | The request was fulfilled and resulted in a new resource being created |
403 | The server understood the request, but is refusing to fulfill it |
404 | The server has not found anything matching the URI given |
405 | The method is not allowed by the server |
500 | The server encountered an unexpected condition which prevented it from fulfilling the request |
501 | The server does not support the functionality required to fulfill the request. |
See HTTP specification for more information about status codes.
Maps
Maps
includes all mapfiles.
The Mapfile is the heart of MapServer. It defines the relationships between objects, points MapServer to where data are located and defines how things are to be drawn.
See Mapfile specification for more information about the Mapfile.
Operations
/maps.<format>
Replace
<format>
by the format extension of your choice.Method | Action | Return Code | Formats |
---|---|---|---|
GET | List all mapfiles | 200 | XML, JSON, HTML |
POST | TODO: Create a new mapfile | ||
PUT | 405 | ||
DELETE | 405 |
Exceptions:
- TODO: POST for a mapfile already exist: 409 Conflict
/maps/<map>.<format>
Replace
<format>
by the format extension of your choice.Method | Action | Return Code | Formats |
---|---|---|---|
GET | List all mapfiles | 200 | MAP, XML, JSON, HTML |
POST | 405 | ||
PUT | TODO: Modify mapfile <map> | ||
DELETE | TODO: Delete mapfile <map> |
Exceptions:
- GET for a mapfile does not exist: 404 Not Found
- TODO: PUT that changes name of mapfile: 403 Forbidden
- TODO: DELETE against a mapfile that is non-empty: 403 Forbidden