I need to filter data from a search, but when passing a string to the refinementfilter an error occurs.
Microsoft.SharePoint.Client.InvalidClientQueryException
When I pass the parameters without the space character, for example, the query returns the results normally. However, when I pass the parameter with the space character the error occurs
My request:
$.ajax({
type: "GET",
dataType:"JSON",
url: url + "/_api/search/query?querytext='teste'&startrow=0&rowlimit=100&selectproperties='Url,Title,Filename,AreaAtuacao,tipoConteudo,Created,ContentType'&sourceid='e1327b9c-2b8c-4b23-99c9-3730cb29c3f7'&refinementfilters='and(SPContentType:equals('Publicação'),AreaAtuacao:('Institucional'),TipoConteudo:('Artigos'))'",
headers: {
Accept: "application/json;odata=verbose",
"X-RequestDigest": $('#__REQUESTDIGEST').val()
},
success: function (dados) {
console.log(dados);
},
});