November Happy Hour will be moved to Thursday December 5th.

No results in Content Search API

Vote:
 

Hello, I have a problem with usage of the Content Search API --

I have installed Content Search API by following instruction at the Episerver World. However, the API yields no results:

{"totalMatching": 0,"results": null}

The configuration of Episerver Find seems to be proper, i.e.:

  • There are Document Types listed in Overview on the Find page.
  • There are results if I'm using Episerver.Find.Client: Client.CreateFromConfig().Search<FindDocument>().GetResult(); // yields proper results.

Now, I tried to use the API in following ways. All yields no results and there's no error in the logs.

Method 1: By using Swagger UI.

Method 2: By using Visual Studio Code Rest API Client.:

### Search
GET {{baseUrl}}/{{v2}}/search/content
?languages=sv
&query=*
Accept: 'application/json'
Accept-Language: *
Authorization: Bearer {{accessToken}}

Method 3: By using the code directly:

var searchResponse = _contentApiSearchProvider.Search(new SearchRequest { Query = "*", }, new List<string> {"sv"});
var contentApiModels = searchResponse.Results?.ToList(); // is null

Using following package versions:

<package id="EPiServer.CMS" version="11.15.0" targetFramework="net48" />
<package id="EPiServer.ContentDeliveryApi.Cms" version="2.10.0" targetFramework="net48" />
<package id="EPiServer.ContentDeliveryApi.Commerce" version="2.10.0" targetFramework="net48" />
<package id="EPiServer.ContentDeliveryApi.Core" version="2.10.0" targetFramework="net48" />
<package id="EPiServer.ContentDeliveryApi.Search" version="2.10.0" targetFramework="net48" />
<package id="EPiServer.ContentDeliveryApi.Search.Commerce" version="2.10.0" targetFramework="net48" />
<package id="EPiServer.Find" version="13.2.6" targetFramework="net48" />
<package id="EPiServer.Find.Cms" version="13.2.6" targetFramework="net48" />
<package id="EPiServer.Find.Commerce" version="11.1.2" targetFramework="net48" />
<package id="EPiServer.Find.Framework" version="13.2.6" targetFramework="net48" />

I tried different variations of the query and request configuration, but none of these solutions yields proper results.

Do you know what might be the cause of that?

#223194
Edited, May 21, 2020 10:21
Vote:
 

So it seems like the following package is missing. 

EPiServer.ContentDeliveryApi.OAuth

#223493
May 28, 2020 13:35
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.