Test APIs By Postman
In this step, we will test operation of the APIs using Postman tool.
Test the listing API
- Click + to add a new tab
- Select GET method
- Replace {id} with
abcd1234
- Click Send

- The responses result is all the information of the user’s files with the id
abcd1234

Test the writing API
- Similarly create a new tab
- Select POST method
- Enter URL of the writing API that recorded from the previous step
- In Body pattern, select raw
- Copy the below text block:
{
"user_id": "abcd1234",
"file": "flowers.png",
"folder": "",
"identityId": "123456cvbn",
"modified": "21-03-2023",
"size": "32KB",
"type": "png",
"tag": "image"
}

- Wait a moment, see the responses returned

- Open the console of DynamoDB, select Explore items and select the Documents table to check the results:

Test the deleting API
- Add a new tab to call the delete API
- Select DELETE method
- Enter URL of the deleting API that recorded from the previous step, replace {id} with
abcd1234
- In the Params section, enter
file
for the key and flowers.png
for the value
- Click Send

- Check the responses result:

- Back to the Documents table, click the Refresh button to see the results
