/// <summary>
        /// Get List of Capabilities
        /// </summary>
        /// <remarks>
        /// Retrieves the capability list of a given provider.
        /// The URL for ShareFile API is of the form Domain/Provider/Version/EntityThe Domain is the server presenting the provider - typically sharefile.com,
        /// but can be any other when using Storage Zones. The Provider represent the kind of data storage connected by the API. Examples
        /// are 'sf' for ShareFile; 'cifs' for CIFS; and 'sp' for SharePoint. Other providers
        /// may be created, clients must not assume any particular string.Version specifies the API version - currently at V3. Any backward incompatible
        /// changes will be performed on a different version identifier, to avoid breaking
        /// existing clients.The Capability document is used to indicate to clients that certain features
        /// are not available on a given provider - allowing the client to suppress UX controls
        /// and avoid "Not Implemented" exceptions to the end-user.
        /// </remarks>
        public IQuery<ODataFeed<Capability>> Get()
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query<ODataFeed<Capability>>(Client);
		    sfApiQuery.From("Capabilities");
            sfApiQuery.HttpMethod = "GET";	
		    return sfApiQuery;
        }
        /// <summary>
        /// Get List of Capabilities
        /// </summary>
        /// <remarks>
        /// Retrieves the capability list of a given provider.
        /// The URL for ShareFile API is of the form Domain/Provider/Version/EntityThe Domain is the server presenting the provider - typically sharefile.com,
        /// but can be any other when using Storage Zones. The Provider represent the kind of data storage connected by the API. Examples
        /// are 'sf' for ShareFile; 'cifs' for CIFS; and 'sp' for SharePoint. Other providers
        /// may be created, clients must not assume any particular string.Version specifies the API version - currently at V3. Any backward incompatible
        /// changes will be performed on a different version identifier, to avoid breaking
        /// existing clients.The Capability document is used to indicate to clients that certain features
        /// are not available on a given provider - allowing the client to suppress UX controls
        /// and avoid "Not Implemented" exceptions to the end-user.
        /// </remarks>
        public IQuery <ODataFeed <Capability> > Get()
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query <ODataFeed <Capability> >(Client);

            sfApiQuery.From("Capabilities");
            sfApiQuery.HttpMethod = "GET";
            return(sfApiQuery);
        }
Beispiel #3
0
        /// <summary>
        /// Get current Account
        /// </summary>
        /// <remarks>
        /// Retrieves information about the Account defined in the call subdomain
        /// </remarks>
        /// <returns>
        /// The subdomain account information
        /// </returns>
        public IQuery <Account> Get()
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query <Account>(Client);

            sfApiQuery.From("Accounts");
            sfApiQuery.HttpMethod = "GET";
            return(sfApiQuery);
        }
Beispiel #4
0
        /// <summary>
        /// Get Device Users for Current User
        /// </summary>
        /// <returns>
        /// A feed of DeviceUser objects
        /// </returns>
        public IQuery <ODataFeed <DeviceUser> > Get()
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query <ODataFeed <DeviceUser> >(Client);

            sfApiQuery.From("Devices");
            sfApiQuery.HttpMethod = "GET";
            return(sfApiQuery);
        }
Beispiel #5
0
        /// <summary>
        /// Gets all webhook subscriptions for the current user
        /// </summary>
        /// <returns>
        /// List of WebhookSubscription
        /// </returns>
        public IQuery <ODataFeed <WebhookSubscription> > Get()
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query <ODataFeed <WebhookSubscription> >(Client);

            sfApiQuery.From("WebhookSubscriptions");
            sfApiQuery.HttpMethod = "GET";
            return(sfApiQuery);
        }
Beispiel #6
0
        public IQuery <ODataFeed <RemoteUpload> > Get()
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query <ODataFeed <RemoteUpload> >(Client);

            sfApiQuery.From("RemoteUploads");
            sfApiQuery.HttpMethod = "GET";
            return(sfApiQuery);
        }
Beispiel #7
0
        /// <summary>
        /// Get Apps for Current User
        /// </summary>
        /// <returns>
        /// A feed of ConnectedApp objects
        /// </returns>
        public IQuery <ODataFeed <ConnectedApp> > Get()
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query <ODataFeed <ConnectedApp> >(Client);

            sfApiQuery.From("Apps");
            sfApiQuery.HttpMethod = "GET";
            return(sfApiQuery);
        }
        /// <summary>
        /// Get Session
        /// </summary>
        /// <remarks>
        /// Retrieve the current authentication session object. If the client is not authenticated,
        /// this operation will challenge for ShareFile authentication using a 401 response. This method will
        /// not trigger the SAML authentication flow - use /Sessions/Login instead.
        /// </remarks>
        /// <returns>
        /// The current authentication Context, based on the request SF_APIAuthId Cookie
        /// </returns>
        public IQuery <Session> Get()
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query <Session>(Client);

            sfApiQuery.From("Sessions");
            sfApiQuery.HttpMethod = "GET";
            return(sfApiQuery);
        }
Beispiel #9
0
        /// <summary>
        /// Get Folder Templates for Current Account
        /// </summary>
        /// <remarks>
        /// Returns all folder templates for the current account.
        /// </remarks>
        /// <returns>
        /// Folder templates for current account
        /// </returns>
        public IQuery <ODataFeed <FolderTemplate> > Get()
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query <ODataFeed <FolderTemplate> >(Client);

            sfApiQuery.From("FolderTemplates");
            sfApiQuery.HttpMethod = "GET";
            return(sfApiQuery);
        }
Beispiel #10
0
        /// <summary>
        /// Get recurring reports
        /// </summary>
        /// <remarks>
        /// Returns all recurring reports for the current account.
        /// </remarks>
        /// <returns>
        /// List of reports
        /// </returns>
        public IQuery <ODataFeed <Report> > GetRecurring()
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query <ODataFeed <Report> >(Client);

            sfApiQuery.From("Reports");
            sfApiQuery.Action("Recurring");
            sfApiQuery.HttpMethod = "GET";
            return(sfApiQuery);
        }
Beispiel #11
0
        /// <summary>
        /// Gets workflows shared with the current user.
        /// </summary>
        /// <remarks>
        /// Restrictions:
        /// * Skip must be a multiple of 25.
        /// * Top must be 25. It's preferred to not supply this.
        /// * Sort is only supported for LastUpdatedDate and Due
        /// </remarks>
        /// <returns>
        /// A feed of Workflow objects
        /// </returns>
        public IQuery <ODataFeed <Workflow> > GetShared()
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query <ODataFeed <Workflow> >(Client);

            sfApiQuery.From("Workflows");
            sfApiQuery.Action("Shared");
            sfApiQuery.HttpMethod = "GET";
            return(sfApiQuery);
        }
Beispiel #12
0
        /// <summary>
        /// Create Zone
        /// </summary>
        /// <example>
        /// {
        /// "Name":"Name",
        /// "HeartbeatTolerance":10,
        /// "ZoneServices":"StorageZone, SharepointConnector, NetworkShareConnector"
        /// }
        /// </example>
        /// <remarks>
        /// Creates a new Zone.
        /// </remarks>
        /// <returns>
        /// the created zone
        /// </returns>
        public IQuery <Zone> Create(Zone zone)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query <Zone>(Client);

            sfApiQuery.From("Zones");
            sfApiQuery.Body       = zone;
            sfApiQuery.HttpMethod = "POST";
            return(sfApiQuery);
        }
Beispiel #13
0
        /// <summary>
        /// Create EncryptedEmail
        /// </summary>
        /// <example>
        /// {
        /// "ToRecipients":[{"Email":"*****@*****.**"}, {"Email":"*****@*****.**"}],
        /// "CcRecipients":[{"Email":"*****@*****.**"}, {"Email":"*****@*****.**"}],
        /// "Subject": "Email Subject",
        /// "NotifyOnUse": true,
        /// "ExpirationDays":180,
        /// "RequireUserInfo": false,
        /// "RequireLogin": true
        /// }
        /// </example>
        /// <remarks>
        /// Create a new empty EncryptedEmail without a body or attachments. This request does not Send the EncryptedEmail,
        /// see the "Send EncryptedEmail" endpoint for steps to send a new EncryptedEmail
        /// </remarks>
        /// <param name="encryptedEmailParams"></param>
        /// <returns>
        /// EncryptedEmail
        /// </returns>
        public IQuery <EncryptedEmail> Create(EncryptedEmailCreateParams encryptedEmailParams)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query <EncryptedEmail>(Client);

            sfApiQuery.From("EncryptedEmails");
            sfApiQuery.Body       = encryptedEmailParams;
            sfApiQuery.HttpMethod = "POST";
            return(sfApiQuery);
        }
Beispiel #14
0
        /// <summary>
        /// Get Sent EncryptedEmails
        /// GET https://account.sf-api.com/sf/v3/EncryptedEmails/Sent
        /// </summary>
        /// <remarks>
        /// Get list of EncryptedEmails sent by the current User.
        /// </remarks>
        /// <returns>
        /// Feed of EncryptedEmails
        /// </returns>
        public IQuery <ODataFeed <EncryptedEmail> > Sent()
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query <ODataFeed <EncryptedEmail> >(Client);

            sfApiQuery.From("EncryptedEmails");
            sfApiQuery.Action("Sent");
            sfApiQuery.HttpMethod = "GET";
            return(sfApiQuery);
        }
Beispiel #15
0
        /// <summary>
        /// Get Current User Info
        /// </summary>
        /// <returns>
        /// UserInfo
        /// </returns>
        public IQuery <UserInfo> GetInfo()
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query <UserInfo>(Client);

            sfApiQuery.From("Users");
            sfApiQuery.Action("Info");
            sfApiQuery.HttpMethod = "GET";
            return(sfApiQuery);
        }
Beispiel #16
0
        /// <summary>
        /// Get List of User Shared Folders
        /// </summary>
        /// <remarks>
        /// Retrieve the connector folders that are associated with a sharepoint service
        /// </remarks>
        /// <returns>
        /// A list of Folder objects, representing sharepoint folders of an user
        /// </returns>
        public IQuery <ODataFeed <Item> > SharepointConnectors()
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query <ODataFeed <Item> >(Client);

            sfApiQuery.From("Users");
            sfApiQuery.Action("SharepointConnectors");
            sfApiQuery.HttpMethod = "GET";
            return(sfApiQuery);
        }
Beispiel #17
0
        /// <summary>
        /// Get List of User Shared Folders
        /// </summary>
        /// <remarks>
        /// Retrieve the list of shared folders the authenticated user has access to
        /// </remarks>
        /// <returns>
        /// A list of Folder objects, representing shared folders of an user
        /// </returns>
        public IQuery <ODataFeed <Item> > GetAllSharedFolders()
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query <ODataFeed <Item> >(Client);

            sfApiQuery.From("Users");
            sfApiQuery.Action("AllSharedFolders");
            sfApiQuery.HttpMethod = "GET";
            return(sfApiQuery);
        }
Beispiel #18
0
        /// <summary>
        /// Update Report
        /// </summary>
        /// <example>
        /// {
        /// "Title": "Usage Report",
        /// "ReportType": "Activity",
        /// "ObjectType": "Account",
        /// "ObjectId": "a024f83e-b147-437e-9f28-e7d03634af42",
        /// "DateOption": "Last30Days",
        /// "Frequency": "Once"
        /// }
        /// </example>
        /// <remarks>
        /// Updates an existing report
        /// </remarks>
        /// <param name="report"></param>
        /// <returns>
        /// the updated report
        /// </returns>
        public IQuery <Report> Update(Report report)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query <Report>(Client);

            sfApiQuery.From("Reports");
            sfApiQuery.Body       = report;
            sfApiQuery.HttpMethod = "PATCH";
            return(sfApiQuery);
        }
Beispiel #19
0
        /// <summary>
        /// Get all Two Factor Authentication Apps for the Current User
        /// </summary>
        /// <returns>
        /// A feed of TwoFactorAuthApp objects
        /// </returns>
        public IQuery <ODataFeed <TwoFactorAuthApp> > TFA()
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query <ODataFeed <TwoFactorAuthApp> >(Client);

            sfApiQuery.From("Apps");
            sfApiQuery.Action("TFA");
            sfApiQuery.HttpMethod = "GET";
            return(sfApiQuery);
        }
Beispiel #20
0
        public IQuery <RemoteUpload> Update(RemoteUpload remoteUpload)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query <RemoteUpload>(Client);

            sfApiQuery.From("RemoteUploads");
            sfApiQuery.Body       = remoteUpload;
            sfApiQuery.HttpMethod = "PATCH";
            return(sfApiQuery);
        }
        /// <summary>
        /// Create a one-time use login Uri for the Web App.
        /// </summary>
        /// <returns>
        /// Redirection populated with link in Uri field
        /// </returns>
        public IQuery <Redirection> WebAppAdmin()
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query <Redirection>(Client);

            sfApiQuery.From("Accounts");
            sfApiQuery.Action("WebAppAdmin");
            sfApiQuery.HttpMethod = "POST";
            return(sfApiQuery);
        }
Beispiel #22
0
        /// <summary>
        /// Get Outlook Information
        /// </summary>
        /// <returns>
        /// OutlookInformation
        /// </returns>
        public IQuery <OutlookInformation> GetOutlookInformation()
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query <OutlookInformation>(Client);

            sfApiQuery.From("Accounts");
            sfApiQuery.Action("OutlookInformation");
            sfApiQuery.HttpMethod = "GET";
            return(sfApiQuery);
        }
        /// <summary>
        /// Create a Connector Group associated with a Zone
        /// </summary>
        /// <example>
        /// {
        /// "Zones":[
        /// "Zone": {"Id":"ZoneId"},
        /// "StorageCenter": [ { "Id":"StorageCenterId" }, { ... } ],
        /// "ApiVersionMin":"v3",
        /// "ApiVersionMax":"v3",
        /// "IconUrl":"https://domain/icons",
        /// "FormUrl":"https://domain/forms"
        /// ],
        /// "Id":"ServiceId",
        /// "Name":""Name,
        /// "Provider":"svc"
        /// }
        /// </example>
        /// <remarks>
        /// Creates a new Connector Group, or adds a Zone to an existing Connector Group if the Group is already associated
        /// with another Zone. The caller doesn't have to check if the group exists or not - just call this API passing
        /// the Service ID and the associated Zone information.
        /// </remarks>
        /// <param name="id"></param>
        /// <param name="connectorGroup"></param>
        /// <returns>
        /// the created or modified AccessControl instance
        /// </returns>
        public IQuery <ConnectorGroup> Create(ConnectorGroup connectorGroup)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query <ConnectorGroup>(Client);

            sfApiQuery.From("ConnectorGroups");
            sfApiQuery.Body       = connectorGroup;
            sfApiQuery.HttpMethod = "POST";
            return(sfApiQuery);
        }
Beispiel #24
0
        public IQuery <ODataFeed <Contact> > GetUsers()
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query <ODataFeed <Contact> >(Client);

            sfApiQuery.From("RemoteUploads");
            sfApiQuery.Action("Users");
            sfApiQuery.HttpMethod = "GET";
            return(sfApiQuery);
        }
Beispiel #25
0
        /// <summary>
        /// Get Account Preferences
        /// </summary>
        /// <returns>
        /// Account preferences
        /// </returns>
        public IQuery <AccountPreferences> GetPreferences()
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query <AccountPreferences>(Client);

            sfApiQuery.From("Accounts");
            sfApiQuery.Action("Preferences");
            sfApiQuery.HttpMethod = "GET";
            return(sfApiQuery);
        }
Beispiel #26
0
        /// <summary>
        /// Get the Folder Access Control List of domains
        /// </summary>
        /// <remarks>
        /// Retrieve the list of domains that are allowed or disallowed to have access to folders. Whether the list is an allow or disallow list
        /// is configured by the AccessControlType property.
        ///
        /// The list blocks user access to folders by preventing adding a user to distribution groups or folders.
        /// The domain names are checked against the domains of all the email addresses of the user.
        /// This is an account-wide setting.
        /// </remarks>
        /// <returns>
        /// The Folder Access Control List of domains for the Account, e.g.
        ///
        /// {
        /// "AccessControlType" : "AllowedDomains",
        /// "Domains": ["domainA", "domainB", ...]
        /// }
        /// </returns>
        public IQuery <AccessControlDomains> GetFolderAccessControlDomains()
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query <AccessControlDomains>(Client);

            sfApiQuery.From("Accounts");
            sfApiQuery.Action("FolderAccessControlDomains");
            sfApiQuery.HttpMethod = "GET";
            return(sfApiQuery);
        }
Beispiel #27
0
        /// <summary>
        /// Get Account Mobile Security Settings
        /// </summary>
        /// <remarks>
        /// Returns the Mobile device configuration settings for this account
        /// </remarks>
        /// <returns>
        /// The current mobile security configuration for this account
        /// </returns>
        public IQuery <MobileSecuritySettings> GetMobileSecuritySettings()
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query <MobileSecuritySettings>(Client);

            sfApiQuery.From("Accounts");
            sfApiQuery.Action("MobileSecuritySettings");
            sfApiQuery.HttpMethod = "GET";
            return(sfApiQuery);
        }
        /// <summary>
        /// Get current Account
        /// </summary>
        /// <remarks>
        /// Retrieves information about the Account defined in the call subdomain
        /// </remarks>
        /// <param name="id"></param>
        /// <returns>
        /// The subdomain account information
        /// </returns>
        public IQuery <Account> Get(string id = null)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query <Account>(Client);

            sfApiQuery.From("Accounts");
            sfApiQuery.QueryString("id", id);
            sfApiQuery.HttpMethod = "GET";
            return(sfApiQuery);
        }
Beispiel #29
0
        /// <summary>
        /// Get Account Product Defaults
        /// </summary>
        /// <returns>
        /// Account defaults
        /// </returns>
        public IQuery <ProductDefaults> GetProductDefaults()
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query <ProductDefaults>(Client);

            sfApiQuery.From("Accounts");
            sfApiQuery.Action("ProductDefaults");
            sfApiQuery.HttpMethod = "GET";
            return(sfApiQuery);
        }
Beispiel #30
0
        /// <summary>
        /// Get List of current Account Clients
        /// </summary>
        /// <remarks>
        /// Retrieves the list of Clients in the Account.
        /// Clients are restricted users of an Account, that can receive and send files
        /// to Employees, but have no other permissions besides basic sharing with Employees.
        /// </remarks>
        /// <returns>
        /// A Feed containing all Clients in the account
        /// </returns>
        public IQuery <ODataFeed <Contact> > GetClients()
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query <ODataFeed <Contact> >(Client);

            sfApiQuery.From("Accounts");
            sfApiQuery.Action("Clients");
            sfApiQuery.HttpMethod = "GET";
            return(sfApiQuery);
        }
Beispiel #31
0
        public IQuery <RemoteUpload> GetPublic()
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query <RemoteUpload>(Client);

            sfApiQuery.From("RemoteUploads");
            sfApiQuery.Action("Public");
            sfApiQuery.HttpMethod = "GET";
            return(sfApiQuery);
        }
        public IQuery<Account> GetTenants(string id)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query<Account>(Client);
		    sfApiQuery.From("Accounts");
		    sfApiQuery.Action("Tenants");
            sfApiQuery.ActionIds(id);
            sfApiQuery.HttpMethod = "GET";	
		    return sfApiQuery;
        }
Beispiel #33
0
        /// <summary>
        /// Create Zone
        /// </summary>
        /// <example>
        /// {
        /// "Name":"Name",
        /// "HeartbeatTolerance":10,
        /// "ZoneServices":"StorageZone, SharepointConnector, NetworkShareConnector"
        /// }
        /// </example>
        /// <remarks>
        /// Creates a new Zone.
        /// </remarks>
        /// <returns>
        /// the created zone
        /// </returns>
        public IQuery<Zone> Create(Zone zone)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query<Zone>(Client);
		    sfApiQuery.From("Zones");
            sfApiQuery.Body = zone;
            sfApiQuery.HttpMethod = "POST";	
		    return sfApiQuery;
        }
Beispiel #34
0
        /// <summary>
        /// Get List of Zones
        /// </summary>
        /// <remarks>
        /// Retrieve the list of Zones accessible to the authenticated user
        /// This method will concatenate the list of private zones in the user's account and the
        /// list of public zones accessible to this account. Any user can see the list of zones.
        /// </remarks>
        /// <param name="services"></param>
        /// <param name="includeDisabled"></param>
        /// <returns>
        /// The list of public and private zones accessible to this user
        /// </returns>
        public IQuery<ODataFeed<Zone>> Get(ZoneService services = ZoneService.StorageZone, bool includeDisabled = false)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query<ODataFeed<Zone>>(Client);
		    sfApiQuery.From("Zones");
            sfApiQuery.QueryString("services", services);
            sfApiQuery.QueryString("includeDisabled", includeDisabled);
            sfApiQuery.HttpMethod = "GET";	
		    return sfApiQuery;
        }
        /// <summary>
        /// Get current Account branding
        /// </summary>
        /// <remarks>
        /// Retrievs Branding information about the subdomain account.
        /// This operation does not require authentication.
        /// </remarks>
        /// <returns>
        /// Branding information for a given sharefile account
        /// </returns>
        public IQuery<Account> GetBranding()
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query<Account>(Client);
		    sfApiQuery.From("Accounts");
		    sfApiQuery.Action("Branding");
            sfApiQuery.HttpMethod = "GET";	
		    return sfApiQuery;
        }
        /// <summary>
        /// Get List of current Account Clients
        /// </summary>
        /// <remarks>
        /// Retrieves the list of Clients in the Account.
        /// Clients are restricted users of an Account, that can receive and send files
        /// to Employees, but have no other permissions besides basic sharing with Employees.
        /// </remarks>
        /// <returns>
        /// A Feed containing all Clients in the account
        /// </returns>
        public IQuery<ODataFeed<Contact>> GetClients()
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query<ODataFeed<Contact>>(Client);
		    sfApiQuery.From("Accounts");
		    sfApiQuery.Action("Clients");
            sfApiQuery.HttpMethod = "GET";	
		    return sfApiQuery;
        }
Beispiel #37
0
        /// <summary>
        /// Get recurring reports
        /// </summary>
        /// <remarks>
        /// Returns all recurring reports for the current account.
        /// </remarks>
        /// <returns>
        /// List of reports
        /// </returns>
        public IQuery<ODataFeed<Report>> GetRecurring()
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query<ODataFeed<Report>>(Client);
		    sfApiQuery.From("Reports");
		    sfApiQuery.Action("Recurring");
            sfApiQuery.HttpMethod = "GET";	
		    return sfApiQuery;
        }
        /// <summary>
        /// Check if subdomain is required
        /// </summary>
        /// <param name="username"></param>
        /// <param name="singlePlane"></param>
        /// <returns>
        /// RequireSubdomainResult
        /// </returns>
        public IQuery<RequireSubdomainResult> RequireSubdomain(string username, bool singlePlane = false)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query<RequireSubdomainResult>(Client);
		    sfApiQuery.From("Accounts");
		    sfApiQuery.Action("RequireSubdomain");
            sfApiQuery.QueryString("username", username);
            sfApiQuery.QueryString("singlePlane", singlePlane);
            sfApiQuery.HttpMethod = "GET";	
		    return sfApiQuery;
        }
        /// <summary>
        /// Update the Folder Access Control List of domains
        /// </summary>
        /// <example>
        /// {
        /// "AccessControlType" : "AllowedDomains",
        /// "Domains": ["domainA", "domainB", ...]
        /// }
        /// </example>
        /// <remarks>
        /// Merges the specified domains with existing domains in the list, and/or updates the AccessControlType. One of the parameters needs to be specified. It
        /// allows to add new domains to the list.
        /// </remarks>
        /// <param name="AccessControlType"></param>
        /// <param name="Domains"></param>
        /// <returns>
        /// The updated Folder Access Control List of domains for the Account
        /// </returns>
        public IQuery<AccessControlDomains> UpdateFolderAccessControlDomains(AccessControlDomains accessControlDomains)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query<AccessControlDomains>(Client);
		    sfApiQuery.From("Accounts");
		    sfApiQuery.Action("FolderAccessControlDomains");
            sfApiQuery.Body = accessControlDomains;
            sfApiQuery.HttpMethod = "PATCH";	
		    return sfApiQuery;
        }
        /// <summary>
        /// Create or replace the Login Access Control List of domains
        /// </summary>
        /// <example>
        /// {
        /// "AccessControlType" : "AllowedDomains",
        /// "Domains": ["domainA", "domainB", ...]
        /// }
        /// </example>
        /// <param name="AccessControlType"></param>
        /// <param name="Domains"></param>
        /// <returns>
        /// The new Login Access Control List of domains for the Account
        /// </returns>
        public IQuery<AccessControlDomains> CreateLoginAccessControlDomains(AccessControlDomains accessControlDomains)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query<AccessControlDomains>(Client);
		    sfApiQuery.From("Accounts");
		    sfApiQuery.Action("LoginAccessControlDomains");
            sfApiQuery.Body = accessControlDomains;
            sfApiQuery.HttpMethod = "POST";	
		    return sfApiQuery;
        }
        /// <summary>
        /// Get list of multi-tenant zones assigned to a tenant.
        /// </summary>
        /// <param name="parentid"></param>
        /// <returns>
        /// List of multi-tenant zones assigned to the tenant
        /// </returns>
        public IQuery<ODataFeed<Zone>> GetZones(string parentid)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query<ODataFeed<Zone>>(Client);
		    sfApiQuery.From("Accounts");
		    sfApiQuery.Action("Tenants");
            sfApiQuery.ActionIds(parentid);
            sfApiQuery.SubAction("Zones");
            sfApiQuery.HttpMethod = "GET";	
		    return sfApiQuery;
        }
Beispiel #42
0
        /// <summary>
        /// Create Report
        /// </summary>
        /// <example>
        /// {
        /// "Id": "rs24f83e-b147-437e-9f28-e7d03634af42"
        /// "Title": "Usage Report",
        /// "ReportType": "Activity",
        /// "ObjectType": "Account",
        /// "ObjectId": "a024f83e-b147-437e-9f28-e7d0ef634af42",
        /// "DateOption": "Last30Days",
        /// "SaveFormat": "Excel"
        /// }
        /// </example>
        /// <remarks>
        /// Creates a new Report.
        /// </remarks>
        /// <param name="report"></param>
        /// <param name="runOnCreate"></param>
        /// <returns>
        /// the created report
        /// </returns>
        public IQuery<Report> Create(Report report, bool runOnCreate)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query<Report>(Client);
		    sfApiQuery.From("Reports");
            sfApiQuery.QueryString("runOnCreate", runOnCreate);
            sfApiQuery.Body = report;
            sfApiQuery.HttpMethod = "POST";	
		    return sfApiQuery;
        }
        /// <summary>
        /// Get Account Preferences
        /// </summary>
        /// <returns>
        /// Account preferences
        /// </returns>
        public IQuery<AccountPreferences> GetPreferences()
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query<AccountPreferences>(Client);
		    sfApiQuery.From("Accounts");
		    sfApiQuery.Action("Preferences");
            sfApiQuery.HttpMethod = "GET";	
		    return sfApiQuery;
        }
        /// <summary>
        /// Get Account Single Sign-On Configuration
        /// </summary>
        /// <remarks>
        /// Retrieve the Single Sign-on configuration for the Account
        /// </remarks>
        /// <param name="provider"></param>
        /// <param name="idpEntityId"></param>
        public IQuery<SSOAccountProvider> GetSSO(string provider = "saml", string idpEntityId = null)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query<SSOAccountProvider>(Client);
		    sfApiQuery.From("Accounts");
		    sfApiQuery.Action("SSO");
            sfApiQuery.QueryString("provider", provider);
            sfApiQuery.QueryString("idpEntityId", idpEntityId);
            sfApiQuery.HttpMethod = "GET";	
		    return sfApiQuery;
        }
        /// <summary>
        /// Get Account Mobile Security Settings
        /// </summary>
        /// <remarks>
        /// Returns the Mobile device configuration settings for this account
        /// </remarks>
        /// <returns>
        /// The current mobile security configuration for this account
        /// </returns>
        public IQuery<MobileSecuritySettings> GetMobileSecuritySettings()
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query<MobileSecuritySettings>(Client);
		    sfApiQuery.From("Accounts");
		    sfApiQuery.Action("MobileSecuritySettings");
            sfApiQuery.HttpMethod = "GET";	
		    return sfApiQuery;
        }
        /// <summary>
        /// Get Account Product Defaults
        /// </summary>
        /// <returns>
        /// Account defaults
        /// </returns>
        public IQuery<ProductDefaults> GetProductDefaults()
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query<ProductDefaults>(Client);
		    sfApiQuery.From("Accounts");
		    sfApiQuery.Action("ProductDefaults");
            sfApiQuery.HttpMethod = "GET";	
		    return sfApiQuery;
        }
        /// <summary>
        /// Find Subdomain
        /// </summary>
        /// <example>
        /// {
        /// "UsernameShort":"usernameShort",
        /// "Password":"******",
        /// "EmployeeOnly":false
        /// }
        /// </example>
        /// <remarks>
        /// Find the user account information based on the short username
        /// </remarks>
        /// <param name="findSubdomainParams"></param>
        /// <param name="singlePlane"></param>
        /// <returns>
        /// FindSubdomainResult
        /// </returns>
        public IQuery<FindSubdomainResult> FindSubdomain(FindSubdomainParams findSubdomainParams, bool singlePlane = false)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query<FindSubdomainResult>(Client);
		    sfApiQuery.From("Accounts");
		    sfApiQuery.Action("FindSubdomain");
            sfApiQuery.QueryString("singlePlane", singlePlane);
            sfApiQuery.Body = findSubdomainParams;
            sfApiQuery.HttpMethod = "POST";	
		    return sfApiQuery;
        }
        /// <summary>
        /// Get Account AddressBooks
        /// </summary>
        /// <remarks>
        /// Retrieves an address book from the account.
        /// Address Books are the contacts of Eployees and Clients, maintained on a personal or
        /// account-wide basis (shared).
        /// </remarks>
        /// <param name="type"></param>
        /// <param name="searchTerm"></param>
        /// <returns>
        /// A Feed of Contact objects representing the Address Book retrieved
        /// </returns>
        public IQuery<ODataFeed<Contact>> GetAddressBook(string type = "personal", string searchTerm = "")
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query<ODataFeed<Contact>>(Client);
		    sfApiQuery.From("Accounts");
		    sfApiQuery.Action("AddressBook");
            sfApiQuery.QueryString("type", type);
            sfApiQuery.QueryString("searchTerm", searchTerm);
            sfApiQuery.HttpMethod = "GET";	
		    return sfApiQuery;
        }
 /// <summary>
 /// Create Share
 /// </summary>
 /// <example>
 /// {
 /// "ShareType":"Send",
 /// "Title":"Sample Send Share",
 /// "Items": [ { "Id":"itemid" }, {...} ],
 /// "Recipients":[ { "User": { "Id":"userid" } }, { "User": { "Email": "user@email" } } ],
 /// "ExpirationDate": "2013-07-23",
 /// "RequireLogin": false,
 /// "RequireUserInfo": false,
 /// "MaxDownloads": -1,
 /// "UsesStreamIDs": false
 /// }
 /// {
 /// "ShareType":"Request",
 /// "Title":"Sample Request Share",
 /// "Recipients":[ { "User": { "Id":"userid" } }, { "User": { "Email": "user@email" } } ],
 /// "Parent": { "Id":"folderid" },
 /// "ExpirationDate": "2013-07-23",
 /// "RequireLogin": false,
 /// "RequireUserInfo": false,
 /// "TrackUntilDate": "2013-07-23",
 /// "SendFrequency": -1,
 /// "SendInterval": -1
 /// }
 /// </example>
 /// <remarks>
 /// Creates a new Send or Request Share.
 /// Expiration date:
 /// - if not specified the default is 30 days
 /// - "9999-12-31" disables share expiration.
 /// To use stream IDs as item IDs UsesStreamIDs needs to be set to true, and all the IDs in Items need to be specified
 /// as stream IDs.
 /// </remarks>
 /// <param name="share"></param>
 /// <param name="notify"></param>
 /// <returns>
 /// The new Share
 /// </returns>
 public IQuery<Share> Create(Share share, bool notify = false)
 {
     var sfApiQuery = new ShareFile.Api.Client.Requests.Query<Share>(Client);
     sfApiQuery.From("Shares");
     sfApiQuery.QueryString("notify", notify);
     sfApiQuery.Body = share;
     sfApiQuery.HttpMethod = "POST";
     return sfApiQuery;
 }
        public IQuery<AsyncOperation> Create(AsyncOperation asyncOp)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query<AsyncOperation>(Client);
		    sfApiQuery.From("AsyncOperations");
            sfApiQuery.Body = asyncOp;
            sfApiQuery.HttpMethod = "POST";	
		    return sfApiQuery;
        }
        /// <summary>
        /// Get Outlook Information
        /// </summary>
        /// <returns>
        /// OutlookInformation
        /// </returns>
        public IQuery<OutlookInformation> GetOutlookInformation()
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query<OutlookInformation>(Client);
		    sfApiQuery.From("Accounts");
		    sfApiQuery.Action("OutlookInformation");
            sfApiQuery.HttpMethod = "GET";	
		    return sfApiQuery;
        }
        /// <summary>
        /// Modify the Branding for this account
        /// </summary>
        /// <remarks>
        /// Modifies Branding information about the subdomain account.
        /// This operation requires authentication.
        /// </remarks>
        /// <returns>
        /// Branding information for a given sharefile account
        /// </returns>
        public IQuery<Account> UpdateBranding(Account account)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query<Account>(Client);
		    sfApiQuery.From("Accounts");
		    sfApiQuery.Action("Branding");
            sfApiQuery.Body = account;
            sfApiQuery.HttpMethod = "PATCH";	
		    return sfApiQuery;
        }
        /// <summary>
        /// Cancel an Operation Batch
        /// </summary>
        /// <remarks>
        /// Cancel an Async Operation batch - all unfinished Async Operation records in that batch
        /// will be moved to Cancelled state.
        /// </remarks>
        /// <param name="id"></param>
        /// <returns>
        /// A list of the modified Async Operations in the batch
        /// </returns>
        public IQuery<ODataFeed<AsyncOperation>> CancelBatch(string id)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query<ODataFeed<AsyncOperation>>(Client);
		    sfApiQuery.From("AsyncOperations");
		    sfApiQuery.Action("CancelBatch");
            sfApiQuery.ActionIds(id);
            sfApiQuery.HttpMethod = "POST";	
		    return sfApiQuery;
        }
        /// <summary>
        /// Get SSO Info
        /// </summary>
        /// <param name="subdomain"></param>
        /// <returns>
        /// SSOInfo
        /// </returns>
        public IQuery<SSOInfo> GetSSOInfo(string subdomain)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query<SSOInfo>(Client);
		    sfApiQuery.From("Accounts");
		    sfApiQuery.Action("SSOInfo");
            sfApiQuery.QueryString("subdomain", subdomain);
            sfApiQuery.HttpMethod = "GET";	
		    return sfApiQuery;
        }
        /// <summary>
        /// Update Account Single Sign-On Configuration
        /// </summary>
        /// <example>
        /// {
        /// "LogoutUrl":"",
        /// "LoginUrl":"https://idp.com/signin",
        /// "IPRestrictions":"+all",
        /// "ForceSSO":true,
        /// "EntityID":"http://account.sf-api.com/saml/info",
        /// "SFEntityID":"http://idp.com/saml/info",
        /// "SPInitatedAuthContext":"exact",
        /// "SPInitatedAuthMethod":"urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport"
        /// }
        /// </example>
        /// <remarks>
        /// Modifies the Single Sign-on Configuration for this account.
        /// </remarks>
        /// <param name="sso"></param>
        /// <param name="provider"></param>
        public IQuery<SSOAccountProvider> UpdateSSO(SSOAccountProvider sso, string provider = "saml")
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query<SSOAccountProvider>(Client);
		    sfApiQuery.From("Accounts");
		    sfApiQuery.Action("SSO");
            sfApiQuery.QueryString("provider", provider);
            sfApiQuery.Body = sso;
            sfApiQuery.HttpMethod = "PATCH";	
		    return sfApiQuery;
        }
        /// <summary>
        /// Get current Account
        /// </summary>
        /// <remarks>
        /// Retrieves information about the Account defined in the call subdomain
        /// </remarks>
        /// <param name="id"></param>
        /// <returns>
        /// The subdomain account information
        /// </returns>
        public IQuery<Account> Get(string id = null)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query<Account>(Client);
		    sfApiQuery.From("Accounts");
            sfApiQuery.QueryString("id", id);
            sfApiQuery.HttpMethod = "GET";	
		    return sfApiQuery;
        }
Beispiel #57
0
        /// <summary>
        /// Get Report Record by ID
        /// </summary>
        /// <remarks>
        /// Returns a single record.
        /// </remarks>
        /// <param name="id"></param>
        /// <returns>
        /// Single Record
        /// </returns>
        public IQuery<ReportRecord> GetRecord(string id)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query<ReportRecord>(Client);
		    sfApiQuery.From("Reports");
		    sfApiQuery.Action("Record");
            sfApiQuery.ActionIds(id);
            sfApiQuery.HttpMethod = "GET";	
		    return sfApiQuery;
        }
        /// <summary>
        /// Get List of Accounts for User
        /// </summary>
        /// <example>
        /// {
        /// "password":"******"
        /// }
        /// </example>
        /// <remarks>
        /// Retrieve the list of Accounts associated with a given user
        /// All parameters to this call may be passed in the Post body as root JSON parameters, or in the URI -
        /// with the exception of password that must be provided in the POST body.
        /// This operation does not require authentication
        /// </remarks>
        /// <param name="username"></param>
        /// <param name="password"></param>
        /// <param name="employeesonly"></param>
        /// <param name="requirehomefolders"></param>
        /// <param name="singleplane"></param>
        /// <returns>
        /// The list of Accounts associated with this username/password.
        /// </returns>
        public IQuery<ODataFeed<Account>> GetByUser(ODataObject parameters, string username, bool employeesonly = false, bool requirehomefolders = false, bool singleplane = false)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query<ODataFeed<Account>>(Client);
		    sfApiQuery.From("Accounts");
		    sfApiQuery.Action("GetByUser");
            parameters.AddProperty("username", username);
            parameters.AddProperty("employeesonly", employeesonly);
            parameters.AddProperty("requirehomefolders", requirehomefolders);
            parameters.AddProperty("singleplane", singleplane);
            sfApiQuery.Body = parameters;
            sfApiQuery.HttpMethod = "POST";	
		    return sfApiQuery;
        }
Beispiel #59
0
        /// <summary>
        /// Update Report
        /// </summary>
        /// <example>
        /// {
        /// "Title": "Usage Report",
        /// "ReportType": "Activity",
        /// "ObjectType": "Account",
        /// "ObjectId": "a024f83e-b147-437e-9f28-e7d03634af42",
        /// "DateOption": "Last30Days",
        /// "Frequency": "Once"
        /// }
        /// </example>
        /// <remarks>
        /// Updates an existing report
        /// </remarks>
        /// <param name="report"></param>
        /// <returns>
        /// the updated report
        /// </returns>
        public IQuery<Report> Update(Report report)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query<Report>(Client);
		    sfApiQuery.From("Reports");
            sfApiQuery.Body = report;
            sfApiQuery.HttpMethod = "PATCH";	
		    return sfApiQuery;
        }
        /// <summary>
        /// Get the Folder Access Control List of domains
        /// </summary>
        /// <remarks>
        /// Retrieve the list of domains that are allowed or disallowed to have access to folders. Whether the list is an allow or disallow list
        /// is configured by the AccessControlType property.
        /// 
        /// The list blocks user access to folders by preventing adding a user to distribution groups or folders.
        /// The domain names are checked against the domains of all the email addresses of the user.
        /// This is an account-wide setting.
        /// </remarks>
        /// <returns>
        /// The Folder Access Control List of domains for the Account, e.g.
        /// 
        /// {
        /// "AccessControlType" : "AllowedDomains",
        /// "Domains": ["domainA", "domainB", ...]
        /// }
        /// </returns>
        public IQuery<AccessControlDomains> GetFolderAccessControlDomains()
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query<AccessControlDomains>(Client);
		    sfApiQuery.From("Accounts");
		    sfApiQuery.Action("FolderAccessControlDomains");
            sfApiQuery.HttpMethod = "GET";	
		    return sfApiQuery;
        }