{
  "opencollection": "1.0.0",
  "info": {
    "name": "Alianza Media API",
    "version": "2"
  },
  "items": [
    {
      "info": {
        "name": "Media",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Retrieve Media. Will return a 302 redirect to the actual file location",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.d2.alianza.com/v2/partition/:partitionId/account/:accountId/media_2/:id",
            "headers": [
              {
                "name": "X-AUTH-TOKEN",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "partitionId",
                "value": "",
                "type": "path",
                "description": "ID of partition"
              },
              {
                "name": "accountId",
                "value": "",
                "type": "path",
                "description": "ID of account"
              },
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "ID of prompt"
              },
              {
                "name": "mediaType",
                "value": "",
                "type": "query",
                "description": "Type of Media"
              }
            ]
          },
          "docs": "Use to retrieve Media of a given type"
        },
        {
          "info": {
            "name": "update_2",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://api.d2.alianza.com/v2/partition/:partitionId/account/:accountId/media_2/:id",
            "headers": [
              {
                "name": "X-AUTH-TOKEN",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "partitionId",
                "value": "",
                "type": "path",
                "description": "ID of partition"
              },
              {
                "name": "accountId",
                "value": "",
                "type": "path",
                "description": "ID of account"
              },
              {
                "name": "id",
                "value": "",
                "type": "path"
              }
            ]
          }
        },
        {
          "info": {
            "name": "deleteHoldMusic",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.d2.alianza.com/v2/partition/:partitionId/account/:accountId/media_2/:id",
            "headers": [
              {
                "name": "X-AUTH-TOKEN",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "partitionId",
                "value": "",
                "type": "path",
                "description": "ID of partition"
              },
              {
                "name": "accountId",
                "value": "",
                "type": "path",
                "description": "ID of account"
              },
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "ID of Hold Music Media"
              }
            ]
          }
        },
        {
          "info": {
            "name": "Upload IVR Prompt or Account Hold Music",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.d2.alianza.com/v2/partition/:partitionId/account/:accountId/media_2",
            "headers": [
              {
                "name": "X-AUTH-TOKEN",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "partitionId",
                "value": "",
                "type": "path",
                "description": "ID of partition"
              },
              {
                "name": "accountId",
                "value": "",
                "type": "path",
                "description": "ID of account"
              },
              {
                "name": "jobUploadKey",
                "value": "",
                "type": "query",
                "description": "Provide an upload key (Use for Hold Music)"
              }
            ],
            "body": {
              "type": "multipart-form",
              "data": [
                {
                  "name": "file",
                  "type": "text",
                  "value": ""
                }
              ]
            }
          },
          "docs": "Use to add an IVR Prompt (use file upload to submit a wav file).\nUse to add Hold Music (use the job service, then submit the jobUploadKey for the wav, mp3, ogg already uploaded)"
        },
        {
          "info": {
            "name": "Retrieve Hold Music Media ID.",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.d2.alianza.com/v2/partition/:partitionId/account/:accountId/media_2/type/holdmusic",
            "headers": [
              {
                "name": "X-AUTH-TOKEN",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "partitionId",
                "value": "",
                "type": "path",
                "description": "ID of partition"
              },
              {
                "name": "accountId",
                "value": "",
                "type": "path",
                "description": "ID of account"
              },
              {
                "name": "custom",
                "value": "",
                "type": "query"
              }
            ]
          },
          "docs": "Use to retrieve Hold Music Media ID"
        },
        {
          "info": {
            "name": "Remove the hold music media selection for this account",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.d2.alianza.com/v2/partition/:partitionId/account/:accountId/media_2/type/holdmusic",
            "headers": [
              {
                "name": "X-AUTH-TOKEN",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "partitionId",
                "value": "",
                "type": "path",
                "description": "ID of partition"
              },
              {
                "name": "accountId",
                "value": "",
                "type": "path",
                "description": "ID of account"
              }
            ]
          },
          "docs": "Used to remove an existing media storage id that is used to play hold music for this account."
        },
        {
          "info": {
            "name": "Set the hold music on this account to this media storage id.",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://api.d2.alianza.com/v2/partition/:partitionId/account/:accountId/media_2/type/holdmusic/:id",
            "headers": [
              {
                "name": "X-AUTH-TOKEN",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "partitionId",
                "value": "",
                "type": "path",
                "description": "ID of partition"
              },
              {
                "name": "accountId",
                "value": "",
                "type": "path",
                "description": "ID of account"
              },
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "Hold Music storage id"
              }
            ]
          },
          "docs": "Used to set the hold music to a different storage id"
        },
        {
          "info": {
            "name": "Retrieve Media of type",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.d2.alianza.com/v2/partition/:partitionId/account/:accountId/media/:mediaId",
            "headers": [
              {
                "name": "X-AUTH-TOKEN",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "partitionId",
                "value": "",
                "type": "path",
                "description": "ID of partition"
              },
              {
                "name": "accountId",
                "value": "",
                "type": "path",
                "description": "ID of account"
              },
              {
                "name": "mediaId",
                "value": "",
                "type": "path",
                "description": "ID of prompt"
              },
              {
                "name": "fileName",
                "value": "",
                "type": "query",
                "description": "Name of media"
              },
              {
                "name": "mediaType",
                "value": "",
                "type": "query",
                "description": "Type of Media"
              }
            ]
          },
          "docs": "Use to retrieve Media of a given type"
        },
        {
          "info": {
            "name": "Add IVR prompt",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.d2.alianza.com/v2/partition/:partitionId/account/:accountId/media",
            "headers": [
              {
                "name": "X-AUTH-TOKEN",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "partitionId",
                "value": "",
                "type": "path",
                "description": "ID of partition"
              },
              {
                "name": "accountId",
                "value": "",
                "type": "path",
                "description": "ID of account"
              }
            ],
            "body": {
              "type": "multipart-form",
              "data": []
            }
          },
          "docs": "Use to add an IVR prompt"
        }
      ]
    }
  ],
  "bundled": true
}