Answers.Body: <p>I am not sure why you are using <code>civicrm_api3_get</code>. The standard way for v3 api calling is <code>civicrm_api3('entityName', 'action', $params)</code>.</p>
  
  <p>Just try replacing the snippet from above question to below:</p>
  
  <pre><code> $entity_id = $group["id"];
   $apiParams = array(
     "entity_id" =&gt; $entity_id,
     "entity_table" =&gt; "civicrm_group",
     "is_active" =&gt; 1
   );
  
   $entity_name = "Acl_Role";
   $result = civicrm_api3($entity_name, 'get', $apiParams);
  </code></pre>
  
  <p>HTH</p>
  
  <p>Pradeep</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-06T13:43:02.203Z
Answers.Text: Sorry for the confusion. The civicrm_api3_get is the wrapper I put around civicrm_api3($entity_name, 'get', $apiParams).  I have since learned that the api call works, but all the records in the
Answers.UserDisplayName: Mike Steigerwald
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-05T05:33:13.637Z
Answers.LastActivityDate: 2018-02-05T05:33:13.637Z
Answers.UserDisplayName: Pradeep Nayak
Body: <p>I have an API call to get ACL roles that worked before I upgraded to 4.7.29 (I think I was at 4.7.22). Now, this returns no results:</p>
  
  <pre><code>    $entity_id = $group["id"];
      $apiParams = array("entity_id" =&gt; $entity_id
              , "entity_table" =&gt; "civicrm_group", "is_active" =&gt; 1);
  
      $entity_name = "Acl_Role";
      $result = civicrm_api3_get($entity_name, $apiParams);
  </code></pre>
  
  <p>I'm debugging now, but wondering if anyone can quickly tell me if something changed recently that I need to catch up on?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-02-06T13:50:22.913Z
Comments.Text: I have since learned that the api call works, but all the records in the civicrm_acl_entiry_role are gone. I'm now try to learn why that hasn't adversely affected the Manage ACL Roles form.
Comments.UserDisplayName: Mike Steigerwald
Tags: <api>
Title: API call for ACL roles no longer works
ThreadText: # API call for ACL roles no longer works
  
  (Asked by: username_0 on 2018-02-03)
  
  I have an API call to get ACL roles that worked before I upgraded to 4.7.29 (I think I was at 4.7.22). Now, this returns no results:
  
  ```
      $entity_id = $group["id"];
      $apiParams = array("entity_id" => $entity_id
              , "entity_table" => "civicrm_group", "is_active" => 1);
  
      $entity_name = "Acl_Role";
      $result = civicrm_api3_get($entity_name, $apiParams);
  
  ```
  
  I'm debugging now, but wondering if anyone can quickly tell me if something changed recently that I need to catch up on?
  
  **Tags:** api
  
  > **Comments:**
  > **username_0**: I have since learned that the api call works, but all the records in the civicrm_acl_entiry_role are gone. I'm now try to learn why that hasn't adversely affected the Manage ACL Roles form.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-02-05. Score: 1
  
  I am not sure why you are using `civicrm_api3_get`. The standard way for v3 api calling is `civicrm_api3('entityName', 'action', $params)`.
  
  Just try replacing the snippet from above question to below:
  
  ```
   $entity_id = $group["id"];
   $apiParams = array(
     "entity_id" => $entity_id,
     "entity_table" => "civicrm_group",
     "is_active" => 1
   );
  
   $entity_name = "Acl_Role";
   $result = civicrm_api3($entity_name, 'get', $apiParams);
  
  ```
  
  HTH
  
  username_1
  
  > **Comments:**
  > **username_0**: Sorry for the confusion. The civicrm_api3_get is the wrapper I put around civicrm_api3($entity_name, 'get', $apiParams).  I have since learned that the api call works, but all the records in the  
  
  ---
  
  