The content entity search endpoint allows you to search any content in Content Gate.
Based on the permissions of the user executing the search query, the results might be filtered.
You can disable checking the external business entities under General Settings -> Security -> Check access to external entities. This can improve the search performance quite a lot, however this will disable the access check for all users and for all operations (e.g. also for downloads).
The endpoint is located at [content-gate-url]/api/contententities/search and requires an http POST request with a search query expressed in JSON in it's body.
The search query consists of a number of filters to filter content entities by and optionally some pagination parameters.
To filter by content entity templates include an array called "templates" in your search query containing the content entity template id's to include. Only content entities linked to any of these templates will be returned.
To filter by storage provider include an array called "storageProviders" in your search query containing the storage provider id's to include. Only content entities stored in any of these providers will be returned.
To filter by business entity include an array called "businessEntities" in your search query containing the business entity id's to include. Only content entities related to any of these business entities will be returned.
To filter by business entity type include an array called "businessEntityTypes" in your search query containing the business entity type id's to include. Only content entities linked to any business entity with any of these types will be returned.
To filter by content entity properties include an array called "properties" in your search query containing the property expressions to filter on. Only content entities matching these property expressions will be returned. A property expression contains:
To paginate the result an object called "paging" can be included in your search query. This object can contain the following properties:
This example represents a search query to return all content entities with a category with id 5 (e.g. 'Contracts') and related to a business entity type with id 5 (e.g. 'Customers'). It uses the default pagination and will return the first page with a maximum of 500 items.
http POST https://customer.content-gate.com/api/contententities/search
https://customer.content-gate.com/api/contententities/search
{ "businessEntityTypes": [5], "properties": [ { "property": "category", "operator": "Equals", "value": 1 } ] }
This example represents a search query with a lot of filters. Only content entities which match all the filters are returned.
{ "templates": [10, 11], // only include content entities related to these content entity templates "storageProviders": [4], // only include content entities stored in the storage provider with id 4 "businessEntities": [9001, 9002, 9003, 9004, 9005], // only include content entities from business entities with these ids "businessEntityTypes": [1, 2, 3], // only include content entities related to a business entity of this type "properties": [ // only include content entities where the title starts with 'Project initiation' { "property": "title", "operator": "StartsWith", "value": "Project initiation" }, // only include content entities where the category id does not equal 5, 6 or 7 { "property": -1, // internal id of the category property "operator": "In", "value": [5, 6, 7], "negate": true }, // only include content entities where the content property with api name due_date is set to a value greater than or equal to december 31st 2024 { "property": "due_date", "operator": "GreaterThanOrEqual", "value": "2024-12-31" } ], // chunk the results in pages of 100 items and return me the 12th page. sort the results by content entity id. "paging": { "page": 12, "pageSize": 100, "sortBy": "Id", "sortOrder": "descending" } }