This section details about the service APIs in the Document modules
- POST /devices
- GET /devices/{languagecode}
- GET /devices/{languagecode}/{deviceType}
- PUT /devices
- DELETE /devices/{id}
This service will create the list of Devices which are used in the MOSIP platform.
Please find the steps to create primary/secondary languages
https://github.com/mosip/mosip-docs/wiki/Registration-Center-APIs#createupdate-api
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
id | Yes | Id 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 |
{
"id": "string",
"metadata": {},
"request": {
"id": "",
"name": "Test device1",
"serialNum": "BS563Q2230898",
"deviceSpecId": "165",
"macAddress": "85-BB-97-4B-14-05",
"ipAddress": "10.4.6.8",
"langCode": "eng",
"validityDateTime": "2019-08-07T09:13:22.221Z",
"zoneCode": "NTH",
"isActive": true
},
"requesttime": "2018-12-10T06:12:52.994Z",
"version": "string"
}
{
"id": "string",
"version": "string",
"responsetime": "2019-11-25T06:22:33.367Z",
"metadata": null,
"response": {
"id": "7b40b97c-2db6-4e2c-b11f-dd5d5fd0ca79",
"langCode": "eng",
"name": "Test device1",
"serialNum": "BS563Q2230898",
"ipAddress": "10.4.6.8",
"macAddress": "85-BB-97-4B-14-05",
"deviceSpecId": "165",
"validityDateTime": "2019-08-07T09:13:22.221Z",
"zoneCode": "NTH",
"deviceSpecification": null,
"mapStatus": "unassigned",
"isActive": false,
"createdBy": "110005",
"createdDateTime": "2019-11-25T06:22:33.382Z",
"updatedBy": null,
"updatedDateTime": null,
"isDeleted": null,
"deletedDateTime": null
},
"errors": null
}
200 Ok
{
"id": "string",
"version": "string",
"metadata": {},
"responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"errors": [
{
"errorCode": "string",
"message": "string"
}
],
"response": null
}
Error Code | Error Message | Error Description |
---|---|---|
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 |
This service will provides the service for the List of devices.
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
-NA- |
{
"id": "string",
"version": "string",
"metadata": {},
"responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"errors": null,
"response": {
"devices": [{
"deviceSpecId": "string",
"id": "string",
"ipAddress": "string",
"isActive": true,
"langCode": "string",
"macAddress": "string",
"name": "string",
"serialNum": "string",
"validityDateTime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"
}]
}
}
200
Description: Success
400
Description: Bad request
401
Description: Unauthorized
404
Description: Not Found
This service will provides the service for the List of devices.
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
-NA- |
{
"id": "string",
"version": "string",
"metadata": {},
"responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"errors": null,
"response": {
"devices": [{
"deviceSpecId": "string",
"deviceTypeCode": "string",
"id": "string",
"ipAddress": "string",
"isActive": true,
"langCode": "string",
"macAddress": "string",
"name": "string",
"serialNum": "string",
"validityEndDateTime": "2019-04-05T09:30:13.608Z"
}]
}
}
200
Description: Success
400
Description: Bad request
401
Description: Unauthorized
404
Description: Not Found
This service will update existing device.
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
-NA- |
{
"id": "string",
"metadata": {},
"request": {
"id": "7b40b97c-2db6-4e2c-b11f-dd5d5fd0ca79",
"name": "Test device2",
"serialNum": "BS563Q2230898",
"deviceSpecId": "165",
"macAddress": "85-BB-97-4B-14-05",
"ipAddress": "10.4.6.8",
"langCode": "eng",
"validityDateTime": "2019-08-07T09:13:22.221Z",
"zoneCode": "NTH",
"isActive": true
},
"requesttime": "2018-12-10T06:12:52.994Z",
"version": "string"
}
{
"id": "string",
"version": "string",
"responsetime": "2019-11-25T06:22:33.367Z",
"metadata": null,
"response": {
"id": "7b40b97c-2db6-4e2c-b11f-dd5d5fd0ca79",
"langCode": "eng",
"name": "Test device1",
"serialNum": "BS563Q2230898",
"ipAddress": "10.4.6.8",
"macAddress": "85-BB-97-4B-14-05",
"deviceSpecId": "165",
"validityDateTime": "2019-08-07T09:13:22.221Z",
"zoneCode": "NTH",
"isActive": false,
"createdBy": "110005",
"createdDateTime": "2019-11-25T06:22:33.382Z",
"updatedBy": "110005",
"updatedDateTime": "2019-11-25T06:22:33.382Z",
"isDeleted": null,
"deletedDateTime": null
},
"errors": null
}
200 Ok
{
"id": "string",
"version": "string",
"metadata": {},
"responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"errors": [
{
"errorCode": "string",
"message": "string"
}
],
"response": null
}
Error Code | Error Message | Error Description |
---|---|---|
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 |
This service will delete the devices.
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
deviceId | Yes | The device Id |
{
"id": "string",
"version": "string",
"metadata": {},
"responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"errors": null,
"response":{
"id": "string"
}
}
200 OK
{
"id": "string",
"version": "string",
"metadata": {},
"responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"errors": [{
"errorCode": "string",
"message": "string"
}],
"response":null
}
Error Code | Error Message | Error Description |
---|---|---|
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 |
This service will create the list of Device types which are used in the MOSIP platform.
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
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? |
{
"id": "string",
"version": "string",
"metadata": {},
"requesttime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"request": {
"code": "string",
"description": "string",
"isActive": true,
"langCode": "string",
"name": "string"
}
}
{
"id": "string",
"version": "string",
"metadata": {},
"responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"errors": null,
"response":{
"code": "string",
"langCode": "string"
}
}
202
Description: Accepted
400
Description: Bad request
401
Description: Unauthorized
403
Description: Forbidden
Error Code | Error Message | Error Description |
---|---|---|
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 |
- POST /devicespecifications
- PUT /devicespecifications
- DELETE /devicespecifications/{id}
- GET /devicespecifications/{langcode}/{devicetypecode}
- GET /devicespecifications/{lang_code}
This service will create a Device Specification which are used in the MOSIP platform.
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
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 | ||
dtyp_code | Yes | device type code of the Device specification | ||
min_driver_ver | Yes | Minimum driver version required for the Device specification | ||
descr | Yes | Description of the Device specification | ||
lang_code | Yes | Language of the Device specification | ||
is_active | Yes | Is the Device Specification active |
{
"id": "string",
"version": "string",
"metadata": {},
"requesttime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"request": {
"brand": "string",
"description": "string",
"id": "string",
"isActive": true,
"langCode": "string",
"DeviceTypeCode": "string",
"minDriverversion": "string",
"model": "string",
"name": "string"
}
}
{
"id": "string"
}
This service will update a Device Specification which are used in the MOSIP platform.
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
id | Yes | ID of the Device Specification | ||
lang_code | Yes | Language code of the Device Specification |
{
"id": "string",
"version": "string",
"metadata": {},
"requesttime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"request": {
"brand": "string",
"description": "string",
"id": "string",
"isActive": true,
"langCode": "string",
"deviceTypeCode": "string",
"minDriverversion": "string",
"model": "string",
"name": "string"
}
}
{
"id": "string"
}
This service deletes a Device Specification from the Device Specifications master module.
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
id | Yes | ID of the Device Specification |
{
"id": "string",
"version": "string",
"metadata": {},
"responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"errors": null,
"response": {
"id": "string"
}
}
This service will provides the list of all Device Specifications for specified language code and device type code .
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
lang_code | Yes | Language code of the Device Specification | ||
dtyp_code | Yes | device type code of the Device specification |
-NA-
{
"id": "string",
"version": "string",
"metadata": {},
"responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"errors": null,
"response": {
"devicespecifications": [
{
"brand": "string",
"description": "string",
"deviceTypeCode": "string",
"id": "string",
"isActive": true,
"langCode": "string",
"minDriverversion": "string",
"model": "string",
"name": "string"
}
]
}
}
This service will provides the list of all Device Specifications in a specific language.
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
lang_code | Yes | Language code of the Device Specification |
-NA-
{
"id": "string",
"version": "string",
"metadata": {},
"responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"errors": null,
"response" : {
"devicespecifications": [
{
"brand": "string",
"description": "string",
"deviceTypeCode": "string",
"id": "string",
"isActive": true,
"langCode": "string",
"minDriverversion": "string",
"model": "string",
"name": "string"
}
]
}
}
202
Description: Accepted
400
Description: Bad request
401
Description: Unauthorized
403
Description: Forbidden
{
"id": "string",
"version": "string",
"metadata": {},
"responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"errors": [{
"errorCode": "string",
"message": "string"
}],
"response" : null
}
Error Code | Error Message | Error Description |
---|---|---|
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 |
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 Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
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 |
Please find the filter columns used in search
- name
- isActive
- macAddress
- serialNum
- mapStatus
- deviceTypeName
Filter Name | Search Values |
---|---|
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"] |
{
"id": "string",
"metadata": {},
"requesttime": "2018-12-10T06:12:52.994Z",
"version": "string",
"request": {
"filters" : [
{
"columnName": "",
"type": "in",
"value": "",
"fromValue": "",
"toValue": ""
}
],
"sort":[
{
"sortfield":"string",
"sorttype":"ASC"
}
],
"pagination":{
"pageStart":"number",
"pageFetch":"number"
},
"languageCode":""
}
}
{
"id": "string",
"version": "string",
"metadata": {},
"responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"errors": null,
"response": {
"devices": [
{
"deviceSpecId": "string",
"id": "string",
"ipAddress": "string",
"isActive": true,
"langCode": "string",
"macAddress": "string",
"name": "string",
"serialNum": "string",
"validityDateTime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"
}
],
"fromRecord" : "number",
"toRecord":"number",
"totalRecord":"number"
}
}
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 Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
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 |
Please find the filter columns used in search
- name
- status
{
"id": "string",
"metadata": {},
"requesttime": "2018-12-10T06:12:52.994Z",
"version": "string",
"request": {
"filters" : [
{
"columnName": "",
"type": "in",
"value": "",
"fromValue": "",
"toValue": ""
}
],
"sort":[
{
"sortfield":"string",
"sorttype":"ASC"
}
],
"pagination":{
"pageStart":"number",
"pageFetch":"number"
},
"languageCode":""
}
}
{
"id": "string",
"version": "string",
"metadata": {},
"responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"errors": null,
"response": {
"deviceTypes": [
{
"code": "string",
"langCode": "string",
"name": "string",
"description": "string",
"isActive": true
}
],
"fromRecord" : "number",
"toRecord":"number",
"totalRecord":"number"
}
}
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 Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
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 |
Please find the filter columns used in search
- name
- isActive
- deviceTypeName
{
"id": "string",
"metadata": {},
"requesttime": "2018-12-10T06:12:52.994Z",
"version": "string",
"request": {
"filters" : [
{
"columnName": "",
"type": "in",
"value": "",
"fromValue": "",
"toValue": ""
}
],
"sort":[
{
"sortfield":"string",
"sorttype":"ASC"
}
],
"pagination":{
"pageStart":"number",
"pageFetch":"number"
},
"languageCode":""
}
}
{
"id": "string",
"version": "string",
"metadata": {},
"responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"errors": null,
"response": {
"devicespecifications": [
{
"brand": "string",
"description": "string",
"deviceTypeCode": "string",
"id": "string",
"isActive": true,
"langCode": "string",
"minDriverversion": "string",
"model": "string",
"name": "string"
}
],
"fromRecord" : "number",
"toRecord":"number",
"totalRecord":"number"
}
}
This service returns the filter values which are required in the dropdown entries of the filter screen.
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
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 |
{
"id": "string",
"metadata": {},
"requesttime": "2018-12-10T06:12:52.994Z",
"version": "string"
"request": {
"filters" : [
{
"columnName": ""
"type": "unique"
}
],
"languageCode": "string",
}
}
{
"id": "string",
"version": "string",
"metadata": {},
"responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"errors": null,
"response": {
"filters": [
{
"fieldID": "string",
"fieldValue": "string"
}
]
}
}
This service returns the filter values which are required in the dropdown entries of the filter screen.
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
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 |
{
"id": "string",
"metadata": {},
"requesttime": "2018-12-10T06:12:52.994Z",
"version": "string"
"request": {
"filters" : [
{
"columnName": ""
"type": "unique"
}
],
"languageCode": "string",
}
}
{
"id": "string",
"version": "string",
"metadata": {},
"responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"errors": null,
"response": {
"filters": [
{
"fieldID": "string",
"fieldValue": "string"
}
]
}
}
This service returns the filter values which are required in the dropdown entries of the filter screen.
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
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 |
{
"id": "string",
"metadata": {},
"requesttime": "2018-12-10T06:12:52.994Z",
"version": "string"
"request": {
"filters" : [
{
"columnName": ""
"type": "unique"
}
],
"languageCode": "string",
}
}
{
"id": "string",
"version": "string",
"metadata": {},
"responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
"errors": null,
"response": {
"filters": [
{
"fieldID": "string",
"fieldValue": "string"
}
]
}
}