Skip to main content

getRecipes

A Graze API GET request that returns all the Recipes in Moogsoft Enterprise.

Back to Graze API EndPoint Reference.

Request arguments

Endpoint getRecipes 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.

cookbook

String

No

Name of the Cookbook that you want to return the Recipes for. Do not specify to return all Recipes.

Response

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.

Examples

The following examples demonstrate typical use of endpoint getRecipes:

Request example

Example cURL request to return all the Recipes in Moogsoft Enterprise:

curl -X GET -u graze:graze -k -v "https://localhost/graze/v1/getRecipes"

Response example

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"
    }
]