How to enable Dialogflow runtime integration into into CCAI Insights?

a_g
Bronze 1
Bronze 1

How to enable Dialogflow runtime integration into into CCAI Insights?

As per Google documentation you call this API to enable the export feature

curl -H "Content-Type: application/json" \
     -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" \
     -X PATCH https://LOCATION-dialogflow.googleapis.com/v3/projects/PROJECT/locations/LOCATION/securitySettings/SECURITY_SETTINGS?update_mask=insights_export_settings \
     --data '{"insights_export_settings": {"enable_insights_export": true}}'

In my case, the virtual agent is hosted in global region and using a DLP template to redact sensitive data from the Dialogflow conversation logs. 

curl -H "Content-Type: application/json" \
     -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" \
     -X PATCH https://dialogflow.googleapis.com/v3/projects/xxxxxx/locations/LOCATION/global/ecuritySettings/xxxxxxxxx?update_mask=insights_export_settings \
     --data '{"insights_export_settings": {"enable_insights_export": true}}' 

But it returns the following error - no matches found: https://dialogflow.googleapis.com/v3/projects/xxxxxx/locations/global/securitySettings/xxxxxxxxx?upd...

 

Am i missing something here?

0 7 196
7 REPLIES 7

Hi,

You are missing the property name in the request which is mandatory, please find here the spec of that request: https://cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.securitySettings

and here is the securitySetting patch request: https://cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.securitySettings/pa...

Check those links cause I think the request you were doing was not working properly.

Best,

Xavi

a_g
Bronze 1
Bronze 1

Thanks, Xavi for a checking on this. Both the name and update mask are required parameters, and I initially provided both. The problem arose from discrepancies in the naming conventions outlined in Google's Insights documentation. After addressing and correcting these issues including the JSON data values, it works fine.

curl --request PATCH \
'https://dialogflow.googleapis.com/v3/projects/xxxxxxxxxx/locations/global/securitySettings/xxxxxxxxx...]' \
--header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"insightsExportSettings":{"enableInsightsExport":true}}' \
--compressed

 

mmm and you did not provide the name? that is really weird, is this problem solved?

Xavi

a_g
Bronze 1
Bronze 1

If you look at the URL,  you have to pass the name of your Security settings - https://dialogflow.googleapis.com/v3/projects/xxxxxxxxxx/locations/global/securitySettings/xxxxxxxxxxx?updateMask=insights_export_settings&key=[YOUR_API_KEY]

yeah but that is in the URL, what about the name property in the JSON body, you did not specify it

a_g
Bronze 1
Bronze 1

Nope. It is not needed in this case. It works without it.

Thats great to hear!

Xavi