{
  "openapi": "3.0.1",
  "info": {
    "title": "Querying API",
    "description": "\nUse the Querying API to fetch multiple pages of search results sequentially. This REST API lets you to retrieve entities that match specific criteria. <br><br> When using the Querying API, keep the following considerations in mind:\n- Due to deep paging considerations the querying endpoint is limited to retrieve up to 10,000 results.\n- When search results are sorted on a property and there are multiple results that have the same value for that property, then those results are displayed in random order. To address this limitation, use a secondary sort property as a tie-breaker.\n- With full-text search, do not use the following characters: `«`, `»`, `÷`,`×`, `¦`, `¤`, `⋇`, or `؉`. Do not combine special characters and wildcards within the same word. For example, use invoice re*ort instead of invoice-re*ort to ensure consistent results like invoice-report.\n- The <i>FullText</i> search property only supports the `==` operator, but can be negated.\n- When you run a query, make sure you include all the entity members that you want to retrieve. If you omit the members parameter, the response will return all the existing entity members (all properties, all relations, and so on). To ensure optimal performance, only request the members you actually need.\n- The API is configured to only load the related paths that are specified in a query. If you don't specify related path relations in your query, the response won't return any. <br> {% admonition type=\"info\" name=\"Note\" %}You must set the `X-ApiVersion` header to 3.{% /admonition %}\n## Authentication\nTo use the Querying API, you need:\n- The URL of your Content Hub server. You can get this from your Content Hub\n  Administrator. Enter this URL in the <b>{{server}}</b> variable by hovering your mouse\n  over the variable in the <b>Try it</b> pane and then clicking <b>Edit</b>.\n\n- An access token and the client ID. Both are sent with every request. You \n  can create a token through the [Content Hub\n  interface](https://doc.sitecore.com/ch/en/users/content-hub/create-an-oauth-client.html) \n  or by [requesting one using the API\n  itself](https://doc.sitecore.com/ch/en/developers/cloud-dev/oauth-tokens.html#grant-flows).\n",
    "version": "v3.0",
    "license": {
      "name": "closed source",
      "url": "https://www.sitecore.com"
    },
    "x-metadata": {
      "product": "Content Hub"
    }
  },
  "servers": [
    {
      "url": "https://{server}",
      "variables": {
        "server": {
          "default": "your-server"
        }
      }
    }
  ],
  "security": [
    {
      "OAuth2.0": []
    }
  ],
  "tags": [
    {
      "name": "Querying",
      "description": "The Querying API is responsible for fetching multiple pages of results sequentially. <br></br> The Querying API supports the following operators:\n - `Equals`\n - `NotEquals`\n - `Gt`\n - `Lt`\n - `Gte`\n - `Lte`\n - `Contains`\n - `StartsWith`\n - `EndsWith`"
    }
  ],
  "paths": {
    "/api/entities/query": {
      "post": {
        "tags": [
          "Querying"
        ],
        "summary": "Retrieve entities using a query string",
        "description": "Lists entities that match the query in a request body. The query filter supports multiple types, each with specific properties:\n#### Composite filter\nCombines multiple filters using a logical operator (`AND`, `OR`).\n- Required - `type`, `operator`, `children`\n- Example - `{\"type\": \"Composite\", \"operator\": \"AND\", \"children\": [...]}`\n#### Not filter\nNegates a child filter.\n- Required - `type`, `child`\n- Example - `{\"type\": \"Not\", \"child\": {\"type\": \"Definition\", \"operator\": \"Equals\", \"name\": \"M.Asset\"}}`\n#### Property filter\nFilters entities by a property value.\n- Required - `type`, `property`, `operator`, `value`, `data_type`\n- Optional - `culture` (for localized properties)\n- Example - `{\"type\": \"Property\", \"property\": \"Title\", \"operator\": \"Contains\", \"value\": \"example\"}`\n#### Relation filter\nFilters entities by a relation.\n- Required - `type`, `relation`\n- Optional - `parent_id` or `child_id`\n- Example - `{\"type\": \"Relation\", \"relation\": \"FinalLifeCycleStatusToAsset\", \"parent_id\": 543}`\n#### CreatedBy filter\nFilters entities by the user who created them.\n- Required - `type`, `user_id`\n- Example - `{\"type\": \"CreatedBy\", \"user_id\": 123}`\n\n#### ModifiedBy filter\nFilters entities by the user who last modified them.\n- Required - `type`, `user_id`\n- Example - `{\"type\": \"ModifiedBy\", \"user_id\": 456}`\n\n#### SecuredAncestors filter\nFilters entities by their secured ancestor.\n- Required - `type`, `ancestor_id`\n- Example - `{\"type\": \"SecuredAncestors\", \"ancestor_id\": 789}`\n#### ID filter\nFilters entities by their ID.\n- Required - `type`, `operator`, `value`\n- Example - `{\"type\": \"Id\", \"operator\": \"Equals\", \"value\": 12345}`\n\n#### Identifier filter\nFilters entities by their identifier.\n- Required - `type`, `operator`, `value`\n- Example - `{\"type\": \"Identifier\", \"operator\": \"Equals\", \"value\": \"my-unique-identifier\"}`\n#### Definition filter\nFilters entities by their entity definition.\n- Required - `type`, `operator`, `name`\n- Example - `{\"type\": \"Definition\", \"operator\": \"Equals\", \"name\": \"M.Asset\"}`\n\n#### Modules filter\nFilters entities by the modules they belong to.\n- Required - `type`, `modules`\n- Example - `{\"type\": \"Modules\", \"modules\": [\"M.DAM\", \"M.PCM\"]}`\n\n#### CreatedOn filter\nFilters entities by their creation date.\n- Required - `type`, `operator`, `value` (ISO 8601 format)\n- Example - `{\"type\": \"CreatedOn\", \"operator\": \"GreaterThan\", \"value\": \"2024-01-01T00:00:00Z\"}`\n\n#### ModifiedOn filter\nFilters entities by their last modification date.\n- Required - `type`, `operator`, `value` (ISO 8601 format)\n- Example - `{\"type\": \"ModifiedOn\", \"operator\": \"LessThan\", \"value\": \"2024-12-31T23:59:59Z\"}`",
        "operationId": "EntitiesByQueryV3",
        "requestBody": {
          "description": "The query request.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/QueryRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QueryRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/QueryRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/QueryRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueryResultResource"
                }
              }
            }
          },
          "400": {
            "description": "Request is not valid"
          },
          "401": {
            "description": "Unauthorized request or invalid access token"
          }
        },
        "security": [
          {
            "OAuth2.0": []
          }
        ]
      }
    },
    "/api/entities/scroll": {
      "post": {
        "tags": [
          "Querying"
        ],
        "summary": "Retrieve entities using a scroll-based query",
        "description": "Lists all entities using a scroll-based query for efficient large result set traversal.",
        "operationId": "EntitiesByScrollV3",
        "requestBody": {
          "description": "The scroll.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/ScrollRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScrollRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ScrollRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ScrollRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueryResultResource"
                }
              }
            }
          },
          "400": {
            "description": "Request is not valid"
          },
          "401": {
            "description": "Unauthorized request or invalid access token"
          }
        },
        "security": [
          {
            "OAuth2.0": []
          }
        ]
      }
    },
    "/api/entities/searchAfter": {
      "post": {
        "tags": [
          "Querying"
        ],
        "summary": "Retrieve entities using a search query",
        "description": "Lists all entities that match the criteria. This endpoint supports sorted pagination using the `search-after` property. <br> {% admonition type=\"info\" name=\"Note\" %}For additional information, see the [SearchAfter API (V3) developer documentation](https://doc.sitecore.com/ch/en/developers/cloud-dev/searchafter-api--v3-.html), including information about [supported query operators](https://doc.sitecore.com/ch/en/developers/cloud-dev/supported-searchafter-query-operators.html), [filters and supported operators](https://doc.sitecore.com/ch/en/developers/cloud-dev/searchafter-api--v3-.html#filters), as well as [SearchAfter examples](https://doc.sitecore.com/ch/en/developers/cloud-dev/searchafter-api--v3--examples.html).{% /admonition %}",
        "operationId": "EntitiesBySearchAfterV3",
        "requestBody": {
          "description": "Request for executing queries with pagination.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchAfterRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntityCollectionResource"
                }
              }
            }
          },
          "400": {
            "description": "Request not valid"
          },
          "401": {
            "description": "Unauthorized request or invalid access token"
          }
        },
        "security": [
          {
            "OAuth2.0": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "QueryRequest": {
        "type": "object",
        "properties": {
          "query": {
            "$ref": "#/components/schemas/Query"
          },
          "load_configuration": {
            "$ref": "#/components/schemas/EntityLoadConfiguration"
          }
        },
        "additionalProperties": false,
        "description": "Represents a request to execute a query, inheriting from `Stylelabs.M.Base.Web.Api.Controllers.Querying.QueryLoadingResource`.",
        "example": {
          "query": {
            "filter": {
              "type": "Composite",
              "operator": "AND",
              "children": [
                {
                  "type": "Definition",
                  "operator": "Equals",
                  "name": "M.Asset"
                },
                {
                  "type": "Relation",
                  "relation": "FinalLifeCycleStatusToAsset",
                  "parent_id": 543
                }
              ]
            },
            "skip": 0,
            "take": 1,
            "sorting": [
              {
                "field_type": "Property",
                "field": "created_on",
                "culture": "en-us",
                "order": "Desc"
              }
            ]
          },
          "load_configuration": {
            "load_entities": true,
            "property_option": {
              "load_option": "None",
              "properties": []
            },
            "relation_option": {
              "load_option": "Custom",
              "relations": [
                {
                  "name": "AssetToAssociatedCollections"
                }
              ]
            },
            "culture_option": {
              "load_option": "All",
              "cultures": []
            }
          }
        }
      },
      "QueryResultResource": {
        "type": "object",
        "properties": {
          "scroll_id": {
            "type": "string",
            "nullable": true
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchDocumentResource"
            },
            "description": "Gets or sets the list of items.",
            "nullable": true
          },
          "total_items": {
            "type": "integer",
            "description": "Gets or sets the total number of items.",
            "format": "int64",
            "nullable": true
          },
          "returned_items": {
            "type": "integer",
            "description": "Gets or sets the number of returned items.",
            "format": "int64",
            "nullable": true
          },
          "offset": {
            "type": "integer",
            "description": "Gets or sets the offset of the items.",
            "format": "int32",
            "nullable": true
          },
          "next": {
            "$ref": "#/components/schemas/Link"
          },
          "previous": {
            "$ref": "#/components/schemas/Link"
          }
        }
      },
      "ScrollRequest": {
        "type": "object",
        "properties": {
          "scroll_id": {
            "type": "string",
            "description": "The ID of the scroll session to get the next results for.",
            "nullable": true
          },
          "scroll_time": {
            "type": "string",
            "description": "The time to keep the scroll session active.",
            "format": "date-span"
          },
          "load_configuration": {
            "$ref": "#/components/schemas/EntityLoadConfiguration"
          }
        },
        "additionalProperties": false
      },
      "SearchAfterRequest": {
        "required": [
          "filter",
          "sorting"
        ],
        "type": "object",
        "properties": {
          "filter": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/QueryNodeFilter"
              },
              {
                "$ref": "#/components/schemas/AncestorIdQueryNodeFilter"
              },
              {
                "$ref": "#/components/schemas/CreatedByQueryNodeFilter"
              },
              {
                "$ref": "#/components/schemas/DefinitionIdQueryNodeFilter"
              },
              {
                "$ref": "#/components/schemas/DefinitionNameQueryNodeFilter"
              },
              {
                "$ref": "#/components/schemas/FullTextQueryNodeFilter"
              },
              {
                "$ref": "#/components/schemas/IdentifierQueryNodeFilter"
              },
              {
                "$ref": "#/components/schemas/IdInQueryNodeFilter"
              },
              {
                "$ref": "#/components/schemas/LockedByQueryNodeFilter"
              },
              {
                "$ref": "#/components/schemas/LockedQueryNodeFilter"
              },
              {
                "$ref": "#/components/schemas/LogicalQueryNodeFilter"
              }
            ]
          },
          "sorting": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Sorting"
            }
          },
          "search_after": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "take": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "load_configuration": {
            "$ref": "#/components/schemas/EntityLoadConfiguration"
          }
        },
        "additionalProperties": false
      },
      "EntityCollectionResource": {
        "type": "object",
        "properties": {
          "last_hit_data": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The last returned hits, which are used to fetch the next page of results.",
            "nullable": true
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EntityResource"
            },
            "description": "Gets or sets the list of items.",
            "nullable": true
          },
          "total_items": {
            "type": "integer",
            "description": "Gets or sets the total number of items.",
            "format": "int64",
            "nullable": true
          },
          "returned_items": {
            "type": "integer",
            "description": "Gets or sets the number of returned items.",
            "format": "int64",
            "nullable": true
          },
          "offset": {
            "type": "integer",
            "description": "Gets or sets the offset of the items.",
            "format": "int32",
            "nullable": true
          },
          "next": {
            "$ref": "#/components/schemas/Link"
          },
          "previous": {
            "$ref": "#/components/schemas/Link"
          },
          "identifier": {
            "type": "string",
            "description": "Gets or sets the identifier of the resource.",
            "nullable": true
          },
          "self": {
            "$ref": "#/components/schemas/Link"
          }
        },
        "additionalProperties": {},
        "description": "Collection of entities resulted of a query"
      },
      "Query": {
        "type": "object",
        "properties": {
          "filter": {
            "$ref": "#/components/schemas/QueryFilter"
          },
          "skip": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "take": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "sorting": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Sorting"
            },
            "nullable": true
          },
          "scroll_time": {
            "type": "string",
            "format": "date-span",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "QueryFilter": {
        "required": [
          "type"
        ],
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/FilterType"
          }
        },
        "additionalProperties": false,
        "description": "Represents a filter used in a query. The `type` property determines the filter type and its required properties. See `FilterType` for available types and examples below.",
        "x-filter-type-examples": {
          "Composite": {
            "description": "A container filter that combines multiple child filters using a logical operator. Required properties: `type`, `operator`, `children`.",
            "example": {
              "type": "Composite",
              "operator": "AND",
              "children": [
                {
                  "type": "Definition",
                  "operator": "Equals",
                  "name": "M.Asset"
                },
                {
                  "type": "Property",
                  "property": "Title",
                  "operator": "Contains",
                  "value": "example"
                }
              ]
            }
          },
          "Not": {
            "description": "Negates a child filter. Required properties: `type`, `child`.",
            "example": {
              "type": "Not",
              "child": {
                "type": "Definition",
                "operator": "Equals",
                "name": "M.Asset"
              }
            }
          },
          "Property": {
            "description": "Filters entities by a property value. Required properties: `type`, `property`, `operator`, `value`,`data_type`. Optional properties: `culture` (for localized properties).",
            "example": {
              "type": "Property",
              "property": "Title",
              "operator": "Contains",
              "value": "example",
              "culture": "en-US"
            }
          },
          "Relation": {
            "description": "Filters entities by a relation. Required properties: `type`, `relation`. Optional properties: `parent_id` or `child_id` (depending on relation direction).",
            "example": {
              "type": "Relation",
              "relation": "FinalLifeCycleStatusToAsset",
              "parent_id": 543
            }
          },
          "CreatedBy": {
            "description": "Filters entities by the user who created them. Required properties: `type`, `user_id`.",
            "example": {
              "type": "CreatedBy",
              "user_id": 123
            }
          },
          "ModifiedBy": {
            "description": "Filters entities by the user who last modified them. Required properties: `type`, `user_id`.",
            "example": {
              "type": "ModifiedBy",
              "user_id": 456
            }
          },
          "SecuredAncestors": {
            "description": "Filters entities by their secured ancestor. Required properties: `type`, `ancestor_id`.",
            "example": {
              "type": "SecuredAncestors",
              "ancestor_id": 789
            }
          },
          "Id": {
            "description": "Filters entities by their ID. Required properties: `type`, `operator`, `value`.",
            "example": {
              "type": "Id",
              "operator": "Equals",
              "value": 12345
            }
          },
          "Identifier": {
            "description": "Filters entities by their identifier. Required properties: `type`, `operator`, `value`.",
            "example": {
              "type": "Identifier",
              "operator": "Equals",
              "value": "my-unique-identifier"
            }
          },
          "Definition": {
            "description": "Filters entities by their entity definition. Required properties: `type`, `operator`, `name`.",
            "example": {
              "type": "Definition",
              "operator": "Equals",
              "name": "M.Asset"
            }
          },
          "Modules": {
            "description": "Filters entities by the modules they belong to. Required properties: `type`, `modules`.",
            "example": {
              "type": "Modules",
              "modules": [
                "M.DAM",
                "M.PCM"
              ]
            }
          },
          "CreatedOn": {
            "description": "Filters entities by their creation date. Required properties: `type`, `operator`, `value`.",
            "example": {
              "type": "CreatedOn",
              "operator": "GreaterThan",
              "value": "2024-01-01T00:00:00Z"
            }
          },
          "ModifiedOn": {
            "description": "Filters entities by their last modification date. Required properties: `type`, `operator`, `value`.",
            "example": {
              "type": "ModifiedOn",
              "operator": "LessThan",
              "value": "2024-12-31T23:59:59Z"
            }
          }
        }
      },
      "QueryNodeFilter": {
        "required": [
          "type"
        ],
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/QueryNodeFilterType"
          }
        },
        "additionalProperties": false,
        "description": "Base query filter for entities."
      },
      "AncestorIdQueryNodeFilter": {
        "allOf": [
          {
            "$ref": "#/components/schemas/QueryNodeFilter"
          },
          {
            "required": [
              "id",
              "relation"
            ],
            "type": "object",
            "properties": {
              "relation": {
                "minLength": 1,
                "type": "string",
                "description": "Gets or sets ancestor relation name."
              },
              "id": {
                "type": "integer",
                "description": "Gets or sets ancestor ID.",
                "format": "int64"
              },
              "type": {
                "$ref": "#/components/schemas/QueryNodeFilterType"
              }
            },
            "additionalProperties": false
          }
        ],
        "description": "A query for entities using an ancestor filter."
      },
      "CreatedByQueryNodeFilter": {
        "allOf": [
          {
            "$ref": "#/components/schemas/QueryNodeFilter"
          },
          {
            "required": [
              "user_id"
            ],
            "type": "object",
            "properties": {
              "user_id": {
                "type": "integer",
                "description": "Gets or sets the user id.",
                "format": "int64"
              },
              "type": {
                "$ref": "#/components/schemas/QueryNodeFilterType"
              }
            },
            "additionalProperties": false
          }
        ],
        "description": "A query for entities using a specified user filter."
      },
      "DefinitionIdQueryNodeFilter": {
        "allOf": [
          {
            "$ref": "#/components/schemas/QueryNodeFilter"
          },
          {
            "required": [
              "id"
            ],
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "Gets or sets the definition id.",
                "format": "int64"
              },
              "type": {
                "$ref": "#/components/schemas/QueryNodeFilterType"
              }
            },
            "additionalProperties": false
          }
        ],
        "description": "A query for entities using a specified defintion filter."
      },
      "DefinitionNameQueryNodeFilter": {
        "allOf": [
          {
            "$ref": "#/components/schemas/QueryNodeFilter"
          },
          {
            "required": [
              "name"
            ],
            "type": "object",
            "properties": {
              "name": {
                "minLength": 1,
                "type": "string",
                "description": "gets or sets the definition name."
              },
              "type": {
                "$ref": "#/components/schemas/QueryNodeFilterType"
              }
            },
            "additionalProperties": false
          }
        ],
        "description": "A query for entities using a specified definition filter."
      },
      "FullTextQueryNodeFilter": {
        "allOf": [
          {
            "$ref": "#/components/schemas/QueryNodeFilter"
          },
          {
            "required": [
              "value"
            ],
            "type": "object",
            "properties": {
              "value": {
                "minLength": 1,
                "type": "string",
                "description": "Gets or sets the text value."
              },
              "type": {
                "$ref": "#/components/schemas/QueryNodeFilterType"
              }
            },
            "additionalProperties": false
          }
        ],
        "description": "A query for entities using a specified full text filter."
      },
      "IdentifierQueryNodeFilter": {
        "allOf": [
          {
            "$ref": "#/components/schemas/QueryNodeFilter"
          },
          {
            "required": [
              "identifier"
            ],
            "type": "object",
            "properties": {
              "identifier": {
                "minLength": 1,
                "type": "string",
                "description": "gets or sets the identifier."
              },
              "type": {
                "$ref": "#/components/schemas/QueryNodeFilterType"
              }
            },
            "additionalProperties": false
          }
        ],
        "description": "A query for entities using a specified identifier filter."
      },
      "IdInQueryNodeFilter": {
        "allOf": [
          {
            "$ref": "#/components/schemas/QueryNodeFilter"
          },
          {
            "required": [
              "ids"
            ],
            "type": "object",
            "properties": {
              "ids": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "format": "int64"
                },
                "description": "gets or sets the ids."
              },
              "type": {
                "$ref": "#/components/schemas/QueryNodeFilterType"
              }
            },
            "additionalProperties": false
          }
        ],
        "description": "A query for entities using a specified ids filter."
      },
      "LockedByQueryNodeFilter": {
        "allOf": [
          {
            "$ref": "#/components/schemas/QueryNodeFilter"
          },
          {
            "required": [
              "user_id"
            ],
            "type": "object",
            "properties": {
              "user_id": {
                "type": "integer",
                "description": "gets or sets the user id.",
                "format": "int64"
              },
              "type": {
                "$ref": "#/components/schemas/QueryNodeFilterType"
              }
            },
            "additionalProperties": false
          }
        ],
        "description": "A query for entities using a specified user filter."
      },
      "LockedQueryNodeFilter": {
        "allOf": [
          {
            "$ref": "#/components/schemas/QueryNodeFilter"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "$ref": "#/components/schemas/QueryNodeFilterType"
              }
            },
            "additionalProperties": false
          }
        ],
        "description": "A query filter for entities that are locked."
      },
      "LogicalQueryNodeFilter": {
        "allOf": [
          {
            "$ref": "#/components/schemas/QueryNodeFilter"
          },
          {
            "required": [
              "left",
              "operator",
              "right"
            ],
            "type": "object",
            "properties": {
              "left": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/QueryNodeFilter"
                  },
                  {
                    "$ref": "#/components/schemas/AncestorIdQueryNodeFilter"
                  },
                  {
                    "$ref": "#/components/schemas/CreatedByQueryNodeFilter"
                  },
                  {
                    "$ref": "#/components/schemas/DefinitionIdQueryNodeFilter"
                  },
                  {
                    "$ref": "#/components/schemas/DefinitionNameQueryNodeFilter"
                  },
                  {
                    "$ref": "#/components/schemas/FullTextQueryNodeFilter"
                  },
                  {
                    "$ref": "#/components/schemas/IdentifierQueryNodeFilter"
                  },
                  {
                    "$ref": "#/components/schemas/IdInQueryNodeFilter"
                  },
                  {
                    "$ref": "#/components/schemas/LockedByQueryNodeFilter"
                  },
                  {
                    "$ref": "#/components/schemas/LockedQueryNodeFilter"
                  },
                  {
                    "$ref": "#/components/schemas/LogicalQueryNodeFilter"
                  }
                ],
                "description": "Gets or sets the left operant."
              },
              "right": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/QueryNodeFilter"
                  },
                  {
                    "$ref": "#/components/schemas/AncestorIdQueryNodeFilter"
                  },
                  {
                    "$ref": "#/components/schemas/CreatedByQueryNodeFilter"
                  },
                  {
                    "$ref": "#/components/schemas/DefinitionIdQueryNodeFilter"
                  },
                  {
                    "$ref": "#/components/schemas/DefinitionNameQueryNodeFilter"
                  },
                  {
                    "$ref": "#/components/schemas/FullTextQueryNodeFilter"
                  },
                  {
                    "$ref": "#/components/schemas/IdentifierQueryNodeFilter"
                  },
                  {
                    "$ref": "#/components/schemas/IdInQueryNodeFilter"
                  },
                  {
                    "$ref": "#/components/schemas/LockedByQueryNodeFilter"
                  },
                  {
                    "$ref": "#/components/schemas/LockedQueryNodeFilter"
                  },
                  {
                    "$ref": "#/components/schemas/LogicalQueryNodeFilter"
                  }
                ],
                "description": "Gets or sets the right operant."
              },
              "operator": {
                "$ref": "#/components/schemas/LogicalOperator"
              },
              "type": {
                "$ref": "#/components/schemas/QueryNodeFilterType"
              }
            },
            "additionalProperties": false
          }
        ],
        "description": "A logical query filter."
      },
      "QueryNodeFilterType": {
        "enum": [
          "Negating",
          "Logical",
          "DefinitionId",
          "DefinitionName",
          "RootTaxonomyItem",
          "PathRoot",
          "Locked",
          "LockedBy",
          "CreatedBy",
          "ModifiedBy",
          "FullText",
          "Identifier",
          "IdIn",
          "Selection",
          "IntProperty",
          "LongProperty",
          "DecimalProperty",
          "BoolProperty",
          "DateTimeProperty",
          "DateTimeOffsetProperty",
          "StringProperty",
          "Relation",
          "RelationExists",
          "Ancestor"
        ],
        "type": "string",
        "description": "Specifies the type of filter to be applied in a query node."
      },
      "FilterType": {
        "enum": [
          "Composite",
          "Not",
          "Property",
          "Relation",
          "CreatedBy",
          "ModifiedBy",
          "SecuredAncestors",
          "Id",
          "Identifier",
          "Definition",
          "Modules",
          "CreatedOn",
          "ModifiedOn"
        ],
        "type": "string",
        "description": "Specifies the type of filter to apply in a query. Each filter type has specific required properties:\n- **Composite**: Combines multiple filters with a logical operator. Requires `operator` (AND, OR) and `children` array.\n- **Not**: Negates a child filter. Requires `child` filter object.\n- **Property**: Filters by property value. Requires `property`, `operator`, `value`, and `data_type`. Optional: `culture`.\n- **Relation**: Filters by relation. Requires `relation` name. Optional: `parent_id` or `child_id`.\n- **CreatedBy**: Filters by creator. Requires `user_id`.\n- **ModifiedBy**: Filters by modifier. Requires `user_id`.\n- **SecuredAncestors**: Filters by secured ancestor. Requires `ancestor_id`.\n- **Id**: Filters by entity ID. Requires `operator` and `value`.\n- **Identifier**: Filters by entity identifier. Requires `operator` and `value`.\n- **Definition**: Filters by entity definition. Requires `operator` and `name`.\n- **Modules**: Filters by module membership. Requires `modules` array.\n- **CreatedOn**: Filters by creation date. Requires `operator` and `value` (ISO 8601 format).\n- **ModifiedOn**: Filters by modification date. Requires `operator` and `value` (ISO 8601 format)."
      },
      "Sorting": {
        "required": [
          "field",
          "order"
        ],
        "type": "object",
        "properties": {
          "field_type": {
            "$ref": "#/components/schemas/SortFieldType"
          },
          "field": {
            "type": "string"
          },
          "culture": {
            "type": "string",
            "nullable": true
          },
          "order": {
            "$ref": "#/components/schemas/QuerySortOrder"
          }
        },
        "additionalProperties": false
      },
      "SortFieldType": {
        "enum": [
          "Property",
          "System"
        ],
        "type": "string"
      },
      "QuerySortOrder": {
        "enum": [
          "Desc",
          "Asc"
        ],
        "type": "string"
      },
      "EntityResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The ID for the entity, for example, `39752`.",
            "format": "int64"
          },
          "identifier": {
            "type": "string",
            "description": "The identifier for the entity.",
            "nullable": true
          },
          "cultures": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The cultures associated with the entity, for example, `en-US`.",
            "nullable": true
          },
          "properties": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "nullable": true
            },
            "description": "The properties of the entity.",
            "nullable": true
          },
          "relations": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "nullable": true
            },
            "description": "The relations of the entity.",
            "nullable": true
          },
          "created_by": {
            "$ref": "#/components/schemas/Link"
          },
          "created_on": {
            "type": "string",
            "description": "The date and time when the entity was created.",
            "format": "date-time"
          },
          "modified_by": {
            "$ref": "#/components/schemas/Link"
          },
          "modified_on": {
            "type": "string",
            "description": "The date and time when the entity was last modified.",
            "format": "date-time"
          },
          "locked_by": {
            "$ref": "#/components/schemas/Link"
          },
          "locked_on": {
            "type": "string",
            "description": "The date and time when the entity was locked.",
            "format": "date-time",
            "nullable": true
          },
          "entitydefinition": {
            "$ref": "#/components/schemas/Link"
          },
          "copy": {
            "$ref": "#/components/schemas/Link"
          },
          "copyasync": {
            "$ref": "#/components/schemas/Link"
          },
          "permissions": {
            "$ref": "#/components/schemas/Link"
          },
          "requested_permissions": {
            "type": "object",
            "additionalProperties": {
              "type": "boolean",
              "nullable": true
            },
            "description": "The requested permissions with identification if a certain user has the permissions.",
            "nullable": true
          },
          "lifecycle": {
            "$ref": "#/components/schemas/Link"
          },
          "saved_selections": {
            "$ref": "#/components/schemas/Link"
          },
          "roles": {
            "$ref": "#/components/schemas/Link"
          },
          "annotations": {
            "$ref": "#/components/schemas/Link"
          },
          "is_root_taxonomy_item": {
            "type": "boolean",
            "description": "Gets or sets a value indicating whether the entity is a root taxonomy item.",
            "nullable": true
          },
          "is_path_root": {
            "type": "boolean",
            "description": "Gets or sets a value indicating whether the entity is a path root.",
            "nullable": true
          },
          "inherits_security": {
            "type": "boolean",
            "description": "Gets or sets a value indicating whether the entity inherits security."
          },
          "is_system_owned": {
            "type": "boolean",
            "description": "Gets or sets a value indicating whether the entity is system owned."
          },
          "version": {
            "type": "integer",
            "description": "The version of the entity.",
            "format": "int64"
          },
          "full": {
            "$ref": "#/components/schemas/Link"
          },
          "modules": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The modules associated with the entity.",
            "nullable": true
          },
          "self": {
            "$ref": "#/components/schemas/Link"
          }
        },
        "additionalProperties": {},
        "description": "Represents an entity resource with various properties, relations, and metadata."
      },
      "SearchDocumentResource": {
        "type": "object",
        "properties": {
          "link": {
            "$ref": "#/components/schemas/Link"
          },
          "entity": {
            "$ref": "#/components/schemas/EntityResource"
          },
          "self": {
            "$ref": "#/components/schemas/Link"
          }
        },
        "additionalProperties": false
      },
      "Link": {
        "type": "object",
        "properties": {
          "href": {
            "type": "string",
            "description": "Gets or sets the URI that points to the resource this link refers to.",
            "nullable": true
          },
          "filename_properties": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Gets or sets the URI that points to the resource this link refers to.",
            "nullable": true
          },
          "title": {
            "type": "string",
            "description": "Gets or sets the title that describes this link.",
            "nullable": true
          },
          "templated": {
            "type": "boolean",
            "description": "Gets or sets a value indicating whether the contained URI is a template.",
            "default": false
          }
        },
        "additionalProperties": false,
        "description": "Represents a link to a resource."
      },
      "EntityLoadConfiguration": {
        "type": "object",
        "properties": {
          "culture_option": {
            "$ref": "#/components/schemas/CultureLoadOption"
          },
          "property_option": {
            "$ref": "#/components/schemas/PropertyLoadOption"
          },
          "relation_option": {
            "$ref": "#/components/schemas/RelationLoadOption"
          }
        },
        "additionalProperties": false,
        "description": "Represents the configuration for loading an entity."
      },
      "CultureLoadOption": {
        "type": "object",
        "properties": {
          "load_option": {
            "$ref": "#/components/schemas/LoadOption"
          },
          "cultures": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Gets or sets a list of culture names that need to be loaded. This is only useful when `Stylelabs.M.Base.Entities.Loading.CultureLoadOption.LoadOption` is `Stylelabs.M.Base.Entities.Loading.LoadOption.Custom`.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents options for loading cultures."
      },
      "PropertyLoadOption": {
        "type": "object",
        "properties": {
          "load_option": {
            "$ref": "#/components/schemas/LoadOption"
          },
          "properties": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Gets or sets a list of property names (case insensitive) that need to be loaded.\r\nThis is only useful when `Stylelabs.M.Base.Entities.Loading.PropertyLoadOption.LoadOption` is `Stylelabs.M.Base.Entities.Loading.LoadOption.Custom`.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents options for loading properties."
      },
      "RelationLoadOption": {
        "type": "object",
        "properties": {
          "load_option": {
            "$ref": "#/components/schemas/LoadOption"
          },
          "relations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RelationSpecification"
            },
            "description": "Gets or sets a list of relations that need to be loaded.\r\nThis is only useful when `Stylelabs.M.Base.Entities.Loading.RelationLoadOption.LoadOption` is `Stylelabs.M.Base.Entities.Loading.LoadOption.Custom`.",
            "nullable": true
          },
          "max_related_items": {
            "type": "integer",
            "description": "Gets or sets the maximum number of related items for each relation.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents options for loading relations."
      },
      "LoadOption": {
        "enum": [
          "None",
          "Default",
          "Custom",
          "All"
        ],
        "type": "string",
        "description": "An enum of possible load options.",
        "deprecated": false
      },
      "RelationSpecification": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the relation (case insensitive).",
            "nullable": true
          },
          "role": {
            "$ref": "#/components/schemas/RelationRole"
          }
        },
        "additionalProperties": false
      },
      "RelationRole": {
        "enum": [
          "Parent",
          "Child"
        ],
        "type": "string"
      },
      "LogicalOperator": {
        "enum": [
          "And",
          "Or"
        ],
        "type": "string"
      }
    },
    "securitySchemes": {
      "OAuth2.0": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "/oauth/token",
            "scopes": {}
          },
          "authorizationCode": {
            "authorizationUrl": "/oauth/authorize",
            "tokenUrl": "/oauth/token",
            "scopes": {}
          }
        }
      }
    }
  }
}