Device APIs
This page contains detail about the service APIs for Device Master data.
Devices API These APIs includes create and update APIs. These are used by the Administrator Portal for the Create and Update Device functionality.
Device Types API These APIs includes create and update APIs. These are used by the Administrator Portal for the Create and Update Device Type functionality.
Device Specifications API These APIs includes create and update APIs. These are used by the Administrator Portal for the Create and Update Device Specification functionality.
Devices
POST /devices
This service will create a device which will be used in the MOSIP platform. Please find the steps to create primary/secondary languages in Registration Center Create/Update API.
Resource URL
https://{base_url}/v1/masterdata/devices
Resource details
Response format
JSON
Requires Authentication
Yes
Parameters
id
Yes
Id of the device
macAddress
Yes
Mac Address of the device
name
Yes
Name of the device
deviceSpecId
Yes
Device specification Id of the device
serialNum
Yes
Serial number of the device
langCode
Yes
Language code of the device
ipAddress
No
Ip Address of the device
isActive
Yes
Is the device active?
validityDateTime
Yes
Validity date of device
zoneCode
Yes
Zone code of device
Example Request
Example Response
Response codes: 200 Ok
Error Response:
Response codes: 200 Ok
Failure details
KER-MSD-500
Internal Server Error
If system error occurs
KER-ATH-403
Forbidden
If unauthorized role detected
KER-ATH-401
Authentication Failed
If no role/invalid token is detected
KER-MSD-069
Error occurred while inserting Device details
KER-MSD-439
Admin not authorized to access this Device for this Zone
When Admin is not allowed to created a device for a Zone
PUT /devices
This service will update the list of devices which are used in the MOSIP platform. Please find the steps to create primary/secondary languages in Registration Center Create/Update API
Resource URL
https://{base_url}/v1/masterdata/devices
Resource details
Response format
JSON
Requires Authentication
Yes
Parameters
id
Yes
Id of the device
macAddress
Yes
Mac Address of the device
name
Yes
Name of the device
deviceSpecId
Yes
Device specification Id of the device
serialNum
Yes
Serial number of the device
langCode
Yes
Language code of the device
ipAddress
No
Ip Address of the device
isActive
Yes
Is the device active?
validityDateTime
Yes
Validity date of device
zoneCode
Yes
Zone code of device
Example Request
Example Response
Response codes: 200 Ok
Error Response
Response codes: 200 Ok
Failure details
KER-MSD-500
Internal Server Error
If system error occurs
KER-ATH-403
Forbidden
If unauthorized role detected
KER-ATH-401
Authentication Failed
If no role/invalid token is detected
KER-MSD-069
Error occurred while inserting Device details
KER-MSD-439
Admin not authorized to access this Device for this Zone
When Admin is not allowed to created a device for a Zone
GET /devices/{languagecode}
This service will provides the service for the list of devices.
Resource URL
GET https://{base_url}/v1/masterdata/devices/{languagecode}
Resource details
Response format
JSON
Requires Authentication
Yes
Parameters
-NA-
Example Response
Response codes: 200 Ok
Error Response
Response codes: 200 Ok
Failure details
KER-MSD-500
Internal Server Error
If system error occurs
KER-ATH-403
Forbidden
If unauthorized role detected
KER-ATH-401
Authentication Failed
If no role/invalid token is detected
KER-MSD-010
Device not Found
Data Not Found
GET /devices/{languagecode}/{deviceType}
This service will provides the list of devices based on device type and language code.
Resource URL
GET https://{base_url}/v1/masterdata/devices/{languagecode}/{deviceType}
Resource details
Response format
JSON
Requires Authentication
Yes
Parameters
-NA-
Example Response
Response codes: 200 Ok
Error Response
Response codes: 200 Ok
Failure details
KER-MSD-500
Internal Server Error
If system error occurs
KER-ATH-403
Forbidden
If unauthorized role detected
KER-ATH-401
Authentication Failed
If no role/invalid token is detected
KER-MSD-010
Device not Found
Data Not Found
PUT /devices/decommission/{id}
This service will update existing devices.
Resource URL
PUT /devices/decommission/{id}
Resource details
Response format
JSON
Requires Authentication
Yes
Parameters
id
Yes
Device ID
-NA-
-NA-
Example Request
-NA-
Example Response
Response codes: 200 Ok
Error Response
Response codes: 200 Ok
Failure details
KER-MSD-500
Internal Server Error
If system error occurs
KER-ATH-403
Forbidden
If unauthorized role detected
KER-ATH-401
Authentication Failed
If no role/invalid token is detected
KER-MSD-083
Error occurred while updating Device details
KER-MSD-010
Device not Found
Data Not Found
KER-MSD-439
Admin not authorized to access this Device for this Zone
When Admin is not allowed to created a device for a Zone
DELETE /devices/{id}
This service will delete the devices.
Resource URL
DELETE https://{base_url}/v1/masterdata/devices/{id}
Resource details
Response format
JSON
Requires Authentication
Yes
Parameters
deviceId
Yes
The device Id
Example Response
Response codes: 200 Ok
Failure Response:
Failure details
KER-MSD-009
Error occurred while fetching Devices
Fetch Issue
KER-MSD-069
Error occurred while inserting Device details
Insertion Issue
KER-MSD-010
Device not Found
Data Not Found
KER-MSD-083
Error while updating
Update Issue
KER-MSD-084
Error while deleting
Deletion Issue
KER-MSD-147
Cannot delete as dependency found
Deletion Issue because of dependency
KER-MSD-439
Admin not authorized to access this Device for this Zone
When Admin is not allowed to created a device for a Zone
POST /devices/search
This service is for the devices search functionality. All the filter parameters are passed and the devices are searched and the matching results are returned.
Resource URL
POST /devices/search
Resource details
Response format
JSON
Requires Authentication
Yes
Parameters
filters
No
Array of the filter applied. In case of "list" screen, this array will be empty
-NA-
columnName
No
The column name in the JSON response
-NA-
type
No
The value have to be in ["contains","equals","startsWith","between"]
-NA-
value
No
Value or id selected in the filter by the end user
-NA-
fromValue
No
If the type is "between", this field is the value of the fromName
-NA-
toValue
No
If the type is "between", this field is the value of the toName
-NA-
languagecode
Yes
Language code in Language code in ISO 639-2 format
sort
No
This is an array of the sort field and type
sortfield
The field on which the sort is applied
modifiedDate
sorttype
This should be either of ['ASC','DESC']
ASC
pagination
The pagination parameter object
pageStart
This is the start index
0
0
pageFetch
This is the amount of records to be fetched
10
10
Filter Values
Please find the filter columns used in search * name * isActive * macAddress * serialNum * mapStatus * deviceTypeName
Device Name
["contains","equals","startsWith"]
Status
["contains","equals","startsWith"]
MAC Address
["contains","equals","startsWith"]
Serial Number
["contains","equals","startsWith"]
Map Status
["contains","equals","startsWith"]
Device Type
["contains","equals","startsWith"]
Device Specification ID
["contains","equals","startsWith"]
Example Request
Example Response
Response codes: 200 Ok
POST /devices/filtervalues
This service returns the filter values which are required in the dropdown entries of the filter screen.
Resource URL
POST /devices/filtervalues
Resource details
Response format
JSON
Requires Authentication
Yes
Parameters
filters
No
Array of the filter applied. In case of "list" screen, this array will be empty
-NA-
columnName
No
The column name in the JSON response
-NA-
type
No
The value have to be in ["unique","all"]
unique
unique
languagecode
Yes
Language code in Language code in ISO 639-2 format
Example Request
Example Response
Response codes: 200 Ok
Device Types
POST /devicetypes
This service will create the list of Device types which are used in the MOSIP platform.
Resource URL
POST /devicetypes
Resource details
Response format
JSON
Requires Authentication
Yes
Parameters
devicetypecode
Yes
Code of the device type
devicename
Yes
Name of the device type
description
Yes
Description of the device type
languagecode
Yes
Language code of the device type
isactive
Yes
Is the device type active?
Example Request
Example Response
Response codes: 200 Ok
Failure details
KER-MSD-053
Error occurred while inserting Device Type details
Insertion Issue
KER-MSD-003
Required Device Type detail Not Found
Data Not Found
KER-MSD-002
Error occurred while mapping Device Type details
Mapping Issue
KER-MSD-054
Error occurred while fetching Device Type details
Fetch Issue
PUT /devicetypes
This service will update the list of Device types which are used in the MOSIP platform.
Resource URL
PUT /devicetypes
Resource details
Response format
JSON
Requires Authentication
Yes
Parameters
devicetypecode
Yes
Code of the device type
devicename
Yes
Name of the device type
description
Yes
Description of the device type
languagecode
Yes
Language code of the device type
isactive
Yes
Is the device type active?
Example Request
Example Response
Response codes: 200 Ok
Failure details
KER-MSD-003
Required Device Type detail Not Found
Data Not Found
KER-MSD-054
Error occurred while updating Device Type details
while updating Issue will occur
POST /devicetypes/search
This service is for the devices types search functionality. All the filter parameters are passed and the devices types are searched and the matching results are returned.
Resource URL
POST /devicetypes/search
Resource details
Response format
JSON
Requires Authentication
Yes
Parameters
filters
No
Array of the filter applied. In case of "list" screen, this array will be empty
-NA-
columnName
No
The column name in the JSON response
-NA-
type
No
The value have to be in ["contains","equals","startsWith","between"]
-NA-
value
No
Value or id selected in the filter by the end user
-NA-
fromValue
No
If the type is "between", this field is the value of the fromName
-NA-
toValue
No
If the type is "between", this field is the value of the toName
-NA-
languagecode
Yes
Language code in Language code in ISO 639-2 format
sort
No
This is an array of the sort field and type
sortfield
The field on which the sort is applied
modifiedDate
sorttype
This should be either of ['ASC','DESC']
ASC
pagination
The pagination parameter object
pageStart
This is the start index
0
0
pageFetch
This is the amount of records to be fetched
10
10
Filter Values
Please find the filter columns used in search * name * status
Example Request
Example Response
Response codes: 200 Ok
POST /devicetypes/filtervalues
This service returns the filter values which are required in the dropdown entries of the filter screen.
Resource URL
POST /devicetypes/filtervalues
Resource details
Response format
JSON
Requires Authentication
Yes
Parameters
filters
No
Array of the filter applied. In case of "list" screen, this array will be empty
-NA-
columnName
No
The column name in the JSON response
-NA-
type
No
The value have to be in ["unique","all"]
unique
unique
languagecode
Yes
Language code in Language code in ISO 639-2 format
Example Request
Example Response
Response codes: 200 Ok
Device Specifications
POST /devicespecifications
This service will create a Device Specification which are used in the MOSIP platform.
Resource URL
https://mosip.io/v1/masterdata/devicespecifications
Resource details
Response format
JSON
Requires Authentication
Yes
Parameters
id
Yes
ID of the Device Specification
name
Yes
Name of the Device Specification
brand
Yes
Brand of the Device specification
model
Yes
Model of the Device specification
deviceTypeCode
Yes
device type code of the Device specification
minDriverversion
Yes
Minimum driver version required for the Device specification
description
Yes
Description of the Device specification
langCode
Yes
Language of the Device specification
isActive
Yes
Is the Device Specification active
Example Request
Example Response
Response codes: 200 Ok
PUT /devicespecifications
This service will update a Device Specification which are used in the MOSIP platform.
Resource URL
PUT /devicespecifications
Resource details
Response format
JSON
Requires Authentication
Yes
Parameters
id
Yes
ID of the Device Specification
lang_code
Yes
Language code of the Device Specification
Example Request
Example Response
Response codes: 200 Ok
DELETE /devicespecifications/{id}
This service deletes a Device Specification from the Device Specifications master module.
Resource URL
DELETE /devicespecifications/{id}
Resource details
Response format
JSON
Requires Authentication
Yes
Parameters
id
Yes
ID of the Device Specification
Example Response
Response codes: 200 Ok
GET /devicespecifications/{langcode}/{devicetypecode}
This service will provides the list of all Device Specifications for specified language code and device type code .
Resource URL
GET /devicespecifications/{langcode}/{devicetypecode}
Resource details
Response format
JSON
Requires Authentication
Yes
Parameters
lang_code
Yes
Language code of the Device Specification
dtyp_code
Yes
device type code of the Device specification
Example Request
Example Response
Response codes: 200 Ok
GET /devicespecifications/{lang_code}
This service will provides the list of all Device Specifications in a specific language.
Resource URL
GET /devicespecifications/{lang_code}
Resource details
Response format
JSON
Requires Authentication
Yes
Parameters
lang_code
Yes
Language code of the Device Specification
Example Request
Example Response
Response codes: 200 Ok
Failure Response:
Response codes: 200 Ok
Failure details
KER-MSD-011
Error occurred while fetching Device Specifications
Fetch Issue
KER-MSD-054
Error occurred while inserting Device Specification details
Insertion Issue
KER-MSD-012
Device Specification not found
Data Not Found
KER-MSD-081
Error occurred while updating Device Specification
Update Issue
KER-MSD-082
Error occurred while deleting Device Specification
Deletion Issue
KER-MSD-121
Cannot delete dependency found
Deletion Issue because of dependency
POST /devicespecifications/search
This service is for the devices specifications search functionality. All the filter parameters are passed and the device specifications are searched and the matching results are returned.
Resource URL
POST /devicespecifications/search
Resource details
Response format
JSON
Requires Authentication
Yes
Parameters
filters
No
Array of the filter applied. In case of "list" screen, this array will be empty
-NA-
columnName
No
The column name in the JSON response
-NA-
type
No
The value have to be in ["contains","equals","startsWith","between"]
-NA-
value
No
Value or id selected in the filter by the end user
-NA-
fromValue
No
If the type is "between", this field is the value of the start range
-NA-
toValue
No
If the type is "between", this field is the value of the end range
-NA-
languagecode
Yes
Language code in Language code in ISO 639-2 format
sort
No
This is an array of the sort field and type
sortfield
The field on which the sort is applied
modifiedDate
sorttype
This should be either of ['ASC','DESC']
ASC
pagination
The pagination parameter object
pageStart
This is the start index
0
0
pageFetch
This is the amount of records to be fetched
10
10
Filter Values
Please find the filter columns used in search * name * isActive * deviceTypeName
Example Request
Example Response
Response codes: 200 Ok
POST /devicespecifications/filtervalues
This service returns the filter values which are required in the dropdown entries of the filter screen.
Resource URL
POST /devicespecifications/filtervalues
Resource details
Response format
JSON
Requires Authentication
Yes
Parameters
filters
No
Array of the filter applied. In case of "list" screen, this array will be empty
-NA-
columnName
No
The column name in the JSON response
-NA-
type
No
The value have to be in ["unique","all"]
unique
unique
languagecode
Yes
Language code in Language code in ISO 639-2 format
Example Request
Example Response
Response codes: 200 Ok
Last updated