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

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting 401 status code (very often) while updating Archer records using Rest API

SriniVadlamudi
Contributor III

Hello Team,

 

Thank you for creating a separate work space for API discussions!

 

I have implemented Archer integration with Service Now and as part of that, am using Archer Rest API to update the records in Archer. The main issue am seeing with Rest API is, while updating the Archer records many times (very often) it is failing to update and getting the status code as "401". 

 

- Using User ID only for this purpose (not using in any other scripts/feeds)

- User ID has Sys Admin role

- Using TerminateSession() method at the end of the program

 

By taking these precautions also, am seeing 401 error response many times while updating the records.  Am trying to update 4 fields in each record every time.

 

Any suggestions to handle this scenario please?

4 REPLIES 4

Anonymous
Not applicable

Srini,

 

Is the /api application under the Archer website set to use anonymous authentication, and does it run in the same App Pool as the Archer website?

Hi Scott,

 

Yes, Archer website was set to use anonymous authentication and it runs in the same App Pool.

 

It is updating records successfully sometimes but failing many times.

 

We execute 'update API script' (If i try to update 20 records every time and 5 fields in each record) for every 30 minutes in a day and it fails 30 times approximately.

Anonymous
Not applicable

An HTTP 401 Unauthorized back is a very specific message, and one that comes from IIS and not the Archer API. That tells me that something with your IIS is not liking what you are doing on occassion.

 

Curious, when it fails is it always around a similar time gap since the last failure and are the failure windows usually a similar length? For example, the first 6 updates covering 3 hours work fine, then the next 2 fail, then it works fine for the next 6 again, then 2 fail, etc and so on?

 

Could be that your IIS or network team doesn't like the traffic you are creating and is blocking you or something. In any case, I'd engage your network teams to look into the 401. They should be able to do packet tracing and other things to see why. I don't believe this is an Archer issue currently.

SudhanRameshwa1
Contributor III

Is this issue resolved? We are having the same issue with ServiceNow Integration.