【问题标题】:How do I delete a ShareFile folder using the v3 ShareFile API?如何使用 v3 ShareFile API 删除 ShareFile 文件夹?
【发布时间】:2020-07-01 19:39:48
【问题描述】:

我正在尝试使用 v3 ShareFile Rest API 删除 ShareFile 中的文件夹。我正在从旧的 v1 API 迁移,迁移文档引用 /sf/v3/Items/BulkDeletePermanently 作为替代品,但我无法让它工作。 这是我的批量删除调用和结果:

POST https://[ShareFileHost].sharefile.com/sf/v3/Items/BulkDeletePermanently?ids=[folder id]
Returns:
   <code>BadRequest</code>
   <message>
      <lang>en-US</lang>
      <value>Missing Item Id</value>
   </message>
   <reason>BadRequest</reason>

我已经尝试使用 ids 作为参数调用此调用,并将其作为 Post QueryString 和 PostData。

我还尝试使用 /sf/v3/Items 删除。这是我的电话和结果:

DELETE https://[ShareFileHost].sharefile.com/sf/v3/Items([folder id])
Returns:

       <code>Forbidden</code>
       <message>
          <lang>en-US</lang>
          <value>Authorization failed: Item.You are not authorized to perform this operation.</value>
       </message>
       <reason>NotAuthorized</reason>

我通过此调用验证我的用户对我要删除的文件夹具有删除功能。 任何建议将不胜感激。

【问题讨论】:

    标签: sharefile


    【解决方案1】:

    我找到了答案。在查看权限时,我正在查看我的子文件夹。需要在父文件夹上的权限。我创建了一个父文件夹并授予我的用户删除权限。然后,我向其中添加了一个子文件夹,并且可以使用带有 /sf/v3/Items 的 DELETE 将其删除。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-05-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-02-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多