Note that the API call (or the routine that gets the required data) can be made to run only once for the whole test-suite using karate.callSingle(). Because of the last rule above, note that string-concatenation may not work quite the way you expect: Observe how you can achieve string concatenation if you really want, because any valid JavaScript expression can be stuffed within an embedded expression. They seamlessly fit in-line within your test script.