# Test Script to add POST request results to database

**URL:** <https://community.postman.com/t/test-script-to-add-post-request-results-to-database/23727>\
**Category:** Help Hub\
**Tags:** tests\
**Created:** [May 13, 2021, 9:25pm UTC](https://community.postman.com/t/test-script-to-add-post-request-results-to-database/23727 "2021-05-13T21:25:47Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![bpricilla](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/bpricilla/32/6511_2.png) [@bpricilla](https://community.postman.com/u/bpricilla)\
**Post date:** [May 14, 2021, 12:57am UTC](https://community.postman.com/t/test-script-to-add-post-request-results-to-database/23727/2 "2021-05-14T00:57:47Z")

</div>

@spacecraft-candidat2 Welcome to the Community 🥳

So I understand that you need some fields from your response to be sent to your database.

1. What database do you use?
2. Do you have access to use the API of that database? Because you cannot do anything directly to interact with databases through Postman unless you have a API to communicate with your database.

First step is easy, where you can parse the API response and store them as [variables of your scope](https://learning.postman.com/docs/sending-requests/variables/). But to handle the second step we need to think about an approach. We can have access the database API’s else you need to copy the response to the file and to automate the process of inserting those records to your database.

I have picked similar discussions from the forum for you, please go through them to get more details about your ask 😊

> [@Read and write to REST-enabled databases](https://community.postman.com/t/read-and-write-to-rest-enabled-databases/912):
>
> Don’t want to futz with SQL? Want to test the internal state of your database that isn’t exposed by your API? See how to read and write to REST-enabled databases. [http://blog.getpostman.com/2018/02/09/read-and-write-to-rest-enabled-databases/](http://blog.getpostman.com/2018/02/09/read-and-write-to-rest-enabled-databases/)

> [@How to Connect Database to Postman](https://community.postman.com/t/how-to-connect-database-to-postman/9998/2):
>
> You can try using something like firebase firestore or airtable or any other database which allows you to access your data using their APIs. Firestore API: [https://firebase.google.com/docs/firestore/use-rest-api](https://firebase.google.com/docs/firestore/use-rest-api) Airtable API: [https://airtable.com/api](https://airtable.com/api)

> [@How to connect Microsoft Sync SQL database to the Postman](https://community.postman.com/t/how-to-connect-microsoft-sync-sql-database-to-the-postman/15742/11):
>
> These methods would create an API (aka webservice) to communicate with the database. So you’re just trying to find a way to communicate with the database so you can verify that an existing API is returning proper values?

> [@Connecting a database to Postman](https://community.postman.com/t/connecting-a-database-to-postman/20636/10):
>
> thanks for your replay @danny-dainton . I use SQL Developer , but my REST Services menu not show up in SQL Developer frowning_face

I hope you this helps 🙂

---

_[View the full topic](https://community.postman.com/t/test-script-to-add-post-request-results-to-database/23727)._
