Categories:
Update channels configuration
Guidelines to update channels configuration
Prerequirements
-
The URL of aura-configuration-api is something like:
https://{{aura-services-domain}}.auracognitive.com/aura-services/v2/configurationwhere:{{aura-services-domain}}should besvc-[country]-[environment], for instancesvc-es-pre
-
Recommended:
kubectlinstalled in your local host.curlinstalled in your local host.jqinstalled in your local host.
Access Aura Configuration API
Get the APIKey
First of all, we must get the APIKey, AURA_AUTHORIZATION_HEADER, of aura-configuration-api. For this purpose, follow these steps:
-
Execute the following command:
# substitute {{aura-environment}} with the environment you're configuring export AURA_ENVIRONMENT={{aura-environment}} $ kubectl -n $AURA_ENVIRONMENT get secret aura-configuration-api -o json | jq -r ".data.AURA_AUTHORIZATION_HEADER|@base64d -
Copy the value of APIKey.
Update channels configuration
To update the configuration of a channel, we must make a patch to the aura-configuration-api indicating the channel that we want to modify and the new value.
- Execute the next curl to update configuration:
# generate a valid UUID as correlator
# substitute {{correlator}} with the generated UUID
# substitute aura-services-domain with the specific information for environment, svc-[country]-[environment].
# substitute {{channelId}} with the value of channel to change
# substitute {{apikey}} with the value of apikey get in the previous step
$ curl --location --request PATCH 'https://{{aura-services-domain}}.auracognitive.com/aura-services/v2/configuration/channels/{{channelId}}' \
--header 'correlator: {{correlator}}' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: {{apikey}}' \
--data-raw '{
"id": "{{channelId}}",
// Send the object to update
}
}'
- Check the change doing the following request:
# generate a valid UUID as correlator
# substitute {{correlator}} with the generated UUID
# substitute aura-services-domain with the specific information for environment svc-[country]-[environment].
# substitute {{channelId}} with the value of channel to change
# substitute {{apikey}} with the value of apikey get in the previous step
# The response will be the channel configuration.
$ curl --location --request GET 'https://{{aura-services-domain}}.auracognitive.com/aura-services/v2/configuration/channels/{{channelId}}' \
--header 'correlator: {{correlator}}' \
--header 'Accept: application/json' \
--header 'Authorization: {{apikey}}'
{"id":"{{channelId}}",.....}
ℹ️ NOTE: The config-watcher runs periodically (every 5 minutes) and when it detects that the channel configuration has been modified it will restart the pods.
Update dialogContext configuration
To update dialogContext configuration of a channel, we must make a patch to the aura-configuration-api indicating the channel that we want to modify and the new value of responseOptions.
Below, you can see how to update dialogContext configuration for channels STB, MH and MP, in order to disable numeric suggestions.
Update STB channel configuration
-
Execute the next curl to update
dialogContextchannel configuration:# generate a valid UUID as correlator # substitute {{correlator}} with the generated UUID # substitute aura-services-domain with the specific information for environment, svc-[country]-[environment]. # substitute {{apikey}} with the value of apikey get in the previous step $ curl --location --request PATCH 'https://{{aura-services-domain}}.auracognitive.com/aura-services/v2/configuration/channels/814bc401-7743-47d3-957b-7f1b2dafe398' \ --header 'correlator: {{correlator}}' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'Authorization: {{apikey}}' \ --data-raw '{ "id": "814bc401-7743-47d3-957b-7f1b2dafe398", "responseOptions": { "sendSpeak": true, "disambiguationFormat": "disabled", "outputMessageFormat": "simple", "dialogContext": { "cardActions": { "generate": "always", "generateList": true }, "defaultListType": "none", "disabled": false, "normalizeTerms": true, "processFromClient": true, "promptChoice": { "generate": "always", "generateList": true }, "returnToClient": true }, "suggestionType": "attachment" } }'The important value to avoid numeric suggestions is
defaultListType:none -
You can check the change doing the following request:
# generate a valid UUID as correlator # substitute {{correlator}} with the generated UUID # substitute aura-services-domain with the specific information for environment svc-[country]-[environment]. # substitute {{apikey}} with the value of apikey get in the previous step $ curl --location --request GET 'https://{{aura-services-domain}}.auracognitive.com/aura-services/v2/configuration/channels/814bc401-7743-47d3-957b-7f1b2dafe398?includeFields=responseOptions' \ --header 'correlator: {{correlator}}' \ --header 'Accept: application/json' \ --header 'Authorization: {{apikey}}' {"id":"814bc401-7743-47d3-957b-7f1b2dafe398","responseOptions":{"sendSpeak":true,"disambiguationFormat":"disabled","outputMessageFormat":"simple","dialogContext":{"cardActions":{"generate":"always","generateList":true},"defaultListType":"none","disabled":false,"normalizeTerms":true,"processFromClient":true,"promptChoice":{"generate":"always","generateList":true},"returnToClient":true},"suggestionType":"attachment"}
Update Movistar Home channel configuration
-
Execute the next curl to update
dialogContextconfiguration:# generate a valid UUID as correlator # substitute {{correlator}} with the generated UUID # substitute aura-services-domain with the specific information for environment, svc-[country]-[environment]. # substitute {{apikey}} with the value of apikey get in the previous step $ curl --location --request PATCH 'https://{{aura-services-domain}}.auracognitive.com/aura-services/v2/configuration/channels/60f0ffda-e58a-4a96-aad9-d42be70b7b42' \ --header 'correlator: {{correlator}}' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'Authorization: {{apikey}}' \ --data-raw '{ "id": "60f0ffda-e58a-4a96-aad9-d42be70b7b42", "responseOptions": { "sendSpeak": true, "disambiguationFormat": "disabled", "outputMessageFormat": "simple", "dialogContext": { "cardActions": { "generate": "always", "generateList": true }, "defaultListType": "none", "disabled": false, "normalizeTerms": true, "processFromClient": true, "promptChoice": { "generate": "always", "generateList": true }, "returnToClient": true }, "suggestionType": "attachment" } }'The important value to avoid numeric suggestions is
defaultListType:none -
You can check the change doing the following request:
# generate a valid UUID as correlator # substitute {{correlator}} with the generated UUID # substitute aura-services-domain with the specific information for environment svc-[country]-[environment]. # substitute {{apikey}} with the value of apikey get in the previous step $ curl --location --request GET 'https://{{aura-services-domain}}.auracognitive.com/aura-services/v2/configuration/channels/60f0ffda-e58a-4a96-aad9-d42be70b7b42?includeFields=responseOptions' \ --header 'correlator: {{correlator}}' \ --header 'Accept: application/json' \ --header 'Authorization: {{apikey}}' {"id":"60f0ffda-e58a-4a96-aad9-d42be70b7b42","responseOptions":{"sendSpeak":true,"disambiguationFormat":"disabled","outputMessageFormat":"simple","dialogContext":{"cardActions":{"generate":"always","generateList":true},"defaultListType":"none","disabled":false,"normalizeTerms":true,"processFromClient":true,"promptChoice":{"generate":"always","generateList":true},"returnToClient":true},"suggestionType":"attachment"}}
Update Movistar+ channel configuration
-
Execute the next curl to update
dialogContextconfiguration:# generate a valid UUID as correlator # substitute {{correlator}} with the generated UUID # substitute aura-services-domain with the specific information for environment, svc-[country]-[environment]. # substitute {{apikey}} with the value of apikey get in the previous step $ curl --location --request PATCH 'https://{{aura-services-domain}}.auracognitive.com/aura-services/v2/configuration/channels/60f0ffda-e58a-4a96-aad9-d42be70b7b42' \ --header 'correlator: {{correlator}}' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'Authorization: {{apikey}}' \ --data-raw '{ "id": "60f0ffda-e58a-4a96-aad9-d42be70b7b42", "responseOptions": { "sendSpeak": true, "disambiguationFormat": "suggestions", "outputMessageFormat": "simple", "dialogContext": { "cardActions": { "generate": "always", "generateList": true }, "defaultListType": "none", "disabled": false, "normalizeTerms": true, "processFromClient": true, "promptChoice": { "generate": "always", "generateList": true }, "returnToClient": true }, "suggestionType": "actions" } }'The important value to avoid numeric suggestions is
defaultListType:none -
Check the change doing the following request:
# generate a valid UUID as correlator # substitute {{correlator}} with the generated UUID # substitute aura-services-domain with the specific information for environment svc-[country]-[environment]. # substitute {{apikey}} with the value of apikey get in the previous step $ curl --location --request GET 'https://{{aura-services-domain}}.auracognitive.com/aura-services/v2/configuration/channels/60f0ffda-e58a-4a96-aad9-d42be70b7b42?includeFields=responseOptions' \ --header 'correlator: {{correlator}}' \ --header 'Accept: application/json' \ --header 'Authorization: {{apikey}}' {"id":"60f0ffda-e58a-4a96-aad9-d42be70b7b42","responseOptions":{"sendSpeak":true,"disambiguationFormat":"suggestions","outputMessageFormat":"simple","dialogContext":{"cardActions":{"generate":"always","generateList":true},"defaultListType":"none","disabled":false,"normalizeTerms":true,"processFromClient":true,"promptChoice":{"generate":"always","generateList":true},"returnToClient":true},"suggestionType":"actions"}}