Details for code studio api_call() function

Has anyone got any documentation for using api_call() function in code studio?
I have looked through forum/docs but cant see anything.

I have been able to fire the API using a code studio reference as shown
let response = cs.api_call(cs.ref('api_call_ms_graph_get_all_users'), record_id);

I can’t figure out how I can access the api_response_payload from code studio.

In monitor studio I can see the API Requests, with its ID and api_response_payload.

I would like to create the API’s in Netcall, and call them from code studio rather than using curl in code studio to fire the API’s, as would seem a cleaner way to implement for me personally.

Thanks
JonathanFS

Hi Jonathan,

let response = cs.api_call(cs.ref(‘api_call_ms_graph_get_all_users’), record_id);

let payload = response.get(‘:api_response_payload’);

Then manipulate payload as you see fit.

Hope that helps :slightly_smiling_face:

John

1 Like

That’s exactly what I wanted to know,
Many Thanks
JonathanFS

1 Like