Update Synthetic API Monitoring Job API

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

Update an API Monitoring Job

Updates an API monitoring job with the specified JSON payload.

Resource URL

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

Request/Response Format

JSON

Example

Request
JSON
{
"_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
JSON
{
"_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 an API Monitoring Job

You can enable or disable an API monitoring job by updating the following values:

Action Field Name Value

Enable an API monitoring job

userEnabled

true
Disable an API monitoring job userEnabled false

Response Parameter

Parameter Name Parameter Type Value Description Mandatory Request

id

String

Job ID of an API monitoring job

Unique identifier of an API monitoring job.

To get the job ID:

  1. Log in to Controller and navigate to User Experience > API Monitoring > <Collection Name> > Jobs.
  2. Hover over the job name and click the copy icon to copy the job or schedule ID.
Yes
version number

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
value number

Minutes: 1 - 60

Hours: 1 - 24

Days: "null"

No
unit String Minutes, Hours, or Days No
daysOfWeek String "SUN", "MON", "TUES", "WED", "THUR", "FRI", "SAT" No
timeRange String Between hh:mm AM/PM to hh:mm AM/PM No
timezone String "UTC" GMT +/-hh:mm No
startTime String dd/mm/yyyy hh:mm AM/PM No
endTime String dd/mm/yyyy hh:mm AM/PM No
userEnabled Boolean true or false No
systemEnabled Boolean This field gets disabled when the license exhausts. No
type String No
rate String No
value Number No
unit String No
daysOfWeek String No
timeRange String No
timezone String No
description String No
startTime String No
endTime String No
appKey String Application Key

You can get the application key from the Controller.

  1. Navigate to User Experience > API Monitoring.
  2. Hover over the collection name and click the copy icon to copy the Collection Key. The Collection Key is the Application Key.
No
scheduleMode String No
url String "null" or URL to monitor

The URL that you want to monitor.

When you use this parameter, the value of the script parameter must be null.

No
script String

"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 parameter must be null.

No
contentType String "null" or "INLINE_PYTHON_3"

If the url value is not null (URL job), the content type is null

If the script value is not null (script job), the content type is "INLINE_PYTHON_3"

No
script String "null" or Python script Python-based selenium script for the scripted jobs No
credentialPlaceholders String No
apiMetadata String Script object of the web monitoring job No
browserCodes String

Use the following Synthetic internal browser codes:

  • Chrome: Chrome
  • Internet Explorer: IE11
  • Firefox: Firefox
  • Mobile: Chrome.DeviceEmulation
Yes
chromeVersions String Chrome browser version 86 Yes
locationCodes String

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

Yes
failOnPageError Boolean No
captureVisualMetrics Boolean true or false No
simulateMobileBrowser Boolean true or false No

networkProfile

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

name

String Custom, Pixel, iPad, iPhone SE Name of the device No

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.36 No
downloadKbps Number Number Download bandwidth in kbps No
uploadKbps Number Number Upload bandwidth in kbps No
roundtripTimeMillis Number Number Latency in milliseconds No
packetLossPercent Number 0 - 100 Packet loss percentage No
isDefault Boolean true or false No
timeoutSeconds Number 5 - 300 Seconds No
state - No
lastFireTime String No
nextFireTime String No
projectedUsage - No
projectedDailyRuns Number No
projectedMonthlyRuns Number No
performanceCriteria - No
retestOnWarning Boolean true or false Re-test on warning event No
retestOnCritical Boolean true or false Re-test on critical event No
criterion String No
composableConfig - You can use this parameter to configure:
  • Custom Retry
  • Availability Rules
No
numBeforeConfirmedError Number 0, 1, 2, 3, 5, or 10 Number of retries No
resourceErrorDetection - No
ignoreWhen - No
resourceUrlContains String Comma separated list List of resource URLs No
resourceMimeType String No
onlyWhen - No
resourceUrlContains String Comma separated list List of resource URLs No
resourceMimeType String No
created String No
updated String No

Response Status Codes

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