v1

latestOpenAPI 3.0.2Apache-2.02026-07-142963051.0 MB
File versions

Get file version

Retrieve a specific version of a file.

Versions are only tracked for Box users with premium accounts.

get/files/{file_id}/versions/{file_version_id}

Path parameters

file_idstring required

The unique identifier that represents 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.

file_version_idstring required

The ID of the file version.

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.

Response

Returns a specific version of a file.

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

idstring required

The unique identifier that represent a file version.

type'file_version' required

The value will always be file_version.

sha1string

The SHA1 hash of this version of the file.

namestring

The name of the file version.

sizeinteger

Size of the file version in bytes.

created_atstring date-time

When the file version object was created.

modified_atstring date-time

When the file version object was last updated.

trashed_atstring date-time nullable

When the file version object was trashed.

restored_atstring date-time nullable

When the file version was restored from the trash.

purged_atstring date-time nullable

When the file version object will be permanently deleted.

uploader_display_namestring

The display name of the user that uploaded the file. In most cases this is the name of the user logged in at the time of the upload.

If the file was uploaded using a File Request form that requires the user to provide an email address, this field is populated with that email address. If an email address was not required in the File Request form, this field is set to return a value of File Request.

In all other anonymous cases where no email was provided this field will default to a value of Someone.

version_numberstring

The version number of this file version.

Example response

{
  "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",
  "uploader_display_name": "Ellis Wiggins",
  "version_number": "1"
}