Content
Retrieves content from the dotCMS repository
Abstracts the generation of the required Lucene query to look for user searchable fields in a Content Type, and returns the expected results. Payload info:
| Property | Type | Description |
|---|---|---|
| globalSearch | String | Global search term (like the main search box) |
| searchableFieldsByContentType | Object | Content-type specific field searches. Value object consists of content type variables as keys, and objects as values, the latter consisting of the system variables of fields as keys, and query strings as values. See table below for how to interact with different field types, and the example request for how to structure the payload. |
| systemSearchableFields | Object | System-level filters: siteid, languageId, folderId, workflowSchemeId, workflowStepId, and variantName (defaults to "DEFAULT"). systemHostContent determines whether to include content from the SYSTEM_HOST (defaults to "true"). |
| archivedContent | Boolean String | Include archived content ("true"/"false") |
| unpublishedContent | Boolean String | Include unpublished content ("true"/"false") |
| lockedContent | Boolean String | Include locked content ("true"/"false") |
| orderBy | String | Sort criteria (defaults to "score,modDate desc") |
| page | Integer | Page number for pagination |
| perPage | Integer | Results per page |
When using searchableFieldsByContentType, different fields may require different string types:
| Field Type | Description |
|---|---|
| title, textArea, wysiwyg | Text search |
| category | Comma-separated category IDs |
| checkbox, multiSelect | Comma-separated values (not labels) |
| radio, select | Values (not labels) |
| date, dateAndTime | Date or range: "2023-01-01 TO 2023-12-31" |
| time | Time or range with TO |
| tag | Comma-separated tag names |
| relationships | Child contentlet ID |
| json, keyValue | Matches any string in JSON |
| binary, blockEditor, custom | Text search |
post/api/v1/content/search
Request body
Response
The query has been executed. It's possible that no contents matched the search criteria.
Changes
No recorded changes to this endpoint across all 1 revision of this API.