What are commands?

The commands are sequentially numbered tasks (in JSON-format), required for API and transaction monitors.

Each command defines a step used to check a web service (HTTP or HTTPS). If any step fails, the entire check will fail.

A step is composed of an action (key) and one or, on occasion, more values (separated by a "|" character). The actions and values are case-sensitive; any double-quote characters within a value must be preceded by a backslash (\").

Here is an example of the most basic action - "get":

{
    "1": {
        "get": "http://pingometer.com"
    }
}

Note: The "1" denotes it is the first command, the "get" denotes the GET action, and the "https://pingometer.com" is the URL (including the protocol).

Each additional command must be listed in order (2, 3, 4, and so on) in JSON-format.

Actions

API Monitors

get

The value for the "get" action defines the endpoint for which to issue a GET request. You can optionally include custom headers, as shown in the example.

{
    "1": {
        "get": "http://pingometer.com",
        "headers": {
            "Authorization": "123"
        }
    }
}

post

The value for the "post" action defines the endpoint for which to issue a POST request. You can optionally include custom headers or data, as shown in the example.

{
    "1": {
        "post": "http://pingometer.com",
        "data": {
            "Hello": "World"
        },
        "headers": {
            "Authorization": "123"
        }
    }
}

patch

The value for the "patch" action defines the endpoint for which to issue a PATCH request. You can optionally include custom headers or data, as shown in the example.

{
    "1": {
        "patch": "http://pingometer.com",
        "headers": {
            "Authorization": "123"
        },
        "data": {
            "Hello": "World"
        }
    }
}

delete

The value for the "delete" action defines the endpoint for which to issue a DELETE request. You can optionally include custom headers, as shown in the example.

assert_in_url

The value for the "assert_in_url" action defines the content that must be in the URL at a specific point in the check.

Note: Any double quote characters (") in the value must be preceded by a backslash (\").

assert_in_content

The value for the "assert_in_content" action defines the content that must be in the content of the page at a specific point in the check.

Note: Any double quote characters (") in the value must be preceded by a backslash (\").

assert_not_in_url

The value for the "assert_not_in_url" action defines the content that must not be in the URL at a specific point in the check.

Note: Any double quote characters (") in the value must be preceded by a backslash (\").

assert_not_in_content

The value for the "assert_not_in_content" action defines the content that must not be in the content of the page at a specific point in the check.

Note: Any double quote characters (") in the value must be preceded by a backslash (\").

{
    "1": {
        "delete": "http://pingometer.com",
        "headers": {
            "Authorization": "123"
        }
    }
}

Transaction Monitors

get

This must always be the first command, but you can use them elsewhere in the commands, as well.

The value for the "get" action defines the URL to a specific page at a web serivce.

You may want to logout at the end of your commands (to terminate the session). If you use a "get" command as the last step (pointed to a logout URL), you can optionally force it to run at all times (even if a check fails part way through, causing unprocessed commands to be skipped). This is great to ensure that a teardown step is always run.

{
    "1": {
        "get": "http://pingometer.com"
    },
    "2": {
        "fill_by_xpath": "/html/body/footer/div[1]/div[1]/form/input[1][email protected] //  "
    },
    "3": {
        "click_by_xpath": "/html/body/footer/div[1]/div[1]/form/input[3]"
    },
    "4": {
        "assert_in_url": "sign-up?email=john%40example.com"
    },
    "5": {
        "get": "http://pingometer.com?logout",
        "force": 1
    }
}

click_by_id

The value for the "click_by_id" action defines the HTML ID of the element to click.

click_by_name

The value for the "click_by_name" action defines the HTML name of the element to click.

click_by_xpath

The value for the "click_by_xpath" action defines the HTML XPATH of the element to click.

Note: Any double quote characters (") in the XPATH must be preceded by a backslash (\").

fill_by_id

The value for the "fill_by_id" action first defines the HTML ID of the element to fill and then the actual value to fill. This information is separated by the "|" character.

Note: Any double quote characters (") in the value must be preceded by a backslash (\").

fill_by_name

The value for the "fill_by_name" action first defines the HTML name of the element to fill and then the actual value to fill. This information is separated by the "|" character.

Note: Any double quote characters (") in the value must be preceded by a backslash (\").

fill_by_xpath

The value for the "fill_by_xpath" action first defines the HTML XPATH of the element to fill and then the actual value to fill. This information is separated by the "|" character.

Note: Any double quote characters (") in the XPATH or value must be preceded by a backslash (\").

select_by_name_content

The value for the "select_by_name_content" action first defines the HTML name of the select element to fill and then the actual value to choose by its content. This information is separated by the "|" character.

Note: Any double quote characters (") in the value must be preceded by a backslash (\").

select_by_name_value

The value for the "select_by_name_value" action first defines the HTML name of the select element to fill and then the actual value to choose by its HTML value. This information is separated by the "|" character.

Note: Any double quote characters (") in the value must be preceded by a backslash (\").

assert_in_url

The value for the "assert_in_url" action defines the content that must be in the URL at a specific point in the check.

Note: Any double quote characters (") in the value must be preceded by a backslash (\").

assert_in_title

The value for the "assert_in_title" action defines the content that must be in the title of the page at a specific point in the check.

Note: Any double quote characters (") in the value must be preceded by a backslash (\").

assert_in_content

The value for the "assert_in_content" action defines the content that must be in the content of the page at a specific point in the check.

Note: Any double quote characters (") in the value must be preceded by a backslash (\").

assert_not_in_url

The value for the "assert_not_in_url" action defines the content that must not be in the URL at a specific point in the check.

Note: Any double quote characters (") in the value must be preceded by a backslash (\").

assert_not_in_title

The value for the "assert_not_in_title" action defines the content that must not be in the title of the page at a specific point in the check.

Note: Any double quote characters (") in the value must be preceded by a backslash (\").

assert_not_in_content

The value for the "assert_not_in_content" action defines the content that must not be in the content of the page at a specific point in the check.

Note: Any double quote characters (") in the value must be preceded by a backslash (\").

Powered by Zendesk