swagger: '2.0'
host: orgId.domain

schemes:
  - https
consumes:
  - application/json
produces:
  - application/json
info:
  version: 2.0.0
  title: Alvaria Cloud Media Storage 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

     The Alvaria&trade; Cloud Media Storage REST APIs enable developers to retrieve lists of files and folders(object keys) from an Alvaria&trade; Cloud AWS S3 bucket. Consumers of this API can perform the operations below.
     - __List object keys__
     - __Get a signed upload url for a file__ 
     - __Get a signed download url for a file__
     - __Delete a file__

    ## Folder Hierarchy

    The following shows the structure of the Alvaria&trade; Cloud S3 bucket
    import/export folders:

    ```
     exports
     |---configuration
     | |----campaign
     | |----interaction-management
     |---outreach
     | |---list-management
     |---reporting
     | |---enterprise-historical
     | |---outreach
     | |---intraday
     |---reporting-archive
     | |---enterprise-historical
     | |---outreach
     | |---intraday
     |--- cxp
     | |---recordings
     | |---callsre
     | |---utterances
     |---aps-custom
     |---compliance
     | |---audit
     |---workforce (V3)
     |---workflow (V3)
     |---motivate
     | |---kpi 
     |  |---processed 
     |  |---errors   

     imports
     |---apm
     | |----aom
     | |----ecf
     | | |----processed
     | | |----errors
     |---configuration
     | |----campaign
     | |----interaction-management
     |---outreach
     | |---exclusions
     | |---list-management
     | |---nanp
     |---aps-custom
     |---workforce (V3)
     |---workflow (V3)
     |---motivate
     | |---kpi (V3)
     |  |---processed (V3)
     |  |---errors (V3)   
    ```

    - **`exports:`** Contains system-generated data used for exporting data from
    the system. 


    - **`exports/reporting/enterprise-historical:`** Contains Enterprise Data
    Warehouse (EDW) historical data from the previous day provided in a "tar"
    format archive file. The data is output in CSV files and is kept for 28
    days.  Please refer to the [Data Extract Manager Model
    Guide](https://activelearning.aspect.com/publisher/download/8a886dc3-1066-4cf5-97d3-b50059b0b128/repository/12/80/bx7emguurh2y4rmava6jmq9yj/1.3/Via18_RevA_Data_Extract_Manager_Data_Model_Guide.pdf)
    for details on the information that is contained in these CSV files.


    - **`exports/reporting/outreach:`** Contains data generated from the
    Outreach component.


    - **`exports/reporting/intraday:`** Contains hourly raw reporting related data before any transformation.The data is output in CSV files
    and is kept for 90 days.


    - **`exports/reporting-archive/enterprise-historical:`** If the unlimited
    reporting data storage uplift package is enabled the
    exports/reporting/enterprise-historical data > 90 days old will be
    transferred here instead of being deleted.


    - **`exports/reporting-archive/outreach:`** If the unlimited reporting data
    storage uplift package is enabled the exports/reporting/outreach data > 90
    days old will be transferred here instead of being deleted.


    - **`exports/reporting-archive/intraday:`** If the unlimited reporting data
    storage uplift package is enabled the exports/reporting/intraday data > 90
    days old will be transferred here instead of being deleted.


    - **`exports/configuration/interaction-management:`** This folder is
    reserved for future use.


    - **`exports/configuration/campaign:`** Contains files exported using the
    Outreach Export/Import feature that allows for exporting and importing
    configuration data.


    - **`exports/outreach/list-management:`** Contains Outreach generated
    uploads. Upload is an Outreach feature that allows for extracting prospect
    database data to a file for reuse externally or internally.

    - **`exports/aps-custom:`** Contains data (files) generated from custom applications deployed by Alvaria Professional Services (APS).
    Data will be kept for 28 days. Please refer to your project related documentation for details on data stored in this folder.

    - **`exports/compliance/audit:`** Contains error file generated from ComplianceHub during a Load job operation.
    
    - **`exports/workforce:`** **(V3 Only)** Contains user and system generated data exported from Workforce. 

    - **`exports/workflow:`**  **(V3 Only)** Can be used to store data created with Workflow.

    - **`imports:`** Contains data that is provided from external resources for
    use by the system. 

    - **`imports/apm/aom:`**  Contains imported Performance Management
    Add On Metrics files that are pending Data Load Job execution.
    Following a successful Job execution, the file will be removed.
    An Add On Metrics file should be in the format AOM_yyyy-MM-dd HHmmss.csv

    - **`imports/apm/ecf:`**  Contains imported Performance Management
    External Contributor Framework files that are pending Data Load Job execution.
    Following a successful Job execution, the file will be moved to /processed or /errors.
    For the file format, please refer to the Performance Management System Administrator’s Guide.

    - **`imports/apm/ecf/processed:`**  Contains successfully processed file from a Performance Management
    External Contributor Framework Data Load Job execution. Following a successful Job execution,
    the file will be moved to this folder if it was processed successfully.
    It will be deleted after the configured Days To Keep Import Files of the External Contributor’s Data Instance,
    or the bucket retention policy, whichever is sooner.
    For more information, please refer to the Performance Management System Administrator’s Guide.

    - **`imports/apm/ecf/errors:`**  Contains erroneous processed file from a Performance Management
    External Contributor Framework Data Load Job execution. Following a successful Job execution,
    the file will be moved to this folder if it could not be processed successfully.
    It will be deleted after the configured Days To Keep Import Files of the External Contributor’s Data Instance,
    or the bucket retention policy, whichever is sooner.
    For more information, please refer to the Performance Management System Administrator’s Guide.

    - **`imports/configuration/interaction-management:`**  This folder is
    reserved for future use.


    - **`imports/configuration/campaign:`**  Contains the import files that are
    listed when a user views the list of import files using the Outreach
    Export/Import feature.


    - **`imports/outreach/list-management:`** Contains all user input raw files
    for Outreach. The Outreach UI accessed this folder to get the list of raw
    files. Outreach also builds strategies from the input files in this folder
    and updates these raw files after generating an upload.


    - **`imports/outreach/exclusions:`** Contains all exclusions and convenient
    time to call data files. The Outreach UI accesses this folder when loading
    exclusion and convenient time to call input files.


    - **`imports/outreach/nanp:`** This folder is reserved for future use.

    - **`imports/aps-custom:`** Contains data (files) to be imported by custom applications deployed by Alvaria Professional Services (APS).
    Data will be kept for 28 days. Please refer to your project related documentation for details on data stored in this folder.

    - **`imports/workforce:`** **(V3 Only)** Contains data that is provided from external resources for importing into Workforce.

    - **`imports/workflow:`** **(V3 Only)** Contains data to be processed with Workflow.

    - **`imports/motivate/kpi:`** **(V3 Only)** Contains imported Motivate KPI Import Manager files that are pending import job execution. 
    Following a successful import job execution, the file will be moved to /processed or /errors. For the file format, please refer to the Motivate System Administrator’s Guide.

    - **`imports/motivate/kpi/processed:`** **(V3 Only)** Contains successfully processed file from a Motivate KPI Import Manager import job execution. 
    Following a successful import job execution, the file will be moved to this folder if it was processed successfully. 
    It will be deleted after the bucket retention policy. For more information, please refer to the Motivate System Administrator’s Guide.

    - **`imports/motivate/kpi/errors:`** **(V3 Only)** Contains erroneous processed files from a Motivate KPI Import Manager import job execution. 
    Following a successful import job execution, the file will be moved to this folder if it could not be processed successfully. 
    It will be deleted after the bucket retention policy. For more information, please refer to the Motivate System Administrator’s Guide..

    ## Scopes

    Security for above folders is driven by the following scopes. Please procure
    your client credentials with these scopes depending on the specific folders
    you will upload files to or download files from using the API.


    - __`mediastorageapi.exports`__ - to download files from folders in the
    exports folder hierarchy.

    - __`mediastorageapi.imports`__ - to upload files to folders in the imports
    folder hierarchy. 


    ## Downloading Files From The Alvaria&trade; Cloud S3 Bucket

    Downloading files from the Alvaria&trade; Cloud S3 bucket is a two step process:

    1. Acquire a signed download URL for the file using the
    /mediaStorage/data/objectKeys API endpoint as shown in the following example
    where the file outreach-20180401.tar needs to be downloaded from the
    exports/reporting/outreach folder:
     
     ```
     curl -X GET "https://{orgId}.via.aspect-cloud.net/via/v2/organizations/{orgId}/mediaStorage/data/objectKeys?key=exports%2Freporting%2Foutreach%2foutreach-20180401.tar&keyType=signedDownloadUrl"
     ```

      The response will contain a secure, signed URL for accessing the required file in storage. The signed URL will expire in one hour. Below are example responses:
     
     ```
     Amazon:
     {
     "key": "exports/reporting/outreach/outreach-20180401.tar",
     "keyHash": "1a011762cec01ce9051c0eb81fc6f766",
     "keyName": "outreach-20180401.tar",
     "size": "5370.0 KB",
     "lastModifiedTime": "2018-04-30T19:11:56Z",
     "keyType": "File ",
     "signedUploadUrl": " ",
     "signedDownloadUrl": "https://{orgId}.via.aspect-cloud.net/s3/aspect-via-data-{region}-{orgId].s3.amazonaws.com/exports/outreach/outre ach-20180401.tar?X-Amz-Security-Token=FQoDYXdzE%2F0W6e7L4hIp8cTCmWdPZ0IBOaT3w%2B5UiVKMDdrNcF&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20180503T164001Z&X-Amz-SignedHeaders=host&X-Amz-Expires=518399&X-Amz-Credential=ASIAI2647DEKRJOGMUMA%2F20180503%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=15d827ba81597255b71c4493472ef132adccbbe5270da7bddc95c92451d90c75",
     "nativeSignedDownloadUrl": "https://{orgId}.via.aspect-cloud.net/s3/aspect-via-data-{region}-{orgId].s3.amazonaws.com/exports/outreach/outre ach-20180401.tar?X-Amz-Security-Token=FQoDYXdz2F0W6e7L4hIp8cTCmWdPZ0IBOaT3w%2B5UiVKMDdrNcF&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20180503T164001Z&X-Amz-SignedHeaders=host&X-Amz-Expires=518399&X-Amz-Credential=ASIAI2647DEKRJOGMUMA%2F20180503%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=15d827ba81597255b71c4493472ef132adccbbe5270da7bddc95c92451d90c75"
     }
     ```
     
     
     ```
     Google:
     {
     "key": "exports/reporting/outreach/outreach-20180401.tar",
     "keyHash": "1a011762cec01ce9051c0eb81fc6f766",
     "keyName": "outreach-20180401.tar",
     "size": "5370.0 KB",
     "lastModifiedTime": "2018-04-30T19:11:56Z",
     "keyType": "File ",
     "signedUploadUrl": " ",
     "signedDownloadUrl": "https://orgId.adc.alvaria.cloud/gcs/storage.googleapis.com/adc-bnw-data-raptors/outreach-20180401.tar?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=bnw-bklyn-raptors-an2c.iam.gserviceaccount.com%2F20230321%2Fauto%2Fstorage%2Fgoog4_request&X-Goog-Date=20230321T023028Z&X-Goog-Expires=21599&X-Goog-SignedHeaders=host&X-Goog-Signature=62d0f70ca3f03ff1a3b17e883c25750478f5b0af555e956610e31807a63e3e53ebd577a50ea885d4e27d",
     "nativeSignedDownloadUrl": "https://storage.googleapis.com/adc-bnw-data-orgId/outreach-20180401.tar?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=bnw-bklyn-raptors-an2c.iam.gserviceaccount.com%2F20230321%2Fauto%2Fstorage%2Fgoog4_request&X-Goog-Date=20230321T023028Z&X-Goog-Expires=21599&X-Goog-SignedHeaders=host&X-Goog-Signature=62d0f70ca3f03ff1a3b17e883c25750478f5b0af555e956610e31807a63e3e53ebd577a50ea885d4e27d41c2e165c6977a1a178495e473d76d21a6b77d59fe652834f4be993ee8be44e53f05920dda25e896a1e"
     }
      ```

    2. Use the signed download url URL to download the a file as shown in the
    following example (Amazon)

     ```
     curl -X GET "https://{orgId}.via.aspect-cloud.net/s3/aspect-via-data-{region}-{orgId].s3.amazonaws.com/exports/reporting/outreach/outreach-20180401.tar?X-Amz-Security-Token=FQoDYXdzB5UiVKMDdrNcF&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20180503T164001Z&X-Amz-SignedHeaders=host&X-Amz-Expires=518399&X-Amz-Credential=ASIAI2647DEKRJOGMUMA%2F20180503%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=15d827ba81597255b71c4493472ef132adccbbe5270da7bddc95c92451d90c75"
     ```

    ## Uploading Files To The Alvaria&trade; Cloud S3 Bucket

    Uploading files to the Alvaria&trade; Cloud S3 bucket is a two step process:

    1. Acquire a signed upload URL for the file using the
    /mediaStorage/data/objectKeys API endpoint as shown in the following example
    where the file outreach.raw needs to be uploaded to the
    imports/outreach/list-management folder:

     ```
     curl -X GET "https://{orgId}.via.aspect-cloud.net/via/v2/organizations/{orgId}/mediaStorage/data/objectKeys?key=imports%2Foutreach%2flist-management%2foutreach.raw&keyType=signedUploadUrl"
     ```

     The response will contain a secure, signed URL for placing the required file in S3. The signed URL will expire in one hour. Below is an example of a response:
     
     ```
     {
     "key": "imports/outreach/list-management/outreach.raw",
     "keyHash": "d926d7bb9ccf46fc04a61bd65d87b9b3",
     "keyName": "outreach.raw",
     "size": "",
     "lastModifiedDate": "",
     "keyType": "File",
     "signedUploadUrl": "https://{orgId}.via.aspect-cloud.net/s3/aspect-via-data-{region}-{orgId}.s3.amazonaws.com/imports/outreach/list-management/outreach.raw?kms-key=08e98aa8-1c0a-4547-bf34-e6f6aa11d16a&x-amz-storage-class=STANDARD_IA&X-Amz-Secur ity-Token=FQoDYXdzEEkaDNf1hxLJ2DFLxBjBbiL7AbDVwBqRx2QaKTtnoBxmYLaR%2BEHQF3og1ByQvn61nPa1ZYjlsiWF3ZGWJmalP5hrbdc%2FmTJjnIKN2ZsLS9%2Fj%2FSRlIyYZAK1FwL0CXozD3WtEORkNR0OP5nx2L%2Bh%2BLmKIHCsC3Bm7DVjnt%2FR%2B4az6wJ8NKZwwX7uylxhEu3uja2nRiNjD0XSiDLlfUkHlUBS597pKPqcH4qNmDmqszFIIoxbXuR6Se%2BLtj0W Qq5era5ruk%2Fp0QrNwuuVIM6w%2FWmhk5N3Ld1GNl5ndvZbxQ%2FUVp1y5L%2FRiKsOqg7wjNO5beT52QPZ%2F0W6e7L4hIp8cTCmWdPZ0IBOaT3w%2B5UiVKMDdrNcF&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20180503T164435Z&X-Amz-SignedHeaders=host%3Bx-amz-server-side-encryption%3Bx-amz-server-side-encryption-aws-kms-key-id&X-Amz-Expires=518399&X-Amz-Credential=ASIAI2647DEKRJOGMUMA%2F20180503%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=6fff00bbccc8202169412ae68c7995a69aa03a49114ca8e5bb6eb97f516d1741",
     "nativeSignedUploadUrl": "https://{orgId}.via.aspect-cloud.net/s3/aspect-via-data-{region}-{orgId}.s3.amazonaws.com/imports/outreach/list-management/outreach.raw?kms-key=08e98aa8-1c0a-4547-bf34-e6f6aa11d16a&x-amz-storage-class=STANDARD_IA&X-Amz-Secur ity-Token=FQoDYXdzEEkaDNf1hxLJ2DFLxBjBbiL7AbDVwBqRx2QaKTtnoBxmYLaR%2BEHQF3og1ByQvn61nPa1ZYjlsiWF3ZGWJmalP5hrbdc%2FmTJjnIKN2ZsLS9%2Fj%2FSRlIyYZAK1FwL0CXozD3WtEORkNR0OP5nx2L%2Bh%2BLmKIHCsC3Bm7DVjnt%2FR%2B4az6wJ8NKZwwX7uylxhEu3uja2nRiNjD0XSiDLlfUkHlUBS597pKPqcH4qNmDmqszFIIoxbXuR6Se%2BLtj0W Qq5era5ruk%2Fp0QrNwuuVIM6w%2FWmhk5N3Ld1GNl5ndvZbxQ%2FUVp1y5L%2FRiKsOqg7wjNO5beT52QPZ%2F0W6e7L4hIp8cTCmWdPZ0IBOaT3w%2B5UiVKMDdrNcF&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20180503T164435Z&X-Amz-SignedHeaders=host%3Bx-amz-server-side-encryption%3Bx-amz-server-side-encryption-aws-kms-key-id&X-Amz-Expires=518399&X-Amz-Credential=ASIAI2647DEKRJOGMUMA%2F20180503%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=6fff00bbccc8202169412ae68c7995a69aa03a49114ca8e5bb6eb97f516d1741",
     "signedDownloadUrl": ""
     }
     ```
    2. Use the signed upload URL to upload a file by sending an HTTP "PUT"
    request using the signed upload URL as shown in the following example:
     
     ```
     curl -X PUT "https://{orgId}.via.aspect-cloud.net/s3/aspect-via-data-{region}-{orgId}.s3.amazonaws.com/imports/outreach/list-management/outreach.raw?kms-key=08e98aa8-1c0a-4547-bf34-e6f6aa11d16a&x-amz-storage-class=STANDARD_IA&X-Amz-Security-Token=FQoDYXdzEEkaDNf1hxLJ2DFLxBjBbiL7AbDVwBqRx2QaKTtnoBxmYLaR%2BEHQF3og1ByQvn61nPa1ZYjlsiWF3ZGWJmalP5hrbdc%2FmTJjnIKN2ZsLS9%2Fj%2FSRlIyYZAK1FwL0CXozD3WtEORkNR0OP5nx2L%2Bh%2BLmKIHCsC3Bm7DVjnt%2FR%2B4az6wJ8NKZwwX7uylxhEu3uja2nRiNjD0XSiDLlfUkHlUBS597pKPqcH4qNmDmqszFIIoxbXuR6Se%2BLtj0W Qq5era5ruk%2Fp0QrNwuuVIM6w%2FWmhk5N3Ld1GNl5ndvZbxQ%2FUVp1y5L%2FRiKsOqg7wjNO5beT52QPZ%2F0W6e7L4hIp8cTCmWdPZ0IBOaT3w%2B5UiVKMDdrNcF&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20180503T164435 Z&X-Amz-SignedHeaders=host%3Bx-amz-server-side-encryption%3Bx-amz-server-side-encryption-aws-kms-key-id&X-Amz-Expires=518399&X-Amz-Credential=ASIAI2647DEKRJOGMUMA%2F20180503%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=6fff00bbccc8202169412ae68c7995a69aa03a49114ca8e5bb6eb97f516d1741" \
     -H "x-amz-server-side-encryption:'aws:kms'" \
     -H "x-amz-server-side-encryption-aws-kms-key-id={kmsId}"
     ```
     where __`kmsId`__ can be retrieved from the query parameter __`kms-key`__ in the signed upload URL as shown below:
     
     "signedUploadUrl": "https://{orgId}.via.aspect-cloud.net/s3/aspect-via-data-{region}-{orgId}.s3.amazonaws.com/imports/outreach/list-management/outreach.raw?__`kms-key=08e98aa8-1c0a-4547-bf34-e6f6aa11d16a`__" 

    Please refer to these sites for more information on uploading objects using pre signed urls.
      - https://docs.aws.amazon.com/AmazonS3/latest/dev/PresignedUrlUploadObject.html
      - https://cloud.google.com/storage/docs/access-control/signed-urls
      
    Note: `domain` in the base URL corresponds to the Alvaria&trade; website that hosts the API. Presently, it differs by cloud vendor.

      |**Cloud Vendor**|**Domain**||
      |-|-|-|
      |AWS (Amazon Web Services), Microsoft Azure|via.aspect-cloud.net| 
      |GCP (Google Cloud Platform)|apc.alvaria.cloud|    
paths:
  '/via/v2/organizations/{orgId}/mediaStorage/data/objectKeys':
    parameters:
      - $ref: '#/parameters/orgId'
    get:
      tags:
        - ObjectKeys
      operationId: Get ObjectKeys
      summary: Retrieves list of object keys from S3 bucket
      description: >-
        This operation retrieves a list of object keys from an S3 bucket, which
        you can filter using query parameters To return a list of directories
        inhierarchical format, use the query parameter objectKeysType=directory.
        To return a list of files from all the child folders, use the query
        parameter objectKeysType=file. To get a signed upload URL, use
        signedUrlType parameter=upload, and to get a signed download URL, use
        signedUrlType=download.
      security:
        - oauth:
            - mediastorageapi.exports
            - mediastorageapi.exports.reporting
            - mediastorageapi.exports.reporting.historical
            - mediastorageapi.exports.reporting.outreach
            - mediastorageapi.exports.configuration
            - mediastorageapi.exports.configuration.interaction
            - mediastorageapi.exports.configuration.campaign
            - mediastorageapi.exports.outreach
            - mediastorageapi.exports.outreach.list
            - mediastorageapi.exports.cxp
            - mediastorageapi.exports.cxp.callsre
            - mediastorageapi.exports.cxp.recordings
            - mediastorageapi.exports.cxp.utterances
            - mediastorageapi.exports.aps-custom
            - mediastorageapi.exports.compliance
            - mediastorageapi.exports.compliance.audit
            - mediastorageapi.exports.workforce
            - mediastorageapi.exports.workflow
            - mediastorageapi.imports
            - mediastorageapi.imports.apm
            - mediastorageapi.imports.apm.aom
            - mediastorageapi.imports.apm.ecf
            - mediastorageapi.imports.apm.ecf.processed
            - mediastorageapi.imports.apm.ecf.errors
            - mediastorageapi.imports.configuration
            - mediastorageapi.imports.configuration.interaction
            - mediastorageapi.imports.configuration.campaign
            - mediastorageapi.imports.outreach
            - mediastorageapi.imports.outreach.list
            - mediastorageapi.imports.outreach.exclusions
            - mediastorageapi.imports.outreach.nanp
            - mediastorageapi.imports.aps-custom
            - mediastorageapi.imports.workforce
            - mediastorageapi.imports.workflow
            - mediastorageapi.imports.motivate
            - mediastorageapi.imports.motivate.kpi
            - mediastorageapi.imports.motivate.kpi.processed
            - mediastorageapi.imports.motivate.kpi.errors
            
      parameters:
        - $ref: '#/parameters/authorization'
        - $ref: '#/parameters/x-api-key'
        - name: key
          required: true
          in: query
          description: >-
            Complete path to the object key. If the key is a folder, the path to
            the object ends with '/'. If the key is a file name, then it is a
            path to the file name.
          type: string
        - name: keyType
          required: true
          in: query
          description: "Type of object keys to retrieve from the bucket. Use the following query parameters: \r\n              file: Retrieves a list of files under the specified folder(key). This list includes all the files in all the subfolders as a flat structure.\r\n              directory: Retrieves a list of directories in hierarchical format, including the top level key.\r\n              file:directory:Retreives a list of files and folders one level below.\r\n              signedUploadUrl: Returns a signed upload URL for the specified object key.\r\n              signedDownloadUrl: Returns a signed download URL for the specified key."
          type: string
          enum:
            - file
            - directory
            - signedUploadUrl
            - signedDownloadUrl
            - nativeSignedUploadUrl
            - nativeSignedDownloadUrl
          default: directory
        - 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.
          type: integer
          required: false
        - name: continuationToken
          in: query
          description: >-
            An opaque value that Amazon S3 understands. Amazon S3 lists objects
            in UTF-8 character encoding in lexicographical order.
          type: string
          required: false
      responses:
        '200':
          description: >-
            Successful response. Based on the query parameters supplied, the
            response is different. Use query parameter objectKeys Type=directory
            to return a list of directories in hierarchical format. Use query
            parameter objectKeys type=file to return list of files from all
            child folders. Use signedUrlType parameter=upload to get a signed
            upload URL and signedUrlType=download to get signed download URL.
          schema:
            $ref: '#/definitions/ObjectKeysResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/Error'
        '401':
          description: Unauthorized
        '404':
          description: No record exists for the provided key
          schema:
            $ref: '#/definitions/Error'
        '405':
          description: Method Not Allowed
          schema:
            $ref: '#/definitions/Error'
        '429':
          description: Throttled
          schema:
            $ref: '#/definitions/Error'
        '500':
          description: Internal server error
          schema:
            $ref: '#/definitions/Error'
    delete:
      tags:
        - ObjectKeys
      operationId: Delete ObjectKey
      summary: Deletes an object key from an S3 bucket
      description: Deletes an object key from an S3 bucket
      security:
        - oauth:
            - mediastorageapi.exports
            - mediastorageapi.exports.reporting
            - mediastorageapi.exports.reporting.historical
            - mediastorageapi.exports.reporting.outreach
            - mediastorageapi.exports.configuration
            - mediastorageapi.exports.configuration.interaction
            - mediastorageapi.exports.configuration.campaign
            - mediastorageapi.exports.outreach
            - mediastorageapi.exports.outreach.list
            - mediastorageapi.exports.cxp
            - mediastorageapi.exports.cxp.callsre
            - mediastorageapi.exports.cxp.recordings
            - mediastorageapi.exports.cxp.utterances
            - mediastorageapi.exports.aps-custom
            - mediastorageapi.exports.compliance
            - mediastorageapi.exports.compliance.audit
            - mediastorageapi.exports.workforce
            - mediastorageapi.exports.workflow
            - mediastorageapi.imports
            - mediastorageapi.imports.apm
            - mediastorageapi.imports.apm.aom
            - mediastorageapi.imports.apm.ecf
            - mediastorageapi.imports.apm.ecf.processed
            - mediastorageapi.imports.apm.ecf.errors
            - mediastorageapi.imports.configuration
            - mediastorageapi.imports.configuration.interaction
            - mediastorageapi.imports.configuration.campaign
            - mediastorageapi.imports.outreach
            - mediastorageapi.imports.outreach.list
            - mediastorageapi.imports.outreach.exclusions
            - mediastorageapi.imports.outreach.nanp
            - mediastorageapi.imports.aps-custom
            - mediastorageapi.imports.workforce
            - mediastorageapi.imports.workflow
            - mediastorageapi.imports.motivate
            - mediastorageapi.imports.motivate.kpi
            - mediastorageapi.imports.motivate.kpi.processed
            - mediastorageapi.imports.motivate.kpi.errors
      parameters:
        - $ref: '#/parameters/authorization'
        - $ref: '#/parameters/x-api-key'
        - name: key
          required: true
          in: query
          description: >-
            Complete path to the object key. If the key is a folder, the path to
            the object ends with '/'. If the key is a file name, then it is a
            path to the file name.
          type: string
      responses:
        '204':
          description: Successful response
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/Error'
        '401':
          description: Unauthorized
        '404':
          description: No record exists for the provided key
          schema:
            $ref: '#/definitions/Error'
        '405':
          description: Method Not Allowed
          schema:
            $ref: '#/definitions/Error'
        '429':
          description: Throttled
          schema:
            $ref: '#/definitions/Error'
        '500':
          description: Internal server error
          schema:
            $ref: '#/definitions/Error'
  '/via/v3/organizations/{orgId}/mediaStorage/data/objectKeys':
    parameters:
      - $ref: '#/parameters/orgId'
    get:
      tags:
        - ObjectKeys
      operationId: Get Object Keys V3
      summary: Retrieves a list of object keys from cloud storage bucket
      description: >-
        Retrieves a list of object keys from cloud storage bucket.
      security:
        - oauth:
            - mediastorageapi.exports
            - mediastorageapi.exports.reporting
            - mediastorageapi.exports.reporting.historical
            - mediastorageapi.exports.reporting.outreach
            - mediastorageapi.exports.configuration
            - mediastorageapi.exports.configuration.interaction
            - mediastorageapi.exports.configuration.campaign
            - mediastorageapi.exports.outreach
            - mediastorageapi.exports.outreach.list
            - mediastorageapi.exports.cxp
            - mediastorageapi.exports.cxp.callsre
            - mediastorageapi.exports.cxp.recordings
            - mediastorageapi.exports.cxp.utterances
            - mediastorageapi.exports.aps-custom
            - mediastorageapi.exports.compliance
            - mediastorageapi.exports.compliance.audit
            - mediastorageapi.exports.workforce
            - mediastorageapi.exports.workflow            
            - mediastorageapi.imports
            - mediastorageapi.imports.apm
            - mediastorageapi.imports.apm.aom
            - mediastorageapi.imports.apm.ecf
            - mediastorageapi.imports.apm.ecf.processed
            - mediastorageapi.imports.apm.ecf.errors
            - mediastorageapi.imports.configuration
            - mediastorageapi.imports.configuration.interaction
            - mediastorageapi.imports.configuration.campaign
            - mediastorageapi.imports.outreach
            - mediastorageapi.imports.outreach.list
            - mediastorageapi.imports.outreach.exclusions
            - mediastorageapi.imports.outreach.nanp
            - mediastorageapi.imports.aps-custom
            - mediastorageapi.imports.workforce
            - mediastorageapi.imports.workflow
            - mediastorageapi.imports.motivate
            - mediastorageapi.imports.motivate.kpi
            - mediastorageapi.imports.motivate.kpi.processed
            - mediastorageapi.imports.motivate.kpi.errors            
      parameters:
        - $ref: '#/parameters/authorization'
        - $ref: '#/parameters/x-api-key'
        - name: key
          required: true
          in: query
          description: >-
            Complete path to the object key. If the key is a folder, the path to
            the object ends with '/'. If the key is a file name, then it is a
            path to the file name.
          type: string
        - name: keyType
          required: true
          in: query
          description: "Type of object keys to retrieve from the bucket. Use the following query parameters: \r\n              file: Retrieves a list of files under the specified folder(key). This list includes all the files in all the subfolders as a flat structure.\r\n              directory: Retrieves a list of directories in hierarchical format, including the top level key.\r\n              file:directory:Retreives a list of files and folders one level below.\r\n"
          type: string
          enum:
            - file
            - directory
          default: directory
        - 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.
          type: integer
          required: false
        - name: nextToken
          in: query
          description: >-
            Specifies the token of the first object key from which the result set should start.
            This value is provided by the nextToken field in the response from a previous request to this endpoint.
          type: string
          default: ""
          required: false
      responses:
        '200':
          description: >-
            Successful response. Based on the query parameters supplied, the
            response is different. Use query parameter objectKeys Type=directory
            to return a list of directories in hierarchical format. Use query
            parameter objectKeys type=file to return list of files from all
            child folders. 
          schema:
            $ref: '#/definitions/ObjectKeysResponseV3'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/Error'
        '401':
          description: Unauthorized
        '404':
          description: No record exists for the provided key
          schema:
            $ref: '#/definitions/Error'
        '405':
          description: Method Not Allowed
          schema:
            $ref: '#/definitions/Error'
        '429':
          description: Throttled
          schema:
            $ref: '#/definitions/Error'
        '500':
          description: Internal server error
          schema:
            $ref: '#/definitions/Error'
    delete:
      tags:
        - ObjectKeys
      operationId: Delete ObjectKey V3
      summary: Deletes an object key from an Storage bucket
      description: Deletes an object key from an Storage bucket
      security:
        - oauth:
            - mediastorageapi.exports
            - mediastorageapi.exports.reporting
            - mediastorageapi.exports.reporting.historical
            - mediastorageapi.exports.reporting.outreach
            - mediastorageapi.exports.configuration
            - mediastorageapi.exports.configuration.interaction
            - mediastorageapi.exports.configuration.campaign
            - mediastorageapi.exports.outreach
            - mediastorageapi.exports.outreach.list
            - mediastorageapi.exports.cxp
            - mediastorageapi.exports.cxp.callsre
            - mediastorageapi.exports.cxp.recordings
            - mediastorageapi.exports.cxp.utterances
            - mediastorageapi.exports.aps-custom
            - mediastorageapi.exports.compliance
            - mediastorageapi.exports.compliance.audit
            - mediastorageapi.exports.workforce
            - mediastorageapi.exports.workflow            
            - mediastorageapi.imports
            - mediastorageapi.imports.apm
            - mediastorageapi.imports.apm.aom
            - mediastorageapi.imports.apm.ecf
            - mediastorageapi.imports.apm.ecf.processed
            - mediastorageapi.imports.apm.ecf.errors
            - mediastorageapi.imports.configuration
            - mediastorageapi.imports.configuration.interaction
            - mediastorageapi.imports.configuration.campaign
            - mediastorageapi.imports.outreach
            - mediastorageapi.imports.outreach.list
            - mediastorageapi.imports.outreach.exclusions
            - mediastorageapi.imports.outreach.nanp
            - mediastorageapi.imports.aps-custom
            - mediastorageapi.imports.workforce
            - mediastorageapi.imports.workflow
            - mediastorageapi.imports.motivate
            - mediastorageapi.imports.motivate.kpi
            - mediastorageapi.imports.motivate.kpi.processed
            - mediastorageapi.imports.motivate.kpi.errors          
      parameters:
        - $ref: '#/parameters/authorization'
        - $ref: '#/parameters/x-api-key'
        - name: key
          required: true
          in: query
          description: >-
            Complete path to the object key. If the key is a folder, the path to
            the object ends with '/'. If the key is a file name, then it is a
            path to the file name.
          type: string
      responses:
        '200':
          description: Successful response
          schema:
            $ref: '#/definitions/ObjectDeleteResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/Error'
        '401':
          description: Unauthorized
        '404':
          description: No record exists for the provided key
          schema:
            $ref: '#/definitions/Error'
        '405':
          description: Method Not Allowed
          schema:
            $ref: '#/definitions/Error'
        '429':
          description: Throttled
          schema:
            $ref: '#/definitions/Error'
        '500':
          description: Internal server error
          schema:
            $ref: '#/definitions/Error'
  '/via/v3/organizations/{orgId}/mediaStorage/data/signedUploadUrl':
    parameters:
      - $ref: '#/parameters/orgId'
    get:
      tags:
        - Signed URLs
      operationId: Get SignedUploadUrl
      summary: Retrieves SignedUploadUrl of object key from Storage bucket
      description: >-
        This operation retrieves a signed upload URL for the specified object key, 
        which you can use for uploading the object to the storage bucket.
      security:
        - oauth:
            - mediastorageapi.exports
            - mediastorageapi.exports.reporting
            - mediastorageapi.exports.reporting.historical
            - mediastorageapi.exports.reporting.outreach
            - mediastorageapi.exports.configuration
            - mediastorageapi.exports.configuration.interaction
            - mediastorageapi.exports.configuration.campaign
            - mediastorageapi.exports.outreach
            - mediastorageapi.exports.outreach.list
            - mediastorageapi.exports.cxp
            - mediastorageapi.exports.cxp.callsre
            - mediastorageapi.exports.cxp.recordings
            - mediastorageapi.exports.cxp.utterances
            - mediastorageapi.exports.aps-custom
            - mediastorageapi.exports.compliance
            - mediastorageapi.exports.compliance.audit
            - mediastorageapi.exports.workforce
            - mediastorageapi.exports.workflow            
            - mediastorageapi.imports
            - mediastorageapi.imports.apm
            - mediastorageapi.imports.apm.aom
            - mediastorageapi.imports.apm.ecf
            - mediastorageapi.imports.apm.ecf.processed
            - mediastorageapi.imports.apm.ecf.errors
            - mediastorageapi.imports.configuration
            - mediastorageapi.imports.configuration.interaction
            - mediastorageapi.imports.configuration.campaign
            - mediastorageapi.imports.outreach
            - mediastorageapi.imports.outreach.list
            - mediastorageapi.imports.outreach.exclusions
            - mediastorageapi.imports.outreach.nanp
            - mediastorageapi.imports.aps-custom
            - mediastorageapi.imports.workforce            
            - mediastorageapi.imports.workflow
            - mediastorageapi.imports.motivate
            - mediastorageapi.imports.motivate.kpi
            - mediastorageapi.imports.motivate.kpi.processed
            - mediastorageapi.imports.motivate.kpi.errors            
      parameters:
        - $ref: '#/parameters/authorization'
        - $ref: '#/parameters/x-api-key'
        - name: key
          required: true
          in: query
          description: >-
            This operation retrieves a signed upload URL for the specified object key, 
            which you can use for uploading the object to the storage bucket..
          type: string
      responses:
        '200':
          description: >-
            Successful response with a signedUploadUrl details.
          schema:
            $ref: '#/definitions/SignedUploadUrlResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/Error'
        '401':
          description: Unauthorized
        '404':
          description: No record exists for the provided key
          schema:
            $ref: '#/definitions/Error'
        '405':
          description: Method Not Allowed
          schema:
            $ref: '#/definitions/Error'
        '429':
          description: Throttled
          schema:
            $ref: '#/definitions/Error'
        '500':
          description: Internal server error
          schema:
            $ref: '#/definitions/Error'
  '/via/v3/organizations/{orgId}/mediaStorage/data/signedDownloadUrl':
    parameters:
      - $ref: '#/parameters/orgId'
    get:
      tags:
        - Signed URLs
      operationId: Get SignedDownloadUrl
      summary: Retrieves SignedDownloadUrl of object key from Storage bucket
      description: >-
        This operation retrieves a signed download URL for the specified object key, 
        which you can use for downloading the object from Storage bucket.
      security:
        - oauth:
            - mediastorageapi.exports
            - mediastorageapi.exports.reporting
            - mediastorageapi.exports.reporting.historical
            - mediastorageapi.exports.reporting.outreach
            - mediastorageapi.exports.configuration
            - mediastorageapi.exports.configuration.interaction
            - mediastorageapi.exports.configuration.campaign
            - mediastorageapi.exports.outreach
            - mediastorageapi.exports.outreach.list
            - mediastorageapi.exports.cxp
            - mediastorageapi.exports.cxp.callsre
            - mediastorageapi.exports.cxp.recordings
            - mediastorageapi.exports.cxp.utterances
            - mediastorageapi.exports.aps-custom
            - mediastorageapi.exports.compliance
            - mediastorageapi.exports.compliance.audit
            - mediastorageapi.exports.workforce
            - mediastorageapi.exports.workflow            
            - mediastorageapi.imports
            - mediastorageapi.imports.apm
            - mediastorageapi.imports.apm.aom
            - mediastorageapi.imports.apm.ecf
            - mediastorageapi.imports.apm.ecf.processed
            - mediastorageapi.imports.apm.ecf.errors
            - mediastorageapi.imports.configuration
            - mediastorageapi.imports.configuration.interaction
            - mediastorageapi.imports.configuration.campaign
            - mediastorageapi.imports.outreach
            - mediastorageapi.imports.outreach.list
            - mediastorageapi.imports.outreach.exclusions
            - mediastorageapi.imports.outreach.nanp
            - mediastorageapi.imports.aps-custom
            - mediastorageapi.imports.workforce            
            - mediastorageapi.imports.workflow
            - mediastorageapi.imports.motivate
            - mediastorageapi.imports.motivate.kpi
            - mediastorageapi.imports.motivate.kpi.processed
            - mediastorageapi.imports.motivate.kpi.errors            
      parameters:
        - $ref: '#/parameters/authorization'
        - $ref: '#/parameters/x-api-key'
        - name: key
          required: true
          in: query
          description: >-
            This operation retrieves a signed download URL for the specified object key, 
            which you can use for downloading the object from Storage bucket.
          type: string
      responses:
        '200':
          description: >-
            Successful response with a signedDownloadUrl details.
          schema:
            $ref: '#/definitions/SignedDownloadUrlResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/Error'
        '401':
          description: Unauthorized
        '404':
          description: No record exists for the provided key
          schema:
            $ref: '#/definitions/Error'
        '405':
          description: Method Not Allowed
          schema:
            $ref: '#/definitions/Error'
        '429':
          description: Throttled
          schema:
            $ref: '#/definitions/Error'
        '500':
          description: Internal server error
          schema:
            $ref: '#/definitions/Error'
securityDefinitions:
  oauth:
    type: oauth2
    authorizationUrl: >-
      https://myaspect.{region}.id.aspect-cloud.net/tokenservice/oauth2/access_token?realm={orgId}
    flow: implicit
    scopes:
      mediastorageapi.exports: Manage S3 resources
      mediastorageapi.exports.reporting: Manage S3 resources
      mediastorageapi.exports.reporting.historical: Manage S3 resources
      mediastorageapi.exports.reporting.outreach: Manage S3 resources
      mediastorageapi.exports.configuration: Manage S3 resources
      mediastorageapi.exports.configuration.interaction: Manage S3 resources
      mediastorageapi.exports.configuration.campaign: Manage S3 resources
      mediastorageapi.exports.outreach: Manage S3 resources
      mediastorageapi.exports.outreach.list: Manage S3 resources
      mediastorageapi.exports.cxp: Manage S3 resources
      mediastorageapi.exports.cxp.callsre: Manage S3 resources
      mediastorageapi.exports.cxp.recordings: Manage S3 resources
      mediastorageapi.exports.cxp.utterances: Manage S3 resources
      mediastorageapi.exports.aps-custom: Manage S3 resources
      mediastorageapi.exports.compliance: Manage S3 resources
      mediastorageapi.exports.compliance.audit: Manage S3 resources
      mediastorageapi.exports.workforce: Manage S3 resources
      mediastorageapi.exports.workflow: Manage S3 resources
      mediastorageapi.imports: Manage S3 resources
      mediastorageapi.imports.apm: Manage S3 resources
      mediastorageapi.imports.apm.aom: Manage S3 resources
      mediastorageapi.imports.apm.ecf: Manage S3 resources
      mediastorageapi.imports.apm.ecf.processed: Manage S3 resources
      mediastorageapi.imports.apm.ecf.errors: Manage S3 resources
      mediastorageapi.imports.configuration: Manage S3 resources
      mediastorageapi.imports.configuration.interaction: Manage S3 resources
      mediastorageapi.imports.configuration.campaign: Manage S3 resources
      mediastorageapi.imports.outreach: Manage S3 resources
      mediastorageapi.imports.outreach.list: Manage S3 resources
      mediastorageapi.imports.outreach.exclusions: Manage S3 resources
      mediastorageapi.imports.outreach.nanp: Manage S3 resources
      mediastorageapi.imports.aps-custom: Manage S3 resources
      mediastorageapi.imports.workforce: Manage S3 resources
      mediastorageapi.imports.workflow: Manage S3 resources
      mediastorageapi.imports.motivate: Manage S3 resources
      mediastorageapi.imports.motivate.kpi: Manage S3 resources
      mediastorageapi.imports.motivate.kpi.processed: Manage S3 resources
      mediastorageapi.imports.motivate.kpi.errors: Manage S3 resources
definitions:
  ObjectKeysFragment:
    title: ObjectKeysFragment
    type: object
    properties:
      kind:
        description: >-
          Identifier used by Alvaria&trade; Cloud components to serialize the payload
          of the results
        type: string
        default: 'via#objectKey'
        example: objectKey
      key:
        description: Path to the object key
        type: boolean
        example: data-extracts/
      keyName:
        description: Object key name
        type: string
        example: data-extracts
      size:
        description: >-
          Size of the object key in kilobytes. This is applicable for the file
          type object key only.
        type: string
        example: 4.3 kb
      lastModifiedTime:
        description: Last modified date for the object key
        type: string
        format: date-time
        example: '2017-11-30T13:01:58.247Z'
      keyType:
        description: 'Type of file, which is  File or Directory'
        type: string
        enum:
          - file
          - directory
        default: directory
        example: directory
      childObjectKeys:
        description: Sub-directories inside an object key
        type: array
        items:
          $ref: '#/definitions/ObjectKeysFragment'
      signedUploadUrl:
        description: >-
          Signed upload URL for the object key. This value is used for the
          signedUploadUrl request keyType only.Signed upload URL expires after
          an hour.
        type: string
        example: >-
          https://test.via.aspect-cloud.net/s3/aspect-via-pvd-common.s3.amazonaws.com/cxp/cork/Audio/Messages/hours.wav?X-Amz-Security-Token=FQoDYXdzEJn%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDNXqwahT0%2BCL8wxFyiL1Ac5qEeE6UEgzfKgwRM%2FJKbuD4HqH9n75FGQB7GjoFmaxup2C7beu4YfLQsZ6nWo8KVL%2BwId4UuNEc8Mk6uVUlm58TEx4rwgSsnFatrDacdMQDwy760DH5RIJQdgrrsRrk4AU2e7YW5iBprpATQ45LKooZTGKEFOf9GS%2Bufru005LR%2BQ91m8TT8S3DvFuiha0J8p16QjMblpJMGfaxCh%2FatxW9i7szwKVURI%2FOpDMcgs%2BM3%2B5%2BdA4cZZ2p0Ci2LxQdDf9cUJ2ZR2zXWWTJ%2FB64SuYje8ZDsVUCTrMCs0nzayO59GvMhfxQiCJM1LyNh%2B%2FS2jvrUZqKJXGmNQF&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20180216T001726Z&X-Amz-SignedHeaders=host&X-Amz-Expires=518399&X-Amz-Credential=ASIAIDVYUYZXKN22OWZQ%2F20180216%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=72120a45204f09768a7eeee9518dcd1e4324e2735905c9f1dd32c7a43f3cb13f
      nativeSignedUploadUrl:
        description: >-
          Native Signed upload URL for the object key. This value is used for
          the nativeSignedUploadUrl request keyType only. Native Signed upload URL
          expires after an hour.
        type: string
        example: >-
          https://aspect-via-pvd-common.s3.amazonaws.com/cxp/cork/Audio/Messages/hours.wav?X-Amz-Security-Token=FQoDYXdzEJn%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDNXqwahT0%2BCL8wxFyiL1Ac5qEeE6UEgzfKgwRM%2FJKbuD4HqH9n75FGQB7GjoFmaxup2C7beu4YfLQsZ6nWo8KVL%2BwId4UuNEc8Mk6uVUlm58TEx4rwgSsnFatrDacdMQDwy760DH5RIJQdgrrsRrk4AU2e7YW5iBprpATQ45LKooZTGKEFOf9GS%2Bufru005LR%2BQ91m8TT8S3DvFuiha0J8p16QjMblpJMGfaxCh%2FatxW9i7szwKVURI%2FOpDMcgs%2BM3%2B5%2BdA4cZZ2p0Ci2LxQdDf9cUJ2ZR2zXWWTJ%2FB64SuYje8ZDsVUCTrMCs0nzayO59GvMhfxQiCJM1LyNh%2B%2FS2jvrUZqKJXGmNQF&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20180216T001726Z&X-Amz-SignedHeaders=host&X-Amz-Expires=518399&X-Amz-Credential=ASIAIDVYUYZXKN22OWZQ%2F20180216%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=72120a45204f09768a7eeee9518dcd1e4324e2735905c9f1dd32c7a43f3cb13f
      signedDownloadUrl:
        description: >-
          Signed download URL for the object key. This value is used for the
          signedDownloadUrl keyType only.Signed download URL expires after an
          hour
        type: string
        example: >-
          https://test.via.aspect-cloud.net/s3/aspect-via-pvd-common.s3.amazonaws.com/cxp/cork/Audio/Messages/hours.wav?X-Amz-Security-Token=FQoDYXdzEJn%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDNXqwahT0%2BCL8wxFyiL1Ac5qEeE6UEgzfKgwRM%2FJKbuD4HqH9n75FGQB7GjoFmaxup2C7beu4YfLQsZ6nWo8KVL%2BwId4UuNEc8Mk6uVUlm58TEx4rwgSsnFatrDacdMQDwy760DH5RIJQdgrrsRrk4AU2e7YW5iBprpATQ45LKooZTGKEFOf9GS%2Bufru005LR%2BQ91m8TT8S3DvFuiha0J8p16QjMblpJMGfaxCh%2FatxW9i7szwKVURI%2FOpDMcgs%2BM3%2B5%2BdA4cZZ2p0Ci2LxQdDf9cUJ2ZR2zXWWTJ%2FB64SuYje8ZDsVUCTrMCs0nzayO59GvMhfxQiCJM1LyNh%2B%2FS2jvrUZqKJXGmNQF&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20180216T001726Z&X-Amz-SignedHeaders=host&X-Amz-Expires=518399&X-Amz-Credential=ASIAIDVYUYZXKN22OWZQ%2F20180216%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=72120a45204f09768a7eeee9518dcd1e4324e2735905c9f1dd32c7a43f3cb13f
      nativeSignedDownloadUrl:
        description: >-
          Native Signed download URL for the object key. This value is used for
          the nativeSignedDownloadUrl request keyType only. Native Signed download URL
          expires after an hour
        type: string
        example: >-
          https://aspect-via-pvd-common.s3.amazonaws.com/cxp/cork/Audio/Messages/hours.wav?X-Amz-Security-Token=FQoDYXdzEJn%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDNXqwahT0%2BCL8wxFyiL1Ac5qEeE6UEgzfKgwRM%2FJKbuD4HqH9n75FGQB7GjoFmaxup2C7beu4YfLQsZ6nWo8KVL%2BwId4UuNEc8Mk6uVUlm58TEx4rwgSsnFatrDacdMQDwy760DH5RIJQdgrrsRrk4AU2e7YW5iBprpATQ45LKooZTGKEFOf9GS%2Bufru005LR%2BQ91m8TT8S3DvFuiha0J8p16QjMblpJMGfaxCh%2FatxW9i7szwKVURI%2FOpDMcgs%2BM3%2B5%2BdA4cZZ2p0Ci2LxQdDf9cUJ2ZR2zXWWTJ%2FB64SuYje8ZDsVUCTrMCs0nzayO59GvMhfxQiCJM1LyNh%2B%2FS2jvrUZqKJXGmNQF&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20180216T001726Z&X-Amz-SignedHeaders=host&X-Amz-Expires=518399&X-Amz-Credential=ASIAIDVYUYZXKN22OWZQ%2F20180216%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=72120a45204f09768a7eeee9518dcd1e4324e2735905c9f1dd32c7a43f3cb13f
  ObjectDeleteResponse:
    title: ObjectDeleteResponse
    type: object
    properties:
      key:
        description: Path to the object key
        type: boolean
        example: imports/outreach/list-management/outreach.raw
      keyHash:
        description: Object key name
        type: string
        example: 20524e222a70ca34d971b25c98496d62
      status:
        description: >-
          Size of the object key in kilobytes. This is applicable for the file
          type object key only.
        type: string
        example: Delete request succeeded
  ObjectKeysResponse:
    type: object
    properties:
      kind:
        description: >-
          Identifier used by Alvaria&trade; Cloud components to serialize the payload
          of the results
        type: string
        default: 'via#objectKeys'
        example: objectKeys
      continuationToken:
        description: >-
          An opaque value that Amazon S3 understands. Amazon S3 lists objects in
          UTF-8 character encoding in lexicographical order.
        type: string
        example: >-
          1r9Wr8kyEUJAyKZSaCPKqGB7I82fcNaLn7cekXJMgaou/XC44lh65A5Lh/bx34mWFrqZk/+J%2B6wXNFaDeGbbjEnjE4rx2br40gf2Y6XUXKmQ=
      objectKeys:
        type: array
        items:
          $ref: '#/definitions/ObjectKeysFragment'
  SignedUploadUrlResponse:
    title: SignedUploadUrlResponse
    type: object
    properties:
      key:
        description: Path to the object key
        type: boolean
        example: data-extracts/
      keyHash:
        description: Object key name
        type: string
        example: 20524e222a70ca34d971b25c98496d62
      keyName:
        description: Object key name
        type: string
        example: data-extracts
      size:
        description: >-
          Size of the object key in kilobytes. This is applicable for the file
          type object key only.
        type: string
        example: 4.3 kb
      lastModifiedTime:
        description: Last modified date for the object key
        type: string
        format: date-time
        example: '2017-11-30T13:01:58.247Z'
      signedUploadUrl:
        description: >-
          Signed upload URL for the object key. This value is used for the
          signedUploadUrl request only. Signed upload URL expires after
          an hour.
        type: string
        example: >-
          https://test.via.aspect-cloud.net/s3/aspect-via-pvd-common.s3.amazonaws.com/cxp/cork/Audio/Messages/hours.wav?X-Amz-Security-Token=FQoDYXdzEJn%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDNXqwahT0%2BCL8wxFyiL1Ac5qEeE6UEgzfKgwRM%2FJKbuD4HqH9n75FGQB7GjoFmaxup2C7beu4YfLQsZ6nWo8KVL%2BwId4UuNEc8Mk6uVUlm58TEx4rwgSsnFatrDacdMQDwy760DH5RIJQdgrrsRrk4AU2e7YW5iBprpATQ45LKooZTGKEFOf9GS%2Bufru005LR%2BQ91m8TT8S3DvFuiha0J8p16QjMblpJMGfaxCh%2FatxW9i7szwKVURI%2FOpDMcgs%2BM3%2B5%2BdA4cZZ2p0Ci2LxQdDf9cUJ2ZR2zXWWTJ%2FB64SuYje8ZDsVUCTrMCs0nzayO59GvMhfxQiCJM1LyNh%2B%2FS2jvrUZqKJXGmNQF&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20180216T001726Z&X-Amz-SignedHeaders=host&X-Amz-Expires=518399&X-Amz-Credential=ASIAIDVYUYZXKN22OWZQ%2F20180216%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=72120a45204f09768a7eeee9518dcd1e4324e2735905c9f1dd32c7a43f3cb13f
      nativeSignedUploadUrl:
        description: >-
          Native Signed upload URL for the object key. This value is used for
          the nativeSignedUploadUrl request only. Native Signed upload URL
          expires after an hour.
        type: string
        example: >-
          https://aspect-via-pvd-common.s3.amazonaws.com/cxp/cork/Audio/Messages/hours.wav?X-Amz-Security-Token=FQoDYXdzEJn%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDNXqwahT0%2BCL8wxFyiL1Ac5qEeE6UEgzfKgwRM%2FJKbuD4HqH9n75FGQB7GjoFmaxup2C7beu4YfLQsZ6nWo8KVL%2BwId4UuNEc8Mk6uVUlm58TEx4rwgSsnFatrDacdMQDwy760DH5RIJQdgrrsRrk4AU2e7YW5iBprpATQ45LKooZTGKEFOf9GS%2Bufru005LR%2BQ91m8TT8S3DvFuiha0J8p16QjMblpJMGfaxCh%2FatxW9i7szwKVURI%2FOpDMcgs%2BM3%2B5%2BdA4cZZ2p0Ci2LxQdDf9cUJ2ZR2zXWWTJ%2FB64SuYje8ZDsVUCTrMCs0nzayO59GvMhfxQiCJM1LyNh%2B%2FS2jvrUZqKJXGmNQF&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20180216T001726Z&X-Amz-SignedHeaders=host&X-Amz-Expires=518399&X-Amz-Credential=ASIAIDVYUYZXKN22OWZQ%2F20180216%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=72120a45204f09768a7eeee9518dcd1e4324e2735905c9f1dd32c7a43f3cb13f
  SignedDownloadUrlResponse:
    title: SignedDownloadUrlResponse
    type: object
    properties:
      key:
        description: Path to the object key
        type: boolean
        example: data-extracts/
      keyHash:
        description: Object key name
        type: string
        example: 20524e222a70ca34d971b25c98496d62
      keyName:
        description: Object key name
        type: string
        example: data-extracts
      size:
        description: >-
          Size of the object key in kilobytes. This is applicable for the file
          type object key only.
        type: string
        example: 4.3 kb
      lastModifiedTime:
        description: Last modified date for the object key
        type: string
        format: date-time
        example: '2017-11-30T13:01:58.247Z'
      signedDownloadUrl:
        description: >-
          Signed download URL for the object key. This value is used for the
          signedDownloadUrl only. Signed download URL expires after an
          hour
        type: string
        example: >-
          https://test.via.aspect-cloud.net/s3/aspect-via-pvd-common.s3.amazonaws.com/cxp/cork/Audio/Messages/hours.wav?X-Amz-Security-Token=FQoDYXdzEJn%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDNXqwahT0%2BCL8wxFyiL1Ac5qEeE6UEgzfKgwRM%2FJKbuD4HqH9n75FGQB7GjoFmaxup2C7beu4YfLQsZ6nWo8KVL%2BwId4UuNEc8Mk6uVUlm58TEx4rwgSsnFatrDacdMQDwy760DH5RIJQdgrrsRrk4AU2e7YW5iBprpATQ45LKooZTGKEFOf9GS%2Bufru005LR%2BQ91m8TT8S3DvFuiha0J8p16QjMblpJMGfaxCh%2FatxW9i7szwKVURI%2FOpDMcgs%2BM3%2B5%2BdA4cZZ2p0Ci2LxQdDf9cUJ2ZR2zXWWTJ%2FB64SuYje8ZDsVUCTrMCs0nzayO59GvMhfxQiCJM1LyNh%2B%2FS2jvrUZqKJXGmNQF&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20180216T001726Z&X-Amz-SignedHeaders=host&X-Amz-Expires=518399&X-Amz-Credential=ASIAIDVYUYZXKN22OWZQ%2F20180216%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=72120a45204f09768a7eeee9518dcd1e4324e2735905c9f1dd32c7a43f3cb13f
      nativeSignedDownloadUrl:
        description: >-
          Native Signed download URL for the object key. This value is used for
          the nativeSignedDownloadUrl request only. Native Signed download URL
          expires after an hour
        type: string
        example: >-
          https://aspect-via-pvd-common.s3.amazonaws.com/cxp/cork/Audio/Messages/hours.wav?X-Amz-Security-Token=FQoDYXdzEJn%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDNXqwahT0%2BCL8wxFyiL1Ac5qEeE6UEgzfKgwRM%2FJKbuD4HqH9n75FGQB7GjoFmaxup2C7beu4YfLQsZ6nWo8KVL%2BwId4UuNEc8Mk6uVUlm58TEx4rwgSsnFatrDacdMQDwy760DH5RIJQdgrrsRrk4AU2e7YW5iBprpATQ45LKooZTGKEFOf9GS%2Bufru005LR%2BQ91m8TT8S3DvFuiha0J8p16QjMblpJMGfaxCh%2FatxW9i7szwKVURI%2FOpDMcgs%2BM3%2B5%2BdA4cZZ2p0Ci2LxQdDf9cUJ2ZR2zXWWTJ%2FB64SuYje8ZDsVUCTrMCs0nzayO59GvMhfxQiCJM1LyNh%2B%2FS2jvrUZqKJXGmNQF&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20180216T001726Z&X-Amz-SignedHeaders=host&X-Amz-Expires=518399&X-Amz-Credential=ASIAIDVYUYZXKN22OWZQ%2F20180216%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=72120a45204f09768a7eeee9518dcd1e4324e2735905c9f1dd32c7a43f3cb13f
  ObjectKeysResponseV3:
    type: object
    properties:
      kind:
        description: >-
          Identifier used by Alvaria&trade; Cloud components to serialize the payload
          of the results.
        type: string
        default: 'via#objectKeys'
        example: objectKeys
      nextToken:
        description: >-
          An obfuscated unique identifier of an object from cloud storage. Cloud Storage lists objects in
          UTF-8 character encoding in lexicographical order.
        type: string
        example: >-
          ZXhwb3J0cy9yZXBvcnRpbmcvaW50cmFkYXkvaW50cmFkYXktMjAyMV8wNV8zMV8xNC50YXIuZ3o=
      totalItems:
        description: >-
          The total number of matching items, which would result from aggregating the items from all partial result sets given by the maxResults parameter.
        type: integer
        example: >-
          500
      objectKeys:
        type: array
        items:
          $ref: '#/definitions/ObjectKeysFragment'
  ChildObjectKeysResponse:
    type: object
    properties:
      key:
        description: Path to the object key
        type: boolean
        example: data-extracts/
      keyHash:
        description: Object key name
        type: string
        example: 20524e222a70ca34d971b25c98496d62
      keyName:
        description: Object key name
        type: string
        example: data-extracts
      size:
        description: >-
          Size of the object key in kilobytes. This is applicable for the file
          type object key only.
        type: string
        example: 4.3 kb
      lastModifiedTime:
        description: Last modified date for the object key
        type: string
        format: date-time
        example: '2017-11-30T13:01:58.247Z'
      keyType:
        description: 'Type of file, which is  File or Directory'
        type: string
        enum:
          - file
          - directory
        default: directory
        example: directory
      childObjectKeys:
        description: Sub-directories inside an object key
        type: array
        items:
          $ref: '#/definitions/ChildObjectKeysResponse'
  Error:
    type: object
    required:
      - error
    properties:
      error:
        $ref: '#/definitions/ErrorResponse'
  ErrorResponse:
    type: object
    required:
      - code
      - message
      - errors
    properties:
      code:
        type: integer
        description: HTTP error status.
        example: '400'
      message:
        type: string
        example: Bad request
      errors:
        type: array
        items:
          $ref: '#/definitions/ErrorResponseItem'
  ErrorResponseItem:
    type: object
    required:
      - scope
      - reason
      - message
    properties:
      scope:
        type: string
        example: global
      reason:
        type: string
        example: Invalid request
      message:
        type: string
        example: The bucketName is invalid
parameters:
  authorization:
    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
  x-api-key:
    name: x-api-key
    in: header
    description: |
      Alvaria-provided value used to track API endpoint usage
    required: true
    type: string
  orgId:
    name: orgId
    in: path
    description: Name of a customer organization
    required: true
    type: string
