API for service availability/contact center availability

is there any API to know whether a service and/or the contact center is available or not (Need to know when Contact center is closed or the service is closed for some reason)

You could leverage the real-time statistics API to get a logged in Agent count for the Service and if it is less than 1 then assume closed.

Here is an example of a subscription I created for my tenant. Section 1 is the Agent grid. It is an empty array because I have no one logged in at this time.

{
“1”: {
“agent_grids”: [
{
“id”: “1”,
“values”:
}
]
},
“2”: {
“stats_totals”: {
“in_calls_waiting”: “0”
}
},
“3”: {
“stats_totals”: {
“in_calls_in_ivr”: “0”,
“in_callbacks_waiting”: “0”,
“in_calls_active_on_agents”: “0”,
“out_calls_active_on_agents”: “0”,
“out_calls_in_progress”: “0”,
“in_average_speed_of_answer”: “”,
“in_calls_in_progress”: “0”
}
}
}

and here is an example after I login an agent in.

{
“1”: {
“agent_grids”: [
{
“id”: “1”,
“values”: [
{
“1”: “Derek Greenwood”,
“2”: “1004”,
“3”: “not_ready”,
“4”: “51”,
“5”: “not_ready”,
“6”: null,
“7”: null,
“8”: null,
“9”: null,
“10”: null
}
]
}
]
},
“2”: {
“stats_totals”: {
“in_calls_waiting”: “0”
}
},
“3”: {
“stats_totals”: {
“in_calls_in_ivr”: “0”,
“in_callbacks_waiting”: “0”,
“in_calls_active_on_agents”: “0”,
“out_calls_active_on_agents”: “0”,
“out_calls_in_progress”: “0”,
“in_average_speed_of_answer”: “”,
“in_calls_in_progress”: “0”
}
}
}

Here is a link to the API docs: 5.8:Real-time-statistics-api/ListofStatistics - Bright Pattern Documentation