/// <summary>
        /// Logout
        /// </summary>
        /// <remarks>
        /// Logout the current session - invalidate the current Session ID
        /// </remarks>
        public IQuery Delete()
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);

            sfApiQuery.From("Sessions");
            sfApiQuery.HttpMethod = "DELETE";
            return(sfApiQuery);
        }
        public IQuery GetSamlMetadata()
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);

            sfApiQuery.From("saml");
            sfApiQuery.Action("metadata");
            sfApiQuery.HttpMethod = "GET";
            return(sfApiQuery);
        }
Example #3
0
        public IQuery Delete(string id)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);

            sfApiQuery.From("RemoteUploads");
            sfApiQuery.QueryString("id", id);
            sfApiQuery.HttpMethod = "DELETE";
            return(sfApiQuery);
        }
Example #4
0
        /// <summary>
        /// Deliver an existing share link to one or more recipients
        /// </summary>
        /// <remarks>
        /// Sends an Email to the specified list of addresses, containing a link to a download or an upload.
        /// </remarks>
        /// <param name="parameters"></param>
        public IQuery Resend(ShareResendParams parameters)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);

            sfApiQuery.From("Shares");
            sfApiQuery.Action("Resend");
            sfApiQuery.Body       = parameters;
            sfApiQuery.HttpMethod = "POST";
            return(sfApiQuery);
        }
Example #5
0
        /// <summary>
        /// Delete domains from the Folder Access Control List of domains
        /// </summary>
        /// <example>
        /// {
        /// "AccessControlType" : "AllowedDomains",
        /// "Domains": ["domainA", "domainB", ...]
        /// }
        /// </example>
        /// <remarks>
        /// Deletes the specified domains from the list.
        /// </remarks>
        /// <param name="AccessControlType"></param>
        /// <param name="Domains"></param>
        /// <returns>
        /// No content
        /// </returns>
        public IQuery DeleteFolderAccessControlDomains(AccessControlDomains accessControlDomains)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);

            sfApiQuery.From("Accounts");
            sfApiQuery.Action("FolderAccessControlDomains");
            sfApiQuery.Body       = accessControlDomains;
            sfApiQuery.HttpMethod = "DELETE";
            return(sfApiQuery);
        }
Example #6
0
        /// <summary>
        /// Email List of Accounts to User
        /// </summary>
        /// <remarks>
        /// Sends the list of accounts to the specified email address
        /// This operation does not require authentication
        /// </remarks>
        /// <param name="email"></param>
        public IQuery SendToEmail(string email)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);

            sfApiQuery.From("Accounts");
            sfApiQuery.Action("SendToEmail");
            sfApiQuery.QueryString("email", email);
            sfApiQuery.HttpMethod = "POST";
            return(sfApiQuery);
        }
Example #7
0
        /// <summary>
        /// Revoke Two Factor Auth App by ID
        /// </summary>
        /// <param name="tfaAppId"></param>
        /// <returns>
        /// no data on success
        /// </returns>
        public IQuery DeleteTFA(string tfaAppId)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);

            sfApiQuery.From("Apps");
            sfApiQuery.Action("TFA");
            sfApiQuery.ActionIds(tfaAppId);
            sfApiQuery.HttpMethod = "DELETE";
            return(sfApiQuery);
        }
Example #8
0
        /// <summary>
        /// Confirm the current user logging in for the first time
        /// </summary>
        /// <example>
        /// {
        /// "FirstName":"",
        /// "LastName":"",
        /// "Company":"",
        /// "Password":"",
        /// "DayLightName":"",
        /// "UTCOffset":"",
        /// "DateFormat":"",
        /// "TimeFormat":"",
        /// "EmailInterval":0
        /// }
        /// </example>
        /// <param name="settings"></param>
        /// <returns>
        /// no data on success
        /// </returns>
        public IQuery Confirm(UserConfirmationSettings settings)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);

            sfApiQuery.From("Users");
            sfApiQuery.Action("Confirm");
            sfApiQuery.Body       = settings;
            sfApiQuery.HttpMethod = "POST";
            return(sfApiQuery);
        }
Example #9
0
        /// <summary>
        /// Get JSON Data
        /// </summary>
        /// <remarks>
        /// Get the JSON data for a report
        /// </remarks>
        /// <param name="id"></param>
        /// <returns>
        /// JSON Formatted Report Results
        /// </returns>
        public IQuery GetJsonData(string id)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);

            sfApiQuery.From("Reports");
            sfApiQuery.Action("Records");
            sfApiQuery.ActionIds(id);
            sfApiQuery.SubAction("JsonData");
            sfApiQuery.HttpMethod = "GET";
            return(sfApiQuery);
        }
Example #10
0
        /// <summary>
        /// Delete multiple access controls for principal
        /// </summary>
        /// <example>
        /// ["id1","id2"]
        /// </example>
        /// <param name="principalId"></param>
        /// <param name="folderIds"></param>
        public IQuery BulkDeleteForPrincipal(IEnumerable <string> folderIds, string principalId)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);

            sfApiQuery.From("AccessControls");
            sfApiQuery.Action("BulkDeleteForPrincipal");
            sfApiQuery.QueryString("principalId", principalId);
            sfApiQuery.Body       = folderIds;
            sfApiQuery.HttpMethod = "POST";
            return(sfApiQuery);
        }
Example #11
0
        /// <summary>
        /// Forgot Password
        /// </summary>
        /// <remarks>
        /// Triggers a reset password email
        /// </remarks>
        /// <param name="email"></param>
        /// <param name="resetOnMobile"></param>
        public IQuery ForgotPassword(string email, bool resetOnMobile = false)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);

            sfApiQuery.From("Users");
            sfApiQuery.Action("ForgotPassword");
            sfApiQuery.QueryString("email", email);
            sfApiQuery.QueryString("resetOnMobile", resetOnMobile);
            sfApiQuery.HttpMethod = "POST";
            return(sfApiQuery);
        }
Example #12
0
        /// <summary>
        /// Delete domains from the Folder Access Control List of domains
        /// </summary>
        /// <example>
        /// {
        /// "AccessControlType" : "AllowedDomains",
        /// "Domains": ["domainA", "domainB", ...]
        /// }
        /// </example>
        /// <remarks>
        /// Deletes the specified domains from the list.
        /// </remarks>
        /// <param name="AccessControlType"></param>
        /// <param name="Domains"></param>
        /// <returns>
        /// No content
        /// </returns>
        public IQuery DeleteFolderAccessControlDomains(AccessControlDomains accessControlDomains)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);
		    sfApiQuery.From("Accounts");
		    sfApiQuery.Action("FolderAccessControlDomains");
            sfApiQuery.Body = accessControlDomains;
            sfApiQuery.HttpMethod = "DELETE";	
		    return sfApiQuery;
        }
Example #13
0
        /// <summary>
        /// Email List of Accounts to User
        /// </summary>
        /// <remarks>
        /// Sends the list of accounts to the specified email address
        /// This operation does not require authentication
        /// </remarks>
        /// <param name="email"></param>
        public IQuery SendToEmail(string email)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);
		    sfApiQuery.From("Accounts");
		    sfApiQuery.Action("SendToEmail");
            sfApiQuery.QueryString("email", email);
            sfApiQuery.HttpMethod = "POST";	
		    return sfApiQuery;
        }
Example #14
0
 /// <summary>
 /// Confirm the current user logging in for the first time
 /// </summary>
 /// <example>
 /// {
 /// "FirstName":"",
 /// "LastName":"",
 /// "Company":"",
 /// "Password":"",
 /// "DayLightName":"",
 /// "UTCOffset":"",
 /// "DateFormat":"",
 /// "TimeFormat":"",
 /// "EmailInterval":0
 /// }
 /// </example>
 /// <param name="settings"></param>
 /// <returns>
 /// no data on success
 /// </returns>
 public IQuery Confirm(UserConfirmationSettings settings)
 {
     var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);
     sfApiQuery.From("Users");
     sfApiQuery.Action("Confirm");
     sfApiQuery.Body = settings;
     sfApiQuery.HttpMethod = "POST";
     return sfApiQuery;
 }
 /// <summary>
 /// Logout
 /// </summary>
 /// <remarks>
 /// Logout the current session - invalidate the current Session ID
 /// </remarks>
 public IQuery Delete()
 {
     var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);
     sfApiQuery.From("Sessions");
     sfApiQuery.HttpMethod = "DELETE";
     return sfApiQuery;
 }
Example #16
0
 /// <summary>
 /// Forgot Password
 /// </summary>
 /// <remarks>
 /// Triggers a reset password email
 /// </remarks>
 /// <param name="email"></param>
 /// <param name="resetOnMobile"></param>
 public IQuery ForgotPassword(string email, bool resetOnMobile = false)
 {
     var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);
     sfApiQuery.From("Users");
     sfApiQuery.Action("ForgotPassword");
     sfApiQuery.QueryString("email", email);
     sfApiQuery.QueryString("resetOnMobile", resetOnMobile);
     sfApiQuery.HttpMethod = "POST";
     return sfApiQuery;
 }
Example #17
0
 /// <summary>
 /// Deliver an existing share link to one or more recipients
 /// </summary>
 /// <remarks>
 /// Sends an Email to the specified list of addresses, containing a link to a download or an upload.
 /// </remarks>
 /// <param name="parameters"></param>
 public IQuery Resend(ShareResendParams parameters)
 {
     var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);
     sfApiQuery.From("Shares");
     sfApiQuery.Action("Resend");
     sfApiQuery.Body = parameters;
     sfApiQuery.HttpMethod = "POST";
     return sfApiQuery;
 }
Example #18
0
        /// <summary>
        /// Get spreadsheet data
        /// </summary>
        /// <remarks>
        /// Get the spreadsheet data for a report
        /// </remarks>
        /// <param name="id"></param>
        /// <returns>
        /// Excel Formatted Report Results
        /// </returns>
        public IQuery DownloadData(string id)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);
		    sfApiQuery.From("Reports");
		    sfApiQuery.Action("Records");
            sfApiQuery.ActionIds(id);
            sfApiQuery.SubAction("DownloadData");
            sfApiQuery.HttpMethod = "GET";	
		    return sfApiQuery;
        }
Example #19
0
 /// <summary>
 /// Restore expired items to their original locations
 /// </summary>
 /// <param name="ids"></param>
 public IQuery BulkRestore(IEnumerable<string> ids)
 {
     var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);
     sfApiQuery.From("Items");
     sfApiQuery.Action("BulkRestore");
     sfApiQuery.Body = ids;
     sfApiQuery.HttpMethod = "POST";
     return sfApiQuery;
 }