示例#1
0
        /// <summary>
        /// Delete Zone
        /// </summary>
        /// <remarks>
        /// Removes an existing zone
        /// </remarks>
        /// <param name="url"></param>
        /// <param name="force"></param>
        /// <param name="newDefaultZoneId"></param>
        public IQuery Delete(Uri url, bool force = false, string newDefaultZoneId = null)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);

            sfApiQuery.Uri(url);
            sfApiQuery.QueryString("force", force);
            sfApiQuery.QueryString("newDefaultZoneId", newDefaultZoneId);
            sfApiQuery.HttpMethod = "DELETE";
            return(sfApiQuery);
        }
示例#2
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);
        }
示例#3
0
        /// <summary>
        /// Remove a tenant from a multi-tenant zone
        /// </summary>
        /// <param name="parentUrl"></param>
        /// <param name="id"></param>
        /// <param name="newDefaultZoneId"></param>
        /// <param name="expireItems"></param>
        public IQuery DeleteTenants(Uri parentUrl, string id, string newDefaultZoneId, bool expireItems = false)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);

            sfApiQuery.Action("Tenants");
            sfApiQuery.Uri(parentUrl);
            sfApiQuery.ActionIds(id);
            sfApiQuery.QueryString("newDefaultZoneId", newDefaultZoneId);
            sfApiQuery.QueryString("expireItems", expireItems);
            sfApiQuery.HttpMethod = "DELETE";
            return(sfApiQuery);
        }
示例#4
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);
        }
示例#5
0
        /// <summary>
        /// Delete User
        /// </summary>
        /// <remarks>
        /// Removes an user
        /// </remarks>
        /// <param name="url"></param>
        /// <param name="completely"></param>
        public IQuery Delete(Uri url, bool completely = false)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);

            sfApiQuery.Uri(url);
            sfApiQuery.QueryString("completely", completely);
            sfApiQuery.HttpMethod = "DELETE";
            return(sfApiQuery);
        }
示例#6
0
        /// <summary>
        /// Save a folder to a folder location
        /// </summary>
        /// <param name="reportUrl"></param>
        /// <param name="folderId"></param>
        public IQuery Move(Uri reportUrl, string folderId)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);

            sfApiQuery.Action("Move");
            sfApiQuery.Uri(reportUrl);
            sfApiQuery.QueryString("folderId", folderId);
            sfApiQuery.HttpMethod = "POST";
            return(sfApiQuery);
        }
示例#7
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);
        }
示例#8
0
        /// <summary>
        /// Delete Zone Metadata
        /// </summary>
        /// <remarks>
        /// Delete the Metadata entry associated with the specified zone
        /// </remarks>
        /// <param name="url"></param>
        /// <param name="name"></param>
        /// <returns>
        /// no data on success
        /// </returns>
        public IQuery DeleteMetadata(Uri url, string name)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);

            sfApiQuery.Action("Metadata");
            sfApiQuery.Uri(url);
            sfApiQuery.QueryString("name", name);
            sfApiQuery.HttpMethod = "DELETE";
            return(sfApiQuery);
        }
示例#9
0
        /// <summary>
        /// Unlock Device
        /// </summary>
        /// <param name="deviceUrl"></param>
        /// <param name="userid"></param>
        /// <returns>
        /// no data on success
        /// </returns>
        public IQuery Unlock(Uri deviceUrl, string userid = null)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);

            sfApiQuery.Action("Unlock");
            sfApiQuery.Uri(deviceUrl);
            sfApiQuery.QueryString("userid", userid);
            sfApiQuery.HttpMethod = "POST";
            return(sfApiQuery);
        }
示例#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);
        }
示例#11
0
        /// <summary>
        /// Delete StorageCenter Metadata
        /// </summary>
        /// <remarks>
        /// Delete the Metadata entry associated with the specified storage center
        /// </remarks>
        /// <param name="zUrl"></param>
        /// <param name="scid"></param>
        /// <param name="name"></param>
        /// <returns>
        /// no data on success
        /// </returns>
        public IQuery DeleteMetadata(Uri zUrl, string scid, string name)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);

            sfApiQuery.Action("StorageCenters");
            sfApiQuery.Uri(zUrl);
            sfApiQuery.ActionIds(scid);
            sfApiQuery.SubAction("Metadata");
            sfApiQuery.QueryString("name", name);
            sfApiQuery.HttpMethod = "DELETE";
            return(sfApiQuery);
        }
示例#12
0
        /// <summary>
        /// Download Multiple Items from a Share for a Recipient
        /// </summary>
        /// <example>
        /// ["id1","id2",...]
        /// </example>
        /// <remarks>
        /// Download Multiple Items from a Share for a Recipient. The download will contain a ZIP archive containing all
        /// files and folders in the share, named Files.zip.To download Shares that require user informaion ( Email, First Name, Last Name and Company), make sure
        /// to create an Recipient (alias) and pass in the alaisId.To download Shares that require authentication, make sure this request is authenticated.
        /// Anyone can download files from anonymous shares.
        /// </remarks>
        /// <param name="shareUrl"></param>
        /// <param name="aliasid"></param>
        /// <param name="ids"></param>
        /// <param name="redirect"></param>
        /// <returns>
        /// Redirects the caller (302) to the download address for the share contents.
        /// </returns>
        public IQuery BulkDownload(Uri shareUrl, string aliasid, IEnumerable <string> ids, bool redirect = true)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);

            sfApiQuery.Action("Recipients");
            sfApiQuery.Uri(shareUrl);
            sfApiQuery.ActionIds(aliasid);
            sfApiQuery.SubAction("BulkDownload");
            sfApiQuery.QueryString("redirect", redirect);
            sfApiQuery.Body       = ids;
            sfApiQuery.HttpMethod = "POST";
            return(sfApiQuery);
        }
示例#13
0
        /// <summary>
        /// Check if template is already part of an existing template structure
        /// </summary>
        /// <param name="url"></param>
        public IQuery CheckTemplateOwned(Uri url, string id)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);
		    sfApiQuery.Action("CheckTemplateOwned");
            sfApiQuery.Uri(url);
            sfApiQuery.QueryString("parentid", id);
            sfApiQuery.HttpMethod = "POST";	
		    return sfApiQuery;
        }
示例#14
0
        /// <summary>
        /// Delete Zone Metadata
        /// </summary>
        /// <remarks>
        /// Delete the Metadata entry associated with the specified zone
        /// </remarks>
        /// <param name="url"></param>
        /// <param name="name"></param>
        /// <returns>
        /// no data on success
        /// </returns>
        public IQuery DeleteMetadata(Uri url, string name)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);
		    sfApiQuery.Action("Metadata");
            sfApiQuery.Uri(url);
            sfApiQuery.QueryString("name", name);
            sfApiQuery.HttpMethod = "DELETE";	
		    return sfApiQuery;
        }
示例#15
0
        /// <summary>
        /// Remove a tenant from a multi-tenant zone
        /// </summary>
        /// <param name="parentUrl"></param>
        /// <param name="id"></param>
        /// <param name="newDefaultZoneId"></param>
        /// <param name="expireItems"></param>
        public IQuery DeleteTenants(Uri parentUrl, string id, string newDefaultZoneId, bool expireItems = false)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);
		    sfApiQuery.Action("Tenants");
            sfApiQuery.Uri(parentUrl);
            sfApiQuery.ActionIds(id);
            sfApiQuery.QueryString("newDefaultZoneId", newDefaultZoneId);
            sfApiQuery.QueryString("expireItems", expireItems);
            sfApiQuery.HttpMethod = "DELETE";	
		    return sfApiQuery;
        }
示例#16
0
        public IQuery Delete(Uri url, bool force = false, string newDefaultZoneId = null)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);
            sfApiQuery.Uri(url);
            sfApiQuery.QueryString("force", force);
            sfApiQuery.QueryString("newDefaultZoneId", newDefaultZoneId);
            sfApiQuery.HttpMethod = "DELETE";	
		    return sfApiQuery;
        }
示例#17
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;
        }
示例#18
0
 /// <summary>
 /// Download Multiple Items from a Share for a Recipient
 /// </summary>
 /// <example>
 /// ["id1","id2",...]
 /// </example>
 /// <remarks>
 /// Download Multiple Items from a Share for a Recipient. The download will contain a ZIP archive containing all
 /// files and folders in the share, named Files.zip.To download Shares that require user informaion ( Email, First Name, Last Name and Company), make sure
 /// to create an Recipient (alias) and pass in the alaisId.To download Shares that require authentication, make sure this request is authenticated.
 /// Anyone can download files from anonymous shares.
 /// </remarks>
 /// <param name="shareUrl"></param>
 /// <param name="aliasid"></param>
 /// <param name="ids"></param>
 /// <param name="redirect"></param>
 /// <returns>
 /// Redirects the caller (302) to the download address for the share contents.
 /// </returns>
 public IQuery BulkDownload(Uri shareUrl, string aliasid, IEnumerable<string> ids, bool redirect = true)
 {
     var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);
     sfApiQuery.Action("Recipients");
     sfApiQuery.Uri(shareUrl);
     sfApiQuery.ActionIds(aliasid);
     sfApiQuery.SubAction("BulkDownload");
     sfApiQuery.QueryString("redirect", redirect);
     sfApiQuery.Body = ids;
     sfApiQuery.HttpMethod = "POST";
     return sfApiQuery;
 }
示例#19
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;
 }
示例#20
0
 /// <summary>
 /// Unlock File
 /// </summary>
 /// <remarks>
 /// Unlock a locked file.
 /// This operation is only implemented in Sharepoint providers (/sp)
 /// </remarks>
 /// <param name="url"></param>
 /// <param name="message"></param>
 public IQuery CheckIn(Uri url, string message = null)
 {
     var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);
     sfApiQuery.Action("CheckIn");
     sfApiQuery.Uri(url);
     sfApiQuery.QueryString("message", message);
     sfApiQuery.HttpMethod = "POST";
     return sfApiQuery;
 }
        /// <summary>
        /// Delete StorageCenter Metadata
        /// </summary>
        /// <remarks>
        /// Delete the Metadata entry associated with the specified storage center
        /// </remarks>
        /// <param name="zUrl"></param>
        /// <param name="scid"></param>
        /// <param name="name"></param>
        /// <returns>
        /// no data on success
        /// </returns>
        public IQuery DeleteMetadata(Uri zUrl, string scid, string name)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);
		    sfApiQuery.Action("StorageCenters");
            sfApiQuery.Uri(zUrl);
            sfApiQuery.ActionIds(scid);
            sfApiQuery.SubAction("Metadata");
            sfApiQuery.QueryString("name", name);
            sfApiQuery.HttpMethod = "DELETE";	
		    return sfApiQuery;
        }
示例#22
0
        /// <summary>
        /// Check if a versioning change would result in file deletions
        /// </summary>
        /// <param name="url"></param>
        /// <param name="newMaxVersions"></param>
        public IQuery CheckVersioningViolation(Uri url, string id, int newMaxVersions)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);
		    sfApiQuery.Action("CheckVersioningViolation");
            sfApiQuery.Uri(url);
            sfApiQuery.QueryString("parentid", id);
            sfApiQuery.QueryString("newMaxVersions", newMaxVersions);
            sfApiQuery.HttpMethod = "POST";	
		    return sfApiQuery;
        }
示例#23
0
 /// <summary>
 /// Delete Item
 /// </summary>
 /// <remarks>
 /// Removes an item
 /// </remarks>
 /// <param name="url"></param>
 /// <param name="singleversion"></param>
 /// <param name="forceSync"></param>
 public IQuery Delete(Uri url, bool singleversion = false, bool forceSync = false)
 {
     var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);
     sfApiQuery.Uri(url);
     sfApiQuery.QueryString("singleversion", singleversion);
     sfApiQuery.QueryString("forceSync", forceSync);
     sfApiQuery.HttpMethod = "DELETE";
     return sfApiQuery;
 }
示例#24
0
 /// <summary>
 /// Delete User
 /// </summary>
 /// <remarks>
 /// Removes an user
 /// </remarks>
 /// <param name="url"></param>
 /// <param name="completely"></param>
 public IQuery Delete(Uri url, bool completely = false)
 {
     var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);
     sfApiQuery.Uri(url);
     sfApiQuery.QueryString("completely", completely);
     sfApiQuery.HttpMethod = "DELETE";
     return sfApiQuery;
 }
示例#25
0
 /// <summary>
 /// Delete Multiple Items
 /// </summary>
 /// <example>
 /// ["id1","id2",...]
 /// </example>
 /// <remarks>
 /// All items in bulk delete must be children of the same parent, identified in the URI
 /// </remarks>
 /// <param name="id"></param>
 /// <param name="body"></param>
 /// <param name="forceSync"></param>
 /// <param name="deletePermanently"></param>
 public IQuery BulkDelete(Uri url, IEnumerable<string> ids, bool forceSync = false, bool deletePermanently = false)
 {
     var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);
     sfApiQuery.Action("BulkDelete");
     sfApiQuery.Uri(url);
     sfApiQuery.QueryString("forceSync", forceSync);
     sfApiQuery.QueryString("deletePermanently", deletePermanently);
     sfApiQuery.Body = ids;
     sfApiQuery.HttpMethod = "POST";
     return sfApiQuery;
 }
示例#26
0
        /// <summary>
        /// Save a folder to a folder location
        /// </summary>
        /// <param name="reportUrl"></param>
        /// <param name="folderId"></param>
        public IQuery Move(Uri reportUrl, string folderId)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);
		    sfApiQuery.Action("Move");
            sfApiQuery.Uri(reportUrl);
            sfApiQuery.QueryString("folderId", folderId);
            sfApiQuery.HttpMethod = "POST";	
		    return sfApiQuery;
        }
示例#27
0
        /// <summary>
        /// Remove folder template association from folder
        /// </summary>
        /// <param name="url"></param>
        public IQuery RemoveTemplateAssociation(Uri url, string id)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);
		    sfApiQuery.Action("RemoveTemplateAssociation");
            sfApiQuery.Uri(url);
            sfApiQuery.QueryString("parentid", id);
            sfApiQuery.HttpMethod = "POST";	
		    return sfApiQuery;
        }