Forum Topic - FRCAPI Inconsistent responces from API: (4 Items)
   
FRCAPI Inconsistent responces from API  
I've been getting inconsistent responses from the API for the teams list.  Right now, when I try to pull the teams for 
Palmetto using the following call:  2016/teams?eventCode=SCMB&page=1 I get one team back on the system I'm posting from.
 Earlier today I was getting all the teams correctly. If I run the same query from a different machine I get the full 
list.

The same thing happened with the WEEK0 event and at one point, the list of events was only WEEK0 on one system while it 
loaded the full list on another. Is there any idea what's going on? The truncated event list issue was fixed by 
rebooting that machine which makes me wonder if there's an NLB array with one machine that's returning bad data.

Yah, I know, Y'all are busy with your actual jobs making Palmetto work but anything you could do to help would be, 
helpful.
Re: FRCAPI Inconsistent responces from API  
Depending on what you're using to access the API, this may well be caused by the bug I recently logged about how the API
 server is misusing the If-Modified-Since header.  The FMS API is treating it as some sort of filter and only returning 
data newer than that value, when it should be an all-or-nothing response.  If whatever client you're using to access the
 API is sending this header then you will be getting filtered results.  This would explain why it works on other 
computers and after rebooting as well.

The API behavior to filter only new data is nice but they should be using a custom header or query parameter for it 
instead.  The way it is currently implemented will break any HTTP client that does caching as it will expect protocol-
compliant behavior.  You may want to comment on the bug - it might be more severe than the priority I chose for it.
Re: FRCAPI Inconsistent responces from API  
I'm using C# and the .Net 4.6 Windows.Web.Http.HttpClient to make the calls.

The only headers I'm explicitly setting are accept which is set to application/json and authorization which is my auth 
token which obviously works to some extent.

the if-modified-since and if-unmodified-since headers are not set by me and looking at the actual object in the debugger
 are set to null.
Re: FRCAPI Inconsistent responces from API  
I'm not a .NET guy but it sounds like Windows.Web.Http.HttpClient has caching enabled by default:

https://social.msdn.microsoft.com/Forums/en-US/79e98534-5d8e-4879-acbe-7a457ee2a7ad/windowswebhttphttpclient-turn-off-
caching?forum=winappswithcsharp

This isn't uncommon for higher-level HTTP APIs.  In this case the headers may be added automatically later on so seeing 
them as null on your object in the debugger doesn't necessarily mean they're not being used.  If you're interested in 
pursuing this possibility further you could try looking at the actual HTTP transfer using something like Fiddler.