Our internal API only has one purpose, which is to build up an array of dividends that are to be paid out this year. You, however, can build on this project to save the JSON to a file or database of some type. So, you would only make an internal call once a month to save money on API calls. However, the external role could access the data from your file or database as often as needed.
We already have our controller in place for our dividend calendar API. This security is in place to prevent unauthenticated and unauthorized users from accessing our internalGetDividendCalendar()API endpoint. So, all we have to do now is generate the dividend calendar JSON, which our method will return.
So that you can see what we will be working toward, have a look at the following truncated JSON response:
[{"Mic":"XLON","Ticker":"ABDP","CompanyName":"AB Dynamics PLC","DividendYield...