IDGen module REST API
OpenMRS IDGen module can be accessed via RESTful API by making REST calls to URLs as below
Generate Identifier:
Method: POST
Params: identifierSourceName, comment
Url: http://youropenmrs/ws/rest/v1/idgen/
Get Identifier Sources:
Method: GET
Url: http://youropenmrs/ws/rest/v1/idgen/identifiersources
Response: [{"prefix":"ID_PREFIX","uuid":"92fecd91-9647-437d-b231-bf1ae9953b39","name":"IDENTIFIER_NAME"}]
Get last Identifier generated:
Method: GET
Params: sourceName
Url: http://youropenmrs/ws/rest/v1/idgen/latestidentifier
Response: IDENTIFIER
Override last Identifier:
Method: POST
Params: sourceName, identifier (long)
Url: http://youropenmrs/ws/rest/v1/idgen/latestidentifier
This site is no longer maintained. Please visit docs.opensrp.io for current documentation.