For context, here is what I am doing. I run the learning environment in our company and we have a number of hands-on sections where folks can try working with the product. When they complete the section, the LTI service that I wrote will assess whether they have completed the tasks by interrogating their account using our API. The LTI service uses AWS Lambda and Step Functions and has been the topic of a couple of my talks at AWS re:Invent and other conferences.
So recently we started implementing a hosted lab environment. The labs have a lab id based on an account name and specific scenario id. But I develop the course on my personal Github account, and then when it's complete, move it over to the company Github org. So a course might have 6 or so labs and that means when I move it over, I have to change the lab id 6 times or more. Chances are I am going to miss one. So, I want a way to store the first part of the lab id in the course info, such as a custom field, then the scenario id is in the custom parameters. If I have access to those custom fields then when I move from the personal account to the company org, I only have to change the value once. With all that info passed to the LTI, I then generate an embed code that is the contents of the iframe for the External Tool. Then when the student finishes that section, they run a command in the hosted lab environment that again uses the LTI to assess their progress and returns a grade to Totara.
It works really well, I just want to solve this lab ID issue without a second call via the REST api.