Answers.Body: <p>Object table is the type of data the ACL is operating on. </p>
  
  <p>For eg: if you want to create an ACL which grants permission for an event - object table, in this case, will be <code>civicrm_event</code>.</p>
  
  <p>Object id is the id of the event to which the permission is applied to. An example of API which uses these two params could be -</p>
  
  <pre><code>$result = civicrm_api3('Acl', 'create', [
    'object_table' =&gt; "civicrm_event",
    'object_id' =&gt; 2, //event id, 0 for all events.
  ]);
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-17T12:03:29.117Z
Answers.Text: What is the use of  "civicrm_saved_search" table? Because I want to give permission for one role to other groups ( View permission) using CiviCRM API.
Answers.UserDisplayName: deepak
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-22T02:35:50.300Z
Answers.Text: `civicrm_saved_search` table is used to store details of the smart groups created in civicrm. To give permission for a SG, i think you can directly use civicrm_group for `object table` and id of the smart group in `object_id` param.
Answers.UserDisplayName: jitendra - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-17T11:05:29.433Z
Answers.LastActivityDate: 2019-01-17T11:05:29.433Z
Answers.UserDisplayName: jitendra - fuzion
Body: <p>I am not understanding the meaning of 'object_role' and 'object_id' in ACL API. I was trying to manage ACL using CiviCRM API 3.</p>
  
Tags: <api><acl>
Title: What is 'object_table' and 'object_id' in Acl API?
ThreadText: # What is 'object_table' and 'object_id' in Acl API?
  
  (Asked by: username_0 on 2019-01-17)
  
  I am not understanding the meaning of 'object\_role' and 'object\_id' in ACL API. I was trying to manage ACL using CiviCRM API 3.
  
  **Tags:** api, acl
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-01-17. Score: 3 | Accepted answer
  
  Object table is the type of data the ACL is operating on.
  
  For eg: if you want to create an ACL which grants permission for an event - object table, in this case, will be `civicrm_event`.
  
  Object id is the id of the event to which the permission is applied to. An example of API which uses these two params could be -
  
  ```
  $result = civicrm_api3('Acl', 'create', [
    'object_table' => "civicrm_event",
    'object_id' => 2, //event id, 0 for all events.
  ]);
  
  ```
  
  > **Comments:**
  > **username_0**: What is the use of  "civicrm_saved_search" table? Because I want to give permission for one role to other groups ( View permission) using CiviCRM API.  
  > **username_1**: `civicrm_saved_search` table is used to store details of the smart groups created in civicrm. To give permission for a SG, i think you can directly use civicrm_group for `object table` and id of the smart group in `object_id` param.  
  
  ---
  
  