A Graze API POST request that adds a single word to an existing list of priority words or stop words in the Events Analyser configuration. This endpoint adds the word to the priority word list or stop word list depending on the argument you supply. Use updateEventsAnalyserWords to replace an entire list of priority words or stop words, or removeEventsAnalyserWord to remove a single word from a list of priority words or stop words.
See updateEventsAnalyserConfig to update the other fields in the Events Analyser configuration.
This endpoint adds a word to a list of priority words or stop words in the default partition only. See updateEventsAnalyserPartitionOverrides to configure priority words or stop words in partitions.
Back to Graze API EndPoint Reference.
Endpoint addEventsAnalyserWord
takes the following request arguments:
Name | Type | Required | Description |
---|---|---|---|
| String | Yes | A valid |
| String | Yes | Determines whether the endpoint adds the word to the list of stop words or priority words. Set to |
| String | Yes | Stop word or priority word that you want to add to the list. |
Endpoint addEventsAnalyserWord
returns the following response:
The following examples demonstrate typical use of endpoint addEventsAnalyserWord
:
Example cURL request to add the word 'fail' to the list of priority words:
curl -POST -u graze:graze -k -v "https://localhost/graze/v1/addEventsAnalyserWord" \
--data-urlencode 'type=priority_word' \
--data-urlencode 'word="fail"'
Example cURL request to add the word 'maybe' to the list of stop words:
curl -POST -u graze:graze -k -v "https://localhost/graze/v1/addEventsAnalyserWord" \
--data-urlencode 'type=stop_word' \
--data-urlencode 'word="maybe"'