Scheduled Maintenance: Archer Community Temporary Downtime. Learn More here.
2019-02-11 04:01 AM
Hello,
I have written a PowerShell script involving REST API calls to add users to requested Archer groups automatically post business approvals and close the request after user assignment (requests are tracked through an ODA). Now that I have a working solution, I would like to have this invoked through a custom object button (within the record), rather than having it run through a Windows task on a scheduled basis. I know that we can place the script in the Archer server and hit it through the button. Is there any other way apart from placing the script on the server? Ideally, I am looking for a solution (API calls within custom object).
Any thoughts or insights? Please let me know. Thanks.
2019-02-11 04:05 AM
Yes, you can create Custom Object, and place your API code and button there.
However, you must remediate situation of multiple hits by the users, which can potentially DDoS your API.
You need to write in JS, not PS to run it from the record.
You may find some examples here:
Or the best source is here by Jeff Letterman :
2019-02-11 04:10 AM
Thanks Ilya Khen for the prompt response. I have seen Jeff's article already. I will check out for examples in the RSA Archer API Users group. Thanks again for all your help.. Will keep everyone posted on this thread, if i find an example.
Also, will be mindful of the DDOS possibility. Thanks for the heads-up.
2019-02-11 04:14 AM
Anytime
I think, Jeff's API toolbox is more useful, as it contains direct samples for API code. You just need to install it.
2019-02-11 04:17 AM
I guess we have already have it in our instance Ilya Khen. So if i am getting this right, I just have to write a javascript code to make API calls through this application? Please correct me, if i am wrong.
2019-02-11 04:18 AM
Well, yes. Because Custom Object accepts mainly JavaScript
2019-02-11 04:25 AM
Gotcha. I have written couple of JavaScript codes in the past. But haven't tried the above scenario. Do you have any examples for me, wherein we access other Application records and especially invoking the API call through the "Archer Toolbox" record. It sounds like too much of an ask, but any help would be appreciated. Thanks Ilya Khen
2019-02-11 04:29 AM
Well, you should check the implementation behind the API Toolbox, but if you do not want to do so, this might be closer to look for:
Custom Object for On-Demand Data Feed Execution Example Code provided by Scott Hagemeyer
2019-02-11 04:31 AM
Thanks Ilya Khen I will take a look into it.
Thanks a bunch for the prompt responses as always. Happy Archering..!!
2019-02-11 04:32 AM