sensor

Create a sensor check

Authentication required for this operation.<br>Preconditions:<ul> <li>Authenticated user has to be editor or owner of the organization, or be an admin in the platform.</li> <li>Check owner is same as authenticated user, or the authenticated user is an owner within the organization or an admin.</li> <li>The check owner has to be part of the organization</li> <li>The check id will be generated and the whole new saved sensor check is returned.</li></ul>

post/sensor/{sensorId}

Request

  • Base URL: https://api.30mhz.com/api
  • URL: https://api.30mhz.com/api/sensor/{sensorId}
  • Auth: API key in header Authorization

Path parameters

sensorIdstring required

Request body

allowRedirectsboolean

Whether to follow redirects when a page returns HTTP code 302. Default is false.

calculationIdstring

The id of the calculation called by the webcheck

collectJsonboolean

If the recollection of the JSON object has to be effectuated or not

conditionalstring

A javascript expression that is applied to the json result and has to evaluate to true for the data source to be UP.

containsstring

Verify that the page returned contains this text, otherwise the data source will be reported as DOWN.

containsNotstring

Verify that the page returned does NOT contain this text, if it does, the data source will be reported as DOWN.

cookiesstring

Send these cookies in each request when pinging the data source. You can use this, for example, for adding authentication data.

cronstring

Only run this data source in the given schedule. This is written in Unix-like notation. For example, to run it only weekdays 8 to 17, write '* * 8-17 ? * MON-FRI'

datastring

Payload to send, usually for POST or PUT methods

decimalsPerFieldobject

The number of decimals used for each field of the data source.

descriptionstring

Brief description that elaborates on the name

enabledboolean

Whether the data source is enabled.

frequencyinteger

The frequency with which the data source is pinged, in seconds.

gatewayIdstring

Identifier of the gateway the data source belongs to.

headersstring

Send these HTTP headers in each request when pinging the data source. You can use this, for example, for adding authentication data.

healthyThresholdinteger

How many consecutive successful responses indicate that the data source is up.

locationThresholdinteger

How many locations indicate the data source is up/down.

locationsstring[]

From which locations to ping the data source from.

maxDecimalsinteger

Max decimals for fields of the data source.

maxRemindersinteger

The maximum number of times you want to be notified if DOWN.

methodstring

HTTP method (get/post/put/delete) to user for pinging the data source

namestring

Displayable name.

organizationIdstring

Identifier of the organization this data source belongs to.

paramsstring

Send these HTTP parameters in each request when pinging the data source.

remindEveryinteger

Every how many seconds to send another notification if data source is still DOWN. (See also Number of reminders).

sensorTypestring

The sensor type.

siteIdstring

Identifier of the site it belongs to, together with the organizationId this is unique.

status'ACTIVE' | 'DEACTIVATED' | 'PAUSED'

The status of the data source, e.g. ACTIVE, DEACTIVATED or PAUSED.

statusCodesinteger[]

What HTTP status code are expected when pinging the data source. If the received HTTP status is not in this list, the data source will be reported as DOWN.

streamboolean

Whether the stream is enabled for the response validation

tagsstring[]

The tags associated with the data source.

timeoutinteger

How long we wait for the data source to respond before we consider it down.

timezonestring

An area which observes a uniform standard time.

unhealthyThresholdinteger

How many consecutive failed responses indicate that the data source is down.

unitsstring[]

The units associated with the sensor data source.

urlstring

The URL of the data source.

verifyboolean

Whether SSL verification is enabled.

zoneIdstring

Identifier of the zone within a site where the data source belongs.

rangePerJsonKeyobject

Min/max ranges for each json key of the data source.

timezoneOffsetinteger

Offset of the timezone in minutes.

ownerstring

Email address.

Response

New sensor check created, including its generated check id

allowRedirectsboolean

Whether to follow redirects when a page returns HTTP code 302. Default is false.

calculationIdstring

The id of the calculation called by the webcheck

collectJsonboolean

If the recollection of the JSON object has to be effectuated or not

conditionalstring

A javascript expression that is applied to the json result and has to evaluate to true for the data source to be UP.

containsstring

Verify that the page returned contains this text, otherwise the data source will be reported as DOWN.

containsNotstring

Verify that the page returned does NOT contain this text, if it does, the data source will be reported as DOWN.

cookiesstring

Send these cookies in each request when pinging the data source. You can use this, for example, for adding authentication data.

cronstring

Only run this data source in the given schedule. This is written in Unix-like notation. For example, to run it only weekdays 8 to 17, write '* * 8-17 ? * MON-FRI'

datastring

Payload to send, usually for POST or PUT methods

decimalsPerFieldobject

The number of decimals used for each field of the data source.

descriptionstring

Brief description that elaborates on the name

emailstring

Email address.

enabledboolean required

Whether the data source is enabled.

frequencyinteger required

The frequency with which the data source is pinged, in seconds.

gatewayIdstring

Identifier of the gateway the data source belongs to.

headersstring

Send these HTTP headers in each request when pinging the data source. You can use this, for example, for adding authentication data.

healthyThresholdinteger required

How many consecutive successful responses indicate that the data source is up.

locationThresholdinteger required

How many locations indicate the data source is up/down.

locationsstring[]

From which locations to ping the data source from.

maxDecimalsinteger

Max decimals for fields of the data source.

maxRemindersinteger required

The maximum number of times you want to be notified if DOWN.

methodstring required

HTTP method (get/post/put/delete) to user for pinging the data source

namestring required

Displayable name.

organizationIdstring required

Identifier of the organization this data source belongs to.

paramsstring

Send these HTTP parameters in each request when pinging the data source.

remindEveryinteger required

Every how many seconds to send another notification if data source is still DOWN. (See also Number of reminders).

sensorTypestring

The sensor type.

siteIdstring

Identifier of the site it belongs to, together with the organizationId this is unique.

status'ACTIVE' | 'DEACTIVATED' | 'PAUSED'

The status of the data source, e.g. ACTIVE, DEACTIVATED or PAUSED.

statusCodesinteger[] required

What HTTP status code are expected when pinging the data source. If the received HTTP status is not in this list, the data source will be reported as DOWN.

streamboolean

Whether the stream is enabled for the response validation

tagsstring[]

The tags associated with the data source.

timeoutinteger required

How long we wait for the data source to respond before we consider it down.

timezonestring

An area which observes a uniform standard time.

unhealthyThresholdinteger required

How many consecutive failed responses indicate that the data source is down.

unitsstring[]

The units associated with the sensor data source.

urlstring required

The URL of the data source.

verifyboolean

Whether SSL verification is enabled.

zoneIdstring

Identifier of the zone within a site where the data source belongs.

rangePerJsonKeyobject

Min/max ranges for each json key of the data source.

timezoneOffsetinteger

Offset of the timezone in minutes.

batteryStatusstring

The battery status warnings or errors associated with this data source. Expected values are OK, WARNING and CRITICAL.

checkIdstring required

Identifier of the data source

createdAtstring

Timestamp of when it was created.

hasNotificationsboolean required

Does the data source have any notifications associated with it

notificationIdsstring[] required

Ids of the notifications for this check

recentlyDownAtnumber double required

Last moment when the data source was DOWN, as a Unix Timestamp

statestring required

The current state of the data source: UP or DOWN.

ownerstring

Email address.

Changes

No recorded changes to this operation across all 1 revision of this API.