Skip to content

Commit

Permalink
#1539 - Client Postman Collection (#1607)
Browse files Browse the repository at this point in the history
Co-authored-by: edSynapse <[email protected]>
  • Loading branch information
edDocMe360 and edSynapse authored Jan 18, 2024
1 parent bcce2cf commit 795e060
Show file tree
Hide file tree
Showing 9 changed files with 852 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .talismanrc
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
59 changes: 59 additions & 0 deletions documents/postman/README.md
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.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@
"value": "",
"enabled": true
},
{
"key": "icn",
"value": "",
"type": "any",
"enabled": true
},
{
"key": "jwt_signed",
"value": "",
Expand Down Expand Up @@ -121,6 +127,11 @@
"key": "user-id",
"value": "",
"enabled": true
},
{
"key": "vetext-template-id",
"value": "",
"enabled": true
}
],
"_postman_variable_scope": "environment",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@
"value": "",
"enabled": true
},
{
"key": "icn",
"value": "",
"type": "any",
"enabled": true
},
{
"key": "jwt_signed",
"value": "",
Expand Down Expand Up @@ -121,6 +127,11 @@
"key": "user-id",
"value": "",
"enabled": true
},
{
"key": "vetext-template-id",
"value": "",
"enabled": true
}
],
"_postman_variable_scope": "environment",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@
"value": "",
"enabled": true
},
{
"key": "icn",
"value": "",
"type": "any",
"enabled": true
},
{
"key": "jwt_signed",
"value": "",
Expand Down Expand Up @@ -121,6 +127,11 @@
"key": "user-id",
"value": "",
"enabled": true
},
{
"key": "vetext-template-id",
"value": "",
"enabled": true
}
],
"_postman_variable_scope": "environment",
Expand Down
Loading

0 comments on commit 795e060

Please sign in to comment.