Box Developer Documentation

Get trashed web link

get
https://api.box.com/2.0
/web_links/:web_link_id/trash

Retrieves a web link that has been moved to the trash.

Request

bearer [ACCESS_TOKEN]
application/json

Path Parameters

Query Parameters

string arrayin queryoptional
id,type,name

A comma-separated list of attributes to include in the response. This can be used to request fields that are not normally returned in a standard response.

Be aware that specifying this parameter will have the effect that none of the standard fields are returned in the response unless explicitly specified, instead only fields for the mini representation are returned, additional to the fields requested.

Response

application/jsonTrashed Web Link

Returns the web link that was trashed, including information about when the it was moved to the trash.

application/jsonClient error

Returns an error if the web link is not in the trash.

application/jsonClient error

An unexpected client error.

get
Get trashed web link
You can now try out some of our APIs live, right here in the documentation.
Log in

Request Example

cURL
curl -i -X GET "https://api.box.com/2.0/web_links/12345/trash" \
     -H "authorization: Bearer <ACCESS_TOKEN>"
TypeScript Gen
await client.trashedWebLinks.getTrashedWebLinkById(weblink.id);
Python Gen
client.trashed_web_links.get_trashed_web_link_by_id(weblink.id)
.NET Gen
await client.TrashedWebLinks.GetTrashedWebLinkByIdAsync(webLinkId: weblink.Id);
Swift Gen (Beta)
try await client.trashedWebLinks.getTrashedWebLinkById(webLinkId: weblink.id)
Python
web_link = client.web_link(web_link_i='33333')
web_link_from_trash = client.trash().get_item(web_link)
print(f'Web link ID is {web_link_from_trash.id} and name is {web_link_from_trash.name}')

Response Example

{
  "id": "11446498",
  "type": "web_link",
  "created_at": "2012-12-12T10:53:43-08:00",
  "created_by": {
    "id": "11446498",
    "type": "user",
    "login": "ceo@example.com",
    "name": "Aaron Levie"
  },
  "description": "Example page",
  "etag": "1",
  "item_status": "trashed",
  "modified_at": "2012-12-12T10:53:43-08:00",
  "modified_by": {
    "id": "11446498",
    "type": "user",
    "login": "ceo@example.com",
    "name": "Aaron Levie"
  },
  "name": "My Bookmark",
  "owned_by": {
    "id": "11446498",
    "type": "user",
    "login": "ceo@example.com",
    "name": "Aaron Levie"
  },
  "parent": {
    "id": "12345",
    "type": "folder",
    "etag": "1",
    "name": "Contracts",
    "sequence_id": "3"
  },
  "path_collection": {
    "entries": [
      {
        "type": "folder",
        "id": "123456789",
        "sequence_id": "null",
        "etag": "null",
        "name": "Trash"
      }
    ],
    "total_count": 1
  },
  "purged_at": "2012-12-12T10:53:43-08:00",
  "sequence_id": "3",
  "shared_link": "null",
  "trashed_at": "2012-12-12T10:53:43-08:00",
  "url": "https://www.example.com/example/1234"
}