I've a requirement. I have a REST API using spring-mvc in which there is a POST method to insert data into MySQL database. I checked it through postman client and results got inserted into MySQL database. Now I've one more spring project say InsertMongo in which the details are inserted into MONGODB as documents. So, i need to invoke my REST API in that spring project InsertMongo such that i have to insert the details into MySQL table instead of inserting them into MySQL. Let's say I've all the details which are to be inserted . So, how can i send them as body to POST call and how can i invoke my post call here. can anybody tell me how to proceed. I'm not getting any idea. Thanks in advance.
Related
how can I send json data through a post request to an external client from mysql commands?
POST(select * from clientes)
I need to develop an application and python that listens to a pot from mysql, every time a new row is inserted from a database table, that is, when a trigger is performed
I have built an app with Feathers.js and I'm trying to find the way, how can I save any record to the multiple databases? I would like to save a "message" for example to the mysql and also to the elastic search.
I would like to use elastic search for "full text" search, but I would also like to have all data saved in some relational database.
I've created a service using:
feathers generate service
but I can select only one specific database there.
Any help will be really appreciated.
Fast way to me is to create another feathers app (microservice) for elasticsearch and post the data to elasticsearch too.
If you are using socket in the frontend app you can define 2 sockets (1 for each micro service).
When you post new data to feathers app 1 (mysql) you can :
on response of the data created post the same data to feathers app 2 (elasticsearch)
on error abort and correct
or
add a service('your_post_service').on('created', ... and then post data to feathers app 2 (elasticearch)
My client asked me to develop a authenticated restful PHP Api which will read mysql query as a request and sends result set as a json response. But this api should allow to read only select queries.If any query with update/drop/truncate etc .. then it should through some error message like no permission etc.. But is it possible to read mysql queries as a query string ? Any help / suggestions would be greatly appreciated.
Very new to mule esb. I am trying to retrive json response from http request connector and then inserting it into db. Not sure why I am not able to fetch the values when I am inserting it into DB.
Getting the following error while inserting into database:
Execution of the expression
"message.payload.Data.MissingItems.Institution" failed.
(org.mule.api.expression.ExpressionRuntimeException).
My conf file
Put a debugger before foreach and inside foreach and see how the values are being stored inside the map.Run the application in debug mode and see the structure of the payload using mule expression language.You can find out the option inside the debugger.There you can put #[message.payload] or #[message.payload.Data] or #[message.payload.Data.MissingItems] to check the structure of the message.It will also help you to understand if the issue is related to transformation or anything else.
I am using jsonplaceholder (http://jsonplaceholder.typicode.com/) locally. I am testing my GET and POST calls via extjs rest proxy.
I am able to read data. But when I create a model object and save it, the HTTp code for option is 204 and for POST is 200
BUT data is not stored in database of jsonplaceholder local server.
Any Idea where actual problem exists?
I have worked with json-server and this is the expected results and for your knowledge, here is a detailed explanation of HTTP Status codes Status Code Definitions.