Devices

# Get device

This method will return a specific device data.
GET http://gscs.es/galileo/api/v1/device/{id}

Parameters

  • { key:string } API key (required)
  • { id:int } device id to get (required)

Result

									
	{
		"code" : (int) http result code
		"msg" : (string), http result message,
		"data" : (obj) {data}
		"error" : (string) http error message
	}
				
			

Data Example

				
	{
		"device_id" : 100,
		"name" : "CVN 43455",
		"serial" : 862170012323456,
		"tel" : 659558900,
		"pass" : "123456",
		"model_id" : 11,
		"icon" : 14,
		"status" : 1,
		"brand" : "Ford",
		"color" : "rojo",
		"location" : "Malaga",
		"ignition_sensor" : 1,
		"panic_sensor" : 0,
		"fuel_sensor" : 0,
		"timezone" : 3600,
		"last_mod" : "2013-10-02 20:00:00",
		"installed" : 1
	}	
				
			

HTTP Status Codes

  • 200 = success
  • 401 = unauthorized
  • 404 = not found
  • 500 = server error

Example

				
					
				
			

# Get devices

This method will return a list of devices according to the search criteria.
If there is no search criteria defined it will return all user's devices.
A pagination parameters can be included in the request to limit the result.
GET http://gscs.es/galileo/api/v1/devices

Parameters

  • { key:string } API key (required)
  • { name:string } search devices by name
  • { tel:number } search devices by tel
  • { serial:string } search devices by serial number
  • { imei:string } search devices by imei
  • { location:string } search devices by location
  • { model:int } search devices by device model
  • { brand:string } search devices by brand
  • { order:string } comma separated list of field names to return
  • { ordermode:string } order fields by ordermode [asc, desc]
  • { limit:int } max number items to return
  • { page:int } if limit is provided this is used for pagination.

Result

				
	{
		"code" : (int) http result code,
		"msg" : (string), http result message,
		"data" : (obj) {data},
		"error" : (string) http resutl error
	}
				
			

Data Example

				
	{
		{
			"device_id" : 100,
			"name" : "CVN 43455",
			"serial" : 862170012323456,
			"tel" : 659558900,
			"pass" : "123456",
			"model_id" : 11,
			"icon" : 14,
			"status" : 1,
			"brand" : "Ford",
			"color" : "rojo",
			"location" : "Malaga",
			"ignition_sensor" : 1,
			"panic_sensor" : 0,
			"fuel_sensor" : 0,
			"timezone" : 3600,
			"last_mod" : "2013-10-02 20:00:00",
			"installed" : 1
		},
		{
			"device_id" : 101,
			"name" : "AAA 2341",
			"serial" : 862170012323000,
			"tel" : 659558892,
			"pass" : "123456",
			"model_id" : 11,
			"icon" : 2,
			"status" : 1,
			"brand" : "Kia",
			"color" : "rojo",
			"location" : "Estepona",
			"ignition_sensor" : 1,
			"panic_sensor" : 0,
			"fuel_sensor" : 0,
			"timezone" : 3600,
			"last_mod" : "2013-10-04 12:23:00",
			"installed" : 1
		}
	}	
				
			

HTTP Status Codes

  • 200 = success
  • 401 = unauthorized
  • 404 = not found
  • 500 = server error

Example

				
			

# Create device

This method will create a new device in the system. There are some parameters like the device icon that have to be set from the platform.
POST http://gscs.es/galileo/api/v1/device

Parameters

  • { key:string } API key (required)
  • { name:string } the device name or plate number (required)
  • { serial:string } the device serial (required)
  • { tel:number } the device GSM phone number (required)
  • { imei:string } the device IMEI number or unique ID (required)
  • { model:int } the device model ID (required)
  • { brand:string } if the device is a vehicle then the vehicle brand
  • { color:string } if the device is a vehicle then the vehicle color
  • { location:string } the device location
  • { status:bool } the device status, could be enabled or disabled
  • { installed:bool } in case the device its been installed

Result

				
	{
		"code" : (int) http result code,
		"msg" : (string) http result message,
		"id" : (int) created device id reference,
		"error" : (string) http result error
	}
									
			

HTTP Status Codes

  • 201 = created
  • 302 = duplicated
  • 400= bad request
  • 401 = unauthorized
  • 403 = forbidden
  • 500 = server error

Example

				
			

# Update device

This method will update a device data.
PUT http://gscs.es/galileo/api/v1/device/{id}

Parameters

  • { key:string} API key (required)
  • { id:int } the device ID refernece (required)
  • { name:string } the device name or plate number
  • { tel:number } the device GSM phone number
  • { imei:string } the device IMEI number or unique ID
  • { model:int } the device model ID
  • { brand:string } if the device is a vehicle then the vehicle brand
  • { color:string } if the device is a vehicle then the vehicle color
  • { location:string } a specific location
  • { status:bool } the device status, could be enabled or disabled
  • { installed:bool } in case the device its been installed

Result

			
	{
		"code" : (int) http result code,
		"msg" : (string) http result message,
		"error": (string) http error message
	}	
				
			

HTTP Status Codes

  • 200 = success
  • 302 = duplicated
  • 400= bad request
  • 401 = unauthorized
  • 403 = forbidden
  • 404 = not found
  • 500 = server error

Example

				
			

# Delete device

This method will delete a device by its ID reference.
DELETE http://gscs.es/galileo/api/v1/device/{id}

Parameters

  • { key:string } API key (required)
  • { id:int } the device ID refernece (required)

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,
		"error": (string) http error message
	}
				
			

HTTP Status Codes

  • 200 = success
  • 401 = unauthorized
  • 403 = forbidden
  • 404 = not found
  • 500 = server error

Example

				
			

# Configure Device

This method will configure a specific device.
POST http://gscs.es/galileo/api/v1/device/{id}

Parameters

  • { key:string } API key (required)
  • { id:int } the device ID refernece (required)
  • { name:string } the device name
  • { tel:number } the device GSM phone number
  • { imie:string } the device IMEI number or unique ID
  • { model:int } the device model ID
  • { brand:string } if the device is a vehicle then the vehicle brand
  • { color:string } if the device is a vehicle then the vehicle color
  • { location:string } a specific location
  • { status:bool } the device status, could be enabled or disabled
  • { installed:bool } in case the device its been installed

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,
		"data": (obj) { data },
		"error": (string) http error message
	}
				
			

Result Example

				
	{
		"device_id" : 100,
		"last_report": "2014-10-04 12:03:00",
		"installed" : 1,
		"status": 1	
	}
				
			

HTTP Status Codes

  • 200 = success
  • 401 = unauthorized
  • 403 = forbidden
  • 404 = not found
  • 500 = server error

Example

				
			

# Install Device

This method will return the result of installation.
GET http://gscs.es/galileo/api/v1/installDevice/{id}

Parameters

  • { key:string } API key (required)
  • { id:int } device id to get (required)

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,
		"data": (obj) { data },
		"error": (string) http error message
	}
				
			

Result Example

				
	{
		"device_id" : 100,
		"last_report": "2014-10-04 12:03:00",
		"installed" : 1,
		"status": 1	
	}
				
			

HTTP Status Codes

  • 200 = success
  • 401 = unauthorized
  • 403 = forbidden
  • 404 = not found
  • 500 = server error

Example

				
			

# Uninstall Device

This method will return the result of uninstallation.
GET http://gscs.es/galileo/api/v1/uninstallDevice/{id}

Parameters

  • { key:string } API key (required)
  • { id:int } device id to get (required)

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,
		"data": (obj) { data },
		"error": (string) http error message
	}
				
			

Result Example

				
	{
		"device_id" : 100,
		"last_report": "2014-10-04 12:03:00",
		"installed" : 0,
		"status": 0
	}
				
			

HTTP Status Codes

  • 200 = success
  • 401 = unauthorized
  • 403 = forbidden
  • 404 = not found
  • 500 = server error

Example

				
			

# Get Last Report

This method will return the last report of a device.
GET http://gscs.es/galileo/api/v1/getDeviceLastTrack/{id}

Parameters

  • { key:string } API key (required)
  • { id:int } device id to get (required)

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,
		"data": (obj) { data },
		"error": (string) http error message
	}
				
			

Result Example

				
	{
		"device_id" : 100,
		"last_report": "2014-10-04 12:03:00",		
	}
				
			

HTTP Status Codes

  • 200 = success
  • 401 = unauthorized
  • 404 = not found
  • 500 = server error

Example

				
			

Alerts

# Get Alert

This method will return an alert by its ID reference. If the type of alert is 1 ( perimetral alert ), then according to the shape ( 1:circle, 2:rectangle, 3:polygon ), the coordinates will be as: ( circle: lat,lng;radius ) ( rectangle: lat1,lng1;lat2,lng2 ) ( polygon: lat1,lng1;lat2,lng2;latn,lngn;...,...)
GET http://gscs.es/galileo/api/v1/alert/{id}

Parameters

  • { key:string } API key (required)
  • { id:int } alert id to get (required)

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,
		"data": (obj) { data },
		"error": (string) http error message
	}
				
			

Result Example

				
	{
		"alert_id" : 22,
		"name" : "My alert",
		"email" : "email1@email.com,email2@email,...",
		"shape" : 1,
		"mode" : 1,
		"color" : 9900ff,
		"type" : 1,
		"coords" : "36.7447373,-4.333332;1000",
		"speed_limit" : 0,
		"mileage" : 0,
		"power_off" : 0,
		"battery_low" : 0,
		"fuel" : 0,
		"description" : "my alert description"
		"status" : 1
	}
				
			

HTTP Status Codes

  • 200 = success
  • 400 = bad request
  • 401 = unauthorized
  • 404 = not found
  • 500 = server error

Example

				
			

# Get Alerts

This method will return a list of alerts according to the search criteria.
GET http://gscs.es/galileo/api/v1/alerts

Parameters

  • { key:string } API key (required)
  • { name:string } search alerts by name
  • { type:int } search by alert type
  • { order:string } comma separated list of field names to return
  • { ordermode:string } order fields by ordermode [asc, desc]
  • { limit:int } max number items to return
  • { page:int } if limit is provided this is used for pagination.

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,
		"data": (obj) { data },
		"error": (string) http error message
	}
				
			

Result Example

				
	{
		{
			"alert_id" : 22,
			"name" : "My alert",
			"email" : "email1@email.com,email2@email,...",
			"shape" : 1,
			"mode" : 1,
			"color" : 9900ff,
			"type" : 1,
			"coords" : "36.7447373,-4.333332;1000",
			"speed_limit" : 0,
			"mileage" : 0,
			"power_off" : 0,
			"battery_low" : 0,
			"fuel" : 0,
			"description" : "my alert description"
			"status" : 1
		},
		{
			"alert_id" : 23,
			"name" : "My alert 2",
			"email" : "email1@email.com,email2@email,...",
			"shape" : 1,
			"mode" : 1,
			"color" : 9900ff,
			"type" : 1,
			"coords" : "36.7447373,-4.333332;1000",
			"speed_limit" : 0,
			"mileage" : 0,
			"power_off" : 0,
			"battery_low" : 0,
			"fuel" : 0,
			"description" : "my alert description 2"
			"status" : 1
		}
		
	}
				
			

HTTP Status Codes

  • 200 = success
  • 400 = bad request
  • 401 = unauthorized
  • 404 = not found
  • 500 = server error

Example

				
			

# Create Alert

This method will create a new alert. If the alert type is 1 ( perimetral alert ), then the coordinates have to be provided.
POST http://gscs.es/galileo/api/v1/Alert

Parameters

  • { key:string } API key (required)
  • { name:string } the alert name (required)
  • { type:int } the alert type (required)
  • { status:bool } alert status, enable-disable
  • { email:string } comma separated emails to report if the alert is triggered
  • { coords:string } formated coord of perimetrical alerts
  • { description:string } a short description of the created alert
  • { mileage:int } the mileage limit
  • { fuel:int } the fuel limit

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,
		"id": (int) created alert id reference,
		"error": (string) http error message
	}
				
			

HTTP Status Codes

  • 201 = created
  • 302 = duplicated
  • 400 = bad request
  • 401 = unauthorized
  • 403 = forbidden
  • 500 = server error

Example

				
			

# Update Alert

This method will update an alert data by its id reference, notice that there are not many parameters than can be changed when the alert is already created.
PUT http://gscs.es/galileo/api/v1/alert/{id}

Parameters

  • { key:string } API key (required)
  • { id:int } the alert ID refernece (required)
  • { name:string } the alert name
  • { status:bool } the alert status, could be enabled or disabled
  • { description:string } modify the alert description
  • { email:string } a comma separated list of email to report, the limit is 20
  • { speed_limit:int } if the alert is of type speed, then this is the speed limit
  • { mileage:int } if the alert is of mileage, then this is the mileage limit
  • { fuel:int } if the alert is of fuel, then this is the fuel percentage limit

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,		
		"error": (string) http error message
	}
				
			

HTTP Status Codes

  • 200 = success
  • 302 = duplicated
  • 400 = bad request
  • 401 = unauthorized
  • 403 = forbidden
  • 404 = not found
  • 500 = server error

Example

				
			

# Delete Alert

This method will delete an alert by its ID reference.
DELETE http://gscs.es/galileo/api/v1/alert/{id}

Parameters

  • { key:string } API key (required)
  • { id:int } the alert ID refernece (required)

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,		
		"error": (string) http error message
	}
				
			

HTTP Status Codes

  • 200 = success
  • 400 = bad request
  • 401 = unauthorized
  • 404 = not found
  • 500 = server error

Example

				
			

# Enable Alert

This method will enable an alert by its Id reference.
GET http://gscs.es/galileo/api/v1/alert/enabled/{id}

Parameters

  • { key:string } API key (required)
  • { id:int } the alert ID refernece (required)

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,		
		"error": (string) http error message
	}
				
			

HTTP Status Codes

  • 200 = success
  • 400 = bad request
  • 401 = unauthorized
  • 404 = not found
  • 500 = server error

Example

				
			

# Disable Alert

This method will disable an alert by its ID reference.
GET http://gscs.es/galileo/api/v1/alert/disabled/{id}

Parameters

  • { id:int } the alert ID refernece (required)
  • { key:string } API key (required)

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,		
		"error": (string) http error message
	}
				
			

HTTP Status Codes

  • 200 = success
  • 400 = bad request
  • 401 = unauthorized
  • 404 = not found
  • 500 = server error

Example

				
			

Alarms

# Get Alarm

This method will return a triggered alarm by its ID reference.
GET http://gscs.es/galileo/api/v1/alarm/{id}

Parameters

  • { key:string } API key (required)
  • { id:int } alarm ID to get (required)

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,
		"data" : (obj) {data}
		"error": (string) http error message
	}
				
			

Result Example

				
	{
		"report_id" : 100
		"alert_id" : 22,
		"device_id": 100,
		"lat" : 36.03434344,
		"lng" : -4.0039393,
		"date" : "2013-10-02",
		"time" : "23:00:00",
		"speed" : 108,
		"name" : "My alert",		
		"shape" : 1,
		"mode" : 1,
		"color" : 9900ff,
		"type" : 1,
		"coords" : "36.7447373,-4.333332;1000",
		"speed_limit" : 0,
		"mileage" : 0,
		"fuel" : 0		
	}
				
			

HTTP Status Codes

  • 200 = success
  • 400 = bad request
  • 401 = unauthorized
  • 404 = not found
  • 500 = server error

Example

				
			

# Get Alarms

This method will return a list of triggered alarms.
GET http://gscs.es/galileo/api/v1/alarms

Parameters

  • { key:string } API key (required)
  • { name:string } search alarms by its alert name
  • { type:int } search alarms by type
  • { date:string } search alarms by date
  • { time:string } search alarms by time
  • { device_id:int } search alarms by device ID reference
  • { order:string } comma separated list of field names to return
  • { ordermode:string } order fields by ordermode [asc, desc]
  • { limit:int } max number items to return
  • { page:int } if limit is provided this is used for pagination.

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,
		"data" : (obj) {data}
		"error": (string) http error message
	}
				
			

Result Example

				
	{
		{
			"report_id" : 100
			"alert_id" : 22,
			"device_id": 100,
			"lat" : 36.03434344,
			"lng" : -4.0039393,
			"date" : "2013-10-02",
			"time" : "23:00:00",
			"speed" : 108,
			"name" : "My alert",		
			"shape" : 1,
			"mode" : 1,
			"color" : 9900ff,
			"type" : 1,
			"coords" : "36.7447373,-4.333332;1000",
			"speed_limit" : 0,
			"mileage" : 0,
			"fuel" : 0	
		},
		{
			"report_id" : 101
			"alert_id" : 22,
			"device_id": 100,
			"lat" : 36.03434344,
			"lng" : -4.0039393,
			"date" : "2013-10-02",
			"time" : "23:05:00",
			"speed" : 108,
			"name" : "My alert",		
			"shape" : 1,
			"mode" : 1,
			"color" : 9900ff,
			"type" : 1,
			"coords" : "36.7447373,-4.333332;1000",
			"speed_limit" : 0,
			"mileage" : 0,
			"fuel" : 0
		}
			
	}
				
			

HTTP Status Codes

  • 200 = success
  • 400 = bad request
  • 401 = unauthorized
  • 404 = not found
  • 500 = server error

Example

				
			

# Delete Alarm

This method will delete a triggered alarm by its ID
DELETE http://gscs.es/galileo/api/v1/alarm/{id}

Parameters

  • { key:string } API key (required)
  • { id:int } the alarm ID refernece (required)

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,		
		"error": (string) http error message
	}
				
			

HTTP Status Codes

  • 200 = success
  • 400 = bad request
  • 401 = unauthorized
  • 404 = not found
  • 500 = server error

Example

				
			

Pois

# Get Poi

This method will return a specific poi by its ID reference.
GET http://gscs.es/galileo/api/v1/poi/{id}

Parameters

  • { key:string } API key (required)
  • { id:int } poi ID reference to get (required)

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,
		"data": (obj) {data},
		"error": (string) http error message
	}
				
			

Result Example

				
	{
		"poi_id" : 10,
		"lat": 36.343234,
		"lng" : -4.434219,
		"icon": 1,
		"description": "my place",
		"group_id": 1,
		"radius" : 100,
		"status" : 1
	}
				
			

HTTP Status Codes

  • 200 = success
  • 400 = bad request
  • 401 = unauthorized
  • 404 = not found
  • 500 = server error

Example

				
			

# Get Pois

This method will return a list of pois according to the search criteria.
GET http://gscs.es/galileo/api/v1/pois

Parameters

  • { key:string } API key (required)
  • { name:string } search pois by name
  • { lat,lng:string} search pois by lat and lng
  • { order:string } comma separated list of field names to return
  • { ordermode:string } order fields by ordermode [asc, desc]
  • { limit:int } max number items to return
  • { page:int } if limit is provided this is used for pagination.

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,
		"data": (obj) {data},
		"error": (string) http error message
	}
				
			

Result Example

				
	{
		{
			"poi_id" : 10,
			"lat": 36.343234,
			"lng" : -4.434219,
			"icon": 1,
			"description": "my place",
			"group_id": 1,
			"radius" : 100,
			"status" : 1
		},
		{
			"poi_id" : 11,
			"lat": 36.343224,
			"lng" : -4.434200,
			"icon": 1,
			"description": "my place 2",
			"group_id": 1,
			"radius" : 100,
			"status" : 1
		}
		
	}
				
			

HTTP Status Codes

  • 200 = success
  • 400 = bad request
  • 401 = unauthorized
  • 404 = not found
  • 500 = server error

Example

				
			

# Create Poi

This method will create a new POI
POST http://gscs.es/galileo/api/v1/poi

Parameters

  • { key:string } API key (required)
  • { name:string } poi name (required)
  • { lat:float } decimal value of lat position (required)
  • { lng:float } decimal value of lng position (required)
  • { description:string } poi description
  • { radius:int } the POI's effective radius

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,
		"id": (int) created poi id reference,
		"error": (string) http error message
	}
				
			

HTTP Status Codes

  • 201 = created
  • 400 = bad request
  • 401 = unauthorized
  • 404 = not found
  • 500 = server error

Example

				
			

# Update Poi

This method will update a POI by its ID reference.
PUT http://gscs.es/galileo/api/v1/poi/{id}

Parameters

  • { key:string } API key (required)
  • { id:int } the poi ID refernece (required)
  • { name:string } the poi name (required)
  • { lat:float } decimal value of lat position
  • { lng:float } decimal value of lng position
  • { description:string } the poi description
  • { radius:int } the poi radius in meters

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,		
		"error": (string) http error message
	}
				
			

HTTP Status Codes

  • 200 = success
  • 400 = bad request
  • 401 = unauthorized
  • 404 = not found
  • 500 = server error

Example

				
			

# Delete Poi

This method will delete a POI by its ID reference
DELETE http://gscs.es/galileo/api/v1/poi/{id}

Parameters

  • { key:string } API key (required)
  • { id:int } the poi ID refernece (required)

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,		
		"error": (string) http error message
	}
				
			

HTTP Status Codes

  • 200 = success
  • 400 = bad request
  • 401 = unauthorized
  • 404 = not found
  • 500 = server error

Example

				
			

Users

# Get User

This method will get a user by its ID reference.
GET http://gscs.es/galileo/api/v1/user/{id}

Parameters

  • { key:string } API key (required)
  • { id:int } user id to get (required)

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,
		"data": (obj) {data},
		"error": (string) http error message
	}
				
			

Result Example

				
	{
		"user_id" : 100,
		"email" : "user@email.com",
		"ensurance" : "FDHS223222",
		"ensurance_company": "La Caixa",
		"name" : "Mario",
		"lastname" : "Andres",
		"address" : "calle menorca",
		"address2" : "",
		"tel" : 4890943840,
		"mobile" : 39238893,
		"city_id" : 2,
		"country_id" : 10,
		"zipcode" : 292992,
		"reseller" : 1,
		"priv" : 2,
		"pack_id": 2,
		"icon" : 10,
		"company_id" : 10,
		"status" : 1
		
	}
				
			

HTTP Status Codes

  • 200 = success
  • 400 = bad request
  • 401 = unauthorized
  • 404 = not found
  • 500 = server error

Example

				
			

# Get Users

This method will return a list of users according to a search criteria.
GET http://gscs.es/galileo/api/v1/users

Parameters

  • { key:string } API key (required)
  • { name:string } search users by name
  • { email:string } search users by email
  • { priv:int } search users by privilege
  • { tel:number } search users by telephone
  • { country:int } search users by country
  • { city:int } search users by city
  • { reseller:int } search users by reseller id
  • { order:string } comma separated list of field names to return
  • { ordermode:string } order fields by ordermode [asc, desc]
  • { limit:int } max number items to return
  • { page:int } if limit is provided this is used for pagination.

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,
		"data": (obj) {data},
		"error": (string) http error message
	}
				
			

Result Example

				
	{
		{
			"user_id" : 100,
			"email" : "user@email.com",
			"ensurance" : "FDHS223222",
			"ensurance_company": "La Caixa",
			"name" : "Mario",
			"lastname" : "Andres",
			"address" : "calle menorca",
			"address2" : "",
			"tel" : 4890943840,
			"mobile" : 39238893,
			"city_id" : 2,
			"country_id" : 10,
			"zipcode" : 292992,
			"reseller" : 1,
			"priv" : 2,
			"pack_id": 2,
			"icon" : 10,
			"company_id" : 10,
			"status" : 1
		},
		{
			"user_id" : 100,
			"email" : "user@email.com",
			"ensurance" : "FDHS223222",
			"ensurance_company": "La Caixa",
			"name" : "Mario",
			"lastname" : "Andres",
			"address" : "calle menorca",
			"address2" : "",
			"tel" : 4890943840,
			"mobile" : 39238893,
			"city_id" : 2,
			"country_id" : 10,
			"zipcode" : 292992,
			"reseller" : 1,
			"priv" : 2,
			"pack_id": 2,
			"icon" : 10,
			"company_id" : 10,			
			"status" : 1
		},
		{}
		
		
	}
				
			

HTTP Status Codes

  • 200 = success
  • 400 = bad request
  • 401 = unauthorized
  • 404 = not found
  • 500 = server error

Example

				
			

# Create User

This method will create a new user.
POST http://gscs.es/galileo/api/v1/User

Parameters

  • { key:string } API key (required)
  • { email:string } the user's email account (required)
  • { pass:string } the new user's password
  • { priv:int } the user's privileges
  • { name:string } the user name
  • { tel:number } the user's phone number
  • { mobile:number } the user's mobile phone number
  • { ensurance:string } ensurance policy number
  • { ensurance_company:string } ensurance company name
  • { country:int } the country id reference
  • { city:int } the city id reference
  • { rfid:string } rfid code data
  • { icon:int } the user icon id number.

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,
		"id": (int) created user id reference,
		"error": (string) http error message
	}
				
			

HTTP Status Codes

  • 201 = created
  • 400 = bad request
  • 401 = unauthorized
  • 404 = not found
  • 500 = server error

Example

				
			

# Update User

This method will update a user data.
PUT http://gscs.es/galileo/api/v1/user/{id}

Parameters

  • { key:string } API key (required)
  • { user_id:int } the user id reference (required)
  • { email:string } the user's email account
  • { pass:string } the new user's password
  • { priv:int } the user's privileges
  • { name:string } the user name
  • { tel:number } the user's phone number
  • { mobile:number } the user's mobile phone number
  • { ensurance:string } ensurance policy number
  • { ensurance_company:string } ensurance company name
  • { country:int } the country id reference
  • { city:int } the city id reference
  • { rfid:string } rfid code data
  • { icon:int } the user icon id number.

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,
		"error": (string) http error message
	}
				
			

HTTP Status Codes

  • 200 = success
  • 400 = bad request
  • 401 = unauthorized
  • 404 = not found
  • 500 = server error

Example

				
			

# Delete User

this method will delete a user and all its relevant information
DELETE http://gscs.es/galileo/api/v1/user/{id}

Parameters

  • { key:string } API key (required)
  • { id:int } the user ID refernece (required)

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,
		"error": (string) http error message
	}
				
			

HTTP Status Codes

  • 200 = success
  • 400 = bad request
  • 401 = unauthorized
  • 404 = not found
  • 500 = server error

Example

				
			

# Enable User

This method will enabled a user by its ID reference.
GET http://gscs.es/galileo/api/v1/user/enabled/{id}

Parameters

  • { key:string } API key (required)
  • { id:int } the user ID refernece (required)

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,
		"error": (string) http error message
	}
				
			

HTTP Status Codes

  • 200 = success
  • 400 = bad request
  • 401 = unauthorized
  • 404 = not found
  • 500 = server error

Example

				
			

# Disable User

This method will disable a user by its ID reference.
GET http://gscs.es/galileo/api/v1/user/disabled/{id}

Parameters

  • { key:string } API key (required)
  • { id:int } the user ID refernece (required)

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,
		"error": (string) http error message
	}
				
			

HTTP Status Codes

  • 200 = success
  • 400 = bad request
  • 401 = unauthorized
  • 404 = not found
  • 500 = server error

Example

				
			

Groups

# Get User's Devices Group

This method will return a specific group and all its data.
GET http://gscs.es/galileo/api/v1/group/{id}

Parameters

  • { key:string } API key (required)
  • { id:int } group ID to get (required)

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,
		"data": (obj) {data},
		"error": (string) http error message
	}
				
			

Result Example

				
	{
		"ID" : 100,
		"name" : "my devices",
		"devices" : 1,2,11,23,4,
		"status" : 1
 	}
				
			

HTTP Status Codes

  • 200 = success
  • 400 = bad request
  • 401 = unauthorized
  • 404 = not found
  • 500 = server error

Example

				
			

#Get User's Devices Groups

This method will return a list of groups.
GET http://gscs.es/galileo/api/v1/groups

Parameters

  • { key:string } API key (required)
  • { name:string } search groups by name
  • { order:string } comma separated list of field names to return
  • { ordermode:string } order fields by ordermode [asc, desc]
  • { limit:int } max number items to return
  • { page:int } if limit is provided this is used for pagination.

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,
		"data": (obj) {data},
		"error": (string) http error message
	}
				
			

Result Example

				
	{
		"ID" : 100,
		"name" : "my devices",
		"devices" : 1,2,11,23,4,
		"status" : 1
 	}
				
			

HTTP Status Codes

  • 200 = success
  • 400 = bad request
  • 401 = unauthorized
  • 404 = not found
  • 500 = server error

Example

				
			

# Create User's Devices Group

Creates a new group
POST http://gscs.es/galileo/api/v1/group

Parameters

  • { key:string } API key (required)
  • { name:string } group name (required)

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,
		"id": (int) created group ID,
		"error": (string) http error message
	}
				
			

HTTP Status Codes

  • 201 = created
  • 400 = bad request
  • 401 = unauthorized
  • 404 = not found
  • 500 = server error

Example

				
			

# Update User's Devices Group

this method will update a group data
PUT http://gscs.es/galileo/api/v1/group/{id}

Parameters

  • { key:string } API key (required)
  • { id:int } the group ID refernece (required)
  • { name:string } group name
  • { devices:string } comma separated string of devices that are in the group

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,		
		"error": (string) http error message
	}
				
			

HTTP Status Codes

  • 200 = success
  • 400 = bad request
  • 401 = unauthorized
  • 404 = not found
  • 500 = server error

Example

				
			

# Delete User's Devices Group

This method will delete a group by its ID reference.
DELETE http://gscs.es/galileo/api/v1/group/{id}

Parameters

  • { key:string } API key (required)
  • { id:int } the group ID refernece (required)

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,		
		"error": (string) http error message
	}
				
			

HTTP Status Codes

  • 200 = success
  • 400 = bad request
  • 401 = unauthorized
  • 404 = not found
  • 500 = server error

Example

				
			

Vehicles

# Get Vehicle

This method will return a specific vehicle by its ID reference.
GET http://gscs.es/galileo/api/v1/vehicle/{id}

Parameters

  • { key:string } API key (required)
  • { id:int } vehicle ID reference to get (required)

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,
		"data": (obj) {data},
		"error": (string) http error message
	}
				
			

Result Example

				
	{
		"vehicle_id" : 2,
		"plate_number" : "PKD 3323",
		"name" : "vehicle name",
		"brand" : "Ford",
		"color" : "red",
		"mileage" : 1200327272,
		"status" : 1
 	}
				
			

HTTP Status Codes

  • 200 = success
  • 400 = bad request
  • 401 = unauthorized
  • 404 = not found
  • 500 = server error

Example

				
			

# Get Vehicles

This method will return a list of vehicles according to the search criteria.
GET http://gscs.es/galileo/api/v1/vehicles

Parameters

  • { key:string } API key (required)
  • { name:string } search vehicles by name
  • { plate:string } search vehicles by plate number
  • { brand:string } search vehicles by brand
  • { order:string } comma separated list of field names to return
  • { ordermode:string } order fields by ordermode [asc, desc]
  • { limit:int } max number items to return
  • { page:int } if limit is provided this is used for pagination.

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,
		"data": (obj) {data},
		"error": (string) http error message
	}
				
			

Result Example

				
	{
		"vehicle_id" : 2,
		"plate_number" : "PKD 3323",
		"name" : "vehicle name",
		"brand" : "Ford",
		"color" : "red",
		"model" : "Focus",
		"mileage" : 1200327272,
		"status" : 1
 	}
				
			

HTTP Status Codes

  • 200 = success
  • 400 = bad request
  • 401 = unauthorized
  • 404 = not found
  • 500 = server error

Example

				
			

# Create Vehicle

This method will create a new vehicle.
POST http://gscs.es/galileo/api/v1/vehicle

Parameters

  • { key:string } API key (required)
  • { name:string } vehicle name (required)
  • { plate:string } vehicle plane number
  • { color:string } vehicle color
  • { brand:string } vehicle brand
  • { model:string } vehicle model

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,
		"id": (int) created vehicle id reference,
		"error": (string) http error message
	}
				
			

HTTP Status Codes

  • 201 = created
  • 400 = bad request
  • 401 = unauthorized
  • 404 = not found
  • 500 = server error

Example

				
			

# Update Vehicle

This method will update a vehicle data.
PUT http://gscs.es/galileo/api/v1/vehicle/{id}

Parameters

  • { key:string } API key (required)
  • { id:int } the vehicle ID refernece (required)
  • { name:string } vehicle name
  • { plate:string } vehicle plane number
  • { color:string } vehicle color
  • { brand:string } vehicle brand
  • { model:string } vehicle model

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,		
		"error": (string) http error message
	}
				
			

HTTP Status Codes

  • 200 = success
  • 400 = bad request
  • 401 = unauthorized
  • 404 = not found
  • 500 = server error

Example

				
			

# Delete Vehicle

This method will delete a vehicle by its ID reference.
DELETE http://gscs.es/galileo/api/v1/vehicle/{id}

Parameters

  • { key:string } API key (required)
  • { id:int } the vehicle ID reference (required)

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,		
		"error": (string) http error message
	}
				
			

HTTP Status Codes

  • 200 = success
  • 400 = bad request
  • 401 = unauthorized
  • 404 = not found
  • 500 = server error

Example

				
			

Drivers

# Get Driver

This method will return a specific driver by its ID reference.
GET http://gscs.es/galileo/api/v1/driver/{id}

Parameters

  • { key:string } API key (required)
  • { id:int } the driver ID reference (required)

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,
		"data": (obj) {data},
		"error": (string) http error message
	}
				
			

Result Example

				
	{
		"driver_id" : 2,
		"name" : "Mario",
		"lastname" : "Andres",
		"dob" : "1980-11-02",
		"tel" : 3330393809,
		"driver_licence" : "X323334332Y",
		"vehicle_id" : 12,
		"status" : 1
 	}
				
			

HTTP Status Codes

  • 200 = success
  • 400 = bad request
  • 401 = unauthorized
  • 404 = not found
  • 500 = server error

Example

				
			

# Get Drivers

This method will return a list of drivers according to the search criteria.
GET http://gscs.es/galileo/api/v1/drivers

Parameters

  • { key:string } API key (required)
  • { name:string } search drivers by name
  • { vehicle_id:int } search drivers by vehicle ID reference
  • { status:bool } search vehicles by status
  • { order:string } comma separated list of field names to return
  • { ordermode:string } order fields by ordermode [asc, desc]
  • { limit:int } max number items to return
  • { page:int } if limit is provided this is used for pagination.

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,
		"data": (obj) {data},
		"error": (string) http error message
	}
				
			

Result Example

				
	{
		"driver_id" : 2,
		"name" : "Mario",
		"lastname" : "Andres",
		"dob" : "1980-11-02",
		"tel" : 3330393809,
		"driver_licence" : "X323334332Y",
		"vehicle_id" : 12,
		"status" : 1
 	}
				
			

HTTP Status Codes

  • 200 = success
  • 400 = bad request
  • 401 = unauthorized
  • 404 = not found
  • 500 = server error

Example

				
			

# Create Driver

This method will create a new driver.
POST http://gscs.es/galileo/api/v1/driver

Parameters

  • { key:string } API key (required)
  • { name:string } driver name (required)
  • { lastname:string } driver lastname
  • { dob:string } driver date of birth
  • { tel:string } driver tel number
  • { driver_licence:string } driver licence
  • { vehicle_i:int } vehicle reference

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,
		"id": (int) created driver reference,
		"error": (string) http error message
	}
				
			

HTTP Status Codes

  • 201 = created
  • 400 = bad request
  • 401 = unauthorized
  • 404 = not found
  • 500 = server error

Example

				
			

# Update Driver

This method will update a driver data by its ID reference
PUT http://gscs.es/galileo/api/v1/driver/{id}

Parameters

  • { key:string } API key (required)
  • { id:int } the driver ID reference (required)
  • { name:string } driver name
  • { lastname:string } driver lastname
  • { dob:string } driver date of birth
  • { tel:string } driver tel number
  • { driver_licence:string } driver licence
  • { vehicle_i:int } vehicle reference

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,
		"error": (string) http error message
	}
				
			

HTTP Status Codes

  • 200 = success
  • 400 = bad request
  • 401 = unauthorized
  • 404 = not found
  • 500 = server error

Example

				
			

# Delete Driver

This method will delete a driver by its ID reference
DELETE http://gscs.es/galileo/api/v1/driver/{id}

Parameters

  • { key:string } API key (required)
  • { id:int } the driver ID reference (required)

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,
		"error": (string) http error message
	}
				
			

HTTP Status Codes

  • 200 = success
  • 400 = bad request
  • 401 = unauthorized
  • 404 = not found
  • 500 = server error

Example

				
			

Companies

# Get Company

This method will return a specific company by its ID reference.
GET http://gscs.es/galileo/api/v1/company/{id}

Parameters

  • { key:string } API key (required)
  • { id:int } the company ID reference (required)

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,
		"data": (obj) {data},
		"error": (string) http error message
	}
				
			

Result Example

				
	{
		"company_id" : 2,
		"company_name" : "Galileo"
 	}
				
			

HTTP Status Codes

  • 200 = success
  • 400 = bad request
  • 401 = unauthorized
  • 404 = not found
  • 500 = server error

Example

				
			

# Get Companies

This method will return a list of companies.
GET http://gscs.es/galileo/api/v1/companies

Parameters

  • { key:string } API key (required)
  • { name:string } search companies by name
  • { order:string } comma separated list of field names to return
  • { ordermode:string } order fields by ordermode [asc, desc]
  • { limit:int } max number items to return
  • { page:int } if limit is provided this is used for pagination.

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,
		"data": (obj) {data},
		"error": (string) http error message
	}
				
			

Result Example

				
	{
		"company_id" : 2,
		"company_name" : "Galileo"
 	}
				
			

HTTP Status Codes

  • 200 = success
  • 400 = bad request
  • 401 = unauthorized
  • 404 = not found
  • 500 = server error

Example

				
			

# Create Company

This method will create a new company.
POST http://gscs.es/galileo/api/v1/company

Parameters

  • { key:string } API key (required)
  • { name:string } company name (required)

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,
		"id": (int) created company ID reference,
		"error": (string) http error message
	}
				
			

HTTP Status Codes

  • 201 = created
  • 400 = bad request
  • 401 = unauthorized
  • 404 = not found
  • 500 = server error

Example

				
			

# Update Company

This method will update a company by its ID reference.
PUT http://gscs.es/galileo/api/v1/company/{id}

Parameters

  • { key:string } API key (required)
  • { id:int } the company ID reference (required)
  • { name:string } company name

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,
		"error": (string) http error message
	}
				
			

HTTP Status Codes

  • 200 = success
  • 400 = bad request
  • 401 = unauthorized
  • 404 = not found
  • 500 = server error

Example

				
			

# Delete Company

This method will delete a company by its ID reference.
DELETE http://gscs.es/galileo/api/v1/company/{id}

Parameters

  • { key:string } API key (required)
  • { id:int } company ID reference (required)

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,
		"error": (string) http error message
	}
				
			

HTTP Status Codes

  • 200 = created
  • 400 = bad request
  • 401 = unauthorized
  • 404 = not found
  • 500 = server error

Example

				
			

Settings

# Get Settings

This method will return a specific settings by its ID reference.
GET http://gscs.es/galileo/api/v1/settings/{id}

Parameters

  • { key:string } API key (required)
  • { id:int } settings ID reference (required)

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,
		"data": (obj) {data},
		"error": (string) http error message
	}
				
			

Result Example

				
	{
		"setting_id" : 2,
		"user_id" : 3,
		"labels" : 1,
		"color" : "blue",
		"lang" : "en",
		"map_provider" : "leaflet",
		"map_center" : "34.4403032,-4.002022"
	}
				
			

HTTP Status Codes

  • 200 = success
  • 400 = bad request
  • 401 = unauthorized
  • 404 = not found
  • 500 = server error

Example

				
			

# Update Settings

This method will update a user's settings by its ID reference
PUT http://gscs.es/galileo/api/v1/settings/{id}

Tracks

# Get Tracks

This method will return a specific device's tracks.
GET http://gscs.es/galileo/api/v1/device-tracks/{id}

Parameters

  • { id:int } the device ID reference (required)
  • { key:string } API key (required)
  • { date:string } search tracks by date
  • { time:string } search tracks by time
  • { order:string } comma separated list of field names to return
  • { ordermode:string } order fields by ordermode [asc, desc]
  • { limit:int } max number items to return
  • { page:int } if limit is provided this is used for pagination.

Result

				
	{
		"code" : (int) http result code,
		"msg": (string) http result message,
		"data": (obj) {data},
		"error": (string) http error message
	}
				
			

Result Example

				
	{
		"track_id" : 2,
		"device_id" : 3,
		"ref" : 10,
		"lat" : 34.44343433,
		"lng" : -4.49494949,
		"speed" : 82,
		"heading" : 270,
		"power" : 1,
		"bat" : 89,
		"ignition" : 1,
		"sat" : 4,
		"altitude" : 10,
		"mileage" : 1122922,
		"time" : "23:00:00",
		"date" : "2013-12-12",
		"type" : 22,
		"mode" : "AAA",
		"hdop" : 1.02,
		"rfid" : "0323FAE323",
		"output" : "10110011",
		"gsm" : "23323,232,1,3FH4",
		"fuel" : 80
		
	}
				
			

HTTP Status Codes

  • 200 = success
  • 400 = bad request
  • 401 = unauthorized
  • 404 = not found
  • 500 = server error

Example