Difference between revisions of "REST API:teamDataSharingPolicy Resource"
imported>Aeric m (Text replace - '<tt><nowiki>https://{domain}/networking' to '<tt>{{platformURL}}') |
imported>Aeric m (Text replace - '{domain}' to '{{domain}}') |
||
(3 intermediate revisions by the same user not shown) | |||
Line 8: | Line 8: | ||
===Access Permissions=== | ===Access Permissions=== | ||
{{ | {{PermissionRef|Access Control|use the <tt>teamDataSharingPolicy</tt> Resource in the [[REST API]]}} | ||
===Read a teamDataSharingPolicy Record=== | ===Read a teamDataSharingPolicy Record=== | ||
Line 17: | Line 17: | ||
;Method:GET | ;Method:GET | ||
;URI:<tt>{{platformURL}}/rest/teamDataSharingPolicy/{recordId} | ;URI:<tt>{{platformURL}}/rest/teamDataSharingPolicy/{recordId}</tt> | ||
;Response: | ;Response: | ||
Line 27: | Line 27: | ||
<roles/> | <roles/> | ||
<record_owning_team type="TEAM" | <record_owning_team type="TEAM" | ||
uri="https://{domain}/networking/rest/team/1" | uri="https://{{domain}}/networking/rest/team/1" | ||
displayValue="My Team">1</record_owning_team> | displayValue="My Team">1</record_owning_team> | ||
<sharing_teams> | <sharing_teams> | ||
Line 36: | Line 36: | ||
<include_sharing_team_sub_teams>true</include_sharing_team_sub_teams> | <include_sharing_team_sub_teams>true</include_sharing_team_sub_teams> | ||
<include_owning_team_sub_teams>true</include_owning_team_sub_teams> | <include_owning_team_sub_teams>true</include_owning_team_sub_teams> | ||
<team_level_record_access_permission> | <team_level_record_access_permission> | ||
Line 96: | Line 87: | ||
<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/{userId}" | uri="https://{{domain}}/networking/rest/user/{userId}" | ||
displayValue="{User Name}">{userId}</created_id> | displayValue="{User Name}">{userId}</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/{userId}" | uri="https://{{domain}}/networking/rest/user/{userId}" | ||
displayValue="{User Name}">{userId}</created_id> | displayValue="{User Name}">{userId}</created_id> | ||
</teamDataSharingPolicy> | </teamDataSharingPolicy> | ||
Line 118: | Line 109: | ||
;Method:GET | ;Method:GET | ||
;URI:<tt>{{platformURL}}/rest/teamDataSharingPolicy | ;URI:<tt>{{platformURL}}/rest/teamDataSharingPolicy</tt> | ||
;Response: | ;Response: | ||
Line 128: | Line 119: | ||
<roles/> | <roles/> | ||
<record_owning_team type="TEAM" | <record_owning_team type="TEAM" | ||
uri="https://{domain}/networking/rest/team/1" | uri="https://{{domain}}/networking/rest/team/1" | ||
displayValue="My Team">1</record_owning_team> | displayValue="My Team">1</record_owning_team> | ||
<sharing_teams> | <sharing_teams> | ||
Line 138: | Line 129: | ||
<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/{userId}" | uri="https://{{domain}}/networking/rest/user/{userId}" | ||
displayValue="Sally Sawyer">{userId}</created_id> | displayValue="Sally Sawyer">{userId}</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/{userId}" | uri="https://{{domain}}/networking/rest/user/{userId}" | ||
displayValue="Eric Armstrong">{userId}</modified_id> | displayValue="Eric Armstrong">{userId}</modified_id> | ||
</teamDataSharingPolicy> | </teamDataSharingPolicy> | ||
Line 166: | Line 157: | ||
;Method:POST | ;Method:POST | ||
;URI:<tt>{{platformURL}}/rest/teamDataSharingPolicy | ;URI:<tt>{{platformURL}}/rest/teamDataSharingPolicy</tt> | ||
;Request: | ;Request: | ||
Line 215: | Line 206: | ||
;Method:PUT | ;Method:PUT | ||
;URI:<tt>{{platformURL}}/rest/teamDataSharingPolicy/{recordId} | ;URI:<tt>{{platformURL}}/rest/teamDataSharingPolicy/{recordId}</tt> | ||
;Request: | ;Request: | ||
Line 265: | Line 256: | ||
;Method:DELETE | ;Method:DELETE | ||
;URI:<tt>{{platformURL}}/rest/teamDataSharingPolicy/{recordId} | ;URI:<tt>{{platformURL}}/rest/teamDataSharingPolicy/{recordId}</tt> | ||
;Response: | ;Response: |
Latest revision as of 19:20, 25 April 2014
Manage policies for sharing data between teams.
Introduction
An owning team can specify object-level permissions to view, update, or delete data to one or more sharing teams. The owning team can specify that data is shared in one of three ways:
- One-way - Sharing team(s) can see the owning team's object records, but not vice versa.
- Two-way - Sharing team(s) can see the owning teams object records, and the owning team can see the sharing team(s) records.
- Mashup - If there are multiple sharing teams, all of them can see each others' records.
Access Permissions
Users that have the Access Control permission can use the teamDataSharingPolicy Resource in the REST API.
Read a teamDataSharingPolicy Record
Returns detailed information for a team data sharing policy.
Note: This API mimics the GUI interface, in that it list all objects available in the system including that are not shared, as well as those that are. With that implementation, you can essentially "check off" additional items to share, without having to look up their Object Type Identifiers.
- Method
- GET
- URI
- https://{yourDomain}/networking/rest/teamDataSharingPolicy/{recordId}
- Response
- <syntaxhighlight lang="xml" enclose="div">
<platform>
<teamDataSharingPolicy> <id>2104672174</id> <name>Data Shared with Team #2</name> <roles/> <record_owning_team type="TEAM" uri="https://{yourDomain}/networking/rest/team/1" displayValue="My Team">1</record_owning_team> <sharing_teams> <team_id>1770784378</team_id> </sharing_teams> <description/> <sharing_type>2</sharing_type> <include_sharing_team_sub_teams>true</include_sharing_team_sub_teams> <include_owning_team_sub_teams>true</include_owning_team_sub_teams>
<team_level_record_access_permission> <object_id type="Accounts" uri="" displayValue="Accounts">ACCOUNT</object_id> <view_capability>false</view_capability> <update_capability>false</update_capability> <delete_capability>false</delete_capability> </team_level_record_access_permission>
<team_level_record_access_permission> ...additional unshared objects... </team_level_record_access_permission> <team_level_record_access_permission> <object_id type="Documents" uri="" displayValue="Documents">DOCUMENT</object_id> <view_capability>true</view_capability> <update_capability>false</update_capability> <delete_capability>false</delete_capability> </team_level_record_access_permission>
<team_level_record_access_permission> ...additional unshared objects... </team_level_record_access_permission>
<team_level_record_access_permission> <object_id type="Support Cases" uri="" displayValue="Support Cases">SUPPORT_CASE</object_id> <view_capability>true</view_capability> <update_capability>false</update_capability> <delete_capability>false</delete_capability> </team_level_record_access_permission>
<team_level_record_access_permission> <object_id type="List Members" uri="" displayValue="List Members">{objectId}</object_id> <view_capability>false</view_capability> <update_capability>false</update_capability> <delete_capability>false</delete_capability> </team_level_record_access_permission>
<team_level_record_access_permission> ...additional unshared objects... </team_level_record_access_permission>
<date_created>2010-11-12T13:14:15Z</date_created> <created_id type="USER" uri="https://{yourDomain}/networking/rest/user/{userId}" displayValue="{User Name}">{userId}</created_id> <date_modified>2010-11-12T13:14:15Z</date_modified> <modified_id type="USER" uri="https://{yourDomain}/networking/rest/user/{userId}" displayValue="{User Name}">{userId}</created_id> </teamDataSharingPolicy>
<message>
0
<description>Success</description>
</message>
</platform> </syntaxhighlight>
- See also: REST API:Error Codes
Get an Index List of teamDataSharingPolicy Records
This operation returns an index of policy IDs, along with the descriptive information that appears in the GUI. To get detailed information for a policy, use the policy ID to do a specific-record GET.
- Method
- GET
- URI
- https://{yourDomain}/networking/rest/teamDataSharingPolicy
- Response
- <syntaxhighlight lang="xml" enclose="div">
<platform>
<teamDataSharingPolicy> <id>2104692174</id> <name>Data Shared with Team #2</name> <roles/> <record_owning_team type="TEAM" uri="https://{yourDomain}/networking/rest/team/1" displayValue="My Team">1</record_owning_team> <sharing_teams> <team_id>1770784378</team_id> </sharing_teams> <sharing_type>2</sharing_type> <include_sharing_team_sub_teams>false</include_sharing_team_sub_teams> <include_owning_team_sub_teams>false</include_owning_team_sub_teams> <date_created>2010-11-12T13:14:15Z</date_created> <created_id type="USER" uri="https://{yourDomain}/networking/rest/user/{userId}" displayValue="Sally Sawyer">{userId}</created_id> <date_modified>2010-11-12T13:14:15Z</date_modified> <modified_id type="USER" uri="https://{yourDomain}/networking/rest/user/{userId}" displayValue="Eric Armstrong">{userId}</modified_id> </teamDataSharingPolicy>
<teamDataSharingPolicy> ... </teamDataSharingPolicy>
...
<message>
0
<description>Success</description>
</message>
<recordCount>N</recordCount>
</platform> </syntaxhighlight>
- See also: REST API:Error Codes
Create a teamDataSharingPolicy Record
- Method
- POST
- URI
- https://{yourDomain}/networking/rest/teamDataSharingPolicy
- Request
- <syntaxhighlight lang="xml" enclose="div">
<platform>
<teamDataSharingPolicy> <name>{Name of Data Sharing Policy}</name> <roles> <role_id>{role_Id_for_those_on_teams_allowed_to_share}</role_id> </roles> <record_owning_team>{team_Id}</record_owning_team> <sharing_teams> <team_id>{team_Id}</team_id> </sharing_teams> <description>Description of Data Shared and with Whom</description> <sharing_type>1</sharing_type> <include_sharing_team_sub_teams>true</include_sharing_team_sub_teams> <include_owning_team_sub_teams>false</include_owning_team_sub_teams>
<team_level_record_access_permission> <object_id>SUPPORT_CASE</object_id> <view_capability>true</view_capability> <update_capability>true</update_capability> <delete_capability>true</delete_capability> </team_level_record_access_permission>
...additional objects to share... </teamDataSharingPolicy>
</platform> </syntaxhighlight>
- Response
- <syntaxhighlight lang="xml" enclose="div">
<platform>
<message>
0
<description>Success</description>
<id>...</id>
</message>
</platform> </syntaxhighlight>
- See also: REST API:Error Codes
Update a teamDataSharingPolicy Record
- Method
- PUT
- URI
- https://{yourDomain}/networking/rest/teamDataSharingPolicy/{recordId}
- Request
- <syntaxhighlight lang="xml" enclose="div">
<platform>
<teamDataSharingPolicy> <name>{Name of Data Sharing Policy}</name> <roles> <role_id>{role_Id_for_those_on_teams_allowed_to_share}</role_id> </roles> <record_owning_team>{team_Id}</record_owning_team> <sharing_teams> <team_id>{team_Id}</team_id> </sharing_teams> <description>Description of Data Shared and with Whom</description> <sharing_type>2</sharing_type> <include_sharing_team_sub_teams>true</include_sharing_team_sub_teams> <include_owning_team_sub_teams>false</include_owning_team_sub_teams>
<team_level_record_access_permission> <object_id>SUPPORT_CASE</object_id> <view_capability>true</view_capability> <update_capability>true</update_capability> <delete_capability>true</delete_capability> </team_level_record_access_permission>
...additional objects to share... </teamDataSharingPolicy>
</platform>
</syntaxhighlight>
- Response
- <syntaxhighlight lang="xml" enclose="div">
<platform>
<message>
0
<description>Success</description>
</message>
</platform> </syntaxhighlight>
- See also: REST API:Error Codes
Delete a teamDataSharingPolicy Record
- Method
- DELETE
- URI
- https://{yourDomain}/networking/rest/teamDataSharingPolicy/{recordId}
- Response
- <syntaxhighlight lang="xml" enclose="div">
<platform>
<message>
0
<description>Success</description>
</message>
</platform> </syntaxhighlight>
- See also: REST API:Error Codes
Fields
Name Type Attribute Required During Add Description Additional Information id String Read Only Record Id name String Editable on Add/Update description String Editable on Add/Update record_owning_team String Editable on Add/Update The team designated as the owner of the object(s) to be shared sharing_type String Editable on Add/Update - 1 - One-way sharing
- 2 - Two-way sharing
- 3 - Mashup (multi-way sharing)
sharing_teams Struct Editable on Add/Update Teams that will share the object(s) team_id String Editable on Add/Update One or more ... roles Struct Editable on Add/Update Optional roles within sharing teams who will have access. (Unspecified roles have no access.) role_id String Editable on Add/Update One or more ... team_level_record_access_permission Struct Editable on Add/Update Object-specific access-levels specified for sharing teams. One per object to be shared. object_id String Editable on Add/Update view_capability Boolean Editable on Add/Update update_capability Boolean Editable on Add/Update delete__capability Boolean Editable on Add/Update date_created Date Read Only UTC Format created_id Lookup Read Only date_modified Date Read Only UTC Format modified_id Lookup Read Only