_get

Gathers the details of a chosen Geofence.

Parameters

id

The ID of the sought after Geofence.

Example

FM_api(
    'Geofence_get',[
        'id' => '1'
    ]
);

Results

On Success

From a Geofence with the ID of 1, which was centered on 'Forthill Park, Enniskillen', named "Test Geofence", with a size of 105 and the shape of a circle:

{"id":1,"max_lat":54.347103,"min_lat":54.343506,"max_lng":-7.629587,
"min_lng":-7.6357584,"points":{"radius":105,"type":"circle"},
"name":"Test Geofence","meta":[],"last_edited":1679824638,
"cdate":1679824638}

On Failure

If there is no ID given or it is less than 1:

{"error":"missing or invalid parameter: id"}

If a valid ID is given but there is no Geofence assigned to said ID.

{"error":"geofence does not exist"}

Last updated