问题
Whenever I send an API call to get the Current Status of the Service Health of Office 365, the last update is always exactly 24 hours behind.
I saw this referenced here but the answer to the question was nonsense, so I will try it here.
Example code in PowerShell
Invoke-RestMethod "https://manage.office.com/api/v1.0/$tenantid/ServiceComms/CurrentStatus" -Headers $officeapiheader
If the current time is 2019-10-17T05:18:25.469735Z
The StatusTime field returned is 2019-10-16T05:18:25.469735Z
which is full 24 hours behind.
- By any chance am I making a mistake in my calls?
- Is it as I assume, that, it is actually the current status and only the datetime is wrong?
- What can I do to address this?
回答1:
From endpoint description (emphasis mine):
The service response will contain the status and any incidents within the previous 24 hours. The StatusDate or StatusTime value returned will be exactly 24 hours in the past. To get the last update for a particular incident, use the Get Messages functionality and read the LastUpdatedTime value from the response record that matches your incident ID.
Conclusion: The behavior you described is by design.
Details
From my checking it seems like that endpoint show all incidents/advisories ongoing within last 24 hours. For example now (17th of October, 23:00) I can see the following incidents with following dates:
- Last updated: October 17, 2019 9:18 PM; Start time: August 30, 2019 9:00 PM
- Last updated: October 17, 2019 7:00 PM; Start time: September 25, 2019 2:00 AM
Start time: October 17, 2019 2:13 PM; End time: October 17, 2019 3:00 PM
That one is already resolved so in Admin Portal it can be found in 'History' tab.
Last updated: October 14, 2019 10:58 PM; Start time: October 14, 2019 9:23 PM
That one wasn't updated in last 24 hours but it's still visible
Conclusion
Based on above examples, it means that items which are still not closed + items which were closed between now and 24h ago are displayed. So it's not the current, but it's not the state from yesterday.
来源:https://stackoverflow.com/questions/58425506/office-365-service-health-last-update-is-24-hours-ago