Register   |  Login             

SCP API DETAILS

Device


put : /devices/approveDevice/{userId}

put

Description

Approve device

Response Model
                            {
   errorCode (integer): Error code,
   errorDesc (string): Error description
}
                        
Parameters
Parameter Description Parameter Type Data Type
userId User id path Long
deviceIdList List deviceId query String
get : /devices/command/getCommandList/{userId}

get

Description

Get list command devices

Response Model
                            {
 	errorCode (integer): Error code,
	errorDesc (string): Error description,
	total (integer): Total command,
	comDTOList:
	{
		errorCode (integer): Error code,
		id (long): Id command,
		description (string): Description,
		parentid (string): Parent Id,
		execinstance (string): Exec instance,
		resourceid (string): Resource Id,
		resourcename (string): Resource name
	 }
}
                        
Parameters
Parameter Description Parameter Type Data Type
userId User id path Long
deviceId DeviceId query String
put : /devices/controlDevice/{userId}

put

Description

Control device

Response Model
                            {
   errorCode (integer): Error code,
   errorDesc (string): Error description
}
                        
Parameters
Parameter Description Parameter Type Data Type
userId User id path Long
cmdType Command query String
deviceId Device id query String
post : /devices/createDevice/{userId}

post

Description

Register a device

Response Model
                            {
	errorCode (integer): Error code,
	errorDesc (string): Error description,
	id (long): Id system devices,
	status (integer): The status of the device,
	deviceName (string): The name of the device,
	deviceId (string): Registration of the device identifier,
	accountId (long): Id creator
}
                        
Parameters
Parameter Description Parameter Type Data Type
userId User id path Long
device Register a new device body
                                                {
	deviceName (string): The name of the device,
	deviceId (string): Registration of the device identifier,
	accountId (long): Id creator
}
                                            
post : /devices/createDevicesByFile/{userId}

post

Description

Register batch devices by attached file

Response Model
                            {
    totalSuccess (integer): The total number of devices successfully registered,
    errorCode (integer): Error code,
	errorDesc (string): Error description,
    fileUploadId (long): Id of uploaded files,
    deviceDetailList: Navigation equipment information [
		{
			id (long): Id system devices regulatory system,
			name (string): The name of the device,
			deviceIdExternal (string): Id registered user equipment regulations,
			createDate (string): Date of manufacturing equipment,
			status (short): The status of the device (0: Wait authentication; 1: Connected, waiting for authentication; 2: Authenticated, Connected; 3: Online; 4: Offline),
			parentid (long): Id of the parent node,
			userName (string): User name,
			appName (string): Application name,
			childDeviceInfoList: Navigation device information using [
				{
					id (long): Id system devices regulatory system,
					name (string): The name of the device,
					deviceIdExternal (string): Id registered user equipment regulations,
					createDate (string): Date of manufacturing equipment,
					status (short): The status of the device (0: Wait authentication; 1: Connected, waiting for authentication; 2: Authenticated, Connected; 3: Online; 4: Offline),
					parentid (long): Id of the parent node,
					userName (string): User name,
					appName (string): Application name,
					childDeviceInfoList: [
						{...
						}
					]
				}
			]
		}
    ]
}
                        
Parameters
Parameter Description Parameter Type Data Type
userId User id path Long
BulkRegisteringDevices Registration of many devices listed in the file body
                                                {  
    fileName (string): Name the file,
    fileUrl (string): The path file,
    accountId (long): User Id,
	totalRow (integer): Total lines,
	deviceList: [  
		{  
			name (string): The name of the device,
			deviceIdExternal (string): Id of the device outside
		}
    ]
}
                                            
get : /devices/cti/getCtiLatestByDevice/{userId}/{deviceId}

get

Description

Get lastest content record of device

Response Model
                            {
	errorCode (integer): Error code,
   	errorDesc (string): Error description,
	content (string): Content
}
                        
Parameters
Parameter Description Parameter Type Data Type
deviceId DeviceId path String
userId User id path Long
get : /devices/cti/getCtiList/{userId}/device-{deviceId}

get

Description

Get list periodic data of device

Response Model
                            {
 	errorCode (integer): Error code,
	errorDesc (string): Error description,
	total (integer): Total,
	contentinstancesList: [
		{
			errorCode (integer): Error code,
			errordes (string): Error description,
			id (long): Id record,
			resourcetype (long): Resource type,
			resourceid (string): Resource Id,
			resourcename (string): Resource name,
			createddate (string): Create date,
			lastmodifydate (string): Last modify date,
			labels (string): Labels,
			expirationTime (string): Expiration time,
			expirationDate (string): Expiration date,
			announceTo (string): Announce to,
			announcedAttribute (string): Announced attribute,
			creator (string): Creator,
			contentinfo (string): Content info,
			contentsize (long): Content size,
			ontologyref (string): ,
			content (string): Content,
			parentid (string): Parent id
		}
	]
}
                        
Parameters
Parameter Description Parameter Type Data Type
deviceId DeviceId path String
userId User id path Long
fromDate From the date (dd-MM-yyyy) query String
start recordings started query Integer
toDate Go to date (dd-MM-yyyy) query String
total Get the number of records query Integer
delete : /devices/deleteDevice/{userId}/{systemDeviceId}

delete

Description

Delete device by Id

Response Model
                            {
   errorCode (integer): Error code,
   errorDesc (string): Error description
}
                        
Parameters
Parameter Description Parameter Type Data Type
systemDeviceId Device id system path Long
userId User id path Long
get : /devices/getAllDeviceLocationList/{userId}

get

Description

Get the devices‘ location list of an account

Response Model
                            {
	total (integer): The total number of records,
    errorCode (integer): Error code,
	errorDesc (string): Error description,
    lstDevice: List devices [
		{
			id (long): Id of the device system,
			name (string): The name of the device,
			latitude (string): Latitude,
			longtitude (string): Longitude
		}
    ]
}
                        
Parameters
Parameter Description Parameter Type Data Type
userId User id path Long
status The status of the device query Integer
get : /devices/getContentByDeviceId/{userId}/{deviceId}

get

Description

Get content instance list of a device

Response Model
                            {
	total (integer): The total number of records,
    errorCode (integer): Error code,
	errorDesc (string): Error description,
    contentInstanceList: [
		{
		    content (string): Content,
		    createddate (string): Date created,
		    resourceid (long): Id of the source,
		    resourcename (string): The name of the source
  		}
   ]
}
                        
Parameters
Parameter Description Parameter Type Data Type
deviceId Device id path String
userId User id path Long
fromDate From date (dd-MM-yyyy) query String
start Records began query Integer
toDate To date (dd-MM-yyyy) query String
total Get the number of records query Integer
get : /devices/getDeviceByApp/{userId}

get

Description

Get Device by an application

Response Model
                            {
    total (integer): The total number of records,
    errorCode (integer): Error code,
	errorDesc (string): Error description,
    deviceInfoList: Navigation equipment information [
		{
			id (long): Id system devices regulatory system,
			name (string): The name of the device,
			deviceIdExternal (string): Id registered user equipment regulations,
			createDate (string): Date of manufacturing equipment,
			status (short): The status of the device (0: Wait authentication; 1: Connected, waiting for authentication; 2: Authenticated, Connected; 3: Online; 4: Offline),
			parentid (long): Id of the parent node,
			userName (string): User name,
			appName (string): Application name,
			childDeviceInfoList: Navigation device information using [
				{
					id (long): Id system devices regulatory system,
					name (string): The name of the device,
					deviceIdExternal (string): Id registered user equipment regulations,
					createDate (string): Date of manufacturing equipment,
					status (short): The status of the device (0: Wait authentication; 1: Connected, waiting for authentication; 2: Authenticated, Connected; 3: Online; 4: Offline),
					parentid (long): Id of the parent node,
					userName (string): User name,
					appName (string): Application name,
					childDeviceInfoList: [
						{...
						}
					]
				}
			]
		}
   ]
}
                        
Parameters
Parameter Description Parameter Type Data Type
userId User id path Long
appId Id of the application query Long
get : /devices/getDeviceDetail/{userId}/{systemDeviceId}

get

Description

Get Device detail by Id

Response Model
                            {
    errorCode (integer): Error code,
	errorDesc (string): Error description,
	deviceDetailDTO:
	{
		id (long): Id of the device system,
	    name (string): The name of the device,
	    deviceIdExternal (string): User Id provisions of equipment,
	    status (short): The status of the device,
	    lastCommunication (string): The time for the latest data transmission,
	    requiredInterval (long): Interval saddle bridge,
	    typeName (string): Type of equipment (1: motion sensor, 2: temperature sensor, 3: Humidity sensor, 4: Brightness sensor, 5: Illuminance sensor, 6: Binary Switch, 7: Door Actuator),
	    accountid (long): User Id,
	    account (string): User Name,
		lastUpdated (string): The time of the most recent update,
	    model (string): The device model,
	    serialNumber (string): Serial number,
	    version (string): Version,
	    imei (string): Imei equipment,
		iccId (string): IccId equipment,
	    cellId (string): CellId equipment,
		msisdn (string): Msisdn,
	    latitude (string): Latitude,
	    longtitude (string): Longitude,
	    battery (string): Battery,
	    otherInfo (string): Other Information,
	    versionSW (string): VersionSW
	}
}
                        
Parameters
Parameter Description Parameter Type Data Type
systemDeviceId Device id system path Long
userId User id path Long
get : /devices/getDeviceList/{userId}

get

Description

Get Device list by Account Id

Response Model
                            {
    total (integer): The total number of records,
    errorCode (integer): Error code,
	errorDesc (string): Error description,
    deviceInfoList: Navigation equipment information [
		{
			id (long): Id system devices regulatory system,
			name (string): The name of the device,
			deviceIdExternal (string): Id registered user equipment regulations,
			createDate (string): Date of manufacturing equipment,
			status (short): The status of the device (0: Wait authentication; 1: Connected, waiting for authentication; 2: Authenticated, Connected; 3: Online; 4: Offline),
			parentid (long): Id of the parent node,
			userName (string): User name,
			appName (string): Application name,
			childDeviceInfoList: Navigation device information using [
				{
					id (long): Id system devices regulatory system,
					name (string): The name of the device,
					deviceIdExternal (string): Id registered user equipment regulations,
					createDate (string): Date of manufacturing equipment,
					status (short): The status of the device (0: Wait authentication; 1: Connected, waiting for authentication; 2: Authenticated, Connected; 3: Online; 4: Offline),
					parentid (long): Id of the parent node,
					userName (string): User name,
					appName (string): Application name,
					childDeviceInfoList: [
						{...
						}
					]
				}
			]
		}
    ]
}
                        
Parameters
Parameter Description Parameter Type Data Type
userId User id path Long
fromDate From date (dd-MM-yyyy) query String
groupId Group id query Integer
searchKey The string search query String
start Records began query Integer
status The status of the device query Integer
toDate To date (dd-MM-yyyy) query String
total Get the number of records query Integer
get : /devices/getDeviceListByFileId/{userId}

get

Description

Get device list by account Id and by time, start record, total record

Response Model
                            {
	total (integer): The total number of records,
    errorCode (integer): Error code,
	errorDesc (string): Error description,
    deviceInfoList: Navigation equipment information [
		{
			id (long): Id system devices regulatory system,
			name (string): The name of the device,
			deviceIdExternal (string): Id registered user equipment regulations,
			createDate (string): Date of manufacturing equipment,
			status (short): The status of the device (0: Wait authentication; 1: Connected, waiting for authentication; 2: Authenticated, Connected; 3: Online; 4: Offline),
			parentid (long): Id of the parent node,
			userName (string): User name,
			appName (string): Application name,
			childDeviceInfoList: Navigation device information using [
				{
					id (long): Id system devices regulatory system,
					name (string): The name of the device,
					deviceIdExternal (string): Id registered user equipment regulations,
					createDate (string): Date of manufacturing equipment,
					status (short): The status of the device (0: Wait authentication; 1: Connected, waiting for authentication; 2: Authenticated, Connected; 3: Online; 4: Offline),
					parentid (long): Id of the parent node,
					userName (string): User name,
					appName (string): Application name,
					childDeviceInfoList: [
						{...
						}
					]
				}
			]
		}
    ]
}
                        
Parameters
Parameter Description Parameter Type Data Type
userId User id path Long
fileUploadId Id upload file query Long
start Records began query Integer
total Get the number of records query Integer
get : /devices/getDeviceListForApp/{userId}

get

Description

Get device list registered with an application.

Response Model
                            {
    total (integer): The total number of records,
    errorCode (integer): Error code,
	errorDesc (string): Error description,
    deviceInfoList: Navigation equipment information [
		{
			id (long): Id system devices regulatory system,
			name (string): The name of the device,
			deviceIdExternal (string): Id registered user equipment regulations,
			createDate (string): Date of manufacturing equipment,
			status (short): The status of the device (0: Wait authentication; 1: Connected, waiting for authentication; 2: Authenticated, Connected; 3: Online; 4: Offline),
			parentid (long): Id of the parent node,
			userName (string): User name,
			appName (string): Application name,
			childDeviceInfoList: Navigation device information using [
				{
					id (long): Id system devices regulatory system,
					name (string): The name of the device,
					deviceIdExternal (string): Id registered user equipment regulations,
					createDate (string): Date of manufacturing equipment,
					status (short): The status of the device (0: Wait authentication; 1: Connected, waiting for authentication; 2: Authenticated, Connected; 3: Online; 4: Offline),
					parentid (long): Id of the parent node,
					userName (string): User name,
					appName (string): Application name,
					childDeviceInfoList: [
						{...
						}
					]
				}
			]
		}
   ]
}
                        
Parameters
Parameter Description Parameter Type Data Type
userId User id path Long
appId Id of the application query Long
status The status of the device query Integer
get : /devices/getDeviceStatus/{userId}/{id}

get

Description

Check device status

Response Model
                            {
   errorCode (integer): Error code,
   errorDesc (string): Error description,
   status (integer): Status
}
                        
Parameters
Parameter Description Parameter Type Data Type
systemDeviceId Device id system path Long
userId User id path Long
get : /devices/getListDeviceByDeviceType/{userId}

get

Description

Get list devices by device type

Response Model
                            {
	errorCode (integer): Error code,
	errorDesc (string): Error description,
	total (integer) : Total devices,
	deviceList:
	{
		id (long): Id of the device system,
	   	name (string): The name of the device,
	   	deviceIdExternal (string): User Id provisions of equipment,
	   	status (short): The status of the device,
	   	lastCommunication (string): The time for the latest data transmission,
	   	requiredInterval (long): Interval saddle bridge,
	   	typeName (string): Type of equipment (1: motion sensor, 2: temperature sensor, 3: Humidity sensor, 4: Brightness sensor, 5: Illuminance sensor, 6: Binary Switch, 7: Door Actuator),
	   	accountid (long): User Id,
	   	account (string): User Name,
		lastUpdated (string): The time of the most recent update,
	   	model (string): The device model,
	   	serialNumber (string): Serial number,
	   	version (string): Version,
	   	imei (string): Imei equipment,
		iccId (string): IccId equipment,
	   	cellId (string): CellId equipment,
		msisdn (string): Msisdn,
	   	latitude (string): Latitude,
	   	longtitude (string): Longitude,
	   	battery (string): Battery,
	   	otherInfo (string): Other Information,
	   	versionSW (string): VersionSW
	}
}
                        
Parameters
Parameter Description Parameter Type Data Type
deviceType Device type path Long
userId User id path Long
get : /devices/getListDeviceByListParentId/{userId}

get

Description

Get device list by account Id and by list parent Id

Response Model
                            {
    total (integer): The total number of records,
    errorCode (integer): Error code,
	errorDesc (string): Error description,
    deviceInfoList: Navigation equipment information [
		{
			id (long): Id system devices regulatory system,
			name (string): The name of the device,
			deviceIdExternal (string): Id registered user equipment regulations,
			createDate (string): Date of manufacturing equipment,
			status (short): The status of the device (0: Wait authentication; 1: Connected, waiting for authentication; 2: Authenticated, Connected; 3: Online; 4: Offline),
			parentid (long): Id of the parent node,
			userName (string): User name,
			appName (string): Application name,
			childDeviceInfoList: Navigation device information using [
				{
					id (long): Id system devices regulatory system,
					name (string): The name of the device,
					deviceIdExternal (string): Id registered user equipment regulations,
					createDate (string): Date of manufacturing equipment,
					status (short): The status of the device (0: Wait authentication; 1: Connected, waiting for authentication; 2: Authenticated, Connected; 3: Online; 4: Offline),
					parentid (long): Id of the parent node,
					userName (string): User name,
					appName (string): Application name,
					childDeviceInfoList: [
						{...
						}
					]
				}
			]
		}
   ]
}
                        
Parameters
Parameter Description Parameter Type Data Type
userId User id path Long
listParentId List of the parent object id query String
get : /devices/getListDeviceInfo/{userId}

get

Description

Get device list by account id

Response Model
                            {
	total (integer): The total number of records,
    errorCode (integer): Error code,
	errorDesc (string): Error description,
    deviceList : Navigation equipment information [
		{
			id (long): ,
			deviceid (string): ,
			passcode (string): ,
			appid (long): ,
			userid (long): ,
			devicetype (long): ,
			name (string): ,
			status (long): ,
			createddate (string): ,
			lastmodifydate (string): ,
			devicelalbel (string): ,
			manufacturer (string): ,
			model (string): ,
			fwversion (string): ,
			swversion (string): ,
			hwversion (string): ,
			childresource (string): ,
			subscription (string): ,
			parentid (long): ,
			lastCommunication (string): ,
			longtitude (double): ,
			latitude (double): ,
			requiredInterval (long): ,
			battery (string): ,
			altitude (double): ,
			batteryReplace (long): ,
			resourceid (string): ,
			resourcename (string): ,
			resourcetype (string): ,
			resourceparentid (string): ,
			other (string): 
		}
    ]
}
                        
Parameters
Parameter Description Parameter Type Data Type
userId User id path Long
appId Application id query Long
createDate Date created query String
deviceId Device id query String
deviceType Device type query String
manufacture Manufacture query String
name Name query String
other Other query String
status Status query Integer
get : /devices/getLocationByTime/{userId}/{systemDeviceId}

get

Description

Get device location by time

Response Model
                            {
	total (integer): The total number of records,
    errorCode (integer): Error code,
	errorDesc (string): Error description,
    LocationList: List the location on [
		{
			reportDate (string): Date Created,
			locationValue (string): Information location coordinates
		}
    ]
}
                        
Parameters
Parameter Description Parameter Type Data Type
systemDeviceId Device id system path Long
userId User id path Long
fromDate From date (dd-MM-yyyy) query String
toDate To date (dd-MM-yyyy) query String
get : /devices/getMeasuredData/{userId}

get

Description

Get measurement data

Response Model
                            {
  total (integer): Total,
  errorCode (integer): Error code,
  errorDesc (string): Error description,
  measuredDataList : [
	 {
	   deviceId (long): DeviceId, 
	   deviceName (string): Device name,
	   deviceType (integer): Device type,
	   timeValue (string): Time value,
	   content (string): Content
	 }
  ]
}
                        
Parameters
Parameter Description Parameter Type Data Type
userId User id path Long
fromDate From date (dd-MM-yyyy) query String
start Records began query Integer
systemDeviceId Device id of the system query Long
toDate To date (dd-MM-yyyy) query String
total Get the number of records query Integer
get : /devices/getReportLocation/{userId}/{systemDeviceId}

get

Description

Get device location report

Response Model
                            {
    total (integer): The total number of records,
    errorCode (integer): Error code,
	errorDesc (string): Error description,
    reportLocationList: [
		{
			reportDate (string): Date Created,
			locationValue (string): Information location coordinates
		}
   ]
}
                        
Parameters
Parameter Description Parameter Type Data Type
systemDeviceId Device id system path Long
userId User id path Long
get : /devices/getStatusGroupDevice/{userId}

get

Description

Get status group device

Response Model
                            {
 	errorCode (integer): Error code,
	errorDesc (string): Error description,
	listContent: [
		{
			deviceId (string): DeviceId,
			content (string): Content
	 	}
	]
}
                        
Parameters
Parameter Description Parameter Type Data Type
userId User id path Long
listDeviceId List deviceId query String
put : /devices/updateDeviceInfo/{userId}

put

Description

Update device’s information

Response Model
                            {
   errorCode (integer): Error code,
   errorDesc (string): Error description
}
                        
Parameters
Parameter Description Parameter Type Data Type
userId User id path Long
device Update new information equipment body
                                                {
    id (long): Id system device,
    name (string): Name of device
}
                                            
put : /devices/updateDeviceLocation/{userId}

put

Description

Update device location

Response Model
                            {
   errorCode (integer): Error code,
   errorDesc (string): Error description
}
                        
Parameters
Parameter Description Parameter Type Data Type
userId User id path Long
device Update device location coordinates body
                                                {
   id (long): Id of the device system,
   latitude (string): Latitude,
   longtitude (string): Longitude
}
                                            
put : /devices/updateDeviceStatus/{userId}

put

Description

Update device status

Response Model
                            {
   errorCode (integer): Error code,
   errorDesc (string): Error description
}
                        
Parameters
Parameter Description Parameter Type Data Type
userId User id path Long
device Update device status. Json format. body
                                                {
   id (long): Id of the device system,
   status (integer): Status of the device
}
                                            
Contact Information

Vietnam Post and Telecommunication Industry Technology (VNPT Technology)

Tel
Fax
Address
(+84) 4 3748 0922
(+84) 4 3748 0925
No. 124 Hoang Quoc Viet Street, Nghia Tan Ward, Cau Giay District, Hanoi
Introduction

•      VNPT Technology Introduction
•      SCP Introduction

Partners

•      Introduction
•      Certification process

Developers

•      SCP Discovery
•      APIs
•      Guideline Documents
•      Libraries

Legal

•      Terms of use
•      Privacy Policy
•      License Agreement

Copyright © 2017 VNPT Technology. All rights reserved.