Jump to content
Robert Gilland

Passing an SQL into a REST Request, and returning Result in JSON Dataset?

Recommended Posts

Can I passing an SQL (select Statement )into a REST Request to a Rest Server , and receive a result in a JSON Dataset?

Can I pass an INSERT/UPDATE/DELETE Statement into a Rest Request?

Share this post


Link to post
7 hours ago, Robert Gilland said:

Can I passing an SQL (select Statement )into a REST Request to a Rest Server , and receive a result in a JSON Dataset?

Can I pass an INSERT/UPDATE/DELETE Statement into a Rest Request?

Short answer:

Yes

 

Long answer:

Yes, but don't! It would put your SQL database at risk.

 

Instead, build a proper REST API as

- it hides the underlying database

- it allows you to change the underlying database operations without changing the client

A REST API done right is far more secure and robust.

  • Like 4

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×