POST api/SearchFilter/SaveFilter

return id of saved/updated filter

Request Information

URI Parameters

None.

Body Parameters

FilterSave
NameDescriptionTypeAdditional information
Id

integer

None.

Name

string

None.

UserId

string

None.

FilterLines

Collection of FilterLine

None.

Request Formats

application/json, text/json

Sample:
{
  "Id": 1,
  "Name": "sample string 2",
  "UserId": "sample string 3",
  "FilterLines": [
    {
      "Concat": 0,
      "FilterFieldId": 1,
      "Operand": 0,
      "LowerBound": 2.1,
      "UpperBound": 3.1,
      "DelimitedString": "sample string 4",
      "DelimitedItems": [
        "sample string 1",
        "sample string 2"
      ],
      "GroupItems": [
        "sample string 1",
        "sample string 2"
      ],
      "RowId": 5
    },
    {
      "Concat": 0,
      "FilterFieldId": 1,
      "Operand": 0,
      "LowerBound": 2.1,
      "UpperBound": 3.1,
      "DelimitedString": "sample string 4",
      "DelimitedItems": [
        "sample string 1",
        "sample string 2"
      ],
      "GroupItems": [
        "sample string 1",
        "sample string 2"
      ],
      "RowId": 5
    }
  ]
}

application/xml, text/xml

Sample:
<FilterSave xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebSearch.Models">
  <FilterLines xmlns:d2p1="http://schemas.datacontract.org/2004/07/">
    <d2p1:FilterLine>
      <d2p1:Concat>And</d2p1:Concat>
      <d2p1:DelimitedItems xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>sample string 1</d4p1:string>
        <d4p1:string>sample string 2</d4p1:string>
      </d2p1:DelimitedItems>
      <d2p1:DelimitedString>sample string 4</d2p1:DelimitedString>
      <d2p1:FilterFieldId>1</d2p1:FilterFieldId>
      <d2p1:GroupItems xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>sample string 1</d4p1:string>
        <d4p1:string>sample string 2</d4p1:string>
      </d2p1:GroupItems>
      <d2p1:LowerBound>2.1</d2p1:LowerBound>
      <d2p1:Operand>Equal</d2p1:Operand>
      <d2p1:RowId>5</d2p1:RowId>
      <d2p1:UpperBound>3.1</d2p1:UpperBound>
    </d2p1:FilterLine>
    <d2p1:FilterLine>
      <d2p1:Concat>And</d2p1:Concat>
      <d2p1:DelimitedItems xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>sample string 1</d4p1:string>
        <d4p1:string>sample string 2</d4p1:string>
      </d2p1:DelimitedItems>
      <d2p1:DelimitedString>sample string 4</d2p1:DelimitedString>
      <d2p1:FilterFieldId>1</d2p1:FilterFieldId>
      <d2p1:GroupItems xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>sample string 1</d4p1:string>
        <d4p1:string>sample string 2</d4p1:string>
      </d2p1:GroupItems>
      <d2p1:LowerBound>2.1</d2p1:LowerBound>
      <d2p1:Operand>Equal</d2p1:Operand>
      <d2p1:RowId>5</d2p1:RowId>
      <d2p1:UpperBound>3.1</d2p1:UpperBound>
    </d2p1:FilterLine>
  </FilterLines>
  <Id>1</Id>
  <Name>sample string 2</Name>
  <UserId>sample string 3</UserId>
</FilterSave>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'FilterSave'.

Response Information

Resource Description

integer

Response Formats

application/json, text/json

Sample:
1

application/xml, text/xml

Sample:
<int xmlns="http://schemas.microsoft.com/2003/10/Serialization/">1</int>