Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model SDPR API #3981

Closed
11 tasks done
ninosamson opened this issue Nov 21, 2024 · 1 comment
Closed
11 tasks done

Model SDPR API #3981

ninosamson opened this issue Nov 21, 2024 · 1 comment
Assignees

Comments

@ninosamson
Copy link
Collaborator

ninosamson commented Nov 21, 2024

User Story: As StudentAidBC, we need to a mechanism to provide information for shared clients with SDPR, for program eligibility purposes.

Acceptance Criteria:

  • create new API and publish to separate swagger page
    • example route: /api/external/student
  • parameters - SIN and DOB - NOTE: for POC we will only do SIN only.
  • Response:
    • 200
      • Given name
      • Last name
      • SIN
      • DOB
      • Address
      • applications (application numbers, submitted only. No drafts. No overwritten. Including cancelled.)
    • 404 "Not Found"
  • API authentication is clientid/secret
  • Small Segregation from current API specifically for SDPR (Ministry of Social Development and Poverty Reduction)

Additional Context
Will need to add more data within the applications in future including data like dependent/independent & CRA income. Possibly allowing for an optional search by program year.

Technical

  • Create a new SDPR service account on Keycloak and have it documented in the wiki.
  • Create the new Nestjs module for the new endpoint. Consider creating it generic to be reusable for future clients.
  • E2E tests are out of the scope.
@ninosamson ninosamson added the Business Items under Business Consideration label Nov 21, 2024
@ninosamson ninosamson self-assigned this Nov 21, 2024
@ninosamson ninosamson changed the title SDPR API Model SDPR API Nov 21, 2024
@Joshua-Lakusta Joshua-Lakusta added Dev & Architecture Development and Architecture and removed Business Items under Business Consideration labels Nov 26, 2024
@andrewsignori-aot andrewsignori-aot removed the Dev & Architecture Development and Architecture label Nov 26, 2024
@ninosamson
Copy link
Collaborator Author

After discussion, calling by SIN only is sufficient.

@andrepestana-aot andrepestana-aot self-assigned this Nov 27, 2024
github-merge-queue bot pushed a commit that referenced this issue Dec 5, 2024
- Created a new module for SIMS API from external access;
- Created a segregated swagger for external endpoints:
http://localhost:3000/external/swagger ;

![image](https://github.com/user-attachments/assets/0bb70598-679e-4799-a749-d17b328df0e9)
- Created Postman collection to authenticate and request a student by
SIN (Teams folder);

![image](https://github.com/user-attachments/assets/984503b9-8097-4d7b-9e99-092d9c2092c4)

![image](https://github.com/user-attachments/assets/282dcbe3-dbb2-485c-bce7-d5d1dacd9bdf)
- Documented on:
https://github.com/bcgov/SIMS/wiki/Keycloak-Config#external-api-access-service-accounts
github-merge-queue bot pushed a commit that referenced this issue Dec 6, 2024
- Querying the id is necessary for TypeOrm to bring multiple numbers for
the `applications` array. Otherwise, it brings only one application in
the array in the `student` object.


![image](https://github.com/user-attachments/assets/487a0e1e-97ab-4e4e-b974-f2d92898fc09)
github-merge-queue bot pushed a commit that referenced this issue Dec 6, 2024
- Added conditions to query only applications with an applicationNumber;
- Added order clause,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants