Skip to content

GET Site Map

Ksenyia edited this page May 17, 2016 · 2 revisions

Resource URI

/sites/map/{field}

Resource Properties

Property Description
field Boolean parameter. Value "true" returns fields, value "false" returns sites

Response Attribute

{   
    data: [
        {
            lat: Number,
            lng: Number,
            message: String,
            timestamp: Date,
            type: String,
            id: String
        }
    ]
}   

HTTP GET

Default Request

curl -GET http://end-point-uri/map/false

Response

HTTP Status Code 200

{   
    data: [
        {
            lat: -11.60706064,
            lng: -76.14397333,
            message: "Toromocho",
            timestamp: "2016-04-14T20:44:33.814Z",
            type: "site",
            id: "571001e7bd08c40100abffce"
        },
        {
            lat: -14.10264836,
            lng: -72.27735102,
            message: "Cotabambas",
            timestamp: "2016-04-14T20:44:33.814Z",
            type: "site",
            id: "571001e7bd08c40100abffda"
        },
        ...
    ]
}   
Clone this wiki locally