What are the steps to connect Postman with SQL server database

I have POST request which gives response code 409 Conflict from second run onward as some body element of POST request forms composite key.

My objective is to connect with database and check for existence of composite key before hitting POST call.

Note- I don’t have DELETE method call to help me in this.

Hi @rohit2330!

Welcome to the community! :clap:

What you’d like to do currently not a native feature of postman. It does not have the ability to make connections to a database, and therefore, cannot perform what you are looking for.

What I might suggest, is if the backend can expose that composite key via the web API you’re testing, via a GET method, and then you can perform a a GET method first to check for the existence of the composite key before hitting the POST call. I am not sure if you have access or the ability to change it, but thats my recommendation as a work around.

Hope this helps!

Orest

Why are you not doing this check with a GET request?

@odanylewycz, @vdespa

Thanks for this information, I can check existence of data and if it’s not found then I can proceed for POST call.

1 Like