{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/mammoth-io/json-schema/mammoth-io-activity-filters-schema-schema.json",
  "title": "ActivityFiltersSchema",
  "description": "Export request data",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/mammoth-io-openapi.json#/components/schemas/ActivityFiltersSchema",
  "properties": {
    "search_text": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "minLength": 3,
      "title": "Search Text",
      "description": "Words to search for. Every word must match the object's name or the name of an object it is in (project, folder, dataset)."
    },
    "object_type": {
      "oneOf": [
        {
          "$ref": "#/$defs/ActivityLogObjectType"
        },
        {
          "type": "null"
        }
      ],
      "title": "Object Type",
      "description": "The type of the primary object to filter activity logs by."
    },
    "object_id": {
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "minimum": 1,
      "title": "Object ID",
      "description": "The ID of the primary object to filter activity logs by."
    },
    "include_children": {
      "type": "boolean",
      "title": "Include Children",
      "description": "With a dataset, project or label object filter, also return the events of the objects inside it, e.g. a dataset's views and their pipelines.",
      "default": false
    },
    "project_id": {
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "minimum": 1,
      "title": "Project ID",
      "description": "The ID of the project to filter activity logs by."
    },
    "categories": {
      "oneOf": [
        {
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Categories",
      "description": "Comma-separated list of categories to filter activity logs by."
    },
    "activities": {
      "oneOf": [
        {
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Activities",
      "description": "Comma-separated list of activities to filter activity logs by."
    },
    "resource_id": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Resource ID",
      "description": "The ID of the resource to filter activity logs by."
    },
    "result": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Result",
      "description": "The result of the activity log entry to filter by."
    },
    "start_time": {
      "oneOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Start Time",
      "description": "The start time to filter activity logs by."
    },
    "end_time": {
      "oneOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "End Time",
      "description": "The end time to filter activity logs by."
    },
    "origin": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Origin",
      "description": "The origin of the activity log entry to filter by."
    },
    "user_ids": {
      "oneOf": [
        {
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "User ID",
      "description": "The ID of the user to filter activity logs by."
    },
    "parent_id": {
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "minimum": 1,
      "title": "Parent ID",
      "description": "The parent ID of the activity log entry to filter by."
    },
    "linked_object": {
      "oneOf": [
        {
          "$ref": "#/$defs/LinkedObjectFilterSchema"
        },
        {
          "type": "null"
        }
      ],
      "title": "Linked Object",
      "description": "Return only the activity on one dataset or view. A dataset's activity includes the activity on its views."
    },
    "cursor": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "minLength": 1,
      "title": "Cursor",
      "description": "Opaque keyset pagination cursor returned as next_cursor."
    }
  },
  "type": "object",
  "required": [],
  "$defs": {
    "ActivityLogObjectType": {
      "type": "string",
      "enum": [
        "dataset",
        "dataview",
        "automation",
        "dashboard",
        "project",
        "label",
        "file_object"
      ],
      "title": "ActivityLogObjectType"
    },
    "LinkedObjectFilterSchema": {
      "properties": {
        "object_type": {
          "$ref": "#/$defs/LinkedObjectTypes"
        },
        "object_id": {
          "type": "integer",
          "minimum": 1.0,
          "title": "Object ID",
          "description": "The ID of the object: the dataset ID for a dataset, the view ID for a dataview. It is the object_id the activity's details.resource_data carries, not the legacy_resource_id next to it."
        }
      },
      "type": "object",
      "required": [
        "object_id",
        "object_type"
      ],
      "title": "LinkedObjectFilterSchema"
    },
    "LinkedObjectTypes": {
      "type": "string",
      "enum": [
        "dataset",
        "dataview"
      ],
      "title": "LinkedObjectTypes",
      "description": "The type of the object to filter activity logs by."
    }
  }
}