You are viewing the new version of the WEDOS OnLine website. I want the original site
Home / API
Developers

Monitoring API

An Application Programming Interface (API) to help users retrieve information about their account, monitoring checks, and their current status. You can integrate our monitoring system into your application or automatically process new events for monitored domains and services.

Protocol
HTTPS
Method
GET
Format
JSON (UTF-8)
Base URL
https://api.wedos.online/mon/
Rate limit
1000 / hour per IP and per user

API activation

Access to the API can be activated in the WEDOS administration, which you reach via client.wedos.com in the details of the specific domain for which you have activated this additional service.

In the administration, choose the Settings -> API Settings section. Activation generates an API key (similar to a password), which you then use for authentication in API communication.

Security note: treat your API credentials like a password. Do not publish them or share them publicly.

Basic information

Communication with the API runs over HTTPS using the GET method. Some methods accept parameters in the URL (GET parameters). All methods return a response as a JSON object and all data is encoded in UTF-8.

Every response carries a requestId entry that uniquely identifies the request. With this identifier we can locate the specific communication in our log if a problem or question arises.

The API is located at https://api.wedos.online/mon/ followed by the name of the specific method. Authentication uses two HTTP headers sent with every request:

HeaderValue
X-Auth-Idyour API key ID
X-Auth-Keyyour API key

The API has the following limits:

  • max. 1000 requests per hour from one IP address
  • max. 1000 requests per hour from one user

Hello World

This is a basic call to a method called ping, which simply checks that the connection and authentication work.

GET https://api.wedos.online/mon/ping

Request

GET /mon/ping HTTP/1.1
Host: api.wedos.online
Accept: application/json
X-Auth-Id: MY_API_KEY_ID
X-Auth-Key: MY_API_KEY

Response

{
    "stamp": 1613393366,
    "time": "2021-02-15 13:49:26",
    "userId": 1000,
    "requestId": "3bb52d4d22.1613393366.2811.82063"
}

On error the HTTP server returns a status code other than 200 and the response body specifies the error: the error code and its description. Example:

{
    "error": {
        "code": "C507",
        "error": "Authentication failed"
    },
    "requestId": "1495544185.1615.8422"
}

Lists, filtering, paging

Some API methods return a list of items (for example checks). These methods share common functions, input parameters and output data. The result always includes the following items:

ItemMeaning
resultsarray of objects with the individual list items
pagepage number (see paging below)
countnumber of returned items
filteredCountnumber of all items that match the current filter
totalCountnumber of all items

Example response (the individual items are omitted here):

{
    "results": [
        ...
    ],
    "page": 1,
    "count": 10,
    "filteredCount": 18,
    "totalCount": 624,
    "requestId": "..."
}

This response means there are 624 items in total for the current user (for example checks), of which 18 match the active filter(s), and the first 10 items were returned (first page, paging after 10 items).

One or more filters can be passed as GET parameters in a list request; only the matching items are returned. List items can be paged, that is returned only in certain ranges. The API allows a maximum of 1000 items per call and the default paging is 100 items.

The following GET parameters control paging and the number of returned items:

ParameterMeaning
pagepage number (default 1)
countnumber of returned items, i.e. page size (default 100)

Example of listing 10 items on the second page (items 11 to 20):

GET https://api.wedos.online/mon/checks?page=2&count=10

Checks list

A method called checks fetches the list of monitored services in your account.

GET https://api.wedos.online/mon/checks

Response example

{
    "results": [
        {
            "ID": 5151,
            "name": "seznam.cz DNSSEC",
            "type": "dnssec",
            "period": 600,
            "fullTarget": "seznam.cz",
            "status": "ok",
            "statusStamp": 1612886736,
            "statusDate": "2021-02-09 16:05:36",
            "createdStamp": 1612886708,
            "createdDate": "2021-02-09 16:05:08",
            "uptime_1d": 100,
            "errorSeconds_1d": 0,
            "avgTime_1d": 0,
            "uptime_7d": 100,
            "errorSeconds_7d": 0,
            "avgTime_7d": 0,
            "uptime_30d": 100,
            "errorSeconds_30d": 0,
            "avgTime_30d": 0,
            "warningsCount": 0
        },
        ...
    ],
    "page": 1,
    "count": 21,
    "filteredCount": 21,
    "totalCount": 21,
    "requestId": "3bb52d4d22.1613394688.5186.82182"
}

You can filter the list by status and/or type, for example:

GET https://api.wedos.online/mon/checks?type=http&status=down

Meaning of the items in the response:

FieldMeaning
IDcheck ID
namecheck name
typecheck type (ping, http, dns, smtp, ...)
periodtest interval (seconds)
fullTargethost/domain name of the target (domain name, server)
statuscurrent check status (ok, slow, response_timeout, down, response_error, disabled, ...)
statusStamplast status change (UNIX timestamp)
statusDatelast status change (SQL format, UTC)
createdStampcheck creation date and time (UNIX timestamp)
createdDatecheck creation date and time (SQL format, UTC)
uptime_1duptime in the last 24 hours (percent)
errorSeconds_1dseconds in error state in the last 24 hours
avgTime_1daverage response time in the last 24 hours (seconds)
uptime_7duptime in the last 7 days (percent)
errorSeconds_7dseconds in error state in the last 7 days
avgTime_7daverage response time in the last 7 days (seconds)
uptime_30duptime in the last 30 days (percent)
errorSeconds_30dseconds in error state in the last 30 days
avgTime_30daverage response time in the last 30 days (seconds)
warningsCountnumber of active warnings

The status can be:

StatusMeaning
unknowntest not performed yet
okeverything is okay
slowresponse was successful, but slow
response_timeoutconnection succeeded, but timed out waiting for a response
downconnection failed
response_errorinvalid response
maintenancecheck is in planned maintenance
pausedcheck is paused, no tests are performed
disabledcheck was disabled by an administrator
deniedthe monitoring system refused to run the test, usually because the target resolves to an IP address in a private range
unverifiedyou did not verify ownership of the website you want to monitor (applies to HTTP checks)
invalidStatusother invalid status of a monitored service

Check detail

A check method shows more details about one particular check (monitored service). You add the check ID to the URL, for example:

GET https://api.wedos.online/mon/check/5151

Response example

{
    "check": {
        "ID": 5151,
        "name": "seznam.cz DNSSEC",
        "type": "dnssec",
        "period": 600,
        "fullTarget": "seznam.cz",
        "status": "ok",
        "statusStamp": 1612886736,
        "statusDate": "2021-02-09 16:05:36",
        "createdStamp": 1612886708,
        "createdDate": "2021-02-09 16:05:08",
        "uptime_1d": 100,
        "errorSeconds_1d": 0,
        "avgTime_1d": 0,
        "uptime_7d": 100,
        "errorSeconds_7d": 0,
        "avgTime_7d": 0,
        "uptime_30d": 100,
        "errorSeconds_30d": 0,
        "avgTime_30d": 0,
        "warningsCount": 0,
        "lastTestStamp": 1613396132,
        "lastTestDate": "2021-02-15 13:35:32",
        "requestTime": null,
        "info": "seznam.cz/SOA secured by DNSSEC\nSignature expiration: 2021-02-28 16:01:01 UTC",
        "testsCount": 363,
        "errorsCount": 0,
        "pendingErrorsCount": 0,
        "lastErrorBeginStamp": null,
        "ip": null,
        "ptr": null,
        "nextStamp": 1613396731,
        "warnings": []
    },
    "requestId": "3bb52d4d22.1613396687.4247.82403"
}

Additional information about the check:

FieldMeaning
lastTestStamptest last performed (UNIX timestamp)
lastTestDatetest last performed (SQL format, UTC)
requestTimeresponse time from the last test (ms), if available
infoadditional information (error message, response details)
testsCountnumber of tests from the very beginning
errorsCountnumber of error results from the very beginning
pendingErrorsCountnumber of current errors
lastErrorBeginStampstart of the current error status (UNIX timestamp)
ipIP address of the target (if available)
ptrreverse record (PTR) of the target (if available)
nextStampapproximate date and time of the next test (UNIX timestamp)
warningsarray of additional warnings (certificate expiration, IP on blocklists, less severe response errors, etc.)

Build it into your stack.

Create an account, add a check and generate your API key in a couple of minutes.

Start free