Share

Service Status

Website IntegrationService Event SummaryService Availability LEDsGet Event DetailsFollowing a Service EventService Availability

API: Get Current, Future and Past Events

Service status information may be integrated with other websites and devices using 5 APIs shown below.

Details of each API can be found using the following links:

 1 Service Event Summary

 2 Service Availability LEDs

 3 Get Event Details

API: Service Event Summary

Get current and upcoming service status events.

The main feed for the service status website, returns upcoming service events as well as current and recent ones.

 1  Service Event Summary:

http://<serviceview_url>/index.php?AP=service_ap&ACT=ajax_get_events

Parameters

<service_id>†Specify the ID of the service. Omitting this parameter will return events for all services
<public_fg>†Set to yes to only show public events.
<from_dt>†Date to show events from format YYYY-MM-DD
<show_after_date>†If set to yes events after will be returned, otherwise events up to will be returned.
<dt>†Only show events on this date, format YYYY-MM-DD
<page>†The events can be paginated using the <page> and <num_per_page> parameters, otherwise 100 events are returned if not specified.
<num_per_page>†Number of events to return in each page. See <page>
<secret>The value of the SECRET option set in the options setup section.

† Optional parameter

Returns

Data is returned JSON encoded in a format suitable for the Datatables jQuery plugin but can be used for other purposes:

sEchoUsed internally by Datatables
iTotalRecordsUsed internally by Datatables
iTotalDisplayRecordsUsed internally by Datatables
aaDataThe returned data with the following fields:
event_idID of event used when subscribing to events.
service_nameService name
descriptionEvent description
service_availability_cd Code indicating whether service was available during the event:
1 - Service NOT available during period
2 - Reduced service delivery during period
3 - No impact on service during period
event_group_id Internal reference to type of event.
2 - Unscheduled Outage
3 - Unscheduled Service Reduction
4 - Scheduled Service Maintenance
5 - Scheduled Service Outage
9 - For Information
start_dtDate & time event started
end_dtDate & time event finished
service_idInternal reference of affected service
event_status_id Current status of event:
1 - Open event
2 - Resolved event
event_nameEvent title
public_fgIf event public or internal only, set to yes for public
event_group_nameType of event


Next >>

API: Service Availability LEDs

The current and upcoming status of service can be viewed using LEDs giving a quick at a glance view of overall service status. This information may be integrated with other websites and devices using the API shown below.

 2  Service Availability LEDs:

http://<serviceview_url>/index.php?AP=service_ap&ACT=ajax_list_public_service_status

Parameters

<future_hours>†The number represents the number of hours to look ahead by for reporting showing future planned outages for services.
<secret>The value of the SECRET option set in the options setup section.

† Optional parameter

Returns

Data is returned JSON encoded in a format suitable for the Datatables jQuery plugin but can be used for other purposes:

service_group_idID of the service group.
service_idID of the service.
service_nameService name
service_group_nameService category or group name
service_descriptionDescription of service
statusCurrent status containing:
color Color for LED light:
Red - outage
Orange - Service reduction
Yellow - Upcoming outage
Green - Service okay
commentComment for status. i.e. Outage in 5 hours
event_idThe event_id causing the non green status
event_nameThe name of the event


Get Event Details

API: Get Event Details

This API is used to pull more details on a specific event.

 3  Get Event Details:

index.php?AP=service_ap&ACT=ajax_get_event&event_id=16165
http://<serviceview_url>/index.php?AP=service_ap&ACT=ajax_get_event&event_id=<event_id>&secret=<secret>

Parameters

<event_id>The unique ID of the event.
<secret>The value of the SECRET option set in the options setup section.

Returns

event_details: {
event_id: "16165",
service_id: "137",
event_status_id: "1",
service_name: "Oracle General Purpose and Web Database Servers (Infrastructure)",
description: "Migrating and upgrading Headshot production database from 11g to 12c.",
service_availability_cd: "1",
event_group_id: "4",
event_group_name: "Scheduled",
start_dt: "2016-02-29 17:05:00",
end_dt: "2016-02-29 19:35:00",
event_name: "Headshot production database 12c upgrade",
public_fg: "yes",
service_availability: "Service NOT available during period"
},
event_annotations: [ ]
}

Comments

The HTTP request can either be sent using a HTTP GET or POST request. Given the description section may be long a HTTP POST is recommended.

 3 Follow Service Events


ServiceView has the ability for people to follow or subscribe to a service status event, informing them when the event is over.


https://<serviceview_url>/get_event.php?ACT=follow_event&secret=<SECRET>&event_id=<EVENTID>&first_name=<FIRSTNAME>&last_name=<LASTNAME>&email_address=<EMAIL>&username=<USERNAME>&mobile=<MOBILE>


Parameters:

<event_id>ID of the event. This parameter is returned from the step 1 API.
<secret>The value of the SECRET.
<first_name>Users first name.
<last_name>Users last name.
<email_address>Email address of the user.
<username>Username of the user.
<mobile>Mobile number of the user, used for SMS alerts.

The HTTP request can either be sent using a HTTP GET or POST request.


Return

If successsful you will get a message saying:

[true,"Successfully Added Follow Event Notification for Service '' and Incident Client <USERNAME> "]

API: Service availability

Service availability information can be retrieved from ServiceView using a HTTP request:

http://<serviceview_url>/index.php?AP=service_ap&ACT=ajax_get_service_availability_period&service_code=<service>&start_dt=<start_dt>&end_dt=<end_dt>&secret=<secret>

Parameters

<service_code>The unique code associated with each service entered from the add or edit service dialog. Alternatrely a service ID can be used by passing in service_id=
<start_dt>Period start date in the format YYYY-MM-DD
<end_dt>Period end date in the format YYYY-MM-DD
<secret>The value of the SECRET option set in the options setup section.

Returns

JSON encoded nulti-dimentional array containing service availabity details and events affecting service availability: