|
1 | 1 |
|
2 | 2 | # Digital Convergence Initiative |
3 | 3 |
|
4 | | -In the rapidly evolving landscape of digital public infrastructure (DPI), the principle of interoperability stands as an important 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](https://standards.spdci.org/standards/standards-for-interoperability-interfaces/structure-and-versioning-of-the-standards) under Registry to enable interoperability with other systems such as CRVS. |
| 4 | +In the rapidly evolving landscape of digital public infrastructure (DPI), the principle of interoperability stands as an important corner stone for building efficient, inclusive, and sustainable systems. This article covers OpenSPP's implementation of APIs outlined in the [DCI Interface Standards v1.0](https://standards.spdci.org/standards/standards-for-interoperability-interfaces/structure-and-versioning-of-the-standards) which enables interoperability with other systems such as CRVS. |
5 | 5 |
|
6 | | -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. |
| 6 | +The implementation allows OpenSPP to operate either as the client or as the server. Note that currently OpenSPP has only completed the sync implementation. |
7 | 7 |
|
8 | | -## 1. Server Implementation |
| 8 | +## Server implementation |
9 | 9 |
|
10 | | -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 {term}`efficiency`. The following steps elaborate how the module can be configured. |
| 10 | +This section focuses on utilizing OpenSPP as the source of truth for beneficiary information by providing data, thereby enhancing data exchange and operational {term}`efficiency`. The following steps present the configuration of the module. |
11 | 11 |
|
12 | | -### 1.1 Deployment and Installation |
| 12 | +### Deployment and installation |
13 | 13 |
|
14 | | -1. Deploy [this branch](https://github.com/OpenSPP/openspp-api/tree/spp_dci_api_server) on a server |
| 14 | +1. Deploy [this branch](https://github.com/OpenSPP/openspp-api/tree/spp_dci_api_server) on a server. |
15 | 15 |
|
16 | 16 | 2. Generate RSA Private and Public key. |
17 | 17 |
|
18 | | -3. Save the RSA private key to spp_dci_api_server/tools/private_key.pem. |
| 18 | +3. Save the RSA private key to spp_dci_api_server/tools/private_key.pem |
19 | 19 |
|
20 | 20 | 4. Save the RSA public key to spp_dci_api_server/tools/public_key.pub |
21 | 21 |
|
22 | | -5. Login to OpenSPP, Go to Apps, Search “OpenSPP API: DCI Server” and Install. |
| 22 | +5. Login to OpenSPP and go to Apps. Search for “OpenSPP API: DCI Server” and install. |
23 | 23 |
|
24 | | -### 1.2 How to use |
| 24 | +### How to use |
25 | 25 |
|
26 | | -1. Login to OpenSPP |
| 26 | +1. Login to OpenSPP. |
27 | 27 |
|
28 | | -2. Navigate to Settings -> DCI API Client Credentials |
| 28 | +2. Navigate to Settings and click on DCI API Client Credentials. |
29 | 29 |
|
30 | | -3. Click Create button and fill-up the Client Name field then click Save. |
| 30 | +3. Click Create button. Fill in the Client Name field and then click Save. |
31 | 31 |
|
32 | | -4. “Show” button will appear. |
| 32 | +4. Click the “Show” button to reveal the Client ID and Client Secret. |
33 | 33 |
|
34 | | -5. Click the “Show” button to reveal the Client ID and Client Secret. |
| 34 | +5. Make sure to copy the Client ID and Client Secret. |
35 | 35 |
|
36 | | -6. Make sure to copy the Client ID and Client Secret. |
| 36 | +6. Upon closing the modal, “Show” button will not appear anymore and will not be able to reveal the Client ID and Client Secret. |
37 | 37 |
|
38 | | -7. Upon closing the modal, “Show” button will not appear anymore and will not be able to reveal the Client ID and Client Secret. |
| 38 | +7. Client ID and Client Secret will be used to retrieve Access Token. |
39 | 39 |
|
40 | | -8. Client ID and Client Secret will be used to retrieve Access Token. |
| 40 | +8. Access Token will be used to authenticate in the search Registry API. |
41 | 41 |
|
42 | | -9. Access Token will be used to authenticate in the search Registry API. |
| 42 | +9. To retrieve Access Token, Send a POST request to the url `<domain>/oauth2/client/token` with a body client_id, client_secret, and grant_type=’client_credentials’ |
43 | 43 |
|
44 | | -10. To retrieve Access Token, Send a POST request to the url `<domain>/oauth2/client/token` with a body client_id, client_secret, and grant_type=’client_credentials’ |
| 44 | +10. Copy the access_token in the response. |
45 | 45 |
|
46 | | -11. Copy the access_token in the response. |
| 46 | +11. To retrieve registry data, Send a POST request to the url `<domain>/registry/sync/search`. |
47 | 47 |
|
48 | | -12. To retrieve registry data, Send a POST request to the url `<domain>/registry/sync/search`. |
| 48 | +12. Header should have a key “Authorization” with a value “Bearer <access_token>” |
49 | 49 |
|
50 | | -13. Header should have a key “Authorization” with a value “Bearer <access_token>” |
| 50 | +13. Refer to the DCI API spec for the request and response structure. |
51 | 51 |
|
52 | | -14. Refer the DCI API spec for the request and response structure |
| 52 | +## Client implementation |
53 | 53 |
|
54 | | -## 2. Client Implementation |
| 54 | +This section focuses on utilizing another registry as the source for truth to get beneficiary information that can then be utilized in OpenSPP. |
55 | 55 |
|
56 | | -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. |
57 | | - |
58 | | -### 2.1 Deployment and Installation |
| 56 | +### Deployment and installation |
59 | 57 |
|
60 | 58 | 1. Deploy these two branches([1](https://github.com/OpenSPP/openspp-api/tree/spp_crvs_import),[2](https://github.com/OpenSPP/openspp-base/tree/spp_data_source)) on a server |
61 | 59 |
|
62 | | -2. Get client_id and client_secret from CRVS(or from server). |
| 60 | +2. Get client_id and client_secret from CRVS (or from server). |
63 | 61 |
|
64 | | -3. Login to OpenSPP |
| 62 | +3. Login to OpenSPP. |
65 | 63 |
|
66 | | -4. Navigate to the Apps page, Search “OpenSPP Import: DCI API” and Install it. |
| 64 | +4. Navigate to the Apps page. Search for “OpenSPP Import: DCI API” and Install it. |
67 | 65 |
|
68 | 66 | 5. Upon installing “OpenSPP Import: DCI API”, a data source is automatically created. |
69 | 67 |
|
70 | | -6. Navigate to Settings -> Data Source to view the created data source. |
| 68 | +6. Navigate to Settings and select Data Source to view the created data source. |
71 | 69 |
|
72 | 70 | 7. Input the credentials in the client_id, client_secret, and grant_type field inside the Data Source record. |
73 | 71 |
|
74 | | -8. The only supported grant_type for now is “client_credentials”. |
| 72 | +NOTE: The only supported grant_type for now is “client_credentials”. |
75 | 73 |
|
76 | | -### 2.2 How to use |
| 74 | +### How to use |
77 | 75 |
|
78 | | -1. Navigate to Programs -> Import From Registry |
| 76 | +1. Navigate to Programs and select Import From Registry. |
79 | 77 |
|
80 | | -2. Create Search Criteria, Enter Search Criteria Name, Location, and Birthdate Range |
| 78 | +2. Create Search Criteria, Enter Search Criteria Name, Location, and Birthdate Range. |
81 | 79 |
|
82 | 80 | 3. Click Fetch Button. |
83 | 81 |
|
84 | 82 | 4. Individual records will be imported from OpenCRVS Lab to OpenSPP. |
85 | 83 |
|
86 | | -5. Fetch Button is now {term}`disabled` but it can be enabled by clicking the “Enable Fetching”. |
| 84 | +5. Fetch Button is now {term}`disabled` but can be enabled by clicking the “Enable Fetching”. |
87 | 85 |
|
88 | | -6. Once an individual record is already fetched, They are now created and visible to the Registry page. |
| 86 | +6. Once an individual record is fetched, it is created and visible to the Registry page. |
89 | 87 |
|
90 | | -7. Navigate to Registry -> Individual to check the individuals and Navigate to Registry -> Group to check the groups. |
| 88 | +7. Navigate to Registry and select Individual to check the individuals. Select Group to check the groups. |
91 | 89 |
|
92 | | -8. Refer the DCI API spec for the request and response structure |
| 90 | +8. Refer the DCI API spec for the request and response structure. |
93 | 91 |
|
94 | 92 | _NOTE: This documentation/implementation should be considered as an alpha release of the implementation of the DCI Interface Standards v1.0._ |
0 commit comments