v1

latestOpenAPI 3.1.02026-07-24440202.2 KB

Search API

Find the assets you need

post/v4.0/search

Request body

querystring

Criteria and search terms that describe the attributes assets must have to be returned, in the format <code>criterion:search_term</code>. To include multiple criteria, separate each search term with the query operators <code>NOT</code>, <code>AND</code>, and <code>OR</code>. Use parentheses to perform advanced searches by applying one criterion to multiple other search terms. </br></br> For example, let’s say you want to find assets that: <ul> <li>Are tagged with the term <strong>Flower</strong> or <strong>Flowers</strong>.</li> <li>Are tagged with the term <strong>Autumn</strong>.</li> <li>Have the word “<strong>sunlit</strong>” in their description field.</li> <li>Do not include the word “<strong>cold</strong>” in their description field.</li> <li>Are <strong>images</strong> or <strong>videos</strong>.</li> </ul> You’d use the following query parameter: </br> <code>keyword:(Flower OR Flowers) Autumn AND (CoreField.Description:sunlit NOT cold) AND (DocType:Image OR Video)</code> </br> </br><strong>Notes</strong>: <ul> <li>You can use a space (<code> </code>) instead of <code>AND</code>.</li> <li>For query construction details and a list of standard Orange Logic criteria, go to <a href="https://developer.orangelogic.com/reference/query-options#query-construction">query construction</a>. </li> <li>To find the specific criteria available for your organization’s Orange Logic environment, use the <a href="https://developer.orangelogic.com/reference/list-criteria">List Criteria</a> API call. </li> <li>You can only include one query parameter in your call. Use operators to include multiple criteria or search terms.</li> </ul>

semanticquerystring

The search words or phrase. This option uses Orange Logic’s AI search feature to perform the search. Orange Logic users with Link accounts can go to the <a href="https://link.orangelogic.com/CMS4/Permalinks/2P7YOH9QCKY5">AI search</a> article to learn more. <br/> When you use the <code>semanticquery</code> and <code>query</code> parameters at the same time, Orange Logic prioritizes search terms in this order: <ol> <li>The <code>text</code> and <code>title</code> criteria in the <code>query</code> parameter (if applicable).</li> <li>The text in the <code>semanticquery</code> parameter.</li> <li>Other criteria in the <code>query</code> parameter (if applicable).</li> </ol> <strong>Notes</strong>: <ul> <li>When you use this parameter, only 100 results are returned.</li> <li>This parameter is available for beginning in <a href="https://developer.orangelogic.com/reference/about#orange-logic-api-versioning">Orange Logic Ottawa</a>. It is deactivated by default. To learn how to activate it, go to the <a href="https://link.orangelogic.com/CMS4/Permalinks/2P7YOH9QCKY5">AI search</a> article. </li> </ul>

sortstring

The algorithm that determines the order in which search results are returned. You can choose from these options: <ul> <li><strong><code>relevancy</code></strong>: Assets are sorted from most relevant to least relevant based on Orange Logic’s relevancy algorithm. This algorithm is based on a number of factors, such as tags in the context of the total number of tags applied to the asset, the title and description of the asset, keywords of the parent folder(s), tags extrapolated from the tag tree, and more. Each of these elements has different weightings applied to them.</li> <li><strong><code>newest first</code></strong>: Assets are sorted from newest to oldest, based on their Create Date.</li> <li><strong><code>oldest first</code></strong>: Assets are sorted from oldest to newest, based on their Create Date.</li> <li><strong><code>editor choice</code></strong>: Assets are sorted from highest rating to lowest rating, based on the Editor Choice field.</li> <li><strong><code>file name</code></strong>: Assets are sorted from A to Z, based on their filename.</li> <li><strong><code>file name DESC</code></strong>: Assets are sorted from Z to A, based on their filename.</li> <li><strong><code>file size</code></strong>: Assets are sorted from smallest to largest, based on their size.</li> <li><strong><code>file size DESC</code></strong>: Assets are sorted from largest to smallest, based on their size.</li> <li><strong><code>last changed</code></strong>: Assets are sorted from newest to oldest, based on their Date Last Edited.</li> <li><strong><code>last changed ASC</code></strong>: Assets are sorted from oldest to newest, based on their Date Last Edited.</li> <li><strong><code>indexed date DESC</code></strong>: Assets are sorted from newest to oldest, based on the date they were most recently indexed.</li> <li><strong><code>indexed date</code></strong>: Assets are sorted from oldest to newest, based on the date they were most recently indexed.</li> <li><strong><code>start date DESC</code></strong>: Assets are sorted from newest to oldest, based on the asset’s start date. </li> <li><strong><code>start date</code></strong>: Assets are sorted from oldest to newest, based on the asset’s start date.</li> <li><strong><code>manual order</code></strong>: Assets are displayed based on how you reordered them in the container. </li> <li><strong><code>most popular</code></strong>: Assets are sorted from most downloaded to least downloaded. </li> </ul> <strong>Notes</strong>: <ul> <li>When you use the <code>sematicquery</code> parameter, the returned values are ordered by the AI search’s relevancy score. If multiple assets have the same relevancy score, they are sorted based on the sort option selected here.</li> <li>Your organization might use legacy values for the <OrderBy> tag. Those values continue to work, but only currently supported values are listed here.</li> </ul>

fieldsstring

The fields to retrieve from each asset, separated by commas. </br> For example, let’s say you want to return an asset’s system identifier, title, and description. You’d use the following code as your field parameter: <code>SystemIdentifier, Title, CaptionLong</code>. </br> <strong>Notes</strong>: <ul> <li>The maximum length for a field value in the Search API is 2048 characters. If your fields have longer values, enter them into the body of the request.</li> <li>To learn about asset paths in Orange Logic environments, go <a href="https://developer.orangelogic.com/reference/fields-parameter#standard-fields">here</a>.</li> <li>To find the specific fields available for your organization’s Orange Logic environment, use the <a href="https://developer.orangelogic.com/reference/list-fields">List Fields</a> API call. </li> </ul>

countperpageinteger

Number of results returned per page.

pagenumberinteger

The page of results you want to retrieve, based on <code>countperpage</code>. </br> For example, to retrieve page 2 of the search results, you’d enter 2. If <code>countperpage</code> is 100, your search would return result number 100 through result number 199.

verboseboolean

Whether to return your query’s response details. </br> When <code>true</code>, the response includes detailed information on how your query was parsed. You can use this parameter to help you troubleshoot your query if you run a search and the results don’t match your expectations.

impersonateanotheruserstring

The email address that matches the Orange Logic account of the user to impersonate. This search returns the results the impersonated user would see if they ran the search. </br></br> However, when you impersonate another user, you can only view assets you have the Security Functions and Permissions to access. Therefore, if the user you’re impersonating has access to results that you do not have access to, those results are not returned.

generateformatifnotexistsboolean

<code>True</code>: If an asset appears in your search and you’ve requested the path to a format of that asset that hasn’t been generated yet, Orange Logic generates and returns that format. Orange Logic does this for formats generated on demand, such as TRX, CSM1, CMS2, CMS3. <br/> <code>False</code>: If an asset appears in your search and you’ve requested the path to a format of that asset that hasn’t been generated yet, the format is not generated. <br/> For more information, go to the <a href="https://developer.orangelogic.com/reference/fields-parameter#generate-formats-on-demand">Generate formats on demand</a> article.

getpermanentassetspathsboolean

<code>True</code>: <code>Path</code> requests are returned as permanent asset link URLs. <br/> <code>False</code>: Any <code>Path</code> requests in the <code>fields</code> parameter are returned as expirable URLs to the requested asset proxies. Learn more about the field parameter and <a href="https://developer.orangelogic.com/reference/fields-parameter#asset-formats-generated-on-upload" target="_blank">asset formats generated on upload</a> <br> Both types of links are public and distributed through a <a href="https://en.wikipedia.org/wiki/Content_delivery_network" target="_blank">CDN</a>.

disableURIencodingboolean

<code>True</code>: Returned URIs are <a href="https://developer.orangelogic.com/reference/encoding-special-characters">unencoded</a>. <strong>Note</strong>: If the response format is XML (rather than JSON), unencoded URIs are returned within a CData section. <br> <code>False</code>: Returned URIs are encoded. Use this option to create URIs that are rendered correctly in a web browser.

includebinnedboolean

<code>True</code>: Assets that have been soft-deleted are included in the search results. <br/> <code>False</code>: Assets that have been soft-deleted are not included in the search results. <br/> <strong>Note</strong>: Only users with the <a href="https://developer.orangelogic.com/reference/search#search-for-deleted-assets"><strong>Search for Deleted Assets</strong></a> Security Function can retrieve soft-deleted assets.

includestorageinfoboolean

<code>True</code>: Storage information is returned for existing asset formats specified in the fields parameter. <br/> <code>False</code>: Storage information is not returned. <br/> <strong>Notes</strong>: <ul> <li>Only users with the <a href="https://developer.orangelogic.com/reference/search#can-expose-bucket-search-api"><strong>Can Expose Bucket Search API</strong></a> Security Function can retrieve storage information.</li> <li>Go to <a href= "https://developer.orangelogic.com/reference/fields-parameter#asset-formats">Asset Formats</a> in the Fields parameter article to learn how to return asset formats.</li> </ul>

includeassetswithvirtualpathsboolean

When you include a virtual folder in the <code>path</code> criterion: <br/> <code>True</code>: Returns information about all assets within the folder structure, including assets referenced by virtual folders. <br/> <code>False</code>: Returns information about assets whose primary parent is within the folder structure. <br/> <strong>Notes</strong>: <ul> <li> This parameter is available beginning in Orange Logic Milan. In earlier releases, the Search API does not return information about asset references in virtual folders.

format'XML' | 'JSON'

Response format; can be XML or JSON.

dateformatstring

The <a href="https://developer.orangelogic.com/reference/specify-the-returned-date-format">returned date format</a>.

Response

200

Example response

{
  "APIRequestInfo": {
    "ProviderVersion": "LONDON.R2.2131E.216729",
    "ProviderIdentity": "OLU-T-USW2-APP",
    "ProviderID": "44ddde3ac27a33c39d4007d4",
    "Module": "Search",
    "APIVersion": "v4.0",
    "Resource": "Search",
    "IsLoggedIn": true,
    "Status": "LoggedIn",
    "UserLogin": "ZZ1C2217",
    "Session": "No session (production configuration)",
    "TimeoutPeriodMinutes": 120
  },
  "APIResponse": {
    "GlobalInfo": {
      "TotalCount": 1,
      "QueryDurationMilliseconds": 104,
      "Sort": "Relevancy"
    },
    "Items": [
      {
        "path_TR1": {
          "URI": "https://mangovations.com/Assets/V2/k09m@tB7notE65jMA8JeC2@LqCEAydcP1_rrpz3iF_ycRPYmqMgYEcXPECkqS6E6vbs2J8nQstFP4y0p9RbPa4phT6ja397ym7@Xy1ypXwlVS0f7qcodRIUzLxXYzswl/fK_aIBtRIxLGAP_3/9kwp3C2TkN3uDSEJ/ZZ13UJ5.jpg",
          "Width": 1200,
          "Height": 800
        },
        "SystemIdentifier": "ZZ13UJ5"
      }
    ]
  }
}