View Map Resource

A view_map resource stores viewable map information such as bounding box geo coordinates and a zoom level.


GET view_map/{view_mapUid}



Returns a view_map with the specified uid.
Resource Information
Rate Limited? Yes
session, oauth and org tokens compatible? Yes
api_key token compatible? Yes

Resource URL

http://grovestreams.com/api/view_map/{view_mapUid}

Parameters

none


Example Requests

/view_map/61fb1683-04c5-4f74-9dfd-fc00bf4ed5c2

Response Body

{
  "message": "",
  "view_map": {
    "uid": "327f6222-df4c-31b8-bd44-61b9f5021a60",
    "boundingBox": {
      "endLng": 50,
      "startLat": -50,
      "startLng": 0,
      "endLat": 50
    },
    "showCriticalEvents": true,
    "showInfoEvents": true,
    "name": "World Map",
    "heartbeatPolling": 5,
    "showComps": true,
    "zoomLevel": 2,
    "showWarnEvents": true
  },
  "success": true
}


GET view_map/new



Returns a default view_map with a unique UID. Does not persist the new view_map in the store. It's the callers responsibility to PUT the new view_map and register it.

Another method of creating a view_map and have it automatically placed in a folder is to do a "PUT content_folder?contentType=view_map&parentFolderUid=375936fd-e3fa-4eda-bc10-f413b58bd367&text=new%20Map"
Resource Information
Rate Limited? Yes
session, oauth and org tokens compatible? Yes
api_key token compatible Yes

Resource URL

http://grovestreams.com/api/view_map/new

Parameters

none

Example Requests

/view_map/new

Response Body
{
  "message": "",
  "view_map": {
    "uid": "327f6222-df4c-31b8-bd44-61b9f5021a60",
    "boundingBox": {
      "endLng": 50,
      "startLat": -50,
      "startLng": 0,
      "endLat": 50
    },
    "showCriticalEvents": true,
    "showInfoEvents": true,
    "name": "World Map",
    "heartbeatPolling": 5,
    "showComps": true,
    "zoomLevel": 2,
    "showWarnEvents": true
  },
  "success": true
}




PUT view_map



Inserts a new view_map.

The uid of the view_map can be blank. If it is blank a uid will be created on the server and the response body will contain the new uid.
Resource Information
Rate Limited? Yes
session, oauth and org tokens compatible? Yes
api_key token compatible Yes

Resource URL

http://grovestreams.com/api/view_map

Parameters

none

Example Requests

/view_map

RequestBody

{
  "view_map": {
    "uid": "327f6222-df4c-31b8-bd44-61b9f5021a60",
    "boundingBox": {
      "endLng": -69.21872860411474,
      "startLat": 38.651233317571624,
      "startLng": -123.00779110411474,
      "endLat": 47.189742907740126
    },
    "showCriticalEvents": true,
    "showInfoEvents": true,
    "name": "World Map",
    "heartbeatPolling": 5,
    "showComps": true,
    "zoomLevel": 5,
    "showWarnEvents": true
  }
}


POST view_map



Used to update an existing view_map.
Resource Information
Rate Limited? Yes
session, oauth and org tokens compatible? Yes
api_key token compatible Yes

Resource URL

http://grovestreams.com/api/view_map

Parameters

none

Example Requests



Request Body
{
  "view_map": {
    "uid": "327f6222-df4c-31b8-bd44-61b9f5021a60",
    "boundingBox": {
      "endLng": -69.21872860411474,
      "startLat": 38.651233317571624,
      "startLng": -123.00779110411474,
      "endLat": 47.189742907740126
    },
    "showCriticalEvents": true,
    "showInfoEvents": true,
    "name": "World Map",
    "heartbeatPolling": 5,
    "showComps": true,
    "zoomLevel": 5,
    "showWarnEvents": true
  }
}


DELETE view_map/{view_mapUid}



Deletes a view_map. Automatically removes it from all folders. A more efficient way of deleting a view map is to do the delete through the content_folder resource.
Resource Information
Rate Limited? Yes
session, oauth and org tokens compatible? Yes
api_key token compatible Yes

Resource URL

http://grovestreams.com/api/view_map/{view_mapUid}

Parameters

none

Example Requests

/view_map/d251a8f2-f7b9-4df7-886d-b24c7f4929d4

Response Body
{
    "message" : "Deleted view_map with uid 'd251a8f2-f7b9-4df7-886d-b24c7f4929d4'",
    "success" : true
}