Share this page

# Add a monitor over a firewall

## Description

Adds a monitor over a firewall.

## URL

Copy code

    /LoadTest/rest/domains/{domainName}/projects/{projectName}/mofw

## Remarks

Body of the request should contain a resource folder description in XML or JSON.

## HTTP method

POST: Creates a monitor over a firewall.

## Request

Headers:

One of the following:

- Content-Type: application/xml

- Content-Type: application/json

Cookies:

Version | Cookie
--- | ---
2020 or later | LWSSO_COOKIE_KEY={LwssoCookie};
Earlier than 2020 | LWSSO_COOKIE_KEY={LwssoCookie};QCSession={QCSessionCookie};

Request body:

POST: An XML or JSON containing the monitor over a firewall.

The mandatory fields in the request are:

Element | Description
--- | ---
Name | Name of the monitor over a firewall.
MachineKey | Machine key for the monitor over a firewall.
MIListenerID | ID of the MI Listener machine.
FolderID | Folder ID.

Request examples:

Copy code
XML example - POST:

    POST http://<LRE_Server>/LoadTest/rest/domains/{domainName}/projects/{projectName}/mofw
    Content-Type: application/xml
    Cookie: LWSSO_COOKIE_KEY={LwssoCookie};

Copy code
XML example - Request body using Content-Type header application/xml:

    <MonitorOfw xmlns="http://www.hp.com/PC/REST/API">
        <Name>Created_By_Rest</Name>
        <MIListenerID>1002</MIListenerID>
        <MachineKey>pclab.net_ofw</MachineKey>
        <FolderID>1003</FolderID>
        <Description>ZHUZHU</Description>
    </MonitorOfw>

Copy code
JSON example - Request body using Content-Type header application/json:

    {
            "Name": "Created_By_Rest_now",
            "MIListenerID": "1052",
            "MachineKey": "mofw_ofw",
            "FolderID": "1",
            "Description": "ZHUZHU",
            "_xmlns": "http://www.hp.com/PC/REST/API"
    }

## Response

Headers:

One of:

- Accept: application/xml

- Accept: application/json

Cookies:

None

HTML return code:

One of the HTTP return codes

HTML body:

The data on the entity in the response.

Response example:

Copy code

    <MonitorOfw xmlns="http://www.hp.com/PC/REST/API">
        <Name>Created_By_Rest</Name>
        <MIListenerID>1002</MIListenerID>
        <MachineKey>pclab.net_ofw</MachineKey>
        <FolderID>1003</FolderID>
        <Description>ZHUZHU</Description>
        <ID>1026</ID>
        <FolderName>>mofs_sub_folder</FolderName>
    </MonitorOfw>

See also:

- Get all monitors over a firewall
- Get monitors over firewall by ID
- Delete a monitor over a firewall

Tips to improve your search results... OpenText™ Enterprise Performance Engineering API Reference OpenText™ Enterprise Performance Engineering All View Local Help Center View Online Help Center(Undefined variable: _rscC_Basic_Variables.VersionLabel)