Categories:
Aura Configuration API Suggestion plugin
Description of the suggestion plugin in aura-configuration-api
suggestion plugin
The suggestion plugin defines services associated with suggestions management in aura-configuration-api server.
All these services are defined in the suggestions namespace (/suggestions).
Servers definition
By default, the servers defined in the swagger include the base path (for v1): /aura-services/v1/configuration.
Therefore, in order to access the services, the base path and service path must be used.
Examples:
- aura-services/v1/configuration/suggestions/
Endpoints
| Path | Method | Description |
|---|---|---|
| /suggestions/ | GET | Get all suggestions information |
| /suggestions/ | POST | Add a new suggestion |
| /suggestions/ | DELETE | Delete all suggestions information |
| /suggestions/{suggestionId} | GET | Get suggestions information by suggestion id |
| /suggestions/{suggestionId} | PUT | Replace suggestion information using suggestion id |
| /suggestions/{suggestionId} | PATH | Updates some fields of suggestion information |
| /suggestions/{suggestionId} | DELETE | Delete suggestions information by suggestions id |
You can read the complete documentation of each service in the aura-configuration-api swagger file.
Getting suggestions
Getting only some fields in suggestion information
It is possible to get only a specific list of fields for suggestion information, reducing the amount of data transmitted when necessary, using the includeFields query parameter.
curl --location --request GET 'http://aura-configuration-api:8999/aura-services/v1/configuration/suggestions?includeFields=name' \
--header 'correlator: urn:uuid:c8a604ee-29f8-7cda-2979-d2ae6189c360' \
--header 'Accept: application/json' \
--header 'Authorization: APIKEY XXX'
Response example:
[
{
"id": "29d80c0e-dbe8-4e40-882b-fef148748cf2",
"name": "intent-tv-question_time_loc-ent-audiovisual_sports_team-valencia",
}
]
Excluding fields in suggestion information
It is also possible to exclude suggestion information fields using the excludeFields query parameter.
curl --location --request GET 'http://aura-configuration-api:8999/aura-services/v1/configuration/suggestions?excludeFields=entities' \
--header 'correlator: urn:uuid:c8a604ee-29f8-7cda-2979-d2ae6189c360' \
--header 'Accept: application/json' \
--header 'Authorization: APIKEY XXX'
Response example:
[
{
"id" : "29d80c0e-dbe8-4e40-882b-fef148748cf2",
"intent" : "intent.tv.question_time_loc",
"name" : "intent-tv-question_time_loc-ent-audiovisual_sports_team-valencia",
"entities" : [
{
"canon" : "valencia",
"entity" : "Valencia",
"label" : "",
"score" : 1,
"type" : "ent.audiovisual_sports_team"
}
],
"resources" : [
{
"name" : "tv.searchSportContentByChannel.suggestion.title",
"params" : {
"teams" : "Valencia"
},
"type" : "title"
},
{
"name" : "tv.searchSportContentByChannel.suggestion.button",
"params" : {
"teams" : "Valencia"
},
"type" : "button"
}
]
}
]
Database
The complete definition of the data model can be found in suggestions collection section in the Administration plugin.