Machine APIs
This section contains details about the service APIs in the Machine Master data module
Machines API These APIs include create, update, and fetch APIs. Create and Update API is used by the Administrator Portal for the Create and Update Machine functionality. Fetch APIs are used by Registration Processor to validate the Machine data received in packet to make sure the packet is generated in an authorized Machine.
Machine Types Master API These APIs include Create, Update, Search and Filter API which the Administrator Portal uses. Create and Update API is used for the Create and Update Machine Type functionality. Search API is used by the portal to fetch the list of Machine Types based on a filter criterion to display the list of Machine Types on the UI and Filter API is used by the portal to populate Machine Type Filter Drop downs on the Portal UI.
Machine Specification API These APIs include Create, Update, Search and Filter API which are used by the Administrator Portal. Create and Update API is used for the Create and Update Machine Specification functionality. Search API is used by the portal to fetch the list of Machine Specification based on a filter criterion to display the list of Machine Specification on the UI and Filter API is used to populate Machine Specification Filter Drop downs on the Portal UI.
Machines Master API
POST /machines
This service will create the list of Machines which are used in the MOSIP platform. The record needs to be created in primary and secondary language with the same ID so that it becomes active.
Resource URL
POST https://{base_url}/v1/masterdata/machines
Resource details
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Parameters
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
id | Yes | Id of the machine | ||
ipAddress | No | IP Address of the machine | ||
isActive | Yes | Is the machine active? | ||
langCode | Yes | Language code of the machine | ||
macAddress | No | Mac Address of the machine | ||
machineSpecId | Yes | Machine specification Id of the machine | ||
name | Yes | Name of the machine | ||
publicKey | Yes | Public Key of the machine | ||
serialNum | Yes | Serial number of the machine | ||
validityDateTime | No | Validity date of machine | ||
zoneCode | Yes | Zone code of machine |
Example Request
Response Code: 200 (OK)
Example Response
Response Code: 200 (OK)
GET /machines
This service will provide the service to fetch the complete List of machines with the machine details.
Resource URL
GET https://{base_url}/v1/masterdata/machines
Resource details
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Parameters
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
-NA- |
Example Response
Response Code: 200 (OK)
GET /machines/{languagecode}
This service will provide the service to fetch the List of machines with the machine details based on the language.
Resource URL
GET https://{base_url}/v1/masterdata/machines/{lang_Code}
Resource details
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Parameters
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
languagecode | Yes | Machine Languge Code |
Example Response
Response Code: 200 (OK)
GET /machineshistory/{id}/{languagecode}/{eff_dtimes}
This service will provide a service that will verify if a machine (id) was active at a particular time (eff_dtime).
Resource URL
GET https://{base_url}/v1/masterdata/machineshistories/{id}/{lang_code}/{eff_dtimes}
Resource details
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Parameters
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
ID | Yes | Machine History Id | ||
languagecode | Yes | Language code for the Machine | ||
eff_dtimes | Yes | Effective Date and Time of the Machine |
Example Response
Response Code : 200 (OK)
DELETE /machines/{id}
This service will delete the machines.
Resource URL
DELETE https://dev.mosip.net/v1/masterdata/machines/decommission/{id}
Resource details
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Parameters
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
machineId | Yes | The machineId |
Example Response
Response Code : 200 (OK)
PUT /machines
This service will update existing machines.
Resource URL
PUT /machines
Resource details
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Parameters
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
id | Yes | Id of the machine | ||
name | Yes | Name of the machine | ||
machineSpecId | Yes | Machine specification Id of the machine | ||
serialNum | Yes | Serial number of the machine | ||
langCode | Yes | Language code of the machine | ||
ipAddress | No | Ip Address of the machine | ||
isActive | Yes | Is the machine active? | ||
validityDateTime | Yes | Validity date of machine | ||
zoneCode | Yes | Zone code of machine |
Example Request
Example Response
Response Code : 200 (OK)
Failure Response
Response Code : 200 (OK)
Failure details
Error Code | Error Message | Error Description |
---|---|---|
KER-MSD-029 | Error occured while fetching Machines | Fetch Issue |
KER-MSD-063 | Error occurred while inserting Machine details | Insertion Issue |
KER-MSD-030 | Machine not Found | Data Not Found |
KER-MSD-087 | Error occurred while updating Machine details | Update Issue |
KER-MSD-088 | Error occurred while deleting Machine details | Deletion Issue |
KER-MSD-148 | Cannot delete as dependency found | Deletion Issue because of dependency |
POST /machines/search
This service is for the machine search functionality. All the filter parameters are passed and the machines are searched and the matching results are returned.
Resource URL
POST /machines/search
Resource details
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Parameters
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 |
Filter Values
Please find the filter columns used in search
name
id
macAddress
serialNum
machineSpecId
ipAddress
langCode
regCenterId
Example Request
Example Response
Response Code : 200 (OK)
POST /machines/filtervalues
This service returns the filter values which are required in the dropdown entries of the filter screen.
Resource URL
POST /machines/filtervalues
Resource details
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Parameters
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 |
Example Request
Example Response
Response Code : 200 (OK)
GET /machines/mappedmachines/{regCenterId}
This service will fetch all the machines mapped to a registration center.
Resource URL
POST https://{base_url}/v1/masterdata/machines/mappedmachines/{reg_center_id}?direction=DESC&orderBy={field_name}&pageNumber=1&pageSize=10
Resource details
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Query Parameters
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
direction | No | ASC or DESC | ||
orderBy | No | Column Name | ||
pageNumber | No | Page Number | 1 | |
pageSize | No | Page Size | 10 |
Request Body
-NA-
Response Body
Success Response
Response Code : 200 (OK)
Failure Response
Machine Types Master API
POST /machinetypes
This service will create the list of Machine types which are used in the MOSIP platform.
Resource URL
POST /machinetypes
Resource details
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Parameters
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
machinetypecode | Yes | Code of the machine type | ||
machinename | Yes | Name of the machine type | ||
description | Yes | Description of the machine type | ||
languagecode | Yes | Language code of the machine type | ||
isactive | Yes | Is the machine type active? |
Example Request
Example Response
Response Code : 200 (OK)
Failure details
Error Code | Error Message | Error Description |
---|---|---|
KER-MSD-061 | Error occurred while inserting Machine Type details | Insertion Issue |
PUT /machinetypes
This service will update the list of Machine types which are used in the MOSIP platform.
Resource URL
PUT /machinetypes
Resource details
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Parameters
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
machinetypecode | Yes | Code of the machine type | ||
machinename | Yes | Name of the machine type | ||
description | Yes | Description of the machine type | ||
languagecode | Yes | Language code of the machine type | ||
isactive | Yes | Is the machine type active? |
Example Request
Example Response
Response codes
Response Code : 200 (OK)
Failure details
Error Code | Error Message | Error Description |
---|---|---|
KER-MSD-063 | Machine Type Not Found | Data Not Found |
KER-MSD-064 | Error occurred while updating Machine Type details | updation Issue |
GET /machinetypes
This service will provides the service to fetch the complete List of machine types with the machine details.
Resource URL
GET /machinetypes
Resource details
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Parameters
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
-NA- |
Example Response
Response Code : 200 (OK)
GET /machinetypes/{languagecode}
This service will provides the service to fetch the List of machines with the machine details based on the language code.
Resource URL
GET /machinetypes/{languagecode}
Resource details
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Parameters
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
-NA- |
Example Response
Response Code : 200 (OK)
Failure Response
Response Code : 200 (OK)
Failure details
Error Code | Error Message | Error Description |
---|---|---|
KER-MSD-061 | Error occurred while inserting Machine Type details | Insertion Issue |
KER-MSD-062 | Error occurred while fetching Machine Type details | Fetch Issue |
KER-MSD-063 | Machine Type Not Found | Data Not Found |
POST /machinetypes/search
This service is for the machine type search functionality. All the filter parameters are passed and the machines types are searched and the matching results are returned.
Resource URL
POST /machinetypes/search
Resource details
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Parameters
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 | 10 | |
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 Code : 200 (OK)
POST /machinetypes/filtervalues
This service returns the filter values which are required in the dropdown entries of the filter screen.
Resource URL
POST /machinetypes/filtervalues
Resource details
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Parameters
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 |
Example Request
Example Response
Response Code : 200 (OK)
Machine Specifications
POST /machinespecifications
This service will create a Machine Specification which are used in the MOSIP platform.
Resource URL
POST /machinespecifications
Resource details
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Parameters
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
id | Yes | ID of the Machine Specification | ||
name | Yes | Name of the machine Specification | ||
brand | Yes | Brand of the machine specification | ||
model | Yes | Model of the machine specification | ||
mtyp_code | Yes | Machine type code of the machine specification | ||
min_driver_ver | Yes | Minimum driver version required for the machine specification | ||
descr | Yes | Description of the machine specification | ||
lang_code | Yes | Language of the machine specification | ||
is_active | Yes | Is the Machine Specification active |
Example Request
Example Response
Response Code : 200 (OK)
PUT /machinespecifications
This service will update a Machine Specification which are used in the MOSIP platform.
Resource URL
PUT /machinespecifications
Resource details
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Parameters
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
id | Yes | ID of the Machine Specification | ||
lang_code | Yes | Language code of the Machine Specification |
Example Request
Example Response
Response Code : 200 (OK)
DELETE /machinespecifications/{id}
This service deletes a Machine Specification from the Machine Specifications master module.
Resource URL
DELETE /machinespecifications/{id}
Resource details
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Parameters
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
id | Yes | ID of the Machine Specification |
Example Response
GET /machinespecifications
This service will provides the list of all Machine Specifications in all languages.
Resource URL
GET /machinespecifications
Resource details
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Parameters
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
-NA- |
Example Request
Example Response
GET /machinespecifications/{lang_code}
This service will provides the list of all Machine Specifications in a specific language.
Resource URL
GET /machinespecifications/{lang_code}
Resource details
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Parameters
Name | Required | Description | Default Value | Example |
---|---|---|---|---|
-NA- |
Example Request
Example Response
Response Code : 200 (OK)
Failure Response
Response Code : 200 (OK)
Failure details
Error Code | Error Message | Error Description |
---|---|---|
KER-MSD-062 | Error occurred while inserting Machine Specification details | Insertion Issue |
KER-MSD-117 | Machine Specification not Found | Data Not Found |
KER-MSD-085 | Error occurred while updating Machine Specification details | Update Issue |
KER-MSD-086 | Error occurred while deleting Machine Specification details | Deletion Issue |
KER-MSD-122 | Cannot delete dependency found | Deletion Issue because of dependency |
KER-MSD-087 | Error occurred while fetching Machine Specification details | Fetch Issue |
POST /machinespecifications/search
This service is for the machine specifications search functionality. All the filter parameters are passed and the machines specifications are searched and the matching results are returned.
Resource URL
POST /machinespecifications/search
Resource details
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Parameters
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 | 10 | |
pageFetch | This is the amount of records to be fetched | 10 | 10 |
Filter Values
Please find the filter columns used in search
name
isActive
brand
model
machineTypeName
Example Request
Example Response
Response Code : 200 (OK)
POST /machinespecifications/filtervalues
This service returns the filter values which are required in the dropdown entries of the filter screen.
Resource URL
POST /machinespecifications/filtervalues
Resource details
Resource Details | Description |
---|---|
Response format | JSON |
Requires Authentication | Yes |
Parameters
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 |
Example Request
Example Response
Last updated