Category Definitions Overview

This endpoint provides access to the category definitions that have been detected by the time of the request. For any category definitions to be present, the job has to be performing categorization. The results are sorted by the categoryId, which in turn depends on the order of the creation of each category.

Category Definitions Endpoint

The endpoint for obtaining a job’s category definitions is:


Category Definitions results

Using the cURL command line client for example, to get the result category definitions for the job with ID categorize01 you would use the call:

curl -X GET http://localhost:8080/engine/v2/results/categorize01/categorydefinitions

This call returns a paging document containing a list of category definition results. If jobId is not recognized an error is returned. To get more than the first 100 results, or page the results, see Pagination. If no results are available an empty paging document is returned.

Each category definition has an ID, namely categoryId. This categoryId can be used to access individual category definitions results through the endpoint:


For example, using cURL to get the results for job ID categorize01 for the category definitions with categoryId 3:

curl -X GET http://localhost:8080/engine/v2/results/categorize01/categorydefinitions/3

may return the following document:

  "documentId" : "3",
  "exists" : true,
  "type" : "categoryDefinition",
  "document" : {
    "categoryId" : "3",
    "terms" : "User logged in host",
    "regex" : ".*?User.+?logged.+?in.+?host.*",
    "maxMatchingLength": 36,
    "examples" : ["User foo logged in host", "User bar logged in host"]