Updating properties on a site

11 views
Skip to first unread message

Nathan Floor

unread,
Nov 24, 2017, 7:42:35 AM11/24/17
to InSTEDD Technology Users Group
Hi,

I am trying to update the properties on a site for a layer I created on the collection.

I can view the layer with a GET request on: http://localhost:3000/collections/1/layers.json

However I am struggling to update the properties on a site.

The sites from this url: http://localhost:3000/collections/1/sites.json, look like:
        {
            "id": 1,
            "name": "Mozambique1",
            "id_with_prefix": "AA1",
            "uuid": "ce8b75d2-aeed-4131-ad25-4049071f73e6",
            "type": "site",
            "properties": {"1": "helloworld"},
            "created_at": "2017-11-24T07:55:20.000Z",
            "updated_at": "2017-11-24T07:55:20.000Z",
            "icon": "firstaid",
            "version": 1,
            "lat_analyzed": "-12.840345",
            "lng_analyzed": "35.396875",
            "alert": false,
            "lat": -12.840345,
            "lng": 35.396875
        },
Does anyone know what format the request should be to update the properties of a site?

Nathan Floor

unread,
Nov 24, 2017, 7:50:27 AM11/24/17
to InSTEDD Technology Users Group
Ah wait, nvm I missed this earlier in the documentation: https://github.com/instedd/resourcemap/wiki/REST_API#update-site

Testing in postman and it works for me.
Reply all
Reply to author
Forward
0 new messages