Solved

Has anyone used the "REST API - Filters for Search or List APIs" successfully?

  • 17 March 2021
  • 5 replies
  • 242 views

Userlevel 5
Badge +10

Hi,

I am running FR11.22.12 and when I run REST queries against the ‘performSearch’ REST collection (as per Filter Based on Custom Properties (commvault.com)) I immediately get the following error

{

    "currCIEngineType": 3,

    "rawQuery": "",

    "errList": [

        {

            "errLogMessage": "Search preparation failed.",

            "errorCode": 3008

        }

    ],

    "proccessingInfo": {

        "totalSize": 0,

        "totalHits": 0

    }

}

The Commvault Logs return HTTP code 200 and and there are no errors appearing in WebServer log at Debug 10.  However, when I dug deeper, I can see that Commvault calls upon to IIS read for these non-existent files then it soon the REST POST command fails.

C:\Program Files\Commvault\ContentStore\WebServerCore\performSearch

C:\Program Files\Commvault\ContentStore\WebServerCore\performSearch\web.config

C:\Program Files\Commvault\ContentStore\CVSearchService\CVWebService.svc\performSearch

C:\Program Files\Commvault\ContentStore\CVSearchService\CVWebService.svc\performSearch\web.config

 

Anyone else have the same problem or found a way round it?

icon

Best answer by Sreekanth G 19 March 2021, 19:10

View original

5 replies

Badge


Hi..


Can you please try following as a temporary work-around and raise a support ticket to get permanent fix:

On your web server, open following file using notepad (run as administrator)

<Install Folder>\Base\CVWebServerCoreRouting.conf


Add below entry into the configuration file at the end:

POST    ^/performSearch$ 


Open IIS Manager. Expand node which has name of the computer.

Click on Application Pools

Right Click on ConsolesAppPool and use option Recycle.

Give it a minute and resubmit your REST API request. 

 

Please note CVWebServerCoreRouting.conf file may get updated by commvault updates and entry may be lost. That is why we need a ticket to Commvault support so we get you the permanent fix. 

 

Userlevel 5
Badge +10


Hi..


Can you please try following as a temporary work-around and raise a support ticket to get permanent fix:

On your web server, open following file using notepad (run as administrator)

<Install Folder>\Base\CVWebServerCoreRouting.conf


Add below entry into the configuration file at the end:

POST    ^/performSearch$ 


Open IIS Manager. Expand node which has name of the computer.

Click on Application Pools

Right Click on ConsolesAppPool and use option Recycle.

Give it a minute and resubmit your REST API request. 

 

Please note CVWebServerCoreRouting.conf file may get updated by commvault updates and entry may be lost. That is why we need a ticket to Commvault support so we get you the permanent fix. 

 


Thanks Sreekanth. That did it.

Userlevel 7
Badge +23

@Anthony.Hodges , following up on this thread.  Were you able to implement @Sreekanth G ‘s suggestions?

Badge +1

Hi,

@Anthony.Hodges, it seems you are missing some parameters from your request payload. Can you please publish the request payload that you are trying to search? Also, let me know what is your datasource? For error, check dm2web.log on webserver machine.

Userlevel 5
Badge +10

Hi,

@Anthony.Hodges, it seems you are missing some parameters from your request payload. Can you please publish the request payload that you are trying to search? Also, let me know what is your datasource? For error, check dm2web.log on webserver machine.

I don’t believe I had made any mistake here.

POST Headers.

Accept = {{Accept}}

Authtoken = {{TOKEN}}

Content-Type = application/xml

POST Body.

DM2ContentIndexing_CVSearchReq mode="Compliance">

    <advSearchGrp>

        <emailFilter interGroupOP="0" interGroupOPStr="OR">

            <filter interFilterOP="1" interFilterOPStr="OR">

                <shareFolder>

                    <flags include="0" deleted="0" exclude="0" disabled="0" includeAll="0" />

                </shareFolder>

                <filters field="EMAIL_TO" intraFieldOpStr="OR">

                    <fieldValues>

                        <values val="person@company.com" />

                    </fieldValues>

                </filters>

            </filter>

        </emailFilter>

        <commonFilter>

            <filter>

                <filters  field="DATA_TYPE">

                    <fieldValues>

                        <values val="2" />

                    </fieldValues>

                </filters>

            </filter>

        </commonFilter>

        <cvSearchKeyword keyword="*" />

        <cvSearchCondition />

    </advSearchGrp>

    <searchProcessingInfo resultOffset="0" pageSize="1">

               <queryParams param="RESPONSE_FIELD_LIST" value="CONTENTID,SIZEINKB,CUSTODIAN,CVOWNER,MODIFIEDTIME,CISTATE,CI_STATUS,DATA_TYPE,FOLDER,EMAIL_SUBJECT,EMAIL_TO,TO_DISPLAY,EMAIL_SMTPTO,EMAIL_CC,CC_DISPLAY,EMAIL_SMTPCC,EMAIL_BCC,BCC_DISPLAY,EMAIL_SMTPBCC,EMAIL_FROM,FROM_DISPLAY,EMAIL_SMTPFROM,EMAIL_MSGFLAGS,EMAIL_CATEGORY,EMAIL_IMPORTANCE,EMAIL_PRIORITY,EMAIL_SENSITIVITY,HAS_ATTACHMENT,HAS_ANY_ATTACHMENT,EMAIL_ATTACHMENTS,EMAIL_CONVINDEX,EMAIL_CONVTOPIC,EMAIL_ATTACHMENTNAME"/>

    </searchProcessingInfo>

</DM2ContentIndexing_CVSearchReq>

 

Reply