Skip to content

Instantly share code, notes, and snippets.

@zahhar
Last active August 29, 2021 11:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zahhar/c1db44489238230b85e66d4ef8f462e5 to your computer and use it in GitHub Desktop.
Save zahhar/c1db44489238230b85e66d4ef8f462e5 to your computer and use it in GitHub Desktop.
Swisscom response examples
//npm init -y
//npm i node-fetch
//node scan.js
import fetch from 'node-fetch';
for(let i = 1000; i < 9999; i++) {
let response = await fetch('https://www.swisscom.ch/outages/guest/?origin=portal&lang=en&zip='+i);
let data = await response.json();
if (data.length > 0) console.log(data);
}
[
{
"id":2318171,
"creationDate":"2021-08-29T11:30:28+02:00",
"startDate":"2021-08-29T11:30:28+02:00",
"type":"INCIDENT",
"title":"Internet, blue TV and Telephony unavailable",
"description":"Some customers in St. Peterzell are currently experiencing interference with Internet access, Swisscom blue TV and landline telephony. We will inform you as soon as the Swisscom services are available again. We apologise for the interruption. Swisscom",
"services":[
"PHONE",
"INTERNET",
"TV"
],
"location":"St. Peterzell",
"state":"RED",
"escalationLevel":"INC",
"topFlag":false,
"nationWide":false,
"isInterrupted":true,
"userAttentionLevel":"HIGH",
"stateDescription":"in progress",
"notificationAllowed":true,
"attributes":[
[
"Object"
],
[
"Object"
]
],
"references":[
[
"Object"
],
[
"Object"
]
],
"workaround":{
"title":"Stay online",
"description":"Use an alternative solution temporarily for the Internet connection.",
"urls":[
"Array"
]
},
"hintNotificationUrl":"/en/residential/help/network-and-service-status.html#outageId=2318171"
},
{
"id":1240472,
"creationDate":"2021-01-02T13:02:41+01:00",
"startDate":"2021-01-02T13:02:41+01:00",
"type":"INCIDENT",
"title":"Internet, blue TV and Telephony available again",
"description":"The problems in Uetendorf have been rectified. All Swisscom services are fully available again. Is Internet access, Swisscom blue TV or landline telephony not working as it should? Please switch off the Internet router and then switch it back on after a couple of seconds. Please accept our apologies for the interruptions. Swisscom",
"services":[
"PHONE",
"INTERNET",
"TV"
],
"location":"Throughout Switzerland",
"state":"GREEN",
"escalationLevel":"INC",
"topFlag":false,
"nationWide":false,
"isInterrupted":false,
"userAttentionLevel":"NORMAL",
"stateDescription":"completed",
"notificationAllowed":false,
"attributes":[
[
"Object"
],
[
"Object"
]
],
"references":[
[
"Object"
]
],
"hintNotificationUrl":"/en/residential/help/network-and-service-status.html#outageId=1240472"
},
{
"id":2282927,
"creationDate":"2021-08-23T10:49:23+02:00",
"startDate":"2021-08-23T06:00:00+02:00",
"type":"CHANGE",
"title":"Restriction of mobile internet in the Grenchenbergtunnel",
"description":"Mobile phone coverage in the Grenchenberg tunnel will be limited between Monday, 23 August 2021 and Saturday, 11 September 2021. During this period, the mobile internet service will not be available in the usual quality during transit. The reason is the replacement of the mobile radio systems by BLS. After completion of the work, passengers will be able to benefit from a significantly higher bandwidth.",
"services":[
"MOBILE"
],
"location":"Grenchen, Moutier",
"state":"RED",
"topFlag":false,
"nationWide":false,
"isInterrupted":false,
"userAttentionLevel":"NORMAL",
"stateDescription":"in progress",
"notificationAllowed":false,
"attributes":[
[
"Object"
],
[
"Object"
]
],
"references":[
],
"hintNotificationUrl":"/en/residential/help/network-and-service-status.html#outageId=2282927"
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment