v1

latestOpenAPI 3.0.2Apache-2.02026-07-142963051.0 MB
Trashed web links

Restore web link

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

An optional new parent ID can be provided to restore the web link to in case the original folder has been deleted.

post/web_links/{web_link_id}

Path parameters

web_link_idstring required

The ID of the web link.

Query parameters

fieldsstring[]

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.

Request body

namestring

An optional new name for the web link.

Example request

{
  "name": "Restored.docx",
  "parent": {
    "id": "123"
  }
}

Response

Returns a web link object when it has been restored.

type'web_link'

The value will always be web_link.

idstring

The unique identifier for this web link.

sequence_idstring required

A numeric identifier that represents the most recent user event that has been applied to this item.

This can be used in combination with the GET /events-endpoint to filter out user events that would have occurred before this identifier was read.

An example would be where a Box Drive-like application would fetch an item via the API, and then listen to incoming user events for changes to the item. The application would ignore any user events where the sequence_id in the event is smaller than or equal to the sequence_id in the originally fetched resource.

etagstring

The entity tag of this web link. Used with If-Match headers.

namestring

The name of the web link.

urlstring

The URL this web link points to.

descriptionstring

The description accompanying the web link. This is visible within the Box web application.

created_atstring date-time

When this file was created on Box’s servers.

modified_atstring date-time

When this file was last updated on the Box servers.

trashed_atstring nullable

The time at which this bookmark was put in the trash - becomes null after restore.

purged_atstring nullable

The time at which this bookmark will be permanently deleted - becomes null after restore.

shared_linkstring nullable

The shared link for this bookmark. This will be null if a bookmark had been trashed, even though the original shared link does become active again.

item_status'active' | 'trashed' | 'deleted'

Whether this item is deleted or not. Values include active, trashed if the file has been moved to the trash, and deleted if the file has been permanently deleted.

Example response

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