I'm trying to write an API call returning all contacts that are at one end of one or more active relationships of a certain type, and their names. I note that you can specify limit, offset (LIMIT) and sort (ORDER BY) options. Something similar for GROUP BY, so I don't need to do this in PHP separately after the API call, would be useful. Does it exist?
Like this, for example:
$ao_result = civicrm_api('Relationship', 'get', array( 'version' => 3, 'sequential' => 1, 'relationship_type_id' => 19, 'is_active' => TRUE, 'options' => array( 'group_by' => 'contact_id_b', ), 'api.Contact.getvalue' => array( 'id' => '$value.contact_id_b', 'return' => 'display_name', ), ));