Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Trivial
-
Resolution: Won't Fix
-
Affects Version/s: 4.7
-
Fix Version/s: None
-
Component/s: CiviCRM API
-
Labels:
-
Documentation Required?:None
-
Funding Source:Needs Funding
Description
You can use the Contact.get API to retrieve all contacts in a certain group, using it's ID, e.g.
$result = civicrm_api3('Contact', 'get', array( 'sequential' => 1, 'group' => 4, ));
Now if you do the same using the API explorer user interface, you get
{ "is_error": 1, "error_message": "A fatal error was triggered: Advisory Board is not of the type Int" }
because it generates this API call:
$result = civicrm_api3('Contact', 'get', array(
'sequential' => 1,
'group' => "Advisory Board",
));
instead of
$result = civicrm_api3('Contact', 'get', array( 'sequential' => 1, 'group' => 4, ));