예제 #1
0
        /// <summary>
        /// Revoke App access for Current User
        /// </summary>
        /// <param name="userid"></param>
        /// <param name="appUrl"></param>
        /// <returns>
        /// no data on success
        /// </returns>
        public IQuery Delete(Uri appUrl)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);

            sfApiQuery.Uri(appUrl);
            sfApiQuery.HttpMethod = "DELETE";
            return(sfApiQuery);
        }
예제 #2
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);
        }
예제 #3
0
        /// <summary>
        /// Delete User Policies
        /// </summary>
        /// <remarks>
        /// Remove user from policy based admin
        /// </remarks>
        /// <param name="url"></param>
        public IQuery DeleteByUser(Uri url)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);

            sfApiQuery.Action("Policies");
            sfApiQuery.Uri(url);
            sfApiQuery.HttpMethod = "DELETE";
            return(sfApiQuery);
        }
예제 #4
0
        /// <summary>
        /// Remove all Favorite Items for a User
        /// </summary>
        /// <param name="userUrl"></param>
        public IQuery DeleteInBulkByUser(Uri userUrl)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);

            sfApiQuery.Action("Favorites");
            sfApiQuery.Uri(userUrl);
            sfApiQuery.HttpMethod = "DELETE";
            return(sfApiQuery);
        }
예제 #5
0
        /// <summary>
        /// Send Welcome Email
        /// </summary>
        /// <remarks>
        /// Resends the 'welcome' email to the given user
        /// </remarks>
        /// <param name="url"></param>
        public IQuery ResendWelcome(Uri url)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);

            sfApiQuery.Action("ResendWelcome");
            sfApiQuery.Uri(url);
            sfApiQuery.HttpMethod = "POST";
            return(sfApiQuery);
        }
예제 #6
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);
        }
예제 #7
0
        /// <summary>
        /// Revoke App access for a given User
        /// </summary>
        /// <param name="userUrl"></param>
        /// <param name="appid"></param>
        /// <returns>
        /// no data on success
        /// </returns>
        public IQuery DeleteByUser(Uri userUrl, string appid)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);

            sfApiQuery.Action("Apps");
            sfApiQuery.Uri(userUrl);
            sfApiQuery.ActionIds(appid);
            sfApiQuery.HttpMethod = "DELETE";
            return(sfApiQuery);
        }
예제 #8
0
        /// <summary>
        /// Revoke Two Factor Auth App by ID
        /// </summary>
        /// <param name="userUrl"></param>
        /// <param name="tfaAppId"></param>
        /// <returns>
        /// no data on success
        /// </returns>
        public IQuery DeleteTFA(Uri userUrl, string tfaAppId)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);

            sfApiQuery.Action("TFA");
            sfApiQuery.Uri(userUrl);
            sfApiQuery.ActionIds(tfaAppId);
            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);
        }
        /// <summary>
        /// Removes a Connector Group Access Control object
        /// </summary>
        /// <remarks>
        /// Removes an Access Control object from the Connector Group ACL. This removes the permissions of
        /// the affected principal to use the Connector Group.
        /// </remarks>
        /// <param name="serviceUrl"></param>
        /// <param name="zoneid"></param>
        public IQuery DeleteAccessControls(Uri serviceUrl, string zoneid)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);

            sfApiQuery.Action("AccessControls");
            sfApiQuery.Uri(serviceUrl);
            sfApiQuery.ActionIds(zoneid);
            sfApiQuery.HttpMethod = "DELETE";
            return(sfApiQuery);
        }
예제 #11
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);
        }
예제 #12
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);
        }
예제 #13
0
        /// <summary>
        /// Send EncryptedEmail
        /// </summary>
        /// <example>
        /// {
        /// "Message": {"Id": "messageFileId"},
        /// "Attachments": [{"Id": "id1"}, {"Id": "id2"}],
        /// }
        /// </example>
        /// <remarks>
        /// Sending an EncryptedEmail is a multi-step process:1. Create an empty EncryptedEmail using the "Create EncryptedEmail" or "Reply to EncryptedEmail" endpoints 2. Upload the message body as raw text or a text file using the "Upload EncryptedEmail Message" endpoint 3. Send the EncryptedEmail using the "Send EncryptedEmail" endpoint, providing the fileId uploaded in step 2 as
        /// the "Message" Item parameter. Provide a list of optional Item attachments during this step as well
        /// </remarks>
        /// <param name="url"></param>
        /// <param name="encryptedEmailSendParams"></param>
        public IQuery Send(Uri url, EncryptedEmailSendParams encryptedEmailSendParams)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);

            sfApiQuery.Action("Send");
            sfApiQuery.Uri(url);
            sfApiQuery.Body       = encryptedEmailSendParams;
            sfApiQuery.HttpMethod = "POST";
            return(sfApiQuery);
        }
예제 #14
0
        /// <summary>
        /// Replace the Favorite Items for a User with the given list of new Favorite Items
        /// </summary>
        /// <example>
        /// [
        /// {
        /// "Item": { "StreamID" : "item1StreamId" },
        /// "Alias" : "FileName1",
        /// "DisplayPosition" : 1
        /// },
        /// {
        /// "Item": { "StreamID" : "item2StreamId" },
        /// "Alias" : "FileName2",
        /// "DisplayPosition" : 2
        /// }
        /// ]
        /// </example>
        /// <remarks>
        /// The DisplayPosition and Alias for each Item should be unique
        /// </remarks>
        /// <param name="userUrl"></param>
        /// <param name="favoriteItems"></param>
        public IQuery PatchByUser(Uri userUrl, IEnumerable <Favorite> favoriteItems)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);

            sfApiQuery.Action("Favorites");
            sfApiQuery.Uri(userUrl);
            sfApiQuery.Body       = favoriteItems;
            sfApiQuery.HttpMethod = "PUT";
            return(sfApiQuery);
        }
예제 #15
0
        /// <summary>
        /// Delete StorageCenter
        /// </summary>
        /// <remarks>
        /// Removes an existing storage center
        /// </remarks>
        /// <param name="zUrl"></param>
        /// <param name="scid"></param>
        public IQuery DeleteByZone(Uri zUrl, string scid)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);

            sfApiQuery.Action("StorageCenters");
            sfApiQuery.Uri(zUrl);
            sfApiQuery.ActionIds(scid);
            sfApiQuery.HttpMethod = "DELETE";
            return(sfApiQuery);
        }
        /// <summary>
        /// Create or Update FavoriteFolders
        /// </summary>
        /// <example>
        /// [{
        /// Folder: {
        /// "Id":"fo96aec5-d637-4124-bcc9-c86fd7301e4d"
        /// }
        /// }]
        /// </example>
        /// <remarks>
        /// Replaces existing favorite folders with the folders provided. Any exisitng folders that are not specified will be removed.
        /// </remarks>
        /// <param name="url"></param>
        /// <param name="favoriteFolderList"></param>
        public IQuery PatchByUser(Uri url, IEnumerable <FavoriteFolder> favoriteFolderList)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);

            sfApiQuery.Action("FavoriteFolders");
            sfApiQuery.Uri(url);
            sfApiQuery.Body       = favoriteFolderList;
            sfApiQuery.HttpMethod = "PUT";
            return(sfApiQuery);
        }
예제 #17
0
        /// <summary>
        /// Delete Metadata
        /// </summary>
        /// <remarks>
        /// Deletes a single Metadata entry that has a specified Name for a given Item. Fails if an entry with the given name doesn't exist for this Item.
        /// </remarks>
        /// <param name="url"></param>
        /// <param name="metadataId"></param>
        /// <returns>
        /// (no data)
        /// </returns>
        public IQuery DeleteByItem(Uri url, string metadataId)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);

            sfApiQuery.Action("Metadata");
            sfApiQuery.Uri(url);
            sfApiQuery.ActionIds(metadataId);
            sfApiQuery.HttpMethod = "DELETE";
            return(sfApiQuery);
        }
        public IQuery DeleteByUser(Uri url, string itemId)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);

            sfApiQuery.Action("FavoriteFolders");
            sfApiQuery.Uri(url);
            sfApiQuery.ActionIds(itemId);
            sfApiQuery.HttpMethod = "DELETE";
            return(sfApiQuery);
        }
예제 #19
0
        /// <summary>
        /// Delete specific Device for given User
        /// </summary>
        /// <param name="parentUrl"></param>
        /// <param name="id"></param>
        /// <returns>
        /// No content
        /// </returns>
        public IQuery DeleteByUser(Uri parentUrl, string id)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);

            sfApiQuery.Action("Devices");
            sfApiQuery.Uri(parentUrl);
            sfApiQuery.ActionIds(id);
            sfApiQuery.HttpMethod = "DELETE";
            return(sfApiQuery);
        }
예제 #20
0
        /// <summary>
        /// Notify users that they have access to the parent folder
        /// </summary>
        /// <example>
        /// {
        /// UserIds: ["id1", "id2"],
        /// CustomMessage: "Message content goes here"
        /// }
        /// </example>
        /// <remarks>
        /// All users should have access to the parent folder
        /// </remarks>
        /// <param name="folderUrl"></param>
        /// <param name="notifyUsersParams"></param>
        public IQuery NotifyUsers(Uri folderUrl, NotifyUsersParams notifyUsersParams)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);

            sfApiQuery.Action("AccessControls");
            sfApiQuery.Uri(folderUrl);
            sfApiQuery.SubAction("NotifyUsers");
            sfApiQuery.Body       = notifyUsersParams;
            sfApiQuery.HttpMethod = "POST";
            return(sfApiQuery);
        }
예제 #21
0
        /// <summary>
        /// Delete multiple access controls
        /// </summary>
        /// <example>
        /// ["id1","id2"]
        /// </example>
        /// <param name="folderUrl"></param>
        /// <param name="principalIds"></param>
        public IQuery BulkDelete(Uri folderUrl, IEnumerable <string> principalIds)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);

            sfApiQuery.Action("AccessControls");
            sfApiQuery.Uri(folderUrl);
            sfApiQuery.SubAction("BulkDelete");
            sfApiQuery.Body       = principalIds;
            sfApiQuery.HttpMethod = "POST";
            return(sfApiQuery);
        }
예제 #22
0
        /// <summary>
        /// Discard checkout on a File
        /// </summary>
        /// <remarks>
        /// Discard a checkout on a file
        /// </remarks>
        /// <param name="url"></param>
        /// <param name="lockid"></param>
        public IQuery Discard(Uri url, string lockid)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);

            sfApiQuery.Action("FileLock");
            sfApiQuery.Uri(url);
            sfApiQuery.ActionIds(lockid);
            sfApiQuery.SubAction("Discard");
            sfApiQuery.HttpMethod = "POST";
            return(sfApiQuery);
        }
예제 #23
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);
        }
예제 #24
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);
        }
예제 #25
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);
        }
예제 #26
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;
        }
예제 #27
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;
        }
예제 #28
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;
        }
예제 #29
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;
 }
예제 #30
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;
        }
예제 #31
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;
 }
예제 #32
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;
 }
예제 #33
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;
        }
        /// <summary>
        /// Removes a Connector Group Access Control object
        /// </summary>
        /// <remarks>
        /// Removes an Access Control object from the Connector Group ACL. This removes the permissions of
        /// the affected principal to use the Connector Group.
        /// </remarks>
        /// <param name="serviceUrl"></param>
        /// <param name="zoneid"></param>
        public IQuery DeleteAccessControls(Uri serviceUrl, string zoneid)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);
		    sfApiQuery.Action("AccessControls");
            sfApiQuery.Uri(serviceUrl);
            sfApiQuery.ActionIds(zoneid);
            sfApiQuery.HttpMethod = "DELETE";	
		    return sfApiQuery;
        }
        public IQuery DeleteByUser(Uri url, string itemId)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);
		    sfApiQuery.Action("FavoriteFolders");
            sfApiQuery.Uri(url);
            sfApiQuery.ActionIds(itemId);
            sfApiQuery.HttpMethod = "DELETE";	
		    return sfApiQuery;
        }
예제 #36
0
        /// <summary>
        /// Notify users that they have access to the parent folder
        /// </summary>
        /// <example>
        /// [
        /// {
        /// UserIds: ["id1", "id2"],
        /// CustomMessage: "Message content goes here"
        /// }
        /// ]
        /// </example>
        /// <remarks>
        /// All users should have access to the parent folder
        /// </remarks>
        /// <param name="folderUrl"></param>
        /// <param name="notifyUsersParams"></param>
        public IQuery NotifyUsers(Uri folderUrl, NotifyUsersParams notifyUsersParams)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);
		    sfApiQuery.Action("AccessControls");
            sfApiQuery.Uri(folderUrl);
            sfApiQuery.SubAction("NotifyUsers");
            sfApiQuery.Body = notifyUsersParams;
            sfApiQuery.HttpMethod = "POST";	
		    return sfApiQuery;
        }
예제 #37
0
        /// <summary>
        /// Delete Metadata
        /// </summary>
        /// <remarks>
        /// Deletes a single Metadata entry that has a specified Name for a given Item. Fails if an entry with the given name doesn't exist for this Item.
        /// </remarks>
        /// <param name="url"></param>
        /// <param name="metadataId"></param>
        /// <returns>
        /// (no data)
        /// </returns>
        public IQuery DeleteByItem(Uri url, string metadataId)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);
		    sfApiQuery.Action("Metadata");
            sfApiQuery.Uri(url);
            sfApiQuery.ActionIds(metadataId);
            sfApiQuery.HttpMethod = "DELETE";	
		    return sfApiQuery;
        }
예제 #38
0
        /// <summary>
        /// Delete StorageCenter
        /// </summary>
        /// <remarks>
        /// Removes an existing storage center
        /// </remarks>
        /// <param name="zUrl"></param>
        /// <param name="scid"></param>
        public IQuery DeleteByZone(Uri zUrl, string scid)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);
		    sfApiQuery.Action("StorageCenters");
            sfApiQuery.Uri(zUrl);
            sfApiQuery.ActionIds(scid);
            sfApiQuery.HttpMethod = "DELETE";	
		    return sfApiQuery;
        }
예제 #39
0
        /// <summary>
        /// Delete Report
        /// </summary>
        /// <remarks>
        /// Removes a report from the system
        /// </remarks>
        /// <param name="url"></param>
        public IQuery Delete(Uri url)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);
            sfApiQuery.Uri(url);
            sfApiQuery.HttpMethod = "DELETE";	
		    return sfApiQuery;
        }
예제 #40
0
        /// <summary>
        /// Delete multiple access controls
        /// </summary>
        /// <example>
        /// ["id1","id2",...]
        /// </example>
        /// <param name="folderUrl"></param>
        /// <param name="principalIds"></param>
        public IQuery BulkDelete(Uri folderUrl, IEnumerable<string> principalIds)
        {
            var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);
		    sfApiQuery.Action("AccessControls");
            sfApiQuery.Uri(folderUrl);
            sfApiQuery.SubAction("BulkDelete");
            sfApiQuery.Body = principalIds;
            sfApiQuery.HttpMethod = "POST";	
		    return sfApiQuery;
        }
예제 #41
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;
        }
예제 #42
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;
 }
예제 #43
0
 public IQuery CheckOut(Uri url)
 {
     var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);
     sfApiQuery.Action("CheckOut");
     sfApiQuery.Uri(url);
     sfApiQuery.HttpMethod = "POST";
     return sfApiQuery;
 }
예제 #44
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;
 }
예제 #45
0
 /// <summary>
 /// Send Welcome Email
 /// </summary>
 /// <remarks>
 /// Resends the 'welcome' email to the given user
 /// </remarks>
 /// <param name="url"></param>
 public IQuery ResendWelcome(Uri url)
 {
     var sfApiQuery = new ShareFile.Api.Client.Requests.Query(Client);
     sfApiQuery.Action("ResendWelcome");
     sfApiQuery.Uri(url);
     sfApiQuery.HttpMethod = "POST";
     return sfApiQuery;
 }
예제 #46
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;
        }
예제 #47
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;
        }