ID Generation (IDGen)
Overview
Configure IDGen
1
3
Test the IDGen Format
curl --location --request POST 'http://localhost:8285/egov-idgen/id/_generate' \
--header 'Content-Type: application/json' \
--data-raw '{
"RequestInfo": {
"authToken": "REPLACE_WITH_TOKEN",
"userInfo": {
"id": 23299,
"uuid": "e721639b-c095-40b3-86e2-acecb2cb6efb",
"userName": "9337682030",
"name": "Abhilash Seth",
"type": "EMPLOYEE",
"mobileNumber": "9337682030",
"emailId": "[email protected]",
"roles": [{
"id": 281,
"name": "Employee"
}]
}
},
"idRequests": [{
"tenantId": "pg.citya",
"idName": "pgr.servicerequestid"
}]
}4
Integrate IDGen into your application
private List<String> getIdList(RequestInfo requestInfo, String tenantId, String idKey,
String idformat, int count) {
List<IdResponse> idResponses = idGenRepository.getId(requestInfo, tenantId, idKey, idformat, count).getIdResponses();
if (CollectionUtils.isEmpty(idResponses))
throw new CustomException("IDGEN ERROR", "No ids returned from idgen Service");
return idResponses.stream()
.map(IdResponse::getId).collect(Collectors.toList());
}Last updated
Was this helpful?