下載通話錄音。
調試
您可以在OpenAPI Explorer中直接運行該接口,免去您計算簽名的困擾。運行成功后,OpenAPI Explorer可以自動生成SDK代碼示例。
請求參數
名稱 |
類型 |
是否必選 |
示例值 |
描述 |
Action | String | 是 | DownloadRecording | 系統規定參數。取值:DownloadRecording。 |
InstanceId | String | 是 | da37319b-6c83-4268-9f19-814aed62e401 | 實例ID |
TaskId | String | 是 | 744b27f3-437f-4a8c-a181-f668e492fd24 | 通話ID |
NeedVoiceSliceRecording | Boolean | 否 | false | 是否查詢分段錄音 |
返回數據
名稱 |
類型 |
示例值 |
描述 |
HttpStatusCode | Integer | 200 | HTTP狀態碼 |
Code | String | OK | 接口狀態碼 |
Message | String | Success | 接口提示消息 |
RequestId | String | 254EB995-DEDF-48A4-9101-9CA5B72FFBCC | 請求ID |
Success | Boolean | true | 是否成功 |
DownloadParams | Object | 文檔下載地址 |
|
SignatureUrl | String | http://tiangong-staging.oss-cn-shanghai.aliyuncs.com/record/281eb174-3865-41c1-9274-7b6813edadab.wav?Expires=1578624046&OSSAccessKeyId=LTAI****cqw&Signature=dL2dxWS6VcdZrvG9xOMOBMSP3Fg%3D | 一個指向錄音文件的URL,使用HTTP下載 |
FileName | String | 281eb174-3865-41c1-9274-7b6813edadab.wav | 錄音文件名,通常為一個uuid |
VoiceSliceRecordingListJson | String | [{"fileName":"10a17c447415424c99491884abe27d8a-1.wav","filePath":"https://ssml-test.oss-cn-shanghai.aliyuncs.com/7253/voiceSlice/10a17c447415424c99491884abe27d8a/10a17c447415424c99491884abe27d8a-1.wav?Expires=1686645470&OSSAccessKeyId=LTA*********kr8M9&Signature=V23OhiV5yIOoouriu6SiWkO9h8E%3D"}] | 分段錄音列表,包含文件名和文件URL |
示例
請求示例
http(s)://[Endpoint]/?Action=DownloadRecording
&InstanceId=da37319b-6c83-4268-9f19-814aed62e401
&TaskId=744b27f3-437f-4a8c-a181-f668e492fd24
&NeedVoiceSliceRecording=false
&公共請求參數
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<DownloadRecordingResponse>
<HttpStatusCode>200</HttpStatusCode>
<Code>OK</Code>
<Message>Success</Message>
<RequestId>254EB995-DEDF-48A4-9101-9CA5B72FFBCC</RequestId>
<Success>true</Success>
<DownloadParams>
<SignatureUrl>http://tiangong-staging.oss-cn-shanghai.aliyuncs.com/record/281eb174-3865-41c1-9274-7b6813edadab.wav?Expires=1578624046&OSSAccessKeyId=LTAI****cqw&Signature=dL2dxWS6VcdZrvG9xOMOBMSP3Fg%3D</SignatureUrl>
<FileName>281eb174-3865-41c1-9274-7b6813edadab.wav</FileName>
<VoiceSliceRecordingListJson>[{"fileName":"10a17c447415424c99491884abe27d8a-1.wav","filePath":"https://ssml-test.oss-cn-shanghai.aliyuncs.com/7253/voiceSlice/10a17c447415424c99491884abe27d8a/10a17c447415424c99491884abe27d8a-1.wav?Expires=1686645470&OSSAccessKeyId=LTA*********kr8M9&Signature=V23OhiV5yIOoouriu6SiWkO9h8E%3D"}]</VoiceSliceRecordingListJson>
</DownloadParams>
</DownloadRecordingResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"HttpStatusCode" : 200,
"Code" : "OK",
"Message" : "Success",
"RequestId" : "254EB995-DEDF-48A4-9101-9CA5B72FFBCC",
"Success" : true,
"DownloadParams" : {
"SignatureUrl" : "http://tiangong-staging.oss-cn-shanghai.aliyuncs.com/record/281eb174-3865-41c1-9274-7b6813edadab.wav?Expires=1578624046&OSSAccessKeyId=LTAI****cqw&Signature=dL2dxWS6VcdZrvG9xOMOBMSP3Fg%3D",
"FileName" : "281eb174-3865-41c1-9274-7b6813edadab.wav",
"VoiceSliceRecordingListJson" : "[{\"fileName\":\"10a17c447415424c99491884abe27d8a-1.wav\",\"filePath\":\"https://ssml-test.oss-cn-shanghai.aliyuncs.com/7253/voiceSlice/10a17c447415424c99491884abe27d8a/10a17c447415424c99491884abe27d8a-1.wav?Expires=1686645470&OSSAccessKeyId=LTA*********kr8M9&Signature=V23OhiV5yIOoouriu6SiWkO9h8E%3D\"}]"
}
}
錯誤碼
HttpCode |
錯誤碼 |
錯誤信息 |
描述 |
404 | NotExist.Instance | The specified Instance does not exist. | 指定的實例不存在。 |
500 | InternalError | An error occurred while processing your request. Please try again later. Submit a ticket if the error still exists. | 內部錯誤。建議重試,如果多次重試報錯請提交工單。 |
訪問錯誤中心查看更多錯誤碼。
文檔內容是否對您有幫助?