addBotRecipe
A Graze API POST request that creates a new Cookbook Bot Recipe. To create Recipes using the Value Recipe and Value Recipe v2 recipe types, use addValueRecipe. See Recipe Types for more information.
Back to Graze API EndPoint Reference.
Request arguments
Endpoint addBotRecipe
takes the following request arguments:
Name | Type | Required | Description |
---|---|---|---|
| String | Yes | A valid |
| Array of Strings | No | A list of the Cookbooks that this Recipe belongs to. You can add Cookbooks here or, when you create a Cookbook, you can assign the Recipes to it. |
| String | Yes | Name of the Recipe. Use a unique and descriptive name. |
| String | No | Description of the Recipe. Default is the Recipe |
| Positive Integer | No | Minimum number of alerts required before Cookbook creates a Situation. |
| String | No | A filter that determines the alerts that Cookbook considers for Situation creation. Cookbook includes alerts that match the trigger filter. By default Cookbook only includes alerts with a severity of 'Critical'. For details on creating a filter, see Filter Search Data. To set a vertex entropy trigger filter, see Configure Topology-based Clustering with Vertex Entropy for more information. Default is an empty string. |
| String | No | A filter that determines the alerts to exclude from Situation creation. Cookbook ignores alerts that match the exclusion filter. For details on creating a filter, see Filter Search Data. To set a vertex entropy exclusion filter, see Configure Topology-based Clustering with Vertex Entropy for more information. Default is an empty string. |
| String | No | A filter that determines whether to create a Situation from a seed alert. The seed alert must meet both the |
| Double | No | Rate, in number of alerts per second. Cookbook clusters alerts if they arrive at a higher rate than is specified here. Cookbook uses |
| Positive Integer | No | Number of alerts that must arrive before the Cookbook starts to calculate the alert rate. See Cookbook and Recipe Examples for more information. Default is 5. Valid only if |
| Positive Integer | No | Maximum number of alerts that are considered in the alert rate calculation. When more than this number of alerts have arrived, Cookbook discards the oldest alerts and calculates the alert rate based on the number of alerts in the |
| Positive Integer | No | Minimum time period, in seconds, that the Cookbook Recipe clusters alerts for before it resets and starts a new cluster. See Cookbook and Recipe Examples for more information. If you set a different |
| Positive Integer | No | Time period that the Cookbook Recipe can extend clustering alerts for before it resets and starts a new cluster. Setting this value enables the cook for auto-extension feature for this Cookbook. As Cookbook receives related alerts, it continues to extend the total clustering time until the If you set a different |
| Positive Integer | No | Maximum time period that the Cookbook Recipe clusters alerts for before it resets and starts a new cluster. It works in conjunction with the If you set a different |
| String | No | Determines Cookbook's clustering behavior. Set to an empty string to use the Cookbook If you set a different |
| JSON Function Name | No | Default is |
| JSON Function Name | No | Default is |
| JSON Function Name | No | Default is null. |
| JSON Function Name | No | Name of the function that will determine whether to consider an event for clustering (similar to a trigger filter). Default is null. |
| Double | No | Value between 0 and 1. Default is 0.8. |
Response
Endpoint addBotRecipe
returns the following response:
Successful requests return a JSON object containing the following:
Name | Type | Description |
---|---|---|
| Integer | ID of the new Bot Recipe. |
Examples
The following examples demonstrate typical use of endpoint addBotRecipe
:
Request example
Example cURL request to create a new Bot Recipe "BotRecipe2":
curl -X POST -u graze:graze -k -v "https://localhost/graze/v1/addBotRecipe" -H "Content-Type: application/json; charset=UTF-8" -d '{"cookbooks" : ["GrazeCookbook1"],"name":"BotRecipe2","alert_threshold":1}'
Response example
Successful response providing the ID of the new Bot Recipe that has been created:
{ "id": 4 }