Partners

A Partner is a first-class entity that cleanly represents an external organization, enables delegated administration, and enforces strict boundaries.

List Partners

SDK Function

Partner.list()

Return Object

ListIterator<Partner>

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

Additional Arguments

Example Request

import com.files.ListIterator;
import com.files.exceptions.*;
import com.files.exceptions.ApiErrorException.*;
import com.files.models.Partner;

try {
  HashMap<String, Object> parameters = new HashMap<>();
  ListIterator<Partner> partners = Partner.list(parameters);
  for (Partner partner : partners.listAutoPaging()) {
    // Operate on partner
  }
} catch (NotAuthenticatedException e) {
  System.out.println("Authentication Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
} catch (SdkException e) {
  System.out.println("Unknown Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
}

Show Partner

SDK Function

Partner.find()

Return Object

Partner

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

Function Arguments

ArgumentDescription
id
int64
Required
Partner ID.

Example Request

import com.files.exceptions.*;
import com.files.exceptions.ApiErrorException.*;
import com.files.models.Partner;

try {
  HashMap<String, Object> parameters = new HashMap<>();
  Partner partner = Partner.find(id, parameters);
  // Operate on partner
} catch (NotAuthenticatedException e) {
  System.out.println("Authentication Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
} catch (SdkException e) {
  System.out.println("Unknown Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
}

Create Partner

SDK Function

Partner.create()

Return Object

Partner

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

Function Arguments

ArgumentDefaultDescription
ai_assistant_personality_id
int64
AI Assistant Personality ID assigned to this Partner, if any. Users in the Partner inherit it unless a direct per-user assignment overrides it.
allowed_ips
string
A list of allowed IPs for this Partner. Newline delimited. Partner User IP access is allowed when the IP matches the Partner, User, or Site allowed IP lists.
allow_bypassing_2fa_policies
boolean
falseAllow Partner Admins to change Two-Factor Authentication requirements for Partner Users.
allow_credential_changes
boolean
falseAllow Partner Admins to change or reset credentials for users belonging to this Partner.
allow_providing_gpg_keys
boolean
falseAllow Partner Admins to provide GPG keys.
allow_user_creation
boolean
falseAllow Partner Admins to create users.
cc_emails_to_responsible_party
boolean
falseWhen true, emails sent to Partner users are copied to the responsible User or Group.
notes
string
Notes about this Partner.
partner_channel_template_id
int64
ID of the Partner Channel Template assigned to this Partner.
responsible_group_id
int64
ID of the Group responsible for this Partner.
responsible_user_id
int64
ID of the User responsible for this Partner.
show_partner_channel_home_page
boolean
falseShow Partner users a simplified home page built from this Partner's Channels.
tags
string
Comma-separated list of Tags for this Partner. Tags are used for other features, such as UserLifecycleRules, which can target specific tags. Tags must only contain lowercase letters, numbers, and hyphens.
name
string
Required
The name of the Partner.
root_folder
string
Required
The root folder path for this Partner.
workspace_id
int64
0ID of the Workspace associated with this Partner.

Example Request

import com.files.exceptions.*;
import com.files.exceptions.ApiErrorException.*;
import com.files.models.Partner;

try {
  HashMap<String, Object> parameters = new HashMap<>();
  parameters.put("name", "Acme Corp");
  parameters.put("root_folder", "/AcmeCorp");
  
  Partner partner = Partner.create(parameters);
  // Operate on partner
} catch (NotAuthenticatedException e) {
  System.out.println("Authentication Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
} catch (SdkException e) {
  System.out.println("Unknown Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
}

Update Partner

SDK Function

partner.update();

Return Object

Partner

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

Attribute Setters

SetterDescription
setAiAssistantPersonalityId
int64
AI Assistant Personality ID assigned to this Partner, if any. Users in the Partner inherit it unless a direct per-user assignment overrides it.
setAllowedIps
string
A list of allowed IPs for this Partner. Newline delimited. Partner User IP access is allowed when the IP matches the Partner, User, or Site allowed IP lists.
setAllowBypassing2faPolicies
boolean
Allow Partner Admins to change Two-Factor Authentication requirements for Partner Users.
setAllowCredentialChanges
boolean
Allow Partner Admins to change or reset credentials for users belonging to this Partner.
setAllowProvidingGpgKeys
boolean
Allow Partner Admins to provide GPG keys.
setAllowUserCreation
boolean
Allow Partner Admins to create users.
setCcEmailsToResponsibleParty
boolean
When true, emails sent to Partner users are copied to the responsible User or Group.
setNotes
string
Notes about this Partner.
setPartnerChannelTemplateId
int64
ID of the Partner Channel Template assigned to this Partner.
setResponsibleGroupId
int64
ID of the Group responsible for this Partner.
setResponsibleUserId
int64
ID of the User responsible for this Partner.
setShowPartnerChannelHomePage
boolean
Show Partner users a simplified home page built from this Partner's Channels.
setTags
string
Comma-separated list of Tags for this Partner. Tags are used for other features, such as UserLifecycleRules, which can target specific tags. Tags must only contain lowercase letters, numbers, and hyphens.
setName
string
The name of the Partner.
setRootFolder
string
The root folder path for this Partner.

Example Request

import com.files.exceptions.*;
import com.files.exceptions.ApiErrorException.*;
import com.files.models.Partner;

try {
  // Find the partner object by its id.
  Partner partner = Partner.find(id, null);
  HashMap<String, Object> parameters = new HashMap<>();
  parameters.put("ai_assistant_personality_id", 1);
  partner.update(parameters);
} catch (NotAuthenticatedException e) {
  System.out.println("Authentication Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
} catch (SdkException e) {
  System.out.println("Unknown Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
}

Delete Partner

SDK Function

partner.delete();

Return Object

No return value.

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

Example Request

import com.files.exceptions.*;
import com.files.exceptions.ApiErrorException.*;
import com.files.models.Partner;

try {
  // Find the partner object by its id.
  Partner partner = Partner.find(id, null);
  partner.delete(null);
} catch (NotAuthenticatedException e) {
  System.out.println("Authentication Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
} catch (SdkException e) {
  System.out.println("Unknown Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
}

The Partner Object

Some of the functions above return a Partner object. The attributes of this object are listed below.

AttributeDescription
allow_bypassing_2fa_policies
boolean
Allow Partner Admins to change Two-Factor Authentication requirements for Partner Users.
allowed_ips
string
A list of allowed IPs for this Partner. Newline delimited. Partner User IP access is allowed when the IP matches the Partner, User, or Site allowed IP lists.
allow_credential_changes
boolean
Allow Partner Admins to change or reset credentials for users belonging to this Partner.
allow_providing_gpg_keys
boolean
Allow Partner Admins to provide GPG keys.
allow_user_creation
boolean
Allow Partner Admins to create users.
cc_emails_to_responsible_party
boolean
When true, emails sent to Partner users are copied to the responsible User or Group.
id
int64
The unique ID of the Partner.
ai_assistant_personality_id
int64
AI Assistant Personality ID assigned to this Partner, if any. Users in the Partner inherit it unless a direct per-user assignment overrides it.
workspace_id
int64
ID of the Workspace associated with this Partner.
name
string
The name of the Partner.
notes
string
Notes about this Partner.
partner_admin_ids
array(int64)
Array of User IDs that are Partner Admins for this Partner.
partner_channel_template_id
int64
ID of the Partner Channel Template assigned to this Partner.
partnership_role
string
This site's role in Partner Site relationships for this Partner. Can be host, guest, host_and_guest, or null.
Possible values: host, guest, host_and_guest
responsible_group_id
int64
ID of the Group responsible for this Partner.
responsible_user_id
int64
ID of the User responsible for this Partner.
root_folder
string
The root folder path for this Partner.
show_partner_channel_home_page
boolean
Show Partner users a simplified home page built from this Partner's Channels.
tags
string
Comma-separated list of Tags for this Partner. Tags are used for other features, such as UserLifecycleRules, which can target specific tags. Tags must only contain lowercase letters, numbers, and hyphens.
user_ids
array(int64)
Array of User IDs that belong to this Partner.