Limit the number of API calls to Autosys
search cancel

Limit the number of API calls to Autosys

book

Article ID: 432068

calendar_today

Updated On:

Products

Autosys Workload Automation

Issue/Introduction

We are trying to pull data from autosys into a 3rd party application for a metrics and dashboard purposes.

We want to know whether we can limit the number of API calls to Autosys from that tool as we suspect in future it may trigger unlimited API calls which may overload Autosys webservices.

Resolution

With 24.1, the REST web server supports SAML tokens, that the controls can be put in place via SAML provider based restrictions as well.  But this doesn't apply to previous releases (24.0.x and below)

What you can try something similar to the following example. 

Edit the $AUTOUSER/webserver/conf/web.xml

(under the filter section)

<filter>
        <filter-name>RateLimitFilter</filter-name>
        <filter-class>org.apache.catalina.filters.RateLimitFilter</filter-class>
        <init-param>
            <param-name>bucketRequests</param-name>
            <param-value>10</param-value>
        </init-param>
        <init-param>
            <param-name>enforce</param-name>
            <param-value>true</param-value>
        </init-param>
        <init-param>
            <param-name>bucketDuration</param-name>
            <param-value>60</param-value>
        </init-param>
</filter>

Within the same file ($AUTOUSER/webserver/conf/web.xml)
(under filter-mapping section)

<filter-mapping>
    <filter-name>RateLimitFilter</filter-name>
    <url-pattern>*</url-pattern>
</filter-mapping>
 

Please note that this applies globally. So if you have users as well as jobs that use AutoSys REST API, the limit is enforced at the value noted in bucketRequests. The 11th connection attempt and beyond would get an error indicating that the maximum number of requests has been exceeded.