A Graze API GET request that returns all the Recipes in Moogsoft Enterprise.
Back to Graze API EndPoint Reference.
Endpoint getRecipes
takes the following request arguments:
Name | Type | Required | Description |
---|---|---|---|
| String | Yes | A valid |
| String | No | Name of the Cookbook that you want to return the Recipes for. Do not specify to return all Recipes. |
Endpoint getRecipes
returns the following response:
Successful requests return an array of JSON objects containing the following:
Type | Description |
---|---|
List of JSON Objects | A list of all the Recipes in Moogsoft Enterprise and all their details. |
The following examples demonstrate typical use of endpoint getRecipes
:
Example cURL request to return all the Recipes in Moogsoft Enterprise:
curl -X GET -u graze:graze -k -v "https://localhost/graze/v1/getRecipes"
Example response returning all the Recipes in Moogsoft Enterprise:
[
{
"cookbooks": [
"Default Cookbook"
],
"name": "Description",
"id": 1,
"description": "Alerts with a similar description",
"alert_threshold": 2,
"trigger": "severity >= 3",
"exclusion": "",
"seed_alert": "",
"rate": 0,
"min_sample_size": 5,
"max_sample_size": 10,
"cook_for": null,
"cook_for_extension": 0,
"max_cook_for": null,
"cluster_by": "first_match",
"active": true,
"chef": "CValueRecipeV2",
"use_dynamic_topology": false,
"topology_name": null,
"alert_matching_attribute": null,
"components": [
{
"shingle_size": -1,
"name": "agent",
"treat_as": null,
"similarity": 1.0
},
{
"shingle_size": -1,
"name": "description",
"treat_as": null,
"similarity": 0.75
}
],
"hop_limit": null,
"version": "V2"
},
{
"cookbooks": [
"Default Cookbook"
],
"name": "Source",
"id": 2,
"description": "Alerts from a similar source",
"alert_threshold": 2,
"trigger": "severity >= 3",
"exclusion": "",
"seed_alert": "",
"rate": 0,
"min_sample_size": 5,
"max_sample_size": 10,
"cook_for": null,
"cook_for_extension": 0,
"max_cook_for": null,
"cluster_by": "first_match",
"active": true,
"chef": "CValueRecipeV2",
"use_dynamic_topology": false,
"topology_name": null,
"alert_matching_attribute": null,
"components": [
{
"shingle_size": 3,
"name": "source",
"treat_as": null,
"similarity": 0.75
},
{
"shingle_size": -1,
"name": "agent",
"treat_as": null,
"similarity": 1.0
}
],
"hop_limit": null,
"version": "V2"
},
{
"cookbooks": [
"Default Cookbook"
],
"name": "Criticals",
"id": 3,
"description": "Remaining critical alerts",
"alert_threshold": 1,
"trigger": "severity = 5",
"exclusion": "",
"seed_alert": "",
"rate": 0,
"min_sample_size": 5,
"max_sample_size": 10,
"cook_for": null,
"cook_for_extension": 0,
"max_cook_for": null,
"cluster_by": "first_match",
"active": true,
"chef": "CValueRecipeV2",
"use_dynamic_topology": false,
"topology_name": null,
"alert_matching_attribute": null,
"components": [
{
"shingle_size": 3,
"name": "source",
"treat_as": null,
"similarity": 0.75
},
{
"shingle_size": -1,
"name": "agent",
"treat_as": null,
"similarity": 1.0
}
],
"hop_limit": null,
"version": "V2"
},
{
"cookbooks": [
"BotCookBook1"
],
"name": "BotRecipe2",
"id": 4,
"description": null,
"alert_threshold": 2,
"trigger": "",
"exclusion": "",
"seed_alert": "",
"rate": 0,
"min_sample_size": 5,
"max_sample_size": 10,
"cook_for": 3600,
"cook_for_extension": 0,
"max_cook_for": 0,
"cluster_by": null,
"active": true,
"chef": "CBotRecipe",
"use_dynamic_topology": false,
"topology_name": null,
"alert_matching_attribute": null,
"initialize_function": "initBuckets",
"member_function": "checkBucket",
"use_in_recipe": null,
"can_start_cluster": null,
"similarity": 0.8
},
{
"cookbooks": [
"BotCookBook1"
],
"name": "BotRecipe1",
"id": 5,
"description": null,
"alert_threshold": 2,
"trigger": "",
"exclusion": "",
"seed_alert": "",
"rate": 0,
"min_sample_size": 5,
"max_sample_size": 10,
"cook_for": 3600,
"cook_for_extension": 0,
"max_cook_for": 0,
"cluster_by": null,
"active": true,
"chef": "CBotRecipe",
"use_dynamic_topology": false,
"topology_name": null,
"alert_matching_attribute": null,
"initialize_function": "initBuckets",
"member_function": "checkBucket",
"use_in_recipe": null,
"can_start_cluster": null,
"similarity": 0.8
},
{
"cookbooks": null,
"name": "GrazeRecipe1",
"id": 6,
"description": null,
"alert_threshold": 2,
"trigger": "",
"exclusion": "",
"seed_alert": "",
"rate": 0,
"min_sample_size": 5,
"max_sample_size": 10,
"cook_for": 3600,
"cook_for_extension": 0,
"max_cook_for": 0,
"cluster_by": null,
"active": true,
"chef": "CValueRecipeV2",
"use_dynamic_topology": false,
"topology_name": null,
"alert_matching_attribute": null,
"components": [
{
"shingle_size": -1,
"name": "custom_1",
"treat_as": null,
"similarity": 0.2
}
],
"hop_limit": null,
"version": "V2"
}
]