REST API:tenantDataSharingPolicy Resource

From AgileApps Support Wiki
Revision as of 21:02, 30 March 2012 by imported>Aeric (Text replace - '<tt><nowiki>https://{domain}/networking' to '<tt>{{platformURL}}')

Allow another tenant's user to login as a local user to access and modify data.

Requirements

The following data is needed to create a tenantDataSharingPolicy:

  • ID of the remote tenant (companyInfo).
  • A local username with which the remote user will log in.

Access Permissions

Lock-tiny.gif

Users that have the Manage Tenants and Company Capabilities permission can use this REST API resource. 

Read a tenantDataSharingPolicy Record

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

<platform>

   <tenantDataSharingPolicy>
       <id>d3b663db26ce48c1975873f7fa71587e</id>
       <name>Data Sharing Test</name>
       <tenant_id>1438232572</tenant_id>
       <user_id type="USER" 
          uri="https://{domain}/networking/rest/user/ee9583f7e9b348598523df0dd5f854" 
          displayValue="John Lee">ee9583f7e9b348598523df0dd5f854</user_id>
       <all_tenants>false</all_tenants>
       <date_created>2010-11-12T13:14:15Z</date_created>
       <created_id type="USER" 
         uri="https://{domain}/networking/rest/user/ee9583f7e9b348598523df0dd5f854" 
         displayValue="John Lee">ee9583f7e9b348598523df0dd5f854</created_id>
       <date_modified>2010-11-12T13:14:15Z</date_modified>
       <modified_id type="USER" 
         uri="https://{domain}/networking/rest/user/ee9583f7e9b348598523df0dd5f854"
         displayValue="John Lee">ee9583f7e9b348598523df0dd5f854</modified_id>
   </tenantDataSharingPolicy>
   <message>
       0
       <description>Success</description>
   </message>

</platform> </syntaxhighlight>

See also: REST API:Error Codes

Read All tenantDataSharingPolicy Records

Method
GET
URI
https://{yourDomain}/networking/rest/tenantDataSharingPolicy</nowiki>
Return all fields
URI
:https://{yourDomain}/networking/rest/tenantDataSharingPolicy?{query_parameters}</nowiki>
Query Parameters
  • fieldList - A comma-separated list of fields to retrieve.
For more information, see: Specifying Query Parameters in REST APIs
Response
<syntaxhighlight lang="xml" enclose="div">

<platform>

   <tenantDataSharingPolicy>
       <id>d3b663db26ce48c1975873f7fa71587e</id>
       <name>Data Sharing Test</name>
       <tenant_id>1438232572</tenant_id>
       <user_id type="USER" 
          uri="https://{domain}/networking/rest/user/ee9583f7e9b348598523df0dd5f854" 
          displayValue="John Lee">ee9583f7e9b348598523df0dd5f854</user_id>
       <all_tenants>false</all_tenants>
       <date_created>2010-11-12T13:14:15Z</date_created>
       <created_id type="USER" 
         uri="https://{domain}/networking/rest/user/ee9583f7e9b348598523df0dd5f854" 
         displayValue="John Lee">ee9583f7e9b348598523df0dd5f854</created_id>
       <date_modified>2010-11-12T13:14:15Z</date_modified>
       <modified_id type="USER" 
         uri="https://{domain}/networking/rest/user/ee9583f7e9b348598523df0dd5f854"
         displayValue="John Lee">ee9583f7e9b348598523df0dd5f854</modified_id>
   </tenantDataSharingPolicy>
   <tenantDataSharingPolicy>
       ...
   </tenantDataSharingPolicy>
    ...
   <message>
       0
       <description>Success</description>
   </message>
   <recordCount>N</recordCount>      

</platform> </syntaxhighlight>

See also: REST API:Error Codes

Create a tenantDataSharingPolicy Record

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

<platform>

   <tenantDataSharingPolicy>
       <name>Data Sharing Test</name>
       <tenant_id>1438232572</tenant_id>
       <user_id>ee9583f7e9b3485985230dd5f854</user_id>
       <all_tenants>false</all_tenants>
   </tenantDataSharingPolicy>

</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 tenantDataSharingPolicy Record

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

<platform>

   <tenantDataSharingPolicy>
       <id>d3b663db26ce48c1975873f7fa71587e</id>
       <name>Data Sharing Test</name>
       <tenant_id>1438232572</tenant_id>
       <user_id>ee9583f7e9b3485985230dd5f854</user_id>
       <all_tenants>false</all_tenants>
   </tenantDataSharingPolicy>

</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 tenantDataSharingPolicy Record

Method
DELETE
URI
https://{yourDomain}/networking/rest/tenantDataSharingPolicy/{recordId}</nowiki>
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 Checkmark.gif
unless all_tenants=true
tenant_id String Editable on Add/Update Checkmark.gif
unless all_tenants=true
user_id Lookup Editable on Add/Update Checkmark.gif User ID
all_tenants Boolean Editable on Add/Update
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