Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-17026

Allow using arrays via the REST API

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.7
    • Fix Version/s: 4.7
    • Component/s: CiviCRM API, Core CiviCRM
    • Labels:
      None
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code

      Description

      According to the documentation, it is possible to use IN parameters within an array to fetch multiple records, for instance multiple contacts:

      $api->Contact->Get(array(
        'contact_id' => array(
          'IN' => array(1, 2),
        ),
      ));
      

      However, this only works locally. The remote REST API class only accepts integers and strings as parameters.

      This pull request allows using arrays in remote API calls as well:
      https://github.com/civicrm/civicrm-core/pull/6500

        Attachments

          Activity

            People

            • Assignee:
              Sudha Sudha Bisht
              Reporter:
              klevie Kevin Levie
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: