addEventsAnalyserWord

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.

Request arguments

Endpoint addEventsAnalyserWord takes the following request arguments:

Name

Type

Required

Description

auth_token

String

Yes

A valid auth_token returned from the authenticate request. See the authenticate endpoint for more information.

type

String

Yes

Determines whether the endpoint adds the word to the list of stop words or priority words. Set to priority_word to add to the list of priority words. Set to stop_word to add to the list of stop words.

word

String

Yes

Stop word or priority word that you want to add to the list.

Response

Endpoint addEventsAnalyserWord returns the following response:

Examples

The following examples demonstrate typical use of endpoint addEventsAnalyserWord:

Request examples

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"'

Response example