-
Notifications
You must be signed in to change notification settings - Fork 8
Using Postman to query the backend
To send requests to the backend without initiating from the frontend, whether it is to test what requests are received or to experiment with HTTP payloads, we can use the Postman agent.
Important: download the Postman desktop application. The web app will not be able to query localhost
All requests to the backend are authenticated using a bearer token that is sent along with the requests in the HTTP header. You need a bearer token to send an HTTP request through Postman.
To get a sample bearer token, launch the frontend, open the Network tab inside the console. Execute any activity that calls the backend, e.g., selecting a default dataset, and find that token inside the request. See pictures:
- Get the HTTP request on the Network tab
-
In Postman, set the HTTP request type, e.g. GET or POST based on the intended request. You can find this out in that HTTP request in the Network tab under Headers > Request Method
-
Scroll down under Headers to find the
Authorization:
section. This will contain the bearer token located afterBearer
- Copy paste the long bearer token (after
Bearer
) into Postman > Auth > TypeBearer Token
.
-
Back in the browser Network tab, head to Payload and copy paste the Request Payload. This is the body of the request. If there's nothing in the Payload, you may disregard this step.
-
Copy paste the body into Postman > Body (be sure to set the type of the body to
raw
). Click Send
- Home
- Terraform
- Bearer-Token-Gen-Script
- Frontend-Backend Communication Documentation
- Backend Documentation (backend)
-
driver.py
- AWS Helper Files (backend.aws_helpers)
- Dynamo DB Utility Files (aws_helpers.dynamo_db_utils)
- AWS Secrets Utility Files (aws_secrets_utils)
- AWS Batch Utility Files (aws_batch_utils)
- Firebase Helper Files (backend.firebase_helpers)
- Common Files (backend.common)
-
constants.py
-
dataset.py
-
default_datasets.py
-
email_notifier.py
-
loss_functions.py
-
optimizer.py
-
utils.py
- Deep Learning Files (backend.dl)
- Machine Learning Files (backend.ml)
- Frontend Documentation
- Bug Manual
- Developer Runbook
- Examples to locally test DLP
- Knowledge Share