Question

statusCode: 406 when testing message-store-report API

  • 19 February 2021
  • 2 replies
  • 560 views

Hello,

I am implementing message archiving using the message-store-report API and have successfully used the calls to create and download the zipped archive files. I am now setting up an automated process to do this on a schedule but in testing this I'm getting the response below on the final call to download the zip files. Have I just run the test too many times and been cut off for a bit? Any help would be appreciated, thanks!

/restapi/v1.0/account/~/message-store-report/688574005-688574005-8ad16417af6445f3bac4801a2ca14c3d/archive/0

(Including a header of accept: application/zip)


Response:

{

"statusCode": 406,

"headers": {

"Pragma": "no-cache",

"X-XSS-Protection": "1; mode=block",

"X-Frame-Options": "DENY",

"X-Content-Type-Options": "nosniff",

"X-Rate-Limit-Group": "heavy",

"X-Rate-Limit-Limit": "10",

"X-Rate-Limit-Remaining": "4",

"X-Rate-Limit-Window": "60",

"RoutingKey": "SJC11P01",

"RCRequestId": "0d9c7c8a-72f4-11eb-b299-005056bb4f35",

"Cache-Control": "no-store, must-revalidate, no-cache, max-age=0",

"Date": "Fri, 19 Feb 2021 20:50:08 GMT",

"Content-Length": "0",

"Expires": "0"

}

}


2 replies

Userlevel 1

Based on the response, it was not the API rate limit because you still have 4 remaining for that 60 secs window.

How often do you receive this? How often do you export? Have you tested with a longer exporting period?

@Phong Vu I was getting this every time I called for the archive files. We were still testing so frequency of export was inconsistent and after reading your response I tested a 180 day period with same error.

Today I looked back at the successful calls I had made that were setup differently than this current solution and noticed I had left out the "accept application/zip" header. I took that out of this solution and it worked again, returning the binary archives with a 200 response!

I'm not sure why leaving out the header works but it seems fine for now! Just FYI, in this solution I have created custom Logic App connectors for these APIs in Azure to be used in Logic Apps.

Reply