问题
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