Skip to main content

updateEventsAnalyserWords

A Graze API POST request that replaces an existing list of priority words or stop words in the Events Analyser configuration. This endpoint replaces the list of priority words or stop words depending on the argument you supply. Use addEventsAnalyserWord to add a single word to an existing list of priority words or stop words, or use removeEventsAnalyserWord to remove a single word.

See updateEventsAnalyserConfig for updating the other fields in the Events Analyser configuration.

Back to Graze API EndPoint Reference.

Request arguments

Endpoint updateEventsAnalyserWords takes the following request arguments:

Name

Type

Required

Description

auth_token

String

Yes

A valid auth_token returned from the authenticate request. Alternatively, basic authenticate headers can be used in place of this parameter. See the authenticate endpoint for more information and usage examples.

type

String

Yes

Determines whether the endpoint replaces the list of priority words or stop words. Set to priority_word to replace the list of priority words. Set to stop_word to replace the list of stop words.

words

Array of Strings

Yes

List of priority words or stop words that you want to replace the existing list.

Response

Endpoint updateEventsAnalyserWords returns the following response:

Examples

The following examples demonstrate typical use of endpoint updateEventsAnalyserWords:

Request examples

Example cURL request to replace the existing list of priority words with the list provided:

curl -POST -u graze:graze -k -v "https://localhost/graze/v1/updateEventsAnalyserWords" \
--data-urlencode 'type=priority_word' \
--data-urlencode 'words=["fail", "down", "loss", "low"]'

Example cURL request to replace the existing list of stop words with the list provided:

curl -POST -u graze:graze -k -v "https://localhost/graze/v1/updateEventsAnalyserWords" \
--data-urlencode 'type=stop_word' \
--data-urlencode 'words=["the", "and","an","if","at","on"]'

Response example