"filter" option in POST payload is not working with http verb tunnelling


#1

Hello all,

I’ m trying http verb tunneling for applying filters for a GET request. BUT it’s not working. I have tried various combinations but it is not working as per docs.
In API docs, too it is not working:

POST http://localhost:8080/api/v2/system/user

with following headers:
Content-Type: application/json
X-DreamFactory-Api-Key: 4653....7c1690f47d
X-DreamFactory-Session-Token: eyNTE4LCJuY....mYiOjE0ODQ0NTA5MT
X-HTTP-Method: GET

payload = {
        "filter": "email IN (gef@yahoo.com, abc@gmail.com)"  
}

And

 payload = {
        "filter": "id IN (7, 9)"  
  }

And

 payload = {
        "filter": "email = gef@yahoo.com"  
}

And

payload = {
        "filter": "id = 7"  
}

Nothing works. It seems that “filter” option in payload is being ignored by DSP.
My DSP version is 2.4.1-2, though I also tested it in 2.3.1-0, but it is not working.

When I’m specifying filter in url, it is working fine. For example below request with same headers, returns records after applying filters properly:
http://localhost:8080/api/v2/system/user?filter=email%20IN%20%28abc@yahoo.co.in%2Cgef@gmail.com%29
This works as expected.

But ‘filter’ option when specified in payload is not working. It seems I’m missing something, but couldn’t get what it is.
Any clues?

Thanks


#2

This is not working in server-side V8 scripting too. “filter” option in POST payload is not being identified by DSP. Is this a bug or something missing?


#3

I’m seeing the same behavior. Maybe a bug? I’ll check with the team.


#4

I filed this issue with the team. Reference id DF-982


#5

Hi drewpearce, Thanks for your response. Also, it is to be noted that below options are also not working, when specified in POST payload, with same headers as specified above.

POST http://localhost:8080/api/v2/system/user
with
payload = { "ids": "7, 9, 13", "fields": "id, name" }
ie neither ‘ids’ option, nor ‘fields’ option is working. DSP is ignoring them. It is also doubtful if ‘params’ options will work, I have not checked that.


#6

right. I tested ids,fields,limit,include_schema,include_count,order. Order works =)