Can I get the metadata generated by bulk exporting through any API endpoints

Hello.

In the image below, I show a metadata json generated by Genesys when doing a bulk export of a conversation and its recordings.

I want to generate a metadata json with this same information using API endpoints, but the only thing I can find that is similar is the RecordingAPI and its RecordingMetadata endpoints. However, the metadata given doesn't have this same information. Is there any way to generate the metadata with those values as seen in the image with any API?

Thanks for the support, have a nice day.

Hi,

I´m interested too in obtain this metadata file. I didn´t search for it for a long time, but as I could see there´s no way to obtain it. As a workaround, I´m generating the json file myself, but I think that I don´t have all the info that this file has.

I think that this kind of information should be available through the API.

Regards,

David García

POST /api/v2/analytics/conversations/details/query is probably the best option if it's matadata of conversations that you want.

Thank you Jacob,

It´s what I´ve finally done. I tried to emulate exactly the fields of the json file, but I don´t know if I have all the fields covered. This is what I´ve done:

private static void CreateMetadataFile(AnalyticsConversationWithoutAttributes conversation, string path, string ext,RecordingMetadata recMetadata, Recording rec)
{
AnalyticsSession session = conversation.Participants.SelectMany(c => c.Sessions).Where(a => a.SessionId == rec.SessionId).FirstOrDefault();
Metadata mdata = new Metadata()
{
mediaType = recMetadata.Media,
provider = ( session != null ) ? session.Provider : null,
userIds = conversation.Participants.Where(c => c.Sessions.Any(b => b.SessionId == recMetadata.SessionId)).Where(c => c.UserId != null).Select(c => c.UserId).ToList(),
startTime = rec.StartTime,
endTime = rec.EndTime,
durationMs = rec.ActualTranscodeTimeMs.HasValue ? rec.ActualTranscodeTimeMs.Value : 0,
initialDirection = conversation.OriginatingDirection.HasValue ? conversation.OriginatingDirection.Value.ToString() : "",
aniNormalized = (session != null) ? session.Ani : "",
aniDisplayable = (session != null && session.Ani != null ) ? "unavailable": null,
dnisNormalized = (session != null) ? session.Dnis : "",
dnisDisplayable = (session != null && session.Dnis != null) ? "unavailable" : null,
queueIds = (session != null) ? session.Segments.Select(a => a.QueueId).Distinct().ToList() : null,
wrapupCodes = (session != null ) ? session.Segments.Where(a => a.SegmentType == AnalyticsConversationSegment.SegmentTypeEnum.Wrapup).Select(a => a.WrapUpCode).ToList() : null,
organizationId = strOrganizationId,
conversationId = conversation.ConversationId,
conversationStartTime = conversation.ConversationStart.Value.ToString(strFormat, CultureInfo.CurrentCulture),
conversationEndTime = conversation.ConversationEnd.Value.ToString(strFormat, CultureInfo.CurrentCulture),
recordingId = recMetadata.Id,
filePath = string.Format("s3://{0}/{1}/year={2}/month={3}/day={4}/hour={5}/conversation_id={6}/{7}.{8}", bucketName, strOrganizationId, conversation.ConversationStart.Value.Year, conversation.ConversationStart.Value.Month, conversation.ConversationStart.Value.Day, conversation.ConversationStart.Value.Hour, conversation.ConversationId, recMetadata.Id, ext),
fileSize = new FileInfo("." + path + "\" + recMetadata.Id + "." + ext).Length,
screenInformation = null
};
//mdata.queueIds = (session != null) ? session.Segments.Select(a => a.QueueId).Distinct().ToList() : null;
//mdata.wrapupCodes = (session != null) ? session.Segments.Where(a => a.SegmentType == AnalyticsConversationSegment.SegmentTypeEnum.Wrapup).Select(a => a.WrapUpCode).ToList() : null;
var settings = new JsonSerializerSettings()
{
ContractResolver = new NullToEmptyObjectResolver(typeof(ScreenInformation))
};
var str = JsonConvert.SerializeObject(mdata, settings);
using (StreamWriter file = File.CreateText("." + path + "\" + recMetadata.Id + "." + ext + "_metadata.json"))
{
//JsonSerializer serializer = new JsonSerializer();
//serializer.Serialize(file, mdata);
file.Write(str);
file.Close();
}
}

As you have seen the AniDisplayable and DnisDisplayable is set to unavailable if the AniNormalized and DnisNormalized is not present. That´s because I didn´t figure how to obtain this fields in conversation object response.

As this file is generated by the API genesys when exported to S3, it would be great that it could be accesible in the API to be invoked.

Regards,

David Garcia

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.