Difference between revisions of "REST API:role Resource"

From AgileApps Support Wiki
imported>Aeric
imported>Aeric
 
(22 intermediate revisions by the same user not shown)
Line 1: Line 1:
Performs actions on [[Role]] records via the [[REST API]]
Performs actions on [[Role]] records via the [[REST API]]
===Requirements===
===Requirements===
You need to understand  [[Role_Based_Access_Permissions#Global_vs._Individual_Role_Assignment|Global vs. Individual Role Assignment]]s
You need to understand  [[Data_Access_Permissions#Global_vs._Individual_Role_Assignment|Global vs. Individual Role Assignment]]s


===Access Permissions===
===Access Permissions===
{{permissions|Access Control/User Management|use the role Resource in the [[REST API]]}}
{{PermissionRef|Access Control|use this resource}}


===Get a Role Record===
===Get a Role Record===
Line 10: Line 10:
;Method:GET
;Method:GET


;URI:<tt><nowiki>https://{domain}/networking/rest/role/{recordId}</nowiki></tt>
;URI:<tt>{{platformURL}}/rest/role/{recordId}</tt>


;Response:
;Response:
Line 22: Line 22:
     <date_created>2010-11-12T13:14:15Z</date_created>
     <date_created>2010-11-12T13:14:15Z</date_created>
     <created_id type="USER"  
     <created_id type="USER"  
       uri="https://{domain}/networking/rest/user/3"  
       uri="https://{{domain}}/networking/rest/user/3"  
       displayValue=" System">3</created_id>
       displayValue=" System">3</created_id>
     <date_modified>2010-11-12T13:14:15Z</date_modified>
     <date_modified>2010-11-12T13:14:15Z</date_modified>
     <modified_id type="USER"  
     <modified_id type="USER"  
       uri="https://{domain}/networking/rest/user/3"  
       uri="https://{{domain}}/networking/rest/user/3"  
       displayValue=" System">3</modified_id>
       displayValue=" System">3</modified_id>
     <users>
     <users>
       <id>479771292</id>
       <id>479771292</id>
       <user_id type="USER"  
       <user_id type="USER"  
         uri="https://{domain}/networking/rest/user/1424089492"  
         uri="https://{{domain}}/networking/rest/user/1424089492"  
         displayValue="Dev User">1424089492</user_id>
         displayValue="Dev User">1424089492</user_id>
       <team_id type="TEAM"  
       <team_id type="TEAM"  
         uri="https://{domain}/networking/rest/team/1"  
         uri="https://{{domain}}/networking/rest/team/1"  
         displayValue="Dev Team">1</team_id>
         displayValue="Dev Team">1</team_id>
     </users>
     </users>
Line 41: Line 41:
       <id>568445387</id>
       <id>568445387</id>
       <user_id type="USER"  
       <user_id type="USER"  
         uri="https://{domain}/networking/rest/user/16016a880c064ad1ba92115424851462"  
         uri="https://{{domain}}/networking/rest/user/16016a880c064ad1ba92115424851462"  
         displayValue="QA User">16016a880c064ad1ba92115424851462</user_id>
         displayValue="QA User">16016a880c064ad1ba92115424851462</user_id>
       <team_id type="TEAM"  
       <team_id type="TEAM"  
         uri="https://{domain}/networking/rest/team/888961917"  
         uri="https://{{domain}}/networking/rest/team/888961917"  
         displayValue="QA Team">888961917</team_id>
         displayValue="QA Team">888961917</team_id>
     </users>
     </users>
 
    <team_level_record_access_permission>
      <object_id type="ObjectA" uri="" displayValue="ObjectA">ObjectA</object_id>
      <view_capability>true</view_capability>
      <update_capability>true</update_capability>
      <delete_capability>true</delete_capability>
    </team_level_record_access_permission> 
      ...   


     <globally_manage_permission>
     <self_record_access_permission>
        <team_level_global_record_access_permission>
      <object_id type="ObjectA" uri="" displayValue="ObjectA">ObjectA</object_id>
            <view_capability>true</view_capability>
       <create_capability>true</create_capability>
            <update_capability>true</update_capability>
      <owner_delete_capability>true</owner_delete_capability>
            <delete_capability>true</delete_capability>
    </self_record_access_permission>         
        </team_level_global_record_access_permission>
      ...
   
        <self_record_global_access_permission>
            <create_capability>true</create_capability>
            <owner_delete_capability>true</owner_delete_capability>
        </self_record_global_access_permission>
   
        <other_global_access_permission>
            <view_web_tabs>true</view_web_tabs>
            <administrative_areas>true</administrative_areas>
        </other_global_access_permission>
    </globally_manage_permission>
   
    <individually_manage_permission>   
        <team_level_record_access_permission>
            <object_id type="ObjectA" uri="" displayValue="ObjectA">ObjectA</object_id>
            <view_capability>true</view_capability>
            <update_capability>true</update_capability>
            <delete_capability>true</delete_capability>
        </team_level_record_access_permission>        
 
        <self_record_access_permission>
            <object_id type="ObjectA" uri="" displayValue="ObjectA">ObjectA</object_id>
            <create_capability>true</create_capability>
            <owner_delete_capability>true</owner_delete_capability>
        </self_record_access_permission>         
 
        <web_tabs_access_permission>
            <object_id type="ObjectC"
              uri=""
              displayValue="ObjectC">1555611998yui319155269</object_id>
            <create_capability>true</create_capability>
        </web_tabs_access_permission>
 
        <administrative_permission>
            <user_management>true</user_management>
            <team_record_change_ownership>true</team_record_change_ownership>
            <self_record_change_ownership>false</self_record_change_ownership>
            <personalize_user_interface>false</personalize_user_interface>
            <create_delete_view_report>false</create_delete_view_report>
            <export_view_report>false</export_view_report>
            <view_report_visible_to_other>false</view_report_visible_to_other>
            <manage_global_view_report>true</manage_global_view_report>
            <print_view_report>true</print_view_report>
            <manage_templates>false</manage_templates>
            <lead_case_assignment_policy>true</lead_case_assignment_policy>
            <override_product_pricing>false</override_product_pricing>
            <manage_self_service_portal>false</manage_self_service_portal>
            <manage_product_and_price_book>true</manage_product_and_price_book>
            <access_mass_data_operation>true</access_mass_data_operation>
            <import_export_data>true</import_export_data>
            <manage_audit_log>true</manage_audit_log>
            <manage_recycle_bin>false</manage_recycle_bin>
            <manage_tags>true</manage_tags>
            <customize_objects>true</customize_objects>
            <manage_application>true</manage_application>
            <manage_develop_features>false</manage_develop_features>
            <manage_translation_workbench>false</manage_translation_workbench>
            <manage_tenant_and_company_capabilities>true</manage_tenant_and_company_capabilities>
            <manage_discussion_category>true</manage_discussion_category>
            <proxy_login_access>true</proxy_login_access>
            <proxy_login_configuration>false</proxy_login_configuration>
            <customer_support_login>true</customer_support_login>
            <versioning>false</versioning>
        </administrative_permission>
    </individually_manage_permission>
</role>
</role>


Line 135: Line 78:
;Method:GET
;Method:GET


;URI:<tt><nowiki>https://{domain}/networking/rest/role/{recordId}?{query_parameters}</nowiki></tt>
;URI:<tt>{{platformURL}}/rest/role?{query_parameters}</tt>
:;Sample Search:
:;Sample Search:
::<tt><nowiki>?fieldList=name,id & filter=name contains 'smith' & sortby='id'</nowiki></tt>
::<tt><nowiki>?fieldList=name,id&filter=name contains 'smith' & sortby='id'</nowiki></tt>
:: (Field names are in the [[#Fields|Fields]] section.)
:: (Field names are in the [[#Fields|Fields]] section.)


Line 148: Line 91:
         <id>1</id>
         <id>1</id>
         <created_id type=""  
         <created_id type=""  
           uri="https://{domain}/networking/rest/user/3"  
           uri="https://{{domain}}/networking/rest/user/3"  
           displayValue=" System">3</created_id>
           displayValue=" System">3</created_id>
        <record_locator>System Administrator</record_locator>
         <modified_id type=""  
         <modified_id type=""  
           uri="https://{domain}/networking/rest/user/3"  
           uri="https://{{domain}}/networking/rest/user/3"  
           displayValue=" System">3</modified_id>
           displayValue=" System">3</modified_id>
         <date_modified>2010-11-12T13:14:15Z</date_modified>
         <date_modified>2010-11-12T13:14:15Z</date_modified>
        <object_id>ROLE</object_id>
         <name>System Administrator</name>
         <name>System Administrator</name>
         <date_created>2010-11-12T13:14:15Z</date_created>
         <date_created>2010-11-12T13:14:15Z</date_created>
Line 162: Line 105:
         <id>2</id>
         <id>2</id>
         <created_id type=""  
         <created_id type=""  
           uri="https://{domain}/networking/rest/user/3"  
           uri="https://{{domain}}/networking/rest/user/3"  
           displayValue=" System">3</created_id>
           displayValue=" System">3</created_id>
        <record_locator>Sales Manager</record_locator>
         <modified_id type=""  
         <modified_id type=""  
           uri="https://{domain}/networking/rest/user/3"  
           uri="https://{{domain}}/networking/rest/user/3"  
           displayValue=" System">3</modified_id>
           displayValue=" System">3</modified_id>
         <date_modified>2010-11-12T13:14:15Z</date_modified>
         <date_modified>2010-11-12T13:14:15Z</date_modified>
        <object_id>ROLE</object_id>
         <name>Sales Manager</name>
         <name>Sales Manager</name>
         <date_created>2010-11-12T13:14:15Z</date_created>
         <date_created>2010-11-12T13:14:15Z</date_created>
Line 176: Line 119:
         <id>3</id>
         <id>3</id>
         <created_id type=""  
         <created_id type=""  
           uri="https://{domain}/networking/rest/user/3"  
           uri="https://{{domain}}/networking/rest/user/3"  
           displayValue=" System">3</created_id>
           displayValue=" System">3</created_id>
        <record_locator>Sales Rep</record_locator>
         <modified_id type=""  
         <modified_id type=""  
           uri="https://{domain}/networking/rest/user/3"  
           uri="https://{{domain}}/networking/rest/user/3"  
           displayValue=" System">3</modified_id>
           displayValue=" System">3</modified_id>
         <date_modified>2010-11-12T13:14:15Z</date_modified>
         <date_modified>2010-11-12T13:14:15Z</date_modified>
        <object_id>ROLE</object_id>
         <name>Sales Rep</name>
         <name>Sales Rep</name>
         <date_created>2010-11-12T13:14:15Z</date_created>
         <date_created>2010-11-12T13:14:15Z</date_created>
Line 200: Line 143:
Add a Role record
Add a Role record
;Method:POST
;Method:POST
;URI:<tt><nowiki>https://{domain}/networking/rest/role</nowiki></tt>
;URI:<tt>{{platformURL}}/rest/role</tt>
;Request:
;Request:
:<syntaxhighlight lang="xml" enclose="div">
:<syntaxhighlight lang="xml" enclose="div">
<platform>
<platform>
<role>
<role>
     <name>Manager</name>  
     <name>Manager</name>      
   
    <globally_manage_permission>
        <team_level_global_record_access_permission>
            <view_capability>true</view_capability>           
        </team_level_global_record_access_permission>
   
        <self_record_global_access_permission>
            <create_capability>true</create_capability>
            <owner_delete_capability>true</owner_delete_capability>
        </self_record_global_access_permission>
   
        <other_global_access_permission>
            <view_web_tabs>true</view_web_tabs>           
        </other_global_access_permission>
    </globally_manage_permission>
   
    <individually_manage_permission>
   
        <team_level_record_access_permission>
            <object_id type="ObjectA"
              uri=""
              displayValue="ObjectA">ObjectA</object_id>
            <view_capability>true</view_capability>
            <update_capability>true</update_capability>
            <delete_capability>true</delete_capability>
        </team_level_record_access_permission>
       
        <self_record_access_permission>
            <object_id type="ObjectB"
              uri=""
              displayValue="ObjectB">ObjectB</object_id>
            <create_capability>true</create_capability>
            <owner_delete_capability>true</owner_delete_capability>
        </self_record_access_permission>


        <web_tabs_access_permission>
    <team_level_record_access_permission>
            <object_id type="ObjectC"  
        <object_id type="ObjectA"  
              uri=""  
          uri=""  
              displayValue="ObjectC">1555611998yui319155269</object_id>
          displayValue="ObjectA">ObjectA</object_id>
            <create_capability>true</create_capability>
        <view_capability>true</view_capability>
         </web_tabs_access_permission>
         <update_capability>true</update_capability>
 
         <delete_capability>true</delete_capability>
         <administrative_permission>
    </team_level_record_access_permission>
            <user_management>true</user_management>
      ...
            <team_record_change_ownership>true</team_record_change_ownership>
 
            <self_record_change_ownership>false</self_record_change_ownership>
    <self_record_access_permission>
            <personalize_user_interface>false</personalize_user_interface>      
        <object_id type="ObjectB"
            <manage_translation_workbench>false</manage_translation_workbench>          
          uri=""
         </administrative_permission>
          displayValue="ObjectB">ObjectB</object_id>
     </individually_manage_permission>
        <create_capability>true</create_capability>
         <owner_delete_capability>true</owner_delete_capability>
     </self_record_access_permission>
      ...
</role>
</role>
</platform>
</platform>
Line 276: Line 188:
Update a Role record
Update a Role record
;Method:PUT
;Method:PUT
;URI:<tt><nowiki>https://{domain}/networking/rest/role/{recordId}</nowiki></tt>
;URI:<tt>{{platformURL}}/rest/role/{recordId}</tt>
;Request:
;Request:
:<syntaxhighlight lang="xml" enclose="div">
:<syntaxhighlight lang="xml" enclose="div">
Line 282: Line 194:
<role>
<role>
     <name>Team Member</name>     
     <name>Team Member</name>     
   
   
    <globally_manage_permission>
     <team_level_record_access_permission>
        <team_level_global_record_access_permission>
      <object_id type="ObjectA" uri="" displayValue="ObjectA">ObjectA</object_id>
            <view_capability>true</view_capability>           
      <view_capability>true</view_capability>
        </team_level_global_record_access_permission>
      <update_capability>true</update_capability>
   
      <delete_capability>false</delete_capability>
        <self_record_global_access_permission>
    </team_level_record_access_permission>     
            <create_capability>true</create_capability>
            <owner_delete_capability>false</owner_delete_capability>
        </self_record_global_access_permission>
   
        <other_global_access_permission>
            <view_web_tabs>false</view_web_tabs>           
        </other_global_access_permission>
    </globally_manage_permission>
   
     <individually_manage_permission>
        <team_level_record_access_permission>
            <object_id type="ObjectA" uri="" displayValue="ObjectA">ObjectA</object_id>
            <view_capability>true</view_capability>
            <update_capability>true</update_capability>
            <delete_capability>false</delete_capability>
        </team_level_record_access_permission>     
 
        <web_tabs_access_permission>
            <object_id type="ObjectB"
              uri=""
              displayValue="ObjectB">1555611998yui319155269</object_id>
            <create_capability>true</create_capability>
        </web_tabs_access_permission>


        <administrative_permission>
            <user_management>true</user_management>
            <team_record_change_ownership>true</team_record_change_ownership>
            <self_record_change_ownership>true</self_record_change_ownership>
            <personalize_user_interface>false</personalize_user_interface>       
            <manage_translation_workbench>false</manage_translation_workbench>           
        </administrative_permission>
    </individually_manage_permission>
</role>
</role>
</platform>
</platform>
Line 331: Line 212:
         <code>0</code>
         <code>0</code>
         <description>Success</description>
         <description>Success</description>
         <id>1818437421</id>     // ID of the role that has been updated
         <id>12345678</id>
     </message>
     </message>
</platform>
</platform>
Line 340: Line 221:
Delete a Role record
Delete a Role record
;Method:DELETE
;Method:DELETE
;URI:<tt><nowiki>https://{domain}/networking/rest/role/{recordId}</nowiki></tt>
;URI:<tt>{{platformURL}}/rest/role/{recordId}</tt>
;Response:
;Response:
:<syntaxhighlight lang="xml" enclose="div">
:<syntaxhighlight lang="xml" enclose="div">
Line 390: Line 271:
!Additional Information  
!Additional Information  
|-
|-
|id|| Integer|| align="center"|Read Only||  ||Record Identifier||   
|id|| String|| align="center"|Read Only||  ||Record Identifier||   
|-
|record_locator|| String|| align="center"|Editable on Add/Update|| align="center"|[[File:Checkmark.gif|link=]]|| Record-access index||
|-
|-
|name|| String|| align="center"|Editable on Add/Update|| align="center"|[[File:Checkmark.gif|link=]]|| Role Name||
|name|| String|| align="center"|Editable on Add/Update|| align="center"|[[File:Checkmark.gif|link=]]|| Role Name||
Line 396: Line 279:
|description|| String|| align="center"|Editable on Add/Update||  || Role description||   
|description|| String|| align="center"|Editable on Add/Update||  || Role description||   
|-
|-
|ip_addr_range||  ||  ||  ||  ||[[Role Based IP Login Restriction]]
|ip_addr_range||  ||  ||  ||  ||[[Login IP Address Restrictions]]
|-
|-
|date_created|| Date|| align="center"|Read Only||  ||  || [[UTC Format]]
|date_created|| Date|| align="center"|Read Only||  ||  || [[UTC Format]]
Line 407: Line 290:
|}
|}


 
=====Users Tag=====
;Users Tag:
:{| border="1" cellpadding="5" cellspacing="0"
:{| border="1" cellpadding="5" cellspacing="0"
|-
|-
Line 421: Line 303:
|users|| || Tag|| align="center"|Read Only||  || [[Users]] attached to this Role||   
|users|| || Tag|| align="center"|Read Only||  || [[Users]] attached to this Role||   
|-
|-
| ||id|| String|| align="center"|Read Only||  ||[[Record Identifier]] ||
| ||id|| String|| align="center"|Read Only||  ||[[Record Id]] ||
|-
|-
| ||user_id|| Lookup|| align="center"|Read Only||  || [[REST API:user Resource|User]] ID ||  
| ||user_id|| Lookup|| align="center"|Read Only||  || [[REST API:user Resource|User]] ID ||  
|-
|-
| ||team_id|| Lookup|| align="center"|Read Only||  || [[REST API:team Resource|Team]] ID ||  
| ||team_id|| Lookup|| align="center"|Read Only||  || [[REST API:team Resource|Team]] ID ||  
|}
;Permission Hierarchy:
Use these groups of tags and fields in Response transactions.
:{| border="1" cellpadding="5" cellspacing="0"
|-
!Tag
!Permission Tag / ''Flag''
!Type
!Attribute
!Required During Add
!Description
!Additional Information
|-
|globally_manage_permission|| ||Tag|| ||  || [[Permissions#Edit_Global_Access_Permission_Rights|Manage permissions globally]]|| 
|-
| ||team_level_global_record_access_permission|| Tag||  ||  ||Globally enabled/disabled view, update and delete record permissions for all the objects belongs to user's team||
|-
| ||align="right"|''view_capability''|| Boolean|| align="center"|Editable on Add/Update||  ||  View|| 
|-
| ||align="right"|''update_capability''|| Boolean|| align="center"|Editable on Add/Update||  ||  Update|| 
|-
| ||align="right"|''delete_capability''|| Boolean|| align="center"|Editable on Add/Update||  ||  Delete|| 
|-
| ||self_record_global_access_permission|| Tag|| ||  || Globally enabled/disabled create and self delete record permissions for all the objects belongs to user ||
|-
| ||align="right"|''create_capability''|| Boolean|| align="center"|Editable on Add/Update||  ||  || 
|-
| ||align="right"|''owner_delete_capability''|| Boolean|| align="center"|Editable on Add/Update||  ||  || 
|-
| ||other_global_access_permission|| Tag||  ||  || Globally enabled/disabled permissions for tab access and admin permissions||
|-
| ||align="right"|''view_web_tabs''|| Boolean|| align="center"|Editable on Add/Update||  ||  [[Permissions#Web_Tabs|Web Tabs permissions]]|| 
|-
| ||align="right"|''administrative_areas''|| Boolean|| align="center"|Editable on Add/Update||  ||  || 
|-
| individually_manage_permission|| ||Tag||  ||  ||  [[Permissions#Edit_Individual_Access_Permission_Rights|Manage Permissions Individually]]|| 
|-
| ||team_level_record_access_permission|| Tag||  ||  || Individually enabled/disabled (view, update and delete record) permissions for all the of the objects belongs to user's team  ||
|-
| ||align="right"|''object_id''|| lookup|| align="center"|Editable on Add/Update ||  ||  || 
|-
| ||align="right"|''view_capability''|| Boolean|| align="center"|Editable on Add/Update ||  ||  View|| 
|-
| ||align="right"|''update_capability''|| Boolean|| align="center"|Editable on Add/Update ||  ||  Update|| 
|-
| ||align="right"|''delete_capability''|| Boolean||align="center"|Editable on Add/Update ||  ||  Delete|| 
|-
| ||self_record_access_permission||Tag||  ||  || Individually enabled/disabled (create and self delete record) permissions for all the objects belongs to user      || 
|-
| ||align="right"|''object_id''|| lookup|| align="center"|Editable on Add/Update  ||  ||  || 
|-
| ||align="right"|''create_capability''|| Boolean|| align="center"|Editable on Add/Update  ||  ||  || 
|-
| ||align="right"|''owner_delete_capability''|| Boolean|| align="center"|Editable on Add/Update  ||  ||  || 
|-
| ||web_tabs_access_permission|| Tag||  ||  || Individually enabled/disabled create permission for all the web tabs|| 
|-
| ||align="right"|''object_id''|| lookup|| align="center"|Editable on Add/Update  ||  ||  || 
|-
| ||align="right"|''create_capability''|| Boolean|| align="center"|Editable on Add/Update  ||  ||  || 
|-
| ||administrative_permission|| Tag||  ||  || Set of individually enabled/disabled [[Permissions#Administrative_Permissions|Administrative Permissions]]|| 
|-
| ||align="right"|''user_management''|| Boolean||  align="center"|Editable on Add/Update ||  ||[[Access Control/User Management]]|| 
|-
| ||align="right"|''team_record_change_ownership''|| Boolean||  align="center"|Editable on Add/Update ||  ||[[Change Ownership of my Team’s Records ]]|| 
|-
| ||align="right"|''self_record_change_ownership''|| Boolean||  align="center"|Editable on Add/Update ||  ||[[Change Ownership of Self Owned Records]]|| 
|-
| ||align="right"|''personalize_user_interface''|| Boolean||  align="center"|Editable on Add/Update ||    ||[[Personalize User Interface]]|| 
|-
| ||align="right"|''create_delete_view_report''|| Boolean||  align="center"|Editable on Add/Update ||  ||[[Create/Delete Views/Reports/Homepages]]|| 
|-
| ||align="right"|''export_view_report''|| Boolean||  align="center"|Editable on Add/Update ||    ||[[Export Views and Reports]]|| 
|-
| ||align="right"|''view_report_visible_to_other''|| Boolean||  align="center"|Editable on Add/Update ||  ||[[Make Views/Reports Visible to Others]]|| 
|-
| ||align="right"|''manage_global_view_report''|| Boolean||  align="center"|Editable on Add/Update ||  ||[[Manage Global Views/Reports]]|| 
|-
| ||align="right"|''print_view_report''|| Boolean||  align="center"|Editable on Add/Update ||  ||[[Print Views and Reports]]|| 
|-
| ||align="right"|''manage_templates''|| Boolean||  align="center"|Editable on Add/Update ||  ||  || 
|-
| ||align="right"|''lead_case_assignment_policy''|| Boolean||  align="center"|Editable on Add/Update ||  ||[[Lead and Case Assignment Policies]]|| 
|-
| ||align="right"|''override_product_pricing''|| Boolean||  align="center"|Editable on Add/Update ||  ||  || 
|-
| ||align="right"|''manage_product_and_price_book''|| Boolean||  align="center"|Editable on Add/Update ||  ||[[Manage Product and Price Book]]|| 
|-
| ||align="right"|''access_mass_data_operation''|| Boolean||  align="center"|Editable on Add/Update ||  ||[[Access Mass Data Operations]]|| 
|-
| ||align="right"|''import_export_data''|| Boolean||  align="center"|Editable on Add/Update ||  ||[[Import and Export Data]]|| 
|-
| ||align="right"|''manage_audit_log''|| Boolean||  align="center"|Editable on Add/Update ||  ||[[Manage Audit Log]]|| 
|-
| ||align="right"|''manage_recycle_bin''|| Boolean||  align="center"|Editable on Add/Update ||  ||[[Manage Recycle Bin]]|| 
|-
| ||align="right"|''manage_tags''|| Boolean||  align="center"|Editable on Add/Update ||    ||[[Manage Tags]]|| 
|-
| ||align="right"|''customize_objects''|| Boolean||  align="center"|Editable on Add/Update ||  ||[[Customize Objects]]|| 
|-
| ||align="right"|''manage_application''|| Boolean||  align="center"|Editable on Add/Update ||  ||[[Manage Applications permission]]||
|-
| ||align="right"|''manage_package''|| Boolean||  align="center"|Editable on Add/Update ||  ||[[Manage Packages]]||
|-
| ||align="right"|''manage_develop_features''|| Boolean||  align="center"|Editable on Add/Update ||  ||[[Manage Develop Features]]|| 
|-
| ||align="right"|''manage_translation_workbench''|| Boolean||  align="center"|Editable on Add/Update ||  ||[[Manage Translation Workbench]]|| 
|-
| ||align="right"|''manage_tenant_and_company_capabilities''|| Boolean||  align="center"|Editable on Add/Update ||  ||[[Manage Tenants and Company Capabilities]]|| 
|-
| ||align="right"|''manage_discussion_category''|| Boolean||  align="center"|Editable on Add/Update ||  ||[[Manage Discussion Categories]]|| 
|-
| ||align="right"|''proxy_login_access''|| Boolean||  align="center"|Editable on Add/Update ||    ||[[Proxy Login Access]]|| 
|-
| ||align="right"|''proxy_login_configuration''|| Boolean||  align="center"|Editable on Add/Update ||  ||  || 
|-
| ||align="right"|''customer_support_login''|| Boolean||  align="center"|Editable on Add/Update ||  ||[[Customer Support Login]]|| 
|-
| ||align="right"|''versioning''|| Boolean||  align="center"|Editable on Add/Update ||  ||[[Administer Versioning]]|| 
|}
|}
<noinclude>
<noinclude>

Latest revision as of 06:12, 10 May 2017

Performs actions on Role records via the REST API

Requirements

You need to understand Global vs. Individual Role Assignments

Access Permissions

Lock-tiny.gif

Users that have the Access Control permission can use this resource. 

Get a Role Record

Identifies and retrieves a single Role record

Method
GET
URI
https://{yourDomain}/networking/rest/role/{recordId}
Response
<syntaxhighlight lang="xml" enclose="div">

<platform> <role>

   <id>1</id>
   <name>System Administrator</name>
   <description>System Generated Role</description>
   <ip_addr_range/>
   <date_created>2010-11-12T13:14:15Z</date_created>
   <created_id type="USER" 
     uri="https://{yourDomain}/networking/rest/user/3" 
     displayValue=" System">3</created_id>
   <date_modified>2010-11-12T13:14:15Z</date_modified>
   <modified_id type="USER" 
     uri="https://{yourDomain}/networking/rest/user/3" 
     displayValue=" System">3</modified_id>
   <users>
     <id>479771292</id>
     <user_id type="USER" 
       uri="https://{yourDomain}/networking/rest/user/1424089492" 
       displayValue="Dev User">1424089492</user_id>
     <team_id type="TEAM" 
       uri="https://{yourDomain}/networking/rest/team/1" 
       displayValue="Dev Team">1</team_id>
   </users>
   <users>
     <id>568445387</id>
     <user_id type="USER" 
       uri="https://{yourDomain}/networking/rest/user/16016a880c064ad1ba92115424851462" 
       displayValue="QA User">16016a880c064ad1ba92115424851462</user_id>
     <team_id type="TEAM" 
       uri="https://{yourDomain}/networking/rest/team/888961917" 
       displayValue="QA Team">888961917</team_id>
   </users>
  
   <team_level_record_access_permission>
      <object_id type="ObjectA" uri="" displayValue="ObjectA">ObjectA</object_id>
      <view_capability>true</view_capability>
      <update_capability>true</update_capability>
      <delete_capability>true</delete_capability>
   </team_level_record_access_permission>   
     ...     
   <self_record_access_permission>
      <object_id type="ObjectA" uri="" displayValue="ObjectA">ObjectA</object_id>
      <create_capability>true</create_capability>
      <owner_delete_capability>true</owner_delete_capability>
   </self_record_access_permission>        
     ...

</role>

<message>

   0
   <description>Success</description>

</message> </platform> </syntaxhighlight>

See also: REST API:Error Codes

Dynamic Search

Search for Role records, specifying the fields to retrieve, number of records, offset, sort column, sort order, criteria

Method
GET
URI
https://{yourDomain}/networking/rest/role?{query_parameters}
Sample Search
?fieldList=name,id&filter=name contains 'smith' & sortby='id'
(Field names are in the Fields section.)
Query Parameters
  • fieldList - A comma-separated list of field names to retrieve
  • The asterisk (*) wildcard specifies all fields
  • {fieldname} specifies an individual field (e.g. name)
(Use the REST API:field Resource to get a complete list of fields.)
  • For a Composite Object, specify {alias}.{fieldname} to select a related-record field, where the alias is defined in the Object Relationships.
  • For a Database View, specify {alias}.{fieldname}, where the object alias is defined in the Database View.
  • alias.* specifies all fields in the aliased object.
  • filter - Filtering criteria to filter the records
  • pageSize - Number of records to retrieve from the result set in order to make a "page".
  • page - Number of the logical page in a database result set. The first page is page "zero" (0).
Page zero is returned by default, so appending &pageSize=1 to your query returns a single record.
  • getTotalRecordCount returns the number of total records.
    Causes the following structure to be returned, where N is the total number of records:
<syntaxhighlight lang="xml" enclose="div">

<platform>

  <status>
  <packageDeploy>
  ...
  </packageDeploy>
  </status>
  <message>
     0
     <description>Success</description>
  </message>
  <totalRecordCount>N</totalRecordCount> 

</platform> </syntaxhighlight>

  • sortBy - Field name for primary sort
    Ex: &sortBy=name
  • sortOrder - Sort order of the primary field, either asc or desc (ascending or descending)
    Ex: &sortOrder=desc
  • sortBy2 - Field name for secondary sort
  • sortOrder2 - Sort order of the second field, either asc or desc (ascending or descending)
For more information, see: Specifying Query Parameters in REST APIs
Response
<syntaxhighlight lang="xml" enclose="div">

<platform>

   <record>
       <id>1</id>
       <created_id type="" 
         uri="https://{yourDomain}/networking/rest/user/3" 
         displayValue=" System">3</created_id>
       <record_locator>System Administrator</record_locator>
       <modified_id type="" 
         uri="https://{yourDomain}/networking/rest/user/3" 
         displayValue=" System">3</modified_id>
       <date_modified>2010-11-12T13:14:15Z</date_modified>
       <name>System Administrator</name>
       <date_created>2010-11-12T13:14:15Z</date_created>
   </record>
   <record>
       <id>2</id>
       <created_id type="" 
         uri="https://{yourDomain}/networking/rest/user/3" 
         displayValue=" System">3</created_id>
       <record_locator>Sales Manager</record_locator>
       <modified_id type="" 
         uri="https://{yourDomain}/networking/rest/user/3" 
         displayValue=" System">3</modified_id>
       <date_modified>2010-11-12T13:14:15Z</date_modified>
       <name>Sales Manager</name>
       <date_created>2010-11-12T13:14:15Z</date_created>
   </record>
   <record>
       <id>3</id>
       <created_id type="" 
         uri="https://{yourDomain}/networking/rest/user/3" 
         displayValue=" System">3</created_id>
       <record_locator>Sales Rep</record_locator>
       <modified_id type="" 
         uri="https://{yourDomain}/networking/rest/user/3" 
         displayValue=" System">3</modified_id>
       <date_modified>2010-11-12T13:14:15Z</date_modified>
       <name>Sales Rep</name>
       <date_created>2010-11-12T13:14:15Z</date_created>
   </record>
   <message>
       0
       <description>Success</description>
   </message>
   <recordCount>3</recordCount>

</platform> </syntaxhighlight>

See also: REST API:Error Codes

Add a Role Record

Add a Role record

Method
POST
URI
https://{yourDomain}/networking/rest/role
Request
<syntaxhighlight lang="xml" enclose="div">

<platform> <role>

   <name>Manager</name>       
   <team_level_record_access_permission>
       <object_id type="ObjectA" 
         uri="" 
         displayValue="ObjectA">ObjectA</object_id>
       <view_capability>true</view_capability>
       <update_capability>true</update_capability>
       <delete_capability>true</delete_capability>
   </team_level_record_access_permission>
     ...
 
   <self_record_access_permission>
       <object_id type="ObjectB" 
         uri="" 
         displayValue="ObjectB">ObjectB</object_id>
       <create_capability>true</create_capability>
       <owner_delete_capability>true</owner_delete_capability>
   </self_record_access_permission>
     ...

</role> </platform> </syntaxhighlight>

Response
<syntaxhighlight lang="xml" enclose="div">

<platform>

   <message>
       0
       <description>Success</description>
       <id>1818437421</id>      // id of the role that is just been added
   </message>

</platform> </syntaxhighlight>

See also: REST API:Error Codes

Update a Role Record

Update a Role record

Method
PUT
URI
https://{yourDomain}/networking/rest/role/{recordId}
Request
<syntaxhighlight lang="xml" enclose="div">

<platform> <role>

   <name>Team Member</name>    
    
   <team_level_record_access_permission>
      <object_id type="ObjectA" uri="" displayValue="ObjectA">ObjectA</object_id>
      <view_capability>true</view_capability>
      <update_capability>true</update_capability>
      <delete_capability>false</delete_capability>
   </team_level_record_access_permission>    

</role> </platform> </syntaxhighlight>

Response
<syntaxhighlight lang="xml" enclose="div">

<platform>

   <message>
       0
       <description>Success</description>
       <id>12345678</id>
   </message>

</platform> </syntaxhighlight>

See also: REST API:Error Codes

Delete a Role Record

Delete a Role record

Method
DELETE
URI
https://{yourDomain}/networking/rest/role/{recordId}
Response
<syntaxhighlight lang="xml" enclose="div">

<platform>

   <message>
       0
       <description>Success</description>        
   </message>

</platform> </syntaxhighlight>

See also: REST API:Error Codes


Fields

Field Name Type Attribute Required During Add Description Additional Information
id String Read Only Record Identifier
record_locator String Editable on Add/Update Checkmark.gif Record-access index
name String Editable on Add/Update Checkmark.gif Role Name
description String Editable on Add/Update Role description
ip_addr_range Login IP Address Restrictions
date_created Date Read Only UTC Format
created_id Lookup Read Only User ID
date_modified Date Read Only UTC Format
modified_id Lookup Read Only User ID
Users Tag
Tag Field Type Attribute Required During Add Description Additional Information
users Tag Read Only Users attached to this Role
id String Read Only Record Id
user_id Lookup Read Only User ID
team_id Lookup Read Only Team ID