Request URL
PUT | https://api.dotcom-monitor.com/config_api_v1/tasks |
https://api.dotcom-monitor.com/config_api_v1/tasks?Device_Id=328242&Task_Type_Id=21
Query Parameters
Field | Type | Required/Optional | Description | |
Device_Id |
int32 |
required |
The unique device id.
Example:
|
|
Task_Type_Id |
int32 |
required |
The type of the task. |
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:
- Create or edit an EveryStep script using EveryStep Scripting Tool.
- Download the script to your computer and save to a dmuv/dmes file.
- 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.
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"
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
You can upload an ES script as Base64 by using 2 methods:
PUT | https://api.dotcom-monitor.com/config_api_v1/tasks |
POST | https://api.dotcom-monitor.com/config_api_v1/tasks?verb=PUT |
Header Parameters
Content-Type: application/json
JSON Body Example
{ "Device_Id": 3153, "Task_Type_Id": 21, "Name": "dotcom-monitor.com", "Timeout": 13, "base64dmuv": "AAEAAAD/////AQAAAAAAAAAEAQAAAAxTeXN0ZW0uSW50MzIBAAAAB21fdmFsdWUACAIAAAALAAEAAAD/////AQAAAAAAAAAMAgAAAERfT1FMX0R5bmFtaWNfLCB.......1bHR1cmU9bmV1dHJh" "RequireRepeatVisit": true, "WriteVideoOnEachMonitoring": true, "DisableHttpProxy": false, "DisableVideoRecording": true, "DisableScreenshots": true, "AbortOnError": true, "DNSResolveMode": "External DNS Server", "DNSserverIP": "112.115.124.55", "CustomDNSHosts": "asa.com=112.115.124.77" }
Body Parameters
Required JSON parameters are provided below. To add more parameters to the body, please see the description of the fields in the API: UserView Task JSON Sample.
Field | Type | Required/Optional | Description | |
base64dmuv | string | required | Contains ES script in the Base64 format.
Please see the guideline to convert EveryStep script into Base64. |
|
Device_Id |
int32 |
required |
The unique device id.
Example:
|
|
Task_Type_Id |
int32 |
required |
The type of the task. |
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:
- Create or edit an EveryStep script using EveryStep Scripting Tool.
- Download the script to your computer and save to a dmuv/dmes file.
- Use an encoder to convert the dmuv/dmes file into Base64 format.
- 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:
- Open the command line and provide a path to the encoder .exe file encoding_checker.exe.
- Provide the full path to the downloaded dmuv/dmes file as an argument (e.g., “g:\Temp9\login_check.dmuv”).
- To save a converted script into a file, provide a path to the file.
Success Response
{ "Success":true, "Result":17989 }
Field |
Type |
Description |
Result |
int32 |
The unique id for the task. Use the Id in the Edit operation. |