REST API:tenantDataSharingPolicy Resource
From AgileApps Support Wiki
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
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}
- Response
<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> <code>0</code> <description>Success</description> </message> </platform>
- See also: REST API:Error Codes
Read All tenantDataSharingPolicy Records
- Method
- GET
- URI
- https://{yourDomain}/networking/rest/tenantDataSharingPolicy
- Return all fields
- URI
- :https://{yourDomain}/networking/rest/tenantDataSharingPolicy?{query_parameters}
- Query Parameters
- fieldList - A comma-separated list of fields to retrieve.
- For more information, see: Specifying Query Parameters in REST APIs
- Response
<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> <code>0</code> <description>Success</description> </message> <recordCount>N</recordCount> <!-- Count of records returned --> </platform>
- See also: REST API:Error Codes
Create a tenantDataSharingPolicy Record
- Method
- POST
- URI
- https://{yourDomain}/networking/rest/tenantDataSharingPolicy
- Request
<platform> <tenantDataSharingPolicy> <name>Data Sharing Test</name> <tenant_id>1438232572</tenant_id> <user_id>ee9583f7e9b3485985230dd5f854</user_id> <all_tenants>false</all_tenants> </tenantDataSharingPolicy> </platform>
- Response
<platform> <message> <code>0</code> <description>Success</description> <id>...</id> <!-- ID of the newly created tenantDataSharingPolicy --> </message> </platform>
- See also: REST API:Error Codes
Update a tenantDataSharingPolicy Record
- Method
- PUT
- URI
- https://{yourDomain}/networking/rest/tenantDataSharingPolicy
- Request
<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>
- Response
<platform> <message> <code>0</code> <description>Success</description> </message> </platform>
- See also: REST API:Error Codes
Delete a tenantDataSharingPolicy Record
- Method
- DELETE
- URI
- https://{yourDomain}/networking/rest/tenantDataSharingPolicy/{recordId}
- Response
<platform> <message> <code>0</code> <description>Success</description> </message> </platform>
- 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
unless all_tenants=truetenant_id String Editable on Add/Update
unless all_tenants=trueuser_id Lookup Editable on Add/Update 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