# API call response

**URL:** <https://developer.sailpoint.com/discuss/t/api-call-response/18355>\
**Category:** SHF Discussion and Questions\
**Tags:** apis, sailpoint-identity-security\
**Created:** [September 29, 2023, 5:01am UTC](https://developer.sailpoint.com/discuss/t/api-call-response/18355 "2023-09-29T05:01:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![chandramohans27](https://avatars.discourse-cdn.com/v4/letter/c/82dd89/32.png) [@chandramohans27](https://developer.sailpoint.com/discuss/u/chandramohans27)\
**Post date:** [September 29, 2023, 5:01am UTC](https://developer.sailpoint.com/discuss/t/api-call-response/18355/1 "2023-09-29T05:01:16Z")

</div>

HI Experts,

when we do APi calls from powershell, We see issue intermittent like 504 (Gateway Timeout). it seems this error happens because of delay in response from the server than expected… how can we fix this because we have customized powershell scripts to do APIs…

---

<div class="post-metadata">

**Author:** ![gauravsajwan1](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/gauravsajwan1/32/7856_2.png) [@gauravsajwan1](https://developer.sailpoint.com/discuss/u/gauravsajwan1)\
**Post date:** [September 29, 2023, 7:36am UTC](https://developer.sailpoint.com/discuss/t/api-call-response/18355/2 "2023-09-29T07:36:49Z")

</div>

Hi @chandramohans27 , I believe the error is coming from within the customer network. Did you already check with your network/firewall team?

Also, I hope you have whitelisted the target url that you are trying to hit from the server hosting your custom PowerShell script.

---

<div class="post-metadata">

**Author:** ![chandramohans27](https://avatars.discourse-cdn.com/v4/letter/c/82dd89/32.png) [@chandramohans27](https://developer.sailpoint.com/discuss/u/chandramohans27)\
**Post date:** [September 29, 2023, 8:08am UTC](https://developer.sailpoint.com/discuss/t/api-call-response/18355/3 "2023-09-29T08:08:26Z")

</div>

Hi @gauravsajwan1

I see this error intermittently for few minutes… Later it worked… You mean to say the network could have been not stable, so this need to be addressed with network team.

---

<div class="post-metadata">

**Author:** ![gauravsajwan1](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/gauravsajwan1/32/7856_2.png) [@gauravsajwan1](https://developer.sailpoint.com/discuss/u/gauravsajwan1)\
**Post date:** [September 29, 2023, 10:53am UTC](https://developer.sailpoint.com/discuss/t/api-call-response/18355/4 "2023-09-29T10:53:50Z")

</div>

Yes since the server where your PowerShell script is running is within customer network, it’s always good to validate the firewall rules are properly placed + network connectivity is working fine, as it can be a problem if it happens in Production with intermittent behavior.

Also, increasing timeout + adding retries on your API call is another option worth trying if it resolves.

---

<div class="post-metadata">

**Author:** ![edmarks](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/edmarks/32/2896_2.png) [@edmarks](https://developer.sailpoint.com/discuss/u/edmarks)\
**Post date:** [September 29, 2023, 2:40pm UTC](https://developer.sailpoint.com/discuss/t/api-call-response/18355/5 "2023-09-29T14:40:55Z")

</div>

Agree with this being “standard error handling” which many of us (me included) don’t always include in our PowerShell scripting assuming things are ALWAYS going to work as expected.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [November 28, 2023, 2:41pm UTC](https://developer.sailpoint.com/discuss/t/api-call-response/18355/6 "2023-11-28T14:41:04Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
