{
  "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- 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 2.{% /admonition %}     \n    \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": "v2.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. {% admonition type=\"info\" name=\"Note\" %}The Querying API supports various [operators](#tag/querying) for filter types that use an `operator` field. Relation filters do not support operators. {% /admonition %} 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`, and `data_type`\n- Optional - `culture` (for localized properties)\n- Valid `data_type` values - `String`, `Int`, `Long`, `Decimal`, `Float`, `DateTime`, `DateTimeOffset`, `Bool` \n\n- Example - `{\"type\": \"Property\", \"property\": \"Title\", \"operator\": \"Contains\", \"value\": \"example\"}`\n#### Relation filter\nFilters entities by a relation. The `operator` field is not applicable to Relation filters. If included, it will be ignored and will not affect query results. \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": "EntitiesByQueryV2",
        "parameters": [
          {
            "name": "X-ApiVersion",
            "in": "header",
            "required": true,
            "schema": {
              "type": "integer",
              "example": 2,
              "description": "API version. Must be set to 2."
            }
          }
        ],
        "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 entities using a scroll-based query for efficient large result set traversal. {% admonition type=\"info\" name=\"Note\" %}The Querying API supports various [operators](#tag/querying) for filter types that use an `operator` field. Relation filters do not support operators. {% /admonition %}",
        "operationId": "EntitiesByScrollV2",
        "parameters": [
          {
            "name": "X-ApiVersion",
            "in": "header",
            "required": true,
            "schema": {
              "type": "integer",
              "example": 2,
              "description": "API version. Must be set to 2."
            }
          }
        ],
        "requestBody": {
          "description": "The scroll request.",
          "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 entities that match the criteria. This endpoint supports sorted pagination using the `search-after` property. {% admonition type=\"info\" name=\"Note\" %}For more information, see [query operators](https://doc.sitecore.com/ch/en/developers/cloud-dev/supported-searchafter-query-operators-1547564.html), [filters](https://doc.sitecore.com/ch/en/developers/cloud-dev/searchafter-api--v2-.html#filters), and [examples](https://doc.sitecore.com/ch/en/developers/cloud-dev/searchafter-api--v2--examples.html).{% /admonition %}",
        "operationId": "EntitiesBySearchAfterV2",
        "parameters": [
          {
            "name": "X-ApiVersion",
            "in": "header",
            "required": true,
            "schema": {
              "type": "integer",
              "example": 2,
              "description": "API version. Must be set to 2."
            }
          }
        ],
        "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": {
          "filter": {
            "$ref": "#/components/schemas/QueryFilter"
          },
          "skip": {
            "type": "integer",
            "description": "The number of items to skip. If not specified, no items will be skipped.",
            "format": "int32",
            "nullable": true
          },
          "take": {
            "type": "integer",
            "description": "The number of items to take. If not specified, the underlying implementation will use a default value.",
            "format": "int32",
            "nullable": true
          },
          "sorting": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Sorting"
            },
            "description": "Indicates how the results should be sorted.",
            "nullable": true
          },
          "scroll_time": {
            "type": "string",
            "description": "If specified, the query will return as !:QueryResult.ScrollId, which can be used to walk through the set of results without having to use paging.",
            "format": "date-span",
            "nullable": true
          },
          "entity_load_options": {
            "$ref": "#/components/schemas/EntityLoadOptions"
          },
          "load_configuration": {
            "$ref": "#/components/schemas/EntityLoadConfiguration"
          }
        },
        "additionalProperties": false,
        "example": {
          "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"
            }
          ],
          "entity_load_options": {
            "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"
          },
          "entity_load_options": {
            "$ref": "#/components/schemas/EntityLoadOptions"
          },
          "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
          },
          "entity_load_options": {
            "$ref": "#/components/schemas/EntityLoadOptions"
          },
          "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"
      },
      "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`, and `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."
      },
      "QueryNodeFilterType": {
        "enum": [
          "Negating",
          "Logical",
          "DefinitionId",
          "DefinitionName",
          "RootTaxonomyItem",
          "PathRoot",
          "Locked",
          "LockedBy",
          "CreatedBy",
          "ModifiedBy",
          "FullText",
          "Identifier",
          "IdIn",
          "Selection",
          "IntProperty",
          "LongProperty",
          "DecimalProperty",
          "BoolProperty"
        ],
        "type": "string"
      },
      "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."
      },
      "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."
      },
      "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."
      },
      "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"
                  }
                ]
              },
              "operator": {
                "$ref": "#/components/schemas/LogicalOperator"
              },
              "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"
                  }
                ]
              }
            },
            "additionalProperties": false
          }
        ],
        "description": "A logical query filter for entities."
      },
      "LogicalOperator": {
        "enum": [
          "And",
          "Or"
        ],
        "type": "string"
      },
      "Sorting": {
        "required": [
          "field",
          "order"
        ],
        "type": "object",
        "properties": {
          "field_type": {
            "$ref": "#/components/schemas/SortFieldType"
          },
          "field": {
            "type": "string"
          },
          "culture": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "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."
      },
      "EntityLoadOptions": {
        "type": "object",
        "properties": {
          "load_entities": {
            "type": "boolean",
            "description": "Indicates if entities should be loaded."
          },
          "properties_to_load": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The names of the properties to load with the entities. If the value contains \"*\", all properties will be loaded. If the value is null, no properties will be loaded. The default value is \"*\", which mean all properties will be loaded.",
            "nullable": true
          },
          "relations_to_load": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The names of the relations to load with the entities. If the value is null, no relations will be loaded. The default value is null, which mean no relations will be loaded.",
            "nullable": true
          },
          "cultures_to_load": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The cultures to load the entities in. If not specified, the entities will only be loaded in the invariant-culture. If the collection contains value \"*\", the entities will be loaded in all installed cultures.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Specifies if and how resulting entities should be loaded."
      },
      "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
          }
        }
      },
      "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": "object",
              "nullable": true
            },
            "description": "The properties of the entity.",
            "nullable": true
          },
          "relations": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "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."
      },
      "LoadOption": {
        "enum": [
          "None",
          "Default",
          "Custom",
          "All"
        ],
        "type": "string",
        "description": "An enum of possible load options."
      },
      "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. This 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. This 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."
      },
      "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"
      },
      "FilterType": {
        "enum": [
          "Composite",
          "Not",
          "Property",
          "Relation"
        ],
        "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`. Valid data_type values: `String`, `Int`, `Long`, `Decimal`, `Float`, `DateTime`, `DateTimeOffset`, `Bool`. Optional: `culture`.\n- **Relation**: Filters by relation. Requires `relation` name. Does not support operators. Optional: `parent_id` or `child_id`."
      },
      "SortFieldType": {
        "enum": [
          "Property",
          "System"
        ],
        "type": "string"
      }
    },
    "securitySchemes": {
      "OAuth2.0": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "/oauth/token",
            "scopes": {}
          },
          "authorizationCode": {
            "authorizationUrl": "/oauth/authorize",
            "tokenUrl": "/oauth/token",
            "scopes": {}
          }
        }
      }
    }
  }
}