NerdGraph tutorial: Manage your synthetic monitors
OurNerdGraph API allows you to automate creating, updating, or deleting yoursynthetic monitors,private locations,secure credentials, andmonitor downtimes.
Requirements
Requirements include:
- General NerdGraph requirements
- Relevant user permissions: the samesynthetic monitoring permissions that apply for using the synthetics UI apply for using NerdGraph
Understand fields in NerdGraph explorer
You can view field definitions inNerdGraph explorer, but it may help to better understand theLOCATION,PERIOD,TAGS, and other fields.
Configure simple browser, scripted browser, and step monitors to use one or more browser types. Don't include this attribute when using the Chrome 72 legacy runtime. Examples:
[CHROME]to use Chrome only[FIREFOX]to use Firefox only[CHROME, FIREFOX]to use Chrome and Firefox
Configure simple browser, scripted browser, and step monitors to use one or more emulated device types. Don't include this attribute when using the Chrome 72 legacy runtime. Examples:
[DESKTOP][MOBILE_LANDSCAPE][MOBILE_PORTRAIT][TABLET_LANDSCAPE][TABLET_PORTRAIT]Multiple emulated device configurations can be used by a single monitor:
[DESKTOP, MOBILE_PORTRAIT, TABLET_LANDSCAPE]
To identify aprivate location in your scripts, use the private location's entity GUID. If the private location is configured to useverified script execution, also include thevsePassword attribute. For example:
locations:{private:{guid:LOCATION_ENTITY_GUID,vsePassword:YOUR_VSE_PASSWORD}}Public locations use the location identifier without the AWS_ prefix, for example:
locations:{public:["US_EAST_2","US_WEST_1"]}ThePERIOD attribute defines a time interval for your monitors to execute. To define the interval, use these forms:
EVERY_MINUTEfor every minute.EVERY_N_MINUTES, where 'N' is minutes. Supported values includeEVERY_5_MINUTES,EVERY_10_MINUTES,EVERY_15_MINUTES, andEVERY_30_MINUTES.EVERY_HOURfor every hour.EVERY_N_HOURS, where 'N' is hours. Supported values includeEVERY_6_HOURSandEVERY_12_HOURS.EVERY_DAYfor once a day.
Tags are optional. You can add tags during monitor creation, or later using tagging calls in NerdGraph or the UI. Multiple tags can be added in a single mutation call using an array that contains keys and values.
Some fields are for more advanced configurations. These are optional.
Forping monitors, these include:
HEADER_NAME: Your custom header names that appear on the request.HEADER_VALUE: The custom header value on the request.REDIRECT_IS_FAILURE: Your monitor reports a failure if it's redirected.VALIDATION_TEXT: If this text is not included in your monitor's response, it returns a failure.TLS_VALIDATION: Verifies thevalidity of the SSL certificate chain.BYPASS_HEAD_REQUEST: Bypasses the initial HEAD request and instead makes a GET request.
RUNTIME_TYPE: The runtime type used by your monitor. "CHROME_BROWSER" is the only accepted value.RUNTIME_TYPE_VERSION: The runtime type version used by your monitor. "100" is the only accepted value.SCRIPT_LANGUAGE: The language used in your monitor. "JAVASCRIPT" is the only accepted value.
SCRIPT_CONTENT: The actual contents of the script. This shouldnot be based64 encoded.RUNTIME_TYPE: The runtime type used by your monitor. "NODE_API" is the only accepted value.RUNTIME_TYPE_VERSION: The runtime type version used by your monitor. The only accepted value is16.10.SCRIPT_LANGUAGE: The language used in your monitor. "JAVASCRIPT" is the only accepted value.
SCRIPT_CONTENT: The actual contents of the script. This shouldnot be based64 encoded.RUNTIME_TYPE: The runtime type used by your monitor. "CHROME_BROWSER" is the only accepted value.RUNTIME_TYPE_VERSION: The runtime type version used by your monitor. "100" is the only accepted value.SCRIPT_LANGUAGE: The language used in your monitor. "JAVASCRIPT" is the only accepted value.
Forstep monitors:
RUNTIME_TYPE: The runtime type used by your monitor. "CHROME_BROWSER" is the only accepted value.RUNTIME_TYPE_VERSION: The runtime type version used by your monitor. "100" is the only accepted value.SCRIPT_LANGUAGE: The language used in your monitor. "JAVASCRIPT" is the only accepted value.
Forcertificate check monitors:
DAYS_UNTIL_EXPIRATION: Notifies you when you need to update your certificate. For example, if you wanted a notification 30 days before the certificate expires, you would input 30.RUNTIME_TYPE: The runtime type used by your monitor. "NODE_API" is the only accepted value.RUNTIME_TYPE_VERSION: The runtime type version used by your monitor. The only accepted value is16.10.SCRIPT_LANGUAGE: The language used in your monitor. "JAVASCRIPT" is the only accepted value.
RUNTIME_TYPE: The runtime type used by your monitor. "NODE_API" is the only accepted value.RUNTIME_TYPE_VERSION: The runtime type version used by your monitor. The only accepted value is16.10.SCRIPT_LANGUAGE: The language used in your monitor. "JAVASCRIPT" is the only accepted value.
For all monitors:
APDEX_TARGET: The monitor's Apdex target used to populate SLA reports. Defaults to 7 seconds (7000ms).
Use queries to retrieve data
Queries make requests to fetch data. To learn additional query capabilities available to your synthetic entities, check outNerdGraph entities API tutorial.
You can query your synthetic monitors to get current status information about your data or details about the monitor configuration. Many monitor configurations are surfaced as tags.
{actor{entitySearch(query:"domain = 'SYNTH' AND type = 'MONITOR'"){results{entities{...onSyntheticMonitorEntityOutline{guidnameaccountIdmonitorTypetags{keyvalues}}}}}}}You're able to query your private locations:
{actor{entitySearch(query:"domain = 'SYNTH' AND type = 'PRIVATE_LOCATION'"){results{entities{accountIdguidnametags{keyvalues}}}}}}Query existing monitor downtimes. Configuration details are stored in tags.
{actor{entitySearch(query:"domain = 'SYNTH' AND type = 'MONITOR_DOWNTIME'"){results{entities{accountIdguidnametags{keyvalues}}}}}}Querying secure credentials lets you retrieve metadata only, but not the credential values themselves:
{actor{entitySearch(query:"domain = 'SYNTH' AND type = 'SECURE_CRED'"){results{entities{...onSecureCredentialEntityOutline{accountIdguidnametags{keyvalues}updatedAt}}}}}}Retrieve the script used in a scripted API or scripted browser monitor. Other monitor types will return an error.
{actor{account(id:ACCOUNT_ID){synthetics{script(monitorGuid:"ENTITY_GUID"){text}}}}}Retrieve the steps configured for a step monitor. Other monitor types will return an error.
{actor{account(id:ACCOUNT_ID){synthetics{steps(monitorGuid:"ENTITY_GUID"){ordinaltypevalues}}}}}Retrieve the entity GUID for a synthetic monitor using the monitor ID.
{actor{entitySearch(query:"(domainId = 'MONITOR_ID')"){results{entities{...onSyntheticMonitorEntityOutline{guidnamemonitorId}}}}}}Retrieve the status of all runtime upgrade tests for legacy runtime monitors. These tests populate theruntime upgrades UI. The test result is stored in thevalidationStatus tag. If the upgrade test failed, the error message is available in thevalidationError tag.
{actor{entitySearch(query:"domain = 'SYNTH' AND type = 'RUNTIME_VALIDATION'"){results{entities{accountIdguidnametags{keyvalues}}}}}}Retrieve the status of a runtime upgrade test for a single legacy runtime monitor. These test results populate theruntime upgrades UI. The test result is stored in thevalidationStatus tag. If the upgrade test failed, the error message is available in thevalidationError tag.
{actor{entitySearch(query:"domain = 'SYNTH' AND type = 'RUNTIME_VALIDATION' AND domainId = 'MONITOR_ID'"){results{entities{accountIdguidnametags{keyvalues}}}}}}Create your synthetic monitors
Below are some sample requests to automate the creation of your synthetic monitors.
Tip
Include the runtime object that includesruntimeType,runtimeTypeVersion, andscriptLanguage to use a newer runtime. Do not include the runtime object and these attributes to continue using a legacy runtime.
Important
As of August 26, 2024, you can no longer create new monitors using legacy runtimes on public or private locations. On October 22, 2024, we willend of life the containerized private minion (CPM) and legacy synthetics runtime versions.
- For public locations, usethe runtime upgrade UI to update your monitors to the newest runtimes.
- For private locations, please review ourrecommended migration steps to avoid monitor degradation.
Ping monitors check that your application is running. Here's an example for creating one in NerdGraph:
mutation{syntheticsCreateSimpleMonitor(accountId:ACCOUNT_IDmonitor:{locations:{public:["LOCATION_1","LOCATION_2"]}name:"YOUR_MONITOR_NAME"period:PERIODstatus:STATUSuri:"MONITORED_URI"advancedOptions:{customHeaders:{name:"HEADER_NAME",value:"HEADER_VALUE"}redirectIsFailure:REDIRECT_IS_FAILUREresponseValidationText:"VALIDATION_TEXT"shouldBypassHeadRequest:BYPASS_HEAD_REQUESTuseTlsValidation:TLS_VALIDATION}apdexTarget:APDEX_TARGET}){errors{descriptiontype}}}Simple browser monitors use Chrome instances to mimic customer visits. Here's an example for creating one in NerdGraph:
mutation{syntheticsCreateSimpleBrowserMonitor(accountId:ACCOUNT_IDmonitor:{browsers:[BROWSERS]devices:[DEVICES]locations:{public:["LOCATION_1","LOCATION_2"]}name:"YOUR_MONITOR_NAME"period:PERIODruntime:{runtimeType:"RUNTIME_TYPE"runtimeTypeVersion:"RUNTIME_TYPE_VERSION"scriptLanguage:"SCRIPT_LANGUAGE"}status:STATUSuri:"MONITORED_URI"advancedOptions:{customHeaders:{name:"HEADER_NAME",value:"HEADER_VALUE"}enableScreenshotOnFailureAndScript:ENABLE_SCREENSHOTresponseValidationText:"VALIDATION_TEXT"useTlsValidation:TLS_VALIDATION}apdexTarget:APDEX_TARGET}){errors{descriptiontype}}}Scripted browser monitors are more complex interactions with your pages and applications. Here's an example for creating one in NerdGraph:
mutation{syntheticsCreateScriptBrowserMonitor(accountId:ACCOUNT_IDmonitor:{browsers:[BROWSERS]devices:[DEVICES]locations:{public:["LOCATION_1","LOCATION_2"]}name:"MONITOR_NAME"period:PERIODruntime:{runtimeType:"RUNTIME_TYPE"runtimeTypeVersion:"RUNTIME_TYPE_VERSION"scriptLanguage:"SCRIPT_LANGUAGE"}script:"SCRIPT_CONTENT"status:STATUSadvancedOptions:{enableScreenshotOnFailureAndScript:ENABLE_SCREENSHOT}apdexTarget:APDEX_TARGET}){errors{descriptiontype}}}Scripted API monitors check your API endpoints. Here's an example for creating one in NerdGraph:
mutation{syntheticsCreateScriptApiMonitor(accountId:ACCOUNT_IDmonitor:{locations:{public:["LOCATION_1","LOCATION_2"]}name:"YOUR_MONITOR_NAME"period:PERIODruntime:{runtimeType:"RUNTIME_TYPE"runtimeTypeVersion:"RUNTIME_TYPE_VERSION"scriptLanguage:"SCRIPT_LANGUAGE"}script:"SCRIPT_CONTENT"status:STATUSapdexTarget:APDEX_TARGET}){errors{descriptiontype}}}Step monitors provide codeless multi-step browser based monitors. Here's an example for creating one in NerdGraph:
mutation{syntheticsCreateStepMonitor(accountId:ACCOUNT_IDmonitor:{browsers:[BROWSERS]devices:[DEVICES]locations:{public:["LOCATION_1","LOCATION_2"]}name:"MONITOR_NAME"period:PERIODruntime:{runtimeType:"RUNTIME_TYPE"runtimeTypeVersion:"RUNTIME_TYPE_VERSION"scriptLanguage:"SCRIPT_LANGUAGE"}status:STATUSsteps:[{ordinal:0,type:NAVIGATE,values:["MONITORED_URI","USER_AGENT"]}{ordinal:STEP_NUMBERtype:STEP_TYPEvalues:["CONDITIONAL_TYPE","VALUE"]}]advancedOptions:{enableScreenshotOnFailureAndScript:ENABLE_SCREENSHOT}apdexTarget:APDEX_TARGET}){errors{descriptiontype}}}Set up monitors to notify you when your SSL certificates are about to expire. Here's an example for creating one in NerdGraph:
mutation{syntheticsCreateCertCheckMonitor(accountId:ACCOUNT_IDmonitor:{domain:"DOMAIN"locations:{public:["LOCATION_1","LOCATION_2"]}name:"YOUR_MONITOR_NAME"numberDaysToFailBeforeCertExpires:DAYS_UNTIL_EXPIRATIONperiod:PERIODstatus:STATUSapdexTarget:APDEX_TARGET}){errors{descriptiontype}}}Broken links monitors check the links on a webpage for failure. Here's an example for creating one in NerdGraph:
mutation{syntheticsCreateBrokenLinksMonitor(accountId:ACCOUNT_IDmonitor:{locations:{public:["LOCATION_1","LOCATION_2"]}name:"YOUR_MONITOR_NAME"period:PERIODstatus:STATUSapdexTarget:APDEX_TARGETuri:"MONITOR_URI"tags:{key:"YOUR_TAG_NAME",values:"TAG_VALUE"}}){errors{descriptiontype}}}Update your synthetic monitors
While you can't change the monitor type after creating it, you can update its settings. Only the guid and the settings that need updated are required as part of the request.
Tip
Include the runtime object that includes runtimeType, runtimeTypeVersion, and scriptLanguage toupgrade a monitor to use a newer runtime. Include this object and set these attributes to empty string to downgrade to a legacy runtime. Do not include this object and these attributes to continue using a legacy runtime.
Use this to update your ping monitors:
mutation{syntheticsUpdateSimpleMonitor(guid:"ENTITY_GUID"monitor:{locations:{public:["LOCATION_1","LOCATION_2"]}name:"YOUR_MONITOR_NAME"period:PERIODstatus:STATUSuri:"MONITORED_URI"advancedOptions:{customHeaders:{name:"HEADER_NAME",value:"HEADER_VALUE"}redirectIsFailure:REDIRECT_IS_FAILUREresponseValidationText:"VALIDATION_TEXT"shouldBypassHeadRequest:BYPASS_HEAD_REQUESTuseTlsValidation:TLS_VALIDATION}apdexTarget:APDEX_TARGET}){errors{descriptiontype}}}To update a simple browser monitor (including the ability to upgrade the runtime version), use this:
mutation{syntheticsUpdateSimpleBrowserMonitor(guid:ENTITY_GUIDmonitor:{browsers:[BROWSERS]devices:[DEVICES]locations:{public:["LOCATION_1","LOCATION_2"]}name:"YOUR_MONITOR_NAME"period:PERIODruntime:{runtimeType:"RUNTIME_TYPE"runtimeTypeVersion:"RUNTIME_TYPE_VERSION"scriptLanguage:"SCRIPT_LANGUAGE"}status:STATUSuri:"MONITORED_URI"advancedOptions:{customHeaders:{name:"HEADER_NAME",value:"HEADER_VALUE"}enableScreenshotOnFailureAndScript:ENABLE_SCREENSHOTresponseValidationText:"VALIDATION_TEXT"useTlsValidation:TLS_VALIDATION}apdexTarget:APDEX_TARGET}){errors{descriptiontype}}}To update a scripted browser monitor (including the ability to upgrade the runtime version), use this:
mutation{syntheticsUpdateScriptBrowserMonitor(guid:ENTITY_GUIDmonitor:{browsers:[BROWSERS]devices:[DEVICES]locations:{public:["LOCATION_1","LOCATION_2"]}name:"MONITOR_NAME"period:PERIODruntime:{runtimeType:"RUNTIME_TYPE"runtimeTypeVersion:"RUNTIME_TYPE_VERSION"scriptLanguage:"SCRIPT_LANGUAGE"}script:"SCRIPT_CONTENT"status:STATUSadvancedOptions:{enableScreenshotOnFailureAndScript:ENABLE_SCREENSHOT}apdexTarget:APDEX_TARGET}){errors{descriptiontype}}}To update a scripted API monitor (including the ability to upgrade the runtime version), use this:
mutation{syntheticsUpdateScriptApiMonitor(guid:ENTITY_GUIDmonitor:{locations:{public:["LOCATION_1","LOCATION_2"]}name:"YOUR_MONITOR_NAME"period:PERIODruntime:{runtimeType:"RUNTIME_TYPE"runtimeTypeVersion:"RUNTIME_TYPE_VERSION"scriptLanguage:"SCRIPT_LANGUAGE"}script:"SCRIPT_CONTENT"status:STATUSapdexTarget:APDEX_TARGET}){errors{descriptiontype}}}Use this to update a step monitor:
mutation{syntheticsUpdateStepMonitor(guid:ENTITY_GUIDmonitor:{browsers:[BROWSERS]devices:[DEVICES]locations:{public:["LOCATION_1","LOCATION_2"]}name:"MONITOR_NAME"period:PERIODruntime:{runtimeType:"RUNTIME_TYPE"runtimeTypeVersion:"RUNTIME_TYPE_VERSION"scriptLanguage:"SCRIPT_LANGUAGE"}status:STATUSsteps:[{ordinal:0,type:NAVIGATE,values:["MONITORED_URI","USER_AGENT"]}{ordinal:STEP_NUMBERtype:STEP_TYPEvalues:["VALUE_1","VALUE_2"]}]advancedOptions:{enableScreenshotOnFailureAndScript:ENABLE_SCREENSHOT}apdexTarget:APDEX_TARGET}){errors{descriptiontype}}}Use this to update a certificate check monitor:
mutation{syntheticsUpdateCertCheckMonitor(guid:ENTITY_GUIDmonitor:{domain:"DOMAIN"locations:{public:["LOCATION_1","LOCATION_2"]}name:"YOUR_MONITOR_NAME"numberDaysToFailBeforeCertExpires:DAYS_UNTIL_EXPIRATIONperiod:PERIODstatus:STATUSapdexTarget:APDEX_TARGET}){errors{descriptiontype}}}Use this to update a broken links monitor:
mutation{syntheticsUpdateBrokenLinksMonitor(guid:ENTITY_GUIDmonitor:{locations:{public:["LOCATION_1","LOCATION_2"]}name:"YOUR_MONITOR_NAME"period:PERIODstatus:STATUSapdexTarget:APDEX_TARGETuri:"MONITOR_URI"tags:{key:"YOUR_TAG_NAME",values:"TAG_VALUE"}}){errors{descriptiontype}}}You can use the below example to update a simple browser, scripted API, or scripted browser monitor to the new Chrome 100+ or Node.js 16.10 runtimes. The following example upgrades a scripted browser monitor to the new runtime from the legacy runtime.
To update a simple browser monitor using the below example, change the mutation to
syntheticsUpdateSimpleBrowserMonitorinstead ofsyntheticsUpdateScriptBrowserMonitor.To update a scripted API monitor using the below example, change the mutation to
syntheticsUpdateScriptApiMonitorinstead ofsyntheticsUpdateScriptBrowserMonitor.Check outoptional-fields for additional details on runtime settings.
mutation{syntheticsUpdateScriptBrowserMonitor(guid:"ENTITY_GUID"monitor:{runtime:{runtimeType:"RUNTIME_TYPE"runtimeTypeVersion:"RUNTIME_TYPE_VERSION"scriptLanguage:"SCRIPT_LANGUAGE"}}){errors{descriptiontype}}}
You can use the below example to update a simple browser, scripted API, or scripted browser monitor to use a legacy runtime prior to the October 22, 2024 EOL. The following example downgrades a scripted browser monitor to the legacy runtime from the new runtime.
To update a simple browser monitor using the below example, change the mutation to
syntheticsUpdateSimpleBrowserMonitorinstead ofsyntheticsUpdateScriptBrowserMonitor.To update a scripted API monitor using the below example, change the mutation to
syntheticsUpdateScriptApiMonitorinstead ofsyntheticsUpdateScriptBrowserMonitor.Check outoptional-fields for additional details on runtime settings.
mutation{syntheticsUpdateScriptBrowserMonitor(guid:"ENTITY_GUID"monitor:{runtime:{runtimeType:"",runtimeTypeVersion:"",scriptLanguage:""}}){errors{descriptiontype}}}
Use the following mutation to move a scripted API monitor between VSE-enabled private locations. Ensure that you include the script to regenerate HMACs:
mutation{syntheticsUpdateScriptApiMonitor(guid:"ENTITY_GUID"monitor:{locations:{private:[{guid:"LOCATION_GUID",vsePassword:"YOUR_VSE_PASSWORD"}]}script:"SCRIPT_CONTENT"}){errors{descriptiontype}monitor{status}}}Delete a synthetic monitor
Use these scripts to delete your monitors:
Delete a monitor using the monitor entity GUID.
mutation{syntheticsDeleteMonitor(guid:"ENTITY_GUID"){deletedGuid}}Manage your private locations
Aprivate location allows you to monitor applications behind your firewall. When you create a private location, you install and configure private minions to execute the monitors assigned to that private location.
mutation{syntheticsCreatePrivateLocation(accountId:ACCOUNT_IDname:"PrivateLocationName"description:"Optional description"shared:trueverifiedScriptExecution:false){guiderrors{descriptiontype}}}If a location is shared and used by other accounts in your organization to run synthetic monitors, you cannot unshare this private location until those monitors are disabled.
mutation{syntheticsUpdatePrivateLocation(shared:falseguid:ENTITY_GUIDdescription:"EnterYourDescription"verifiedScriptExecution:true){descriptionverifiedScriptExecutionerrors{descriptiontype}}}mutation{syntheticsDeletePrivateLocation(guid:ENTITY_GUID){errors{descriptiontype}}}If you need to clear an unwieldy backlog, use this:
mutation{syntheticsPurgePrivateLocationQueue(guid:ENTITY_GUID){errors{descriptiontype}}}Manage your secure credentials
You usesecure credentials when storing, protecting, and centrally managing protected information used by your monitors, like passwords, API keys, or encoded certificates. Using NerdGraph allows you to programmatically change the values of your secure credentials if you need to reset any credentials for any reason.
mutation{syntheticsCreateSecureCredential(accountId:ACCOUNT_IDdescription:"YourOptionalDescription"key:SECURE_CREDENTIAL_NAMEvalue:SECURE_CREDENTIAL_VALUE){errors{description}}}mutation{syntheticsUpdateSecureCredential(accountId:ACCOUNT_IDdescription:"YourOptionalDescription"key:SECURE_CREDENTIAL_NAMEvalue:SECURE_CREDENTIAL_VALUE){createdAtlastUpdateerrors{description}}}mutation{syntheticsDeleteSecureCredential(accountId:ACCOUNT_IDkey:SECURE_CREDENTIAL_NAME){errors{description}}}Manage your monitor downtimes
Monitor downtimes let you specify times that your synthetics should stop running. We've provided different snippets that demonstrate how to schedule monitor downtimes for your synthetics. You need to update these snippets to specify timezone, start times, and end times. To learn more about when you might schedule monitor downtimes, check out our docDisable monitoring during scheduled maintenance times. To find timezone values, seethe tz database of time zones. For example, America/Los Angeles would use the PDT abbreviation.
mutation{syntheticsCreateOnceMonitorDowntime(accountId:ACCOUNT_IDname:"MonitorDowntimeName"monitorGuids:["OptionalMonitorEntityGuid","OptionalMonitorEntityGuid"]timezone:"TIMEZONE"startTime:"yyyy-MM-ddTHH:mm:ss"endTime:"yyyy-MM-ddTHH:mm:ss"){guidaccountIdnamemonitorGuidstimezonestartTimeendTime}}mutation{syntheticsCreateDailyMonitorDowntime(accountId:ACCOUNT_IDname:"MonitorDowntimeName"monitorGuids:["OptionalMonitorEntityGuid""AnotherOptionalMonitorEntityGuid"]timezone:"TIMEZONE"startTime:"yyyy-MM-ddTHH:mm:ss"endTime:"yyyy-MM-ddTHH:mm:ss"endRepeat:{onDate:"yyyy-MM-ddTHH:mm:ss",onRepeat:Int}){guidaccountIdnamemonitorGuidstimezonestartTimeendTimeendRepeat{onDateonRepeat}}}mutation{syntheticsCreateWeeklyMonitorDowntime(accountId:ACCOUNT_IDname:"MonitorDowntimeName"monitorGuids:["OptionalMonitorEntityGuid""AnotherOptionalMonitorEntityGuid"]timezone:"TIMEZONE"startTime:"yyyy-MM-ddTHH:mm:ss"endTime:"yyyy-MM-ddTHH:mm:ss"endRepeat:{onDate:"yyyy-MM-ddTHH:mm:ss",onRepeat:Int}maintenanceDays:[WeekDaysEnums]){guidaccountIdnamemonitorGuidstimezonestartTimeendTimeendRepeat{onDateonRepeat}maintenanceDays}}mutation{syntheticsCreateMonthlyMonitorDowntime(accountId:ACCOUNT_IDname:"MonitorDowntimeName"monitorGuids:["OptionalMonitorEntityGuid""AnotherOptionalMonitorEntityGuid"]timezone:"TIMEZONE"startTime:"yyyy-MM-ddTHH:mm:ss"endTime:"yyyy-MM-ddTHH:mm:ss"endRepeat:{onDate:"yyyy-MM-ddTHH:mm:ss",onRepeat:Int}frequency:{daysOfWeek:{weekDay:WeekDaysEnumordinalDayOfMonth:DayOfMonthOrdinal}daysOfMonth:[Int]}){guidaccountIdnamemonitorGuidstimezonestartTimeendTimeendRepeat{onDateonRepeat}frequency{daysOfWeek{weekDayordinalDayOfMonth}daysOfMonth}}}mutation{syntheticsEditMonitorDowntime(guid:"MonitorDowntimeEntityGuid",name:"MONITOR_DOWNTIME_NAME",monitorGuids:["OptionalMonitorEntityGuid","AnotherOptionalMonitorEntityGuid"],once:{timezone:"TIMEZONE",startTime:"yyyy-MM-ddTHH:mm:ss",endTime:"yyyy-MM-ddTHH:mm:ss"},daily:{timezone:"TIMEZONE",startTime:"yyyy-MM-ddTHH:mm:ss",endTime:"yyyy-MM-ddTHH:mm:ss",endRepeat:{onDate:"yyyy-MM-ddTHH:mm:ss",onRepeat:Int}},weekly:{timezone:"TIMEZONE",startTime:"yyyy-MM-ddTHH:mm:ss",endTime:"yyyy-MM-ddTHH:mm:ss",endRepeat:{onDate:"yyyy-MM-ddTHH:mm:ss",onRepeat:Int},maintenanceDays:[WeekDaysEnums]},monthly:{timezone:"TIMEZONE",startTime:"yyyy-MM-ddTHH:mm:ss",endTime:"yyyy-MM-ddTHH:mm:ss",endRepeat:{onDate:"yyyy-MM-ddTHH:mm:ss",onRepeat:Int},frequency:{daysOfWeek:{weekDay:WeekDaysEnum,ordinalDayOfMonth:DayOfMonthOrdinal},daysOfMonth:[Int]}){guid,accountId,name,monitorGuids,timezone,startTime,endTime,endRepeat{onDate,onRepeat},maintenanceDays,frequency{daysOfWeek{weekDay,ordinalDayOfMonth},daysOfMonth}}}mutation{syntheticsDeleteMonitorDowntime(guid:DOWNTIME_ENTITY_GUID){guid}}On this page
Was this doc helpful?