Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Atlassian Jira DC React Application - Rest API assistance

Metricus
Atlassian Partner
April 18, 2023

I have a Forge app written in React that use the storage API to simulate saving into 2 entities (tables).  I need a DC version of the app.  The React component (frontend) is fine.    The backend is where I'm having troublle, due to my lack of experience in Java.

I know how to execute the POST, GET, etc from React, but am not clear on the Java classes/modules required in the backend.   What I'm after is an example of the backend Java Rest API code required to insert  a record into an AO entity with say 3 fields.  The tutorials only work with a GET for all fields.  

Any help would be appreciated

 

1 answer

1 accepted

0 votes
Answer accepted
Aron Gombas _Midori_
Community Champion
April 18, 2023

It may not be the best tutorial, because (due to simplicity) it uses a Java Servlet instead of any mature web framework, but your question was about how can I save an ActiveObjects managed entity object?

And for that, see this code snippet: https://developer.atlassian.com/server/framework/atlassian-sdk/getting-started-with-active-objects/#dopost

You just need to call save() in the right context (in a transaction).

Suggest an answer

Log in or Sign up to answer