Get a file version

get
https://api.box.com/2.0
/files/:file_id/versions/:file_version_id

Retrieve a specific older version of a file.

Versions are only tracked for Box users with premium accounts.

Request

application/json

Path Parameters

stringin pathrequired
12345

The unique identifier that represent a file.

The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the url https://*.app.box.com/files/123 the file_id is 123.

stringin pathrequired
1234

The ID of the file version

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/jsonFile Version

Returns a file object.

Not all available fields are returned by default. Use the fields query parameter to explicitly request any specific fields.

You can now try out some of our APIs live, right here in the documentation.
Log In

Request Example

cURL
curl -X GET https://api.box.com/2.0/files/12345/versions/456456 \
     -H "Authorization: Bearer <ACCESS_TOKEN>"

Response Example

{
  "id": 12345,
  "type": "file_version",
  "sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc",
  "name": "tigers.jpeg",
  "size": 629644,
  "created_at": "2012-12-12T10:53:43-08:00",
  "modified_at": "2012-12-12T10:53:43-08:00",
  "modified_by": {
    "id": 11446498,
    "type": "user",
    "name": "Aaron Levie",
    "login": "ceo@example.com"
  },
  "trashed_at": "2012-12-12T10:53:43-08:00",
  "trashed_by": {
    "id": 11446498,
    "type": "user",
    "name": "Aaron Levie",
    "login": "ceo@example.com"
  },
  "restored_at": "2012-12-12T10:53:43-08:00",
  "restored_by": {
    "id": 11446498,
    "type": "user",
    "name": "Aaron Levie",
    "login": "ceo@example.com"
  },
  "purged_at": "2012-12-12T10:53:43-08:00"
}