Update Synthetic Web Monitoring Job API

This page describes the API used to update the Synthetic web monitoring jobs.

Update a Synthetic Job

Updates a synthetic job with the specified JSON payload.

Resource URL

PUT <api_server_URL>/v1/synthetic/schedule/<id>

or, use the following URL if you are using the OAuth authentication method:

POST <controller_url>/controller/restui/synthetic/schedule/<applicationId>/updateSchedule

Request/Response Format

JSON

Example (Basic Authentication)

Request
{
"_id": "job_id",
"version": 2,
"scheduleRunConfigs": [
{
"rate": {
"value": 15,
"unit": "MINUTES"
},
"daysOfWeek": [
"SUN",
"WED",
"FRI",
"MON",
"THUR",
"SAT",
"TUES"
],
"timezone": "UTC"
}
],
"userEnabled": true,
"systemEnabled": true,
"type": "ALL_BROWSERS",
"rate": {
"value": 15,
"unit": "MINUTES"
},
"daysOfWeek": [
"SUN",
"WED",
"FRI",
"MON",
"THUR",
"SAT",
"TUES"
],
"timezone": "UTC",
"description": "appd1",
"appKey": "appkey",
"scheduleMode": "NONE",
"script": {
"contentType": "INLINE_PYTHON_3",
"script": "pageUrl = \"http://www.appdynamics.com\"\ndriver.get(pageUrl)\nassert \"AppDynamics\" in driver.title, \"Title should contain AppDynamics\""
},
"browserCodes": [
"Chrome"
],
"chromeVersions": [
"86"
],
"locationCodes": [
"M50"
],
"failOnPageError": true,
"captureVisualMetrics": true,
"simulateMobileBrowser": false,
"networkProfile": {
"name": "Native",
"downloadKbps": 5000,
"uploadKbps": 1000,
"roundtripTimeMillis": 28,
"packetLossPercent": 0,
"isDefault": false
},
"timeoutSeconds": 30,
"state": {
"lastFireTime": "2022-04-01T04:49:46.544Z"
},
"projectedUsage": {
"projectedDailyRuns": 96,
"projectedMonthlyRuns": 2880
},
"performanceCriteria": {
"retestOnWarning": false,
"retestOnCritical": false,
"criterion": []
},
"composableConfig": {
"numBeforeConfirmedError": 0,
"resourceErrorDetection": {
"ignoreWhen": {
"resourceUrlContains": [],
"resourceMimeType": []
},
"onlyWhen": {
"resourceUrlContains": [],
"resourceMimeType": []
}
}
},
"created": "2022-04-01T04:49:46.538Z",
"updated": "2022-04-01T04:50:13.325Z"
}
Response
{
"_id": "job_id",
"version": 1,
"scheduleRunConfigs": [
{
"rate": {
"value": 1,
"unit": "MINUTES"
},
"daysOfWeek": [
"WED",
"FRI",
"SUN",
"SAT",
"TUES",
"MON",
"THUR"
],
"timezone": "UTC"
}
],
"userEnabled": true,
"systemEnabled": true,
"type": "ALL_BROWSERS",
"rate": {
"value": 15,
"unit": "MINUTES"
},
"daysOfWeek": [
"WED",
"FRI",
"SUN",
"SAT",
"TUES",
"MON",
"THUR"
],
"timezone": "UTC",
"description": "https://appdynamics.com",
"appKey": "appKey",
"scheduleMode": "NONE",
"url": "https://appdynamics.com",
"browserCodes": [
"Chrome"
],
"chromeVersions": [
"86"
],
"locationCodes": [
"BOM",
"M50"
],
"failOnPageError": true,
"captureVisualMetrics": true,
"simulateMobileBrowser": false,
"networkProfile": {
"name": "Native",
"downloadKbps": 5000,
"uploadKbps": 1000,
"roundtripTimeMillis": 28,
"packetLossPercent": 0,
"isDefault": false
},
"timeoutSeconds": 15,
"state": {
"lastFireTime": "2022-04-06T05:57:16.000Z",
"nextFireTime": "2022-04-06T06:00:16.000Z"
},
"projectedUsage": {
"projectedDailyRuns": 2880,
"projectedMonthlyRuns": 86400
},
"performanceCriteria": {
"retestOnWarning": false,
"retestOnCritical": false,
"criterion": []
},
"composableConfig": {
"numBeforeConfirmedError": 0,
"resourceErrorDetection": {
"ignoreWhen": {
"resourceUrlContains": [],
"resourceMimeType": []
},
"onlyWhen": {
"resourceUrlContains": [],
"resourceMimeType": []
}
}
},
"created": "2022-04-05T05:30:36.426Z",
"updated": "2022-04-05T05:30:36.426Z"
}

Example (OAuth Authentication)

Request
{
"id": "job_id",
"version": 2,
"scheduleRunConfigs": [
{
"rate": {
"value": 15,
"unit": "MINUTES"
},
"daysOfWeek": [
"SUN",
"WED",
"FRI",
"MON",
"THUR",
"SAT",
"TUES"
],
"timezone": "UTC"
}
],
"userEnabled": true,
"systemEnabled": true,
"type": "ALL_BROWSERS",
"rate": {
"value": 15,
"unit": "MINUTES"
},
"daysOfWeek": [
"SUN",
"WED",
"FRI",
"MON",
"THUR",
"SAT",
"TUES"
],
"timezone": "UTC",
"description": "appd1",
"appKey": "appkey",
"scheduleMode": "NONE",
"script": {
"contentType": "INLINE_PYTHON_3",
"script": "pageUrl = \"http://www.appdynamics.com\"\ndriver.get(pageUrl)\nassert \"AppDynamics\" in driver.title, \"Title should contain AppDynamics\""
},
"browserCodes": [
"Chrome"
],
"chromeVersions": [
"86"
],
"locationCodes": [
"M50"
],
"failOnPageError": true,
"captureVisualMetrics": true,
"simulateMobileBrowser": false,
"networkProfile": {
"name": "Native",
"downloadKbps": 5000,
"uploadKbps": 1000,
"roundtripTimeMillis": 28,
"packetLossPercent": 0,
"isDefault": false
},
"timeoutSeconds": 30,
"state": {
"lastFireTime": "2022-04-01T04:49:46.544Z"
},
"projectedUsage": {
"projectedDailyRuns": 96,
"projectedMonthlyRuns": 2880
},
"performanceCriteria": {
"retestOnWarning": false,
"retestOnCritical": false,
"criterion": []
},
"composableConfig": {
"numBeforeConfirmedError": 0,
"resourceErrorDetection": {
"ignoreWhen": {
"resourceUrlContains": [],
"resourceMimeType": []
},
"onlyWhen": {
"resourceUrlContains": [],
"resourceMimeType": []
}
}
},
"created": "2022-04-01T04:49:46.538Z",
"updated": "2022-04-01T04:50:13.325Z"
}
Response
{
"id": "job_id",
"version": 1,
"scheduleRunConfigs": [
{
"rate": {
"value": 1,
"unit": "MINUTES"
},
"daysOfWeek": [
"WED",
"FRI",
"SUN",
"SAT",
"TUES",
"MON",
"THUR"
],
"timezone": "UTC"
}
],
"userEnabled": true,
"systemEnabled": true,
"type": "ALL_BROWSERS",
"rate": {
"value": 15,
"unit": "MINUTES"
},
"daysOfWeek": [
"WED",
"FRI",
"SUN",
"SAT",
"TUES",
"MON",
"THUR"
],
"timezone": "UTC",
"description": "https://appdynamics.com",
"appKey": "appKey",
"scheduleMode": "NONE",
"url": "https://appdynamics.com",
"browserCodes": [
"Chrome"
],
"chromeVersions": [
"86"
],
"locationCodes": [
"BOM",
"M50"
],
"failOnPageError": true,
"captureVisualMetrics": true,
"simulateMobileBrowser": false,
"networkProfile": {
"name": "Native",
"downloadKbps": 5000,
"uploadKbps": 1000,
"roundtripTimeMillis": 28,
"packetLossPercent": 0,
"isDefault": false
},
"timeoutSeconds": 15,
"state": {
"lastFireTime": "2022-04-06T05:57:16.000Z",
"nextFireTime": "2022-04-06T06:00:16.000Z"
},
"projectedUsage": {
"projectedDailyRuns": 2880,
"projectedMonthlyRuns": 86400
},
"performanceCriteria": {
"retestOnWarning": false,
"retestOnCritical": false,
"criterion": []
},
"composableConfig": {
"numBeforeConfirmedError": 0,
"resourceErrorDetection": {
"ignoreWhen": {
"resourceUrlContains": [],
"resourceMimeType": []
},
"onlyWhen": {
"resourceUrlContains": [],
"resourceMimeType": []
}
}
},
"created": "2022-04-05T05:30:36.426Z",
"updated": "2022-04-05T05:30:36.426Z"
}

Enable or Disable a Web Monitoring Job

You can enable or disable a web monitoring job by updating the following values:

Enable a web monitoring job

userEnabled

true
Disable a web monitoring jobuserEnabledfalse

Request Parameters

Parameter NameParameter TypeValueDescriptionMandatory Request

id

String

Job ID of a synthetic job

Unique identifier of a synthetic job.

To get the job ID:

  1. Log in to Controller and navigate to User Experience>Browser Apps> <Application Name> >Jobs.
  2. Hover over the job name and click the copy icon to copy the job ID.
Yes
versionnumber

Whenever a job is updated, the value of the version increases by a factor of one.

A job with "version" :

No
scheduleRunConfigs-No
rate-No
valuenumber

Minutes: 1 - 60

Hours: 1 - 24

Days: "null"

No
unitStringMinutes, Hours, or DaysNo
daysOfWeekString"SUN", "MON", "TUES", "WED", "THUR", "FRI", "SAT"No
timeRangeStringBetween hh:mm AM/PM to hh:mm AM/PMNo
timezoneString"UTC"GMT +/-hh:mmNo
startTimeStringdd/mm/yyyy hh:mm AM/PMNo
endTimeStringdd/mm/yyyy hh:mm AM/PMNo
userEnabledBooleantrue or false No
systemEnabledBooleanThis field gets disabled when the license exhausts.No
typeStringNo
rateStringNo
valueNumberNo
unitStringNo
daysOfWeekStringNo
timeRangeStringNo
timezoneStringNo
descriptionStringNo
startTimeStringNo
endTimeStringNo
appKeyStringApplication Key

You can get the application key from the Controller.

Navigate to User Experience>Browser Apps. The application key is listed next to the application name.

No
scheduleModeStringNo
urlString"null" or URL to monitor

The URL that you want to monitor.

When you use this parameter, the value of the script

No
scriptString

"null"

If you have a scripted job, specify the python-based selenium script used for simulating the user flow or behavior.

When you use this parameter, the value of the url

No
contentTypeStringNo
scriptStringNo
credentialPlaceholdersStringNo
apiMetadataStringScript object of the web monitoring jobNo
browserCodesString

Use the following Synthetic internal browser codes:

  • Chrome: Chrome
  • Internet Explorer: IE11
  • Firefox: Firefox
  • Mobile: Chrome.DeviceEmulation
Yes
chromeVersionsStringChrome browser version 86Yes
locationCodesString

Synthetic internal location codes of each agent location. See Location Codes.

Yes
failOnPageErrorBooleanNo
captureVisualMetricsBooleantrue or false No
simulateMobileBrowserBooleantrue or false No

networkProfile

String"name": "Native", "downloadKbps": 5000, "uploadKbps": 1000, "roundtripTimeMillis": 28, "packetLossPercent": 0, "isDefault": falseNo

name

StringCustom, Pixel, iPad, iPhone SEName of the deviceNo

description

String

If the name is Custom: User agent

If the name field is not Custom: "null"

Mozilla/5.0 (Linux; Android 7.0; SAMSUNG SM-G950F Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/5.2 Chrome/51.0.2704.106 Mobile Safari/537.36No
downloadKbpsNumberNumberDownload bandwidth in kbpsNo
uploadKbpsNumberNumberUpload bandwidth in kbpsNo
roundtripTimeMillisNumberNumberLatency in millisecondsNo
packetLossPercentNumber0 - 100Packet loss percentageNo
isDefaultBooleantrue or false No
timeoutSecondsNumber5 - 300SecondsNo
state-No
lastFireTimeStringNo
nextFireTimeStringNo
projectedUsage-No
projectedDailyRunsNumberNo
projectedMonthlyRunsNumberNo
performanceCriteria-No
retestOnWarningBooleanNo
retestOnCriticalBooleanNo
criterionStringNo
composableConfig-You can use this parameter to configure:
  • Custom Retry
  • Availability Rules
No
numBeforeConfirmedErrorNumber0, 1, 2, 3, 5, or 10Number of retriesNo
resourceErrorDetection-No
ignoreWhen-No
resourceUrlContainsStringComma separated listList of resource URLsNo
resourceMimeTypeStringNo
onlyWhen-No
resourceUrlContainsStringComma separated listList of resource URLsNo
resourceMimeTypeStringNo
createdStringNo
updatedStringNo

Response Status Codes

200Success
401Unauthorized
402Exceeded job limit
422Validation failure
429Throttled
500Internal server error