Synthetic monitors API - GET a monitor

Gets the properties of the specified monitor, including its JSON script.

This request is an early adopter release and may be changed in non compatible way.

GET
  • Managed https://{your-domain}/e/{your-environment-id}/api/v1/synthetic/monitors/{monitorId}
  • SaaS https://{your-environment-id}.live.dexp.ae/api/v1/synthetic/monitors/{monitorId}

Parameters

Parameter Type Description In Required
monitorId string

The ID of the required synthetic monitor

path required

Response format

Refer to JSON models to find all JSON models that depend on the type of the model.

The SyntheticMonitor object

The synthetic monitor. This is a base object, the exact type depends on the value of the type field.

Element Type Description
entityId string

The entity ID of the monitor.

name string

The name of the monitor.

frequencyMin integer

The frequency of the monitor, in minutes.

You can use one of the following values: 5, 10, 15, 30, and 60.

enabled boolean

The monitor is enabled (true) or disabled (false).

type string

Defines the actual set of fields depending on the value:

BROWSER -> BrowserSyntheticMonitor HTTP -> HttpSyntheticMonitor

createdFrom string

The origin of a monitor

script object

The script of a browser or HTTP monitor.

locations string[]

A list of locations from which the monitor is executed.

To specify a location, use its entity ID.

anomalyDetection AnomalyDetection

Anomaly detection configuration.

tags TagInfo[]

A set of tags assigned to the monitor.

managementZones ManagementZoneDto[]

A set of management zones to which the monitor belongs to.

automaticallyAssignedApps string[]

A set of automatically assigned applications.

manuallyAssignedApps string[]

A set of manually assigned applications.

The ManagementZoneDto object

Element Type Description
id string

Tne ID of the management zone.

name string

The name of the management zone.

The TagInfo object

Tag of a DESK entity.

Element Type Description
context string

The origin of the tag, such as AWS or Cloud Foundry.

Custom tags use the CONTEXTLESS value.

key string

The key of the tag.

Custom tags have the tag value here.

value string

The value of the tag.

Not applicable to custom tags.

The AnomalyDetection object

The anomaly detection configuration.

Element Type Description
outageHandling OutageHandlingPolicy

Outage handling configuration.

loadingTimeThresholds LoadingTimeThresholdsPolicyDto

Performance thresholds configuration.

The LoadingTimeThresholdsPolicyDto object

Performance thresholds configuration.

Element Type Description
enabled boolean

Performance threshold is enabled (true) or disabled (false).

thresholds LoadingTimeThreshold[]

The list of performance threshold rules.

The LoadingTimeThreshold object

The performance threshold rule.

Element Type Description
type string

The type of the threshold: total loading time or action loading time.

valueMs integer

Notify if monitor takes longer than X milliseconds to load.

requestIndex integer

Specify the request to which an ACTION threshold applies.

The OutageHandlingPolicy object

Outage handling configuration.

Element Type Description
globalOutage boolean

When enabled (true), generate a problem and send an alert when the monitor is unavailable at all configured locations.

localOutage boolean

When enabled (true), generate a problem and send an alert when the monitor is unavailable for one or more consecutive runs at any location.

localOutagePolicy LocalOutagePolicy

Local outage handling configuration.

The LocalOutagePolicy object

Local outage handling configuration.

Alert if affectedLocations of locations are unable to access the web application consecutiveRuns times consecutively.

Element Type Description
affectedLocations integer

The number of affected locations to trigger an alert.

consecutiveRuns integer

The number of consecutive fails to trigger an alert.

Example

In this example, the request lists the parameters of the dexp.ae monitor, which is a browser clickpath that navigates to http://www.dexp.ae and signs up for a free trial.

The API token is passed in the Authorization header.

Curl

curl -X GET \
  https://mySampleEnv.live.dexp.ae/api/v1/synthetic/monitors/SYNTHETIC_TEST-0000000000025434 \
  -H 'Authorization: Api-Token abcdefjhij1234567890'

Request URL

https://mySampleEnv.live.dexp.ae/api/v1/synthetic/monitors/SYNTHETIC_TEST-0000000000025434

Response body

{
  "entityId": "SYNTHETIC_TEST-0000000000025434",
  "name": "dexp.ae",
  "frequencyMin": 15,
  "enabled": true,
  "type": "browser",
  "script": {
    "type": "clickpath",
    "version": "1.0",
    "configuration": {
      "device": {
        "deviceName":"Desktop",
        "orientation":"landscape"
      }
    },
    "events": [
      {
        "type":"navigate",
        "description":"Loading of \"http://www.dexp.ae\"",
        "url":"http://www.dexp.ae",
        "wait": {
          "waitFor":"page_complete"
        }
      },
      {
        "type":"click",
        "description":"click on \"Free trial\"",
        "target": {
          "locators": [
            {
              "type":"css",
              "value":"a:contains(\"Free trial\"):eq(1)"
            },
            {
              "type":"css",
              "value":".btn:eq(1)"
            },
            {
              "type":"css",
              "value":"#content div div div div div div div p:nth-child(3) a"
            },
            {
              "type":"css",
              "value":"#content div.homepage-hero-wrapper div.gallery div.flickity-viewport div.flickity-slider div.gallery-cell div.section div.column p.cta--row a.btn:eq(0)"
            }
          ]
        },
        "button": 0,
        "wait": {
          "waitFor":"page_complete"
        }
      }
      {
        "type":"click",
        "description":"click on \"email\"",
        "target": {
          "locators": [
            {
              "type":"css",
              "value":"input[type=\"email\"][name=\"email\"]:eq(0)"
            },
            {
              "type":"dom",
              "value":"document.forms[0][\"email\"]"
            },
            {
              "type":"css",
              "value":".inputfield:eq(0)"
            },
            {
              "type":"css",
              "value":"#content div div:nth-child(2) form:nth-child(9) input:nth-child(3)"
            },
            {
              "type":"css",
              "value":"#content div.section div.tile form.cta input.inputfield:eq(0)"
            }
          ]
        },
        "button":0
      },
      {
        "type":"keystrokes",
        "description":"keystrokes on \"email\"",
        "target":{
          "locators":[
            {
              "type":"css",
              "value":"input[type=\"email\"][name=\"email\"]:eq(0)"
            },
            {
              "type":"dom",
              "value":"document.forms[0][\"email\"]"
            },
            {
              "type":"css",
              "value":".inputfield:eq(0)"
            },
            {
              "type":"css",
              "value":"#content div div:nth-child(2) form:nth-child(9) input:nth-child(3)"
            },
            {
              "type":"css",
              "value":"#content div.section div.tile form.cta input.inputfield:eq(0)"
            }
          ]
        },
        "textValue":"sample@sample.com",
        "masked":false,
        "simulateBlurEvent":true
      },
      {
        "type":"click",
        "description":"click on \"Start free trial\"",
        "target":{
          "locators":[
            {
              "type":"css",
              "value":"input[type=\"submit\"]:eq(0)"
            },
            {
              "type":"dom",
              "value":"document.forms[0][19]"
            },
            {
              "type":"css",
              "value":".btn:eq(1)"
            },
            {
              "type":"css",
              "value":"#content div div:nth-child(2) form:nth-child(9) div:nth-child(22) input"
            },
            {
              "type":"css",
              "value":"#content div.section div.tile form.cta div.cta__formgroup input.btn:eq(0)"
            }
          ]
        },
        "button":0,
        "wait":{
          "waitFor":"page_complete"
        }
      }
    ]
  },
  "locations": [
    "GEOLOCATION-B69A5A40388CC698",
    "GEOLOCATION-A9022AAFA0763F56"
  ],
  "anomalyDetection": {
    "outageHandling": {
      "globalOutage": true,
      "localOutage": false,
      "localOutagePolicy": {
        "affectedLocations": 1,
        "consecutiveRuns": 3
      }
    },
    "loadingTimeThresholds": {
      "enabled": false,
      "thresholds": []
    }
  },
  "tags": [],
  "managementZones": [
    {
      "id": "-7832237287622819191",
      "name": "!!allSynthetic"
    }
  ]
}

Response code

200