forked from cds-snc/notification-api
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Co-authored-by: edSynapse <[email protected]>
- Loading branch information
1 parent
bcce2cf
commit 795e060
Showing
9 changed files
with
852 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
fileignoreconfig: | ||
- filename: app/celery/letters_pdf_tasks.py | ||
checksum: 3430294d1d4e37f8886c3103557355d4c89c13bf1186a97709b1cfb86b78b5a3 | ||
- filename: documents/postman/internal_api_developers/development.postman_environment.json | ||
checksum: ca23e82ce6045c668de609cd48ee5bff986250c06198a262aebbd80e25c1ce65 | ||
- filename: documents/postman/internal_api_developers/performance.postman_environment.json | ||
checksum: a39e7244c02137f4c76df6fec596dbafeb3ba05796faa410e67ca6afff1f4099 | ||
- filename: documents/postman/internal_api_developers/staging.postman_environment.json | ||
checksum: a6b9dbff04ca357fed37bb800544195355555c5b5bc5f14e30965121403e5907 | ||
- filename: documents/postman/staging-simplified.postman_environment.json | ||
checksum: d69f7b3dfd46f9d8fe17c1ec8429fa1a90cd8acea452e2de2f0936f1c0013474 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# Postman | ||
|
||
To download Postman, go [here](https://www.postman.com/downloads/). Postman allows you to send requests. | ||
|
||
## Postman collection | ||
|
||
The intention of this collection is to provide quick, easy functionality to send email, sms, and push notifications. This collection can be used by business line users integrating with VA Notify to get familiar with the API and send test notifications. | ||
|
||
The postman scripts use the environment variables and populate or update them as the scripts are executed. These files can be imported into Postman and allow you to | ||
execute the basic endpoints once the environmental variables below are populated. | ||
|
||
Creation, viewing and editing of templates can be done in the Self Service Portal. | ||
## basic environment variables | ||
|
||
These environment variables should be defined before you can execute any of the scripts | ||
- notification-api-url: `{environment}-api.va.gov/vanotify` - Publically available outside the VPN. | ||
- notification-api-url-private: `https://{environment}.api.notifications.va.gov - Privately available inside the VPN. | ||
- service-api-key : The VA Notify team creates an api key and sends it via encrypted email. | ||
- service-id : Retrieve this from the portal. | ||
- template-id : Retrieve this from the portal. | ||
## basic notification calls | ||
|
||
See Postman collection for details of call to send email, sms, or mobile push. Using the collection, you can take the following actions: | ||
|
||
- You can send an email with an email address or a recipient-identifier, so VA Notify can look up the email address. | ||
- You can send a text with a phone number or a recipient-identifier, so VA Notify can look up the email address. | ||
- You can send a push notification to a Mobile App user. | ||
- You can get information regarding the status of a notification. | ||
|
||
### Example | ||
````` | ||
curl -x POST https:://api-staging.va.gov/vanotify/v2/notifications/email \ | ||
-h | ||
-d '{ | ||
"template_id": "{{email-template-id}}", | ||
"email_address": "[email protected]" | ||
} | ||
````` | ||
|
||
#### Response | ||
````` | ||
{ | ||
"billing_code": null, | ||
"content": { | ||
"body": "Test", | ||
"subject": "Test" | ||
}, | ||
"id": "<notification-id>", | ||
"reference": null, | ||
"scheduled_for": null, | ||
"template": { | ||
"id": "<template-id>", | ||
"uri": "https://dev-api.va.gov/services/<service-id>/templates/<template-id>", | ||
"version": 1 | ||
}, | ||
"uri": "https://dev-api.va.gov/v2/notifications/<notification-id>" | ||
} | ||
````` |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.