REST API Filter

Would anybody tell me how the HTTP REST API Filter method works. https://frappe.io/apps/frappe-framework/developers/api/rest_api
plz show me the request structure.



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/107cca67-e442-4220-bb10-e5c87fb5c9d6%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.

On Sun, Jul 6, 2014 at 11:11 AM, Abu Sayem sa...@asteriskbd.com wrote:

Would anybody tell me how the HTTP REST API Filter method works.
https://frappe.io/apps/frappe-framework/developers/api/rest_api
plz show me the request structure.

Hi,

It’s documented there? What do you want to filter? Maybe we can add
that as an example.


Note:

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much
    information as you can. Please see it from the point of view of the person
    receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send
    only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do
    not send images as attachments. Links are good. Same goes for any file you
    are going to send.

End of Note

You received this message because you are subscribed to the Google Groups
“ERPNext Developer Forum” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to erpnext-developer-forum+un...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/erpnext-developer-forum/107cca67-e442-4220-bb10-e5c87fb5c9d6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Pratik
erpnext

Suppose i want to filter the attendance of employee with date and employee like EMP-0001 with rest api

On Sunday, July 6, 2014 12:12:58 PM UTC+6, Pratik Vyas wrote:
On Sun, Jul 6, 2014 at 11:11 AM, Abu Sayem <sa...@asteriskbd.com> wrote:
> Would anybody tell me how the HTTP REST API Filter method works.
> https://frappe.io/apps/frappe-framework/developers/api/rest_api
> plz show me the request structure.
>
Hi,

It's documented there? What do you want to filter? Maybe we can add
that as an example.

> --
> Note:
>
> If you are posting an issue,
> 1. We should be able to replicate it at our end. So please give us as much
> information as you can. Please see it from the point of view of the person
> receiving the communication.
> 2. Paste your code at http://pastebin.com or http://gist.github.com and send
> only the URL via email
> 3. For sending images, use http://imgur.com or other similar services. Do
> not send images as attachments. Links are good. Same goes for any file you
> are going to send.
>
> End of Note
> ---
> You received this message because you are subscribed to the Google Groups
> "ERPNext Developer Forum" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to erpnext-developer-forum+un...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/erpnext-developer-forum/107cca67-e442-4220-bb10-e5c87fb5c9d6%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Pratik
erpnext



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/cab012a6-46fc-4a78-b303-2cca4214e231%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.

Suppose i want to filter the attendance of employee with date and employee like EMP-0001 with rest api


http://0.0.0.0:8000/api/resource/Attendance?filter=[["employee","=","EMP-0001%22"]]
this give me the all the field
 
{"data":[{"name":"ATT-00012"},{"name":"ATT-00011"},{"name":"ATT-00010"},{"name":"ATT-00009"},{"name":"ATT-00008"},{"name":"ATT-00006"},{"name":"ATT-00002"},{"name":"ATT-00005"},{"name":"ATT-00004"},{"name":"ATT-00001"}]}



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/5afd8784-d76a-4aa5-b0e6-68d18a66345f%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.

On Sun, Jul 6, 2014 at 7:55 PM, Abu Sayem sa...@asteriskbd.com wrote:

Suppose i want to filter the attendance of employee with date and employee
like EMP-0001 with rest api

http://0.0.0.0:8000/api/resource/Attendance?filter=[[“employee”,“=”,“EMP-0001"”]]

this give me the all the field

{“data”:[{“name”:“ATT-00012”},{“name”:“ATT-00011”},{“name”:“ATT-00010”},{“name”:“ATT-00009”},{“name”:“ATT-00008”},{“name”:“ATT-00006”},{“name”:“ATT-00002”},{“name”:“ATT-00005”},{“name”:“ATT-00004”},{“name”:“ATT-00001”}]}

So, your filter does seem to work. Do you want more fields in the response?


Note:

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much
    information as you can. Please see it from the point of view of the person
    receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send
    only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do
    not send images as attachments. Links are good. Same goes for any file you
    are going to send.

End of Note

You received this message because you are subscribed to the Google Groups
“ERPNext Developer Forum” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to erpnext-developer-forum+un...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/erpnext-developer-forum/5afd8784-d76a-4aa5-b0e6-68d18a66345f%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


Pratik
erpnext