Getting active relationships using the API is returning contacts in trash
This seems to work, using a join:


    $result = civicrm_api3('Relationship', 'get', [
      'sequential' =&gt; 1,
      'return' =&gt; ["contact_id_b"],
      'relationship_type_id' =&gt; 5,
      'contact_id_a' =&gt; "user_contact_id",
      'is_active' =&gt; 1,
      'contact_id_b.is_deleted' =&gt; 0,
    ]);