This section details about the REST services for Dynamic fields.
MOSIP consists of various types of master data like, gender, location, individual type as part of its pre-defined schema. Now if a MOSIP adopter wants to add more master data for its UI screens, they can choose to use our dynamic fields APIs which are designed to support master data in JSON format in a single table.
Our implementation for dynamic field allows MOSIP adopters to store ina key value pair in single/multiple languages. Below is an example of Blood Group in english.
This API is used to create a dynamic field.
POST https://{base_url}/v1/masterdata/dynamicfields
Response format
JSON
Requires Authentication
Yes
id
yes
ID of the API
mosip.dynamicfield.create
version
yes
version of the API
v1
metadata
no
any meta information for the API
requesttime
yes
timestamp of the request
2019-12-11T06:12:25.288Z
request
yes
request body attributes
request.active
yes
enable or disable the field
true or false
request.dataType
yes
data type of the field value
string or integer
request.description
yes
description of the field
request.fieldVal
yes
list of field values
request.fieldVal.active
yes
the field is active or not
true or false
request.fieldVal.code
yes
the language code for the value
eng or ara or fra
request.fieldVal.value
yes
the value to be stored
request.langCode
yes
the language code for the field name
request.name
yes
the name of the field
This API is used to update a dynamic field schema completely.
Response format
JSON
Requires Authentication
Yes
id
yes
ID of the API
mosip.dynamicfield.create
version
yes
version of the API
v1
metadata
no
any meta information for the API
requesttime
yes
timestamp of the request
2019-12-11T06:12:25.288Z
request
yes
request body attributes
request.active
yes
enable or disable the field
true or false
request.dataType
yes
data type of the field value
string or integer
request.description
yes
description of the field
request.fieldVal
yes
list of field values
request.fieldVal.active
yes
the field is active or not
true or false
request.fieldVal.code
yes
the language code for the value
eng or ara or fra
request.fieldVal.value
yes
the value to be stored
request.langCode
yes
the language code for the field name
request.name
yes
the name of the field
PUT https://{base_url}/v1/masterdata/dynamicfields?id={id value}
This API is used to update a dynamic field value.
PUT https://dev.mosip.net/v1/masterdata/dynamicfields/values?id={id value}
Response format
JSON
Requires Authentication
Yes
id
yes
ID of the API
mosip.dynamicfield.create
version
yes
version of the API
v1
metadata
no
any meta information for the API
requesttime
yes
timestamp of the request
2019-12-11T06:12:25.288Z
request
yes
request body attributes
request.active
yes
the field is active or not
true or false
request.code
yes
the language code for the value
eng or ara or fra
request.value
yes
the value to be stored
request.langCode
yes
the language code for the field name
This API is used to fetch dynamic fields using pagination.
GET https://dev.mosip.net/v1/masterdata/dynamicfields?orderBy={desc or asc}&pageNumber={page number}&pageSize={page size}&sortBy={field name to sort}
Response format
JSON
Requires Authentication
Yes
NA
NA