Click here to Skip to main content
15,867,944 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I work as a product manager so I have limited technical knowledge. I need to understand the standard API practices.

Scenario: For a newly uploaded financial document, my application runs a parser to identify the portfolio companies. We have a dictionary where we have defined these companies so the parser identifies these as valid companies on the document. But at times, there are companies that are identified as NEW by the parser as they do not exist in the dictionary. In the front end, the user can add this company to the database.

So I need the system to:
1. Search to verify the company does not exist
2. If it does not exist then create the company
3. Create an relationship between the investor and the company

Should all of the above steps be handled in 3 separate APIs or just 1? And why?

Thanks

What I have tried:

Should all of the above steps be handled in 3 separate APIs or just 1? And why?
Posted
Updated 25-Aug-22 22:28pm

1 solution

Yes, and no. It is impossible to answer such a question without a complete understanding of the project and a good knowledge of the existing code. You need to get together with your development team and work out the best way forward.
 
Share this answer
 
Comments
Sarah SI 26-Aug-22 5:53am    
Shouldn't an API be self-contained?
1. The end-points (Search, create company, create relationships) are interdependent and they are flawed individually?
2. IF one endpoint fails then how do we roll back? For instance, creating a relationship? Should we just leave the company in the dictionary when the relationship wasn't created successfully?
3. PErformance: Too many server calls. Each call will do a security check causing more delay in response
Richard MacCutchan 26-Aug-22 7:27am    
Sorry, this is the Quick Answers forum for specific technical questions. You are asking for analysis and design which is beyond its scope.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900