Coordinate¶
/api/1.3/coordinates¶
GET /api/1.3/coordinates
Authentication Required: Yes
Role(s) Required: None
Request Query Parameters
Name Required Description idno Filter Coordinates by ID. nameno Filter Coordinates by name. Response Properties
Parameter Type Description idint Local unique identifier for the Coordinate lastUpdatedstring The Time / Date this entry was last updated latitudefloat Latitude of the Coordinate longitudefloat Longitude of the Coordinate namestring The name of the Coordinate Response Example
{ "response": [ { "id": 21, "lastUpdated": "2012-09-25 20:27:28", "latitude": 0, "longitude": 0, "name": "dc-chicago" }, { "id": 22, "lastUpdated": "2012-09-25 20:27:28", "latitude": 0, "longitude": 0, "name": "dc-chicago-1" } ] }
POST /api/1.3/coordinates
Create Coordinate.
Authentication Required: Yes
Role(s) Required: admin or oper
Request Parameters
Name Required Description nameyes The name of the Coordinate entry latitudeno Latitude of the Coordinate longitudeno Longitude of the Coordinate Request Example
{ "name": "my_coordinate", "latitude": 1.2, "longitude": 4.5 }Response Properties
Parameter Type Description idint The id of the Coordinate namestring The name of the Coordinate latitudefloat Latitude of the Coordinate longitudefloat Longitude of the Coordinate lastUpdatedstring The Time / Date this entry was last updated alertsarray A collection of alert messages. >levelstring Success, info, warning or error. >textstring Alert message. Response Example
{ "alerts": [ { "level": "success", "text": "coordinate was created" } ], "response": { 'longitude' : 4.5, 'lastUpdated' : '2016-01-25 13:55:30', 'name' : 'my_coordinate', 'latitude' : 1.2, 'id' : 1 } }
PUT /api/1.3/coordinates
Update coordinate.
Authentication Required: Yes
Role(s) Required: admin or oper
Request Query Parameters
Name Required Description id yes The id of the coordinate to edit. Request Parameters
Name Required Description idyes The id of the Coordinate nameyes The name of the Coordinate entry latitudeno Latitude of the Coordinate longitudeno Longitude of the Coordinate Request Example
{ "id": 1, "name": "my_coordinate", "latitude": 12, "longitude": 45 }Response Properties
Parameter Type Description idint The id of the Coordinate namestring The name of the Coordinate latitudefloat Latitude of the Coordinate longitudefloat Longitude of the Coordinate lastUpdatedstring The Time / Date this entry was last updated alertsarray A collection of alert messages. >levelstring Success, info, warning or error. >textstring Alert message. Response Example
{ "alerts": [ { "level": "success", "text": "coordinate was updated" } ], "response": { 'longitude' : 45, 'lastUpdated' : '2016-01-25 13:55:30', 'name' : 'my_coordinate', 'latitude' : 12, 'id' : 1 } }
DELETE /api/1.3/coordinates
Delete coordinate.
Authentication Required: Yes
Role(s) Required: admin or oper
Request Query Parameters
Name Required Description id yes The id of the coordinate to delete. Response Properties
Parameter Type Description alertsarray A collection of alert messages. >levelstring Success, info, warning or error. >textstring Alert message. Response Example
{ "alerts": [ { "level": "success", "text": "coordinate was deleted" } ] }