swagger: '2.0'
info:
  version: 2.0/3.0
  title: Alvaria Cloud Quality REST API
  contact:
    name: Alvaria
    url: 'https://www.alvaria.com/'
  license:
    name: 'License: Creative Commons Attribution 4.0 International Public License'
    url: 'https://creativecommons.org/licenses/by/4.0/legalcode'
  description: >+
    ## Overview


    Alvaria&trade; Cloud Quality REST APIs are grouped into two categories:
    
    ## Recordings
    
    Recordings APIs enable developers to retrieve recording
    metadata and signed URLs pointing to media files. The signed URLs give
    clients time-limited access (default is one hour) to recording media files,
    which are in native storage format with no transcoding performed prior to
    download.
     Alvaria&trade; Cloud Quality APIs support recordings for the following media channel types:
     - __voice__
     - __chat__
     - __sms__
     - __screen__
     - __email__
    ## Recording Control
    
    Recording Control APIs enable developers to pause/resume a recording and retrieve the recording status of an interaction based on the interaction Id
    
    
    ## Notes:
    
    V2 endpoints are being deprecated by Alvaria, please move your applications to V3 replacement endpoints before end of support.
    
    
    Following are the key differences between V2 and V3 endpoints:
    
    - V3 __recordings__ endpoint returns __RecordingMetadataCollection__ instead of __RecordingMetadata__
    
    - V3 __media__ endpoint returns __RecordingMetadataCollection__ instead of __RecordingMedia__
    
    - Replace schema definition __WorkType__ with __WorkTypeV3__
    
    - Replace schema definition __Switch__  with __SwitchV3__
    
    - Replace schema definition __Chat__  with __ChatV3__
    
    - Replace schema definition __EmailAddress__ with __EmailAddressV3__
    
host: orgId.via.aspect-cloud.net
schemes:
  - https
consumes:
  - application/json
produces:
  - application/json
paths:
  '/via/v3/organizations/{orgId}/quality/recordings':
    get:
      tags:
        - Recordings
      summary: >-
        Retrieve Recordings
      operationId: Get Recordings
      description: Retrieves a list of recordings.
      parameters:
        - name: orgId
          in: path
          description: Alvaria-generated unique identifier for the organization.
          required: true
          type: string
        - name: beginTime
          description: >-
            Beginning date and time of the search range, specified in ISO 8601
            format and in UTC time zone
          in: query
          required: true
          type: string
          format: date-time
        - name: endTime
          description: >-
            End date and time of the search range, specified in ISO 8601 format
            and in UTC time zone
          in: query
          required: false
          type: string
          format: date-time
        - name: maxResults
          in: query
          description: >-
            Maximum results. This is used to specify the maximum number of records to return in the result set. You can use this to set a result set limit that is less than the system/API-specific limit.
          required: false
          type: integer
          format: int32
          minimum: 1
          maximum: 1000
          default: 1000
        - name: canSpeechMonitor
          in: query
          description: >-
            Records to return based on speech monitoring setting of associated
            Agent. When this parameter is not specified or parameter with value
            true is specified, returns records of only speech enabled agents.
            When value false is specified returns all agent records.
          required: false
          type: boolean
          default: true
        - name: searchByEndDateTime
          in: query
          description: >-
            Records to return based on end datetime of the interaction it the value set as true.
            When this parameter is not specified or parameter with
            value false is specified, will return the data based on begin time.
          required: false
          type: boolean
          default: false    
        - name: channelType
          in: query
          description: >-
            Records to return based on their channel type. 
          required: false
          type: string
          enum:
            - VoiceAndScreen
            - ScreenOnly
            - VoiceOnly
            - AllVoice
            - Email
            - Chat
            - SMS
            - Task
            - VoiceMail
            - Unknown
        - name: workType
          in: query
          description: >-
            Records to return based on their work type, using name or unique identifier.
          type: string
        - name : teamId
          in: query
          description: >-
            Records to return based on the team the user associated with the interaction belongs to, using team name or the team's unique identifier. The team's unique identifier can be acquired through the provisioning API.
          type: string
        - name: Authorization
          in: header
          description: |-
            Authentication token with the value: 'Bearer {accessToken}', where {accessToken} was returned from a call to the authorization endpoint.
          required: true
          type: string
        - name: x-api-key
          in: header
          description: Alvaria-provided value used to track API endpoint usage
          required: true
          type: string
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/RecordingMetadataCollection'
        '206':
          description: Partial Content
          schema:
           $ref: '#/definitions/RecordingMetadataCollection'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/ErrorResponse'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/ErrorResponse'
        '405':
          description: Method Not Allowed
          schema:
            $ref: '#/definitions/ErrorResponse'
        '408':
          description: Request Timeout
          schema:
            $ref: '#/definitions/ErrorResponse'
        '410':
          description: Gone
          schema:
            $ref: '#/definitions/ErrorResponse'
        '422':
          description: Unprocessable Entity
          schema:
            $ref: '#/definitions/ErrorResponse'
        '429':
          description: Too Many Requests
          schema:
            $ref: '#/definitions/ErrorResponse'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/ErrorResponse'
        '503':
          description: Service Unavailable
          schema:
            $ref: '#/definitions/ErrorResponse'
      security:
        - oauth:
            - qualityapi.recordings
    post:
      tags:
        - Recordings
      summary: Retrieve Recordings By Id
      operationId: Get Recordings By Unique ID
      description: Retrieves a list of recordings for the provided recording IDs.
      parameters:
        - name: orgId
          description: Alvaria-generated unique identifier for the organization.
          in: path
          required: true
          type: string
        - name: recordingIds
          in: body
          description: List of Alvaria-generated unique identifiers for the desired recording instances.
          required: true
          schema:
            $ref: '#/definitions/RecordingIds'
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/RecordingMetadataCollection'
        '206':
          description: Partial Content
          schema:
            $ref: '#/definitions/RecordingMetadataCollection'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/ErrorResponse'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/ErrorResponse'
        '405':
          description: Method Not Allowed
          schema:
            $ref: '#/definitions/ErrorResponse'
        '408':
          description: Request Timeout
          schema:
            $ref: '#/definitions/ErrorResponse'
        '410':
          description: Gone
          schema:
            $ref: '#/definitions/ErrorResponse'
        '422':
          description: Unprocessable Entity
          schema:
            $ref: '#/definitions/ErrorResponse'
        '429':
          description: Too Many Requests
          schema:
            $ref: '#/definitions/ErrorResponse'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/ErrorResponse'
        '503':
          description: Service Unavailable
          schema:
            $ref: '#/definitions/ErrorResponse'
      security:
        - oauth:
          - qualityapi.recordings

  '/via/v3/organizations/{orgId}/quality/recordings/{recordingId}/media':
    get:
      tags:
        - Recordings
      summary: Retrieve Media Handles
      operationId: Get Recording Media
      description: Retrieves media for a recording.
      parameters:
        - name: orgId
          description: Alvaria-generated unique identifier for the organization.
          in: path
          required: true
          type: string
        - name: recordingId
          in: path
          description: >-
            Alvaria-generated unique identifier for a recording instance. The ID
            is determined by using the GET /recordings endpoint
          required: true
          type: string
          format: uuid
        - name: Authorization
          in: header
          description: >-
            Authentication token with the value: 'Bearer {accessToken}', where {accessToken} was returned from a call to the authorization endpoint.
          required: true
          type: string
        - name: x-api-key
          in: header
          description: Alvaria-provided value used to track API endpoint usage
          required: true
          type: string
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/RecordingMediaCollection'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/ErrorResponse'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/ErrorResponse'
        '405':
          description: Method Not Allowed
          schema:
            $ref: '#/definitions/ErrorResponse'
        '408':
          description: Request Timeout
          schema:
            $ref: '#/definitions/ErrorResponse'
        '410':
          description: Gone
          schema:
            $ref: '#/definitions/ErrorResponse'
        '422':
          description: Unprocessable Entity
          schema:
            $ref: '#/definitions/ErrorResponse'
        '429':
          description: Too Many Requests
          schema:
            $ref: '#/definitions/ErrorResponse'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/ErrorResponse'
        '503':
          description: Service Unavailable
          schema:
            $ref: '#/definitions/ErrorResponse'
      security:
        - oauth:
            - qualityapi.recordings
  
  '/via/v3/organizations/{orgId}/quality/recordings/recordingId':
    get:
      tags:
        - Recordings
      summary: Retrieve Recording ID
      operationId: Retrieve Recording ID
      description: Retrieve the unique identifier for a particular recording.
      parameters:
        - name: orgId
          description: Alvaria-generated unique identifier for the organization.
          in: path
          required: true
          type: string
        - name: interactionLegId
          in: query
          description: >-
            The unique identifier of the interaction from the telephony system. <br>
            Example: 8570.1220
          required: true
          type: string
      responses:
        '200':
          description: OK
          schema:
            type: string
            format: uuid
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/ErrorResponse'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/ErrorResponse'
        '405':
          description: Method Not Allowed
          schema:
            $ref: '#/definitions/ErrorResponse'
        '408':
          description: Request Timeout
          schema:
            $ref: '#/definitions/ErrorResponse'
        '410':
          description: Gone
          schema:
            $ref: '#/definitions/ErrorResponse'
        '422':
          description: Unprocessable Entity
          schema:
            $ref: '#/definitions/ErrorResponse'
        '429':
          description: Too Many Requests
          schema:
            $ref: '#/definitions/ErrorResponse'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/ErrorResponse'
        '503':
          description: Service Unavailable
          schema:
            $ref: '#/definitions/ErrorResponse'
      security:
        - oauth:
            - qualityapi.recordings
            
  '/via/v3/organizations/{orgId}/quality/evaluations/scorecardtemplates':
    post:
      tags:
        - Evaluations
      summary: Retrieve Scorecard Templates
      operationId: Retrieve Scorecard Template Metadata
      description: Retrieve the metadata for a given set of scorecard templates.
      parameters:
        - name: orgId
          in: path
          description: Alvaria-generated unique identifier for the organization.
          required: true
          type: string
        - name: getScorecardTemplatesParmsSchema
          in: body
          required: true
          schema:
            $ref: '#/definitions/GetScorecardTemplatesParmsSchema'
        - name: Authorization
          in: header
          description: |-
            Authentication token with the value: 'Bearer {accessToken}', where {accessToken} was returned from a call to the authorization endpoint.
          required: true
          type: string
        - name: x-api-key
          in: header
          description: Alvaria-provided value used to track API endpoint usage
          required: true
          type: string
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/ScorecardTemplateMetadataCollection'
        '206':
          description: Partial Content
          schema:
            $ref: '#/definitions/ScorecardTemplateMetadataCollection'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/ErrorResponse'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/ErrorResponse'
        '405':
          description: Method Not Allowed
          schema:
            $ref: '#/definitions/ErrorResponse'
        '408':
          description: Request Timeout
          schema:
            $ref: '#/definitions/ErrorResponse'
        '410':
          description: Gone
          schema:
            $ref: '#/definitions/ErrorResponse'
        '422':
          description: Unprocessable Entity
          schema:
            $ref: '#/definitions/ErrorResponse'
        '429':
          description: Too Many Requests
          schema:
            $ref: '#/definitions/ErrorResponse'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/ErrorResponse'
        '503':
          description: Service Unavailable
          schema:
            $ref: '#/definitions/ErrorResponse'
      security:
        - oauth:
            - qualityapi.evaluations
  
  '/via/v3/organizations/{orgId}/quality/evaluations/scorecards':
    get:
      tags:
        - Evaluations
      summary: Retrieve Scorecard Metadata
      operationId: Retrieve Scorecard Metadata
      description: Retrieve the metadata for scorecards created in a selected date range.
      parameters:
        - name: orgId
          in: path
          description: Alvaria-generated unique identifier for the organization.
          required: true
          type: string
        - name: beginTime
          description: >-
            Beginning date and time of the search range, specified in ISO 8601
            format and in UTC time zone
          in: query
          required: true
          type: string
          format: date-time
        - name: endTime
          description: >-
            End date and time of the search range, specified in ISO 8601 format
            and in UTC time zone
          in: query
          required: false
          type: string
          format: date-time
        - name: maxResults
          in: query
          description: >-
            Maximum results. This is used to specify the maximum number of records to return in the result set. You can use this to set a result set limit that is less than the system/API-specific limit.
          required: false
          type: integer
          format: int32
          minimum: 1
          maximum: 1000
          default: 1000
        - name: startIndex
          in: query
          description: >-
            The start index specifies the the beginning record for the result set. This is a zero based value. This can be used in conjuction with maxResults to return a specific range of items within a result set.
          required: false
          type: integer
          format: int32
          minimum: 0
          default: 0
        - name: includeTraining
          in: query
          description: >-
            specifies whether to include training scorecards in the search results.
          required: false
          type: boolean
          default: false
        - name: includeIncompleteScorecards
          in: query
          description: >-
            specifies whether to include incomplete scorecards in the search results.
          required: false
          type: boolean
          default: false
        - name: scorecardTemplateId
          in: query
          description: >-
            Alvaria-generated unique identifier for a scorecard template. If provided, results will be limited to scorecards using the scorecard template corresponding to the specified ID.
          required: false
          type: string
          format: uuid
        - name: evaluator
          in: query
          description: >-
            Filter results based on the evaluator or creator of the scorecard, using the username or unique identifier.
          required: false
          type: string
        - name: agent
          in: query
          description: >-
            Filter results based on the agent the scorecard is evaluated against, using the username or unique identifier.
          required: false
          type: string
        - name: Authorization
          in: header
          description: |-
            Authentication token with the value: 'Bearer {accessToken}', where {accessToken} was returned from a call to the authorization endpoint.
          required: true
          type: string
        - name: x-api-key
          in: header
          description: Alvaria-provided value used to track API endpoint usage
          required: true
          type: string
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/ScorecardMetadataCollection'
        '206':
          description: Partial Content
          schema:
            $ref: '#/definitions/ScorecardMetadataCollection'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/ErrorResponse'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/ErrorResponse'
        '405':
          description: Method Not Allowed
          schema:
            $ref: '#/definitions/ErrorResponse'
        '408':
          description: Request Timeout
          schema:
            $ref: '#/definitions/ErrorResponse'
        '410':
          description: Gone
          schema:
            $ref: '#/definitions/ErrorResponse'
        '422':
          description: Unprocessable Entity
          schema:
            $ref: '#/definitions/ErrorResponse'
        '429':
          description: Too Many Requests
          schema:
            $ref: '#/definitions/ErrorResponse'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/ErrorResponse'
        '503':
          description: Service Unavailable
          schema:
            $ref: '#/definitions/ErrorResponse'
      security:
        - oauth:
            - qualityapi.evaluations
  
  '/via/v3/organizations/{orgId}/quality/recordings/{recordingId}/customInformation':
      put:
        tags:
          - Recordings
        summary: Update Custom Information
        operationId: Update Custom Information
        description: Updates a custom information value for a given media item.
        parameters:
          - name: orgId
            description: Alvaria-generated unique identifier for the organization.
            in: path
            required: true
            type: string
          - name: recordingId
            in: path
            description: >-
              Alvaria generated unique identifier of the recording. 
                Can be obtained from the recordingId end point.
            required: true
            format: uuid
            type: string
          - name: customInfoKey
            in: query
            description: >-
              The key name of the custom information to update.
            required: true
            type: string
          - name: customInfoValue
            in: query
            description: >-
              The value being updated for the given custom information key.
            required: true
            type: string
        responses:
          '200':
            description: OK
          '400':
            description: Bad Request
            schema:
              $ref: '#/definitions/ErrorResponse'
          '401':
            description: Unauthorized
          '404':
            description: Not Found
            schema:
              $ref: '#/definitions/ErrorResponse'
          '405':
            description: Method Not Allowed
            schema:
              $ref: '#/definitions/ErrorResponse'
          '408':
            description: Request Timeout
            schema:
              $ref: '#/definitions/ErrorResponse'
          '410':
            description: Gone
            schema:
              $ref: '#/definitions/ErrorResponse'
          '422':
            description: Unprocessable Entity
            schema:
              $ref: '#/definitions/ErrorResponse'
          '429':
            description: Too Many Requests
            schema:
              $ref: '#/definitions/ErrorResponse'
          '500':
            description: Internal Server Error
            schema:
              $ref: '#/definitions/ErrorResponse'
          '503':
            description: Service Unavailable
            schema:
              $ref: '#/definitions/ErrorResponse'
        security:
          - oauth:
              - qualityapi.recordings
      post:
        tags:
          - Recordings
        summary: Add Custom Information
        operationId: Add Custom Information
        description: Adds one or more custom information key-value pairs for a given media item.
        parameters:
          - name: orgId
            description: Alvaria-generated unique identifier for the organization.
            in: path
            required: true
            type: string
          - name: recordingId
            in: path
            description: >-
              Alvaria generated unique identifier of the recording. 
                Can be obtained from the recordingId end point.
            required: true
            format: uuid
            type: string
          - name: customInformation
            in: body
            description: List of custom information key-value pairs.
            required: true
            schema:
              $ref: '#/definitions/AddCustomInformation'
        responses:
          '200':
            description: OK
          '400':
            description: Bad Request
            schema:
              $ref: '#/definitions/ErrorResponse'
          '401':
            description: Unauthorized
          '404':
            description: Not Found
            schema:
              $ref: '#/definitions/ErrorResponse'
          '405':
            description: Method Not Allowed
            schema:
              $ref: '#/definitions/ErrorResponse'
          '408':
            description: Request Timeout
            schema:
              $ref: '#/definitions/ErrorResponse'
          '410':
            description: Gone
            schema:
              $ref: '#/definitions/ErrorResponse'
          '422':
            description: Unprocessable Entity
            schema:
              $ref: '#/definitions/ErrorResponse'
          '429':
            description: Too Many Requests
            schema:
              $ref: '#/definitions/ErrorResponse'
          '500':
            description: Internal Server Error
            schema:
              $ref: '#/definitions/ErrorResponse'
          '503':
            description: Service Unavailable
            schema:
              $ref: '#/definitions/ErrorResponse'      
        security:
          - oauth:
              - qualityapi.recordings
  
  '/via/v3/organizations/{orgId}/quality/recordings/pause':
    post:
      tags:
        - Recording Control
      summary: Pause Recording
      operationId: Pause Recording
      description: Pause Recording associated with an agent
      parameters:
        - name: orgId
          in: path
          description: Alvaria-generated unique identifier for the organization.
          required: true
          type: string
        - name: pauseRecordingParms
          in: body
          required: true
          schema:
            $ref: '#/definitions/PauseRecordingParmsSchema'
        - name: Authorization
          in: header
          description: |-
            Authentication token with the value: 'Bearer {accessToken}', where {accessToken} was returned from a call to the authorization endpoint.
          required: true
          type: string
        - name: x-api-key
          in: header
          description: Alvaria-provided value used to track API endpoint usage.
          required: true
          type: string
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/RecordingControlResponseSchema'
        '400':
          description: Client Error - Bad Request
          schema:
            $ref: '#/definitions/ErrorResponse'
        '401':
          description: Client Error - Unauthorized
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/ErrorResponse'
        '405':
          description: Client Error - Method Not Allowed
          schema:
            $ref: '#/definitions/ErrorResponse'
        '408':
          description: Request Timeout
          schema:
            $ref: '#/definitions/ErrorResponse'
        '500':
          description: Server Error - Internal Server Error
          schema:
            $ref: '#/definitions/ErrorResponse'
        '503':
          description: Server Error - Service Unavailable
          schema:
            $ref: '#/definitions/ErrorResponse'
      security:
        - oauth:
            - qualityapi.recordingcommands
  '/via/v3/organizations/{orgId}/quality/recordings/resume':
    post:
      tags:
        - Recording Control
      summary: Resume Recording
      operationId: Resume Recording
      description: Resume Recording associated with an agent
      parameters:
        - name: orgId
          in: path
          description: Alvaria-generated unique identifier for the organization.
          required: true
          type: string
        - name: resumeRecordingParms
          in: body
          required: true
          schema:
            $ref: '#/definitions/ResumeRecordingParmsSchema'
        - name: Authorization
          in: header
          description: |-
            Authentication token with the value: 'Bearer {accessToken}', where {accessToken} was returned from a call to the authorization endpoint.
          required: true
          type: string
        - name: x-api-key
          in: header
          description: Alvaria-provided value used to track API endpoint usage.
          required: true
          type: string
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/RecordingControlResponseSchema'
        '400':
          description: Client Error - Bad Request
          schema:
            $ref: '#/definitions/ErrorResponse'
        '401':
          description: Client Error - Unauthorized
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/ErrorResponse'
        '405':
          description: Client Error - Method Not Allowed
          schema:
            $ref: '#/definitions/ErrorResponse'
        '408':
          description: Request Timeout
          schema:
            $ref: '#/definitions/ErrorResponse'
        '500':
          description: Server Error - Internal Server Error
          schema:
            $ref: '#/definitions/ErrorResponse'
        '503':
          description: Server Error - Service Unavailable
          schema:
            $ref: '#/definitions/ErrorResponse'
      security:
        - oauth:
            - qualityapi.recordingcommands
  '/via/v3/organizations/{orgId}/quality/recordings/status':
    post:
      tags:
        - Recording Control
      summary: Get Recording Status
      operationId: Get Recording Status
      description: Retrieve Recording status of an interaction based on the agent and interaction Id
      parameters:
        - name: orgId
          in: path
          description: Alvaria-generated unique identifier for the organization.
          required: true
          type: string
        - name: recordingStatusParms
          in: body
          required: true
          schema:
            $ref: '#/definitions/RecordingStatusParmsSchema'
        - name: Authorization
          in: header
          description: |-          
            Authentication token with the value: 'Bearer {accessToken}', where {accessToken} was returned from a call to the authorization endpoint.
          required: true
          type: string
        - name: x-api-key
          in: header
          description: Alvaria-provided value used to track API endpoint usage
          required: true
          type: string
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/RecordingControlResponseSchema'
        '400':
          description: Client Error - Bad Request
          schema:
            $ref: '#/definitions/ErrorResponse'
        '401':
          description: Client Error - Unauthorized
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/ErrorResponse'
        '405':
          description: Client Error - Method Not Allowed
          schema:
            $ref: '#/definitions/ErrorResponse'
        '408':
          description: Request Timeout
          schema:
            $ref: '#/definitions/ErrorResponse'
        '500':
          description: Server Error - Internal Server Error
          schema:
            $ref: '#/definitions/ErrorResponse'
        '503':
          description: Server Error - Service Unavailable
          schema:
            $ref: '#/definitions/ErrorResponse'
      security:
        - oauth:
            - qualityapi.recordingcommands
  '/via/v3/organizations/{orgId}/quality/recordings/start':
    post:
      tags:
        - Recording Control
      summary: Start Recording
      operationId: Start Recording
      description: Start recording associated with an agent
      parameters:
        - name: orgId
          in: path
          description: Alvaria-generated unique identifier for the organization.
          required: true
          type: string
        - name: pauseRecordingParms
          in: body
          required: true
          schema:
            $ref: '#/definitions/StartRecordingParmsSchema'
        - name: Authorization
          in: header
          description: |-
            Authentication token with the value: 'Bearer {accessToken}', where {accessToken} was returned from a call to the authorization endpoint.
          required: true
          type: string
        - name: x-api-key
          in: header
          description: Alvaria-provided value used to track API endpoint usage.
          required: true
          type: string
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/RecordingControlResponseSchema'
        '400':
          description: Client Error - Bad Request
          schema:
            $ref: '#/definitions/ErrorResponse'
        '401':
          description: Client Error - Unauthorized
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/ErrorResponse'
        '405':
          description: Client Error - Method Not Allowed
          schema:
            $ref: '#/definitions/ErrorResponse'
        '408':
          description: Request Timeout
          schema:
            $ref: '#/definitions/ErrorResponse'
        '500':
          description: Server Error - Internal Server Error
          schema:
            $ref: '#/definitions/ErrorResponse'
        '503':
          description: Server Error - Service Unavailable
          schema:
            $ref: '#/definitions/ErrorResponse'
      security:
        - oauth:
            - qualityapi.recordingcommands
  '/via/v3/organizations/{orgId}/quality/recordings/stop':
    post:
      tags:
        - Recording Control
      summary: Stop Recording
      operationId: Stop Recording
      description: Stop recording associated with an agent
      parameters:
        - name: orgId
          in: path
          description: Alvaria-generated unique identifier for the organization.
          required: true
          type: string
        - name: pauseRecordingParms
          in: body
          required: true
          schema:
            $ref: '#/definitions/StopRecordingParmsSchema'
        - name: Authorization
          in: header
          description: |-
            Authentication token with the value: 'Bearer {accessToken}', where {accessToken} was returned from a call to the authorization endpoint.
          required: true
          type: string
        - name: x-api-key
          in: header
          description: Alvaria-provided value used to track API endpoint usage.
          required: true
          type: string
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/RecordingControlResponseSchema'
        '400':
          description: Client Error - Bad Request
          schema:
            $ref: '#/definitions/ErrorResponse'
        '401':
          description: Client Error - Unauthorized
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/ErrorResponse'
        '405':
          description: Client Error - Method Not Allowed
          schema:
            $ref: '#/definitions/ErrorResponse'
        '408':
          description: Request Timeout
          schema:
            $ref: '#/definitions/ErrorResponse'
        '500':
          description: Server Error - Internal Server Error
          schema:
            $ref: '#/definitions/ErrorResponse'
        '503':
          description: Server Error - Service Unavailable
          schema:
            $ref: '#/definitions/ErrorResponse'
      security:
        - oauth:
            - qualityapi.recordingcommands
securityDefinitions:
  oauth:
    type: oauth2
    authorizationUrl: 'https://myaspect.{region}.id.aspect-cloud.net/tokenservice/oauth2/access_token?realm={orgId}'
    flow: implicit
    scopes:
      qualityapi.recordings: manages the recording resource
      qualityapi.recordingcommands: manages the recording control resource
      qualityapi.evaluations: manages the evaluation resource
definitions:
  RecordingMetadataCollection:
    description: Recording metadata collection
    type: object
    properties:
      kind:
        description: Identifier used by Alvaria&trade; Cloud components to serialize the payload of the results.
        type: string
        default: 'via#recordingMetadataList'
        example: 'via#recordingMetadataList'
      recordingMetadataItems:
        type: array
        items:
          $ref: '#/definitions/RecordingMetadataV3'
        example:
          - status: 'Current'
            channelType: 'VoiceOnly'
            ani: null
            voiceFileStatus: 'Available'
            customInformation:
              - displayName: Disposition Code
                value: DispositionCode
            orgId: customerName
            dnis: null
            endTime: '2020-05-01T23:28:35Z'
            station: null
            holdCount: 0
            callLegId: 42
            recordingId: f5581241-1d33-41c0-b0f9-f96911c1d03f
            initialWorkType: null
            maximumHoldDuration: 0
            parentRecordingId: f5581241-1d33-41c0-b0f9-f96911c1d03f
            recordingReasons:
              user: false
              api: false
              logging: false
              parent: false
              rule: false
            relatedRecordingIds: null
            screenCaptureFileStatus: 0
            startTime: '2020-05-01T23:28:35Z'
            switch:
              switchType: 'AspectUnifiedIp'
              switchName: pats
            takenWorkType:
              interactionType: 'Email'
              workTypeName: EmailTeam
            user:
              firstName: firstName
              lastName: lastName
              email: name@example.com
              teamName: teamName
            totalHoldDuration: 0
            interactionType: 'Email'
            umId: 01-0010010000-200501-232819878-00001
            email:
              state: 1
              sentTime: '2020-05-01T23:28:35Z'
              subject: 'Test Message'
              sender: name@example.com
            chat: null
            sms: null
            
      totalItems:
        type: integer
        description: The total number of Entity instances existing in the system.
        example: 1
  RecordingMetadata:
    description: Recording metadata
    type: object
    properties:
      ani:
        description: ANI of the recorded interaction
        type: string
        example: 1200
      customInformation:
        description: Custom information of the recorded interaction
        type: array
        items:
          $ref: '#/definitions/CustomInformation'
      orgId:
        description: Alvaria-generated unique identifier for the organization
        type: string
        example: customername
      channelType:
        type: string
        description: Channel type of the recorded interaction
        example: VoiceOnly
        enum:
          - VoiceOnly
          - ScreenOnly
          - Email
          - Chat
          - SMS
          - VoiceMail
          - VoiceAndScreen
          - Unknown
      dnis:
        description: DNIS of the recorded interaction
        type: string
        example: 1200
      endTime:
        format: date-time
        description: 'End date and time of a recording, specified in ISO 8601 format.'
        type: string
        example: '2017-10-19T16:09:58Z'
      holdCount:
        format: int32
        description: How many times the interaction has been put on hold on the recording
        type: integer
        example: 0
      initialWorkType:
        $ref: '#/definitions/WorkType'
      callLegId:
        description: Alvaria-generated unique identifier for the call leg
        type: string
        example: 151
      interactionType:
        type: string
        description: Interaction type
        example: InboundQueuedCall
        enum:
          - Unknown
          - InboundQueuedCall
          - InboundDirectCall
          - OutboundDirectCall
          - OutboundBlendedCall
          - Email
          - IvrCall
          - CallBack
          - VoiceMail
          - WebCallBack
          - WebChat
          - ReplyCall
          - Task
          - OutboundEmail
          - ReplyEmail
          - ForwardEmail
          - IntegratedEmail
          - Chat
          - InboundSMS
          - OutboundSMS
          - All
      recordingId:
        format: uuid
        description: Alvaria-generated unique identifier for the recording instance
        type: string
        example: c7725e34-a029-4618-aa9f-6c9c568b7fdb
      maximumHoldTime:
        format: int32
        description: Maximum hold time of the recording(in seconds)
        type: integer
        example: 15
      parentRecordingId:
        format: uuid
        description: Alvaria-generated unique identifier for the parent recording
        type: string
        example: c7725e34-a029-4618-aa9f-6c9c568b7fdb
      recordingReasons:
        $ref: '#/definitions/RecordingReasons'
      relatedRecordingIds:
        description: Alvaria-generated unique identifiers for related recording IDs.
        type: array
        items:
          format: uuid
          type: string
          example: c7725e34-a029-4618-aa9f-6c9c568b7fdb
      screenCaptureFileStatus:
        type: string
        description: File status for screen recording
        example: Available
        enum:
          - NotRecorded
          - Available
          - Deleted
          - RecordingFailed
          - TransferFailed
          - OfflineStorage
      startTime:
        format: date-time
        description: 'Start time of a recording, specified in ISO 8601 format.'
        type: string
        example: '2017-10-19T16:09:58Z'
      station:
        description: Station of the recorded interaction
        type: string
        example: 1000
      status:
        type: string
        description: status of an interaction
        example: Current
        enum:
          - Archived
          - Current
          - Historical
          - Inactive
          - PendingDisposition
      switch:
        $ref: '#/definitions/Switch'
      takenWorkType:
        $ref: '#/definitions/WorkType'
      user:
        $ref: '#/definitions/User'
      voiceFileStatus:
        type: string
        description: File status for voice recording
        example: Available
        enum:
          - NotRecorded
          - Available
          - Deleted
          - RecordingFailed
          - TransferFailed
          - OfflineStorage
      totalHoldTime:
        format: int32
        description: Total hold time for the recording (in seconds)
        type: integer
        example: 5
      umId:
        description: Alvaria-generated unique identifier for the Universal Media
        type: string
        example: 01-0010010000-200504-163852416-00001
      email:
        $ref: '#/definitions/Email'
      chat:
        $ref: '#/definitions/Chat'
      sms:
        $ref: '#/definitions/SMS'
  RecordingMetadataV3:
    description: Recording metadata
    type: object
    properties:
      ani:
        description: ANI of the recorded interaction
        type: string
        example: 1200
      customInformation:
        description: Custom information of the recorded interaction
        type: array
        items:
          $ref: '#/definitions/CustomInformation'
      orgId:
        description: Alvaria-generated unique identifier for the organization
        type: string
        example: customername
      channelType:
        type: string
        description: Channel type of the recorded interaction
        example: VoiceOnly
        enum:
          - VoiceOnly
          - ScreenOnly
          - Email
          - Chat
          - SMS
          - Task
          - VoiceMail
          - VoiceAndScreen
          - InboundEmail
          - ManualOutboundEmail
          - Unknown
      dnis:
        description: DNIS of the recorded interaction
        type: string
        example: 1200
      endTime:
        format: date-time
        description: 'End date and time of a recording, specified in ISO 8601 format.'
        type: string
        example: '2017-10-19T16:09:58Z'
      holdCount:
        format: int32
        description: How many times the interaction has been put on hold on the recording
        type: integer
        example: 0
      initialWorkType:
        $ref: '#/definitions/WorkTypeV3'
      callLegId:
        description: Alvaria-generated unique identifier for the call leg
        type: string
        example: 151
      interactionType:
        type: string
        description: Interaction type
        example: InboundQueuedCall
        enum:
          - Unknown
          - InboundQueuedCall
          - InboundDirectCall
          - OutboundDirectCall
          - OutboundBlendedCall
          - Email
          - IvrCall
          - CallBack
          - VoiceMail
          - WebCallBack
          - WebChat
          - ReplyCall
          - Task
          - OutboundEmail
          - ReplyEmail
          - ForwardEmail
          - IntegratedEmail
          - Chat
          - InboundSMS
          - OutboundSMS
          - InboundEmail
          - ManualOutboundEmail
          - CampaignOutboundEmail
          - All
      recordingId:
        format: uuid
        description: Alvaria-generated unique identifier for the recording instance
        type: string
        example: c7725e34-a029-4618-aa9f-6c9c568b7fdb
      maximumHoldDuration:
        format: int32
        description: Maximum hold duration of the recording(in seconds)
        type: integer
        example: 15
      parentRecordingId:
        format: uuid
        description: Alvaria-generated unique identifier for the parent recording
        type: string
        example: c7725e34-a029-4618-aa9f-6c9c568b7fdb
      recordingReasons:
        $ref: '#/definitions/RecordingReasons'
      relatedRecordingIds:
        description: Alvaria-generated unique identifiers for related recording IDs.
        type: array
        items:
          format: uuid
          type: string
          example: c7725e34-a029-4618-aa9f-6c9c568b7fdb
      screenCaptureFileStatus:
        type: string
        description: File status for screen recording
        example: Available
        enum:
          - NotRecorded
          - Available
          - Deleted
          - RecordingFailed
          - TransferFailed
          - OfflineStorage
      startTime:
        format: date-time
        description: 'Start time of a recording, specified in ISO 8601 format.'
        type: string
        example: '2017-10-19T16:09:58Z'
      station:
        description: Station of the recorded interaction
        type: string
        example: 1000
      status:
        type: string
        description: status of an interaction
        example: Current
        enum:
          - Archived
          - Current
          - Historical
          - Inactive
          - PendingDisposition
      switch:
        $ref: '#/definitions/SwitchV3'
      takenWorkType:
        $ref: '#/definitions/WorkTypeV3'
      user:
        $ref: '#/definitions/User'
      voiceFileStatus:
        type: string
        description: File status for voice recording
        example: Available
        enum:
          - NotRecorded
          - Available
          - Deleted
          - RecordingFailed
          - TransferFailed
          - OfflineStorage
      totalHoldDuration:
        format: int32
        description: Total hold duration for the recording (in seconds)
        type: integer
        example: 5
      umId:
        description: Alvaria-generated unique identifier for the Universal Media
        type: string
        example: 01-0010010000-200504-163852416-00001
      email:
        $ref: '#/definitions/Email'
      chat:
        $ref: '#/definitions/ChatV3'
      sms:
        $ref: '#/definitions/SMS'
  RecordingIds:
    description: List of Alvaria-generated unique identifiers for recording instances.
    type: object
    properties:
      recordingIds:
        type: array
        items:
          type: string
          format: uuid
  CustomInformation:
    description: Custom information for an interaction
    type: object
    properties:
      displayName:
        description: Display name of the custom information
        type: string
        example: Disposition Code 
      value:
        description: Custom information value
        type: string
        example: Complete
  AddCustomInformation:
    description: List of custom information to be added to an interaction
    type: object
    properties:
      customInformation:
        type: array
        items:
          $ref: '#/definitions/CustomInformation' 
  RecordingReasons:
    description: Recording reasons for an interaction
    type: object
    properties:
      user:
        description: Whether the interaction is being monitored due to user action.
        type: boolean
        example: true
      api:
        description: Whether the interaction is being monitored due to an API call.
        type: boolean
        example: false
      logging:
        description: Whether the interaction is being monitored due to logging.
        type: boolean
        example: false
      parent:
        description: >-
          Whether the interaction is being monitored due to the parent
          interaction also being monitored.
        type: boolean
        example: false
      rule:
        description: Whether the interaction is being monitored due to a rule.
        type: boolean
        example: false
  Email:
    description: Email data of an interaction
    type: object
    properties:
      sentTime:
        format: date-time
        description: Sent time of the email
        type: string
        example: '2017-10-19T16:09:58Z'
      state:
        type: string
        description: State of the email
        example: Original
        enum:
          - Original
          - Transferred
          - Replied
      subject:
        description: Subject of the email
        type: string
        example: Subject
      sender:
        description: Email sender
        type: string
        example: user@example.com
  Chat:
    description: Chat data of an interaction
    type: object
    properties:
      customer:
        $ref: '#/definitions/Customer'
      messageCount:
        format: int32
        description: number of messages included in the Chat interaction
        type: integer
        example: 10
      attachmentCount:
        format: int32
        description: number of attachments included the Chat interaction
        type: integer
        example: 1
  ChatV3:
    description: Chat data of an interaction
    type: object
    properties:
      customer:
        $ref: '#/definitions/CustomerV3'
      messageCount:
        format: int32
        description: number of messages included in the Chat interaction
        type: integer
        example: 10
      attachmentCount:
        format: int32
        description: number of attachments included the Chat interaction
        type: integer
        example: 1
  SMS:
    description: SMS data of an interaction
    type: object
    properties:
      messageCount:
        format: int32
        description: Message count
        type: integer
        example: 10
      ani:
        description: Originating phone number
        type: string
        example: 1200
      dnis:
        description: Dialed phone number
        type: string
        example: 1200
  Customer:
    description: Customer information
    type: object
    properties:
      emailAddress:
        $ref: '#/definitions/EmailAddress'
      id:
        format: int64
        description: Alvaria-generated unique identifier for the customer
        type: string
        example: 3 
      name:
        description: Name of a customer
        type: string
        example: name 
  CustomerV3:
    description: Customer information
    type: object
    properties:
      emailAddress:
        $ref: '#/definitions/EmailAddressV3'
      id:
        format: int64
        description: Alvaria-generated unique identifier for the customer
        type: string
        example: 3 
      customerName:
        description: Name of a customer
        type: string
        example: name
  EmailAddress:
    description: >-
      EmailAddress information associated with an interaction.
    type: object
    properties:
      email:
        description: Email address
        type: string
        example: user@example.com      
      name:
        description: Display name of an email address
        type: string
        example : emailname
  EmailAddressV3:
    description: >-
      EmailAddress information associated with an interaction.
    type: object
    properties:
      email:
        description: Email address
        type: string
        example: user@example.com      
      emailName:
        description: Display name of an email address
        type: string
        example : emailname
  WorkType:
    type: object
    description: Work type associated with the interaction
    properties:
      interactionType:
        type: string
        description: Interaction type
        example: InboundQueuedCall
        enum:
          - Unknown
          - InboundQueuedCall
          - InboundDirectCall
          - OutboundDirectCall
          - OutboundBlendedCall
          - Email
          - IvrCall
          - CallBack
          - VoiceMail
          - WebCallBack
          - WebChat
          - ReplyCall
          - Task
          - OutboundEmail
          - ReplyEmail
          - ForwardEmail
          - IntegratedEmail
          - Chat
          - InboundSMS
          - OutboundSMS
          - All
      name:
        type: string
        description: name of the work type
        example : Support
  WorkTypeV3:
    type: object
    description: Work type associated with the interaction
    properties:
      interactionType:
        type: string
        description: Interaction type
        example: InboundQueuedCall
        enum:
          - Unknown
          - InboundQueuedCall
          - InboundDirectCall
          - OutboundDirectCall
          - OutboundBlendedCall
          - Email
          - IvrCall
          - CallBack
          - VoiceMail
          - WebCallBack
          - WebChat
          - ReplyCall
          - Task
          - OutboundEmail
          - ReplyEmail
          - ForwardEmail
          - IntegratedEmail
          - Chat
          - InboundSMS
          - OutboundSMS
          - All
      workTypeName:
        type: string
        description: name of the work type
        example : Support
  User:
    description: A user entity and all associated details
    type: object
    properties:
      firstName:
        description: First name of a user
        type: string
        example : firstName
      lastName:
        description: Last name of a user
        type: string
        example : lastname
      email:
        description: User login name
        type: string
        example: user@example.com
      teamName:
        description: Team name of a user
        type: string
        example: teamname
  Switch:
    type: object
    description: Switch definition
    properties:
      name:
        type: string
        description: Name of a switch
        example: uip 
     
      type:
        type: string
        description: Switch type
        example: AspectUnifiedIp
        enum:
          - None
          - Avaya
          - Cisco
          - AspectUnifiedIp
          - CiscoUnifiedContactCenter
          - Zipwire
     
  SwitchV3:
    type: object
    description: Switch definition
    properties:
      switchName:
        type: string
        description: Name of a switch 
        example: uip 
      switchType:
        type: string
        description: Switch type
        example: AspectUnifiedIp
        enum:
          - None
          - Avaya
          - Cisco
          - AspectUnifiedIp
          - CiscoUnifiedContactCenter
          - Zipwire
  RecordingMediaCollection:
    type: object
    properties:
      kind:
        description: Identifier used by Alvaria&trade; Cloud components to serialize the payload of the results.
        type: string
        default: 'via#recordingMediaList'
        example: 'via#recordingMediaList'
      mediaItems:
        type: array
        items:
          $ref: '#/definitions/RecordingMedia'
        example:
          - channelType: voice
            handle: 'https://example.aspect-cloud.net/s3/example.s3.amazonaws.com/path/0000-19851005-101458/aqm00_0000_0000_0000.wav?X-Amz-Expires=1800&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=0000000000000000/20171005/us-east-1/s3/aws4_request&X-Amz-Date=19851005T151458Z&X-Amz-SignedHeaders=host;x-amz-server-side-encryption;x-amz-server-side-encryption-aws-kms-key-id&X-Amz-Signature=0000000000000000000000000000000000000000000000000000000000000000'
      totalItems:
        type: integer
        description: The total number of Entity instances existing in the system.
        example: 1
        
  RecordingMedia:
    description: File handles of the recording media
    type: object
    properties:
      channelType:
        type: string
        description: Interaction channel type
        example: voice
        enum:
          - voice
          - chat
          - sms
          - email
          - screen
      handle:
        format: uri
        description: Signed URL pointing a recording media file.
        type: string
        example: >-
          https://example.aspect-cloud.net/s3/example.s3.amazonaws.com/path/0000-19851005-101458/aqm00_0000_0000_0000.wav?X-Amz-Expires=1800&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=0000000000000000/20171005/us-east-1/s3/aws4_request&X-Amz-Date=19851005T151458Z&X-Amz-SignedHeaders=host;x-amz-server-side-encryption;x-amz-server-side-encryption-aws-kms-key-id&X-Amz-Signature=0000000000000000000000000000000000000000000000000000000000000000
  
  PauseRecordingParmsSchema:
    type: object
    required:
      - locatorIdentifier
    properties:
      pauseAudio:
        type: boolean
        description: Specifies whether to pause voice recording
        example: 'true'
        default: 'true'
      pauseScreen:
        type: boolean
        description: Specifies whether to pause screen recording
        example: 'true'
        default: 'true'
      locatorType:
        type: string
        description: |-
          Possible items that can be used to locate an agent.
               AspectUserId         : Alvaria-generated unique identifier for the Cloud agent instance that can be retrieved prior to use from the provisioning rest API. The url is /via/v3/organizations/{orgId}/provisioning/users
               AgentAcdId           : Agent ACD logon ID
               PositionId           : An ACD position ID
        example: AspectUserId
        enum:
          - AspectUserId
          - AgentAcdId
          - PositionId
        default: AspectUserId
      locatorIdentifier:
        description: 'The value that will be used to locate the agent based on the locator type. For Cloud, the locatorIdentifier is the userId, which can be retrieved using the /via/v3/organizations/{orgId}/provisioning/users endpoint.'
        type: string
        example: 99b788f3000d99
      switchName:
        description: 'The name of the switch that the agent is associated with in Alvaria Quality.'
        type: string
        example: customername
        default: 'The name of a customer organization (orgId).'
  ResumeRecordingParmsSchema:
    type: object
    required:
      - locatorIdentifier
    properties:
      locatorType:
        type: string
        description: |-
          Possible items that can be used to locate an agent.
               AspectUserId         : Alvaria-generated unique identifier for the Cloud agent instance that can be retrieved prior to use from the provisioning rest API. The url is /via/v3/organizations/{orgId}/provisioning/users
               AgentAcdId           : Agent ACD logon ID
               PositionId           : An ACD position ID
        example: AspectUserId
        enum:
          - AspectUserId
          - AgentAcdId
          - PositionId
        default: AspectUserId
      locatorIdentifier:
        description: 'The value that will be used to locate the agent based on the locator type. For Cloud, the locatorIdentifier is the userId, which can be retrieved using the /via/v3/organizations/{orgId}/provisioning/users endpoint.'
        type: string
        example: 99b788f3000d99
      switchName:
        description: 'The name of the switch that the agent is associated with in Alvaria Quality Management system.'
        type: string
        example: customername
        default: 'The name of a customer organization (orgId).'
  RecordingStatusParmsSchema:
    type: object
    required:
      - interactionId
      - locatorIdentifier
    properties:
      interactionId:
        type: string
        description: 'Alvaria-generated unique identifier for the interaction instance that can be retrieved prior to use from the streaming rest API, e.g., engagementCenter.Dialing event.'
        example: '1000'
      locatorType:
        type: string
        description: |-
          Possible items that can be used to locate an agent.
               AspectUserId        : Alvaria-generated unique identifier for the Cloud agent instance that can be retrieved prior to use from the provisioning rest API. The url is /via/v3/organizations/{orgId}/provisioning/users
               AgentAcdId           : Agent ACD logon ID
               PositionId           : An ACD position ID
        example: AspectUserId
        enum:
          - AspectUserId
          - AgentAcdId
          - PositionId
        default: AspectUserId
      locatorIdentifier:
        description: 'The value that will be used to locate the agent based on the locator type. For Cloud, the locatorIdentifier is the userId, which can be retrieved using the /via/v3/organizations/{orgId}/provisioning/users endpoint.'
        type: string
        example: 99b788f3000d99
      retrieveScreenRecordingStatus:
        description: 'Specifies whether to check the recording status of the screen recording instead of the voice recording for a given interaction.'
        type: boolean
        example: 'true'
        default: 'false'
      switchName:
        description: 'The name of the switch that the agent is associated with in Alvaria Quality.'
        type: string
        example: customername
        default: 'The name of a customer organization (orgId)'
  StartRecordingParmsSchema:
    type: object
    required:
      - locatorIdentifier
    properties:
      recordAudio:
        type: boolean
        description: Specifies whether to record voice.
        example: 'true'
        default: 'true'
      recordScreen:
        type: boolean
        description: Specifies whether to record screen.
        example: 'true'
        default: 'false'
      recordReason:
        type: string
        description: Reason to start the recording.
        example: 'auditing purposes'
      maxDuration:
        type: integer
        description: The maximum duration of the recording. Applicable if starting a new screen only interaction.
        example: 120
        default: 'Maximum continuous recording duration system limit. Typically 4 hours.'
      interactionType:
        type: string
        description: Type of the interaction. Applicable if starting a new screen only interaction.
        example: InboundQueuedCall
        enum:
          - Unknown
          - InboundQueuedCall
          - InboundDirectCall
          - OutboundDirectCall
          - OutboundBlendedCall
          - IVRCall
          - Chat
        default: 'Unknown'
      locatorType:
        type: string
        description: |-
          Possible items that can be used to locate an agent.
               AspectUserId         : Alvaria-generated unique identifier for the Cloud agent instance that can be retrieved prior to use from the provisioning rest API. The url is /via/v3/organizations/{orgId}/provisioning/users
               AgentAcdId           : Agent ACD logon ID
               PositionId           : An ACD position ID
        example: AspectUserId
        enum:
          - AspectUserId
          - AgentAcdId
          - PositionId
        default: AspectUserId
      locatorIdentifier:
        description: 'The value that will be used to locate the agent based on the locator type. For Cloud, the locatorIdentifier is the userId, which can be retrieved using the /via/v3/organizations/{orgId}/provisioning/users endpoint.'
        type: string
        example: 99b788f3000d99
      switchName:
        description: 'The name of the switch that the agent is associated with in Alvaria Quality.'
        type: string
        example: customername
        default: 'The name of a customer organization (orgId).'
  StopRecordingParmsSchema:
    type: object
    required:
      - locatorIdentifier
    properties:
      locatorType:
        type: string
        description: |-
          Possible items that can be used to locate an agent.
               AspectUserId         : Alvaria-generated unique identifier for the Cloud agent instance that can be retrieved prior to use from the provisioning rest API. The url is /via/v3/organizations/{orgId}/provisioning/users
               AgentAcdId           : Agent ACD logon ID
               PositionId           : An ACD position ID
        example: AspectUserId
        enum:
          - AspectUserId
          - AgentAcdId
          - PositionId
        default: AspectUserId
      locatorIdentifier:
        description: 'The value that will be used to locate the agent based on the locator type. For Cloud, the locatorIdentifier is the userId, which can be retrieved using the /via/v3/organizations/{orgId}/provisioning/users endpoint.'
        type: string
        example: 99b788f3000d99
      switchName:
        description: 'The name of the switch that the agent is associated with in Alvaria Quality.'
        type: string
        example: customername
        default: 'The name of a customer organization (orgId)'
  RecordingControlResponseSchema:
    format: object
    properties:
      status:
        description: Possible results from a recording control request
        type: string
        example: Success
        enum:
          - Success
          - Pending
          - NotFound
          - UnableToExecute
          - InvalidLocator
          - InvalidRequest
          - InvalidParameter
          - PermissionDenied
          - Error
          - Disconnected
          - Recording
          - NotRecording
          - Paused
          
  ErrorResponse:
    type: object
    properties:
      code:
        type: integer
        description: HTTP error status
        example: 404
      message:
        type: string
        example: not found
      errors:
        type: array
        items:
          $ref: '#/definitions/Error'
  Error:
    type: object
    properties:
      scope:
        type: string
        example: scope
      reason:
        type: string
        example: reason
      message:
        type: string
        example: message
        
  GetScorecardTemplatesParmsSchema:
    type: object
    required:
        - scorecardTemplateIds
        - scorecardTemplateName
    properties:
      scorecardTemplateIds:
        type: array
        items:
          type: string
          format: uuid
        description: "List of the unique identifiers of the scorecard templates you wish to retrieve. Must be in GUID format."
      includeInactiveScorecardTemplates:
        type: boolean
        description: "Specifies whether to include inactive scorecard templates in the search results."
      includeIncompleteScorecardTemplates:
        type: boolean 
        description: "Specifies whether to include incomplete scorecard templates in the search results."
      scorecardTemplateName:
        type: string
        description: "All or part of the name of the scorecard template."
        example: "Template 01"
  ScorecardTemplateMetadataCollection:
      description: Scorecard template metadata collection
      type: object
      properties:
        kind:
          description: Identifier used by Alvaria&trade; Cloud components to serialize the payload of the results.
          type: string
          default: 'via#ScorecardTemplateMetadataList'
          example: 'via#ScorecardTemplateMetadataList'
        scorecardTemplateMetadata:
          type: array
          items:
            $ref: '#/definitions/ScorecardTemplateMetadata'
  ScorecardTemplateMetadata:
      description: Scorecard template metadata
      type: object
      properties:
          defaultResponse:
              description: The default response
              type: string
              example: None
          name:
              description: The name of the scorecard template
              type: string
              example: My Favorite Scorecard Template
          description:
              description: The description of the scorecard template
              type: string
              example: This is my favorite scorecard template
          creationDate:
              description: Creation date and time of a scorecard template, specified in ISO 8601 format.
              type: string
              format: date-time
              example: '2023-09-21T15:43:16.989Z'
          overallScoreDisplay:
              description: The display of the overall score
              type: string
              example: PercentageScoreAndPassFail
          isUsed:
              description: Flag to indicate if the scorecard template is used
              type: boolean
              example: true
          id:
              description: Alvaria-generated unique identifier for the scorecard template
              format: uuid
              type: string
              example: c7725e34-a029-4618-aa9f-6c9c568b7fdb
          maximumScore:
              format: int32
              description: Maximum score of the scarecard template
              type: integer
              example: 100
          minimumScore:
              format: int32
              description: Minimum score of the scarecard template
              type: integer
              example: 50
          questionScoresDisplay:
              description: The display of the question score
              type: string
              example: PercentageScoreAndPassFail
          sectionScoresDisplay:
              description: The display of the section score
              type: string
              example: PercentageScoreAndPassFail
          siteId:
              description: Alvaria-generated unique identifier for the site
              format: uuid
              type: string
              example: 4e454f92-b43d-ed11-abbf-1234887b2b15
          status:
              description: The status of the scorecard template
              type: string
              example: Active
              enum:
                - Active
                - Inactive
          displayQuestionNumber:
              description: Flag to indicate whether or not to display question numbers
              type: boolean
              example: true
          isComplete:
              description: Flag to indicate whether or not the scorecard template is complete
              type: boolean
              example: true
          isLegacyTemplate:
              description: Flag to indicate whether or not the scorecard template is a legacy template
              type: boolean
              example: true
          isUsedByReports:
              description: Flag to indicate whether or not the scorecard template is used by reports
              type: boolean
              example: true
          isUsedByCalibration:
              description: Flag to indicate whether or not the scorecard template is used by calibration
              type: boolean
              example: true
          ownerUserId:
              description: Alvaria-generated unique identifier for the user who created the scorecard template
              format: uuid
              type: string
              example: 00000000-0000-0000-05a3-727a88db4edd
          ownerUserName:
              description: The username of the user who created the scorecard template
              type: string
              example: Doe, John
          weightForNotApplicableAnswerChoice:
              description: The status of the scorecard template
              type: string
              example: None
              enum:
                - None
                - HighestWeightOfTheQuestion
                - LowestWeightOfTheQuestion
          Sections:
              type: array
              items:
                $ref: '#/definitions/ScoreCardTemplateSection'
  ScoreCardTemplateSection:
      description: Scorecard template section
      type: object
      properties:   
          id:
              description: Alvaria-generated unique identifier for the scorecard template section
              format: uuid
              type: string
              example: c7725e34-a029-4618-aa9f-6c9c568b7fdb
          name:
              description: The name of the scorecard template section
              type: string
              example: My Favorite Scorecard Template Section
          description:
              description: The description of the scorecard template section
              type: string
              example: This is my favorite scorecard template Section
          number:
              format: int32
              description: The number of the scorecard template section
              type: integer
              example: 3
          weight:
              format: int32
              description: The weight of the scorecard template section
              type: integer
              example: 2
          enableComments:
              description: Flag to indicate whether or not the scorecard template section has comments enabled
              type: boolean
              example: true
          questions:
              type: array
              items:
                $ref: '#/definitions/ScoreCardTemplateQuestion'   
  ScoreCardTemplateQuestion:
      description: Scorecard template question
      type: object
      properties:   
          id:
              description: Alvaria-generated unique identifier for the scorecard template question
              format: uuid
              type: string
              example: c7725e34-a029-4618-aa9f-6c9c568b7fdb
          number:
              format: int32
              description: The number of the scorecard template question
              type: integer
              example: 3        
          description:
              description: The description of the scorecard template question
              type: string
              example: This is my favorite scorecard template           
          optionsOrientation:
              description: The orientation of the options on the scorecard template question
              type: string
              example: Horizontal             
              enum:
                - NotApplicable
                - Horizontal
                - Vertical
                - DropDown
          responseRequired:
              description: Flag to indicate whether or not the scorecard template question requires a response
              type: boolean
              example: true
          text:
              description: The text of the scorecard template question
              type: string
              example: What is your favorite color?    	
          type:
              description: The type of the scorecard template question
              type: string
              example: ChooseOne             
              enum:
                - YesNo
                - TrueFalse
                - ScoredScaleLowToHigh
                - ScoredScaleHighToLow
                - ChooseOne
                - ChooseOneOrMore
                - SingleLineTextAnswer
                - MultiLineTextAnswer
                - PassFail
                - BonusYesNo
                - BonusTrueFalse
                - BonusPassFail
                - BonusScoredScale
          weight:
              format: int32
              description: The weight of the scorecard template question
              type: integer
              example: 1   
          scoreAdjustmentConditions:
              description: The score adjustment conditions of the scorecard template question
              type: string
              example: PositiveOptionSelection             
              enum:
                - GreaterThanWeight
                - LessThanWeight
                - NegativeOptionSelection
                - NotApplicable
                - PositiveOptionSelection
          scoreAdjustment:
              description: The score adjustment of the scorecard template question
              type: string
              example: Subtract             
              enum:
                - Add
                - None
                - Subtract
          isScorable:
              description: Flag to indicate whether or not the scorecard template question is scorable
              type: boolean
              example: true             
          enableComments:
              description: Flag to indicate whether or not the scorecard template question has comments enabled
              type: boolean
              example: true              
          addToLibrary:
              description: Flag to indicate whether or not the scorecard template question should be added to the library
              type: boolean
              example: true   
          isDependentQuestion:
              description: Flag to indicate whether or not the scorecard template question is a dependent question
              type: boolean
              example: true  
          additionalWeight:
              description: The weight of the scorecard template question
              type: string
              format: decimal
              example: 0.1      
          conditionalWeight:
              description: The weight of the scorecard template question
              type: string
              format: decimal
              example: 0.1               
          questions:
              type: array
              items:
                $ref: '#/definitions/ScoreCardTemplateOption'   
  ScoreCardTemplateOption:
      description: Scorecard template option
      type: object
      properties:   
          id:
              description: Alvaria-generated unique identifier for the scorecard template option
              format: uuid
              type: string
              example: c7725e34-a029-4618-aa9f-6c9c568b7fdb
          number:
              format: int32
              description: The number of the scorecard template option
              type: integer
              example: 3     
          text:
              description: The text of the scorecard template option
              type: string
              example: Blue    	
          weight:
              description: The weight of the scorecard template option
              type: string
              format: decimal
              example: 1.0    
          dependentQuestions:
              type: array
              items:
                $ref: '#/definitions/ScoreCardTemplateQuestion'
  ScorecardMetadataCollection:
      description: Scorecard metadata collection
      type: object
      properties:
        kind:
          description: Identifier used by Alvaria&trade; Cloud components to serialize the payload of the results.
          type: string
          default: 'via#ScorecardMetadataList'
          example: 'via#ScorecardMetadataList'
        scorecardMetadataItems:
          type: array
          items:
            $ref: '#/definitions/ScorecardMetadata'
  ScorecardMetadata:
      description: Scorecard metadata
      type: object
      properties:  
          agentReview:
              description: Flag to indicate if the scorecard is an agent review
              type: boolean
              example: true        
          createdOn:
              description: Creation date and time of a scorecard, specified in ISO 8601 format.
              type: string
              format: date-time
              example: '2023-09-21T15:43:16.989Z'         
          creatorId:
              description: Alvaria-generated unique identifier for the user who created the scorecard
              format: uuid
              type: string
              example: 00000000-0000-0000-0551-ee275caacb9c
          failed:
              description: Flag to indicate if the scorecard was failed
              type: boolean
              example: false                 
          id:
              description: Alvaria-generated unique identifier for the scorecard
              format: uuid
              type: string
              example: 7de8d7ab-6de2-4693-aeef-4ffa4006f426
          asCreatedDuringTransitoryAccess:
              description: Flag to indicate if the scorecard was created during transitory access
              type: boolean
              example: false 
          lastUpdatedOn:
              description: Date and time of the last time a scorecard was updated, specified in ISO 8601 format.
              type: string
              format: date-time
              example: '2023-011-21T15:43:16.989Z'                  
          mediaId:
              description: Alvaria-generated unique identifier of the media associated with the scorecard
              format: uuid
              type: string
              example: 7de8d7ab-6de2-4693-aeef-4ffa4006f426
          peerReview:
              description: Flag to indicate if the scorecard is a peer review
              type: boolean
              example: false        
          percentScore:
              format: int32
              description: Percent score of the scarecard
              type: integer
              example: 100
          pointScore:
              description: The point score of the scorecard
              type: string
              format: decimal
              example: 10.0    
          reviewedByRecordedAgent:
              description: Flag to indicate if the scorecard has been reviewed by the recorded agent
              type: boolean
              example: false       
          status:
              description: The status of the scorecard 
              type: string
              example: Incomplete
              enum:
                - Complete
                - Incomplete   
                - CoachingAssignment              
          teamReview:
              description: Flag to indicate if the scorecard is a team review
              type: boolean
              example: false   
          templateId:
              description: Alvaria-generated unique identifier for the scorecard template associated with the scorecard
              format: uuid
              type: string
              example: 8506aeb2-bf54-4630-81f6-d8c161d78959
          templateName:
              description: The name of the scorecard template associated with the scorecard
              type: string
              example: My_Favorite_Scorecard_Template_01
          trainingScore:
              description: Flag to indicate if the scorecard is a training score
              type: boolean
              example: true    
          updateUserId: 
              description: Alvaria-generated unique identifier for the user who last updated the scorecard
              format: uuid
              type: string
              example: 00000000-0000-0000-05a3-727a88db4edd
          coaching:
              description: Flag to indicate if the scorecard is used for coaching
              type: boolean
              example: true    
          calibrationReview:
              description: Flag to indicate if the scorecard is a calibration review
              type: boolean
              example: false   
          maxWeightedScore:
              description: The maximum weighted score of the scorecard
              type: string
              format: decimal
              example: 20.0               
          coachingId:
              format: int32
              description: coaching ID of the scarecard
              type: integer
              example: 27
          creatorUsername:
              description: The name of the user who created the scorecard
              type: string
              example: Doe, John           
          updatedUsername:
              description: The name of the user who updated the scorecard
              type: string
              example: Doe, John       
          canEmail:
              description: Flag to indicate if the scorecard can be emailed
              type: boolean
              example: true               
          agentId: 
              description: Alvaria-generated unique identifier for the user associated with the scorecard
              format: uuid
              type: string
              example: 00000000-0000-0000-05a3-727a88db4edd
          agentUsername:
              description: The name of the user who is associated with the scorecard
              type: string
              example: Doe, John                
          notes:
              type: array
              items:
                $ref: '#/definitions/ScorecardNote'   
          comments:
              type: array
              items:
                $ref: '#/definitions/ScorecardComment'   
          sectionResults:
              type: array
              items:
                $ref: '#/definitions/ScorecardSectionResult'  
  ScorecardComment:
      description: Scorecard comment
      type: object
      properties:               
          id:
              description: Alvaria-generated unique identifier for the scorecard comment
              format: uuid
              type: string
              example: 7de8d7ab-6de2-4693-aeef-4ffa4006f426        
          userId:
              description: Alvaria-generated unique identifier for the user associated with the scorecard comment
              format: uuid
              type: string
              example: 7de8d7ab-6de2-4693-aeef-4ffa4006f426     
          modifiedDate:
              description: Date and time of the last time a scorecard comment was modified, specified in ISO 8601 format.
              type: string
              format: date-time
              example: '2023-011-21T15:43:16.989Z'    
          text:
              description: The text of the scorecard comment
              type: string
              example: This is a scorecard comment
          commentIndex:
              format: int32
              description: The index of the scorecard comment
              type: integer
              example: 5
  ScorecardNote:
      description: Scorecard note
      type: object
      properties:       
          id:
              description: Alvaria-generated unique identifier for the scorecard note
              format: uuid
              type: string
              example: 7de8d7ab-6de2-4693-aeef-4ffa4006f426
          text:
              description: The text of the scorecard note
              type: string
              example: This is a scorecard note
  ScorecardSectionResult:
      description: Scorecard section result
      type: object
      properties:       
          id:
              description: Alvaria-generated unique identifier for the scorecard section result
              format: uuid
              type: string
              example: 7de8d7ab-6de2-4693-aeef-4ffa4006f426
          percentScore:
              format: int32
              description: The percent score of the scorecard section result
              type: integer
              example: 50
          failed:
              description: Flag to indicate if the scorecard section result was failed
              type: boolean
              example: true     
          comment:
              description: Scorecard section result comment
              type: string
              example: This is a comment
          sectionId:
              description: Alvaria-generated unique identifier for the associated scorecard section
              format: uuid
              type: string
              example: 7de8d7ab-6de2-4693-aeef-4ffa4006f426
          pointScore:
              description: The point score of the scorecard section result
              type: string
              format: decimal
              example: 10.0     
          weightedScore:
              description: The weighted score of the scorecard section result
              type: string
              format: decimal
              example: 10.0     
          maxWeightedScore:
              description: The maximum weighted score of the scorecard section result
              type: string
              format: decimal
              example: 20.0       
          questionResults:
              type: array
              items:
                $ref: '#/definitions/ScorecardQuestionResult'  
  ScorecardQuestionResult:
      description: Scorecard question result
      type: object
      properties:    
          id:
              description: Alvaria-generated unique identifier for the scorecard question result
              format: uuid
              type: string
              example: 7de8d7ab-6de2-4693-aeef-4ffa4006f426        
          questionId:
              description: Alvaria-generated unique identifier for the associated scorecard question
              format: uuid
              type: string
              example: 7de8d7ab-6de2-4693-aeef-4ffa4006f426        
          percentScore:
              format: int32
              description: The percent score of the scorecard question result
              type: integer
              example: 50
          pointScore:
              description: The point score of the scorecard question result
              type: string
              format: decimal
              example: 10.0  
          failed:
              description: Flag to indicate if the scorecard question result was failed
              type: boolean
              example: true   
          comment:
              description: Scorecard question result comment
              type: string
              example: This is a comment
          textAnswer:
              description: Scorecard question result answer text
              type: string
              example: This is an answer
          selectedOptions:
              type: array
              items:
                $ref: '#/definitions/ScorecardSelectedOption'  
  ScorecardSelectedOption:
      description: Scorecard selected option
      type: object
      properties:    
          id:
              description: Alvaria-generated unique identifier for the scorecard selected option
              format: uuid
              type: string
              example: 7de8d7ab-6de2-4693-aeef-4ffa4006f426        
          optionId:
              description: Alvaria-generated unique identifier for the associated scorecard option
              format: uuid
              type: string
              example: 7de8d7ab-6de2-4693-aeef-4ffa4006f426