Folder/File smart link enable/disable call in Box V2 API

♀尐吖头ヾ 提交于 2019-12-25 07:48:25

问题


Recently an article on the box dev blog talked about an update in the V2 API functionality. http://developers.blog.box.com/2012/07/13/more-v2-updates/.

I am specifically talking about the share link for file/folders. The article says the API can be used to create/delete share links and also change the permission.But i do not see any such API on the http://developers.box.com/docs page.

Does anybody have any idea about this discrepancy? Is this available now in V2 or not?


回答1:


Smart links are treated as an attribute of a folder or file and can be created by updating the metadata about the folder or file. This is done through the PUT method. You can see this here for files and here for folders.

For example, if you wanted to enable a shared link for a file you would make this call using cURL:

curl https://api.box.com/2.0/files/FILE_ID \
-H "Authorization: BoxAuth api_key=API_KEY&auth_token=AUTH_TOKEN" \
-d {"shared_link": {"access": "open"}} \
-X PUT


来源:https://stackoverflow.com/questions/11684640/folder-file-smart-link-enable-disable-call-in-box-v2-api

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!