CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • is there any way to filter by api rest?
Pages: [1]

Author Topic: is there any way to filter by api rest?  (Read 580 times)

crazy_bitch

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
  • CiviCRM version: 4.1
  • CMS version: Drupal 7
  • MySQL version: 5.1
  • PHP version: 5.3
is there any way to filter by api rest?
April 12, 2013, 02:05:28 am
Hi everyone, i am trying  to get all the activities that a contact has asignee by api rest but i would like to filter the resulset by activity_date_time to get just the activities of the current month, is there any way to specify that in the url?

Thanks a lot

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: is there any way to filter by api rest?
April 12, 2013, 03:29:34 am
Not really :-(

at the moment you can filter by date time or by assignee - but I don't think you can do both

e.g

C:\utils\eclipseworkspace\civicrm-trunk\api\v3\examples\Activity\DateTimeHigh.php
C:\utils\eclipseworkspace\civicrm-trunk\api\v3\examples\Activity\DateTimeLow.php

Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: is there any way to filter by api rest?
April 12, 2013, 07:06:59 am
The limitation isn't on the rest interface but on the api itelf.

Would be great if you could enhance it, the file is api/v3/Activity.php function civicrm_api3_activity_get


X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: is there any way to filter by api rest?
April 12, 2013, 04:27:41 pm
FYI in 4.4 the activity contact tables are being restructured to get rid of separate assignee & target tables.
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: is there any way to filter by api rest?
April 12, 2013, 11:12:28 pm
Awesome news
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • is there any way to filter by api rest?

This forum was archived on 2017-11-26.