<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Different way to expire Web API</title><link>https://community.appian.com/discussions/f/general/34039/different-way-to-expire-web-api</link><description>Hi Team, 
 I&amp;#39;m using API Key approach to access web api, is there a automated way to disable the web API to show error between 4pm to 8pm. Is there a approach to do that?</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Different way to expire Web API</title><link>https://community.appian.com/thread/129461?ContentTypeID=1</link><pubDate>Wed, 14 Feb 2024 06:26:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:728b5e58-e484-4150-a7f9-40f45e57c12d</guid><dc:creator>Harshit Bumb (Appyzie)</dc:creator><description>&lt;p&gt;You can add this&amp;nbsp;logic&amp;nbsp;in the API to only execute the action between the time you want it.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;if(
  and(
    now() &amp;gt; time(16, 00, 00, 00),
    now() &amp;lt; time(18, 00, 00, 00)
  ),
  a!httpResponse(
    statusCode: 200,
    headers: {},
    body: &amp;quot;Hello World&amp;quot;
  ),
  a!httpResponse(
    statusCode: 503,
    headers: {},
    body: &amp;quot;Please try between 4:00 PM and 8:00 PM&amp;quot;
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>