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

Parameters

Example Request

{
  "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": "2021-08-07T09:13:22.221Z",
    "zoneCode": "ORT",
    "isActive": true
  },
  "requesttime": "2018-12-10T06:12:52.994Z",
  "version": "string"
}

Example Response

{
  "id": "string",
  "version": "string",
  "responsetime": "2020-05-01T13:39:30.996Z",
  "metadata": null,
  "response": {
    "id": "5f1cfd87-f078-41f0-aea9-d205ca715e68",
    "name": "Test device1",
    "serialNum": "BS563Q2230898",
    "deviceSpecId": "165",
    "macAddress": "85-BB-97-4B-14-05",
    "ipAddress": "10.4.6.8",
    "langCode": "eng",
    "validityDateTime": "2021-08-07T09:13:22.221Z",
    "zoneCode": "ORT",
    "isActive": false,
    "createdBy": "110006",
    "createdDateTime": "2020-05-01T13:39:31.057Z",
    "updatedBy": null,
    "updatedDateTime": null,
    "isDeleted": null,
    "deletedDateTime": null
  },
  "errors": null
}

Response codes: 200 Ok

Error Response:

{
  "id": "string",
  "version": "string",
  "metadata": {},
  "responsetime": "2020-05-01T13:39:31.057Z",
  "errors": [
    {
      "errorCode": "KER-MSD-439",
      "message": "Admin not authorized to access this Device for this Zone"
    }
  ],
 "response": null
}

Response codes: 200 Ok

Failure details

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

Parameters

Example Request

{
  "id": "string",
  "metadata": {},
  "request": {
    "id": "5f1cfd87-f078-41f0-aea9-d205ca715e68",
    "name": "Test device2",
    "serialNum": "BS563Q2230898",
    "deviceSpecId": "165",
    "macAddress": "85-BB-97-4B-14-05",
    "ipAddress": "10.4.6.8",
    "langCode": "eng",
    "validityDateTime": "2022-08-07T09:13:22.221Z",
    "zoneCode": "ORT",
    "isActive": true
  },
  "requesttime": "2018-12-10T06:12:52.994Z",
  "version": "string"
}

Example Response

{
  "id": "string",
  "version": "string",
  "responsetime": "2020-05-01T13:45:58.054Z",
  "metadata": null,
  "response": {
    "id": "5f1cfd87-f078-41f0-aea9-d205ca715e68",
    "name": "Test device2",
    "serialNum": "BS563Q2230898",
    "deviceSpecId": "165",
    "macAddress": "85-BB-97-4B-14-05",
    "ipAddress": "10.4.6.8",
    "langCode": "eng",
    "validityDateTime": "2022-08-07T09:13:22.221Z",
    "zoneCode": "ORT",
    "isActive": false,
    "createdBy": "110006",
    "createdDateTime": "2020-05-01T13:39:31.057Z",
    "updatedBy": "110006",
    "updatedDateTime": "2020-05-01T13:45:58.086Z",
    "isDeleted": null,
    "deletedDateTime": null
  },
  "errors": null
}

Response codes: 200 Ok

Error Response

{
  "id": "string",
  "version": "string",
  "metadata": {},
  "responsetime": "2020-05-01T13:39:31.057Z",
  "errors": [
    {
      "errorCode": "KER-MSD-439",
      "message": "Admin not authorized to access this Device for this Zone"
    }
  ],
 "response": null
}

Response codes: 200 Ok

Failure details

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

Parameters

Example Response

{
  "id": null,
  "version": null,
  "metadata": null,
  "responsetime": "2020-05-01T14:10:38.512Z",
  "errors": null,
  "response": {
	"devices": [
	  {
	   "id": "3000023",
        "name": "Dummy Finger Print Scanner 3",
        "serialNum": "AT8075685650",
        "deviceSpecId": "165",
        "macAddress": "6B-D5-10-4B-3A-9E",
        "ipAddress": null,
        "langCode": "eng",
        "isActive": true,
        "validityDateTime": null,
        "zoneCode": "NTH"
	  }
	] 
  }
}

Response codes: 200 Ok

Error Response

{
  "id": null,
  "version": null,
  "responsetime": "2020-05-01T14:20:17.569Z",
  "metadata": null,
  "response": null,
  "errors": [
    {
      "errorCode": "KER-MSD-010",
      "message": "Device not Found"
    }
  ]
}

Response codes: 200 Ok

Failure details

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

Parameters

Example Response

{
  "id": null,
  "version": null,
  "metadata": null,
  "responsetime": "2020-05-01T14:10:38.512Z",
  "errors": null,
  "response": {
	"devices": [
	  {
	   "id": "3000023",
        "name": "Dummy Finger Print Scanner 3",
        "serialNum": "AT8075685650",
        "deviceSpecId": "165",
        "macAddress": "6B-D5-10-4B-3A-9E",
        "ipAddress": null,
        "langCode": "eng",
        "isActive": true,
        "validityDateTime": null,
        "zoneCode": "NTH"
	  }
	] 
  }
}

Response codes: 200 Ok

Error Response

{
  "id": null,
  "version": null,
  "responsetime": "2020-05-01T14:20:17.569Z",
  "metadata": null,
  "response": null,
  "errors": [
    {
      "errorCode": "KER-MSD-010",
      "message": "Device not Found"
    }
  ]
}

Response codes: 200 Ok

Failure details

PUT /devices/decommission/{id}

This service will update existing devices.

Resource URL

PUT /devices/decommission/{id}

Resource details

Parameters

Example Request

-NA-

Example Response

{
    "id": null,
    "version": null,
    "responsetime": "2020-05-01T15:10:33.831Z",
    "metadata": null,
    "response": {
        "id": "663bf60a-bd29-4e77-a128-7f281f8de21c"
    },
    "errors": null
}

Response codes: 200 Ok

Error Response

{
  "id": null,
  "version": null,
  "responsetime": "2020-05-01T14:20:17.569Z",
  "metadata": null,
  "response": null,
  "errors": [
    {
      "errorCode": "KER-MSD-010",
      "message": "Device not Found"
    }
  ]
}

Response codes: 200 Ok

Failure details

DELETE /devices/{id}

This service will delete the devices.

Resource URL

DELETE https://{base_url}/v1/masterdata/devices/{id}

Resource details

Parameters

Example Response

{
  "id": null,
  "version": null,
  "responsetime": "2020-05-01T14:07:52.929Z",
  "metadata": null,
  "response": {
    "id": "5f1cfd87-f078-41f0-aea9-d205ca715e68"
  },
  "errors": null
}

Response codes: 200 Ok

Failure Response:

{
  "id": null,
  "version": null,
  "responsetime": "2020-05-01T13:50:48.733Z",
  "metadata": null,
  "response": null,
  "errors": [
    {
      "errorCode": "KER-MSD-010",
      "message": "Device not Found"
    }
  ]
}

Failure details

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

Parameters

Filter Values

Please find the filter columns used in search * name * isActive * macAddress * serialNum * mapStatus * deviceTypeName

Example Request

{
  "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":""
  }
}

Example Response

{
  "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"
  }
}

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

Parameters

Example Request

{
	"id": "string",
	"metadata": {},
	"requesttime": "2018-12-10T06:12:52.994Z",
	"version": "string"
	"request": {
		"filters" : [
			{
				"columnName": ""
				"type": "unique"
			}
		],
		"languageCode": "string",
	}
}

Example Response

{
  "id": "string",
  "version": "string",
  "metadata": {},
  "responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
  "errors": null,
  "response": {
  "filters": [
	{
		"fieldID": "string",
		"fieldValue": "string"
	}
   ]
 }
}

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

Parameters

Example Request

{
  "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"
  }
}

Example Response

{
  "id": "string",
  "version": "string",
  "metadata": {},
  "responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
  "errors": null,
  "response":{
      "code": "string",
      "langCode": "string"
  }
}

Response codes: 200 Ok

Failure details

PUT /devicetypes

This service will update the list of Device types which are used in the MOSIP platform.

Resource URL

PUT /devicetypes

Resource details

Parameters

Example Request

{
  "id": "string",
  "metadata": {},
  "request": {
    "code": "1234",
    "description": "test123",
    "isActive": false,
    "langCode": "eng",
    "name": "test"
  },
  "requesttime": "2018-12-10T06:12:52.994Z",
  "version": "string"
}

Example Response

{
  "id": "string",
  "version": "string",
  "metadata": {},
  "responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
  "errors": null,
  "response":{
      "code": "1234",
      "langCode": "eng"
  }
}

Response codes: 200 Ok

Failure details

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

Parameters

Filter Values

Please find the filter columns used in search * name * status

Example Request

{
  "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":""
  }
}

Example Response

{
  "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"
  }
}

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

Parameters

Example Request

{
  "id": "string",
  "metadata": {},
  "requesttime": "2018-12-10T06:12:52.994Z",
  "version": "string"
  "request": {
	"filters" : [
	  {
		"columnName": ""
		"type": "unique"
	  }
	],
	"languageCode": "string",
  }
}

Example Response

{
  "id": "string",
  "version": "string",
  "metadata": {},
  "responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
  "errors": null,
  "response": {
  "filters": [
	{
	  "fieldID": "string",
	  "fieldValue": "string"
	}
   ]
 }
}

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

Parameters

Example Request

{
  "id": "string",
  "metadata": {},
  "request": {
    "brand": "string",
    "description": "string",
    "deviceTypeCode": "string",
    "id": "added",
    "isActive": true,
    "langCode": "string",
    "minDriverversion": "string",
    "model": "string",
    "name": "string"
  },
  "requesttime": "2018-12-10T06:12:52.994Z",
  "version": "string"
}

Example Response

{
  "id": "string"
}

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

Parameters

Example Request

{
  "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"
  }
}

Example Response

{
  "id": "string"
}

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

Parameters

Example Response

{
  "id": "string",
  "version": "string",
  "metadata": {},
  "responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
  "errors": null,
  "response":  {
          "id": "string"
   }
}

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

Parameters

Example Request

-NA-

Example Response

{
  "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"
    }
  ]
}
}

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

Parameters

Example Request

-NA-

Example Response

{
  "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"
    }
  ]
 }
}

Response codes: 200 Ok

Failure Response:

{
  "id": "string",
  "version": "string",
  "metadata": {},
  "responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
  "errors": [{
      "errorCode": "string",
      "message": "string"
    }],
  "response" : null
}

Response codes: 200 Ok

Failure details

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

Parameters

Filter Values

Please find the filter columns used in search * name * isActive * deviceTypeName

Example Request

{
  "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":""	
  }
}

Example Response

{
  "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"
  }
}

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

Parameters

Example Request

{
  "id": "string",
  "metadata": {},
  "requesttime": "2018-12-10T06:12:52.994Z",
  "version": "string"
  "request": {
	"filters" : [
	  {
		"columnName": ""
		"type": "unique"
	  }
	],
	"languageCode": "string",
  }
}

Example Response

{
  "id": "string",
  "version": "string",
  "metadata": {},
  "responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
  "errors": null,
  "response": {
  "filters": [
	{
		"fieldCode": "string",
		"fieldID": "string",
		"fieldValue": "string"
	}
   ]
 }
}

Response codes: 200 Ok

Last updated