SystemViews
SystemViews inherits RestActionRoute and is only available for admin users. Calling it with GET returns the global default view and a list of roles in the system where each role can have a different default view. Calling the route with POST will update the location and layers of a view.
Parameters
GET doesn't need/use any parameters. POST uses the following:
Name | Type | Description | Required? |
---|---|---|---|
id | Integer | ID for view to update | **true** |
selectedLayers | String | Stringified JSON describing selectedLayers for the view like '[{id: 1}]' | **true** |
srs | String | The value must match the SRS of target view, otherwise update is canceled. | **true** |
north | Double | Latitude | **true** |
east | Double | Longitude | **true** |
zoom | Integer | Zoom level | **true** |
force | Boolean | Update isn't allowed if some of the selected layers is not accessible with guest user. Update can be forced by adding this parameter with 'true' as value | **false** |
Response
Success
GET:
{
"viewId": 1,
"roles": [{
"name": "Guest",
"id": 1,
"viewId": 2
}, {
"name": "User",
"id": 2
}, {
"name": "Admin",
"id": 3
}],
"timestamp": "Tue Aug 12 17:07:49 EEST 2014"
}
POST
{"success":"true"}
Error
If session expired/user is not admin:
{
"error":"Admin only"
}
Selected layers contain one or more layers that are not accessible by guest user. Problematic layerIds are listed in info.selectedLayers as an array.
{
"error": "Contains layers not available for guests",
"info": {
"selectedLayers": [142],
"code": "guest_not_available"
}
}
Last modified: Mon Sep 11 2023 18:13:06 GMT+0300 (Eastern European Summer Time)