MOSIP Docs 1.1.5
GitHubCommunityTech Blogs
  • Home
  • Architecture
    • Guiding Principles
    • MOSIP Architecture
      • Technology Stack
    • MOSIP and Data
      • Naming Standards
      • Data-Model
    • Privacy & Security
      • Cryptography in MOSIP
    • Anonymous Profiling Support
  • Modules
    • Pre-Registration
      • Pre-Registration Functionality
      • UI Specification for Pre-registration
      • Pre-Registration Configuration
    • Registration
      • Registration Functionality
      • Registration Packet
      • Registration Client Setup
      • First User Registration and Onboarding
      • Guide to Configure MOSIP for Biometrics
      • Guide to On-board Biometric Devices
      • Device Integration Specifications
      • UI Specification for Registration Client
    • Registration Processor
      • Registration Processor Functionality
      • Deduplication and Manual Adjudication
      • MOSIP ID Object Definition
    • ID Repository
    • ID Authentication
      • ID Authentication Functionality
    • Resident Services
      • Resident Services Functionality
    • Partner Management
      • Partner Management Functionality
      • MOSIP Partner Secure Communication
      • Partner Self Service Portal
    • Administration
      • Admin Services Functionality
      • Download Card
    • Kernel
      • Audit Manager Functionality
        • Admin Service Audits
        • Resident Service Audits
        • Partner Management Audits
        • Registration Client Audits
        • Registration Processor Audits
        • ID Repository Audits
        • ID Authentication Audits
        • Pre-registration Audits
      • Authentication and Authorization Functionality
      • Auth Adapter
      • Auth Implementation
      • Common Services Functionality
      • Data Services Functionality
      • Master Data Services Functionality
      • UIN and VID Generation Service Functionality
      • VID Generator
  • Biometrics
    • ABIS
    • Biometric SDK
    • MDS Specification
    • Biometric Specification
    • CBEFF XML
    • Compliance Tool Kit
  • Build & Deploy
    • Sandbox Installer
    • Deployment Architectures
    • Cell Based Deployment Architecture
    • Hardware Security Module HSM Specifications
    • Hardware Sizing
    • Customizations for a Country
    • Other Installation Guides
      • Steps to Install and Configure HDFS
      • Steps to Install and use PostgreSQL Version 10.2 on RHEL 7.5
      • Steps to Install Clam AntiVirus Version 0.101.0
      • Steps to Install Keycloak Standalone Server
    • Services in MOSIP
  • Glossary
  • Contribute
    • Call for Contribution
    • Contributor's Guide
    • Code of Conduct
    • Issue Reporting Guideline
    • Coding Standards
      • Auth Angular User Guide
      • Auth SpringBoot User Guide
      • Gitub Workflow
      • MOSIP Java Coding Standards
      • MOSIP REST API guidelines
      • Registration Client UI Developer Document
      • Registration Client Developer Documentation
      • Security Tools
    • Testing
      • Test Rig Design
      • Tester Documentation
      • Testing Attachments Kernel
  • APIs
    • ABIS APIs
    • Admin APIs
    • AuthN and AuthZ APIs
    • Biometric SDK APIs
    • BlacklistedWords APIs
    • Common APIs
    • Device APIs
    • Device Type and Subtype APIs
    • Device Management APIs
    • Document APIs
    • Dynamic Fields APIs
    • Holiday APIs
    • ID Authentication APIs
    • ID Repository APIs
    • ID Schema APIs
    • Kernel APIs
    • Machine APIs
    • Master Data Biometric APIs
    • Packet APIs
    • Packet Manager APIs
    • Partner Management Service APIs
    • Pre Registration APIs
    • Registration Center APIs
    • Registration Processor APIs
    • Resident Service APIs
    • Sync Data APIs
    • Template APIs
    • Zone APIs
  • Older Releases
    • Release Notes 1.1.5
      • Enhancements
      • Defect Fixes
      • Patches
        • Patch 1.1.5.5
        • Patch 1.1.5.5-P1
    • Release Notes 1.1.4
      • Enhancements
      • Defect Fixes
    • Release Notes 1.1.3
      • Features
      • Bug Fixes
    • Release Notes 1.1.2
      • Features
      • Bug Fixes
    • Release Notes 1.1.1
      • Bug Fixes
      • Artifact Version
    • Release Notes 1.1.0
      • Features
      • Bug Fixes
      • 1.2.0 Features
      • Artifact Version
    • Release Notes 1.0.6
    • Release Notes 1.0.5
    • Release Notes 1.0.0
      • Features
    • Release Notes 0.9.0
  • Roadmap
    • Roadmap Activities
  • Revision History
  • License
Powered by GitBook
On this page
  • Create Dynamic Field
  • Update Dynamic Field
  • Update Dynamic Field value
  • Get Dynamic Field

Was this helpful?

Export as PDF
  1. APIs

Dynamic Fields APIs

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.

[
  {
    "code": "101",
    "value": "A",
    "langCode": "eng",
    "active": true
  },
  {
    "code": "102",
    "value": "A+",
    "langCode": "eng",
    "active": true
  },
  {
    "code": "103",
    "value": "A-",
    "langCode": "eng",
    "active": true
  },
  {
    "code": "104",
    "value": "B",
    "langCode": "eng",
    "active": true
  },
  {
    "code": "105",
    "value": "B+",
    "langCode": "eng",
    "active": true
  },
  {
    "code": "106",
    "value": "B-",
    "langCode": "eng",
    "active": true
  },
  {
    "code": "107",
    "value": "AB",
    "langCode": "eng",
    "active": true
  },
  {
    "code": "108",
    "value": "AB+",
    "langCode": "eng",
    "active": true
  },
  {
    "code": "109",
    "value": "AB-",
    "langCode": "eng",
    "active": true
  },
  {
    "code": "110",
    "value": "O",
    "langCode": "eng",
    "active": true
  },
  {
    "code": "111",
    "value": "O+",
    "langCode": "eng",
    "active": true
  },
  {
    "code": "112",
    "value": "O-",
    "langCode": "eng",
    "active": true
  },
  {
    "code": "113",
    "value": "Don't Know",
    "langCode": "eng",
    "active": true
  },
  {
    "code": "114",
    "value": "Not Applicable",
    "langCode": "eng",
    "active": true
  }
]

Create Dynamic Field

This API is used to create a dynamic field.

Resource URL

POST https://{base_url}/v1/masterdata/dynamicfields

Resource Details

Resource Details
Description

Response format

JSON

Requires Authentication

Yes

Request Body Parameters

Name
Required
Description
Default Value
Example

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

Request

{
  "id": "string",
  "metadata": {},
  "request": {
    "active": true,
    "dataType": "string",
    "description": "string",
    "fieldVal": [
      {
        "active": true,
        "code": "string",
        "langCode": "string",
        "value": "string"
      }
    ],
    "langCode": "eng",
    "name": "any name"
  },
  "requesttime": "2018-12-10T06:12:52.994Z",
  "version": "string"
}

Response

{
  "errors": [
    {
      "errorCode": "string",
      "message": "string"
    }
  ],
  "id": "string",
  "metadata": {},
  "response": {
    "active": true,
    "createdBy": "string",
    "createdOn": "2020-08-10T18:43:46.767Z",
    "dataType": "string",
    "description": "string",
    "fieldVal": [
      {
        "active": true,
        "code": "string",
        "langCode": "string",
        "value": "string"
      }
    ],
    "id": "string",
    "langCode": "string",
    "name": "string",
    "updatedBy": "string",
    "updatedOn": "2020-08-10T18:43:46.767Z"
  },
  "responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
  "version": "string"
}

Update Dynamic Field

This API is used to update a dynamic field schema completely.

Resource Details

Resource Details
Description

Response format

JSON

Requires Authentication

Yes

Request Body Parameters

Name
Required
Description
Default Value
Example

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

Resource URL

PUT https://{base_url}/v1/masterdata/dynamicfields?id={id value}

Request

{
  "id": "string",
  "metadata": {},
  "request": {
    "active": true,
    "dataType": "string",
    "description": "string",
    "fieldVal": [
      {
        "active": true,
        "code": "string",
        "langCode": "string",
        "value": "string"
      }
    ],
    "langCode": "eng",
    "name": "any name"
  },
  "requesttime": "2018-12-10T06:12:52.994Z",
  "version": "string"
}

Response

{
  "errors": [
    {
      "errorCode": "string",
      "message": "string"
    }
  ],
  "id": "string",
  "metadata": {},
  "response": {
    "active": true,
    "createdBy": "string",
    "createdOn": "2020-08-10T18:54:17.240Z",
    "dataType": "string",
    "description": "string",
    "fieldVal": [
      {
        "active": true,
        "code": "string",
        "langCode": "string",
        "value": "string"
      }
    ],
    "id": "string",
    "langCode": "string",
    "name": "string",
    "updatedBy": "string",
    "updatedOn": "2020-08-10T18:54:17.240Z"
  },
  "responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
  "version": "string"
}

Update Dynamic Field value

This API is used to update a dynamic field value.

Resource URL

PUT https://dev.mosip.net/v1/masterdata/dynamicfields/values?id={id value}

Resource Details

Resource Details
Description

Response format

JSON

Requires Authentication

Yes

Request Body Parameters

Name
Required
Description
Default Value
Example

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

Request

{
  "id": "string",
  "metadata": {},
  "request": {
    "active": true,
    "code": "string",
    "langCode": "string",
    "value": "string"
  },
  "requesttime": "2018-12-10T06:12:52.994Z",
  "version": "string"
}

Response

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

Get Dynamic Field

This API is used to fetch dynamic fields using pagination.

Request URL

GET https://dev.mosip.net/v1/masterdata/dynamicfields?orderBy={desc or asc}&pageNumber={page number}&pageSize={page size}&sortBy={field name to sort}

Resource Details

Resource Details
Description

Response format

JSON

Requires Authentication

Yes

Request Body Parameters

NA

Request

NA

Response

{
  "errors": [
    {
      "errorCode": "string",
      "message": "string"
    }
  ],
  "id": "string",
  "metadata": {},
  "response": {
    "data": [
      {
        "active": true,
        "createdBy": "string",
        "createdOn": "2020-08-10T19:05:52.427Z",
        "dataType": "string",
        "description": "string",
        "fieldVal": [
          {
            "active": true,
            "code": "string",
            "langCode": "string",
            "value": "string"
          }
        ],
        "id": "string",
        "langCode": "string",
        "name": "string",
        "updatedBy": "string",
        "updatedOn": "2020-08-10T19:05:52.427Z"
      }
    ],
    "pageNo": 0,
    "totalItems": 0,
    "totalPages": 0
  },
  "responsetime": "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
  "version": "string"
}
PreviousDocument APIsNextHoliday APIs

Last updated 3 years ago

Was this helpful?