yilu | 2024-02-27 02:20:31 UTC | #1
Hi,
I'm trying to get platform status as shown on https://status.mypurecloud.com/
I tried to find an API for it but had no luck. Just want to double check here is there a way to get this data from an API (whether platform is operational in a certain region) ?
Kind Regards, Yi
plmcgrn | 2024-02-27 04:08:31 UTC | #2
status.mypurecloud.com is powered by Atlassian StatusPage. They do have a public API, which you can find documented here: https://metastatuspage.com/api#status
You'd just replace their FQDN with status.mypurecloud.com .
Just note, Genesys has a LOT of components, as they roll the entire global deployment into a single StatusPage public-facing page. You're probably going to have to reverse engineer the data to extract only the region(s) and services you care about. If you only care about incidents, it's a bit easier, since that'll be a much smaller list of items.
The structure they use for Components is like this:
- Service Name (ex. "Platform")
* Region Name 1 (ex. US East 2) * Region Name 2 (ex. US West 1) ** All other regions
So you would need to pull each service's component, and then look at the components inside that to find out the names of the regions, to then look at that one. You can do this in a single API call and do all the processing locally, though, which makes it efficient to work with, at least.
I mostly write in PowerShell, so I threw this together, which gets every service status for the US East region.
#get all data in one shot
$response = invoke-restmethod 'https://status.mypurecloud.com/api/v2/summary.json'
#get the top level components, ex. Platform, Fax, Documents, etc.
$components = $response.components | Where-Object group -eq $true
#get just the components for US East
$east = $response.components | Where-Object name -like "*US East*"
#map the service name to each component and add as a property (StatusPage only uses ID's by default)
foreach($c in $east){
$servicename = ($components | where-object id -eq $c.group_id).name
$c | Add-Member -NotePropertyName group_name -NotePropertyValue $servicename -Force
}
#sort and print the output as a table (just the stuff in US East)
$east | Sort-Object -Property group_name | Select-Object -Property group_name,status | format-table
That'll output like this:
group_name status
---------- ------
ACD Routing operational
Chat operational
Co-Browse operational
Data Sync Integrations operational
Directory operational
Documents operational
Email operational
Fax operational
GenesysCloud Soft Phone operational
Inbound Calls operational
IVR operational
Login operational
Outbound Calls operational
Platform operational
Quality Management operational
Recording operational
Reporting operational
Screen Share operational
Scripts operational
Social operational
Video operational
Voicemail operational
Workforce Optimization operational
yilu | 2024-03-13 03:06:48 UTC | #3
plmcgrn, post:2, topic:24885
https://status.mypurecloud.com/api/v2/summary.json
Thanks for the detailed reply! This is exactly what I need.
Much appreciated.
Dileepkaranki | 2024-04-08 15:46:02 UTC | #4
Could you also explain the steps for .NET SDK
tim.smith | 2024-04-08 15:50:25 UTC | #5
This isn't part of the Platform API SDK as it's not part of the platform. This is a service external to Genesys Cloud. To get that JSON file in your .NET app, just do it the normal way for making a HTTP request. If you're not familiar with how to do that, I'd recommend searching google/stackoverflow for something like "C# how to download JSON file from URL".
Dileepkaranki | 2024-04-08 15:54:13 UTC | #6
I understood this step and know the steps make http request in C# or VB.Net and able to get response but not clear with rest of the steps
plmcgrn, post:2, topic:24885
$response = invoke-restmethod 'https://status.mypurecloud.com/api/v2/summary.json'
tim.smith | 2024-04-08 15:57:57 UTC | #7
The code that was shared appears to be very well commented. Which step are you struggling with? We don't offer consultation to walk you through general programming tasks here, that would be something you would hire PS for. But if you can ask a pointed question, I can try to answer it for you.
Dileepkaranki | 2024-04-08 17:11:49 UTC | #8
This is the peace of code to get status of genesys cloud services in C# But how do we check operational status for Genesys platform Api status . Should we refer to platform service?
using System.Text.Json;
namespace GCStatusPOC
{
public class StatusAPI
{
public async Task GetStatus(string region = "US East")
{
// Make HTTP request to the API
HttpClient client = new HttpClient();
StatusSummary response = await client.GetFromJsonAsync("https://status.mypurecloud.com/api/v2/summary.json");
// Filter components for US East
List<Component> eastComponents = response?.Components.Where(c => c.Name.Contains(region)).ToList();
// Get top level components
List<Component> topLevelComponents = response.Components.Where(c => c.Group.Value).ToList();
// Map service name to each component
foreach (Component c in eastComponents)
{
string? serviceName = topLevelComponents.FirstOrDefault(tc => tc.Id == c.group_id)?.Name;
if (!string.IsNullOrWhiteSpace(serviceName))
{
c.GroupName = serviceName;
}
}
// Sort and print the output as a table
eastComponents = eastComponents.OrderBy(c => c.GroupName).ToList();
foreach (Component c in eastComponents)
{
Console.WriteLine($"Service: {c.GroupName} service status in {region} region is {c.Status} ");
}
}
}
public class StatusSummary
{
public List<Component>? Components { get; set; }
}
public class Component
{
public string? Id { get; set; }
public string? Name { get; set; }
public bool? Group { get; set; }
public string? group_id { get; set; }
public string? Status { get; set; }
public string? GroupName { get; set; }
}
}
tim.smith | 2024-04-08 17:17:47 UTC | #9
Dileepkaranki, post:8, topic:24885
But how do we check operational status for Genesys platform Api status
That would be "platform"
Dileepkaranki | 2024-04-08 17:46:09 UTC | #10
Thanks for letting me know and my last query regarding this https://status.mypurecloud.com/api/v2/summary.json Api response is I see scheduledmaintenances array property in the response. Could you provide information related to the scheduledmaintenances properties or some documentation regarding it or sample json response related to scheduled_maintenances.
tim.smith | 2024-04-08 17:53:31 UTC | #11
I can't find any documentation from Atlassian about that property, but it's unused AFAIK. Genesys Cloud doesn't have scheduled downtime; we use a continuous delivery model: https://help.mypurecloud.com/articles/continuous-delivery/.
tim.smith | 2024-04-08 18:20:56 UTC | #12
@Dileepkaranki I checked with our release management team just to be sure, and it turns out we do actually use the scheduled maintenances as it mentions on the continuous delivery resource center page. It's just so rare I've never heard of it happening.
I couldn't find any documentation from Atlassian to help you understand what to expect in the scheduled_maintenances API property though. If you contact Atlassian's customer support, they may be able to provide you with the documentation for their status page api. I tried looking on google, but the only things I could find were for a v1 statuspage.io API that looks nothing like what's returned from https://status.mypurecloud.com/api/v2/summary.json. I would recommend putting something in your integration that will alert you if there's ever anything more than an empty array there so you can take a look at it and build something to handle it.
Dileepkaranki | 2024-04-09 14:01:28 UTC | #13
I created a Forum in attlassian community will let you know if i get some response.
yilu | 2024-04-09 23:42:02 UTC | #15
Hi @Dileepkaranki
Here is some information I found about scheduled maintenance that you might find useful: https://support.atlassian.com/statuspage/docs/schedule-maintenance/#Maintenance-fields
Dileepkaranki | 2024-04-11 15:50:13 UTC | #16
Got response from Attlassian community regarding scheduled_maintenances schema. Steps are mentioned below
- Browse https://status.mypurecloud.com/api#scheduled-maintenances-all
- Then go to All scheduled maintenances
- click for example and schema will be shown.
Thanks and Regards Dileepkaranki
system | 2024-05-11 15:48:25 UTC | #17
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 24885