This page provides a step-by-step guide to getting up and running with the API and the most common API plug-in examples.
The following sections cover use of the API on Windows Monitoring Stations. For information on use with Linux Monitoring Stations, contact uptime software Customer Support for platform-specific information. |
Contents
These four steps summarize information from Installing the up.time Controller and API Reference.
Download uptime-controller-installer-1.0
(.exe
or .bin
, depending on your platform) from either the uptime software downloads page, or the Support Portal downloads page.
Save or copy the installer to your up.time Monitoring Station.
To validate that your up.time Controller installation is functioning, in a web browser, enter the following URL, replacing uptimeHostname
with the hostname you normally use to access up.time:
https://<uptimeHostname>:9997/api
Your browser will likely warn you about connecting to an unsigned secure connection. You can acknowledge this error and continue. If you are using Internet Explorer, you may be prompted to save the output of this web page instead of view it. |
If this command functions properly, you will see output similar to the following:
{"databaseHost":"localhost","databaseName":"uptime","databaseVersion":"7.1.0","host":"myup.time","version":"1"} |
Congratulations on correctly configuring a basic up.time Controller installation.
To validate that the controller is configured correctly, attempt to access a protected API endpoint by browsing to a URL similar to the following:
https://<uptimeHostname>:9997/api/v1/elements
If this command works properly, you will be prompted to enter a username and password. Enter valid up.time user credentials. You should now be presented with a large block of text detailing the Elements you have already added to up.time. This is your first successful API call.
The simplest way to deploy API dashboard examples to your Monitoring Station is to use the Plug-in Manager. When the Plug-in Manager is integrated with your Monitoring Station, you can install and manage plug-ins (including pre-made dashboards) that extend up.time's features and compatibility.
The Plug-in Manager is available as a separate download, and first needs to be installed on your Monitoring Station. Like all up.time plug-ins, the installer can be accessed from The Grid. Links to how-to videos, including installation overviews for Windows and Linux platforms, can be found on the main Plug-in Manager page.
After you have installed the Plug-in Manager, you can access it from My Portal in the Monitoring Station web interface, and use it to upload plug-ins including the API examples outlined in the following sections.
Before enabling the drag-and-drop dashboard, ensure you have completed steps 2 and 3 of the Post Installation Steps on Installing the up.time Controller. |
In the Download Files section, click to download the up.timeStatusMapDashboard-<version>.upk
file.
You may need to first acknowledge that you have reviewed and accepted the terms and conditions for using The Grid. |
Once the file has been downloaded, log in to the your up.time Monitoring Station web interface, and navigate to the My Portal panel and click the up.time Plug-in Manager tab.
Click Choose File, then find and select the downloaded up.timeStatusMapDashboard-<version>.upk
file, then click Upload File.
Review the presented summary, then click Install.
To enable a custom tab on the My Portal panel, paste the following into up.time Configuration panel, then click Update:
myportal.custom.tab1.enabled=true myportal.custom.tab1.name=Custom Map Dashboards myportal.custom.tab1.URL=/world_map/ |
On the up.time Monitoring Station, restart the service that manages the up.time Web server functionality (up.time Web Server
on Windows).
Ensure the dashboard can connect to the up.time Controller properly by editing the following two files in the <uptimeDirectory>\GUI\map_dashboard
directory:
(uptime_dir)/GUI/world_map/js/uptime.mapEditor.js (uptime_dir)/GUI/world_map/js/uptime.viewDashboard.js |
Modify the following lines in the aforementioned files, entering the correct user, password, and port, if they have been modified from the default values:
var uptime_host = 'localhost'; var uptime_user = 'admin'; var uptime_pass = 'admin'; var uptime_port = 9997; var uptime_ver = 'v1'; var uptime_ssl = true; var uptime_ui_url = "https://" + uptime_host + ":9999"; |
Test your dashboard configuration by browsing to the following:
http://<uptimeHostname>:<uptimePort>/world_map/manage_dashboards.php
The dashboard management page will be displayed.
You can now add your first dashboard. Click Create New Dashboard to get started. Use the options on the left to change your background image and add up.time Elements. Drag your Element indicators to wherever you would like on the right-hand panel. When you are happy with the layout, give your dashboard a name under #4 on the left-hand panel, then click Save Dashboard.
If this |
Before enabling the mobile-device dashboard, ensure you have completed steps 2 and 3 of the Post Installation Steps on Installing the up.time Controller. |
In the Download Files section, click to download the up.timeMobileDashboard-<version>.upk
file.
You may need to first acknowledge that you have reviewed and accepted the terms and conditions for using The Grid. |
Once the file has been downloaded, log in to the your up.time Monitoring Station web interface, and navigate to the My Portal panel and click the up.time Plug-in Manager tab.
Click Choose File, then find and select the downloaded up.timeMobileDashboard-<version>.upk
file, then click Upload File.
Review the presented summary, then click Install.
Test your dashboard configuration by browsing to the following:
http://<uptimeHostname>:<uptimePort>/mobile
After logging in with your Monitoring Station credentials, you will be presented with the up.time mobile web interface.