Important Update: Some Community URL Redirects are Under Maintenance. Learn More. .

cancel
Showing results for 
Search instead for 
Did you mean: 

API Calls within Custom Objects

Arun.Prasad
Advocate II

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.

 

Scott HagemeyerDavid PettyIlya Khen

13 REPLIES 13

Ilya_Khen
Champion III

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:

RSA Archer API Users 

 

Or the best source is here by Jeff Letterman :

Archer API Templates application - An Archer application to quickly test the Archer Web Services API and REST API using … 

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.

Anytime

 

I think, Jeff's API toolbox is more useful, as it contains direct samples for API code. You just need to install it.

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.

Well, yes. Because Custom Object accepts mainly JavaScript

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

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 

Thanks Ilya Khen I will take a look into it.

 

Thanks a bunch for the prompt responses as always. Happy Archering..!!