what API can I use to get the highest status on all components in my page?
Asked by Anat Dror:

Hi,

Using the <https://status.foglightcloud.com/api/v2/status.json> API I am getting status of "major" even if the status is critical.  
we correctly get it when status is indeed major, but cannot distinguish between that and critical.

should we use a different API?

Thanks

Anat


Answers:
author: Alan Violada
body: Hey Anat, Alan from the Statuspage Support team here.

Here is how the top-level status calculation works:

[Top-level status and incident impact calculations](https://support.atlassian.com/statuspage/docs/top-level-status-and-incident-impact-calculations/)
>
> ### How is top-level status calculated? {#toc-hId-2088248984}
>
> Top level status gets calculated automatically according to the state each component is in. In general, we look at the status of all components on the page and apply the top-level status according to the state the page's components are in. Let's take a closer look at how we calculate this...
>
> **For pages with 0 components**
>
> Top level status will always be All Systems Operational (unless there is an active incident).
>
> **For pages with 1 component**
>
> * If the component status is 'Operational', top-level status will read 'All Systems Operational'
>
> * If the component status is 'Under Maintenance', top-level status will read 'Service Under Maintenance'
>
> * If the component status is 'Degraded Performance', top-level status will read 'Partially Degraded Service'
>
> * If the component status is 'Partial Outage', top-level status will read 'Partial System Outage'
>
> * If the component status is 'Major Outage', top-level status will read 'Major System Outage'
>
> **For pages with 2 or more components**
>
> Here we make a best effort to blend the status of all of the components on your page. We use the following decision tree logic to calculate top level status:
>
> * If *all* components have a status of 'Operational', top-level status will read 'All Systems Operational'
>
> * If *all* components have a status of 'Major Outage', top-level status will read 'Major System Outage'
>
> * If *all* components have a status of 'Partial Outage', top-level status will read 'Partial System Outage'
>
> * If *any* components have a status of 'Major Outage', top-level status will read 'Partial System Outage'
>
> * If *any* components have a status of 'Partial Outage', top-level status will read 'Minor Service Outage'
>
> * If *all* components have a status of 'Degraded Performance', top-level status will read 'Degraded System Service'
>
> * If *any* components have a status of 'Degraded Performance', top-level status will read 'Partially Degraded Service'
>
> * If *any* components have a status of 'Under Maintenance', top-level status will read 'System Under Maintenance'
>
> After every component change, we'll check to see if top level status needs to be updated. The top-level status will be automatically updated based on the status of the components.

So essentially, for a page that has 2 or more components, the indicator will only be "critical" and the description "Major System Outage" when all components in the page are in a "Major outage" status.