swagger: '2.0'
info:
  version: v1
  title: Connector Maintenance Schedule API
host: 'api.cloud.com'
schemes:
  - https
basePath: /maintenance
paths: 
  /:
    get:
      tags:
        - Maintenance
      summary: ' [ServiceKey][BearerToken]'
      operationId: Maintenance_GetAll
      consumes: []
      produces:
        - application/json
        - text/json
      parameters:
        - name: Authorization
          in: header
          description: The access token.
          required: true
          type: string
        - name: Citrix-CustomerId
          in: header
          description: ID of the customer.
          required: true
          type: string
      responses:
        '200':
          description: OK
          schema:
            type: array
            items:
              $ref: '#/definitions/Citrix.CloudServices.AgentHub.Api.Maintenance.MaintenanceModel'
    post:
      tags:
        - Maintenance
      summary: ' [ServiceKey][BearerToken]'
      operationId: Maintenance_Create
      consumes:
        - application/json
        - text/json
      produces:
        - application/json
        - text/json
      parameters:
        - name: Authorization
          in: header
          description: The access token.
          required: true
          type: string
        - name: Citrix-CustomerId
          in: header
          description: ID of the customer.
          required: true
          type: string
        - name: model
          in: body
          required: true
          schema:
            $ref: '#/definitions/Citrix.CloudServices.AgentHub.Api.Maintenance.MaintenanceModel'
      responses:
        '200':
          description: OK
          schema:
            type: array
            items:
              $ref: '#/definitions/Citrix.CloudServices.AgentHub.Api.Maintenance.MaintenanceModel'
    delete:
      tags:
        - Maintenance
      summary: ' [ServiceKey][BearerToken]'
      operationId: Maintenance_DeleteAll
      consumes: []
      produces: []
      parameters:
        - name: Authorization
          in: header
          description: The access token.
          required: true
          type: string
        - name: Citrix-CustomerId
          in: header
          description: ID of the customer.
          required: true
          type: string
      responses:
        '204':
          description: No Content
  /{location}:
    get:
      tags:
        - Maintenance
      summary: ' [ServiceKey][BearerToken]'
      operationId: Maintenance_Get
      consumes: []
      produces:
        - application/json
        - text/json
      parameters:
        - name: Authorization
          in: header
          description: The access token.
          required: true
          type: string
        - name: Citrix-CustomerId
          in: header
          description: ID of the customer.
          required: true
          type: string
        - name: location
          in: path
          required: true
          type: string
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/Citrix.CloudServices.AgentHub.Api.Maintenance.MaintenanceModel'
    put:
      tags:
        - Maintenance
      summary: ' [ServiceKey][BearerToken]'
      operationId: Maintenance_Update
      consumes:
        - application/json
        - text/json
      produces:
        - application/json
        - text/json
      parameters:
        - name: Authorization
          in: header
          description: The access token.
          required: true
          type: string
        - name: Citrix-CustomerId
          in: header
          description: ID of the customer.
          required: true
          type: string
        - name: location
          in: path
          required: true
          type: string
        - name: model
          in: body
          required: true
          schema:
            $ref: '#/definitions/Citrix.CloudServices.AgentHub.Api.Maintenance.UpdateMaintenanceModel'
      responses:
        '200':
          description: OK
          schema:
            type: array
            items:
              $ref: '#/definitions/Citrix.CloudServices.AgentHub.Api.Maintenance.MaintenanceModel'
    delete:
      tags:
        - Maintenance
      summary: ' [ServiceKey][BearerToken]'
      operationId: Maintenance_Delete
      consumes: []
      produces: []
      parameters:
        - name: Authorization
          in: header
          description: The access token.
          required: true
          type: string
        - name: Citrix-CustomerId
          in: header
          description: ID of the customer.
          required: true
          type: string
        - name: location
          in: path
          required: true
          type: string
      responses:
        '204':
          description: No Content
  /history/{edgeServerId}:
    get:
      tags:
        - Maintenance
      summary: ' [ServiceKey][BearerToken]'
      operationId: Maintenance_GetHistory
      consumes: []
      produces:
        - application/json
        - text/json
      parameters:
        - name: Authorization
          in: header
          description: The access token.
          required: true
          type: string
        - name: Citrix-CustomerId
          in: header
          description: ID of the customer.
          required: true
          type: string
        - name: edgeServerId
          in: path
          required: true
          type: string
        - name: take
          in: query
          required: false
          type: integer
          format: int32
      responses:
        '200':
          description: OK
          schema:
            type: array
            items:
              $ref: '#/definitions/Citrix.CloudServices.AgentHub.Api.Maintenance.MaintenanceHistoryModel'
  /override:
    put:
      tags:
        - Maintenance
      summary: ' [ServiceKey][BearerToken]'
      operationId: Maintenance_Override
      consumes:
        - application/json
        - text/json
      produces:
        - application/json
        - text/json
      parameters:
        - name: Authorization
          in: header
          description: The access token.
          required: true
          type: string
        - name: Citrix-CustomerId
          in: header
          description: ID of the customer.
          required: true
          type: string
        - name: model
          in: body
          required: true
          schema:
            $ref: '#/definitions/Citrix.CloudServices.AgentHub.Api.Maintenance.UpdateMaintenanceHistoryOverrideModel'
      responses:
        '200':
          description: OK
          schema:
            type: array
            items:
              $ref: '#/definitions/Citrix.CloudServices.AgentHub.Api.Maintenance.MaintenanceHistoryModel'
  /delay:
    put:
      tags:
        - Maintenance
      summary: ' [ServiceKey][BearerToken]'
      operationId: Maintenance_Delay
      consumes:
        - application/json
        - text/json
      produces:
        - application/json
        - text/json
      parameters:
        - name: Authorization
          in: header
          description: The access token.
          required: true
          type: string
        - name: Citrix-CustomerId
          in: header
          description: ID of the customer.
          required: true
          type: string
        - name: model
          in: body
          required: true
          schema:
            $ref: '#/definitions/Citrix.CloudServices.AgentHub.Api.Maintenance.UpdateMaintenanceHistoryDelayModel'
      responses:
        '200':
          description: OK
          schema:
            type: array
            items:
              $ref: '#/definitions/Citrix.CloudServices.AgentHub.Api.Maintenance.MaintenanceHistoryModel'
definitions:
  Citrix.CloudServices.AgentHub.Api.Maintenance.MaintenanceModel:
    type: object
    properties:
      location:
        type: string
      dayOfWeek:
        enum:
          - Undefined
          - Sunday
          - Monday
          - Tuesday
          - Wednesday
          - Thursday
          - Friday
          - Saturday
        type: string
      start:
        type: string
      order:
        enum:
          - Early
          - Normal
          - Late
        type: string
  Citrix.CloudServices.AgentHub.Api.Maintenance.UpdateMaintenanceModel:
    type: object
    properties:
      dayOfWeek:
        enum:
          - Undefined
          - Sunday
          - Monday
          - Tuesday
          - Wednesday
          - Thursday
          - Friday
          - Saturday
        type: string
      start:
        type: string
      order:
        enum:
          - Early
          - Normal
          - Late
        type: string
  Citrix.CloudServices.AgentHub.Api.Maintenance.MaintenanceHistoryModel:
    type: object
    properties:
      createdOn:
        format: date-time
        type: string
      scheduledStart:
        format: date-time
        type: string
      start:
        format: date-time
        type: string
      end:
        format: date-time
        type: string
      duration:
        type: string
      from:
        type: string
      to:
        type: string
      override:
        type: string
      status:
        enum:
          - None
          - Scheduled
          - InProgress
          - Succeeded
          - Skipped
        type: string
      delayed:
        type: boolean
  Citrix.CloudServices.AgentHub.Api.Maintenance.UpdateMaintenanceHistoryOverrideModel:
    type: object
    properties:
      locationId:
        type: string
      edgeServerId:
        type: string
      override:
        type: boolean
  Citrix.CloudServices.AgentHub.Api.Maintenance.UpdateMaintenanceHistoryDelayModel:
    type: object
    properties:
      locationId:
        type: string
      edgeServerId:
        type: string
      delayed:
        type: boolean
 
