Mutation

update_schedule_item

Updates an existing schedule item. For example, you can change the date and time when a scan is due to start or how often a recurring scan should run.

Arguments

input: UpdateScheduleItemInput!

The fields used to specify which schedule item you want to update, and what changes you want to make.


Input Fields

id(): ID!
The unique identifier of the schedule item that you want to update.
site_id(): ID
The unique identifier of the site whose schedule item you want to update.
The scheduling information for the schedule item that you want to update, such as when the scan should run and how often.
scan_configuration_ids(): [ID!]
A list of scan configurations that you want to use for scans created from this schedule item. Note that when updating a schedule item using the API, the default scan configuration for the site is not automatically assigned. Therefore, even if you want to use the default configuration, you need to explicitly set it using this field.

Return Fields

schedule_item(): ScheduleItem!
The updated schedule item.

Example

Query
mutation UpdateScheduleItem($input: UpdateScheduleItemInput!) {
  update_schedule_item(input: $input) {
  schedule_item {
      id
      site {
        id
        name
      }
      schedule {
        initial_run_time
        rrule
      }
      scan_configurations {
        id
      }
      has_run_more_than_once
    }
  }
}
Variables
{
  "input": {
    "id": "17",
    "schedule": {
      "rrule_is_set": true,
      "initial_run_time_is_set": true,
      "rrule": "FREQ=DAILY;INTERVAL=1",
      "initial_run_time": "2020-06-10T08:00:00.000Z"
    }
  }
}