API za popis geozona

API za popis geozona namijenjen je za ispis informacija o korisnikovim geozonama (sve vidljive geozone: koje je kreirao korisnik i koje su podijeljene s korisnikom).

Struktura zahtjeva:

GET /geozones?api_key= <...>&version=1&limit= <...>&continuation_token= <...>HTTP/1.1
Domaćin: api.fm-track.com
Vrsta sadržaja: application/json; charset=UTF-8

Parametri zahtjeva:

ParameterTypeDescriptionRequired
api_keyStringUser identification keyYes
versionIntegerAPI versionYes
limitIntegerLimits geozones count in responseNo
continuation_tokenIntegerDisplays from what date and time the data is shown if the record limit was reachedNo

Primjer odgovora:

{
    "continuation_token": 1,
    "items": [
        {
            "id": "d4e18901",
            "name": "asdada",
            "notes": "aaa fff",
            "type": "POINT",
            "circle": {
                "latitude": 54.689538538142585,
                "longitude": 25.270938071441606,
                "radius": 250.0
            }
        },
        ...
    ]
}

Ako je parametar netočno unesen, sustav će odgovoriti kodom pogreške. Svi kodovi pogrešaka opisani su u odjeljku API-ji . Parametri za koje nisu navedeni podaci nisu uključeni u odgovor. Potpuni popis parametara odgovora dostupan je na kraju ovog odjeljka.

Parametri odgovora:

ParameterTypeDescription
continuation_tokenIntegerContinuation token is sent when number of geozones in response exceed limit
itemsArrayContainer for all user geozones
idStringExternal geozone ID
nameStringGeozone name
notesStringGeozone notes
typeEnumGeozone type. There are two types: point and polygon
circleArrayContainer for point information. If it is a polygon type, this parameter will be NULL
latitudeDoubleLatitude of point center
longitudeDoubleLongitude of point center
radiusDoubleRadius in meters