Juan_Foreman | 2017-11-17 16:21:39 UTC | #1
I'm very new to API's and am trying to accomplish the following:
Update the Archive Date to a future time that is approximately 5 minutes from the sending of the request.
I have successfully been able to get the Recording ID which is apparently 1 of 3 pieces of required information, the other being the interaction ID. What I'm struggling with is the Parameter for "body" which is described as "recording", data type "recording", and is required...
- is this the right API for trying to get my recently restored recordings set back to archived (to free up my available retrieval requests) and
- if that is the correct API, how do I satisfy that Parameter? Is it looking for an actual recording to send back and overwrite?
Thanks in advance (and bear with me!).
tim.smith | 2017-11-17 16:27:23 UTC | #2
Can you be specific about what API you're trying to use?
Juan_Foreman | 2017-11-17 16:48:49 UTC | #3
Hi Tim – thank you for replying.
I’m trying to use the API explorer with the following: /api/v2/conversations/{conversationId}/recordingmetadata
tim.smith | 2017-11-17 18:34:35 UTC | #4
RecordingApi.getConversationRecordingmetadata() will give you the recording ID, assuming you already know the conversation ID. Once you have both IDs, use RecordingApi.putConversationRecording() with the body { "archiveDate": "2017-11-17T18:25:00+00:00" } to set the new archive date (using your own timestamp, of course). The archival process will be initiated "soon" after the archive date elapses; it can take 10+ minutes after the archive date until it becomes archived.
Juan_Foreman | 2017-11-17 18:44:15 UTC | #5
Thank you Tim - I'll give this a try now.
Juan
Juan_Foreman | 2017-11-17 19:32:00 UTC | #6
I got a successful reply - so thank you! It's been about 20 minutes since the request and I don't see the update, but hopefully it will trigger.
{ "id": "65a941b9-54cd-499c-9224-6e35b58598de", "conversationId": "948d205d-1881-425a-adcc-53f8136afca8", "media": "audio", "fileState": "RESTORING", "archiveDate": "2017-11-18T15:55:56.341Z", "archiveMedium": "CLOUDARCHIVE", "maxAllowedRestorationsForOrg": 100, "remainingRestorationsAllowedForOrg": 22, "selfUri": "/api/v2/conversations/948d205d-1881-425a-adcc-53f8136afca8/recordings/65a941b9-54cd-499c-9224-6e35b58598de" }
Juan_Foreman | 2017-11-17 19:32:31 UTC | #7
Should I have changed the state to "ARCHIVED" as part of this request?
tim.smith | 2017-11-17 19:54:41 UTC | #8
No, the state is a system-generated property. The only thing you need to do is set the archive date and the server will handle everything. If the state isn't transitioning to archived after a reasonable amount of time, please open a ticket with PureCloud Support to investigate (performance issues can't be investigated via the forum).
system | 2017-12-18 19:55:19 UTC | #9
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 2120