{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/safetyculture/json-schema/safetyculture-s12-documents-v1-search-items-request-schema.json",
  "title": "s12.documents.v1.SearchItemsRequest",
  "description": "Request to search the files and folders.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/safetyculture-documents-api-openapi.yml#/components/schemas/s12.documents.v1.SearchItemsRequest",
  "type": "object",
  "properties": {
    "page_size": {
      "type": "integer",
      "format": "int32",
      "description": "The number of items (files and folders combined) to return.\nMax value is 25. Defaults to 25 if not provided."
    },
    "page_token": {
      "type": "string",
      "description": "The token to retrieve the next page of results.\nUse the value returned in the `next_page_token`` from the previous response."
    },
    "include_media_url": {
      "type": "boolean",
      "description": "If `true`, includes a temporary media URL for each file so it can be downloaded."
    },
    "archived": {
      "type": "boolean",
      "description": "If `true`, only archived files will be returned."
    },
    "search_term": {
      "type": "string",
      "description": "Search term to match against file or folder names.\nThis is case-insensitive, must be 1-130 characters, and exclude invalid characters."
    },
    "item_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "List of item IDs to filter results. Only items matching any of the IDs will be returned."
    },
    "valid_to": {
      "description": "TimeInterval to filter by expiry date. If only `from` is set, it will return files expiring after that date. If only `to` is set, it will return files expiring before that date. If both are set, it will return files expiring within that time range.",
      "allOf": [
        {
          "$ref": "#/$defs/s12.documents.v1.TimeInterval"
        }
      ]
    }
  },
  "$defs": {
    "s12.documents.v1.TimeInterval": {
      "type": "object",
      "properties": {
        "from": {
          "type": "string",
          "format": "date-time",
          "description": "optional. represents the time should be after the time provided"
        },
        "to": {
          "type": "string",
          "format": "date-time",
          "description": "optional. represents the time should be before the time provided"
        }
      },
      "title": "Object representing the time interval applied to filtering folder and files"
    }
  }
}