# (NEW!) Search Assets There are two types of searches available: - Simple Keyword Search: Requesting user can get list of Assets against search terms/keywords list. For example ["keyword1", "keyword2"] - Facet Search: Requesting user can get list of Assets against Facet value list. For example ["Facet: facet_value"] Specifying a value in the 'keywordSearchField' attribute in the request allows you to target keyword searches against Filename, Asset ID, Metadata, or Content (extracted text from documents. By default, if not specified in the request, the search operation type will be set to 'AND' for search terms and/or facets. If the 'relevancy' field is passed as true, this will negate the operation selection used in legacy search and will leverage the relevancy search matching. When relevancy is set to true, the 'metadataDefinitionSearchField' field within the sortBy object should be set to 'relevance', and the 'order' field should be set to 'desc'. By default, up to 50 Assets will return from the search. Should you want to limit the amount of assets returned in each response, the value for 'limit' can be set to a number up to 50. You can also set search offset by setting the 'from' property. For example, for the first page, set 'from' to 0. After that set 'from' to 50, 100, 150, etc. This endpoint will only return a handful of metadata fields by default. To include more metadata fields in the response, those fields should be included in the 'includes' array. System metadata fields, such as Metadata Template ID, should be entered using camel case (ie, metadataTemplateId). Custom metadata fields should be entered by their attribute search term, prefixed by metadataDocument. For example, to retrieve an attribute called Published Channel, a user would include "metadataDocument.published_channel" in the includes array. Fields included in this array will be returned in an object called 'metadataDocument' if those attributes exist on the asset. Average Response Time: 691ms Endpoint: POST /search Version: 1.5 Security: ApiKeyAuth, BasicAuth ## Header parameters: - `X-API-Key` (string, required) Customer-specific API key required to invoke API. - `Authorization` (string, required) Provided by Authentication Token creation operation - `Content-Type` (string, required) Enum: "application/json" ## Request fields (application/json): - `searchTerm` (array) Comma separated array of search term values. Example: ["Gilfoyle","Dinesh","Erlich"] - `from` (integer) Search offset from which index search will start - `limit` (integer) Limits the number of results that are returned. Example: 50 - `includes` (array) System metadata fields, such as Metadata Template ID, should be entered using camel case (ie, metadataTemplateId). Custom metadata fields should be entered by their attribute search term, prefixed by metadataDocument. For example, to retrieve an attribute called Published Channel, a user would include "metadataDocument.published_channel" in the includes array. Fields included in this array will be returned in an object called 'metadataDocument' if those attributes exist on the asset. Example: ["metadataTemplateId","metadataDocument.asset_description","metadataDocument.file_size","metadataDocument.compression_type"] - `includeDeleted` (boolean) Flag to denote whether or not to include Deleted assets in the result - `includeVersions` (boolean) Flag to denote whether or not to include prior versions of the asset in the result - `sortBy` (array) - `sortBy.metadataDefinitionSearchField` (string) Sort the result set according to specified attributes by metadata search field name Example: "lastUpdatedEpoch" - `sortBy.order` (string) Sort Order Enum: "asc", "desc" - `operation` (string) Operation between search terms Enum: "AND", "OR" - `aggregations` (boolean) Boolean field to indicate whether or not to return filter menu aggregation counts for the search term. Set to false to significant improve speed and reduce payload size. - `keywordSearchField` (string) Specified Search Target. Valid values are - filename, assetId, metadata, content Enum: "filename", "assetId", "metadata", "content" - `relevancy` (boolean) If the 'relevancy' field is passed as true, this will negate the operation selection used in legacy search and will leverage the relevancy search matching. When relevancy is set to true, the 'metadataDefinitionSearchField' field within the sortBy object should be set to 'relevance', and the 'order' field should be set to 'desc'. Example: true ## Response 200 fields (application/json): - `total` (integer) Provides the total number of search results based on the search criteria provided. Example: 1 - `results` (object) List of asset objects - `results.createdEpoch` (integer) Date the asset was created in epoch format. Creation time in milliseconds. Example: 1727724108027 - `results.metadataDocument` (object) Metadata on the asset based on the includes array items that was requested with the search request. Dynamic metadata properties based on the request. - `results.fileId` (string) Asset File ID that uniquely identifies the content associated to this asset. Example: "445c273a-235f-4d3b-8397-567f02f312e0" - `results.filename` (string) Example: "gilfoyle_anton.png" - `results.originalFileId` (string) The ID of the original version of the file Example: "2d69d72f-91be-4aeb-9d62-4fbd3759e451" - `results.createdBy` (string) Example: "d6197e75-74e2-4a81-9c39-429148ab27a1" - `results.objectId` (string) Asset Object ID. Also referred to as Asset ID. Example: "c5e24f53-cb77-4882-927c-0e8dddf5f7c9" - `results.customerId` (string) Customer ID of Created By User's Account Example: 1588091945182 - `results.metadataTemplateId` (string) ID of the metadata template the asset is assigned to Example: "f5a66fac-7e81-44c1-b6eb-20997c559982" - `results.renditionsDocument` (object) - `results.renditionsDocument.width` (integer) Example: 1920 - `results.renditionsDocument.height` (integer) Example: 1080 - `results.renditionsDocument.imageThumb` (string) Rendition of the original content with a max size of 200x200 Example: "https://env.content.tenovos.io/1588091945181/445c273a-235f-4d3b-8397-567f02f312e0/35c8cc9b-0aab-43aa-b220-7829f821836a-200x200.png" - `results.renditionsDocument.imagePreview` (string) Rendition of the original content with a max size of 700x700 Example: "https://env.content.tenovos.io/1588091945181/445c273a-235f-4d3b-8397-567f02f312e0/35c8cc9b-0aab-43aa-b220-7829f821836a-700x700.png" - `results.renditionsDocument.imagePreviewLarge` (string) Rendition of the original content with a max size of 1000x1000 Example: "https://env.content.tenovos.io/1588091945181/445c273a-235f-4d3b-8397-567f02f312e0/35c8cc9b-0aab-43aa-b220-7829f821836a-1000x1000.png" - `results.renditionsDocument.mezzaninePreview` (string) Rendition of the original content with a max size of 3000x3000 Example: "https://env.content.tenovos.io/1588091945181/445c273a-235f-4d3b-8397-567f02f312e0/gilfoyle_anton-3000x3000.png" - `results.renditionsDocument.imagePreviewExtraLarge` (string) For Tenovos customers with the Creative Editor feature, Tenovos generates an XL preview with max size of 5000x5000. Example: "https://env.content.tenovos.io/1588091945181/445c273a-235f-4d3b-8397-567f02f312e0/35c8cc9b-0aab-43aa-b220-7829f821836a-5000x5000.png" - `results.securityTemplateIds` (array) List of ID(s) of Security Template(s) that are applied to the asset Example: ["2d331840-50a0-4dc1-bc65-56151bf58a39"] - `facets` (string) string containing JSON of filter facets Example: "{\"Company\":{\"buckets\":[{\"key\":\"Pied Piper\",\"doc_count\":47},{\"key\":\"Hooli\",\"doc_count\":4}]}" ## Response 400 fields (application/json): - `status` (string) Example: "success" - `message` (string) Example: "Detailed Message" ## Response 401 fields (application/json): - `message` (string) - `detail` (string) ## Response 403 fields (application/json): - `status` (string) Example: "success" - `message` (string) Example: "Detailed Message"