Blob Storage

From Genesys Documentation
Jump to: navigation, search
This topic is part of the manual Manage your Contact Center in Agent Setup for version Current of Agent Setup.

Shared Access Signature (SAS) tokens enable you to access your tenant-specific blob storage resources. The information provided below will help you get the SAS tokens you need in order to retrieve and download data from your Genesys contact center.

During tenant provisioning, a tenant-specific blob storage account is created for each tenant. Use the Generate SAS tokens screen in Agent Setup to generate the SAS tokens you need to access the contact center data that certain services make available.

To adhere to General Data Protection Regulation (GDPR) requirements, files stored in blob storage containers are deleted after 30 days by default.


Important
Some features described here may not apply to your organization’s setup. If you need features that aren’t available to you, contact your administrator or Genesys representative.
During tenant provisioning, a tenant-specific blob storage account is created for each tenant. Use the Generate SAS tokens screen in Agent Setup to generate the SAS tokens you need to access the contact center data that certain services make available.

To adhere to General Data Protection Regulation (GDPR) requirements, files stored in blob storage containers are deleted after 30 days by default.

Access recordings

In Agent Setup, under Contact Center Settings > Blob Storage, you can obtain and refresh URLs and SAS tokens for your recordings and metadata containers.

Let's look at the fields and buttons in this section to learn more about them:

  • Initiation Date is the date input field where the administrator can set the SAS token start date.
  • Expiration Date is the date input field where the administrator can set the SAS token expiry date.
  • Use the Revoke existing tokens checkbox to invalidate any previously created token(s).

  • Generate new tokens is the button you click to generate and display the new SAS token (using the specified expiry date above).
  • ACCOUNT CONTAINER URL is only used for the “Find Blobs by Tags” API (the Account SAS token will not work for container Blob Read and List APIs). Account SAS tokens cannot reference Stored Access Policies so Account SAS tokens are only invalid when their expiry date has passed. Providing only the “f” permission prevents anyone from downloading a file using the Account SAS token. The Account SAS token holder can only use that token to find file names that match a customer-provided query against the Blob index tags. This field is read-only.
  • RECORDINGS CONTAINER URL specifies the new recording SAS token. This field is read-only.
  • GIM-EXPORT CONTAINER URL is the storage account name and container name used to display the metadata URL string. It relates to the interaction and party historical reporting data, which serves as metadata for the recordings. This field is read-only.
Important
By default the RECORDINGS and GIM-EXPORT containers are enabled, however there can be others as screenshots in this guide might show interface elements that might not accurately reflect what you see in the product when you use it.


Generate new SAS tokens

To generate new URLs and SAS tokens for your recordings and metadata containers:

  1. Use the date picker (DatePicker AS GAPI-26343.png) to choose an Initiation date and an Expiration date.
  2. If applicable, check the Revoke existing tokens box to invalidate any previously created token(s).
  3. Click Generate new tokens.
  4. Click Copy URL.
    Warning
    Once the new token has been generated and the Container URL and Token information displays, ensure that you copy and store the details securely elsewhere, before you navigate away from this page. Agent Setup does not display the information for existing tokens again. Also, ensure that your corporate practices enable authorized personnel and automated systems to obtain refreshed information when new tokens are generated.
  5. To view and download the recordings and metadata in your storage account, use the relevant Container URL and Container token together to construct the necessary URLs.

Use SAS tokens to list files from the blob storage

Tip
For more information on listing container contents, see List Blobs from the Getting Started with REST guide from docs.microsoft.com.
To list the container contents using your SAS tokens, use the following GET method:

curl –-request GET “<CONTAINER URL><CONTAINER TOKEN>&comp=list&restype=container”

Example
curl -–request GET “<nowiki>https://mytenant.blob.core.windows.net/recordings?sv=2020-02-10&spr=https&st=2021-05-26T10%3A56%3A11Z&se=2021-05-28T22%3A00%3A00Z&sr=c&sp=rl&sig=NOw71VJV%2Fx52skCLiY2SCjEV%2FoBApC169FfJdzN%2BO1k%3D&comp=list&restype=container</nowiki>"

The result is an XML document that lists all blobs available for download:

<?xml version="1.0" encoding="utf-8"?><EnumerationResults ServiceEndpoint="https://mytenant.blob.core.windows.net/" ContainerName="recordings">
  <?xml version="1.0" encoding="utf-8"?><EnumerationResults ServiceEndpoint="https://mytenant.blob.core.windows.net/" ContainerName="recordings">
  <Blobs>
    <Blob>
      <Name>mytenant/003H1G2A6K8AF5PFKG5SO2LAES0000V3_2021-05-21_06-19-26-0064020A-10013025-00000001.mp3.bin</Name>
      <Properties>
        <Creation-Time>Fri, 21 May 2021 06:21:34 GMT</Creation-Time>
        <Last-Modified>Fri, 21 May 2021 06:21:34 GMT</Last-Modified>
        <Etag>0x8D91C20AE6F18A7</Etag>
        <Content-Length>25216</Content-Length>
        <Content-Type>application/octet-stream</Content-Type>
        <Content-Encoding />
        <Content-Language />
        <Content-CRC64 />
        <Content-MD5>k0DUvvcVv1f+wZXECIy9dw==</Content-MD5>
        <Cache-Control />
        <Content-Disposition />
        <BlobType>BlockBlob</BlobType>
        <AccessTier>Hot</AccessTier>
        <AccessTierInferred>true</AccessTierInferred>
        <LeaseStatus>unlocked</LeaseStatus>
        <LeaseState>available</LeaseState>
        <ServerEncrypted>true</ServerEncrypted>  
      </Properties>
      <OrMetadata />
    </Blob>
  </Blobs>
</EnumerationResults>

Use SAS tokens to download files from the Blob Storage

Tip
For more information on downloading a file, see Get Blob from the Getting Started with REST guide from docs.microsoft.com.

Once blobs have been listed, they can then be downloaded using the following GET method:

curl -–request GET “<CONTAINER URL>/<Blob Name><CONTAINER TOKEN>” –-output “<Blob Name>”
Example
curl -–request GET “<nowiki>https://mytenant.blob.core.windows.net/recordings/mytenant/003H1G2A6K8AF5PFKG5SO2LAES0000V3_2021-05-21_06-19-26-0064020A-10013025-00000001.mp3.bin?sv=2020-02-10&spr=https&st=2021-05-26T10%3A56%3A11Z&se=2021-05-28T22%3A00%3A00Z&sr=c&sp=rl&sig=NOw71VJV%2Fx52skCLiY2SCjEV%2FoBApC169FfJdzN%2BO1k%3D” -–output “003H1G2A6K8AF5PFKG5SO2LAES0000V3_2021-05-21_06-19-26-0064020A-10013025-00000001.mp3.bin</nowiki>"

Find Blobs by Tags using Account SAS Tokens

Over time, recordings can accumulate. This necessitates the ability to find the recordings by means of tags before being able to download the correct files. The find by tags functionality can be accessed using the Account SAS URL and Token that is created from the Generate SAS Tokens screen.

To find recordings using your Account SAS tokens, use the following GET method:

curl -–request GET “<ACCOUNT CONTAINER URL>?<ACCOUNT TOKEN>&comp=blobs&where= @container='recordings' AND RecordingType = 'CALL'"

A date range can also be specified:

“comp=blobs&where=@container=recordings AND RecordingType = 'CALL' AND StoredTime >= '2021-08-19T00:00:00Z' AND StoredTime <= '2021-08-20T00:00:00Z'”
Example
curl -–request GET "<nowiki>https://mytenant.blob.core.windows.net/recordings?sv=2020-08-04&ss=b&srt=sco&se=2022-01-21T00%3A00%3A00Z&sp=f&sig=18FNWKEQHMksGzySQOQHfmDtawi2hzeYVfD3ThCBIm4%3D&comp=blobs&where=%40container%3D%27recordings%27%20AND%20RecordingType%20%3D%20%27CALL%27%20AND%20StoredTime%20%3E%3D%20%272022-01-09T00%3A00%3A00Z%27%20AND%20StoredTime%20%3C%3D%20%272022-01-11T00%3A00%3A00Z%27&maxresults=20</nowiki>”

The result is an XML document that lists all the blobs satisfying the conditions:

<?xml version="1.0" encoding="utf-8"?><EnumerationResults ServiceEndpoint=https://mytenant.blob.core.windows.net/ ContainerName="recordings">
<Where>@container='recordings' AND RecordingType = 'CALL' AND StoredTime >= '2022-01-09T00:00:00Z' AND StoredTime <= '2022-01-11T00:00:00Z'</Where>
<MaxResults>20</MaxResults>
<Blobs>
<Blob>
<Name>8888/0004C06AN88TN2MP904SO2LAES000001_2022-01-10_05-59-26-0064021D-10011931-00000001.mp3.bin</Name>
<ContainerName>recordings</ContainerName>
<Tags>
<TagSet>
<Tag>
<Key>RecordingType</Key>
<Value>CALL</Value>
</Tag>
<Tag>
<Key>StoredTime</Key>
<Value>2022-01-10T06:01:34Z</Value>
</Tag>
</TagSet>
</Tags>
</Blob>
<Blob>
...
</Blob>
<Blob>
...
</Blob>
<Blob>
...
</Blob>
<Blob>
...
</Blob>
<Blob>
...
</Blob>
<Blob>
...
</Blob>
<Blob>
...
</Blob>
<Blob>
...
</Blob>
<Blob>
...
</Blob>
<Blob>
...
</Blob>
<Blob>
...
</Blob>
<Blob>
...
</Blob>
<Blob>
...
</Blob>
<Blob>
...
</Blob>
<Blob>
...
</Blob>
<Blob>
...
</Blob>
<Blob>
...
</Blob>
<Blob>
...
</Blob>
<Blob>
...
</Blob>
</Blobs>
<NextMarker>2!356!MDAwMDI3IXJlY29yZGluZ3MBMDFENzRCNEJCNUJBREREOCEwMDAwOTIhODg4OC8wMDA0QzA2QU44OFROMk1QOTA0U08yTEFFUzAwMTNSUl8yMDIyLTAxLTEwXzEzLTM1LTM2LTAwNjQwMjFELTEwMDE0RUZCLTAwMDAwMDAxLm1wMy5iaW4hMDAwMDEyIQgAAAAEAAAAQ0FMTCEwMDAwMDEhMCEwMDAwMjghOTk5OS0xMi0zMVQyMzo1OTo1OS45OTk5OTk5WiEwMDAwMzYhNTdkYmFjYWUtM2Q0Mi00NzMyLWI0ODUtMzUwZjY4ZDkxNzZiITAwMDAxMyFSZWNvcmRpbmdUeXBlIQ--</NextMarker>
</EnumerationResults>
Comments or questions about this documentation? Contact us for support!