Restore Web Link

Restore Web Link

To restore a web link that has been moved to the trash, but has not yet been purged, make a POST request to the /web_links/:web_link_id endpoint. This will place the web link in the original parent folder if it is still available, you optionally can specify a parent folder.

cURL
curl -i -X POST "https://api.box.com/2.0/web_links/12345" \
     -H "authorization: Bearer <ACCESS_TOKEN>"
TypeScript Gen
await client.trashedWebLinks.restoreWeblinkFromTrash(weblink.id);
Python Gen
client.trashed_web_links.restore_weblink_from_trash(weblink.id)
.NET Gen
await client.TrashedWebLinks.RestoreWeblinkFromTrashAsync(webLinkId: weblink.Id);
Swift Gen (Beta)
try await client.trashedWebLinks.restoreWeblinkFromTrash(webLinkId: weblink.id)
Python
web_link_to_restore = client.web_link(web_link_id='33333')
restored_web_link = client.trash().restore_item(web_link_to_restore)
print(f'Web link ID is {restored_web_link.id} and name is {restored_web_link.name}')