public DocumentSearchResponse SearchDocuments(string xAuthToken, SearchDocumentsRequestData requestData) { _httpHelper.AddHeader("X-Auth-Token", xAuthToken); return(_httpHelper.Post <SearchDocumentsRequestData, DocumentSearchResponse>( $"api/v2/customers/{requestData.CustomerId}/libraries/{requestData.LibraryName}/documents/search", requestData)); }
public ActionResult SearchDocument([FromHeader] string xAuthToken, [FromBody] SearchDocumentsRequestData requestData) { try { var documents = _documentsService.SearchDocuments(xAuthToken, requestData); if (documents == null) { return(NoContent()); } return(Ok(documents.Data)); } catch (Exception exc) { return(StatusCode(StatusCodes.Status500InternalServerError)); } }