REST API- update data with PUT
Application Type
Traditional Web

I have created two applications  Employee app and Agent app in traditional web for incident tracking. Employee has raised incident and data has been saved in Agent application database. Now agent will taken action on data and update it then data should be saved in Agent database and also the same data should be update in employee database.  i want to perform this with REST API using PUT method. Please find the attached OML file and provide appropriate solution. I stuck here in update operation.

IncidentTrackerAgent.oap

Hello Ajit,

Please used update method in the agent module and check your status Id As well.

This will helps you,

Akshay Deshpande

Hi Ajit,

you need to expose a REST API on the Employee module that will update the Incident entity there.

On the Agent module, you call the exposed API and pass the Incident data as parameter after you update the incident on Agent database.

Regards

I am really thankful to you. Just because of your help. I did it..Thanks Jose. Be in touch always.

Hello Ajit,

I have seen your module one thing I have noticed that you have used the create action so instead of create action you should use Update action that's why it was not updating. So I have modified the application find the Updated OML below.

Regards,

Pavan R

UpdatedIncidentTrackerAgent.oml

please find another oml file here for employee app

IncidentTrackerEmployee.oap

Hi Ajit,

you need to expose a REST API on the Employee module that will update the Incident entity there.

On the Agent module, you call the exposed API and pass the Incident data as parameter after you update the incident on Agent database.

Regards

I am really thankful to you. Just because of your help. I did it..Thanks Jose. Be in touch always.

Hello Ajit,

Please used update method in the agent module and check your status Id As well.

This will helps you,

Akshay Deshpande

Hello Ajit,

I have seen your module one thing I have noticed that you have used the create action so instead of create action you should use Update action that's why it was not updating. So I have modified the application find the Updated OML below.

Regards,

Pavan R

UpdatedIncidentTrackerAgent.oml

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.