# Retrieve entities using a query string

Lists entities that match the query in a request body. The query filter supports multiple types, each with specific properties:
#### Composite filter
Combines multiple filters using a logical operator (AND, OR).
- Required - type, operator, children
- Example - {"type": "Composite", "operator": "AND", "children": [...]}
#### Not filter
Negates a child filter.
- Required - type, child
- Example - {"type": "Not", "child": {"type": "Definition", "operator": "Equals", "name": "M.Asset"}}
#### Property filter
Filters entities by a property value.
- Required - type, property, operator, value, data_type
- Optional - culture (for localized properties)
- Example - {"type": "Property", "property": "Title", "operator": "Contains", "value": "example"}
#### Relation filter
Filters entities by a relation.
- Required - type, relation
- Optional - parent_id or child_id
- Example - {"type": "Relation", "relation": "FinalLifeCycleStatusToAsset", "parent_id": 543}
#### CreatedBy filter
Filters entities by the user who created them.
- Required - type, user_id
- Example - {"type": "CreatedBy", "user_id": 123}

#### ModifiedBy filter
Filters entities by the user who last modified them.
- Required - type, user_id
- Example - {"type": "ModifiedBy", "user_id": 456}

#### SecuredAncestors filter
Filters entities by their secured ancestor.
- Required - type, ancestor_id
- Example - {"type": "SecuredAncestors", "ancestor_id": 789}
#### ID filter
Filters entities by their ID.
- Required - type, operator, value
- Example - {"type": "Id", "operator": "Equals", "value": 12345}

#### Identifier filter
Filters entities by their identifier.
- Required - type, operator, value
- Example - {"type": "Identifier", "operator": "Equals", "value": "my-unique-identifier"}
#### Definition filter
Filters entities by their entity definition.
- Required - type, operator, name
- Example - {"type": "Definition", "operator": "Equals", "name": "M.Asset"}

#### Modules filter
Filters entities by the modules they belong to.
- Required - type, modules
- Example - {"type": "Modules", "modules": ["M.DAM", "M.PCM"]}

#### CreatedOn filter
Filters entities by their creation date.
- Required - type, operator, value (ISO 8601 format)
- Example - {"type": "CreatedOn", "operator": "GreaterThan", "value": "2024-01-01T00:00:00Z"}

#### ModifiedOn filter
Filters entities by their last modification date.
- Required - type, operator, value (ISO 8601 format)
- Example - {"type": "ModifiedOn", "operator": "LessThan", "value": "2024-12-31T23:59:59Z"}

Endpoint: POST /api/entities/query
Version: v3.0
Security: OAuth2.0

## Request fields (application/json-patch+json):

  - `query` (object)

  - `query.filter` (object)
    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.

  - `query.filter.type` (string, required)
    Specifies the type of filter to apply in a query. Each filter type has specific required properties:
- Composite: Combines multiple filters with a logical operator. Requires operator (AND, OR) and children array.
- Not: Negates a child filter. Requires child filter object.
- Property: Filters by property value. Requires property, operator, value, and data_type. Optional: culture.
- Relation: Filters by relation. Requires relation name. Optional: parent_id or child_id.
- CreatedBy: Filters by creator. Requires user_id.
- ModifiedBy: Filters by modifier. Requires user_id.
- SecuredAncestors: Filters by secured ancestor. Requires ancestor_id.
- Id: Filters by entity ID. Requires operator and value.
- Identifier: Filters by entity identifier. Requires operator and value.
- Definition: Filters by entity definition. Requires operator and name.
- Modules: Filters by module membership. Requires modules array.
- CreatedOn: Filters by creation date. Requires operator and value (ISO 8601 format).
- ModifiedOn: Filters by modification date. Requires operator and value (ISO 8601 format).
    Enum: "Composite", "Not", "Property", "Relation", "CreatedBy", "ModifiedBy", "SecuredAncestors", "Id", "Identifier", "Definition", "Modules", "CreatedOn", "ModifiedOn"

  - `query.skip` (integer,null)

  - `query.take` (integer,null)

  - `query.sorting` (array,null)

  - `query.sorting.field` (string, required)

  - `query.sorting.order` (string, required)
    Enum: "Desc", "Asc"

  - `query.sorting.field_type` (string)
    Enum: "Property", "System"

  - `query.sorting.culture` (string,null)

  - `query.scroll_time` (string,null)

  - `load_configuration` (object)
    Represents the configuration for loading an entity.

  - `load_configuration.culture_option` (object)
    Represents options for loading cultures.

  - `load_configuration.culture_option.load_option` (string)
    An enum of possible load options.
    Enum: "None", "Default", "Custom", "All"

  - `load_configuration.culture_option.cultures` (array,null)
    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.

  - `load_configuration.property_option` (object)
    Represents options for loading properties.

  - `load_configuration.property_option.load_option` (string)
    An enum of possible load options.
    Enum: "None", "Default", "Custom", "All"

  - `load_configuration.property_option.properties` (array,null)
    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.

  - `load_configuration.relation_option` (object)
    Represents options for loading relations.

  - `load_configuration.relation_option.load_option` (string)
    An enum of possible load options.
    Enum: "None", "Default", "Custom", "All"

  - `load_configuration.relation_option.relations` (array,null)
    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.

  - `load_configuration.relation_option.relations.name` (string,null)
    Name of the relation (case insensitive).

  - `load_configuration.relation_option.relations.role` (string)
    Enum: "Parent", "Child"

  - `load_configuration.relation_option.max_related_items` (integer,null)
    Gets or sets the maximum number of related items for each relation.

## Response 200 fields (application/json):

  - `scroll_id` (string,null)

  - `items` (array,null)
    Gets or sets the list of items.

  - `items.link` (object)
    Represents a link to a resource.

  - `items.link.href` (string,null)
    Gets or sets the URI that points to the resource this link refers to.

  - `items.link.filename_properties` (array,null)
    Gets or sets the URI that points to the resource this link refers to.

  - `items.link.title` (string,null)
    Gets or sets the title that describes this link.

  - `items.link.templated` (boolean)
    Gets or sets a value indicating whether the contained URI is a template.

  - `items.entity` (object)
    Represents an entity resource with various properties, relations, and metadata.

  - `items.entity.id` (integer)
    The ID for the entity, for example, 39752.

  - `items.entity.identifier` (string,null)
    The identifier for the entity.

  - `items.entity.cultures` (array,null)
    The cultures associated with the entity, for example, en-US.

  - `items.entity.properties` (object,null)
    The properties of the entity.

  - `items.entity.relations` (object,null)
    The relations of the entity.

  - `items.entity.created_by` (object)
    Represents a link to a resource.

  - `items.entity.created_on` (string)
    The date and time when the entity was created.

  - `items.entity.modified_by` (object)
    Represents a link to a resource.

  - `items.entity.modified_on` (string)
    The date and time when the entity was last modified.

  - `items.entity.locked_by` (object)
    Represents a link to a resource.

  - `items.entity.locked_on` (string,null)
    The date and time when the entity was locked.

  - `items.entity.entitydefinition` (object)
    Represents a link to a resource.

  - `items.entity.copy` (object)
    Represents a link to a resource.

  - `items.entity.copyasync` (object)
    Represents a link to a resource.

  - `items.entity.permissions` (object)
    Represents a link to a resource.

  - `items.entity.requested_permissions` (object,null)
    The requested permissions with identification if a certain user has the permissions.

  - `items.entity.lifecycle` (object)
    Represents a link to a resource.

  - `items.entity.saved_selections` (object)
    Represents a link to a resource.

  - `items.entity.roles` (object)
    Represents a link to a resource.

  - `items.entity.annotations` (object)
    Represents a link to a resource.

  - `items.entity.is_root_taxonomy_item` (boolean,null)
    Gets or sets a value indicating whether the entity is a root taxonomy item.

  - `items.entity.is_path_root` (boolean,null)
    Gets or sets a value indicating whether the entity is a path root.

  - `items.entity.inherits_security` (boolean)
    Gets or sets a value indicating whether the entity inherits security.

  - `items.entity.is_system_owned` (boolean)
    Gets or sets a value indicating whether the entity is system owned.

  - `items.entity.version` (integer)
    The version of the entity.

  - `items.entity.full` (object)
    Represents a link to a resource.

  - `items.entity.modules` (array,null)
    The modules associated with the entity.

  - `items.entity.self` (object)
    Represents a link to a resource.

  - `items.self` (object)
    Represents a link to a resource.

  - `total_items` (integer,null)
    Gets or sets the total number of items.

  - `returned_items` (integer,null)
    Gets or sets the number of returned items.

  - `offset` (integer,null)
    Gets or sets the offset of the items.

  - `next` (object)
    Represents a link to a resource.

  - `previous` (object)
    Represents a link to a resource.


## Response 400 fields

## Response 401 fields
