Cdn API - CPG Source

<back to all web services

TypeSenseNewsSearchRequest

BaseTypeSenseSearchRequest Parameters:
NameParameterData TypeRequiredDescription
KeywordsformstringNo
PageformintNo
PerPageformintNo
FacetByformstringNo
FilterByformstringNo
TypeSenseSearchResponse<T> Parameters:
NameParameterData TypeRequiredDescription
facet_countsformList<FacetCount>No
foundformintNo
hitsformList<TypeSenseHit<'T>>No
out_offormintNo
pageformintNo
request_paramsformTypeSenseRequestParamsNo
search_cutoffformboolNo
search_time_msformintNo
BaseResponse Parameters:
NameParameterData TypeRequiredDescription
TotalformintNo
OpCodeformintNo
ErrorTextformstringNo
RequestTimeformstringNo
ResponseTimeformstringNo
TotalExecutionTimeformstringNo
CachedResponseformboolNo
FacetCount Parameters:
NameParameterData TypeRequiredDescription
countsformList<TypeSenseCount>No
field_nameformstringNo
statsformTypeSenseStatNo
TypeSenseCount Parameters:
NameParameterData TypeRequiredDescription
countformintNo
highlightedformstringNo
valueformstringNo
TypeSenseStat Parameters:
NameParameterData TypeRequiredDescription
total_valuesformintNo
avgformdouble?No
maxformdouble?No
minformdouble?No
sumformdouble?No
TypeSenseRequestParams Parameters:
NameParameterData TypeRequiredDescription
collection_nameformstringNo
per_pageformintNo
qformstringNo

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /json/reply/TypeSenseNewsSearchRequest HTTP/1.1 
Host: cdnapidev.greysheet.com 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"Keywords":"String","Page":0,"PerPage":0,"FacetBy":"String","FilterBy":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"facet_counts":[{"counts":[{"count":0,"highlighted":"String","value":"String"}],"field_name":"String","stats":{"total_values":0,"avg":0,"max":0,"min":0,"sum":0}}],"found":0,"hits":[{"document":{"Id":0,"PostSummary":"String","PostTitle":"String","Categories":["String"],"Author":"String","SortOrder":0,"ImageCaption":"String","ImageUrl":"String","Permalink":"String","PostContent":"String","PostDate":"\/Date(-62135596800000-0000)\/"}}],"out_of":0,"page":0,"request_params":{"collection_name":"String","per_page":0,"q":"String"},"search_cutoff":false,"search_time_ms":0,"Total":0,"OpCode":0,"ErrorText":"String","RequestTime":"String","ResponseTime":"String","TotalExecutionTime":"String","CachedResponse":false}