Contact Dotcom-Monitor support team to receive access to this Web API functionality.

Request URL

PUT https://api.dotcom-monitor.com/config_api_v1/tasks

Query Parameters

Parameter Required Description
Device_Id

true

The unique id of the monitoring device under which the task will be created.
Task_Type_Id

true

The type of the task.

For UserView:

Task_Type_Id=21

Timeout

optional

The task execution timeout in ms.
Name

optional

The task description.

Request Body

Dotcom-Monitor API accepts binary files uploaded with a request body. To upload an ES script along with your request to Dotcom-Monitor:

  1. Create or edit an EveryStep script using EveryStep Scripting Tool.
  2. Download the script to your computer and save to a dmuv/dmes file.
  3. In an API client, select to send the dmuv/dmes file as a binary file in the request body. If your API client does not support the binary method, use an alternative approach.
Request Example
curl --location --request PUT "https://api.dotcom-monitor.com/config_api_v1/tasks?Device_Id=16826&Task_Type_Id=21&Timeout=55000&Name=uploaded_dmes_script" ^
--header "Content-Type: application/octet-stream" ^
--header "Cookie: DANA-AUTH-API-COOKIE=7efad88951954e61a1235f43219882f34; DANA-AUTH-COOKIE=21c34cc69cdd4123448eaa5c519a824e" ^
--data "@/C:/Users/dm_admin/ES_Scripts/everystep-script.dmes"

Uploading ES Script as Base64 Encoded Data

If your API client does not support the binary method, you can upload your ES script to Dotcom-Monitor as a JSON body parameter in the Base64 format. Note that in this case, all request parameters should be passed in the request body (not in the query).

Request URL

POST  https://api.dotcom-monitor.com/config_api_v1/task/{task_id}

Path Parameters

Field Type Required Description
task_id

string

true

The unique id of a monitoring task you want to edit.

Header Parameters

Content-Type: application/json

JSON Body Example

{ 
    "Device_Id": 3153, 
    "Task_Type_Id": 21, 
    "Name": "dotcom-monitor.com", 
    "Timeout": 1200, 
    "base64dmuv": "AAEAAAD/////AQAAAAAAAAAEAQAAAAxTeXN0ZW0uSW50MzIBAAAAB21fdmFsdWUACAIAAAALAAEAAAD/////AQAAAAAAAAAMAgAAAERfT1FMX0R5bmFtaWNfLCB.......1bHR1cmU9bmV1dHJh"
    
}

Body Parameters

Field Type Required/Optional Description
Timeout

int32

optional

Contains task execution timeout in ms.
base64dmuv string required Contains EveryStep script in the Base64 format.

Please see the guideline to convert EveryStep script into Base64.

Device_Id

int32

required

The unique device id.

Example:
"Device_Id": 8692
Task_Type_Id

int32

required

The type of the task.
Name

string

optional

The task description.

 

To convert the script into the Base64 format, you will need to import the script from the tool to a *.dmuv (ES Desktop) or *.dmes (ES Web) file first. Please follow the steps below:

  1. Create or edit an EveryStep script using EveryStep Scripting Tool.
  2. Download the script to your computer and save to a dmuv/dmes file.
  3. Use an encoder to convert the dmuv/dmes file into Base64 format.
  4. Copy an encoded content into the base64dmuv parameter of your JSON request.

Alternatively, if you have any trouble converting the script file into Base64, you can download our Base64 encoder here. Once downloaded, use the encoder to convert the ES file as described below:

  1. Open the command line and provide a path to the encoder .exe file encoding_checker.exe.
  2.  Provide the full path to the downloaded dmuv/dmes file as an argument (e.g., “g:\Temp9\login_check.dmuv”).
  3. To save a converted script into a file, provide a path to the file.

Success Response

Example Response
{
    "Success": true,
    "Result": "Task 12365 has been updated"
}