I'm trying to filter my results from a Rest Call.

```
$.ajax({
    type: "GET",
    headers: {
        "Accept": "application/json;odata=verbose"
    },
    dataType: "JSON",
    url: _spPageContextInfo.webServerRelativeUrl + "/_api/lists/getByTitle('Contacts')/items?$select=Title,Id&$startswith('Title','" + request.term + "') eq true",
    success: function (data) {
    },
    error: function (ex) {
    }
});

```

In my Contacts List i'm trying to retrieve the Title and the Id for Items which start with a String or which have the String somewhere in it, here for example it is the Name of somebody.

I also tried it with substringof:

```
"/_api/lists/getByTitle('Contacts')/items?$select=Title,Id&$substringof(" + request.term + ",'Title') eq true"

```

which delivers also the same result. 

It gives me all List Items from the List and no Filtering is applied.
I build the Url for the Rest after looking here [Programming using the SharePoint 2013 REST service](http://msdn.microsoft.com/en-us/library/fp142385.aspx#bk_determining)
Like the Schema given there I think the Url looks ok, but it not seems so :)

**Edit:**

Applying the `$filter` like in the OData Uri Conventions gives me the following error:

```
{"error":{"code":"-1, Microsoft.SharePoint.SPException","message":{"lang":"en-US","value":"The query is not valid."}}}

```

Tried it with following Query Strings:

```
_api/lists/getByTitle('Contacts')/items?$select=Title,Id&$filter=substringof(m,'Title') eq true

_api/lists/getByTitle('Contacts')/items?$select=Title,Id&$filter=substringof('m','Title') eq true

_api/lists/getByTitle('Contacts')/items?$select=Title,Id&$filter=substringof('m',Title) eq true

```