General notes
Port Monitor provides a REST API for developers. Using this REST API you can integrate Port Monitor into your website, sysadmin scripts, a mobile app... it's up to you!
RESTful
The implementation is conforming to the REST architectural style.
JSON
JSON is used for data-interchange.
SSL only
All request must be done over SSL.
UTF-8 encoding
Every string passed to and from the API needs to be UTF-8 encoded.
Date format
Dates are encoded using ISO 8601. Example date for 1/31/2013 00:00:00 on GMT+2: 2013-01-31T00:00:00+02:00
.
Create your app
Each request must include the param app_key
. Its value identifies your app, so first of all, you need to go to 'New app' and get your own app_key
value.
REST API
Registrations
Register a new user.
https://www.port-monitor.com/api/users/sign-up
Required params:
app_key
user[email]
user[password]
Optional params:
Edit current user.
https://www.port-monitor.com/api/users
Required params:
app_key
auth_token
Optional params:
user[email]
user[password]
Cancel current user account.
https://www.port-monitor.com/api/users
Required params:
app_key
auth_token
Optional params:
Sessions
Log in.
https://www.port-monitor.com/api/users/login
Required params:
app_key
user[email]
user[password]
Optional params:
Log out.
https://www.port-monitor.com/api/users/logout
Required params:
app_key
auth_token
Optional params:
Profile
Show profile.
https://www.port-monitor.com/api/profile
Required params:
app_key
auth_token
Optional params:
Show available languages.
https://www.port-monitor.com/api/profile/languages
Required params:
app_key
auth_token
Optional params:
Show available time zones.
https://www.port-monitor.com/api/profile/time_zones
Required params:
app_key
auth_token
Optional params:
Update profile.
https://www.port-monitor.com/api/profile
Required params:
app_key
auth_token
Optional params:
profile[language]
profile[country]
profile[time_zone]
Groups
List all groups.
https://www.port-monitor.com/api/groups
Required params:
app_key
auth_token
Optional params:
Show group with id [ID].
https://www.port-monitor.com/api/groups/[ID]
Required params:
app_key
auth_token
Optional params:
Create a new group.
https://www.port-monitor.com/api/groups
Required params:
app_key
auth_token
group[name]
Optional params:
Edit group with id [ID].
https://www.port-monitor.com/api/groups/[ID]
Required params:
app_key
auth_token
Optional params:
group[name]
Delete the existing group with id [ID].
https://www.port-monitor.com/api/groups/[ID]
Required params:
app_key
auth_token
Optional params:
Monitors
List all monitors in the group with id [GROUP_ID].
https://www.port-monitor.com/api/groups/[GROUP_ID]/targets
Required params:
app_key
auth_token
Optional params:
List all [TARGETS] monitors in the group with id [GROUP_ID].
[TARGETS] possible values: 'urls', 'custom_ports', 'pings'.
https://www.port-monitor.com/api/groups/[GROUP_ID]/target/[TARGETS]
Required params:
app_key
auth_token
Optional params:
Show monitor with id [ID] in the group with id [GROUP_ID].
https://www.port-monitor.com/api/groups/[GROUP_ID]/targets/[ID]
Required params:
app_key
auth_token
Optional params:
Create a new [TARGET] monitor in the group with id [GROUP_ID].
[TARGETS] possible values: 'urls', 'custom_ports', 'pings'.
[TARGET] possible values: '[target_url]', '[target_custom_port]', '[target_ping]'.
[TARGETS] and [TARGET] type must match. Some optional params possible values required depending on [TARGET] value.
https://www.port-monitor.com/api/groups/[GROUP_ID]/target/[TARGETS]
Required params:
app_key
auth_token
[TARGET][name]
[TARGET][group_id]
Optional params:
[TARGET][url]
[TARGET][host]
[TARGET][port_number]
[TARGET][seconds_between_checks]
[TARGET][timeout]
[TARGET][retries_per_check]
Update monitor with id [ID] in the group with id [GROUP_ID].
[TARGETS] possible values: 'urls', 'custom_ports', 'pings'.
[TARGET] possible values: '[target_url]', '[target_custom_port]', '[target_ping]'.
[TARGETS] and [TARGET] type must match. Some optional params possible values required depending on [TARGET] value.
https://www.port-monitor.com/api/groups/[GROUP_ID]/target/[TARGETS]/[ID]
Required params:
app_key
auth_token
Optional params:
[TARGET][name]
[TARGET][url]
[TARGET][host]
[TARGET][port_number]
[TARGET][seconds_between_checks]
[TARGET][timeout]
[TARGET][retries_per_check]
[TARGET][group_id]
Delete monitor with id [ID] in the group with id [GROUP_ID].
[TARGETS] possible values: 'urls', 'custom_ports', 'pings'.
https://www.port-monitor.com/api/groups/[GROUP_ID]/target/[TARGETS]/[ID]
Required params:
app_key
auth_token
Optional params:
Events
List today events or events in the given date range for all or specified monitors.
'target_ids' param is a list of target ids, comma separated.
https://www.port-monitor.com/api/events
Required params:
app_key
auth_token
Optional params:
date_range[from]
date_range[to]
target_ids
Reports
List today uptime or uptime in the given date range for all or specified monitors.
'target_ids' param is a list of target ids, comma separated.
https://www.port-monitor.com/api/reports/uptimes
Required params:
app_key
auth_token
Optional params:
date_range[from]
date_range[to]
target_ids
List today response times or response times in the given date range for all or specified monitors.
'target_ids' param is a list of monitors ids, comma separated.
https://www.port-monitor.com/api/reports/response_times
Required params:
app_key
auth_token
Optional params:
date_range[from]
date_range[to]
target_ids
Postman sandbox
Postman is a REST Client for Google Chrome. We provide examples covering the full Port Monitor's API. Examples are divided in collections that you can import in to Postman. Modify the examples and try Port Monitor API.
Postman collections:
Support
Don't hesitate to contact us if you find something broken.