api/v1/ for Case Contacts (iOS App)
What type(s) of user does this feature affect?
- volunteers
Description A volunteer needs to be able to use the app to save a case contact.
Approach
Authentication
| HTTP | Route | Description | Issue(s) | Completed |
|---|---|---|---|---|
| POST | /api/v1/users/sign_in | Login | #4976, #6216 | ✅ |
| POST | /api/v1/users/sign_in/validate | Validation | ❌ | |
| POST | /api/v1/users/refresh_token | Refresh Access Token | ❌ | |
| DELETE | /api/v1/users/sign_out | Log-Out | #6241 | ✅ |
Case Contact
| HTTP | Route | Description | Issue{s) | Completed |
|---|---|---|---|---|
| GET | /api/v1/case_contacts | List Case Contacts (casa_cases) | ❌ | |
| GET | /api/v1/case_contacts/:id | Get Specific Case Contact | ❌ | |
| POST | /api/v1/case_contacts | Create new Case Contact | ❌ | |
| PATCH | /api/v1/case_contacts/:id | Update Specific Case Contact | ❌ |
For Additional Expenses (they are nested under Case Contacts)
| HTTP | Route | Issue(s) | Completed |
|---|---|---|---|
| POST | /api/v1/case_contacts/:case_contact_id/additional_expenses | ❌ | |
| PATCH | /api/v1/case_contacts/:case_contact_id/additional_expenses/:id | ❌ | |
| DELETE | /api/v1/case_contacts/:case_contact_id/additional_expenses/:id | ❌ |
Requirements for /api/v1/
-
Secure Authentication (token based)
/api/v1/users/sign_inFoundation: iOS app can authenticate on sign_in endpoint #4976, and below
- [ ] #6207 Secure session token in JSON response through token randomization
- [ ] #6207 Session tokens default to expire 7 hours after creation
- [ ] #6210 Volunteers Sign-In endpoint has a "stay logged in" or "remember_me" option where refresh tokens expire after 1 year
- [ ] #6211 Secure endpoint from denial-of-service (DDoS) attacks by blocking suspicious requests
Token Refreshing: iOS app generates new access tokens when refresh token is still valid
/api/v1/users/refresh_token- [ ] #6233 Volunteers Refresh Token endpoint generates new access token if refresh_token is still valid
Token Validating: iOS app can validate users session on endpoint
/api/v1/users/validate- [ ] #6256 Volunteers user validate endpoint ensures session is valid
Token Revoking: iOS app can Sign-Out users on sign_out endpoint
/api/v1/users/sign_out- [ ] #6222 Volunteers Sign-Out endpoint invalidates current session/access token and refresh token when requested
-
Casa Case Endpoint for Signed-In Users
/api/v1/casa_casesMilestone 1
- [ ] Add authenticate user before_action to controller and validate user is signed-in
- [ ] Signed-In user case contact data is accessible through POST request (only shallow fields meaning fields that don't reference a different table)
- [ ] Make sure user can only see case contacts they have permission to see
Milestone 2a
- [ ] Can display errors
Milestone 2b
- [ ] Can accept new case contact and save it
- [ ] Can create case contact drafts
Milestone 2c (expand case contact data)
- [ ] Add case contact creator to json
- [ ] Add data from
casa_case_contact_typesto show which contact types are available to be selected for the case contact - [ ] Add data from
case_contact_contact_typesto show contact types have been selected on the case contact - [ ] Add data from
contact_topic_answersto show sections of notes for the case contact - [ ] Add contact topics to show available contact topics to choose from
Milestone 3a
- [ ] Can update case contact and save it
- [ ] Can update case contact drafts and save it
Milestone 3b
- [ ] Can delete drafts
We have jBuilder installed. It can help you if your json response is complicated. You can also use it to convert a rails object into json easily like this
Questions? Join Slack!
We highly recommend that you join us in slack https://rubyforgood.herokuapp.com/ #casa channel to ask questions quickly and hear about office hours (currently Tuesday 6-8pm Pacific), stakeholder news, and upcoming new issues.
When this is almost done we'll probably need to talk to sean about a r4g ios publishing account. https://developer.apple.com/support/membership-fee-waiver/
Is this still a priority?
@dpaola2 A dev team is working on this. Don't worry about it
OK. Should I close? (Which dev team?)
No don't close it. It's codethechange
This issue has been inactive for 245 hours (10.21 days) and will be unassigned after 115 more hours (4.79 days). If you have questions, please
If you are still working on this, comment here to tell the bot to give you more time
This issue has been inactive for 245 hours (10.21 days) and will be unassigned after 115 more hours (4.79 days). If you have questions, please
If you are still working on this, comment here to tell the bot to give you more time
this project is still being worked on. Don't close yet!
Maybe if I slap the epic tag on it the bot will ignore it
This issue has been inactive for 261 hours (10.88 days) and will be unassigned after 99 more hours (4.13 days). If you have questions, please
If you are still working on this, comment here to tell the bot to give you more time
still working on this.
This issue has been inactive for 260 hours (10.83 days) and will be unassigned after 100 more hours (4.17 days). If you have questions, please
If you are still working on this, comment here to tell the bot to give you more time
Still working on this.
This issue has been inactive for 263 hours (10.96 days) and will be unassigned after 97 more hours (4.04 days). If you have questions, please
If you are still working on this, comment here to tell the bot to give you more time
still working on this
This issue has been inactive for 243 hours (10.13 days) and will be unassigned after 117 more hours (4.88 days). If you have questions, please
If you are still working on this, comment here to tell the bot to give you more time
still working on this
This issue has been inactive for 263 hours (10.96 days) and will be unassigned after 97 more hours (4.04 days). If you have questions, please
If you are still working on this, comment here to tell the bot to give you more time
working on this.
This issue has been inactive for 250 hours (10.42 days) and will be unassigned after 110 more hours (4.58 days). If you have questions, please
If you are still working on this, comment here to tell the bot to give you more time
still working on this
This issue has been inactive for 250 hours (10.42 days) and will be unassigned after 110 more hours (4.58 days). If you have questions, please
If you are still working on this, comment here to tell the bot to give you more time
This issue has been inactive for 370 hours (15.42 days) and is past the limit of 360 hours (15.00 days) so is being unassigned.You’ve just been unassigned from this ticket due to inactivity – but feel free to pick it back up (or a new one!) in the future! Thank you again for your contribution to this project.
This issue has been inactive for 369 hours (15.38 days) and is past the limit of 360 hours (15.00 days) so is being unassigned.You’ve just been unassigned from this ticket due to inactivity – but feel free to pick it back up (or a new one!) in the future! Thank you again for your contribution to this project.
This issue has been inactive for 393 hours (16.38 days) and is past the limit of 360 hours (15.00 days) so is being unassigned.You’ve just been unassigned from this ticket due to inactivity – but feel free to pick it back up (or a new one!) in the future! Thank you again for your contribution to this project.
still working on this
This issue has been inactive for 240 hours (10.00 days) and will be unassigned after 120 more hours (5.00 days). If you have questions, please
If you are still working on this, comment here to tell the bot to give you more time
This issue has been inactive for 360 hours (15.00 days) and is past the limit of 360 hours (15.00 days) so is being unassigned.You’ve just been unassigned from this ticket due to inactivity – but feel free to pick it back up (or a new one!) in the future! Thank you again for your contribution to this project.
This issue has been inactive for 408 hours (17.00 days) and is past the limit of 360 hours (15.00 days) so is being unassigned.You’ve just been unassigned from this ticket due to inactivity – but feel free to pick it back up (or a new one!) in the future! Thank you again for your contribution to this project.
still working on this
This issue has been inactive for 243 hours (10.13 days) and will be unassigned after 117 more hours (4.88 days). If you have questions, please
If you are still working on this, comment here to tell the bot to give you more time