{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/mandiant/json-schema/mandiant-search-schema.json",
  "title": "search",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_superseded/mandiant-search-api-openapi.yml#/components/schemas/search",
  "type": "object",
  "required": [
    "operator"
  ],
  "properties": {
    "operator": {
      "type": "string",
      "enum": [
        "and",
        "or"
      ]
    },
    "conditions": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/tuple"
      }
    },
    "time": {
      "$ref": "#/$defs/time"
    },
    "include": {
      "$ref": "#/$defs/include"
    },
    "modifiers": {
      "$ref": "#/$defs/modifiers"
    }
  },
  "$defs": {
    "include": {
      "type": "object",
      "properties": {
        "job_actions": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "actors",
              "emails",
              "event_count",
              "job_id",
              "blocking_technologies",
              "detecting_technologies",
              "unix_ended_at",
              "unix_began_at"
            ]
          }
        },
        "actions": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "name",
              "description",
              "vid",
              "dimensions.stage_of_attack",
              "dimensions.attacker_behavior",
              "dimensions.os_platform",
              "attack_tactic",
              "files",
              "tags",
              "controls",
              "mitre_mitigations",
              "nist_800_53",
              "host_cli_commands"
            ]
          }
        },
        "security_technologies": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "job_actions",
              "icon"
            ]
          }
        }
      }
    },
    "modifiers": {
      "type": "array",
      "description": "If present, this signifies that the search results should reflect a different set of information from normal implementation.\n\nFor example, if given the string `last_results`, only the Job Action with the most recent end_time per Action will be returned in the response.\n",
      "items": {
        "type": "string",
        "enum": [
          "last_results"
        ]
      }
    },
    "time": {
      "type": "object",
      "properties": {
        "start": {
          "type": "string"
        },
        "end": {
          "type": "string"
        }
      }
    },
    "tuple": {
      "type": "object",
      "properties": {
        "operator": {
          "type": "string",
          "enum": [
            "in",
            "not in",
            "and",
            "or"
          ]
        },
        "conditions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/tuple"
          }
        },
        "match_object": {
          "type": "string",
          "enum": [
            "action",
            "job",
            "evaluation",
            "sequence",
            "monitor",
            "threat_actor",
            "source_actor",
            "destination_actor",
            "actor",
            "source_zone",
            "destination_zone",
            "zone",
            "blocking_security_technology",
            "detecting_security_technology"
          ],
          "description": "# \nThis is the object that the query should be evaluated upon for this conditional\n"
        },
        "match_field": {
          "type": "string",
          "enum": [
            "job",
            "tags",
            "id",
            "attack_tactic",
            "nist_800_53_control_id",
            "controls",
            "results",
            "action_type",
            "nist_800_53_control_family_id",
            "nist_800_53_priority"
          ],
          "description": "#\nThis is the field on the object the user is querying about in this conditional.  \nAll field usage is predicated on that field being available on the match object in the conditional.\n| match_object | Permitted match_field entries |\n|--------------|-------------------------------|\n| `action` | `tags` <br/> `attack_tactic` <br/> `controls` <br/> `nist_800_53_control_id` <br/> `results` <br/> `action_type` <br/> `nist_800_53_control_family_id` <br/> `nist_800_53_priority` |\n| `evaluation` <br/> `sequence` | `tags` |\n| `monitor` <br/> `threat_actor` <br/> `source_zone` <br/> `destination_zone` <br/> `zone` <br/> `blocking_security_technology` <br/> `detecting_security_technology` | `id` |\n| `job` <br/> `source_actor` <br/> `destination_actor` <br/> `actor` | `id` <br/> `tags` |\n"
        },
        "value": {
          "type": "string",
          "description": "#\nThis is a freeform field used to compare to the match object/match field in the user's conditional.\nSome of the values in this parameter are dependent on the match_object/match_field tuple query.\n- If the user queries on match_object `action` and match_field `results`, the value should be one of `prevented`, `missed`, `detected`, `alerted`, or `errored`.\n- On the other hand, if the user queries on match_object `job` and match_field `id`, then the value parameter would be the string representation of any numerical id (\"75559\", for example)\n"
        }
      }
    }
  }
}