Digital Convergence Initiative
Contents
Digital Convergence Initiative#
In the rapidly evolving landscape of digital public infrastructure (DPI), the principle of interoperability stands as an important foundation for building efficient, inclusive, and sustainable systems in a country. This article delves into how OpenSPP implemented APIs outlined in the DCI Interface Standards v1.0 under Registry to enable interoperability with other systems such as CRVS.
The implementation can be categorized into two sections where OpenSPP operates as the client and OpenSPP operates as the server. Note that currently OpenSPP has only completed the sync implementation.
Server implementation#
This section focuses on utilizing OpenSPP as the source of truth for beneficiary information where OpenSPP acts as the server. Such integration allows OpenSPP to seamlessly interact with other critical systems by providing data, thereby enhancing data exchange and operational efficiency. The following steps elaborate how the module can be configured.
Deployment and installation#
Deploy this branch on a server.
Generate RSA Private and Public key.
Save the RSA private key to spp_dci_api_server/tools/private_key.pem
Save the RSA public key to spp_dci_api_server/tools/public_key.pub
Login to OpenSPP and go to Apps. Search for “OpenSPP API: DCI Server” and install.
How to use#
Login to OpenSPP.
Navigate to Settings and click on DCI API Client Credentials.
Click Create button. Fill in the Client Name field and then click Save.
Click the “Show” button to reveal the Client ID and Client Secret.
Make sure to copy the Client ID and Client Secret.
Upon closing the modal, “Show” button will not appear anymore and will not be able to reveal the Client ID and Client Secret.
Client ID and Client Secret will be used to retrieve Access Token.
Access Token will be used to authenticate in the search Registry API.
To retrieve Access Token, Send a POST request to the url
<domain>/oauth2/client/tokenwith a body client_id, client_secret, and grant_type=’client_credentials’Copy the access_token in the response.
To retrieve registry data, Send a POST request to the url
<domain>/registry/sync/search.Header should have a key “Authorization” with a value “Bearer <access_token>”
Refer to the DCI API spec for the request and response structure.
Client implementation#
This section focuses on utilizing another registry as the source for truth to get beneficiary information that can then be utilized in OpenSPP.
This section focuses on utilizing another registry as the source for truth to get beneficiary information. The following steps elaborate how the module can be configured to fetch data where OpenSPP acts as the client.
2.1 Deployment and Installation#
Get client_id and client_secret from CRVS (or from server).
Login to OpenSPP.
Navigate to the Apps page. Search for “OpenSPP Import: DCI API” and Install it.
Upon installing “OpenSPP Import: DCI API”, a data source is automatically created.
Navigate to Settings and select Data Source to view the created data source.
Input the credentials in the client_id, client_secret, and grant_type field inside the Data Source record.
NOTE: The only supported grant_type for now is “client_credentials”.
How to use#
Navigate to Programs and select Import From Registry.
Create Search Criteria, Enter Search Criteria Name, Location, and Birthdate Range.
Click Fetch Button.
Individual records will be imported from OpenCRVS Lab to OpenSPP.
Fetch Button is now disabled but can be enabled by clicking the “Enable Fetching”.
Once an individual record is fetched, it is created and visible on the Registry page.
Navigate to Registry and select Individual to check the individuals. Select Group to check the groups.
Refer the DCI API spec for the request and response structure.
NOTE: This documentation/implementation should be considered as an alpha release of the implementation of the DCI Interface Standards v1.0.
openspp.org