Commvault Schedules API

Manage job schedules and schedule policies

OpenAPI Specification

commvault-schedules-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Commvault Automation Agents Schedules API
  description: API for automating Commvault workflows, job scheduling, and policy management. Enables programmatic creation and execution of custom workflows, management of schedule policies, and configuration of automated operations for data protection environments.
  version: v2
  contact:
    name: Commvault Support
    url: https://www.commvault.com/support
  termsOfService: https://www.commvault.com/terms-of-use
servers:
- url: https://{webserver}/webconsole/api
  description: Commvault Web Server
  variables:
    webserver:
      default: webconsole.example.com
      description: Hostname of the Commvault Web Server
security:
- authToken: []
tags:
- name: Schedules
  description: Manage job schedules and schedule policies
paths:
  /Task:
    get:
      operationId: listSchedules
      summary: Commvault List all schedules
      description: Retrieves a list of all scheduled tasks configured in the CommServe, including backup schedules, auxiliary copy schedules, and administrative operation schedules.
      tags:
      - Schedules
      parameters:
      - name: taskType
        in: query
        required: false
        description: Filter by task type
        schema:
          type: string
          enum:
          - QR_BACKUP
          - QR_RESTORE
          - QR_AUX_COPY
          - QR_ADMIN
          - QR_DATA_AGING
      responses:
        '200':
          description: List of scheduled tasks
          content:
            application/json:
              schema:
                type: object
                properties:
                  taskDetail:
                    type: array
                    items:
                      $ref: '#/components/schemas/ScheduledTask'
        '401':
          description: Unauthorized
  /Task/{taskId}:
    get:
      operationId: getSchedule
      summary: Commvault Get schedule details
      description: Retrieves detailed configuration of a specific scheduled task, including its schedule pattern, associated entities, and execution options.
      tags:
      - Schedules
      parameters:
      - $ref: '#/components/parameters/taskId'
      responses:
        '200':
          description: Scheduled task details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduledTask'
        '401':
          description: Unauthorized
        '404':
          description: Scheduled task not found
    put:
      operationId: updateSchedule
      summary: Commvault Update a schedule
      description: Updates the configuration of an existing scheduled task, including its schedule pattern, enabled state, and execution options.
      tags:
      - Schedules
      parameters:
      - $ref: '#/components/parameters/taskId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateScheduleRequest'
      responses:
        '200':
          description: Schedule updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericResponse'
        '400':
          description: Invalid request
        '401':
          description: Unauthorized
        '404':
          description: Scheduled task not found
    delete:
      operationId: deleteSchedule
      summary: Commvault Delete a schedule
      description: Deletes a scheduled task from the CommServe.
      tags:
      - Schedules
      parameters:
      - $ref: '#/components/parameters/taskId'
      responses:
        '200':
          description: Schedule deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericResponse'
        '401':
          description: Unauthorized
        '404':
          description: Scheduled task not found
  /Task/{taskId}/Action/Enable:
    post:
      operationId: enableSchedule
      summary: Commvault Enable a schedule
      description: Enables a previously disabled scheduled task.
      tags:
      - Schedules
      parameters:
      - $ref: '#/components/parameters/taskId'
      responses:
        '200':
          description: Schedule enabled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericResponse'
        '401':
          description: Unauthorized
        '404':
          description: Scheduled task not found
  /Task/{taskId}/Action/Disable:
    post:
      operationId: disableSchedule
      summary: Commvault Disable a schedule
      description: Disables a scheduled task, preventing it from executing until re-enabled.
      tags:
      - Schedules
      parameters:
      - $ref: '#/components/parameters/taskId'
      responses:
        '200':
          description: Schedule disabled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericResponse'
        '401':
          description: Unauthorized
        '404':
          description: Scheduled task not found
components:
  parameters:
    taskId:
      name: taskId
      in: path
      required: true
      description: Unique identifier for the scheduled task
      schema:
        type: integer
  schemas:
    UpdateScheduleRequest:
      type: object
      properties:
        taskInfo:
          type: object
          properties:
            taskName:
              type: string
              description: Updated task name
            enabled:
              type: boolean
              description: Enable or disable the schedule
            subTasks:
              type: array
              items:
                type: object
                properties:
                  pattern:
                    $ref: '#/components/schemas/SchedulePattern'
    SchedulePattern:
      type: object
      properties:
        freq_type:
          type: string
          description: Frequency type
          enum:
          - ONE_TIME
          - DAILY
          - WEEKLY
          - MONTHLY
          - CONTINUOUS
          - AUTOMATIC
        active_start_time:
          type: integer
          description: Schedule start time in seconds since midnight
        active_end_time:
          type: integer
          description: Schedule end time in seconds since midnight
        freq_interval:
          type: integer
          description: Frequency interval value
        freq_recurrence_factor:
          type: integer
          description: Recurrence factor (e.g., every N days/weeks)
        daysOfWeek:
          type: array
          items:
            type: string
            enum:
            - Sunday
            - Monday
            - Tuesday
            - Wednesday
            - Thursday
            - Friday
            - Saturday
          description: Days of the week for weekly schedules
    GenericResponse:
      type: object
      properties:
        errorCode:
          type: integer
          description: Error code (0 indicates success)
        errorMessage:
          type: string
          description: Human-readable error or success message
    ScheduledTask:
      type: object
      properties:
        taskId:
          type: integer
          description: Unique task identifier
        taskName:
          type: string
          description: Name of the scheduled task
        taskType:
          type: string
          description: Type of scheduled operation
          enum:
          - QR_BACKUP
          - QR_RESTORE
          - QR_AUX_COPY
          - QR_ADMIN
          - QR_DATA_AGING
        enabled:
          type: boolean
          description: Whether the schedule is enabled
        subTasks:
          type: array
          items:
            type: object
            properties:
              subTaskName:
                type: string
              operationType:
                type: string
              pattern:
                $ref: '#/components/schemas/SchedulePattern'
        associations:
          type: array
          items:
            type: object
            properties:
              clientName:
                type: string
              subclientName:
                type: string
              appName:
                type: string
  securitySchemes:
    authToken:
      type: apiKey
      in: header
      name: Authtoken
      description: QSDK authentication token obtained from the Login endpoint.
externalDocs:
  description: Commvault Automation API Documentation
  url: https://documentation.commvault.com/v11/essential/rest_api_automation.html