Get anomaly detection job results for categoriesAdded in 5.4.0

POST /_ml/anomaly_detectors/{job_id}/results/categories/{category_id}

Path parameters

  • job_idstring Required

    Identifier for the anomaly detection job.

  • category_idstring Required

    Identifier for the category, which is unique in the job. If you specify neither the category ID nor the partition_field_value, the API returns information about all categories. If you specify only the partition_field_value, it returns information about all categories for the specified partition.

Query parameters

  • fromnumber

    Skips the specified number of categories.

  • Only return categories for the specified partition.

  • sizenumber

    Specifies the maximum number of categories to obtain.

application/json

Body

  • pageobject
    Hide page attributes Show page attributes object
    • fromnumber

      Skips the specified number of items.

    • sizenumber

      Specifies the maximum number of items to obtain.

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • categoriesarray[object] Required
      Hide categories attributes Show categories attributes object
      • category_idnumber Required
      • examplesarray[string] Required

        A list of examples of actual values that matched the category.

      • job_idstring Required
      • max_matching_lengthnumber Required
      • If per-partition categorization is enabled, this property identifies the field used to segment the categorization. It is not present when per-partition categorization is disabled.

      • If per-partition categorization is enabled, this property identifies the value of the partition_field_name for the category. It is not present when per-partition categorization is disabled.

      • regexstring Required

        A regular expression that is used to search for values that match the category.

      • termsstring Required

        A space separated list of the common tokens that are matched in values of the category.

      • The number of messages that have been matched by this category. This is only guaranteed to have the latest accurate count after a job _flush or _close

      • A list of category_id entries that this current category encompasses. Any new message that is processed by the categorizer will match against this category and not any of the categories in this list. This is only guaranteed to have the latest accurate list of categories after a job _flush or _close

      • pstring
      • result_typestring Required
      • mlcategorystring Required
    • countnumber Required
POST /_ml/anomaly_detectors/{job_id}/results/categories/{category_id}
curl \
 --request POST 'http://api.example.com/_ml/anomaly_detectors/{job_id}/results/categories/{category_id}' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"page":{"from":42.0,"size":42.0}}'