Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have an output from tWriteJSONField component such as:
|{"username":"A.Apple","email":"Andres.Apple@test.edu"}
|{"username":"desri_tst","email":"desri@test.edu"}
I have to use that in calling API with tRESTClient component where the url should be:
context.RestAPI_URL + "community/users/" + <username from the JSON list above> + "/disable/"
I also have "token" in the Query parameters.
I am not familiar as to how to 'plug' the username from the JSON into the URL string
Thank you
PS: I have tested this in postman, and the API call works
https://<targetURL>/community/users/desri_tst/disable?token=Lrlj78tt9vrEY3cuVSCGKhpPDag_6HEoJb5pCe8q_x3UnFtzpMKHXr-uLM3zeo6n9RxSOLo8GOigPXQqBZOk5CZJIBUDa9YjRc-egn6Qu42kcOS-ZkJtNFe8u5FY5lx4srkgQcT53aGSfeh6u..
(I have edited the token value above for security)
Based on the example you provided in Postman, it appears that you only need the username value ("desri_tst") and not the entire JSON string. If that's the case, why did you use a tWriteJsonField to write a JSON string? Can you please explain this?
If you only need the username in tRestClient component, you can use tFlowToIiterate to iterate and call the API for each username, eg:
...tlogRow3--main(row9)--tFlowToIterate--iterate--tRestClient.
on tRestClient, set the URL as:
context.RestAPI_URL + "community/users/" + (String)globalMap.get("row9.username“)+ "/disable/"
Regards
Shong
Based on the example you provided in Postman, it appears that you only need the username value ("desri_tst") and not the entire JSON string. If that's the case, why did you use a tWriteJsonField to write a JSON string? Can you please explain this?
If you only need the username in tRestClient component, you can use tFlowToIiterate to iterate and call the API for each username, eg:
...tlogRow3--main(row9)--tFlowToIterate--iterate--tRestClient.
on tRestClient, set the URL as:
context.RestAPI_URL + "community/users/" + (String)globalMap.get("row9.username“)+ "/disable/"
Regards
Shong
Hi,
Yes I did that route and have been able to make it work as intended.
Thank you.